/* ===== 基础与主题变量 ===== */
:root {
  --paper: #f6f1e6;
  --paper-deep: #efe7d6;
  --card: #fffdf6;
  --ink: #26221c;
  --ink-soft: #6b635a;
  --ink-faint: #9a9184;
  --accent: #b03a2e;
  --accent-deep: #8f2f25;
  --accent-soft: #e7cfc7;
  --line: #e2dac8;
  --shadow: 0 14px 40px -18px rgba(38, 34, 28, 0.28);
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -10%, #fbf6ea 0%, transparent 60%),
    var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-soft); color: var(--ink); }

/* ===== 头部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 230, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-seal,
.footer-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff8ef;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 248, 239, 0.5);
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover { color: var(--accent); background: var(--accent-soft); }

.header-extra { display: flex; align-items: center; }

.lang-pill {
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ===== 主功能区 ===== */
.converter {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 72px;
  overflow: hidden;
}

.watermark {
  position: absolute;
  top: -30px;
  right: -20px;
  font-family: var(--serif);
  font-size: 260px;
  line-height: 1;
  color: rgba(176, 58, 46, 0.05);
  pointer-events: none;
  user-select: none;
}

.converter-head {
  text-align: center;
  margin-bottom: 40px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.35em;
  color: var(--accent);
  font-weight: 600;
}

.converter-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.sub {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

/* 转换面板 */
.panel-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: start;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbf7ed;
}

.panel-label {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.panel-count {
  font-size: 12.5px;
  color: var(--ink-faint);
}

.editor {
  width: 100%;
  height: 300px;
  border: none;
  outline: none;
  resize: vertical;
  padding: 16px 18px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.95;
  color: var(--ink);
  background: transparent;
}

.editor::placeholder { color: var(--ink-faint); }

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fbf7ed;
}

/* 按钮 */
.ghost-btn,
.primary-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
  min-height: 38px;
}

.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

.primary-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8ef;
}

.primary-btn:hover { background: var(--accent-deep); }

/* 印章式方向切换 */
.switch-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
}

.seal-toggle {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  gap: 2px 4px;
  width: 74px;
  height: 74px;
  padding: 0;
  border: none;
  background: var(--accent);
  color: #fff8ef;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255, 248, 239, 0.55), var(--shadow);
  transition: transform 0.15s, background 0.2s;
}

.seal-toggle:hover { background: var(--accent-deep); transform: translateY(-2px); }
.seal-toggle:active { transform: translateY(0) scale(0.97); }

.seal-s, .seal-t {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.seal-arrow {
  font-size: 15px;
  opacity: 0.85;
  grid-column: span 2;
  line-height: 1;
}

.switch-hint {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}

/* 状态提示 */
.status {
  margin: 22px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-faint);
  min-height: 22px;
}

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

/* ===== 特点 ===== */
.features {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 26px 22px;
}

.feature-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.feature h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ===== 关于 ===== */
.about {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.about h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}

.about p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 780px;
}

.hl {
  color: var(--accent);
  font-weight: 600;
}

/* ===== 尾部导航 ===== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 24px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
}

.footer-seal {
  width: 34px;
  height: 34px;
  font-size: 14px;
  border-radius: 6px;
}

.footer-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
}

.footer-nav a:hover { color: var(--accent); }

.copyright {
  width: 100%;
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 13px;
}

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .panel-wrap { grid-template-columns: 1fr; gap: 18px; }
  .switch-col { flex-direction: row; padding-top: 0; }
  .switch-hint { order: -1; }
  .features { grid-template-columns: 1fr; }
  .header-extra { display: none; }
  .converter-head h1 { font-size: 34px; }
  .editor { height: 220px; font-size: 17px; }
}

@media (max-width: 520px) {
  .brand-name { font-size: 17px; }
  .main-nav { gap: 0; }
  .main-nav a { font-size: 14px; padding: 8px 10px; }
  .converter { padding-top: 44px; }
  .converter-head h1 { font-size: 29px; }
}
