:root {
  color-scheme: light;
  --paper: #f6f5f7;
  --surface: #fff;
  --ink: #262232;
  --muted: #685f72;
  --line: #e3dfe7;
  --accent: #6044a8;
  --accent-deep: #50358d;
  --soft: #f2edf9;
  --error: #a03342;
  --font: "DM Sans", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 3px solid #946bd1; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 10; top: -90px; left: 16px; color: var(--accent); background: white; padding: 12px; }
.skip-link:focus { top: 8px; }
.wrap { width: min(1080px, calc(100% - 72px)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); background: #faf9fb; }
.masthead { display: flex; justify-content: space-between; align-items: center; min-height: 69px; gap: 16px; }
.brand, .admin-link, .steps a, .btn { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #312a3d; font-size: 16px; font-weight: 700; letter-spacing: .015em; }
.brand-mark { width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; background: #493566; box-shadow: inset 0 0 0 3px #55406f; color: #ece4fb; font: 25px/1 Georgia, serif; }
.admin-link { color: #635a6c; font-size: 13px; font-weight: 600; display: inline-flex; gap: 7px; align-items: center; min-height: 42px; }
.admin-link:hover { color: var(--accent); }
.layout { padding-top: 32px; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 218px; background: #292034; color: white; border-radius: 18px; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 87% 65%, #715481 0%, #4c365d 30%, transparent 67%), linear-gradient(100deg,#2f253c,#392b46); }
.hero-copy { padding: 32px 44px 38px; max-width: 65%; }
.hero-context { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #e5daec; letter-spacing: .07em; display: flex; align-items: center; gap: 9px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #d9c2ef; }
.hero h1 { margin: 0; font-size: clamp(42px,5.1vw,64px); line-height: 1.15; font-weight: 800; letter-spacing: -.055em; }
.title-dot { color: #c3a6ee; margin-left: 2px; }
.hero-description { color: #e5dfe9; margin: 15px 0 0; font-size: 15px; line-height: 1.7; }
.hero-art { pointer-events: none; position: absolute; right: 3%; width: 32%; height: 100%; z-index: -1; top: 0; }
.hero-art::before { content: ""; position: absolute; inset: 0 -20% 0 -38%; opacity: .16; background-image: radial-gradient(#e9d4fb 1px, transparent 1px); background-size: 10px 10px; mask-image: linear-gradient(90deg,transparent,#000 50%); }
.orbit { position: absolute; width: 107%; height: 56%; right: -5%; top: 26%; border: 1px solid #e5d8ed59; border-radius: 50%; transform: rotate(-18deg); }
.disc { position: absolute; width: 46%; aspect-ratio: 1; right: 7%; top: 19%; border-radius: 50%; background: repeating-radial-gradient(circle,transparent 0 4px,#ffffff27 4.5px 5px),conic-gradient(from -25deg,#b7b3dc,#d6c0de,#8873bb 19%,#e5d3d9 30%,#9cb6c6 42%,#b7a4d8 56%,#ebd5e3 69%,#8c77a8 86%,#b7b3dc); border: 1px solid #e9dced; transform: rotate(9deg); box-shadow: 6px 14px 25px #23162c4f; }
.disc::after { content: ""; position: absolute; inset: 40%; border-radius: 50%; background: #503b5f; border: 4px solid #cbbcd4; box-shadow: 0 0 0 4px #bcb1c9; }
.game-case { position: absolute; width: 43%; aspect-ratio: 1.05; left: 12%; top: 24%; transform: rotate(-12deg); overflow: hidden; border: 4px solid #e1d6ea; border-radius: 4px; background: linear-gradient(165deg,#6a6095,#b99ac4 54%,#ede3e6); box-shadow: 1px 2px 0 1px #a892b8,5px 13px 22px #21162963; }
.case-strip { position: absolute; z-index: 2; inset: 0 auto 0 0; width: 8%; background: repeating-linear-gradient(90deg,#c4bacf 0 2px,#e0d6e4 2px 3px); border-right: 1px solid #f0e5f4; }
.case-sun { position: absolute; top: 19%; right: 16%; width: 23%; aspect-ratio: 1; border-radius: 50%; background: #f4d9bb; }
.case-horizon { position: absolute; inset: 24% 0 0; background: #766c9e; clip-path: polygon(0 78%,19% 48%,30% 55%,52% 29%,63% 40%,80% 16%,100% 44%,100% 100%,0 100%); }
.game-case::after { content: ""; position: absolute; inset: 57% 0 0 7%; background: #56476e; clip-path: polygon(0 65%,27% 20%,46% 42%,63% 14%,80% 30%,100% 5%,100% 100%,0 100%); }
.case-shine { position: absolute; top: 11%; left: 20%; font-size: 14px; color: #fcf1ff; }
.star { position: absolute; color: #eedcfc; }
.star.one { top: 10%; right: 6%; font-size: 32px; }.star.two { bottom: 13%; left: 5%; font-size: 16px; }.star.three { top: 13%; left: 6%; font: 18px/1 monospace; }
.entry-layout { display: grid; grid-template-columns: minmax(160px, .32fr) minmax(0,1fr); gap: clamp(26px,4vw,55px); padding: 38px 0 48px; scroll-margin-top: 15px; }
.progress-panel { position: sticky; top: 28px; align-self: start; border-top: 2px solid #4b3f57; padding-top: 17px; }
.sidebar-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; margin: 0 0 14px; font-weight: 700; }
.sidebar-title span { color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.steps { display: grid; }
.steps a { position: relative; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); min-height: 42px; width: fit-content; }
.steps a:not(:last-child)::after { content: ""; position: absolute; top: 34px; left: 10px; height: 17px; width: 1px; background: #cfc9d7; }
.step-dot { position: relative; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #c8c0cd; color: #73687c; background: var(--paper); font-size: 11px; font-weight: 700; }
.steps a:hover, .steps a.complete { color: var(--accent-deep); }
.steps a.complete .step-dot { background: var(--accent); color: white; border-color: var(--accent); }
.form-column { min-width: 0; }
.entry-layout.finished { grid-template-columns: minmax(0, 1fr); }
.entry-form, .receipt { border-radius: 15px; background: #fff; border: 1px solid var(--line); }
.sheet-section { padding: 25px 30px 26px; scroll-margin-top: 12px; }
.sheet-section + .sheet-section { border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.chapter { display: inline-flex; justify-content: center; align-items: center; border: 1px solid #dcd2e5; height: 25px; min-width: 32px; border-radius: 6px; font: 600 12px/1 "Segoe UI", sans-serif; letter-spacing: .06em; color: #6b5087; background: #f6f2f9; }
.section-heading h2, .receipt h2 { margin: 0; font-size: 21px; font-weight: 750; line-height: 1.4; }
.sheet-section label { display: block; font-size: 14px; font-weight: 650; margin: 0 0 7px; }
.sheet-section input, .sheet-section textarea { width: 100%; border-radius: 8px; border: 1px solid #ccc6d2; background: #fff; padding: 11px 13px; color: var(--ink); line-height: 1.55; }
.sheet-section textarea { display: block; resize: vertical; min-height: 164px; }
.sheet-section input::placeholder, .sheet-section textarea::placeholder { color: #827c88; font-size: 14px; opacity: 1; }
.sheet-section input:focus, .sheet-section textarea:focus { outline: 2px solid #c7b7e1; outline-offset: 1px; border-color: #8c70b8; }
.sheet-section [aria-invalid="true"] { border-color: var(--error); }
.search-row { display: flex; gap: 8px; }
.input-icon { position: relative; flex: 1; min-width: 0; }
.input-icon input { padding-left: 39px; }
.search-icon { width: 19px; height: 19px; stroke: #8d8299; fill: none; stroke-width: 1.7; position: absolute; inset: 50% auto auto 12px; transform: translateY(-50%); pointer-events: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 17px; min-height: 43px; padding: 10px 21px; font-weight: 700; line-height: 1.4; border: 1px solid transparent; border-radius: 8px; }
.search-button, .quiet-button { color: #5a4474; background: #f4f0f8; border-color: #d9d0e2; font-size: 14px; }
.search-button:hover, .quiet-button:hover { background: #ebe3f3; }
.field-note, .review-meta { font-size: 12px; line-height: 1.55; color: var(--muted); }
p.field-note { margin: 8px 0 0; }
.search-status { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.search-status:empty, .submission-status:empty { display: none; }
.search-status.error, .submission-status { color: var(--error); }
.game-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 9px; font-size: 12px; color: var(--muted); }
#suggestion-buttons { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.suggestion-button { border: 1px solid #d9d0e2; border-radius: 7px; padding: 5px 9px; max-width: 100%; background: #f8f5fb; color: var(--accent-deep); font: inherit; text-align: left; overflow-wrap: anywhere; }
.suggestion-button:hover, .suggestion-button:focus-visible { background: var(--soft); }
.game-results { margin: 10px 0 0; padding: 0; list-style: none; max-height: min(54vh, 420px); overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.game-results li + li { border-top: 1px solid var(--line); }
.game-result { background: transparent; border: 0; padding: 11px 13px; width: 100%; text-align: left; color: var(--ink); display: flex; gap: 12px; align-items: center; }
.game-result:hover, .game-result:focus-visible { background: var(--soft); }.game-result:focus-visible { outline-offset: -3px; }
.result-text, .chosen-text { display: grid; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.result-text strong, .chosen-text strong { font-size: 15px; font-weight: 650; }
.result-text small, .chosen-text small { color: var(--muted); font-size: 12px; }
.result-arrow { font-size: 18px; color: #726380; }
.game-cover { isolation: isolate; flex: 0 0 auto; width: 44px; aspect-ratio: 3 / 4; display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 4px; background: linear-gradient(150deg,#ddd4e9,#eee8f4 65%,#dfd7e8); color: #68557a; box-shadow: inset 0 0 0 1px #49356617; }
.game-cover::before { content: ""; position: absolute; width: 19px; height: 24px; top: 8px; border: 1px solid #9683a7; border-left: 3px solid #9683a7; border-radius: 2px; transform: rotate(-9deg); }
.game-cover::after { content: attr(data-label); align-self: end; margin-bottom: 5px; font-size: 9px; line-height: 1.4; }
.game-cover.has-image::before, .game-cover.has-image::after { display: none; }
.game-cover img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.more-games { display: block; padding: 7px 14px; margin: 8px auto 0; min-height: 40px; background: transparent; border: 1px solid #d9d0e2; border-radius: 7px; color: var(--accent-deep); font-size: 13px; font-weight: 650; }
.more-games:hover:enabled { background: var(--soft); }
.alternate-games { display: block; padding: 6px 0; margin-top: 5px; min-height: 36px; border: 0; background: none; color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.chosen { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; border: 1px solid #d9cbe9; background: #f8f5fb; }
#chosen-cover { flex: 0 0 auto; display: grid; justify-items: start; gap: 3px; }.chosen .game-cover { width: 48px; }
.cover-retry { font: inherit; font-size: 12px; color: var(--accent-deep); border: 0; background: transparent; text-decoration: underline; text-underline-offset: 2px; padding: 5px 0; }
.game-results .cover-retry { margin: -3px 0 4px 13px; }
.receipt-mark { display: grid; place-items: center; border-radius: 50%; background: #e6dbf2; width: 28px; height: 28px; color: var(--accent-deep); }
.text-btn { background: transparent; padding: 6px; color: var(--accent); border: 0; font-weight: 650; font-size: 14px; }
.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.review-meta { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
#review-count { font-variant-numeric: tabular-nums; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; padding: 17px 30px; border-top: 1px solid var(--line); gap: 16px; }
.submission-status { margin: 0 auto 0 0; font-size: 14px; white-space: pre-line; }
.primary-button { color: white; background: var(--accent); white-space: nowrap; }
.primary-button:hover:enabled { background: var(--accent-deep); }
.primary-button span:last-child { font-size: 20px; }
.receipt { text-align: center; padding: 48px 22px; }
.receipt-mark { width: 52px; height: 52px; font-size: 26px; margin: 0 auto 18px; }
.receipt .quiet-button { margin-top: 22px; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.foot .wrap { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.foot a { color: inherit; text-underline-offset: 2px; }
.manual-toggle { background: none; color: var(--accent-deep); font-size: 13px; font-weight: 600; border: 1px solid var(--line); padding: 7px 12px; border-radius: 6px; margin-top: 12px; }
.manual-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cover-entry { display: flex; align-items: center; margin-block: 16px 12px; gap: 13px; }
.cover-entry > div { min-width: 0; }
.cover-entry .game-cover { width: 54px; }
.cover-entry label small { font-size: 12px; color: var(--muted); font-weight: 400; }
.cover-entry input[type=file] { max-width: 100%; width: auto; font: inherit; font-size: 13px; }
.cover-entry input::file-selector-button { background: var(--soft); color: var(--accent-deep); border: 1px solid var(--line); border-radius: 5px; padding: 5px 9px; }
.notice-box { color: var(--error); }
@media (max-width: 780px) {
  .wrap { width: min(100% - 36px, 680px); }
  .hero { min-height: 186px; }
  .hero-copy { padding: 28px; max-width: 68%; }
  .hero-art { right: 2%; width: 34%; }
  .entry-layout { display: block; padding: 20px 0 32px; }
  .progress-panel { position: static; display: flex; align-items: center; justify-content: space-between; border: 0; padding: 0; margin-bottom: 12px; }
  .sidebar-title { margin: 0; font-size: 13px; gap: 7px; }
  .steps { display: flex; gap: 8px; }.steps a { min-height: 30px; }.steps a span:nth-child(2),.steps a:not(:last-child)::after { display: none; }
}
@media (max-width: 500px) {
  .wrap { width: calc(100% - 28px); }
  .foot .wrap { align-items: flex-start; justify-content: center; flex-direction: column; gap: 3px; padding-block: 12px; }
  .layout { padding-top: 18px; }.masthead { min-height: 59px; }
  .brand { font-size: 14px; gap: 7px; }.brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 22px; }
  .hero { min-height: 183px; align-items: start; border-radius: 12px; }
  .hero-copy { padding: 22px 19px 18px; max-width: 100%; }
  .hero h1 { font-size: 39px; }.hero-context { margin-bottom: 6px; font-size: 12px; }
  .hero-description { font-size: 13px; max-width: 61%; margin-top: 10px; }
  .hero-art { width: 36%; height: 160px; top: 12px; right: 1%; }
  .game-case { top: 35%; width: 62%; left: -4%; }.disc { top: 32%; width: 62%; right: 1%; }
  .star.three { display: none; }.star.one { top: 16%; right: 9%; font-size: 20px; }
  .sheet-section { padding: 20px 17px; }.section-heading { margin-bottom: 15px; }.section-heading h2 { font-size: 19px; }
  .identity-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-actions { flex-direction: column; align-items: stretch; padding: 15px 17px; gap: 8px; }
  .search-button { padding-inline: 16px; }.entry-form { border-radius: 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
