:root {
  --bg: #f5f1e8;
  --paper: rgba(255, 252, 246, 0.86);
  --paper-strong: rgba(255, 252, 246, 0.96);
  --line: rgba(47, 39, 31, 0.1);
  --text: #26211c;
  --muted: #6f655c;
  --soft: #978a7d;
  --accent: #c66a35;
  --accent-soft: rgba(198, 106, 53, 0.12);
  --dark: #201b17;
  --green: #50735d;
  --shadow: 0 24px 70px rgba(49, 37, 27, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(212, 174, 127, 0.18), transparent 26%),
    radial-gradient(circle at right top, rgba(125, 111, 94, 0.08), transparent 28%),
    linear-gradient(180deg, #f5f1e8 0%, #f8f4ec 100%);
}

button,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.hero,
.control-strip,
.arena-panel,
.panel {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  border-radius: 36px;
  padding: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 20px;
}

.eyebrow,
.section-kicker,
.note-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: "Instrument Serif", serif;
  font-size: clamp(46px, 6vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.subtitle {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--dark);
  color: #fcf8f2;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  border-color: var(--line);
}

.hero-note {
  border-radius: 28px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.72), rgba(248, 242, 232, 0.92));
  border: 1px solid rgba(47, 39, 31, 0.08);
}

.hero-topic {
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.note-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.note-metrics div {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(47, 39, 31, 0.06);
}

.note-metrics span,
.stat-card span {
  display: block;
  font-size: 12px;
  color: var(--soft);
  margin-bottom: 6px;
}

.note-metrics strong,
.stat-card strong {
  font-size: 22px;
}

.main-layout {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.control-strip {
  border-radius: 30px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 14px;
}

.field {
  padding: 8px;
}

.field label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--soft);
}

textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  cursor: pointer;
  transition: all 160ms ease;
}

.chip.compact {
  padding: 9px 12px;
}

.chip.active {
  background: var(--accent-soft);
  border-color: rgba(198, 106, 53, 0.24);
  color: var(--text);
}

.arena-panel {
  border-radius: 34px;
  padding: 24px;
}

.arena-top,
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.arena-top h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
  max-width: 760px;
}

.arena-stats {
  display: flex;
  gap: 12px;
}

.stat-card {
  min-width: 120px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(47, 39, 31, 0.06);
}

.arena-stage {
  position: relative;
  margin-top: 22px;
  min-height: 360px;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.68), rgba(245, 239, 229, 0.28) 42%, rgba(232, 223, 210, 0.42) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(239, 232, 221, 0.72));
  border: 1px solid rgba(47, 39, 31, 0.08);
}

.arena-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(39, 31, 25, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 31, 25, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 92%);
}

.arena-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72vw, 500px);
  height: min(26vw, 152px);
  transform: translate(-50%, -4%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: 1.5px solid rgba(47, 39, 31, 0.1);
  box-shadow: inset 0 -10px 24px rgba(120, 108, 94, 0.06);
}

.arena-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px dashed rgba(47, 39, 31, 0.08);
  background: transparent;
  opacity: 1;
}

.arena-ring::after {
  content: "";
  position: absolute;
  inset: auto 20% -18px 20%;
  height: 26px;
  border-radius: 50%;
  background: rgba(47, 39, 31, 0.04);
  filter: blur(8px);
}

.pixel-arena {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.fighter {
  position: absolute;
  width: 88px;
  transform: translate(-50%, -50%);
  transition: left 380ms ease, top 380ms ease, transform 280ms ease, opacity 240ms ease;
}

.fighter.active {
  transform: translate(-50%, -54%) scale(1.06);
}

.fighter.winner .line-head {
  box-shadow: 0 0 0 6px rgba(198, 106, 53, 0.12);
}

.fighter-name {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--soft);
  margin-top: 6px;
}

.pixel-body {
  position: relative;
  width: 64px;
  margin: 0 auto;
}

.line-head,
.line-neck,
.line-torso,
.line-arm,
.line-leg {
  position: absolute;
}

.line-head {
  left: 20px;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--outline);
  background: rgba(255, 252, 246, 0.82);
}

.line-neck {
  left: 29px;
  top: 24px;
  width: 3px;
  height: 8px;
  background: var(--outline);
  border-radius: 999px;
}

.line-torso {
  left: 23px;
  top: 31px;
  width: 14px;
  height: 28px;
  border-radius: 12px;
  border: 2.5px solid var(--outline);
  background: rgba(255, 255, 255, 0.18);
}

.line-arm {
  top: 36px;
  width: 18px;
  height: 3px;
  background: var(--outline);
  border-radius: 999px;
  transform-origin: center left;
}

.line-arm.left {
  left: 8px;
  transform: rotate(28deg);
}

.line-arm.right {
  left: 38px;
  transform: rotate(-28deg);
}

.fighter.active .line-arm.right {
  animation: gesture 520ms ease-in-out infinite alternate;
}

.line-leg {
  top: 58px;
  width: 18px;
  height: 3px;
  background: var(--outline);
  border-radius: 999px;
  transform-origin: center left;
}

.line-leg.left {
  left: 24px;
  transform: rotate(48deg);
}

.line-leg.right {
  left: 24px;
  transform: rotate(-48deg);
}

.pixel-shadow {
  width: 38px;
  height: 10px;
  margin: 78px auto 0;
  border-radius: 999px;
  background: rgba(39, 31, 25, 0.08);
  filter: blur(5px);
}

.speech-bubble {
  position: absolute;
  z-index: 3;
  max-width: 340px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--paper-strong);
  border: 1px solid rgba(47, 39, 31, 0.12);
  color: var(--text);
  line-height: 1.7;
  box-shadow: 0 18px 36px rgba(49, 37, 27, 0.1);
  transition: opacity 180ms ease, transform 180ms ease;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: var(--paper-strong);
  border-right: 1px solid rgba(47, 39, 31, 0.12);
  border-bottom: 1px solid rgba(47, 39, 31, 0.12);
  transform: rotate(45deg);
}

.speech-bubble.is-hidden {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

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

.momentum-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(47, 39, 31, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

.momentum-card.active {
  border-color: rgba(198, 106, 53, 0.24);
  background: rgba(198, 106, 53, 0.08);
}

.momentum-card.winner {
  border-color: rgba(80, 115, 93, 0.22);
  background: rgba(80, 115, 93, 0.08);
}

.momentum-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.momentum-name {
  font-weight: 700;
}

.momentum-role {
  font-size: 12px;
  color: var(--soft);
  margin-top: 4px;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(47, 39, 31, 0.08);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--fill, 0%);
  background: linear-gradient(90deg, rgba(198, 106, 53, 0.6), rgba(198, 106, 53, 0.9));
}

.momentum-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--soft);
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.82fr);
  gap: 22px;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.panel {
  border-radius: 30px;
  padding: 22px;
}

.text-button {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.feed {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
}

.feed-item,
.winner-card,
.podcast-box {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(47, 39, 31, 0.06);
}

.feed-item {
  padding: 16px;
}

.feed-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.feed-top strong {
  font-size: 14px;
}

.feed-top span {
  color: var(--soft);
}

.feed-item p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.8;
}

.empty-state,
.winner-empty {
  color: var(--soft);
  line-height: 1.8;
}

.winner-card,
.podcast-box {
  padding: 18px;
}

.winner-card h4 {
  font-size: 24px;
  margin: 8px 0;
}

.winner-card p:last-child {
  color: var(--muted);
  line-height: 1.8;
}

.podcast-title {
  font-size: 20px;
  font-weight: 700;
}

.podcast-summary {
  margin-top: 10px;
  line-height: 1.8;
}

.takeaway-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
}

@keyframes gesture {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-6px) rotate(-6deg);
  }
}

@media (max-width: 980px) {
  .hero,
  .control-strip,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .arena-stats,
  .momentum-board {
    grid-template-columns: 1fr 1fr;
  }

  .momentum-board {
    display: grid;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 16px, 1180px);
    padding-top: 14px;
  }

  .hero,
  .control-strip,
  .arena-panel,
  .panel {
    padding: 18px;
    border-radius: 24px;
  }

  .subtitle {
    font-size: 16px;
  }

  .hero-actions,
  .arena-stats,
  .note-metrics,
  .momentum-board {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .arena-stage {
    min-height: 420px;
  }

  .fighter {
    width: 76px;
  }

  .speech-bubble {
    max-width: 260px;
  }
}
