/* 极简壳层样式 */

:root {
  --txs-primary: #a67b5b;
  --txs-secondary: #d2b48c;
  --txs-bg: #f9f6f0;
  --txs-text: #333333;
  --txs-muted: #7a6a5a;
  --txs-panel: #fffdf9;
  --txs-border: #e5d9c8;
  --txs-danger: #c0392b;
  --txs-ok: #3d7a5a;
  --txs-shadow: 0 8px 28px rgba(166, 123, 91, 0.08);
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, #faf7f2 0%, #f3ebe1 100%);
  color: var(--txs-text);
  font-family: var(--font-ui);
}

button,
textarea {
  font: inherit;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--txs-border);
  background: rgba(255, 253, 249, 0.9);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--txs-primary);
}

.brand-sub {
  font-size: 12px;
  color: var(--txs-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--txs-border);
  background: var(--txs-panel);
  color: var(--txs-text);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--txs-secondary);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--txs-primary);
  border-color: var(--txs-primary);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, #a67b5b, #c4a484);
  border: none;
  color: #fff;
  font-weight: 600;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 13px;
}

.simple-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  min-height: calc(100vh - 64px);
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--txs-border);
  background: rgba(255, 253, 249, 0.65);
}

.panel:last-child {
  border-right: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--txs-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--txs-primary);
  letter-spacing: 0.04em;
}

.head-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.panel-body {
  flex: 1;
  padding: 12px 14px 18px;
  min-height: 0;
  overflow: auto;
}

.stack {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
}

.box {
  flex: 1;
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--txs-border);
  border-radius: 10px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.65;
  background: #fff;
  color: var(--txs-text);
  outline: none;
}

.box:focus {
  border-color: var(--txs-secondary);
  box-shadow: 0 0 0 3px rgba(210, 180, 140, 0.25);
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--txs-muted);
  cursor: pointer;
}

.status-line {
  margin: 0;
  font-size: 12px;
  color: var(--txs-muted);
  min-height: 1.4em;
}

.status-line.error {
  color: var(--txs-danger);
}

.status-line.ok {
  color: var(--txs-ok);
}

.safety-report {
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--txs-border);
  font-size: 12px;
  line-height: 1.55;
  max-height: 180px;
  overflow: auto;
}

.safety-report ul {
  margin: 6px 0;
  padding-left: 1.2em;
}

.muted {
  font-size: 11px;
  font-weight: 400;
  color: var(--txs-muted);
}

.preview-wrap {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(100%, 400px);
  background: #fff;
  border: 1px solid var(--txs-border);
  border-radius: 12px;
  box-shadow: var(--txs-shadow);
  overflow: hidden;
}

.rich-edit {
  min-height: 360px;
  outline: none;
  background: #f9f6f0;
}

.rich-edit:empty::before {
  content: attr(data-placeholder);
  color: #aaa;
  padding: 20px 16px;
  display: block;
}

.wx-badge {
  display: inline-flex;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--txs-border);
  background: #fff;
  color: var(--txs-muted);
  white-space: nowrap;
}

.wx-badge.ok {
  border-color: #b7d4c4;
  background: #eef7f1;
  color: var(--txs-ok);
}

.wx-badge.warn {
  border-color: #e6d3a8;
  background: #fff8e8;
  color: #8a6a20;
}

.wx-badge.error {
  border-color: #e8b4b0;
  background: #fff0ee;
  color: var(--txs-danger);
}

@media (max-width: 1100px) {
  .simple-layout {
    grid-template-columns: 1fr;
  }

  .panel {
    border-right: none;
    border-bottom: 1px solid var(--txs-border);
  }

  .box {
    min-height: 180px;
  }
}
