/* ═══════════════════════════════════════════
   AI 起名 · 页面专属样式（左步骤 / 右表单纸）
   在 style.css 之后加载，只作用于 .naming-page
   ═══════════════════════════════════════════ */

.naming-page {
  --np-ink:    #1F2A33;
  --np-ink-2:  #2C3A45;
  --paper:     #F6F3EC;
  --paper-2:   #FBFAF6;
  --line:      #DDD6C6;
  --line-2:    #C9BFA8;
  --gold:      #A98B4C;
  --gold-soft: rgba(169,139,76,.14);
  --text:      #2A2F33;
  --muted:     #7C8288;
}

body.naming-body { background: #F6F3EC; font-weight: 400; font-size: 15px; line-height: 1.8; }

.naming-page {
  max-width: 1180px; margin: 0 auto;
  padding: 56px 32px 96px;
  display: grid; grid-template-columns: 260px 1fr; gap: 64px; align-items: start;
  color: var(--text);
}

/* ── 左：竖向步骤 + 说明 ── */
.naming-page aside { position: sticky; top: 96px; }
.steps { list-style: none; }
.steps li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 0 0 30px; position: relative; color: var(--muted);
}
.steps li::before {
  content: ''; position: absolute; left: 15px; top: 32px; bottom: 0;
  width: 1px; background: var(--line-2);
}
.steps li:last-child::before { display: none; }
.steps .n {
  flex: none; width: 31px; height: 31px;
  border: 1px solid var(--line-2); display: grid; place-items: center;
  font-family: var(--f-display); font-size: 14px; background: var(--paper);
  transition: background .2s, color .2s;
}
.steps .t { font-size: 1rem; letter-spacing: .2em; line-height: 31px; }
.steps .d { display: block; font-size: .8rem; letter-spacing: .05em; line-height: 1.6; margin-top: 2px; color: var(--muted); }
.steps li.active { color: var(--text); }
.steps li.active .n { background: var(--np-ink); color: #fff; border-color: var(--np-ink); }
.steps li.done .n { border-color: var(--gold); color: var(--gold); }
.steps li.done { color: #4B5257; }
.aside-note {
  margin-top: 8px; padding: 18px 20px;
  border-left: 2px solid var(--gold); background: var(--gold-soft);
  font-size: .82rem; line-height: 1.9; color: #5D5546;
}
.aside-note b { display: block; font-weight: 500; letter-spacing: .2em; margin-bottom: 4px; color: var(--gold); }

/* ── 右：纸 ── */
.sheet {
  background: var(--paper-2); border: 1px solid var(--line);
  padding: 44px 52px 40px; position: relative;
}
.sheet::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.sheet-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 34px;
}
.sheet-head h1, .sheet-head h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; letter-spacing: .3em; color: var(--text); }
.sheet-head span { font-family: var(--f-latin); letter-spacing: .2em; font-size: .72rem; color: var(--gold); text-transform: uppercase; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; margin-bottom: 28px; }
.row.one { grid-template-columns: 1fr; }
.field .lb { display: flex; align-items: baseline; gap: 10px; font-size: .92rem; font-weight: 500; letter-spacing: .15em; margin-bottom: 9px; color: var(--text); }
.field .lb i { font-style: normal; font-weight: 400; font-size: .75rem; color: var(--muted); letter-spacing: .05em; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 6px; letter-spacing: .03em; }

/* 控件统一：下划线式 */
.sheet .in, .sheet select, .sheet textarea {
  font: inherit; color: var(--text); background: transparent;
  border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  padding: 8px 2px; width: 100%; transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
}
.sheet .in:focus, .sheet select:focus, .sheet textarea:focus { border-bottom-color: var(--np-ink); outline: none; }
.sheet .in::placeholder, .sheet textarea::placeholder { color: #B4B0A6; }
.sheet select {
  padding-right: 22px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.sheet textarea { resize: vertical; min-height: 70px; line-height: 1.7; }
.in-surname { font-family: var(--f-display); font-size: 1.3rem; letter-spacing: .2em; }

/* 一行不折行 */
.inline { display: flex; align-items: baseline; gap: 8px; flex-wrap: nowrap; }
.inline select, .inline .in { width: auto; }
.inline .w-y { width: 84px; } .inline .w-2 { width: 58px; } .inline .w-3 { width: 92px; }
.inline .w-h { width: 48%; }
.inline .u { color: var(--muted); font-size: .85rem; flex: none; }
.inline .sep { width: 16px; height: 1px; background: var(--line-2); flex: none; align-self: center; margin: 0 6px; }

/* 分段选择 */
.seg { display: inline-flex; border: 1px solid var(--line-2); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seg span {
  display: block; padding: 7px 18px; font-size: .88rem; letter-spacing: .1em;
  border-left: 1px solid var(--line-2); color: var(--muted); transition: background .2s, color .2s;
}
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--np-ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }

/* 品格卡 */
.cards { display: flex; flex-wrap: wrap; gap: 8px; }
.cards label { position: relative; cursor: pointer; }
.cards input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.cards span {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px 6px 10px;
  border: 1px solid var(--line); background: var(--paper);
  font-size: .86rem; letter-spacing: .06em; color: #4B5257; transition: all .2s;
}
.cards span b { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; color: var(--text); }
.cards input:checked + span { border-color: var(--gold); background: var(--gold-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--gold); }
.cards input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.divider { height: 1px; background: var(--line); margin: 8px 0 30px; }
.divider.t { position: relative; text-align: center; margin: 36px 0 30px; }
.divider.t span {
  position: absolute; top: -.85em; left: 50%; transform: translateX(-50%);
  background: var(--paper-2); padding: 0 14px; font-size: .78rem; letter-spacing: .3em; color: var(--gold);
}

/* 底部动作 */
.actions { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); gap: 16px; }
.actions .note { font-size: .8rem; color: var(--muted); letter-spacing: .05em; }
.btn-go {
  background: var(--np-ink); color: #fff; border: 0; padding: 13px 40px;
  font: inherit; font-size: .95rem; letter-spacing: .35em; cursor: pointer;
  display: inline-flex; align-items: center; gap: 14px; transition: background .2s, transform .2s;
}
.btn-go:hover { background: var(--np-ink-2); transform: translateY(-1px); }
.btn-go em { font-style: normal; font-family: var(--f-latin); letter-spacing: .1em; font-size: .85rem; color: var(--gold); }

/* 错误提示放在纸内顶部 */
.naming-page .error-toast { margin: 0 0 20px; }

/* 后续三步沿用组件样式，只统一纸面 */
.sheet .panel-actions { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 36px; }
.sheet .wuxing-summary { background: var(--gold-soft); border-color: transparent; border-left-color: var(--gold); }
.col-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); cursor: pointer; letter-spacing: .05em; margin-bottom: 14px; }
.col-toggle input { accent-color: var(--gold); }
.hide-wuxing .column-row[data-col="wuxing"] { display: none !important; }

@media (max-width: 900px) {
  .naming-page { grid-template-columns: 1fr; gap: 32px; padding: 32px 20px 64px; }
  .naming-page aside { position: static; }
  .steps { display: flex; gap: 0; overflow-x: auto; }
  .steps li { flex: 1; padding: 0 8px 0 0; }
  .steps li::before { display: none; }
  .steps .d { display: none; }
  .aside-note { display: none; }
  .sheet { padding: 28px 22px; }
  .row { grid-template-columns: 1fr; }
  .inline { flex-wrap: wrap; }
  .actions { flex-direction: column; align-items: stretch; text-align: center; }
}
