:root {
  --bg: #070b14;
  --bg-soft: #0c1322;
  --panel: rgba(14, 23, 40, 0.92);
  --panel-2: rgba(20, 31, 53, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(73, 222, 128, 0.35);
  --text: #dbeafe;
  --muted: #8fa5bf;
  --accent: #4ade80;
  --accent-2: #38bdf8;
  --warn: #fbbf24;
  --danger: #fb7185;
  --good: #86efac;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  --radius: 16px;
  --font-size: 16px;
  color-scheme: dark;
}

body[data-theme="light"] {
  --bg: #eef3f8;
  --bg-soft: #e2e8f0;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-2: rgba(245, 248, 252, 0.98);
  --line: rgba(15, 23, 42, 0.14);
  --line-strong: rgba(22, 163, 74, 0.3);
  --text: #172033;
  --muted: #5b6b7e;
  --accent: #16a34a;
  --accent-2: #0284c7;
  --warn: #b45309;
  --danger: #be123c;
  --good: #15803d;
  color-scheme: light;
}

body[data-theme="ide"] {
  --bg: #181818;
  --bg-soft: #1e1e1e;
  --panel: rgba(37, 37, 38, 0.97);
  --panel-2: rgba(45, 45, 48, 0.98);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(78, 201, 176, 0.35);
  --text: #d4d4d4;
  --muted: #9da1a6;
  --accent: #4ec9b0;
  --accent-2: #569cd6;
  --warn: #dcdcaa;
  --danger: #f44747;
  --good: #6a9955;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.08), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(74, 222, 128, 0.07), transparent 28%),
    linear-gradient(145deg, var(--bg), var(--bg-soft));
  color: var(--text);
  font: var(--font-size)/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Noto Sans Mono CJK SC", monospace;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 32px 32px;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.app-shell { min-height: 100vh; padding: 20px; position: relative; z-index: 1; }
.screen { width: min(1480px, 100%); margin: 0 auto; animation: screen-in .28s ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body[data-animation="off"] * { animation: none !important; transition: none !important; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-title { margin: 0; font-size: .98rem; letter-spacing: .04em; }
.panel-body { padding: 16px; }
.subtle { color: var(--muted); }
.good { color: var(--good); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }
.accent { color: var(--accent); }

.title-screen {
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
}
.title-card {
  width: min(960px, 100%);
  padding: clamp(26px, 5vw, 58px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.title-card::after {
  content: '</>';
  position: absolute;
  right: -20px;
  bottom: -55px;
  font-size: 190px;
  color: var(--accent);
  opacity: .035;
  transform: rotate(-8deg);
}
.eyebrow { color: var(--accent); letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; }
.game-title { margin: 16px 0 8px; font-size: clamp(2.1rem, 6vw, 4.6rem); line-height: 1.08; letter-spacing: -.045em; }
.title-highlight { display: block; color: var(--accent); text-shadow: 0 0 28px rgba(74,222,128,.2); }
.title-sub { margin: 16px auto 30px; color: var(--muted); max-width: 720px; }
.menu-grid { width: min(500px, 100%); margin: 0 auto; display: grid; gap: 10px; }
.title-footer { margin-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .82rem; }

.btn {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-2);
  padding: 10px 14px;
  cursor: pointer;
  transition: .16s ease;
  min-height: 42px;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, rgba(74,222,128,.24), rgba(56,189,248,.13)); border-color: var(--line-strong); }
.btn-danger { border-color: rgba(251,113,133,.3); color: var(--danger); }
.btn-ghost { background: transparent; }
.btn-wide { width: 100%; padding: 13px 16px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; }

.topbar {
  min-height: 68px;
  padding: 12px 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.topbar-main { min-width: 0; }
.topbar-title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--muted); font-size: .84rem; }
.topbar-actions { display: flex; gap: 8px; }

.game-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; }
.sidebar { display: grid; gap: 14px; align-content: start; }
.main-column { display: grid; gap: 14px; align-content: start; }

.stat-list { display: grid; gap: 11px; }
.stat-row { display: grid; grid-template-columns: 62px 1fr 48px; gap: 8px; align-items: center; }
.stat-name { color: var(--muted); font-size: .83rem; }
.stat-number { text-align: right; font-weight: 800; font-size: .84rem; }
.bar { height: 8px; border-radius: 99px; overflow: hidden; background: rgba(148,163,184,.12); }
.bar > span { display: block; height: 100%; width: var(--value, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .35s ease; }
.bar.ment > span { background: linear-gradient(90deg, var(--warn), var(--accent)); }
.bar.energy > span { background: linear-gradient(90deg, var(--danger), var(--warn), var(--accent)); }

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted); font-size: .76rem; background: rgba(148,163,184,.05); }
.tag strong { color: var(--text); }
.relationship-list { display: grid; gap: 8px; }
.relationship-item { display: grid; grid-template-columns: 80px 1fr 30px; align-items: center; gap: 8px; font-size: .8rem; }

.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.action-card {
  min-height: 112px;
  text-align: left;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.action-icon { font-size: 1.16rem; color: var(--accent); font-weight: 900; }
.action-name { font-weight: 800; }
.action-desc { color: var(--muted); font-size: .75rem; line-height: 1.35; flex: 1; }
.action-cost { font-size: .72rem; color: var(--warn); }
.action-cost.positive { color: var(--good); }

.log-list { display: grid; gap: 8px; max-height: 360px; overflow: auto; padding-right: 4px; }
.log-item { border-left: 2px solid var(--line); padding: 7px 10px; background: rgba(148,163,184,.035); border-radius: 0 8px 8px 0; }
.log-item.good { border-color: var(--good); }
.log-item.warn { border-color: var(--danger); }
.log-meta { color: var(--muted); font-size: .7rem; margin-bottom: 2px; }
.log-text { color: var(--text); font-size: .82rem; }

.bottom-status { display: flex; gap: 12px 24px; flex-wrap: wrap; padding: 13px 16px; color: var(--muted); font-size: .82rem; }
.bottom-status strong { color: var(--text); }

.create-layout { display: grid; gap: 14px; }
.create-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.background-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.choice-card {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  min-height: 150px;
  transition: .16s ease;
  position: relative;
}
.choice-card:hover:not(.locked) { transform: translateY(-2px); border-color: var(--line-strong); }
.choice-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 10px 28px rgba(74,222,128,.08); }
.choice-card.locked { opacity: .48; cursor: not-allowed; filter: grayscale(.6); }
.choice-title { font-weight: 900; margin-bottom: 6px; }
.choice-desc { font-size: .76rem; color: var(--muted); }
.choice-stats { margin-top: 10px; font-size: .72rem; color: var(--accent-2); }
.lock-badge { position: absolute; right: 10px; top: 10px; font-size: .7rem; color: var(--warn); }

.create-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.allocation-grid { display: grid; gap: 10px; }
.allocation-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper .btn { min-height: 34px; width: 34px; padding: 0; }
.stepper-value { min-width: 28px; text-align: center; font-weight: 800; }
.talent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.talent-card { min-height: 100px; }
.form-row { display: grid; gap: 6px; }
.form-row label { color: var(--muted); font-size: .78rem; }
.input, .select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); padding: 10px 11px;
}

.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.collection-card { padding: 14px; min-height: 126px; }
.collection-card.locked { opacity: .55; }
.collection-icon { font-size: 1.4rem; color: var(--accent); }
.collection-name { font-weight: 900; margin: 6px 0 3px; }
.collection-desc { color: var(--muted); font-size: .76rem; }
.collection-meta { margin-top: 8px; color: var(--accent-2); font-size: .72rem; }

.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 18px 0; }
.summary-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(148,163,184,.035); }
.summary-label { color: var(--muted); font-size: .72rem; }
.summary-value { margin-top: 3px; font-weight: 800; }
.ending-title { text-align: center; margin: 8px 0; font-size: clamp(1.8rem, 5vw, 3.5rem); color: var(--accent); }
.ending-group { text-align: center; color: var(--warn); letter-spacing: .12em; font-size: .78rem; }
.ending-desc { max-width: 800px; margin: 20px auto; font-size: 1rem; line-height: 1.9; text-align: center; }
.ending-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000; padding: 20px; display: grid; place-items: center; background: rgba(0,0,0,.66); backdrop-filter: blur(7px); animation: fade-in .18s ease;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  width: min(760px, 100%); max-height: min(88vh, 900px); overflow: auto; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.5); animation: modal-in .2s ease-out;
}
@keyframes modal-in { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-title { margin: 0; font-size: 1rem; }
.modal-body { padding: 18px; }
.modal-actions { display: grid; gap: 9px; margin-top: 16px; }
.event-option { text-align: left; padding: 13px 14px; }
.event-category { color: var(--accent); font-size: .72rem; letter-spacing: .12em; }
.event-description { line-height: 1.75; margin: 12px 0; }

.toast-root, #toast-root { position: fixed; z-index: 2000; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 11px; padding: 11px 13px; box-shadow: var(--shadow); animation: toast-in .22s ease-out; font-size: .82rem; }
.toast.warn { border-color: rgba(251,191,36,.45); }
.toast.danger { border-color: rgba(251,113,133,.45); }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .78rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 30px 12px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.progress-ring { color: var(--accent); font-weight: 900; }
.quote { padding: 12px 14px; border-left: 3px solid var(--accent); background: rgba(74,222,128,.05); color: var(--muted); border-radius: 0 9px 9px 0; }

@media (max-width: 1100px) {
  .game-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .background-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .app-shell { padding: 10px; }
  .game-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .background-grid, .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .create-two-col { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
}
@media (max-width: 560px) {
  .game-title { font-size: 2rem; }
  .sidebar { grid-template-columns: 1fr; }
  .action-grid, .background-grid, .collection-grid, .talent-grid, .summary-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .topbar-actions { width: 100%; }
  .topbar-actions .btn { flex: 1; }
  .allocation-row { grid-template-columns: 82px 1fr; }
  .allocation-row .stepper { grid-column: 1 / -1; }
}

/* === V2 strategy systems === */
.feature-strip { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:-12px auto 24px; }
.feature-strip span { border:1px solid var(--line); border-radius:999px; padding:5px 9px; color:var(--muted); font-size:.72rem; background:rgba(148,163,184,.04); }
.btn-compact { min-height:34px; padding:6px 10px; border-radius:9px; font-size:.78rem; }

.control {
  width:100%; min-height:46px; border:1px solid var(--line); border-radius:12px;
  background:linear-gradient(180deg, rgba(148,163,184,.06), rgba(148,163,184,.025)), var(--panel-2);
  color:var(--text); padding:11px 13px; transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.control:hover { border-color:rgba(148,163,184,.34); }
.control:focus { border-color:var(--accent-2); box-shadow:0 0 0 4px rgba(56,189,248,.1); outline:none; }
.select { appearance:none; padding-right:42px; background-image:linear-gradient(45deg, transparent 50%, var(--muted) 50%),linear-gradient(135deg, var(--muted) 50%, transparent 50%),linear-gradient(180deg, rgba(148,163,184,.06), rgba(148,163,184,.025)); background-position:calc(100% - 19px) 20px,calc(100% - 14px) 20px,0 0; background-size:5px 5px,5px 5px,100% 100%; background-repeat:no-repeat; }
.textarea { min-height:92px; resize:vertical; line-height:1.55; }
.form-grid { display:grid; gap:14px; }
.form-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-field { display:grid; gap:7px; min-width:0; }
.form-field > label { color:var(--text); font-size:.8rem; font-weight:700; }
.field-hint { color:var(--muted); font-size:.7rem; line-height:1.45; }
.block-actions { margin-bottom:14px; }

.mental-alert { width:min(1480px,100%); margin:0 auto 14px; border:1px solid var(--line); border-left-width:4px; border-radius:14px; padding:13px 16px; display:grid; gap:4px; background:var(--panel); box-shadow:var(--shadow); }
.mental-alert strong { font-size:.92rem; }
.mental-alert span { color:var(--muted); font-size:.78rem; }
.mental-alert p { margin:3px 0 0; color:var(--muted); font-size:.74rem; }
.mental-alert.notice { border-left-color:var(--accent-2); }
.mental-alert.warn { border-left-color:var(--warn); }
.mental-alert.danger { border-left-color:var(--danger); background:linear-gradient(90deg,rgba(251,113,133,.08),transparent 35%),var(--panel); }
.tag.notice { color:var(--accent-2); }
.tag.warn { color:var(--warn); }
.tag.danger { color:var(--danger); }
.bar.stress > span { background:linear-gradient(90deg,var(--accent-2),var(--warn)); }
.bar.burnout > span { background:linear-gradient(90deg,var(--warn),#f97316); }
.bar.depression > span,.bar.retirement > span { background:linear-gradient(90deg,#f97316,var(--danger)); }

.action-section { border-top:1px solid var(--line); padding-top:16px; margin-top:16px; }
.action-section:first-child { border-top:0; padding-top:0; margin-top:0; }
.action-section-head { display:flex; justify-content:space-between; gap:12px; margin-bottom:10px; }
.action-section-head h3 { margin:0; font-size:.9rem; }
.action-section-head p { margin:2px 0 0; color:var(--muted); font-size:.72rem; }
.action-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.action-card {
  width:100%; min-height:132px; border:1px solid var(--line); border-radius:13px; background:var(--panel-2); color:var(--text);
  padding:13px; text-align:left; display:flex; flex-direction:column; gap:7px; cursor:pointer; transition:.16s ease;
}
.action-card:hover:not(:disabled) { transform:translateY(-2px); border-color:var(--line-strong); box-shadow:0 10px 24px rgba(0,0,0,.18); }
.action-card:disabled { opacity:.42; cursor:not-allowed; }
.action-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px; font-size:.68rem; color:var(--muted); margin-top:auto; }

.skill-list { display:grid; gap:9px; }
.skill-card { border:1px solid var(--line); border-radius:11px; padding:11px 12px; background:rgba(148,163,184,.035); display:flex; justify-content:space-between; align-items:center; gap:12px; }
.skill-card strong { font-size:.82rem; }
.skill-card p { margin:3px 0 0; color:var(--muted); font-size:.7rem; line-height:1.45; }
.skill-level { color:var(--accent); }
.talent-tag { border-color:rgba(74,222,128,.28); color:var(--good); }
.negative-tag { border-color:rgba(251,113,133,.28); color:var(--danger); }
.compact-empty { padding:14px 8px; }

.camp-warning { border:1px solid rgba(251,191,36,.28); border-radius:12px; padding:12px 14px; background:rgba(251,191,36,.06); }
.camp-warning strong { color:var(--warn); }
.camp-warning p { color:var(--muted); font-size:.74rem; margin:5px 0 0; }
.modal-wide { width:min(1040px,100%); }
.event-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:16px; }
.event-option { border:1px solid var(--line); border-radius:12px; background:var(--panel-2); color:var(--text); min-height:86px; padding:12px; cursor:pointer; display:flex; gap:11px; align-items:flex-start; text-align:left; transition:.16s ease; }
.event-option:hover { border-color:var(--line-strong); transform:translateY(-1px); }
.event-option small { display:block; color:var(--muted); margin-top:5px; font-size:.68rem; }
.choice-letter { width:27px; height:27px; border-radius:8px; display:grid; place-items:center; flex:0 0 auto; background:rgba(56,189,248,.1); color:var(--accent-2); font-weight:900; }

.contest-headline { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:3px 0 14px; }
.contest-headline h3 { margin:3px 0 0; font-size:1.22rem; }
.contest-clock { min-width:112px; text-align:right; color:var(--accent); font-size:2rem; font-weight:900; line-height:1; }
.contest-clock small { display:block; color:var(--muted); font-size:.68rem; font-weight:500; margin-top:5px; }
.problem-strip { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:7px; margin-bottom:15px; }
.problem-chip { border:1px solid var(--line); border-radius:10px; padding:8px; display:grid; gap:2px; text-align:center; background:rgba(148,163,184,.035); }
.problem-chip strong { font-size:.78rem; }
.problem-chip span { color:var(--muted); font-size:.68rem; }
.problem-chip.active { border-color:var(--accent-2); box-shadow:0 0 0 2px rgba(56,189,248,.08); }
.problem-chip.ac { border-color:rgba(74,222,128,.38); background:rgba(74,222,128,.06); }
.problem-chip.partial { border-color:rgba(251,191,36,.3); }
.team-score,.team-result { display:flex; flex-wrap:wrap; gap:8px 18px; border:1px solid var(--line); border-radius:11px; padding:11px 13px; margin-bottom:15px; color:var(--muted); }
.team-score strong,.team-result strong { color:var(--text); }
.skill-toolbar { border:1px solid var(--line); border-radius:11px; padding:10px; display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin-bottom:15px; }
.skill-toolbar > span { color:var(--muted); font-size:.72rem; margin-right:4px; }
.contest-prompt { color:var(--muted); line-height:1.7; margin:4px 0 14px; }
.problem-focus { border:1px solid var(--line); border-radius:14px; padding:15px; background:rgba(148,163,184,.025); }
.problem-focus h3 { margin:4px 0 7px; }
.problem-focus p { margin:0 0 14px; color:var(--muted); font-size:.78rem; }
.problem-domain { color:var(--accent-2); font-size:.7rem; letter-spacing:.12em; }
.decision-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.decision-card { border:1px solid var(--line); border-radius:12px; background:var(--panel-2); color:var(--text); min-height:91px; padding:13px; display:grid; gap:5px; text-align:left; cursor:pointer; transition:.16s ease; }
.decision-card:hover { border-color:var(--line-strong); transform:translateY(-1px); box-shadow:0 8px 18px rgba(0,0,0,.13); }
.decision-card strong { font-size:.82rem; }
.decision-card span { color:var(--muted); font-size:.71rem; line-height:1.45; }
.contest-log { margin-top:16px; border-top:1px solid var(--line); padding-top:12px; }
.contest-log summary { cursor:pointer; color:var(--accent-2); font-size:.76rem; }
.contest-log p { margin:7px 0; color:var(--muted); font-size:.7rem; line-height:1.5; }
.result-hero { display:flex; align-items:center; gap:22px; border:1px solid var(--line); border-radius:14px; padding:16px; margin-bottom:15px; background:linear-gradient(120deg,rgba(74,222,128,.07),rgba(56,189,248,.04)); }
.result-score { font-size:2.8rem; font-weight:900; color:var(--accent); line-height:1; }
.result-score small { font-size:1rem; color:var(--muted); }
.result-hero h3 { margin:0 0 4px; }
.result-hero p { margin:0; color:var(--muted); }
.summary-item.wide { grid-column:1/-1; }

@media (max-width:1100px) {
  .action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:820px) {
  .form-grid.two,.event-options,.decision-grid { grid-template-columns:1fr; }
  .problem-strip { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .contest-headline { align-items:flex-start; }
}
@media (max-width:560px) {
  .action-grid { grid-template-columns:1fr; }
  .skill-card { align-items:flex-start; flex-direction:column; }
  .contest-headline { flex-direction:column; }
  .contest-clock { text-align:left; }
  .result-hero { align-items:flex-start; flex-direction:column; }
}

/* V3：曹梓翔的自由比赛循环与决策反馈 */
.problem-strip.interactive .problem-chip {
  appearance:none; color:var(--text); cursor:pointer; min-height:74px; transition:.16s ease;
}
.problem-strip.interactive .problem-chip:hover:not(:disabled) { transform:translateY(-2px); border-color:var(--accent-2); }
.problem-strip.interactive .problem-chip:disabled { cursor:not-allowed; opacity:.48; }
.problem-chip.saved { border-color:rgba(74,222,128,.5); background:rgba(74,222,128,.07); }
.problem-chip small { color:var(--muted); font-size:.62rem; line-height:1.25; }
.contest-progress-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:14px 0; }
.contest-progress-grid > div { border:1px solid var(--line); border-radius:10px; padding:9px 10px; background:rgba(148,163,184,.025); }
.micro-action-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.micro-action-grid .decision-card { min-height:102px; }
.contest-event-card { border:1px solid rgba(251,191,36,.42); border-radius:15px; padding:17px; background:linear-gradient(135deg,rgba(251,191,36,.09),rgba(56,189,248,.035)); box-shadow:0 14px 34px rgba(0,0,0,.15); }
.contest-event-card h3 { margin:7px 0; font-size:1.08rem; }
.contest-event-card > p { margin:0; color:var(--muted); line-height:1.65; }
.profile-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.profile-pill { border:1px solid var(--line); border-radius:10px; padding:9px 10px; background:rgba(148,163,184,.03); display:flex; justify-content:space-between; gap:8px; }
.profile-pill strong { color:var(--accent); }
.event-description { line-height:1.75; }
.event-option strong { line-height:1.45; }
@media (max-width:900px) {
  .micro-action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .contest-progress-grid,.micro-action-grid,.profile-grid { grid-template-columns:1fr; }
}
