/* 语音自定义页：沿用牌桌的绿绒 + 金色点缀，独立于游戏页面 */
:root {
  --felt-1: #1f8a4d;
  --panel: rgba(5, 30, 17, 0.9);
  --panel-2: rgba(4, 24, 13, 0.96);
  --text: #effaf2;
  --muted: #9cc7ad;
  --muted-dim: rgba(156, 199, 173, 0.6);
  --gold: #f6d87c;
  --gold-2: #ffe6a0;
  --red: #e5534b;
  --line: rgba(246, 216, 124, 0.2);
  --line-strong: rgba(246, 216, 124, 0.45);
  --radius: 16px;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% -12%, rgba(48, 190, 110, 0.28), transparent 55%),
    linear-gradient(180deg, #072f1a 0%, #04200f 58%, #02110a 100%);
  background-attachment: fixed;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
code { color: var(--gold-2); font-size: 0.92em; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 26px;
  background: rgba(2, 18, 10, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand { font-size: 19px; font-weight: 700; letter-spacing: 0.5px; white-space: nowrap; }
.brand small { color: var(--muted); font-size: 12px; font-weight: 400; }
.dot {
  display: inline-block; width: 9px; height: 9px; margin-right: 8px;
  border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}
.pack-meta { color: var(--muted); font-size: 12.5px; flex: 1; text-align: center; }
.topbar .btn { margin-left: auto; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 22px 70px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}
.hero {
  display: flex; gap: 28px; align-items: stretch;
  padding: 24px 28px; margin-bottom: 16px;
}
.hero-main { flex: 1; min-width: 0; }
.hero h1 { margin: 0 0 8px; font-size: 26px; color: var(--gold-2); }
.hero p { margin: 0; color: var(--muted); max-width: 680px; }
.hero-side { display: grid; grid-template-columns: repeat(3, minmax(96px, 1fr)); gap: 10px; align-content: center; }
.metric {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(0, 0, 0, 0.18); text-align: center;
}
.metric span { display: block; color: var(--muted-dim); font-size: 11.5px; }
.metric b { display: block; margin-top: 2px; color: var(--gold-2); font-size: 14px; white-space: nowrap; }

.warn {
  margin: 0 0 16px; padding: 12px 16px; border-radius: 12px;
  border: 1px solid rgba(229, 83, 75, 0.5);
  background: rgba(229, 83, 75, 0.12); color: #ffd3ce; font-size: 13.5px;
}
.hidden { display: none !important; }

.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 18px;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { margin-left: auto; }
.status { color: var(--muted); font-size: 13px; min-width: 90px; text-align: right; }
.status.ok { color: #a9f0c2; }
.status.err { color: #ffb0a9; }

.btn {
  appearance: none; cursor: pointer;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(246, 216, 124, 0.1);
  color: var(--gold-2);
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(246, 216, 124, 0.2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(180deg, #f6d87c, #d9ab35); color: #24310f; border-color: #ffe6a0; font-weight: 700; }
.btn.original { background: rgba(246, 216, 124, 0.1); }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn.mini { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.groups { display: grid; gap: 16px; }
.group { overflow: hidden; }
.group-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
}
.group-head label { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 700; color: var(--gold-2); }
.group-head .count { color: var(--muted-dim); font-size: 12px; font-weight: 400; }
.group-head .group-play { margin-left: auto; }
.rows { display: grid; }
.row {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 72px minmax(120px, 190px) minmax(160px, 1fr) auto auto 58px;
  padding: 10px 18px; border-top: 1px dashed rgba(246, 216, 124, 0.1);
}
.row:first-child { border-top: 0; }
.row.muted-row { opacity: 0.55; }
.row .check { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.row .key { color: var(--muted-dim); font-size: 11.5px; font-family: Consolas, "Courier New", monospace; overflow: hidden; text-overflow: ellipsis; }
.row .text {
  width: 100%; min-width: 0; padding: 7px 10px;
  border-radius: 9px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28); color: var(--text);
  outline: none;
}
.row .text:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(246, 216, 124, 0.16); }
.row .badge {
  justify-self: end; min-width: 48px; text-align: center;
  padding: 3px 8px; border-radius: 999px; font-size: 11px;
  color: var(--muted); border: 1px solid var(--line);
}
.row .badge.custom { color: #ffd98b; border-color: rgba(246, 216, 124, 0.55); background: rgba(246, 216, 124, 0.1); }
.row .badge.generating { color: #a9f0c2; border-color: rgba(169, 240, 194, 0.45); }
input[type="checkbox"] { accent-color: #f6d87c; width: 15px; height: 15px; cursor: pointer; }
.hint-line { padding: 0 18px 12px; color: var(--muted-dim); font-size: 12px; }
.footnote { color: var(--muted-dim); font-size: 12.5px; margin: 22px 4px 0; }

@media (max-width: 860px) {
  .hero { flex-direction: column; }
  .hero-side { grid-template-columns: repeat(3, 1fr); }
  .row { grid-template-columns: 70px 1fr; grid-auto-rows: auto; }
  .row .key { grid-column: 2; }
  .row .text { grid-column: 1 / -1; }
  .row .badge { grid-row: 1; grid-column: 2; justify-self: start; }
}
