:root { --accent: #e9c778; --ink: #29200c; }
[hidden] { display: none !important; }
main { max-width: 1160px; min-height: 65vh; }
/* Keep the experiment menu usable on desktop as well as on small screens. */
.nav-details .nav-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: #242a36; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text); cursor: pointer; list-style: none; }
.nav-details .nav-trigger::-webkit-details-marker { display: none; }
.nav-details .topnav { display: none; }
.nav-details[open] .topnav { display: flex; flex-direction: column; position: absolute; right: 0; top: calc(100% + 8px); background: #191d27; border: 1px solid var(--line); border-radius: 14px; padding: 8px; min-width: 220px; box-shadow: 0 16px 40px #0009; z-index: 1000; gap: 4px; }
.nav-details[open] .topnav a { padding: 10px 14px; border-radius: 8px; font-size: 13px; }
.nav-details[open] .topnav a:hover, .nav-details[open] .topnav a[aria-current] { background: #242a36; }
.edition { color: var(--accent); font-size: 12px; letter-spacing: .08em; }
.welcome-layout { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 36px; padding: 35px 0 55px; }
.welcome-copy h1 { font-size: clamp(32px, 3.8vw, 49px); margin: 20px 0 24px; }
.welcome-sub { color: #e5e1d6; font-size: 18px; line-height: 1.9; }
.welcome-copy .btn { margin-top: 12px; padding: 15px 24px; }
.welcome-meta { margin-top: 14px; }
.auction-art { position: relative; height: 370px; background: radial-gradient(ellipse, #e9c77812, transparent 70%); }
.art-caption { position: absolute; top: 5px; left: 20%; font-size: 10px; letter-spacing: .24em; color: var(--muted); }
.art-card { position: absolute; width: 160px; height: 220px; border: 1px solid #e9c77866; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 80px; box-shadow: 0 25px 50px #0005; }
.art-card small { font-size: 10px; letter-spacing: .2em; }
.art-card-back { top: 60px; left: 12%; background: #292024; color: #e2b3b3; transform: rotate(-15deg); }
.art-card-front { top: 75px; left: 40%; background: linear-gradient(135deg, #343127, #1a1d25); color: var(--accent); transform: rotate(10deg); }
.coin { position: absolute; top: 225px; left: 25%; width: 106px; height: 106px; border: 4px double #f2d596; background: #b88d3d; color: #171820; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; font-size: 34px; font-weight: 800; box-shadow: 0 12px 30px #0006; transform: rotate(-10deg); }
.coin small { font-size: 10px; letter-spacing: .15em; }
.art-footnote { position: absolute; bottom: 0; width: 100%; text-align: center; font-size: 11px; color: var(--muted); }
.steps { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 24px; font-size: 12px; color: var(--muted); }
.steps b { color: var(--accent); margin-right: 12px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin: 25px 0; }
.section-heading h1 { font-size: clamp(27px, 3.2vw, 38px); }
.section-heading .edition { flex-shrink: 0; }
.budget-bar { position: sticky; top: 12px; z-index: 3; display: flex; align-items: center; gap: 28px; padding: 15px 24px; margin-bottom: 24px; border: 1px solid #e9c77855; border-radius: 14px; background: #1f2029f5; box-shadow: 0 10px 30px #0004; }
.budget-bar strong { display: block; font-size: 30px; line-height: 1.2; color: var(--accent); font-variant-numeric: tabular-nums; }
.budget-bar small { font-size: 13px; color: var(--muted); font-weight: 400; }
.budget-progress { flex: 1; font-size: 11px; color: var(--muted); }
progress { display: block; width: 100%; height: 5px; margin-bottom: 8px; accent-color: var(--accent); border: 0; border-radius: 5px; overflow: hidden; background: var(--line); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); }
.bid-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.bid-card { background: linear-gradient(145deg, #20232d, #181c25); border: 1px solid var(--line); border-radius: 14px; padding: 22px; transition: border-color .2s; scroll-margin-top: 145px; }
.bid-card.has-bid { border-color: #e9c77877; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-symbol { color: var(--accent); font-size: 26px; line-height: 1; }
.lot { color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.bid-card h2 { font-size: 17px; margin-bottom: 6px; letter-spacing: 0; }
.bid-card .sub { min-height: 23px; margin-bottom: 22px; font-size: 12px; }
.bid-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.bid-controls output { font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.bid-controls output small { font-size: 11px; font-weight: 400; margin-left: 5px; color: var(--muted); }
.bid-controls-buttons { display: flex; align-items: center; gap: 6px; }
.bid-controls .btn { padding: 6px 14px; min-height: 40px; }
.btn-fill-remaining { font-size: 11px; padding: 5px 10px !important; border: 1px dashed var(--accent); color: var(--accent); background: #e9c77815; border-radius: 6px; cursor: pointer; white-space: nowrap; transition: all .2s; }
.btn-fill-remaining:hover:not(:disabled) { background: #e9c7782a; border-style: solid; }
.btn-fill-remaining:disabled { opacity: .4; cursor: not-allowed; border-color: var(--line); color: var(--muted); background: transparent; }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 34px; margin: 0; scroll-margin-top: 160px; }
.btn:disabled { cursor: not-allowed; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.review-panel { max-width: 760px; margin-bottom: 24px; }
.allocation-row { display: flex; gap: 20px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #ffffff0b; font-size: 13px; }
.allocation-row strong { white-space: nowrap; color: var(--accent); font-variant-numeric: tabular-nums; }
.allocation-row.zero { color: var(--muted); }
.allocation-row.zero strong { color: var(--muted); }
.review-total { text-align: right; padding-top: 20px; margin: 0; font-size: 13px; }
.review-total strong { font-size: 28px; color: var(--accent); }
.result-heading { margin: 30px auto; max-width: 780px; text-align: center; }
.result-heading h1 { font-size: clamp(28px, 4vw, 44px); color: var(--accent); overflow-wrap: anywhere; }
.result-heading > p:last-child { color: #d1d2d6; font-size: 14px; line-height: 1.9; }

/* 比較モード用スタイル */
.compare-mode-banner { background: #192b3c; border: 1px solid #38bdf888; color: #bae6fd; padding: 12px 18px; border-radius: 12px; margin-bottom: 20px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.compare-invite-box { background: linear-gradient(135deg, #1f2738, #18202d); border: 1px solid #38bdf866; border-radius: 14px; padding: 20px; margin-bottom: 28px; text-align: center; box-shadow: 0 10px 30px #0004; }
.compare-invite-box p { font-size: 14px; color: #e2e8f0; margin-bottom: 12px; }
.compare-invite-box .btn { font-size: 14px; padding: 10px 22px; }
.compare-summary-box { background: #171d27; border: 1px solid #e9c77855; border-radius: 12px; padding: 16px 20px; margin-top: 18px; text-align: left; font-size: 13px; line-height: 1.7; color: #f1f5f9; }
.compare-summary-box strong { color: var(--accent); }
.compare-legend { display: flex; justify-content: center; gap: 20px; margin-bottom: 10px; font-size: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.my-legend { color: #e9c778; }
.friend-legend { color: #38bdf8; }

.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.compare-table th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .05em; }
.compare-table td { padding: 10px 8px; border-bottom: 1px solid #ffffff0d; }
.compare-table .num-col { text-align: right; font-variant-numeric: tabular-nums; }
.compare-table th.num-col { text-align: right; }
.compare-table td.my-num { color: #e9c778; font-weight: 700; }
.compare-table td.friend-num { color: #38bdf8; font-weight: 700; }
.compare-table td.diff-plus { color: #38bdf8; font-size: 11px; }
.compare-table td.diff-minus { color: #f472b6; font-size: 11px; }
.compare-table td.diff-zero { color: var(--muted); font-size: 11px; }
.compare-table tr:last-child td { border-bottom: none; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-panel { text-align: center; padding: 24px 12px; }
#radar svg { width: 100%; max-width: 420px; height: auto; display: block; margin: auto; }
.chart-panel .fine { font-size: 10px; }
.allocation-panel h2 { font-size: 17px; }
.result-note { margin: 22px 0; text-align: center; }
.result-actions, .secondary-actions { justify-content: center; }
.secondary-actions { margin-top: 14px; }
.notice { padding: 14px 18px; border: 1px solid #e9c77866; border-radius: 10px; font-size: 13px; }
#share-dialog { max-width: 550px; width: calc(100% - 32px); box-sizing: border-box; }
#share-dialog input { width: 100%; margin: 8px 0 18px; padding: 12px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; color: var(--text); }
#shared-label { display: block; text-align: center; }
h1:focus { outline: none; }
@media (max-width: 760px) {
  .welcome-copy h1 { font-size: clamp(24px, 7vw, 32px); }
  .welcome-layout { grid-template-columns: 1fr; gap: 12px; padding: 20px 0 30px; }
  .auction-art { height: 310px; max-width: 360px; width: 100%; margin: auto; }
  .art-card { width: 135px; height: 185px; }
  .art-card-front { top: 60px; }
  .art-card-back { top: 45px; }
  .coin { top: 190px; width: 90px; height: 90px; font-size: 28px; }
  .steps { flex-direction: column; gap: 0; }
  .steps p { margin-bottom: 12px; }
  .bid-grid, .result-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .budget-bar { top: 6px; gap: 12px; padding: 12px; flex-wrap: wrap; }
  .budget-progress { min-width: 120px; }
  .budget-bar .btn { width: 100%; min-height: 44px; }
  .budget-bar strong { font-size: 25px; }
  .bid-card { scroll-margin-top: 180px; }
  input[type=range] { scroll-margin-top: 190px; }
  .panel { padding: 20px; }
  .chart-panel { padding: 24px 4px; }
  .result-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
