:root {
  --bg: #f3efe5;
  --paper: rgba(255, 251, 245, 0.92);
  --ink: #21201c;
  --muted: #666156;
  --line: #d6ccb9;
  --accent: #c76033;
  --accent-deep: #8e3e1d;
  --green: #2d6a57;
  --shadow: 0 18px 40px rgba(59, 41, 18, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(199, 96, 51, 0.14), transparent 28%),
    radial-gradient(circle at left 12%, rgba(45, 106, 87, 0.12), transparent 24%),
    linear-gradient(180deg, #f5f1e8, #efe7d8);
}

.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.lead {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
}

.hero-note {
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(199, 96, 51, 0.12), rgba(255, 255, 255, 0.55));
}

.hero-note-label {
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--accent-deep);
}

.panel {
  margin-top: 20px;
  padding: 24px;
}

.mode-switch {
  display: inline-flex;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(45, 106, 87, 0.08);
}

.mode-btn {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mode-btn.active {
  background: #fffaf2;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.source-section {
  margin-top: 20px;
}

.panel-head p {
  color: var(--muted);
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

.picker span {
  color: var(--muted);
  font-size: 14px;
}

select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}

select:disabled {
  background: #f0ebe2;
  color: #938b7d;
}

.text-input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  font-family: inherit;
}

.text-input {
  height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 160px;
  padding: 14px;
  line-height: 1.7;
  resize: vertical;
}

.textarea-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  font-weight: 600;
}

.custom-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.custom-actions {
  margin-top: 16px;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  background: #fffaf2;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.settings-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.summary-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(45, 106, 87, 0.08);
}

.full-width {
  width: 100%;
}

.summary-label,
.player-kicker,
.status-label {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.actions {
  margin-top: 22px;
}

.primary-btn,
.ghost-btn {
  height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

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

.ghost-btn {
  border: 1px solid var(--line);
  background: #fffaf2;
  color: var(--ink);
}

.hidden {
  display: none;
}

.player-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.progress-wrap {
  margin-top: 22px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.progress-bar {
  margin-top: 8px;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(45, 106, 87, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #79b39f);
  transition: width 0.28s ease;
}

.status-board {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.status-card {
  min-height: 132px;
  padding: 18px;
  border-radius: 20px;
  background: #fffdf8;
  border: 1px solid var(--line);
}

.status-value {
  margin-top: 12px;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
}

.hint-text {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.answers-panel {
  margin-top: 20px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.answers-list {
  margin: 14px 0 0;
  padding-left: 24px;
  line-height: 1.9;
}

@media (max-width: 760px) {
  .hero,
  .picker-grid,
  .settings-grid,
  .status-board,
  .player-top {
    grid-template-columns: 1fr;
    display: grid;
  }

  .player-top {
    align-items: start;
  }
}
