:root {
  --ink: #132b30;
  --muted: #667a78;
  --paper: #f3efe4;
  --panel: #fffdf6;
  --line: #b9c2b6;
  --accent: #ee5838;
  --lime: #d8eb6e;
  --aqua: #7cc8c3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(19, 43, 48, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(19, 43, 48, .045) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: "Zen Kaku Gothic New", sans-serif;
}

.page-transition { position: fixed; z-index: 1000; inset: 0; overflow: hidden; background: rgba(4, 17, 22, .38); opacity: 0; pointer-events: none; transition: opacity .14s ease; }.page-transition::before { position: absolute; right: 0; bottom: 7vh; left: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(104, 217, 208, .65) 15%, rgba(217, 245, 106, .8) 50%, rgba(104, 217, 208, .65) 85%, transparent); content: ""; transform: scaleX(.2); transform-origin: center; }.page-transition.is-running { opacity: 1; pointer-events: auto; }.page-transition.is-running::before { animation: stage-line 1.1s ease-out both; }.page-transition[hidden] { display: none; }.page-transition-track { position: absolute; right: 0; bottom: calc(7vh - 31px); left: 0; height: 62px; }.page-transition-track::after { position: absolute; right: 8vw; bottom: 0; width: 8px; height: 8px; border: 1px solid var(--lime); background: var(--paper); content: ""; transform: rotate(45deg); }.page-transition-track span { position: absolute; bottom: -3px; left: -54px; font-size: 2rem; line-height: 1; transform: scaleX(-1); filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)); }.page-transition.is-running .page-transition-track span { animation: duck-stage-run 1.1s steps(6, end) both; }.page-transition p { position: absolute; right: 8vw; bottom: calc(7vh + 13px); margin: 0; color: var(--aqua); font-family: "DM Mono", monospace; font-size: .62rem; letter-spacing: .14em; }.page-transition.is-running p { animation: transition-copy-in .2s .18s both; }
@keyframes duck-stage-run { 0% { transform: translateX(0) scaleX(-1) translateY(0); } 25% { transform: translateX(28vw) scaleX(-1) translateY(-4px); } 50% { transform: translateX(54vw) scaleX(-1) translateY(0); } 75% { transform: translateX(78vw) scaleX(-1) translateY(-4px); } 100% { transform: translateX(calc(100vw + 54px)) scaleX(-1) translateY(0); } }
@keyframes stage-line { from { opacity: 0; transform: scaleX(.2); } 35%, 70% { opacity: 1; transform: scaleX(1); } to { opacity: 0; transform: scaleX(1); } }
@keyframes transition-copy-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

button, input { font: inherit; }
.title-view[hidden], .student-view[hidden], .teacher-view[hidden] { display: none !important; }
.game-collection-view[hidden] { display: none !important; }
.app-shell.is-result .result-artwork { top: 0; bottom: auto; width: 53%; height: 100%; object-fit: cover; object-position: center; }
@media (max-width: 800px) { 
  .app-shell { width: min(100% - 28px, 1220px); } 
  .app-shell.is-result .workspace > .result-panel { grid-template-columns: 1fr; min-height: 620px; padding: 22px 18px; } 
  .app-shell.is-result .status-row, .app-shell.is-result .score-block, .app-shell.is-result .analysis-radar, .app-shell.is-result .result-details, .app-shell.is-result .judgment-reason, .app-shell.is-result .retry-button { grid-column: 1; } 
  .result-artwork { width: 100%; height: 48%; opacity: .25; mask-image: linear-gradient(to bottom, #000, transparent); } 
  .result-rank-backdrop { top: 40px; right: -8px; font-size: 15rem; } 
  .app-shell.is-result .analysis-radar { grid-template-columns: 1fr; } 
  .app-shell.is-result .match-metrics { grid-template-columns: 1fr 1fr; } 
  .app-shell.is-result .analysis-radar canvas { max-width: 240px; } 
  .app-shell.is-result .score-value { font-size: clamp(3.8rem, 23vw, 5.6rem); } 
  .app-shell.is-result .result-artwork { top: 0; bottom: auto; width: 53%; height: 100%; object-fit: cover; object-position: center; }
}

.app-shell { width: min(100% - 48px, 1180px); margin: 0 auto; padding: 26px 0 38px; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-bottom: 1px solid var(--ink); }
.wordmark { color: var(--ink); font-family: "Noto Serif JP", serif; font-size: 1.25rem; font-weight: 700; letter-spacing: .16em; text-decoration: none; }
.wordmark span { color: var(--accent); }
.view-tabs { display: flex; align-self: stretch; }.view-tab { padding: 0 16px; border: 0; border-left: 1px solid var(--ink); color: var(--muted); background: transparent; cursor: pointer; font-size: 1.25rem; min-width: auto; width: 62px; height: 60px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }.view-tab.is-active { color: var(--ink); background: var(--lime); font-weight: 700; transform: scale(1.05); }
.eyebrow, .result-label, .footnote, .panel-number { margin: 0; font-family: "DM Mono", monospace; letter-spacing: .02em; }
.eyebrow { color: var(--accent); font-size: .73rem; font-weight: 500; }

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); min-height: 540px; border-bottom: 1px solid var(--ink); }
.hero-copy { position: relative; display: flex; padding: 84px 30px 44px 0; flex-direction: column; justify-content: center; }
h1 { margin: 18px 0 22px; font-size: clamp(3.5rem, 7.2vw, 6.6rem); font-weight: 700; letter-spacing: 0; line-height: .97; }
h1 em { color: var(--accent); font-style: normal; }
.lead { max-width: 30rem; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.9; }
.hero-index { display: flex; align-items: center; gap: 11px; margin-top: auto; color: var(--muted); font-family: "DM Mono", monospace; font-size: .72rem; }
.hero-index i { display: inline-block; width: 72px; height: 1px; background: var(--ink); }
.hero-art { position: relative; display: grid; overflow: hidden; border-left: 1px solid var(--ink); background: var(--aqua); place-items: center; }
.hero-art::before { position: absolute; width: 162%; height: 162%; border: 1px solid rgba(19, 43, 48, .72); content: ""; transform: rotate(45deg); }
.hero-art::after { position: absolute; inset: 22px; border: 1px solid rgba(19, 43, 48, .55); content: ""; }
.sun-disc { position: absolute; top: 12%; right: 10%; width: 62%; aspect-ratio: 1; border: 1px solid var(--ink); border-radius: 50%; background: var(--lime); }
.scan-frame { position: absolute; z-index: 1; width: 52%; aspect-ratio: 1; border: 1px solid var(--ink); background: repeating-linear-gradient(0deg, transparent 0 13px, rgba(19, 43, 48, .25) 14px 15px); transform: rotate(-13deg); }
.scan-frame span { position: absolute; bottom: 9px; left: 9px; color: var(--ink); font-family: "DM Mono", monospace; font-size: .57rem; writing-mode: vertical-rl; }
.hero-art p { position: relative; z-index: 2; margin: 0; color: var(--ink); font-family: "DM Mono", monospace; font-size: clamp(2.7rem, 5.7vw, 5rem); line-height: .84; text-align: center; }

.workspace { display: grid; grid-template-columns: minmax(235px, .72fr) minmax(315px, 1.06fr) minmax(250px, .7fr); margin-top: 36px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--panel); }
.workspace-heading { padding: 30px 28px; border-right: 1px solid var(--ink); background: var(--lime); }
.workspace-heading h2 { margin: 72px 0 20px; font-size: clamp(1.85rem, 3vw, 2.75rem); line-height: 1.18; }
.workspace-heading > p:nth-child(3) { margin: 0; color: var(--ink); font-size: .84rem; line-height: 1.8; }
.alignment-note { margin: 38px 0 0; padding-top: 13px; border-top: 1px solid var(--ink); font-size: .76rem; line-height: 1.7; }
.field-label { display: block; margin-top: 18px; color: var(--muted); font-family: "DM Mono", monospace; font-size: .63rem; }.select-control, .text-control { width: 100%; min-height: 38px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: var(--panel); font-size: .78rem; }.workspace-heading .field-label:first-of-type { margin-top: 30px; }
.teacher-data { display: grid; gap: 10px; margin-top: 38px; }
.teacher-data span { color: var(--muted); font-family: "DM Mono", monospace; font-size: .64rem; }
.teacher-button { width: fit-content; padding: 9px 12px; border: 1px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; font-size: .75rem; font-weight: 700; transition: color .2s, background-color .2s; }
.teacher-button:hover:not(:disabled) { color: var(--panel); background: var(--ink); }
.teacher-button:disabled { cursor: wait; opacity: .55; }
.image-panel { padding: 20px; border-right: 1px solid var(--ink); }
.drop-zone { position: relative; display: grid; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--ink); cursor: pointer; place-items: center; transition: background-color .2s, color .2s; }
.drop-zone:hover, .drop-zone.dragging { color: var(--panel); background: var(--ink); }
.corner-mark { position: absolute; width: 18px; height: 18px; border-color: var(--accent); border-style: solid; }
.top-left { top: 8px; left: 8px; border-width: 2px 0 0 2px; }.top-right { top: 8px; right: 8px; border-width: 2px 2px 0 0; }.bottom-left { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }.bottom-right { right: 8px; bottom: 8px; border-width: 0 2px 2px 0; }
.drop-placeholder { display: grid; gap: 8px; text-align: center; }
.drop-placeholder strong { font-size: 1.15rem; }
.drop-placeholder small { color: var(--muted); font-family: "DM Mono", monospace; font-size: .65rem; }
#preview { width: 100%; height: 100%; object-fit: contain; }
.reference-overlay { position: absolute; z-index: 2; width: 100%; height: 100%; pointer-events: none; object-fit: contain; mix-blend-mode: multiply; }
#teacherInput, .submission-view-cell input, .cube-input-face input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.submission-carousel { position: relative; }.submission-progress { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; font-family: "DM Mono", monospace; }.submission-progress span { color: var(--muted); font-size: .68rem; }.submission-progress strong { font-size: .9rem; }.submission-slides { position: relative; min-height: 310px; }.submission-view-cell { position: relative; display: none; min-height: 310px; overflow: hidden; border: 1px solid var(--ink); background: #eef0e7; cursor: pointer; place-items: center; }.submission-view-cell.is-active { display: grid; }.submission-view-cell:hover { background: var(--lime); }.submission-view-cell img { width: 100%; height: 100%; object-fit: contain; }.submission-view-cell span { color: var(--muted); font-size: .78rem; }.slide-controls { display: flex; justify-content: space-between; margin-top: 10px; }.slide-controls button { display: grid; width: 38px; height: 34px; padding: 0; border: 1px solid var(--ink); color: var(--ink); background: var(--panel); cursor: pointer; font-family: "DM Mono", monospace; font-size: 1.1rem; place-items: center; }.slide-controls button:hover:not(:disabled) { color: var(--panel); background: var(--ink); }.slide-controls button:disabled { cursor: default; opacity: .3; }.image-panel { position: relative; }
.overlay-controls { display: flex; align-items: center; gap: 12px; margin-top: 11px; font-size: .72rem; }.overlay-controls label { display: flex; align-items: center; gap: 6px; white-space: nowrap; }.overlay-controls input[type="range"] { width: 100%; accent-color: var(--accent); }
.judge-button { display: flex; width: 100%; min-height: 54px; margin-top: 16px; padding: 0 18px; border: 1px solid var(--ink); color: var(--panel); background: var(--ink); cursor: pointer; font-weight: 700; justify-content: space-between; align-items: center; transition: background-color .2s, color .2s; }
.judge-button b { font-family: "DM Mono", monospace; font-size: 1.2rem; font-weight: 400; }.judge-button:hover:not(:disabled) { color: var(--ink); background: var(--accent); }
.judge-button:disabled { cursor: wait; opacity: .45; }

.result-panel { display: flex; min-height: 100%; padding: 28px; flex-direction: column; }
.panel-number { color: var(--muted); font-size: .65rem; }
.status-row { display: flex; align-items: center; gap: 9px; min-height: 20px; margin-top: 21px; color: var(--muted); font-size: .82rem; }
.status-row p { margin: 0; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.status-dot.is-working { background: var(--accent); animation: pulse 1s infinite; }
.status-dot.is-ready { background: #287a51; }
.score-block { margin: auto 0 32px; }
.result-label { color: var(--muted); font-size: .72rem; }
.score-value { display: block; margin-top: 2px; font-family: "DM Mono", monospace; font-size: clamp(3.3rem, 6vw, 5rem); line-height: 1; }
.score-value small { color: var(--muted); font-size: .93rem; }
.grade-value { display: inline-grid; width: 34px; height: 34px; margin: 10px 0 0; border: 1px solid var(--ink); color: var(--panel); background: var(--accent); font-family: "DM Mono", monospace; font-size: 1.1rem; place-items: center; }
.analysis-radar { margin: 0 0 24px; padding-top: 16px; border-top: 1px solid var(--line); }.analysis-radar canvas { display: block; width: min(100%, 260px); height: auto; margin: 7px auto 4px; }.match-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 0; }.match-metrics div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }.match-metrics dt, .match-metrics dd { font-size: .68rem; }.match-metrics dd { white-space: nowrap; }
.result-details { display: grid; gap: 15px; margin: 0; }
.result-details div { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: .79rem; } dd { margin: 0; font-family: "DM Mono", monospace; font-size: .82rem; text-align: right; }
.judgment-reason { margin-top: 22px; padding: 13px 14px; border-left: 3px solid var(--accent); background: #f4f0e6; }.judgment-reason p { margin: 0 0 6px; color: var(--muted); font-family: "DM Mono", monospace; font-size: .62rem; }.judgment-reason output { display: block; font-size: .78rem; line-height: 1.65; }
.site-footer { display: flex; justify-content: space-between; padding-top: 18px; color: var(--muted); }.footnote, .site-footer a { color: var(--muted); font-size: .65rem; text-decoration: none; }.site-footer a { color: var(--ink); font-family: "DM Mono", monospace; }.site-footer a span { color: var(--accent); }

.teacher-view { min-height: 650px; }.teacher-intro { display: grid; min-height: 370px; padding: 72px 0; align-content: center; border-bottom: 1px solid var(--ink); }.teacher-intro h1 { margin-bottom: 20px; }.teacher-intro > p:last-child { max-width: 32rem; margin: 0; color: var(--muted); line-height: 1.8; }.teacher-workspace { display: grid; grid-template-columns: 1fr 1fr; margin-top: 72px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--panel); }.teacher-workspace > div { min-height: 300px; padding: 30px; }.teacher-workspace > div:first-child { border-right: 1px solid var(--ink); background: var(--aqua); }.teacher-workspace h2 { margin: 54px 0 8px; font-size: 2rem; }.teacher-workspace #teacherCount { margin: 0; font-family: "DM Mono", monospace; font-size: .75rem; }.teacher-action { display: flex; flex-direction: column; justify-content: space-between; }.teacher-action p { max-width: 24rem; margin: 0; line-height: 1.7; }.teacher-action .field-label { margin-top: 12px; }.teacher-action .teacher-button { margin-top: 16px; }.teacher-tip { margin: 16px 0 0; color: var(--muted); font-family: "DM Mono", monospace; font-size: .66rem; }.teacher-set-list { display: grid; gap: 18px; margin-top: 28px; }.teacher-set { padding: 20px; border: 1px solid var(--ink); background: var(--panel); }.teacher-set h3 { margin: 0 0 16px; font-size: 1rem; }.view-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }.view-cell { position: relative; display: grid; min-height: 120px; overflow: hidden; border: 1px solid var(--line); background: #0c1f26; border-radius: 4px; place-items: center; }.view-cell img { position: absolute; width: 100%; height: 100%; object-fit: cover; }.view-cell span { position: relative; z-index: 1; align-self: end; width: 100%; padding: 5px; color: var(--paper); background: rgba(255, 255, 255, 0.85); font-weight: bold; font-family: "DM Mono", monospace; font-size: .62rem; text-align: center; }.view-actions { position: absolute; z-index: 2; top: 6px; right: 6px; display: flex; gap: 4px; }.view-actions button { padding: 4px 6px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: rgba(255, 253, 246, .92); cursor: pointer; font-family: "DM Mono", monospace; font-size: .56rem; }.view-actions button:last-child { color: var(--accent); }.view-actions button:hover { color: var(--panel); background: var(--ink); }
.register-view-button { position: relative; z-index: 2; padding: 8px 12px; border: 2px solid var(--lime); border-radius: 4px; color: var(--paper); background: var(--lime); cursor: pointer; font-family: "DM Mono", monospace; font-size: .68rem; font-weight: bold; box-shadow: 0 4px 10px rgba(217, 245, 106, 0.2); transition: all 0.2s; }.register-view-button:hover { color: var(--lime); background: var(--paper); border-color: var(--lime); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(217, 245, 106, 0.35); }
.add-specimen-button { float: right; margin-top: -36px; padding: 6px 9px; border: 1px solid var(--ink); color: var(--ink); background: var(--aqua); cursor: pointer; font-size: .7rem; }.specimen-set { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }.specimen-set h4 { margin: 0 0 10px; font-family: "DM Mono", monospace; font-size: .7rem; font-weight: 500; }
.specimen-grade-control { display: flex; align-items: center; gap: 8px; margin: -30px 0 12px auto; width: fit-content; color: var(--muted); font-family: "DM Mono", monospace; font-size: .62rem; }.specimen-grade-control select { min-height: 28px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: var(--panel); font-family: "DM Mono", monospace; font-size: .7rem; }
.teacher-workspace { margin-top: 36px; }

/* Game control deck */
body { background-color: #dce4bc; background-image: linear-gradient(90deg, rgba(19, 43, 48, .09) 1px, transparent 1px), linear-gradient(rgba(19, 43, 48, .09) 1px, transparent 1px); background-size: 16px 16px; }
.app-shell { position: relative; animation: boot-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.site-header { min-height: 60px; padding-left: 14px; border: 2px solid var(--ink); background: var(--ink); box-shadow: 6px 6px 0 var(--accent); }.wordmark { color: var(--panel); font-size: 1.05rem; }.view-tab { width: 62px; height: 60px; border-left-color: rgba(255, 253, 246, .34); color: rgba(255, 255, 255, 0.4); font-family: "DM Mono", monospace; font-size: 1.25rem; transition: background-color .16s, color .16s, transform .16s; }.view-tab:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }.view-tab.is-active { color: #ffffff; background: rgba(255, 255, 255, 0.15); box-shadow: inset 0 -4px 0 #ffffff; }
.workspace, .teacher-workspace { border: 2px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); }.workspace-heading { position: relative; background-color: var(--lime); background-image: repeating-linear-gradient(-45deg, transparent 0 13px, rgba(19, 43, 48, .08) 14px 15px); }.workspace-heading::before { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border: 2px solid var(--ink); background: var(--accent); content: ""; box-shadow: 4px 4px 0 var(--ink); }.workspace-heading h2 { font-family: "DM Mono", monospace; font-size: clamp(1.6rem, 2.5vw, 2.3rem); letter-spacing: .02em; }.image-panel { background: var(--ink); }.submission-carousel { padding: 12px; border: 1px solid rgba(255, 253, 246, .26); }.submission-progress { padding-bottom: 8px; border-bottom: 1px solid rgba(255, 253, 246, .35); color: var(--panel); }.submission-progress span { color: var(--aqua); }.submission-progress strong { color: var(--lime); }.submission-view-cell { border: 2px solid var(--aqua); background: repeating-linear-gradient(0deg, #e8eddc 0 5px, #f7f7ee 6px 10px); }.submission-view-cell::after { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 0 47%, rgba(124, 200, 195, .35) 50%, transparent 53%); content: ""; opacity: 0; }.submission-view-cell.is-active { animation: stage-in .32s cubic-bezier(.2, .8, .2, 1) both; }.submission-view-cell:hover { border-color: var(--accent); }.submission-view-cell:hover::after { opacity: 1; animation: scan-line 1.1s linear infinite; }.slide-controls button { width: 46px; height: 38px; border-width: 2px; color: var(--ink); background: var(--lime); transition: background-color .15s, transform .15s; }.slide-controls button:hover:not(:disabled) { color: var(--panel); background: var(--accent); transform: translateY(-2px); }.overlay-controls { color: var(--panel); }.overlay-controls input[type="range"] { accent-color: var(--lime); }.judge-button { min-height: 58px; border-width: 2px; color: var(--ink); background: var(--lime); box-shadow: 4px 4px 0 var(--accent); font-family: "DM Mono", monospace; letter-spacing: .04em; transition: background-color .15s, transform .15s, box-shadow .15s; }.judge-button:hover:not(:disabled) { color: var(--panel); background: var(--accent); box-shadow: 2px 2px 0 var(--aqua); transform: translate(2px, 2px); }.judge-button:disabled { color: var(--ink); background: var(--line); }
.result-panel { position: relative; overflow: hidden; background: #f8f8ef; }.result-panel::before { position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: repeating-linear-gradient(90deg, var(--accent) 0 18px, var(--ink) 18px 36px); content: ""; }.score-value { color: var(--accent); text-shadow: 2px 2px 0 rgba(19, 43, 48, .16); }.grade-value { width: 42px; height: 42px; border-width: 2px; box-shadow: 3px 3px 0 var(--ink); animation: grade-idle 2.4s steps(2, end) infinite; }.analysis-radar { background: #e7edcf; padding: 12px; border: 1px solid var(--ink); }.analysis-radar canvas { filter: saturate(1.15); }.match-metrics div { border-top-color: rgba(19, 43, 48, .25); }
.teacher-workspace > div:first-child { position: relative; background-image: repeating-linear-gradient(135deg, transparent 0 12px, rgba(19, 43, 48, .09) 13px 14px); }.teacher-set { border-width: 2px; box-shadow: 4px 4px 0 var(--ink); }.add-specimen-button, .register-view-button { border-width: 2px; transition: transform .15s, background-color .15s; }.add-specimen-button:hover, .register-view-button:hover { transform: translateY(-2px); box-shadow: 2px 2px 0 var(--accent); }
.app-shell.is-scanning .submission-view-cell.is-active::after { opacity: 1; animation: scan-line .72s linear infinite; }.app-shell.is-scanning .judge-button { animation: charge .55s steps(2, end) infinite; }.app-shell.is-scanning .status-dot { box-shadow: 0 0 0 5px rgba(238, 88, 56, .2); }

/* One focused game stage at a time */
.workspace { display: block; max-width: 720px; margin-right: auto; margin-left: auto; border: 0; background: transparent; box-shadow: none; }.workspace > .image-panel { border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }.mission-controls { display: flex; align-items: end; gap: 16px; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid rgba(255, 253, 246, .3); }.mission-controls .eyebrow { flex: 1; margin-bottom: 11px; color: var(--aqua); }.mission-controls .field-label { width: 150px; margin: 0; color: var(--panel); }.mission-controls .select-control { width: 240px; margin-top: 6px; }.submission-thumbnails { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 10px; }.submission-thumbnails button { position: relative; min-height: 56px; overflow: hidden; border: 1px solid rgba(255, 253, 246, .35); color: var(--panel); background: rgba(255, 253, 246, .08); cursor: pointer; font-family: "DM Mono", monospace; font-size: .64rem; }.submission-thumbnails button span { position: relative; z-index: 1; }.submission-thumbnails button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }.submission-thumbnails button.is-filled::after { position: absolute; inset: 0; background: rgba(19, 43, 48, .18); content: ""; }.submission-thumbnails button.is-filled span { position: absolute; z-index: 2; right: 3px; bottom: 3px; padding: 2px 3px; color: var(--ink); background: var(--lime); }.submission-thumbnails button.is-active { border: 2px solid var(--accent); box-shadow: inset 0 0 0 2px var(--ink); }.workspace > .result-panel, .scan-stage { display: none; }.scan-stage { min-height: 580px; padding: 40px; border: 2px solid var(--ink); color: var(--panel); background: var(--ink); box-shadow: 8px 8px 0 var(--accent); place-items: center; align-content: center; text-align: center; }.scan-stage p { margin: 30px 0 8px; color: var(--aqua); font-family: "DM Mono", monospace; font-size: .76rem; letter-spacing: .12em; }.scan-stage strong { color: var(--lime); font-size: clamp(1.45rem, 3vw, 2.1rem); }.scan-stage span { margin-top: 12px; color: rgba(255, 253, 246, .68); font-size: .82rem; }.scan-orbit { position: relative; width: 178px; aspect-ratio: 1; border: 2px solid var(--lime); border-radius: 50%; animation: orbit 1.5s linear infinite; }.scan-orbit::before, .scan-orbit::after { position: absolute; border: 2px solid var(--aqua); content: ""; }.scan-orbit::before { inset: 24px; transform: rotate(45deg); }.scan-orbit::after { top: -7px; left: calc(50% - 7px); width: 12px; height: 12px; background: var(--accent); box-shadow: 0 0 0 5px rgba(238, 88, 56, .2); }.app-shell.is-scanning .workspace > .image-panel { display: none; }.app-shell.is-scanning .scan-stage { display: grid; }.app-shell.is-result .workspace > .image-panel, .app-shell.is-result .scan-stage { display: none; }.app-shell.is-result .workspace > .result-panel { display: flex; min-height: 580px; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--accent); animation: result-pop .42s cubic-bezier(.2, .8, .2, 1) both; }.app-shell.is-result .analysis-radar { margin-top: 12px; }.retry-button { width: 100%; min-height: 48px; margin-top: 20px; border: 2px solid var(--ink); color: var(--ink); background: var(--lime); cursor: pointer; font-family: "DM Mono", monospace; font-weight: 700; letter-spacing: .04em; transition: transform .15s, background-color .15s; }.retry-button:hover { color: var(--panel); background: var(--ink); transform: translateY(-2px); }

@keyframes boot-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes stage-in { from { opacity: 0; transform: translateX(20px) scale(.98); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes scan-line { from { transform: translateY(-105%); } to { transform: translateY(105%); } }
@keyframes grade-idle { 50% { transform: rotate(-4deg) scale(1.06); } }
@keyframes charge { 50% { background: var(--aqua); box-shadow: 4px 4px 0 var(--lime); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes result-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* Future observation deck */
:root { --ink: #dff4f0; --muted: #91aaa9; --paper: #081a20; --panel: #102830; --line: #36545a; --accent: #ff765d; --lime: #d9f56a; --aqua: #68d9d0; }
body { color: var(--ink); background-color: var(--paper); background-image: linear-gradient(rgba(104, 217, 208, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(104, 217, 208, .055) 1px, transparent 1px); background-size: 40px 40px; }
.app-shell { width: min(100% - 56px, 1220px); }.site-header { border: 1px solid rgba(104, 217, 208, .5); background: rgba(8, 26, 32, .84); box-shadow: 0 0 0 1px rgba(104, 217, 208, .08), 0 18px 55px rgba(0, 0, 0, .22); }.wordmark { color: var(--ink); letter-spacing: .13em; }.wordmark span { color: var(--aqua); }.view-tab { width: 62px; height: 60px; border-left-color: rgba(104, 217, 208, .2); color: rgba(255, 255, 255, 0.5); font-size: 1.25rem; }.view-tab:hover { color: #ffffff; background: rgba(255, 255, 255, 0.12); }.view-tab.is-active { color: #ffffff; background: rgba(255, 255, 255, 0.2); box-shadow: inset 0 -2px 0 #ffffff; }
.workspace { max-width: 760px; }.workspace > .image-panel { border: 1px solid rgba(104, 217, 208, .42); border-radius: 8px; background: rgba(16, 40, 48, .82); box-shadow: 0 22px 64px rgba(0, 0, 0, .25); }.mission-controls { border-bottom-color: rgba(104, 217, 208, .2); }.mission-controls .eyebrow { color: var(--aqua); }.mission-controls .field-label { color: var(--muted); }.mission-controls .select-control { border-color: rgba(104, 217, 208, .35); border-radius: 4px; color: var(--ink); background: rgba(8, 26, 32, .75); }.submission-carousel { padding: 16px; border-color: rgba(104, 217, 208, .18); background: rgba(4, 17, 22, .38); }.submission-progress { border-bottom-color: rgba(104, 217, 208, .16); }.submission-progress span { color: var(--muted); }.submission-progress strong { color: var(--aqua); }.submission-view-cell { border: 1px solid rgba(104, 217, 208, .54); border-radius: 5px; background: #112a31; }.submission-view-cell:hover { border-color: var(--lime); background: #163239; }.submission-view-cell span { color: var(--muted); }.submission-thumbnails button { min-height: 62px; border-color: rgba(104, 217, 208, .22); border-radius: 4px; color: var(--muted); background: rgba(104, 217, 208, .04); transition: border-color .18s, color .18s, transform .18s, background-color .18s; }.submission-thumbnails button:hover { border-color: var(--aqua); color: var(--ink); transform: translateY(-2px); }.submission-thumbnails button.is-filled::after { background: rgba(4, 17, 22, .2); }.submission-thumbnails button.is-filled span { color: var(--ink); background: rgba(217, 245, 106, .88); }.submission-thumbnails button.is-active { border-color: var(--lime); box-shadow: 0 0 0 1px rgba(217, 245, 106, .35), 0 0 20px rgba(217, 245, 106, .1); }.slide-controls button { width: 42px; height: 36px; border: 1px solid rgba(104, 217, 208, .42); border-radius: 4px; color: var(--aqua); background: transparent; }.slide-controls button:hover:not(:disabled) { color: var(--ink); background: rgba(104, 217, 208, .14); transform: none; }.overlay-controls { color: var(--muted); }.judge-button { border: 1px solid var(--lime); border-radius: 4px; color: #122126; background: var(--lime); box-shadow: 0 0 24px rgba(217, 245, 106, .16); }.judge-button:hover:not(:disabled) { color: var(--ink); background: transparent; box-shadow: 0 0 0 1px rgba(217, 245, 106, .24), 0 0 28px rgba(217, 245, 106, .14); transform: none; }.judge-button:disabled { color: #779292; background: rgba(104, 217, 208, .12); border-color: rgba(104, 217, 208, .14); }
.scan-stage { border: 1px solid rgba(104, 217, 208, .45); border-radius: 8px; background: rgba(8, 26, 32, .88); box-shadow: 0 22px 64px rgba(0, 0, 0, .3), inset 0 0 50px rgba(104, 217, 208, .04); }.scan-stage p { color: var(--aqua); }.scan-stage strong { color: var(--ink); }.scan-orbit { border-color: var(--aqua); box-shadow: 0 0 36px rgba(104, 217, 208, .18); }.scan-orbit::before { border-color: var(--lime); }.scan-orbit::after { background: var(--lime); box-shadow: 0 0 0 5px rgba(217, 245, 106, .12); }
.app-shell.is-result .workspace > .result-panel {
  border: 1px solid rgba(104, 217, 208, .52);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(16, 40, 48, 0.72) !important;
  backdrop-filter: blur(12px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 1.06fr) minmax(420px, .94fr);
  grid-template-rows: auto auto 1fr auto;
  gap: 12px 34px;
  min-height: 680px;
  padding: 28px 34px 28px;
  overflow: hidden;
  isolation: isolate;
}.result-panel::before { height: 1px; background: linear-gradient(90deg, transparent, var(--aqua), transparent); }.score-value { color: var(--lime); text-shadow: none; }.grade-value { border-color: var(--lime); border-radius: 4px; color: #102830; background: var(--lime); box-shadow: 0 0 22px rgba(217, 245, 106, .18); }.analysis-radar { border-color: rgba(104, 217, 208, .25); background: rgba(104, 217, 208, .05); }.judgment-reason { background: rgba(104, 217, 208, .05); }.retry-button { border-color: rgba(104, 217, 208, .42); border-radius: 4px; color: var(--aqua); background: transparent; }.retry-button:hover { color: #102830; background: var(--aqua); transform: none; }
.teacher-workspace, .teacher-set { border-color: rgba(104, 217, 208, .35); box-shadow: none; }.teacher-workspace > div:first-child { background-color: rgba(104, 217, 208, .1); }.teacher-set { border-radius: 6px; background: rgba(16, 40, 48, .72); }.teacher-tip { color: var(--muted); }
.scan-orbit { display: grid; place-items: center; }.scan-orbit > i, .scan-orbit > b, .scan-orbit > em { position: absolute; display: block; border: 1px solid currentColor; border-radius: 50%; }.scan-orbit > i { width: 68%; aspect-ratio: 1; color: var(--aqua); animation: counter-orbit 2.8s linear infinite; }.scan-orbit > b { width: 36%; aspect-ratio: 1; color: var(--lime); border-radius: 4px; transform: rotate(45deg); animation: orbit 2.2s linear infinite; }.scan-orbit > em { width: 7px; height: 7px; color: var(--accent); background: var(--accent); box-shadow: 0 0 18px var(--accent); }.scan-meter { width: min(100%, 260px); height: 3px; margin-top: 26px; overflow: hidden; background: rgba(104, 217, 208, .15); }.scan-meter i { display: block; width: 38%; height: 100%; background: var(--lime); box-shadow: 0 0 16px var(--lime); animation: meter-sweep 1.4s ease-in-out infinite; }
.app-shell.is-result .score-block { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; margin: 18px 0; padding: 18px 20px; border: 1px solid rgba(104, 217, 208, .26); border-radius: 6px; background: rgba(4, 17, 22, .34); animation: metric-in .42s .08s both; }.app-shell.is-result .score-block .result-label { grid-column: 1 / -1; color: var(--aqua); }.app-shell.is-result .score-value { margin: 0; font-size: clamp(4.4rem, 11vw, 7rem); letter-spacing: .03em; }.app-shell.is-result .grade-value { align-self: center; width: 68px; height: 68px; margin: 0; font-size: 2rem; }.app-shell.is-result .analysis-radar { position: relative; display: grid; grid-template-columns: minmax(190px, .9fr) 1.1fr; align-items: center; gap: 10px; margin: 0 0 18px; animation: metric-in .42s .18s both; }.app-shell.is-result .analysis-radar > .result-label { position: absolute; top: 10px; left: 12px; }.app-shell.is-result .analysis-radar canvas { width: 100%; max-width: 270px; margin: 20px auto 0; }.app-shell.is-result .match-metrics { grid-template-columns: 1fr; gap: 0; padding-top: 18px; }.app-shell.is-result .match-metrics div { padding: 9px 0; }.app-shell.is-result .result-details { animation: metric-in .42s .28s both; }.app-shell.is-result .judgment-reason { animation: metric-in .42s .36s both; }.app-shell.is-result .retry-button { animation: metric-in .42s .44s both; }
.app-shell.is-result .workspace { max-width: 1180px; }.app-shell.is-result .workspace > .result-panel { position: relative; display: grid; grid-template-columns: minmax(360px, 1.06fr) minmax(420px, .94fr); grid-template-rows: auto auto 1fr auto; gap: 12px 34px; min-height: 680px; padding: 28px 34px 28px; overflow: hidden; border: 1px solid rgba(104, 217, 208, .52); border-radius: 8px; background: #091d25; isolation: isolate; }.app-shell.is-result .workspace > .result-panel::before { z-index: -1; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--aqua), #6c63ff 48%, var(--accent)); }.app-shell.is-result .workspace > .result-panel::after { position: absolute; z-index: -2; inset: 0; background-image: linear-gradient(125deg, rgba(104, 217, 208, .16), transparent 38%), linear-gradient(315deg, rgba(232, 93, 255, .14), transparent 42%); content: ""; }.result-artwork { position: absolute; z-index: -1; bottom: 0; left: 0; width: 53%; height: 92%; object-fit: contain; object-position: center bottom; filter: saturate(1.14) contrast(1.06); mask-image: linear-gradient(to right, #000 50%, transparent 100%); animation: result-art-in .65s cubic-bezier(.2, .8, .2, 1) both; }.result-rank-backdrop { position: absolute; z-index: -1; top: -42px; right: 22px; color: rgba(217, 245, 106, .12); font-family: "DM Mono", monospace; font-size: clamp(14rem, 30vw, 29rem); font-weight: 700; line-height: .8; text-shadow: 0 0 36px rgba(217, 245, 106, .18); animation: rank-flash .7s .12s both; }.app-shell.is-result .result-panel > .panel-number { grid-column: 1 / -1; color: var(--aqua); font-size: .76rem; }.app-shell.is-result .status-row { grid-column: 2; margin: 0; color: var(--lime); font-family: "DM Mono", monospace; }.app-shell.is-result .score-block, .app-shell.is-result .analysis-radar, .app-shell.is-result .result-details, .app-shell.is-result .judgment-reason, .app-shell.is-result .retry-button { grid-column: 2; }.app-shell.is-result .score-block { margin: 0; border-color: rgba(104, 217, 208, .32); background: rgba(5, 16, 23, .58); box-shadow: 0 0 45px rgba(104, 217, 208, .08); }.app-shell.is-result .score-value { color: #f6f9df; text-shadow: 0 0 24px rgba(246, 249, 223, .18); }.app-shell.is-result .grade-value { color: #081a20; background: linear-gradient(135deg, #f8ff9e, var(--lime)); box-shadow: 0 0 30px rgba(217, 245, 106, .3); }.app-shell.is-result .analysis-radar { margin: 0; border-color: rgba(232, 93, 255, .35); background: rgba(11, 25, 41, .6); }.app-shell.is-result .match-metrics { padding-top: 21px; }.app-shell.is-result .match-metrics div { border-top-color: rgba(104, 217, 208, .2); }.app-shell.is-result .result-details { align-self: end; gap: 8px; }.app-shell.is-result .result-details div { border-top-color: rgba(104, 217, 208, .2); }.app-shell.is-result .judgment-reason { margin-top: 0; border-left-color: #e85dff; background: rgba(232, 93, 255, .08); }.app-shell.is-result .retry-button { margin-top: 0; color: #081a20; background: var(--lime); box-shadow: 0 0 22px rgba(217, 245, 106, .2); }.app-shell.is-result .retry-button:hover { color: var(--ink); background: transparent; }
@keyframes result-art-in { from { opacity: 0; transform: translateX(-34px) scale(.95); } to { opacity: .9; transform: translateX(0) scale(1); } }
@keyframes rank-flash { from { opacity: 0; transform: scale(.85); } 55% { opacity: 1; } to { opacity: 1; transform: scale(1); } }
@keyframes counter-orbit { to { transform: rotate(-360deg); } }
@keyframes meter-sweep { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(280%); } }
@keyframes metric-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.title-view { position: relative; display: grid; min-height: calc(100dvh - 124px); margin-top: 26px; overflow: hidden; border: 1px solid rgba(104, 217, 208, .44); border-radius: 8px; background: radial-gradient(circle at 68% 40%, rgba(104, 217, 208, .22), transparent 27%), linear-gradient(135deg, #0c2d35, #08161e 65%); box-shadow: 0 22px 64px rgba(0, 0, 0, .28); isolation: isolate; place-items: center; }.title-view::before, .title-view::after { position: absolute; z-index: -1; content: ""; }.title-view::before { inset: 0; background-image: linear-gradient(90deg, rgba(104, 217, 208, .08) 1px, transparent 1px), linear-gradient(rgba(104, 217, 208, .08) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom, #000, transparent 88%); }.title-view::after { top: 8%; right: 11%; width: min(52vw, 590px); aspect-ratio: 1; border: 1px solid rgba(104, 217, 208, .24); border-radius: 50%; box-shadow: 0 0 0 40px rgba(104, 217, 208, .03), 0 0 0 110px rgba(104, 217, 208, .025); }.title-copy { position: relative; z-index: 2; align-self: center; width: min(76%, 720px); text-align: center; }.title-copy p, .title-copy small { display: block; color: var(--aqua); font-family: "DM Mono", monospace; font-size: clamp(.62rem, 1.2vw, .82rem); letter-spacing: .22em; }.title-copy h1 { margin: 12px 0 9px; color: #effdf9; font-family: "DM Mono", monospace; font-size: clamp(5.4rem, 16vw, 13rem); font-weight: 500; letter-spacing: .08em; line-height: .72; text-shadow: 0 0 45px rgba(104, 217, 208, .24); }.title-copy h1 em { color: var(--lime); font-style: normal; }.title-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }.title-art i, .title-art b, .title-art em, .title-art span { position: absolute; display: block; }.title-art i { top: 16%; left: 10%; width: 21%; aspect-ratio: 1; border: 1px solid rgba(217, 245, 106, .58); background: linear-gradient(135deg, rgba(217, 245, 106, .18), transparent); clip-path: polygon(50% 0, 100% 48%, 53% 100%, 0 63%); transform: rotate(-24deg); animation: fold-float 6s ease-in-out infinite; }.title-art b { right: 10%; bottom: 13%; width: 28%; aspect-ratio: 1; border: 1px solid rgba(232, 93, 255, .5); background: linear-gradient(135deg, rgba(232, 93, 255, .16), transparent); clip-path: polygon(50% 0, 100% 100%, 0 76%); transform: rotate(20deg); animation: fold-float 7s 1.2s ease-in-out infinite reverse; }.title-art em { top: 34%; right: 18%; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 22px var(--accent); animation: beacon 1.5s ease-in-out infinite; }.title-art span { bottom: 23%; left: 18%; width: 36%; height: 1px; background: linear-gradient(90deg, transparent, var(--aqua), transparent); transform: rotate(-18deg); }.title-menu { position: absolute; z-index: 3; right: 6%; bottom: 7%; display: grid; width: min(320px, 42%); gap: 7px; }.title-menu button { min-height: 43px; border: 1px solid rgba(104, 217, 208, .34); border-radius: 4px; color: var(--ink); background: rgba(4, 17, 22, .48); cursor: pointer; font-family: "DM Mono", monospace; font-size: .74rem; letter-spacing: .06em; text-align: left; transition: transform .18s, border-color .18s, background-color .18s; }.title-menu button:not(.title-start) { padding: 0 15px; color: var(--muted); }.title-menu button:hover { border-color: var(--aqua); background: rgba(104, 217, 208, .12); transform: translateX(-4px); }.title-menu .title-start { display: flex; padding: 0 15px; border-color: var(--lime); color: #092027; background: var(--lime); justify-content: space-between; align-items: center; font-weight: 700; }.title-menu .title-start:hover { border-color: var(--lime); color: var(--lime); background: transparent; }.title-dialog { position: absolute; z-index: 4; right: 6%; bottom: calc(7% + 158px); width: min(360px, 46%); padding: 16px; border: 1px solid rgba(104, 217, 208, .45); border-radius: 5px; color: var(--ink); background: rgba(5, 20, 27, .96); box-shadow: 0 14px 36px rgba(0, 0, 0, .28); font-size: .75rem; line-height: 1.7; }.title-dialog p { margin: 0 0 8px; color: var(--aqua); font-family: "DM Mono", monospace; }.title-dialog ol { margin: 0; padding-left: 19px; }.title-dialog label { display: flex; align-items: center; gap: 7px; }.title-prompt { position: absolute; bottom: 3%; left: 6%; margin: 0; color: rgba(223, 244, 240, .48); font-family: "DM Mono", monospace; font-size: .62rem; letter-spacing: .14em; animation: prompt-pulse 1.4s steps(2, end) infinite; }
@keyframes fold-float { 50% { transform: translateY(-16px) rotate(-14deg); } }
@keyframes beacon { 50% { opacity: .3; transform: scale(.7); } }
@keyframes prompt-pulse { 50% { opacity: .16; } }
@media (min-width: 801px) and (max-width: 1180px) {
  .app-shell { width: min(100% - 36px, 1120px); padding-top: 16px; }
  .app-shell.is-result .workspace > .result-panel { grid-template-columns: minmax(300px, .96fr) minmax(390px, 1.04fr); grid-template-rows: auto auto 1fr auto; gap: 8px 22px; min-height: min(620px, calc(100dvh - 94px)); padding: 18px 22px; }
  .app-shell.is-result .result-panel > .panel-number { font-size: .65rem; }
  .app-shell.is-result .status-row { min-height: 16px; font-size: .72rem; }
  .app-shell.is-result .score-block { gap: 0 12px; padding: 12px 14px; }
  .app-shell.is-result .score-value { font-size: clamp(3.6rem, 8vw, 5.2rem); line-height: .9; }
  .app-shell.is-result .score-value small { font-size: .72rem; }
  .app-shell.is-result .grade-value { width: 54px; height: 54px; font-size: 1.55rem; }
  .app-shell.is-result .analysis-radar { grid-template-columns: 175px 1fr; gap: 6px; min-height: 176px; }
  .app-shell.is-result .analysis-radar canvas { max-width: 170px; margin-top: 18px; }
  .app-shell.is-result .match-metrics { padding-top: 15px; }
  .app-shell.is-result .match-metrics div { padding: 5px 0; }
  .app-shell.is-result .match-metrics dt, .app-shell.is-result .match-metrics dd { font-size: .62rem; }
  .app-shell.is-result .result-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-self: start; }
  .app-shell.is-result .result-details div { gap: 8px; padding: 6px 0; }
  .app-shell.is-result .result-details dt, .app-shell.is-result .result-details dd { font-size: .65rem; }
  .app-shell.is-result .judgment-reason { padding: 8px 10px; font-size: .67rem; line-height: 1.45; }
  .app-shell.is-result .judgment-reason output { font-size: .68rem; line-height: 1.45; }
  .app-shell.is-result .retry-button { grid-column: 1; grid-row: 4; align-self: end; width: min(100%, 250px); min-height: 38px; font-size: .7rem; }
  .app-shell.is-result .result-artwork { width: 50%; }
  .title-view { min-height: calc(100dvh - 94px); margin-top: 16px; }.title-copy h1 { font-size: clamp(5rem, 15vw, 10rem); }
}
@media (max-width: 800px) { .title-view { min-height: calc(100dvh - 98px); margin-top: 16px; }.title-copy { align-self: start; margin-top: 18vh; }.title-menu { right: 7%; bottom: 10%; width: 86%; }.title-dialog { right: 7%; bottom: calc(10% + 158px); width: 86%; }.title-art i { width: 38%; }.title-art b { width: 42%; }.title-prompt { display: none; } }
@media (min-width: 801px) and (max-height: 850px) {
  .app-shell { padding-top: 14px; padding-bottom: 14px; }
  .app-shell.is-result .workspace > .result-panel { grid-template-columns: minmax(300px, .96fr) minmax(390px, 1.04fr); grid-template-rows: auto auto 1fr auto; gap: 7px 22px; height: calc(100dvh - 90px); min-height: 0; padding: 16px 22px; }
  .app-shell.is-result .result-panel > .panel-number { font-size: .64rem; }
  .app-shell.is-result .status-row { min-height: 15px; font-size: .7rem; }
  .app-shell.is-result .score-block { gap: 0 12px; padding: 10px 13px; }
  .app-shell.is-result .score-value { font-size: clamp(3.4rem, 7.2vw, 4.8rem); line-height: .9; }
  .app-shell.is-result .score-value small { font-size: .68rem; }
  .app-shell.is-result .grade-value { width: 50px; height: 50px; font-size: 1.4rem; }
  .app-shell.is-result .analysis-radar { grid-template-columns: 160px 1fr; gap: 5px; min-height: 152px; }
  .app-shell.is-result .analysis-radar canvas { max-width: 155px; margin-top: 16px; }
  .app-shell.is-result .match-metrics { padding-top: 13px; }
  .app-shell.is-result .match-metrics div { padding: 4px 0; }
  .app-shell.is-result .match-metrics dt, .app-shell.is-result .match-metrics dd { font-size: .59rem; }
  .app-shell.is-result .result-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-self: start; }
  .app-shell.is-result .result-details div { gap: 7px; padding: 4px 0; }
  .app-shell.is-result .result-details dt, .app-shell.is-result .result-details dd { font-size: .61rem; }
  .app-shell.is-result .judgment-reason { padding: 6px 9px; }
  .app-shell.is-result .judgment-reason p, .app-shell.is-result .judgment-reason output { font-size: .61rem; line-height: 1.35; }
  .app-shell.is-result .retry-button { grid-column: 1; grid-row: 4; align-self: end; width: min(100%, 220px); min-height: 34px; font-size: .65rem; }
  .app-shell.is-result .result-artwork { width: 50%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

.submission-progress { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }.submission-progress output { color: var(--lime); font-family: "DM Mono", monospace; font-size: .64rem; text-align: right; }.submission-mission { margin: 12px 2px 10px; color: var(--muted); font-size: .74rem; line-height: 1.55; }.submission-slides { position: relative; overflow: hidden; border-radius: 8px; background: radial-gradient(circle at center, rgba(104, 217, 208, .15), transparent 47%), #071820; }.submission-slides::before, .submission-slides::after { position: absolute; z-index: 2; pointer-events: none; content: ""; }.submission-slides::before { inset: 11%; border: 1px solid rgba(104, 217, 208, .3); border-radius: 50%; box-shadow: 0 0 0 38px rgba(104, 217, 208, .025), 0 0 0 92px rgba(104, 217, 208, .018); animation: deck-pulse 2.8s ease-in-out infinite; }.submission-slides::after { top: 50%; left: 50%; width: 42%; aspect-ratio: 1; border: 1px solid rgba(217, 245, 106, .46); border-radius: 50%; transform: translate(-50%, -50%); }.submission-view-cell { min-height: 360px; border: 1px solid rgba(104, 217, 208, .42); border-radius: 8px; background: linear-gradient(rgba(104, 217, 208, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(104, 217, 208, .05) 1px, transparent 1px), transparent; background-size: 30px 30px; }.submission-view-cell::before { position: absolute; z-index: 3; top: 18px; left: 18px; padding: 5px 8px; border: 1px solid rgba(104, 217, 208, .35); color: var(--aqua); background: rgba(5, 20, 27, .64); content: "OBSERVATION BAY"; font-family: "DM Mono", monospace; font-size: .56rem; letter-spacing: .12em; }.submission-view-cell img { position: relative; z-index: 1; max-width: 84%; max-height: 84%; object-fit: contain; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .45)) saturate(1.1); animation: hologram-rise .45s cubic-bezier(.2, .8, .2, 1) both; }.submission-view-cell span { position: relative; z-index: 3; padding: 10px 14px; border: 1px solid rgba(104, 217, 208, .35); border-radius: 4px; color: var(--aqua); background: rgba(5, 20, 27, .74); font-family: "DM Mono", monospace; font-size: .72rem; letter-spacing: .04em; box-shadow: 0 0 22px rgba(104, 217, 208, .08); }.submission-view-cell:hover span { color: var(--lime); border-color: var(--lime); background: rgba(217, 245, 106, .1); }.submission-thumbnails { gap: 9px; padding: 10px 0 4px; }.submission-thumbnails button { min-height: 64px; border-radius: 6px; }.submission-thumbnails button::before { position: absolute; top: 6px; left: 6px; width: 5px; height: 5px; border-radius: 50%; background: rgba(104, 217, 208, .3); content: ""; }.submission-thumbnails button.is-filled::before { background: var(--lime); box-shadow: 0 0 9px var(--lime); }.submission-thumbnails button.is-active { transform: translateY(-3px); }.submission-thumbnails button.is-active::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }.slide-controls { margin-top: 12px; }.slide-controls button { width: 46px; height: 38px; }.judge-button { position: relative; overflow: hidden; min-height: 62px; margin-top: 18px; }.judge-button::before { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .42) 50%, transparent 70%); content: ""; transform: translateX(-120%); transition: transform .45s; }.judge-button:hover:not(:disabled)::before { transform: translateX(120%); }
.scan-mixer { position: relative; display: grid; width: 250px; aspect-ratio: 1; perspective: 700px; place-items: center; }.scan-mixer .scan-orbit { position: relative; z-index: 3; }.scan-image-chip { position: absolute; z-index: 1; width: 64px; aspect-ratio: 1; border: 1px solid var(--aqua); border-radius: 4px; object-fit: cover; box-shadow: 0 0 22px rgba(104, 217, 208, .36); animation: image-mix 1.6s cubic-bezier(.23, .79, .25, 1) both; animation-delay: calc(var(--chip-index) * 90ms); }.scan-image-chip:nth-of-type(2) { border-color: var(--lime); }.scan-image-chip:nth-of-type(3) { border-color: #e85dff; }.scan-image-chip:nth-of-type(4) { border-color: var(--accent); }.scan-image-chip:nth-of-type(5) { border-color: #6c93ff; }.scan-stage .scan-mixer + p { margin-top: 18px; }
@keyframes deck-pulse { 50% { opacity: .45; transform: scale(.96); } }
@keyframes hologram-rise { from { opacity: 0; transform: translateY(18px) scale(.93); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes image-mix { 0% { opacity: 0; transform: rotate(calc(var(--chip-index) * 72deg)) translateY(-112px) rotate(calc(var(--chip-index) * -72deg)) scale(.55); } 25% { opacity: 1; } 62% { opacity: .9; transform: rotate(calc(var(--chip-index) * 72deg + 210deg)) translateY(-82px) rotate(calc(var(--chip-index) * -72deg - 210deg)) scale(.86); } 100% { opacity: 0; transform: translate(0, 0) scale(.2) rotate(360deg); filter: brightness(2.2); } }

@keyframes pulse { 50% { opacity: .25; } }
@media (max-width: 800px) { .app-shell { width: min(100% - 32px, 1180px); } .hero { grid-template-columns: 1fr; } .hero-copy { min-height: 470px; padding-right: 0; } .hero-art { min-height: 300px; border-top: 1px solid var(--ink); border-left: 0; } .workspace, .teacher-workspace { grid-template-columns: 1fr; margin-top: 48px; } .workspace-heading, .image-panel, .teacher-workspace > div:first-child { border-right: 0; border-bottom: 1px solid var(--ink); } .workspace-heading h2 { margin-top: 40px; } .result-panel { min-height: 325px; } .teacher-intro { min-height: 330px; }.teacher-workspace > div { min-height: 210px; }.view-grid { grid-template-columns: repeat(3, 1fr); }.submission-slides, .submission-view-cell { min-height: 260px; } }
@media (max-width: 460px) { .app-shell { width: min(100% - 24px, 1180px); padding-top: 12px; } .header-meta { font-size: .57rem; } .hero-copy { min-height: 430px; padding: 54px 0 30px; } h1 { font-size: clamp(3.1rem, 16vw, 4.1rem); } .hero-art { min-height: 250px; } .workspace-heading { padding: 24px 20px; } .image-panel, .result-panel { padding: 16px; } .site-footer { gap: 14px; align-items: flex-start; flex-direction: column; } }

.submission-view-stamp { position: absolute; z-index: 5; top: 16px; right: 17px; min-width: 72px; padding: 5px 11px 7px; border: 1px solid var(--lime); color: var(--lime); background: rgba(5, 20, 27, .8); box-shadow: 0 0 24px rgba(217, 245, 106, .2); font-family: "DM Mono", monospace; font-size: 2.75rem; font-weight: 700; line-height: 1; text-align: center; }
.submission-thumbnails { perspective: 700px; }
.submission-thumbnail { min-height: 72px; border: 1px solid rgba(104, 217, 208, .28); border-radius: 4px; background: #0a2028; box-shadow: 0 8px 0 rgba(0, 0, 0, .17); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.submission-thumbnail.is-active { z-index: 1; border-color: var(--lime); box-shadow: 0 0 0 2px rgba(217, 245, 106, .16), 0 12px 20px rgba(0, 0, 0, .34); transform: translateY(-9px) scale(1.08); }
.submission-thumbnail.is-filled::after { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 9px var(--lime); content: ""; }
.app-shell.is-result .result-actions { position: absolute !important; z-index: 3 !important; bottom: 28px; left: 34px; display: flex; grid-column: auto; gap: 8px; align-items: center; flex-wrap: wrap; }
.result-action-button { min-height: 40px; padding: 0 13px; border: 1px solid rgba(104, 217, 208, .38); border-radius: 4px; color: var(--aqua); background: rgba(104, 217, 208, .05); font-family: "DM Mono", monospace; font-size: .68rem; }
.result-action-button:hover, .result-action-button:focus-visible { border-color: var(--lime); color: var(--lime); }
@media (max-width: 800px) { .app-shell.is-result .result-actions { bottom: 18px; left: 18px; } }
.app-shell.is-result .result-artwork-stage { position: relative; display: grid; grid-column: 1; grid-row: 2 / span 3; min-height: 440px; margin: 0; overflow: hidden; border: 1px solid rgba(104, 217, 208, .42); border-radius: 8px; background: #071820; box-shadow: inset 0 0 42px rgba(104, 217, 208, .08); place-items: center; }
.app-shell.is-result .result-artwork-stage[hidden] { display: none; }
.app-shell.is-result .result-artwork-stage .result-artwork { position: static; z-index: auto; width: 100%; height: 100%; min-height: 440px; object-fit: contain; object-position: center; filter: saturate(1.05) contrast(1.03); mask-image: none; animation: result-art-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.result-artwork-stage figcaption { position: absolute; bottom: 0; left: 0; margin: 12px; padding: 5px 8px; color: var(--aqua); background: rgba(4, 17, 22, .78); font-family: "DM Mono", monospace; font-size: .65rem; letter-spacing: .08em; }
@media (max-width: 800px) { .app-shell.is-result .result-artwork-stage { grid-column: 1; grid-row: auto; min-height: 260px; } .app-shell.is-result .result-artwork-stage .result-artwork { min-height: 260px; } }
.game-collection-view { min-height: 70vh; padding: 72px clamp(20px, 6vw, 80px); background: linear-gradient(125deg, rgba(104, 217, 208, .08), transparent 43%), #071820; }
.lens-intro { max-width: 680px; color: var(--muted); line-height: 1.7; }
.lens-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr); gap: 18px; align-items: start; }
.lens-camera-card, .lens-result-card, .encyclopedia-panel, .progression-panel { border: 1px solid rgba(104, 217, 208, .25); border-radius: 8px; background: rgba(5, 20, 27, .72); padding: 18px; }
.lens-video-frame { position: relative; min-height: 360px; overflow: hidden; border: 1px solid rgba(104, 217, 208, .36); border-radius: 6px; background: #02090d; }
.lens-video-frame video { display: block; width: 100%; min-height: 360px; object-fit: cover; transform: scaleX(-1); }
.lens-reticle { position: absolute; inset: 18% 20%; border: 1px solid var(--lime); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .12); pointer-events: none; }
.lens-controls { display: flex; gap: 10px; margin-top: 14px; }
.lens-status { margin: 12px 0 0; color: var(--muted); font-size: .76rem; }
.lens-result-card { min-height: 180px; }
.lens-result-card output { display: block; margin: 24px 0 8px; color: var(--muted); font-family: "DM Mono", monospace; font-size: clamp(1.8rem, 4vw, 3.8rem); line-height: 1.05; }
.lens-result-card output.is-found { color: var(--lime); text-shadow: 0 0 20px rgba(217, 245, 106, .18); }
.lens-result-card small { color: var(--muted); line-height: 1.5; }
.encyclopedia-panel, .progression-panel { margin-top: 22px; }
.encyclopedia-panel h2, .progression-panel h2 { margin: 6px 0 10px; color: var(--ink); }
.encyclopedia-panel .result-label, .progression-panel .result-label { margin: 0; color: var(--aqua); font-family: "DM Mono", monospace; font-size: .66rem; letter-spacing: .12em; }
.encyclopedia-list, .progression-list { display: grid; gap: 9px; margin-top: 14px; }
.encyclopedia-card, .progression-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid rgba(104, 217, 208, .18); border-radius: 5px; background: rgba(16, 40, 48, .62); }
.encyclopedia-card strong, .progression-item strong { display: block; color: var(--ink); }
.encyclopedia-card small, .progression-item small { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; }
.encyclopedia-card b { color: var(--lime); font-family: "DM Mono", monospace; }
.encyclopedia-number { color: var(--aqua); font-family: "DM Mono", monospace; }
.progression-item > span { color: var(--lime); font-family: "DM Mono", monospace; font-size: .62rem; }
.progression-item.is-locked { opacity: .55; }
.progression-item.is-locked > span { color: var(--muted); }
@media (max-width: 800px) { .lens-layout { grid-template-columns: 1fr; }.lens-video-frame, .lens-video-frame video { min-height: 260px; } }
.game-collection-view h1 { margin: 6px 0 34px; color: #f1f4e9; font-size: clamp(2.2rem, 5vw, 4.6rem); }

/* Battle area */
.title-view { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); grid-template-rows: 1fr auto; gap: 18px 44px; min-height: 680px; padding: clamp(32px, 6vw, 72px); place-items: stretch; }.title-copy { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: auto; text-align: left; }.title-copy h1 { margin: 14px 0; font-family: "Noto Serif JP", serif; font-size: clamp(3.8rem, 7vw, 6.2rem); font-weight: 700; letter-spacing: .12em; line-height: .9; }.title-event { position: relative; z-index: 3; display: grid; grid-column: 2; grid-row: 1; gap: 10px; align-self: end; padding: 28px; border: 1px solid rgba(217, 245, 106, .54); border-radius: 7px; background: linear-gradient(135deg, rgba(217, 245, 106, .16), transparent 65%), rgba(7, 24, 32, .86); box-shadow: 0 20px 42px rgba(0, 0, 0, .22); }.title-event .eyebrow { color: var(--lime); }.title-event h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); }.title-event > p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.65; }.title-event-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }.title-event-form label { grid-column: 1 / -1; color: var(--aqua); font-size: .7rem; }.title-event-form input { min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid rgba(104, 217, 208, .35); border-radius: 4px; color: var(--ink); background: rgba(5, 20, 27, .82); font-family: "Zen Kaku Gothic New", sans-serif; }.title-event-form button, .title-create-room { min-height: 48px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-weight: 700; }.title-event-form button { padding: 0 13px; color: #102830; background: var(--lime); }.title-create-room { color: var(--aqua); background: transparent; border-color: rgba(104, 217, 208, .4); }.title-menu { position: relative; z-index: 3; right: auto; bottom: auto; display: grid; grid-column: 2; grid-row: 2; width: 100%; gap: 7px; }.title-menu button { text-align: left; }.title-menu .title-start { color: var(--ink); background: var(--aqua); }.title-prompt { display: none; }
.title-event-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid rgba(104, 217, 208, .28); }.title-event-tabs button { min-height: 34px; padding: 0 8px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .68rem; }.title-event-tabs button.is-active { border-bottom-color: var(--lime); color: var(--ink); }.title-event-panel, .title-create-form, .title-event-list { display: grid; gap: 10px; }.title-event-list, .title-room-management-list { display: grid; max-height: 150px; gap: 8px; overflow-y: auto; }.title-event-option { display: grid; gap: 3px; width: 100%; min-height: 52px; padding: 9px 11px; border: 1px solid rgba(104, 217, 208, .28); border-radius: 4px; color: var(--ink); background: rgba(5, 20, 27, .55); cursor: pointer; text-align: left; }.title-event-option:hover { border-color: var(--lime); background: rgba(217, 245, 106, .08); }.title-event-option strong { font-size: .82rem; }.title-event-option span, .title-room-management-item span { color: var(--muted); font-family: "DM Mono", monospace; font-size: .62rem; }.title-room-management-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 9px 11px; border: 1px solid rgba(104, 217, 208, .22); border-radius: 4px; }.title-room-management-item > div { display: grid; gap: 3px; min-width: 0; }.title-room-management-item strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }.title-room-delete { flex: 0 0 auto; min-height: 30px; padding: 0 9px; border: 1px solid rgba(255, 118, 93, .5); border-radius: 3px; color: #ffb38f; background: transparent; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .65rem; }.title-event-list-label, .title-participant-notice { min-height: 1.2em; margin: 0; color: var(--muted); font-family: "DM Mono", monospace; font-size: .65rem; letter-spacing: .08em; }.title-create-form h2 { margin: 0; font-size: 1.35rem; }.title-create-form label { display: grid; gap: 5px; color: var(--muted); font-size: .67rem; }.title-create-form input, .title-create-form select { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid rgba(104, 217, 208, .3); border-radius: 4px; color: var(--ink); background: rgba(5, 20, 27, .82); font-family: "Zen Kaku Gothic New", sans-serif; font-size: .78rem; }.title-create-form[hidden], .title-event-panel[hidden] { display: none; }.title-join-event { min-height: 48px; border: 1px solid transparent; border-radius: 4px; color: #102830; background: var(--lime); cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-weight: 700; }.title-join-event:disabled { cursor: not-allowed; opacity: .45; }.title-single-label { margin: 0; color: var(--muted); font-family: "DM Mono", monospace; font-size: .65rem; letter-spacing: .12em; }.title-menu .title-start, .title-menu .title-start:hover { color: #102830; background: #e8ece6; border-color: rgba(232, 236, 230, .8); }
.battle-view { background: linear-gradient(135deg, rgba(255, 118, 93, .13), transparent 38%), linear-gradient(315deg, rgba(217, 245, 106, .08), transparent 42%), #071820; }
.title-event-actions { display: flex; gap: 8px; flex-wrap: wrap; }.title-secondary-action { min-height: 36px; padding: 0 11px; border: 1px solid rgba(104, 217, 208, .35); border-radius: 4px; color: var(--ink); background: transparent; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .7rem; }.title-secondary-action:hover { border-color: var(--lime); }.title-panel-heading { display: flex; gap: 10px; align-items: center; justify-content: space-between; }.title-panel-heading h2 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.title-panel-back { flex: 0 0 auto; min-height: 30px; padding: 0 10px; border: 1px solid rgba(104, 217, 208, .35); border-radius: 4px; color: var(--ink); background: transparent; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .68rem; }.title-panel-back:hover { border-color: var(--lime); }
.title-event #titleEventHeading:empty, .title-event #titleEventDescription:empty { display: none; }
.title-event-list-label { color: var(--aqua); font-family: "DM Mono", monospace; font-size: .58rem; letter-spacing: .12em; }
.battle-room-topic { display: block; margin-top: 6px; color: var(--muted); font-family: "DM Mono", monospace; font-size: .64rem; line-height: 1.5; overflow-x: auto; white-space: nowrap; scrollbar-color: rgba(104, 217, 208, .45) transparent; }
.title-create-form.is-sliding-in { animation: title-create-form-slide-in .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes title-create-form-slide-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
.title-event-panel.is-sliding-back { animation: title-event-panel-slide-back .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes title-event-panel-slide-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .title-create-form.is-sliding-in, .title-event-panel.is-sliding-back { animation: none; } }
.title-event:has(.title-participant-actions:not([hidden])) { z-index: 21; }
.title-start-room { min-height: 38px; border: 1px solid var(--lime); border-radius: 4px; color: #102830; background: var(--lime); cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-weight: 700; }.room-start-modal { position: fixed; z-index: 100; inset: 0; display: grid; padding: 24px; background: rgba(3, 12, 16, .82); backdrop-filter: blur(7px); place-items: center; }.room-start-modal[hidden] { display: none; }.room-start-modal-panel { display: grid; width: min(360px, 100%); gap: 11px; padding: 30px; border: 1px solid rgba(217, 245, 106, .62); border-radius: 7px; background: #0b2028; box-shadow: 0 24px 70px rgba(0, 0, 0, .48); text-align: center; justify-items: center; }.room-start-spinner { width: 36px; height: 36px; border: 2px solid rgba(217, 245, 106, .2); border-top-color: var(--lime); border-radius: 50%; animation: room-start-spin .8s linear infinite; }.room-start-modal-panel p { margin: 0; color: var(--lime); font-family: "DM Mono", monospace; font-size: .65rem; letter-spacing: .14em; }.room-start-modal-panel h2 { margin: 0; font-size: 1.05rem; }.room-start-modal-panel output { color: var(--lime); font-family: "DM Mono", monospace; font-size: 4.5rem; line-height: 1; }.room-start-modal-panel small { color: var(--muted); font-size: .7rem; }.room-start-modal-panel > div:last-child { display: flex; gap: 7px; width: 100%; margin-top: 7px; }.room-start-modal-panel button { flex: 1; min-height: 36px; border: 1px solid rgba(104, 217, 208, .35); border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .7rem; }.room-start-modal-panel #roomStartNowButton { border-color: var(--lime); color: #102830; background: var(--lime); }.room-start-modal-panel #roomStartCancelButton { border-color: rgba(255, 118, 93, .5); color: #ffb38f; }@keyframes room-start-spin { to { transform: rotate(360deg); } }
.title-device-participants { position: relative; display: flex; min-height: 0; max-height: 48px; gap: 5px; overflow: visible; flex-wrap: wrap; }.title-device-participant { display: inline-flex; min-height: 28px; gap: 5px; padding: 0 8px; border: 1px solid rgba(104, 217, 208, .26); border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .64rem; align-items: center; }.title-device-participant:hover, .title-device-participant.is-selected { border-color: var(--lime); color: var(--ink); background: rgba(217, 245, 106, .08); }.title-device-participant-icon { position: relative; width: 11px; height: 13px; }.title-device-participant-icon::before, .title-device-participant-icon::after { position: absolute; left: 50%; background: currentColor; content: ""; transform: translateX(-50%); }.title-device-participant-icon::before { top: 0; width: 5px; height: 5px; border-radius: 50%; }.title-device-participant-icon::after { bottom: 0; width: 10px; height: 7px; border-radius: 6px 6px 2px 2px; }.title-participant-actions { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; display: grid; width: min(240px, 100%); gap: 6px; padding: 8px; border: 1px solid rgba(217, 245, 106, .5); border-radius: 4px; background: #0b2028; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }.title-participant-actions::before { position: absolute; top: -5px; left: 14px; width: 8px; height: 8px; border-top: 1px solid rgba(217, 245, 106, .5); border-left: 1px solid rgba(217, 245, 106, .5); background: #0b2028; content: ""; transform: rotate(45deg); }.title-participant-actions label { display: grid; gap: 4px; color: var(--muted); font-size: .62rem; }.title-participant-actions input { min-height: 30px; padding: 0 8px; border: 1px solid rgba(104, 217, 208, .3); border-radius: 3px; color: var(--ink); background: rgba(5, 20, 27, .7); font-family: "Zen Kaku Gothic New", sans-serif; }.title-participant-actions > div { display: flex; gap: 6px; }.title-participant-actions button { min-height: 28px; padding: 0 8px; border: 1px solid rgba(104, 217, 208, .35); border-radius: 3px; color: var(--muted); background: transparent; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .62rem; }.title-participant-actions #titleParticipantRenameButton:hover { border-color: var(--lime); color: var(--ink); }.title-participant-actions #titleParticipantCancelButton { border-color: rgba(255, 118, 93, .5); color: #ffb38f; }
.title-multi-label { position: absolute; top: -20px; left: 0; margin: 0; color: var(--muted); font-family: "DM Mono", monospace; font-size: .65rem; letter-spacing: .12em; }.title-secondary-action { min-height: 30px; padding: 0; border: 0; color: var(--muted); font-size: .72rem; }.title-secondary-action:hover { color: var(--lime); }.title-event-list { gap: 6px; }.title-event-row { display: flex; gap: 7px; align-items: center; }.title-event-option { display: flex; flex: 1; gap: 10px; align-items: center; min-width: 0; min-height: 36px; padding: 0 10px; }.title-event-option:hover:not(:disabled) { border-color: var(--lime); background: rgba(217, 245, 106, .08); }.title-event-option:disabled { cursor: default; opacity: .52; }.title-event-option strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }.title-event-option span { margin-left: auto; color: var(--muted); font-family: "DM Mono", monospace; font-size: .6rem; white-space: nowrap; }.title-event-enrolled { flex: 0 0 auto; color: #f8ff9e; font-family: "DM Mono", monospace; font-size: .58rem; white-space: nowrap; text-shadow: 0 0 10px rgba(248, 255, 158, .35); }.title-room-settings { flex: 0 0 auto; min-height: 30px; padding: 0 8px; border: 1px solid rgba(104, 217, 208, .35); border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .64rem; }.title-room-settings:hover { border-color: var(--lime); color: var(--ink); }.title-room-delete { min-height: 34px; padding: 0 9px; font-size: .7rem; }
.title-event-row { gap: 3px; padding: 2px 4px; border: 1px solid rgba(104, 217, 208, .28); border-radius: 4px; background: rgba(5, 20, 27, .55); }.title-event-option { gap: 8px; padding: 0 5px; border: 0; border-radius: 0; background: transparent; }.title-event-option:hover:not(:disabled) { background: transparent; }.title-room-door { position: relative; flex: 0 0 auto; width: 11px; height: 15px; border: 1px solid var(--aqua); border-radius: 2px 2px 0 0; }.title-room-door::after { position: absolute; top: 7px; right: 2px; width: 2px; height: 2px; border-radius: 50%; background: var(--aqua); content: ""; }.title-room-icon { display: grid; flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 3px; color: var(--muted); background: transparent; cursor: pointer; font-size: .72rem; place-items: center; }.title-room-icon:hover { color: var(--lime); background: rgba(217, 245, 106, .1); }.title-room-start-icon { color: var(--lime); }.title-room-settings { min-height: 28px; padding: 0; border: 0; font-size: 1rem; }
.title-event-row { position: relative; }.title-room-settings-popover { position: fixed; z-index: 120; display: flex; width: min(280px, calc(100vw - 24px)); gap: 6px; padding: 8px; border: 1px solid rgba(104, 217, 208, .46); border-radius: 4px; background: #0b2028; box-shadow: 0 14px 30px rgba(0, 0, 0, .34); flex-direction: column; max-height: min(220px, calc(100vh - 24px)); overflow-y: auto; scrollbar-color: rgba(104, 217, 208, .45) transparent; }.title-room-settings-popover[hidden] { display: none; }.title-room-settings-popover input, .title-room-settings-topic { min-width: 0; min-height: 28px; padding: 0 7px; border: 1px solid rgba(104, 217, 208, .3); border-radius: 3px; color: var(--ink); background: rgba(5, 20, 27, .7); font-family: "Zen Kaku Gothic New", sans-serif; font-size: .68rem; }.title-room-settings-topic { min-height: 28px; padding: 0 7px; }.title-room-settings-popover button { min-height: 28px; padding: 0 8px; border: 1px solid rgba(255, 118, 93, .5); border-radius: 3px; color: #ffb38f; background: transparent; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .62rem; }
.title-event-list { gap: 0; max-height: 114px; border-top: 1px solid rgba(104, 217, 208, .2); border-bottom: 1px solid rgba(104, 217, 208, .2); overflow-y: auto; scrollbar-color: rgba(104, 217, 208, .45) transparent; }.title-event-row { min-height: 38px; padding: 0; border: 0; border-bottom: 1px solid rgba(104, 217, 208, .14); border-radius: 0; background: transparent; }.title-event-row:last-child { border-bottom: 0; }.title-event-option { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; min-height: 37px; gap: 8px; padding: 0 7px; text-align: left; }.title-room-date { color: rgba(223, 244, 240, .5); font-family: "DM Mono", monospace; font-size: .56rem; white-space: nowrap; }.title-event-option .title-room-identity { display: flex; min-width: 0; gap: 8px; margin-left: 0; justify-self: stretch; align-items: center; }.title-event-option .title-room-identity .title-room-door { margin-left: 0; }.title-event-option .title-room-identity strong { overflow: hidden; color: var(--ink); font-size: .75rem; font-weight: 500; text-align: left; text-overflow: ellipsis; white-space: nowrap; }.title-event-option .title-room-status { margin-left: 0; color: var(--muted); font-size: .56rem; }.title-room-door { width: 9px; height: 13px; border-color: rgba(104, 217, 208, .75); }.title-event-row.is-finished { opacity: .62; }.title-event-row.is-finished .title-event-option, .title-event-row.is-finished .title-event-option .title-room-identity strong, .title-event-row.is-finished .title-event-option .title-room-status, .title-event-row.is-finished .title-room-date { color: #7f8989; }.title-event-row.is-finished .title-room-door { border-color: #7f8989; }.title-room-icon { width: 23px; height: 28px; color: rgba(223, 244, 240, .55); font-size: .64rem; }.title-room-settings { font-size: .86rem; }.title-room-start-icon { color: rgba(217, 245, 106, .75); }.title-event-enrolled { padding: 0 2px; color: #f8ff9e; font-size: .78rem; text-shadow: 0 0 8px rgba(248, 255, 158, .4); }.title-event-actions { margin-top: 2px; }.title-secondary-action { color: rgba(223, 244, 240, .6); }
.title-menu .title-start, .title-menu .title-start:hover { color: var(--aqua); border-color: rgba(104, 217, 208, .58); background: transparent; }
.title-room-start-icon:disabled { color: rgba(223, 244, 240, .22); cursor: not-allowed; }
.title-device-participants { overflow-x: hidden; overflow-y: auto; scrollbar-color: rgba(104, 217, 208, .45) transparent; }
.title-participant-actions { position: fixed; z-index: 40; width: min(240px, calc(100vw - 24px)); }
.title-participant-actions[hidden] { display: none; }
.room-run-bar { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, auto) auto; gap: 14px; padding: 10px 16px; border-bottom: 1px solid rgba(104, 217, 208, .28); background: rgba(5, 20, 27, .86); align-items: center; }.room-run-bar > div, .room-run-bar label { display: grid; gap: 2px; }.room-run-bar span, .room-run-bar label { color: var(--muted); font-family: "DM Mono", monospace; font-size: .54rem; letter-spacing: .08em; }.room-run-bar strong, .room-run-bar output { color: var(--aqua); font-family: "DM Mono", monospace; font-size: .74rem; white-space: nowrap; }.room-run-bar > div:first-child strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; }.room-run-bar select { min-height: 25px; padding: 0 5px; border: 1px solid rgba(104, 217, 208, .4); border-radius: 3px; color: var(--aqua); background: rgba(5, 20, 27, .9); font-family: "DM Mono", monospace; font-size: .62rem; }
.room-run-bar[hidden] { display: none; }
.room-participant-panel { position: absolute; z-index: 8; top: 102px; right: 24px; display: grid; width: 230px; max-height: calc(100% - 202px); gap: 6px; padding: 10px; overflow-y: auto; border: 1px solid rgba(104, 217, 208, .3); border-radius: 5px; background: rgba(5, 20, 27, .84); backdrop-filter: blur(8px); scrollbar-color: rgba(104, 217, 208, .45) transparent; }.room-participant-panel[hidden] { display: none; }.room-participant-panel > span { margin-bottom: 2px; color: var(--muted); font-family: "DM Mono", monospace; font-size: .56rem; letter-spacing: .08em; }.room-participant-choice { min-height: 36px; padding: 0 10px; overflow: hidden; border: 1px solid rgba(104, 217, 208, .22); border-radius: 3px; color: var(--ink); background: rgba(5, 20, 27, .48); cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-size: .72rem; text-align: left; text-overflow: ellipsis; white-space: nowrap; }.room-participant-choice:hover, .room-participant-choice.is-selected { border-color: var(--aqua); color: var(--aqua); background: rgba(104, 217, 208, .1); }.room-participant-choice.is-filled::after { float: right; color: var(--lime); content: "登録済"; font-family: "DM Mono", monospace; font-size: .55rem; }
.battle-heading { max-width: 700px; }.battle-heading h1 { margin-bottom: 12px; }.battle-heading > p:last-child { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.battle-entry { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }.battle-entry-choice { position: relative; display: grid; min-height: 230px; padding: 26px; overflow: hidden; border: 1px solid rgba(104, 217, 208, .35); border-radius: 7px; color: var(--ink); background: rgba(7, 24, 32, .72); cursor: pointer; text-align: left; align-content: center; transition: transform .2s, border-color .2s, background-color .2s; }.battle-entry-choice:hover { transform: translateY(-4px); }.battle-entry-choice span { color: var(--aqua); font-family: "DM Mono", monospace; font-size: .68rem; }.battle-entry-choice strong { margin-top: 12px; font-size: 1.55rem; }.battle-entry-choice small { margin-top: 7px; color: var(--muted); font-size: .78rem; }.battle-entry-choice b { position: absolute; right: 24px; bottom: 22px; color: var(--aqua); font-family: "DM Mono", monospace; font-size: 1.5rem; }.battle-entry-host { border-color: rgba(217, 245, 106, .5); background: linear-gradient(135deg, rgba(217, 245, 106, .12), transparent 62%), rgba(7, 24, 32, .72); }.battle-entry-host span, .battle-entry-host b { color: var(--lime); }.battle-entry-guest { border-color: rgba(255, 118, 93, .48); background: linear-gradient(135deg, rgba(255, 118, 93, .12), transparent 62%), rgba(7, 24, 32, .72); }.battle-entry-guest span, .battle-entry-guest b { color: #ffb38f; }
.battle-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.battle-card, .battle-room-panel, .battle-reveal-preview { border: 1px solid rgba(104, 217, 208, .28); border-radius: 7px; background: rgba(7, 24, 32, .72); box-shadow: 0 18px 38px rgba(0, 0, 0, .15); }
.battle-card { min-height: 330px; padding: 24px; }.battle-create-card { border-color: rgba(217, 245, 106, .48); }.battle-join-card { border-color: rgba(255, 118, 93, .43); }
.battle-card-title { display: flex; gap: 10px; align-items: center; }.battle-card-title span { display: grid; width: 28px; height: 28px; border: 1px solid var(--aqua); border-radius: 50%; color: var(--aqua); font-family: "DM Mono", monospace; font-size: .65rem; place-items: center; }.battle-create-card .battle-card-title span { border-color: var(--lime); color: var(--lime); }.battle-join-card .battle-card-title span { border-color: var(--accent); color: var(--accent); }.battle-card h2 { margin: 0; font-size: 1.2rem; }
.battle-form { display: grid; gap: 15px; margin-top: 26px; }.battle-form label { display: grid; gap: 7px; color: var(--muted); font-size: .72rem; }.battle-form input, .battle-form select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid rgba(104, 217, 208, .28); border-radius: 4px; outline: 0; color: var(--ink); background: rgba(16, 40, 48, .92); font-family: "Zen Kaku Gothic New", sans-serif; font-size: .92rem; }.battle-form input:focus, .battle-form select:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(104, 217, 208, .1); }
.battle-primary-button, .battle-secondary-button, .battle-quiet-button { display: flex; min-height: 48px; padding: 0 15px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-family: "Zen Kaku Gothic New", sans-serif; font-weight: 700; align-items: center; justify-content: space-between; transition: transform .18s, background-color .18s, border-color .18s; }.battle-primary-button { color: #102830; background: var(--lime); }.battle-secondary-button { color: #102830; background: #ffab91; }.battle-quiet-button { color: var(--muted); background: transparent; border-color: rgba(104, 217, 208, .28); }.battle-primary-button:hover, .battle-secondary-button:hover, .battle-quiet-button:hover { transform: translateY(-2px); }.battle-primary-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }.battle-notice { min-height: 2.8em; margin: 16px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.battle-room-panel { display: grid; grid-template-columns: 1.25fr .9fr; gap: 20px; margin-top: 18px; padding: 24px; border-color: rgba(217, 245, 106, .52); background: linear-gradient(105deg, rgba(217, 245, 106, .1), transparent 48%), rgba(7, 24, 32, .88); }.battle-room-meta p { margin: 0; color: var(--lime); font-family: "DM Mono", monospace; font-size: .64rem; letter-spacing: .12em; }.battle-room-meta h2 { margin: 8px 0; font-size: 1.65rem; }.battle-room-meta strong { color: var(--aqua); font-family: "DM Mono", monospace; font-size: .8rem; }.battle-room-stats { display: flex; gap: 22px; justify-content: flex-end; }.battle-room-stats div { display: grid; align-content: center; }.battle-room-stats span { color: var(--muted); font-size: .64rem; }.battle-room-stats strong { margin-top: 3px; color: var(--lime); font-family: "DM Mono", monospace; font-size: 1.4rem; }.battle-room-stats small { color: var(--muted); font-family: "DM Mono", monospace; font-size: .64rem; }.battle-room-actions { display: flex; grid-column: 1 / -1; gap: 10px; flex-wrap: wrap; }.battle-room-message { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .74rem; }
.battle-flow { display: flex; grid-column: 1 / -1; gap: 0; margin: 4px 0; padding: 0; list-style: none; }.battle-flow li { position: relative; display: grid; flex: 1; gap: 2px; padding: 11px 12px 11px 36px; border-top: 1px solid rgba(104, 217, 208, .18); border-bottom: 1px solid rgba(104, 217, 208, .18); opacity: .55; }.battle-flow li:first-child { border-left: 1px solid rgba(104, 217, 208, .18); }.battle-flow li:last-child { border-right: 1px solid rgba(104, 217, 208, .18); }.battle-flow li.is-current { color: var(--ink); opacity: 1; background: rgba(217, 245, 106, .08); }.battle-flow span { position: absolute; top: 12px; left: 12px; color: var(--lime); font-family: "DM Mono", monospace; font-size: .7rem; }.battle-flow strong { font-size: .76rem; }.battle-flow small { color: var(--muted); font-size: .63rem; }.battle-entry[hidden], .battle-layout[hidden], .battle-card[hidden], .battle-room-panel[hidden], .battle-reveal-preview[hidden], .battle-room-actions button[hidden] { display: none; }
.battle-reveal-preview { margin-top: 18px; padding: 22px 24px; background: rgba(255, 118, 93, .05); }.battle-reveal-preview h2 { margin: 6px 0 8px; font-size: clamp(1.35rem, 3vw, 2rem); }.battle-reveal-preview > p:not(.result-label) { margin: 0 0 18px; color: var(--muted); font-size: .78rem; }.battle-reveal-preview > div { display: flex; gap: 8px; flex-wrap: wrap; }.battle-reveal-mode { min-height: 38px; padding: 0 12px; border: 1px solid rgba(255, 118, 93, .35); border-radius: 3px; color: #ffb38f; background: transparent; cursor: pointer; font-size: .7rem; }.battle-reveal-mode.is-selected { color: #102830; background: #ffab91; }
@media (min-width: 801px) { .app-shell { padding-top: 14px; padding-bottom: 14px; }.title-view { height: calc(100dvh - 134px); min-height: 0; margin-top: 14px; padding: clamp(24px, 4vw, 48px); }.title-event { gap: 8px; padding: 20px; }.title-event h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); }.title-event > p { font-size: .76rem; }.title-event-form { margin-top: 2px; }.title-event-form input, .title-event-form button, .title-join-event, .title-create-room { min-height: 42px; }.title-menu { gap: 6px; }.title-menu button { min-height: 42px; } }
@media (min-width: 801px) { .title-event { height: 206px; min-height: 206px; overflow: visible; }.title-event:has(#titleParticipantForm:not([hidden])) { height: 270px; min-height: 270px; }.title-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }.title-create-form .title-panel-heading, .title-create-form .title-join-event, .title-create-form .title-device-participants, .title-create-form .title-participant-notice { grid-column: 1 / -1; }.title-create-form label { min-width: 0; }.title-create-form input { width: 100%; } }
@media (max-width: 720px) { .battle-entry, .battle-layout, .battle-room-panel { grid-template-columns: 1fr; }.battle-card { min-height: auto; }.battle-room-stats { grid-column: 1; justify-content: flex-start; }.battle-room-actions, .battle-room-message, .battle-flow { grid-column: 1; }.battle-flow { display: grid; grid-template-columns: 1fr; }.battle-flow li, .battle-flow li:first-child, .battle-flow li:last-child { border-right: 1px solid rgba(104, 217, 208, .18); border-left: 1px solid rgba(104, 217, 208, .18); }.battle-view { padding: 46px 20px; } }
@media (max-width: 800px) { .title-view { grid-template-columns: 1fr; grid-template-rows: auto; min-height: auto; padding: 54px 22px 26px; }.title-copy, .title-event, .title-menu { grid-column: 1; grid-row: auto; }.title-copy { margin: 0; }.title-copy h1 { font-size: clamp(4rem, 17vw, 6.4rem); }.title-event { align-self: auto; padding: 22px; }.title-menu { width: 100%; }.title-event-form { grid-template-columns: 1fr; }.title-event-form button { width: 100%; } }
@media (max-width: 800px) { .room-run-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 9px 12px; }.room-run-bar > div:first-child { grid-column: 1 / -1; }.room-run-bar label { justify-self: end; } }
/* Result archive */
.history-view { position: relative; overflow: hidden; }.history-view::before { position: absolute; top: 120px; right: -10%; width: 45%; aspect-ratio: 1; border: 1px solid rgba(104, 217, 208, .13); border-radius: 50%; box-shadow: 0 0 0 46px rgba(104, 217, 208, .025), 0 0 0 118px rgba(104, 217, 208, .018); content: ""; pointer-events: none; }
.history-list { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 12px; color: var(--muted); }
.history-card { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; min-height: 128px; overflow: hidden; border: 1px solid rgba(104, 217, 208, .24); border-radius: 6px; background: linear-gradient(135deg, rgba(18, 54, 62, .92), rgba(5, 19, 25, .92)); box-shadow: 0 14px 30px rgba(0, 0, 0, .16); transition: border-color .2s, transform .2s, background-color .2s; }
.history-card::after { position: absolute; right: 0; bottom: 0; left: 58px; height: 1px; background: linear-gradient(90deg, rgba(104, 217, 208, .7), transparent 72%); content: ""; opacity: .55; }
.history-card:hover { border-color: rgba(104, 217, 208, .7); background: linear-gradient(135deg, rgba(23, 70, 77, .94), rgba(5, 19, 25, .96)); transform: translateY(-3px); }
.history-grade { display: grid; padding: 10px 0 9px; color: var(--aqua); background: rgba(104, 217, 208, .08); font-family: "DM Mono", monospace; text-align: center; align-content: space-between; justify-items: center; }
.history-grade span, .history-score > span, .history-kicker { margin: 0; color: rgba(223, 244, 240, .5); font-family: "DM Mono", monospace; font-size: .55rem; letter-spacing: .12em; }
.history-grade strong { font-family: "DM Mono", monospace; font-size: 2.3rem; font-weight: 500; line-height: 1; }.history-grade.grade-S { color: #f8ff9e; background: rgba(217, 245, 106, .15); }.history-grade.grade-A { color: #a8fff3; background: rgba(104, 217, 208, .15); }.history-grade.grade-B { color: #9ed0e4; background: rgba(95, 150, 173, .14); }.history-grade.grade-C { color: #d4e0d8; }.history-grade.grade-D, .history-grade.grade-E, .history-grade.grade-F { color: #819699; background: rgba(4, 17, 22, .52); }
.history-copy { display: grid; min-width: 0; padding: 17px 16px; align-content: center; }.history-copy h4 { overflow: hidden; margin: 5px 0 7px; color: #f1f9f6; font-size: 1.04rem; text-overflow: ellipsis; white-space: nowrap; }.history-meta { display: flex; gap: 8px; margin: 0; color: var(--aqua); font-family: "DM Mono", monospace; font-size: .62rem; }.history-meta span + span { color: var(--muted); }.history-meta span + span::before { margin-right: 8px; color: rgba(104, 217, 208, .35); content: "/"; }
.history-score { display: grid; min-width: 88px; padding: 17px 17px 14px 0; color: var(--lime); font-family: "DM Mono", monospace; text-align: right; align-content: center; justify-items: end; }.history-score strong { margin-top: 5px; font-size: 2rem; font-weight: 500; line-height: .9; }.history-score b { margin-top: 3px; color: rgba(217, 245, 106, .65); font-size: .65rem; font-weight: 400; }
@media (max-width: 760px) { .history-list { grid-template-columns: 1fr; }.history-card { min-height: 112px; }.history-view { padding: 48px 20px; } }

.badge-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; color: var(--muted); }
.badge-card { position: relative; min-height: 162px; padding: 18px; border: 1px solid rgba(104, 217, 208, .35); border-radius: 6px; background: linear-gradient(145deg, rgba(104, 217, 208, .12), rgba(5, 20, 27, .92)); box-shadow: 0 11px 0 rgba(0, 0, 0, .2); }
.badge-card { display: grid; place-content: center; border-color: rgba(217, 245, 106, .55); text-align: center; }.badge-card span { color: var(--aqua); }.badge-card strong { margin: 10px 0 4px; color: var(--lime); font-family: "DM Mono", monospace; font-size: 1.45rem; }.badge-card p { margin: 0; font-size: .72rem; }
@media (max-width: 800px) { .result-actions { grid-column: 1; }.submission-view-stamp { top: 12px; right: 12px; font-size: 2.15rem; }.submission-thumbnail { min-height: 54px; }.submission-thumbnail.is-active { transform: translateY(-5px) scale(1.04); } }

.submission-carousel { position: relative; }
.submission-slides { min-height: 0; height: clamp(220px, 31vh, 285px); padding: 8px; border: 1px solid rgba(104, 217, 208, .23); box-shadow: inset 0 0 0 5px rgba(5, 20, 27, .58), 0 13px 0 rgba(0, 0, 0, .2); }
.submission-view-cell { min-height: 0; height: 100%; border-radius: 5px; box-shadow: 0 8px 0 rgba(0, 0, 0, .18); }
.submission-view-cell img { max-width: 70%; max-height: 70%; }
.submission-view-cell::before { top: 12px; left: 12px; }
.submission-view-stamp { top: 14px; right: 15px; min-width: 60px; font-size: 2.25rem; }
.submission-thumbnails { gap: 9px; margin-top: 16px; }
.submission-thumbnail { min-height: 58px; border-radius: 3px; background: linear-gradient(145deg, #153640, #071820); }
.submission-thumbnail::before { position: absolute; top: 5px; left: 6px; color: rgba(104, 217, 208, .58); content: "CARD"; font-family: "DM Mono", monospace; font-size: .46rem; letter-spacing: .08em; }
.submission-thumbnail.is-active { box-shadow: 0 0 0 2px rgba(217, 245, 106, .16), 0 10px 17px rgba(0, 0, 0, .34); }
.submission-slides { display: grid; padding: 0; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(104, 217, 208, .17), transparent 43%), linear-gradient(145deg, rgba(5, 20, 27, .95), rgba(12, 45, 53, .64)); perspective: 850px; touch-action: none; place-items: center; }
.submission-cube { --cube-size: 190px; --cube-half: calc(var(--cube-size) / 2); position: relative; z-index: 1; width: var(--cube-size); height: var(--cube-size); pointer-events: none; transform: rotateX(-8deg) rotateY(0deg); transform-style: preserve-3d; transition: transform .65s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.submission-cube[data-active-face="back"] { transform: rotateX(-8deg) rotateY(-180deg); }
.submission-cube[data-active-face="right"] { transform: rotateX(-8deg) rotateY(-90deg); }
.submission-cube[data-active-face="left"] { transform: rotateX(-8deg) rotateY(90deg); }
.submission-cube[data-active-face="top"] { transform: rotateX(-98deg) rotateY(0deg); }
.submission-cube.is-dragging { cursor: grabbing; transition: none; transform: rotateX(var(--drag-x)) rotateY(var(--drag-y)); }
.cube-drag-surface { position: absolute; z-index: 3; inset: 0; cursor: grab; touch-action: none; }
.cube-drag-surface:active { cursor: grabbing; }
.cube-face { position: absolute; inset: 0; display: grid; box-sizing: border-box; width: var(--cube-size); height: var(--cube-size); min-height: 0; margin: 0; padding: 0; overflow: hidden; border: 2px solid rgba(255, 255, 255, .84); border-radius: 3px; background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(217, 250, 250, .76) 48%, rgba(67, 137, 150, .92)); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .3), inset 0 0 34px rgba(104, 217, 208, .32), 0 12px 26px rgba(0, 0, 0, .34); backface-visibility: hidden; cursor: grab; place-items: center; }
.cube-attach-button { position: absolute; z-index: 4; top: 50%; left: calc(50% + 112px); display: grid; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(104, 217, 208, .62); border-radius: 4px; color: var(--aqua); background: rgba(224, 255, 255, .16); cursor: pointer; place-items: center; transform: translateY(-50%); }
.cube-attach-button:hover:not(:disabled), .cube-attach-button:focus-visible { border-color: var(--lime); color: var(--lime); background: rgba(217, 245, 106, .12); }
.cube-attach-button:disabled { cursor: not-allowed; opacity: .4; }
.cube-face::before { top: 10px; left: 10px; z-index: 2; content: attr(data-submission-slide); color: #effffb; background: rgba(4, 17, 22, .74); font-size: .55rem; text-transform: uppercase; }
.cube-face > span { position: relative; z-index: 2; width: 70%; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .62); color: #effffb; background: rgba(8, 33, 40, .68); box-shadow: 0 4px 16px rgba(0, 0, 0, .22); font-size: .7rem; text-align: center; }
.cube-face img { position: absolute; z-index: 1; max-width: 100%; max-height: 100%; width: 100%; height: 100%; pointer-events: none; object-fit: cover; user-select: none; -webkit-user-drag: none; filter: saturate(1.06) contrast(1.05); }
.cube-mesh-guide { position: absolute; z-index: 0; width: 74%; height: 74%; pointer-events: none; fill: none; stroke: rgba(104, 217, 208, .52); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; filter: drop-shadow(0 0 8px rgba(104, 217, 208, .42)); animation: cube-mesh-breathe 2.8s ease-in-out infinite; }
.cube-mesh-guide { display: none; }
.cube-face:has(img:not([hidden])) .cube-mesh-guide { opacity: 0; }
.cube-face-front { transform: translateZ(var(--cube-half)); }
.cube-face-back { transform: rotateY(180deg) translateZ(var(--cube-half)); }
.cube-face-right { transform: rotateY(90deg) translateZ(var(--cube-half)); }
.cube-face-left { transform: rotateY(-90deg) translateZ(var(--cube-half)); }
.cube-face-top { transform: rotateX(90deg) translateZ(var(--cube-half)); }
.cube-face-bottom { pointer-events: none; background: linear-gradient(145deg, rgba(123, 194, 204, .96), rgba(17, 71, 82, .98)); transform: rotateX(-90deg) translateZ(var(--cube-half)); }
.cube-face-bottom::before { display: none; }
.cube-base-mark { position: static; z-index: 1; width: auto; padding: 0; border: 0; color: rgba(255, 255, 255, .56); background: transparent; box-shadow: none; font-family: "DM Mono", monospace; font-size: .54rem; letter-spacing: .2em; }
.cube-face.is-active { border-color: #ffb15d; box-shadow: inset 0 0 0 2px rgba(255, 240, 220, .48), inset 0 0 42px rgba(255, 118, 93, .42), 0 0 12px rgba(255, 118, 93, .8), 0 0 34px rgba(255, 118, 93, .62); }
.scan-cube { --scan-cube-size: 108px; --scan-cube-half: calc(var(--scan-cube-size) / 2); position: absolute; z-index: 2; width: var(--scan-cube-size); height: var(--scan-cube-size); transform-style: preserve-3d; animation: scan-cube-spin 3.8s cubic-bezier(.32, .04, .21, 1) infinite; }
.scan-cube::before { position: absolute; inset: -26px; border: 1px solid rgba(104, 217, 208, .65); border-radius: 50%; box-shadow: 0 0 26px rgba(104, 217, 208, .38), inset 0 0 18px rgba(217, 245, 106, .16); content: ""; animation: scan-cube-pulse 1.15s ease-out infinite; }
.scan-cube::after { position: absolute; top: 50%; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: #f8ffbf; box-shadow: -82px -28px 0 -1px var(--aqua), 74px -44px 0 -1px var(--lime), 78px 35px 0 -1px #ffffff, -64px 58px 0 -1px var(--aqua), 13px -88px 0 -1px var(--lime); content: ""; animation: scan-cube-spark 1.1s steps(2, end) infinite; }
.scan-cube-face { position: absolute; inset: 0; display: block; box-sizing: border-box; width: var(--scan-cube-size); height: var(--scan-cube-size); border: 1px solid rgba(245, 255, 255, .86); background: linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(104, 217, 208, .3) 52%, rgba(8, 26, 32, .88)); box-shadow: inset 0 0 20px rgba(255, 255, 255, .24), 0 0 16px rgba(104, 217, 208, .28); backface-visibility: hidden; }
.scan-cube-front { transform: translateZ(var(--scan-cube-half)); }.scan-cube-back { transform: rotateY(180deg) translateZ(var(--scan-cube-half)); }.scan-cube-right { transform: rotateY(90deg) translateZ(var(--scan-cube-half)); }.scan-cube-left { transform: rotateY(-90deg) translateZ(var(--scan-cube-half)); }.scan-cube-top { transform: rotateX(90deg) translateZ(var(--scan-cube-half)); }.scan-cube-bottom { transform: rotateX(-90deg) translateZ(var(--scan-cube-half)); }
@keyframes scan-cube-spin { 0% { transform: rotateX(-18deg) rotateY(0deg) scale(.8); } 18% { transform: rotateX(42deg) rotateY(130deg) scale(1.02); } 48% { transform: rotateX(-145deg) rotateY(280deg) scale(.94); } 72% { transform: rotateX(68deg) rotateY(450deg) scale(1.06); } 100% { transform: rotateX(-18deg) rotateY(720deg) scale(.8); } }
@keyframes scan-cube-pulse { 0% { opacity: .9; transform: scale(.45); } 72%, 100% { opacity: 0; transform: scale(1.36); } }
@keyframes scan-cube-spark { 0%, 100% { opacity: .15; transform: translate(-50%, -50%) scale(.4); } 42% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } }
@keyframes cube-mesh-breathe { 50% { opacity: .42; transform: scale(.94); } }
.submission-slides::after { top: 50%; left: 50%; z-index: 0; width: 270px; height: 90px; border: 0; border-radius: 50%; background: radial-gradient(ellipse, rgba(104, 217, 208, .24), transparent 68%); content: ""; transform: translate(-50%, 78%) rotateX(72deg); }
@media (max-width: 800px) { .submission-cube { --cube-size: 155px; } .cube-attach-button { left: calc(50% + 92px); width: 40px; height: 40px; } .submission-slides::after { width: 230px; } }
.submission-guide { position: absolute; z-index: 10; inset: 4px 0 auto; display: grid; gap: 9px; width: min(100%, 430px); margin: auto; padding: 19px 22px 16px; border: 1px solid var(--lime); border-radius: 5px; color: #eff5e8; background: rgba(5, 20, 27, .96); box-shadow: 0 16px 38px rgba(0, 0, 0, .44); animation: guide-arrive .36s cubic-bezier(.2, .9, .25, 1) both; }
.submission-guide[hidden] { display: none; }
.submission-guide p { margin: 0; color: var(--aqua); font-family: "DM Mono", monospace; font-size: .62rem; letter-spacing: .12em; }
.submission-guide strong { font-size: 1.24rem; line-height: 1.42; }.submission-guide span { color: var(--muted); font-size: .75rem; line-height: 1.5; }.submission-guide b { color: var(--lime); }
.submission-guide button { justify-self: end; min-height: 32px; padding: 0 12px; border: 1px solid var(--lime); border-radius: 3px; color: #071820; background: var(--lime); font-size: .72rem; }
@keyframes guide-arrive { from { opacity: 0; transform: translateY(-18px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 800px) { .submission-slides { height: clamp(205px, 35vh, 250px); }.submission-thumbnail { min-height: 48px; }.submission-guide { inset: 3px 0 auto; width: calc(100% - 14px); } }

/* === MULTI PLAYER AND SLIDE ANIMATION STYLES === */
@keyframes slide-to-next {
  0% { transform: translateX(0); opacity: 1; filter: blur(0); }
  45% { transform: translateX(-120%); opacity: 0; filter: blur(4px); }
  50% { transform: translateX(120%); opacity: 0; filter: blur(4px); }
  100% { transform: translateX(0); opacity: 1; filter: blur(0); }
}
.slide-transition-active {
  animation: slide-to-next 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.player-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(104, 217, 208, 0.3);
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  background: rgba(16, 40, 48, 0.5);
  transition: all 0.2s;
  cursor: pointer;
}
.player-badge.is-active {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(217, 245, 106, 0.1);
}
.player-badge.is-filled {
  border-color: var(--aqua);
  color: var(--aqua);
  background: rgba(104, 217, 208, 0.05);
}

.next-player-button:hover:not(:disabled) {
  background: rgba(104, 217, 208, 0.15) !important;
  color: var(--lime) !important;
  border-color: var(--lime) !important;
}
.next-player-button:disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
  border-color: rgba(104, 217, 208, 0.15) !important;
  color: var(--muted) !important;
}

/* 複数人ランキング */
.multi-player-rankings {
  min-height: 480px;
}
.winner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--lime);
  border-radius: 8px;
  background: rgba(217, 245, 106, 0.08);
  box-shadow: 0 0 25px rgba(217, 245, 106, 0.15);
  margin-bottom: 12px;
  animation: winner-glow 1.5s ease-in-out infinite alternate;
}
@keyframes winner-glow {
  from { box-shadow: 0 0 15px rgba(217, 245, 106, 0.1); border-color: rgba(217, 245, 106, 0.7); }
  to { box-shadow: 0 0 28px rgba(217, 245, 106, 0.3); border-color: var(--lime); }
}
.winner-crown {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 4px;
  animation: crown-bounce 0.8s ease-in-out infinite alternate;
}
@keyframes crown-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(104, 217, 208, 0.25);
  border-radius: 6px;
  background: rgba(16, 40, 48, 0.4);
  cursor: pointer;
  transition: all 0.25s;
}
.rank-item:hover {
  border-color: var(--aqua);
  background: rgba(104, 217, 208, 0.08);
  transform: translateX(4px);
}
.rank-item.is-selected {
  border-color: var(--lime);
  background: rgba(217, 245, 106, 0.05);
  box-shadow: inset 0 0 8px rgba(217, 245, 106, 0.06);
}
.rank-number {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  width: 24px;
  color: var(--muted);
}
.rank-number.first { color: var(--lime); font-size: 1.4rem; }
.rank-number.second { color: var(--aqua); }
.rank-number.third { color: var(--accent); }

.rank-avatar {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(104, 217, 208, 0.3);
}
.rank-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rank-name {
  font-size: 0.82rem;
  font-weight: bold;
  color: var(--ink);
}
.rank-score {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
}
.rank-grade-badge {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--muted);
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--muted);
}
.rank-grade-badge.S { border-color: var(--lime); color: var(--lime); background: rgba(217, 245, 106, 0.1); }
.rank-grade-badge.A { border-color: var(--aqua); color: var(--aqua); }
.rank-grade-badge.B { border-color: var(--aqua); color: var(--aqua); opacity: 0.8; }
.rank-grade-badge.C { border-color: var(--ink); color: var(--ink); }

.submission-mission { color: #dff4f0; font-size: .78rem; font-weight: 500; }
.cube-input-face::before { display: none; }
.cube-input-face > span { z-index: 0; width: auto; padding: 8px 12px; border-color: rgba(255, 255, 255, .38); color: rgba(239, 255, 251, .9); background: rgba(8, 33, 40, .52); font-family: "DM Mono", monospace; font-size: 1.16rem; letter-spacing: .14em; pointer-events: none; user-select: none; -webkit-user-select: none; }
.cube-face > span { pointer-events: none; user-select: none; -webkit-user-select: none; }
.submission-slides, .submission-slides * { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.app-shell, .app-shell * { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.app-shell input, .app-shell textarea, .app-shell select, .app-shell [contenteditable="true"] { user-select: text; -webkit-user-select: text; }
.submission-status-cube { --status-cube-size: 46px; --status-cube-half: calc(var(--status-cube-size) / 2); position: absolute; z-index: 6; top: 12px; left: 12px; width: var(--status-cube-size); height: var(--status-cube-size); pointer-events: none; transform-style: preserve-3d; animation: submission-status-spin 8s linear infinite; }
.status-cube-face { position: absolute; inset: 0; display: block; box-sizing: border-box; width: var(--status-cube-size); height: var(--status-cube-size); border: 1px solid rgba(220, 242, 242, .35); background: linear-gradient(145deg, rgba(70, 92, 99, .92), rgba(16, 33, 41, .96)); box-shadow: inset 0 0 9px rgba(255, 255, 255, .08), 0 0 8px rgba(0, 0, 0, .25); backface-visibility: hidden; transition: background .3s, border-color .3s, box-shadow .3s; }
.status-cube-face.is-filled { border-color: rgba(104, 217, 208, .9); background: linear-gradient(145deg, #a8fff3, #3bb7b4 58%, #13636f); box-shadow: inset 0 0 11px rgba(255, 255, 255, .5), 0 0 10px rgba(104, 217, 208, .42); }
.status-cube-face.is-active { border-color: #ffd2a8; background: linear-gradient(145deg, #fff0dc, #ff9b62 58%, #b6382e); box-shadow: inset 0 0 11px rgba(255, 255, 255, .62), 0 0 16px rgba(255, 118, 93, .86); }
.status-cube-front { transform: translateZ(var(--status-cube-half)); }.status-cube-back { transform: rotateY(180deg) translateZ(var(--status-cube-half)); }.status-cube-right { transform: rotateY(90deg) translateZ(var(--status-cube-half)); }.status-cube-left { transform: rotateY(-90deg) translateZ(var(--status-cube-half)); }.status-cube-top { transform: rotateX(90deg) translateZ(var(--status-cube-half)); }.status-cube-bottom { transform: rotateX(-90deg) translateZ(var(--status-cube-half)); }
@keyframes submission-status-spin { from { transform: rotateX(-22deg) rotateY(0deg); } to { transform: rotateX(338deg) rotateY(360deg); } }
@media (max-width: 800px) { .submission-status-cube { top: 10px; left: 10px; transform: scale(.86); transform-origin: top left; } }

.app-shell.is-result .result-badges { position: relative; z-index: 1; display: grid; grid-column: 1 / -1; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0; padding-bottom: 2px; }
.app-shell.is-result .result-badges > p { margin: 0; color: var(--aqua); font-family: "DM Mono", monospace; font-size: .57rem; letter-spacing: .12em; writing-mode: vertical-rl; transform: rotate(180deg); }
.app-shell.is-result .badge-list { display: flex; gap: 7px; min-width: 0; max-width: 100%; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.app-shell.is-result .badge-card { display: grid; flex: 0 0 84px; min-height: 58px; padding: 6px 7px; border: 1px solid rgba(104, 217, 208, .24); border-radius: 4px; color: var(--muted); background: rgba(4, 17, 22, .5); box-shadow: none; text-align: center; place-items: center; align-content: center; }
.app-shell.is-result .badge-card.is-unlocked { border-color: rgba(217, 245, 106, .78); color: var(--lime); background: rgba(217, 245, 106, .08); box-shadow: inset 0 0 14px rgba(217, 245, 106, .08), 0 0 10px rgba(217, 245, 106, .1); }
.app-shell.is-result .badge-symbol { display: grid; width: 20px; height: 20px; margin-bottom: 3px; border: 1px solid currentColor; border-radius: 50%; font-family: "DM Mono", monospace; font-size: .66rem; place-items: center; }
.app-shell.is-result .badge-card strong { overflow: hidden; width: 100%; color: currentColor; font-family: "DM Mono", monospace; font-size: .58rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.app-shell.is-result .badge-card small { margin-top: 2px; color: currentColor; font-family: "DM Mono", monospace; font-size: .5rem; opacity: .7; }
@media (max-width: 800px) { .app-shell.is-result .result-badges { grid-template-columns: 32px minmax(0, 1fr); gap: 6px; }.app-shell.is-result .badge-card { flex-basis: 74px; } }

.app-shell.is-result .result-artwork-stage { position: absolute; z-index: 0; inset: 0 auto 0 0; display: block; width: 50%; min-height: 0; margin: 0; overflow: hidden; pointer-events: none; background: transparent; }
.app-shell.is-result .result-artwork-stage[hidden] { display: none; }
.app-shell.is-result .result-artwork { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(1.08) contrast(1.03); animation: result-art-in .65s cubic-bezier(.2, .8, .2, 1) both; }
.app-shell.is-result .result-artwork-stage::after { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(9, 29, 37, .46), transparent 32%, rgba(9, 29, 37, .98) 100%), linear-gradient(180deg, rgba(9, 29, 37, .55), transparent 28%, rgba(9, 29, 37, .88) 100%); content: ""; }
.app-shell.is-result .result-artwork-stage figcaption { display: none; }
@media (max-width: 800px) { .app-shell.is-result .result-artwork-stage { width: 58%; } }

/* Immersive submission stage */
.student-view .workspace { max-width: 1180px; }
.student-view .image-panel { position: relative; overflow: hidden; }
.student-view .submission-carousel { position: relative; height: min(720px, calc(100dvh - 150px)); min-height: 580px; padding: 0; overflow: hidden; border: 1px solid rgba(104, 217, 208, .3); border-radius: 8px; background: #071820; isolation: isolate; }
.student-view .submission-slides { --stage-cube-size: clamp(192px, 25vw, 300px); position: absolute; inset: 0; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.student-view .cube-zoom-stage { --cube-scale: 1; position: relative; z-index: 1; width: var(--stage-cube-size); height: var(--stage-cube-size); transform: scale(var(--cube-scale)); transform-style: preserve-3d; transition: transform .14s ease-out; }
.student-view .submission-cube { --cube-size: var(--stage-cube-size); }
.cube-animal-guide, .reconstructed-3d-canvas { position: absolute; z-index: 3; inset: 12%; width: 76%; height: 76%; transform: translateY(-16px); pointer-events: none; background: transparent; opacity: .78; filter: drop-shadow(0 0 12px rgba(104, 217, 208, .48)); mix-blend-mode: screen; }
.cube-animal-guide[hidden], .reconstructed-3d-canvas[hidden] { display: none; }
.student-view .cube-attach-button { left: calc(50% + (var(--stage-cube-size) / 2) + 18px); top: calc(50% - 28px); transform: translateY(-50%); display: flex; width: auto; min-width: 116px; height: 46px; gap: 8px; padding: 0 12px; color: #eafffb; background: rgba(5, 20, 27, .82); box-shadow: 0 0 0 1px rgba(104, 217, 208, .18), 0 10px 24px rgba(0, 0, 0, .25); font-family: "DM Mono", monospace; font-size: .68rem; letter-spacing: .06em; align-items: center; justify-content: center; }
.student-view .cube-attach-button svg { flex: 0 0 auto; color: var(--lime); }
.student-view .cube-attach-button:hover:not(:disabled), .student-view .cube-attach-button:focus-visible { color: #102830; background: var(--lime); box-shadow: 0 0 22px rgba(217, 245, 106, .3); }
.student-view .cube-attach-button:hover:not(:disabled) svg, .student-view .cube-attach-button:focus-visible svg { color: #102830; }

.student-view .cube-scan-mode-button { position: absolute; z-index: 4; left: calc(50% + (var(--stage-cube-size) / 2) + 18px); top: calc(50% + 28px); transform: translateY(-50%); display: flex; width: auto; min-width: 116px; height: 46px; gap: 8px; padding: 0 12px; color: #eafffb; background: rgba(5, 20, 27, .82); border: 1px solid rgba(104, 217, 208, .3); border-radius: 4px; box-shadow: 0 0 0 1px rgba(104, 217, 208, .18), 0 10px 24px rgba(0, 0, 0, .25); font-family: "DM Mono", monospace; font-size: .68rem; letter-spacing: .06em; align-items: center; justify-content: center; cursor: pointer; }
.student-view .cube-scan-mode-button svg { flex: 0 0 auto; color: var(--aqua); }
.student-view .cube-scan-mode-button:hover:not(:disabled), .student-view .cube-scan-mode-button:focus-visible { color: #102830; background: var(--aqua); box-shadow: 0 0 22px rgba(104, 217, 208, .4); border-color: var(--aqua); }
.student-view .cube-scan-mode-button:hover:not(:disabled) svg, .student-view .cube-scan-mode-button:focus-visible svg { color: #102830; }

@keyframes arSweep {
  0% { top: 0%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.student-view .submission-progress { position: absolute; z-index: 7; top: 22px; right: 24px; left: 24px; margin: 0; padding: 0 0 10px; border-bottom: 1px solid rgba(104, 217, 208, .25); pointer-events: none; }
.student-view .submission-mission { position: absolute; z-index: 7; top: 62px; right: 24px; left: 24px; margin: 0; color: #e2f7f2; text-align: center; pointer-events: none; }
.student-view .submission-thumbnails { position: absolute; z-index: 7; bottom: 22px; left: 24px; width: min(360px, calc(100% - 310px)); margin: 0; }
.student-view .submission-thumbnail { min-height: 50px; background: rgba(5, 20, 27, .72); backdrop-filter: blur(8px); }
.student-view .slide-controls { position: absolute; z-index: 7; bottom: 90px; left: 24px; width: min(360px, calc(100% - 310px)); margin: 0; pointer-events: none; }
.student-view .slide-controls button { pointer-events: auto; }
.student-view .judge-button { position: absolute; z-index: 7; right: 24px; bottom: 22px; width: 230px; min-height: 52px; margin: 0; }
.student-view .next-player-button { position: absolute; z-index: 7; right: 24px; bottom: 86px; width: 230px !important; margin: 0 !important; padding: 9px 12px !important; background: rgba(5, 20, 27, .78) !important; backdrop-filter: blur(8px); }
@media (max-width: 800px) { .student-view .workspace { max-width: none; }.student-view .submission-carousel { height: calc(100dvh - 112px); min-height: 500px; }.student-view .submission-slides { --stage-cube-size: clamp(148px, 43vw, 218px); }.student-view .cube-attach-button { left: calc(50% + (var(--stage-cube-size) / 2) + 10px); top: calc(50% - (var(--stage-cube-size) / 2) + 10px); min-width: 108px; height: 40px; font-size: .62rem; }
.student-view .cube-scan-mode-button { left: calc(50% + (var(--stage-cube-size) / 2) + 10px); top: calc(50% - (var(--stage-cube-size) / 2) + 56px); min-width: 108px; height: 40px; font-size: .62rem; position: absolute; z-index: 4; display: flex; gap: 8px; padding: 0 12px; color: #eafffb; background: rgba(5, 20, 27, .82); border: 1px solid rgba(104, 217, 208, .3); border-radius: 4px; box-shadow: 0 0 0 1px rgba(104, 217, 208, .18), 0 10px 24px rgba(0, 0, 0, .25); font-family: "DM Mono", monospace; letter-spacing: .06em; align-items: center; justify-content: center; cursor: pointer; }
.student-view .cube-scan-mode-button svg { flex: 0 0 auto; color: var(--aqua); }
.student-view .cube-scan-mode-button:hover:not(:disabled), .student-view .cube-scan-mode-button:focus-visible { color: #102830; background: var(--aqua); box-shadow: 0 0 22px rgba(104, 217, 208, .4); border-color: var(--aqua); }
.student-view .cube-scan-mode-button:hover:not(:disabled) svg, .student-view .cube-scan-mode-button:focus-visible svg { color: #102830; }
.student-view .submission-progress { top: 14px; right: 16px; left: 16px; }.student-view .submission-mission { top: 50px; right: 16px; left: 16px; font-size: .68rem; }.student-view .submission-thumbnails { right: 16px; bottom: 82px; left: 16px; width: auto; }.student-view .slide-controls { bottom: 22px; left: 16px; width: 110px; }.student-view .judge-button { right: 16px; bottom: 18px; width: min(54%, 220px); min-height: 42px; }.student-view .next-player-button { right: 16px; bottom: 68px; width: min(54%, 220px) !important; font-size: .66rem !important; } }

@media (max-width: 800px) {
  .app-shell.is-result .workspace { max-width: none; }
  .app-shell.is-result .workspace > .result-panel { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto auto auto auto; gap: 12px; min-height: 0; padding: 18px 16px 96px; border-radius: 6px; }
  .app-shell.is-result .result-artwork-stage { position: relative; z-index: 0; grid-row: 1; width: 100%; height: 164px; min-height: 0; margin: -18px -16px 0; overflow: hidden; }
  .app-shell.is-result .result-artwork { object-position: center 42%; filter: saturate(1.05) contrast(1.02); }
  .app-shell.is-result .result-artwork-stage::after { background: linear-gradient(180deg, rgba(9, 29, 37, .16), rgba(9, 29, 37, .95) 100%), linear-gradient(90deg, rgba(9, 29, 37, .25), transparent 28%, rgba(9, 29, 37, .48)); }
  .app-shell.is-result .result-panel > .panel-number { grid-column: 1; grid-row: 2; margin: 0; font-size: .62rem; }
  .app-shell.is-result .result-badges { grid-column: 1; grid-row: 3; grid-template-columns: 28px minmax(0, 1fr); gap: 6px; padding: 0; }
  .app-shell.is-result .result-badges > p { font-size: .5rem; }
  .app-shell.is-result .badge-list { gap: 6px; }
  .app-shell.is-result .badge-card { flex-basis: 70px; min-height: 50px; padding: 4px; }
  .app-shell.is-result .badge-symbol { width: 17px; height: 17px; margin-bottom: 1px; font-size: .56rem; }
  .app-shell.is-result .status-row { grid-column: 1; grid-row: 4; min-height: 18px; margin: 0; font-size: .67rem; }
  .app-shell.is-result .score-block { grid-column: 1; grid-row: 5; min-height: 124px; padding: 16px !important; border-radius: 5px !important; }
  .app-shell.is-result .score-value { font-size: clamp(4.1rem, 20vw, 5.4rem) !important; }
  .app-shell.is-result .gravity-gauge-wrapper { width: 78px !important; height: 78px !important; }
  .app-shell.is-result .grade-value { width: 48px !important; height: 48px !important; line-height: 44px !important; font-size: 1.2rem !important; }
  .app-shell.is-result .analysis-radar { grid-column: 1; grid-row: 6; grid-template-columns: 132px minmax(0, 1fr); min-height: 146px; padding: 8px; border-radius: 5px; }
  .app-shell.is-result .analysis-radar canvas { max-width: 126px; margin-top: 16px; }
  .app-shell.is-result .analysis-radar > .result-label { top: 8px; left: 9px; font-size: .55rem; }
  .app-shell.is-result .match-metrics { padding-top: 14px; }
  .app-shell.is-result .match-metrics div { padding: 5px 0; }
  .app-shell.is-result .match-metrics dt, .app-shell.is-result .match-metrics dd { font-size: .58rem; }
  .app-shell.is-result .result-details { grid-column: 1; grid-row: 7; grid-template-columns: 1fr 1fr; gap: 0 14px; align-self: start; }
  .app-shell.is-result .result-details div { gap: 7px; padding: 7px 0; }
  .app-shell.is-result .result-details dt, .app-shell.is-result .result-details dd { font-size: .61rem; }
  .app-shell.is-result .judgment-reason { grid-column: 1; grid-row: 8; margin: 0; padding: 10px 11px; border-radius: 4px; }
  .app-shell.is-result .judgment-reason p, .app-shell.is-result .judgment-reason output { font-size: .64rem; line-height: 1.5; }
  .app-shell.is-result .result-actions { position: absolute !important; z-index: 5 !important; right: 16px; bottom: 14px; left: 16px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; }
  .app-shell.is-result .result-actions button { min-height: 38px; margin: 0; padding: 0 7px; font-size: .58rem; }
}

@media (max-width: 800px) {
  .app-shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .site-header {
    min-height: 48px !important;
    height: 48px !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 0 8px !important;
  }
  .site-header .wordmark { padding: 0 !important; font-size: .82rem; letter-spacing: .08em; }
  .site-header > div {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }
  .site-header > div > div:first-child {
    flex: 0 0 auto;
    gap: 0 !important;
    padding: 2px !important;
  }
  .site-header > div > div:first-child span { display: none; }
  .site-header > div > div:first-child button {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    justify-content: center;
  }
  .site-header > div > div:first-child div { display: none; }
  .site-header > div > div:last-child { gap: 2px !important; }
  .site-header .view-tab { width: 34px !important; height: 34px !important; }
  .site-header .view-tab svg { width: 17px; height: 17px; }
}

/* Camera guide in the submission stage */
.submission-slides > #cameraScannerOverlay {
  position: absolute !important;
  z-index: 20 !important;
  inset: 0 !important;
  display: none;
  gap: 8px !important;
  padding: 14px !important;
  overflow: auto !important;
  background: rgba(4, 20, 26, .96) !important;
  align-items: center !important;
  justify-content: center !important;
}
.submission-slides > #cameraScannerOverlay > div:first-child {
  max-width: 380px;
  padding-bottom: 8px !important;
}
.submission-slides > #cameraScannerOverlay > div:first-child > div:last-child { display: none; }
.submission-slides > #cameraScannerOverlay > div:nth-of-type(2) {
  width: min(76vw, 300px) !important;
  max-width: 300px !important;
  flex: 0 0 auto;
}
.submission-slides > #cameraScannerOverlay > p { font-size: .68rem !important; }
.submission-slides > #cameraScannerOverlay > div:nth-of-type(3) { gap: 6px !important; }
.submission-slides > #cameraScannerOverlay > div:nth-of-type(4) { gap: 6px !important; }
.submission-slides > #cameraScannerOverlay .scan-step-dot { min-width: 38px !important; height: 28px !important; }

@media (max-width: 800px) {
  .submission-slides > #cameraScannerOverlay { padding: 10px !important; }
  .submission-slides > #cameraScannerOverlay > div:first-child { width: min(100%, 300px); }
  .submission-slides > #cameraScannerOverlay > div:nth-of-type(2) { width: min(72vw, 250px) !important; }
  .submission-slides > #cameraScannerOverlay > p { max-width: 280px; }
}

/* The camera guide is applied to the active cube face. */
.student-view .cube-zoom-stage:has(#cameraScannerOverlay[style*="flex"]) > .cube-animal-guide,
.student-view .submission-slides:has(#cameraScannerOverlay[style*="flex"]) > .cube-attach-button,
.student-view .submission-slides:has(#cameraScannerOverlay[style*="flex"]) > .cube-scan-mode-button { display: none; }

.student-view .cube-zoom-stage > #cameraScannerOverlay {
  position: absolute !important;
  z-index: 20 !important;
  inset: 0 !important;
  display: none;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}
.student-view .cube-zoom-stage > #cameraScannerOverlay > div:first-child {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
  width: auto !important;
  padding: 0 !important;
  border: 0 !important;
}
.student-view .cube-zoom-stage > #cameraScannerOverlay > div:first-child span,
.student-view .cube-zoom-stage > #cameraScannerOverlay > div:first-child > div:last-child { display: none; }
.student-view .cube-zoom-stage > #cameraScannerOverlay > div:first-child h2 {
  padding: 5px 8px;
  border: 1px solid rgba(217, 245, 106, .58);
  border-radius: 3px;
  color: var(--lime) !important;
  background: rgba(4, 20, 26, .78);
  font-size: .7rem !important;
  text-shadow: none !important;
}
.student-view .cube-zoom-stage > #cameraScannerOverlay > div:nth-of-type(2) {
  position: absolute;
  inset: 0;
  width: 100% !important;
  max-width: none !important;
  height: 100%;
  border-radius: 5px !important;
}
.student-view .cube-zoom-stage > #cameraScannerOverlay > p { display: none; }
.student-view .cube-zoom-stage > #cameraScannerOverlay > div:nth-of-type(3) {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: min(100%, 220px) !important;
  transform: translateX(-50%);
}
.student-view .cube-zoom-stage > #cameraScannerOverlay > div:nth-of-type(3) > div { width: 100% !important; }
.student-view .cube-zoom-stage > #cameraScannerOverlay #closeScannerBtn { display: none; }
.student-view .cube-zoom-stage > #cameraScannerOverlay #snapPhotoBtn { flex: 1 !important; min-height: 42px !important; }
.student-view .cube-zoom-stage > #cameraScannerOverlay > div:nth-of-type(4) {
  position: absolute;
  top: calc(100% + 62px);
  left: 50%;
  width: max-content;
  transform: translateX(-50%);
  gap: 5px !important;
}
.student-view .cube-zoom-stage > #cameraScannerOverlay .scan-step-dot {
  min-width: 32px !important;
  height: 27px !important;
  font-size: .66rem;
}

@media (max-width: 800px) {
  .student-view .cube-zoom-stage > #cameraScannerOverlay > div:nth-of-type(3) { top: calc(100% + 9px); }
  .student-view .cube-zoom-stage > #cameraScannerOverlay > div:nth-of-type(4) { top: calc(100% + 56px); }
}

.student-view .submission-cube.is-camera-guide { pointer-events: none; }
.student-view .submission-cube.is-camera-guide .cube-face { overflow: visible; }
.student-view .submission-cube.is-camera-guide .cube-face:not(:has(#cameraScannerOverlay)) { opacity: .72; }
.student-view .submission-cube.is-camera-guide #cameraScannerOverlay {
  position: absolute !important;
  z-index: 10 !important;
  inset: 0 !important;
  display: none;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  pointer-events: auto !important;
}
.student-view .submission-cube.is-camera-guide #cameraScannerOverlay > div:first-child {
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 8px;
  width: auto !important;
  padding: 0 !important;
  border: 0 !important;
}
.student-view .submission-cube.is-camera-guide #cameraScannerOverlay > div:first-child span,
.student-view .submission-cube.is-camera-guide #cameraScannerOverlay > div:first-child > div:last-child,
.student-view .submission-cube.is-camera-guide #cameraScannerOverlay > p,
.student-view .submission-cube.is-camera-guide #closeScannerBtn { display: none; }
.student-view .submission-cube.is-camera-guide #cameraScannerOverlay > div:first-child h2 {
  padding: 4px 6px;
  border: 1px solid rgba(217, 245, 106, .58);
  border-radius: 3px;
  color: var(--lime) !important;
  background: rgba(4, 20, 26, .78);
  font-size: .62rem !important;
  text-shadow: none !important;
}
.student-view .submission-cube.is-camera-guide #cameraScannerOverlay > div:nth-of-type(2) {
  position: absolute;
  inset: 0;
  width: 100% !important;
  max-width: none !important;
  height: 100%;
  border-radius: 3px !important;
}
.student-view .submission-cube.is-camera-guide #cameraScannerOverlay > div:nth-of-type(3) {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: min(100%, 220px) !important;
  transform: translateX(-50%);
}
.student-view .submission-cube.is-camera-guide #cameraScannerOverlay > div:nth-of-type(3) > div { width: 100% !important; }
.student-view .submission-cube.is-camera-guide #snapPhotoBtn { flex: 1 !important; min-height: 42px !important; }
.student-view .submission-slides:has(.submission-cube.is-camera-guide) > .cube-drag-surface { z-index: 2; }
.student-view .submission-cube.is-camera-guide { z-index: 4; }
