.memo-page { --memo-ink: #eff8ff; --memo-accent: #d6ff7f; background: #0b111b; color: var(--memo-ink); }
.memo-intro { padding: 48px 0 30px; position: relative; }
.memo-intro .eyebrow, .memo-rankings .eyebrow { color: #94bac7; }
.memo-intro h1 { font-size: clamp(38px, 5.5vw, 72px); line-height: 1.05; letter-spacing: -.055em; margin: 14px 0; }
.memo-intro h1 span { color: var(--memo-accent); }
.memo-intro h1 i { display: inline-block; font-style: normal; color: #6df5ed; transform: rotate(-12deg); margin-left: .2em; }
.memo-intro > p { color: #a6b0bf; font-size: clamp(16px, 2vw, 20px); }
.memo-steps { display: flex; gap: 12px 36px; flex-wrap: wrap; margin-top: 30px; }
.memo-steps > span { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.memo-steps b { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #405568; color: #6df5ed; border-radius: 50%; background: #162231; }
.memo-arena:is(.game-layout,.game-fullscreen-active) { background: #101722; color: var(--memo-ink); --fullscreen-ratio: 1; }
.memo-arena .cta { background: var(--memo-accent); color: #102019; }
.memo-arena button:focus-visible, .memo-arena canvas:focus-visible { outline: 3px solid #6df5ed; outline-offset: -3px; }
.memo-arena .memo-hud > div { color: var(--memo-ink) !important; }
.memo-arena .memo-hud strong { color: inherit; }
.memo-arena .memo-hud #phase { font-size: clamp(13px, 2.5vw, 22px) !important; white-space: normal; }
.memo-stage { display: flex; gap: 12px; justify-content: center; padding: 6px 0; }
.memo-stage figure { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: stretch; margin: 0; }
.memo-stage figure[hidden] { display: none; }
.memo-stage figcaption { text-align: center; font-size: 12px; font-weight: 700; line-height: 20px; flex: 0 0 20px; }
.memo-paper { flex: 1 1 0; min-height: 0; container-type: size; position: relative; display: grid; place-items: center; }
.memo-paper canvas { display: block; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); background: #f5f7fa; box-shadow: 0 0 0 1px #405568, 0 12px 28px #0005; border-radius: 7px; touch-action: none; }
#drawing { cursor: crosshair; }
#ready-art { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; text-align: center; }
#ready-art[hidden] { display: none; }
#ready-art > span { color: #1c5d63; font-size: clamp(60px, 14vmin, 150px); line-height: 1; }
#ready-art b { color: #42566b; font-size: clamp(12px, 2vmin, 18px); }
.memo-tools { gap: 8px; }
.memo-tools button { color: var(--memo-ink); background: #1b2a3a; border: 1px solid #405568; border-radius: 8px; padding: 8px 10px; min-height: 40px; font: inherit; font-size: 12px; cursor: pointer; }
.memo-tools #check { background: var(--memo-accent); border-color: var(--memo-accent); color: #102019; font-weight: 800; }
.memo-tools #check[hidden] { display: none !important; }
.memo-tools button:disabled { opacity: .5; }
.memo-tools #outcome { display: flex; align-items: baseline; gap: 8px; color: var(--memo-accent); }
.memo-tools #outcome[hidden] { display: none; }
#score { font-size: clamp(24px, 5vw, 38px); line-height: 1; letter-spacing: -.05em; }
.memo-arena[data-phase="compare"] .memo-tools > button { display: none; }
.memo-arena #score { white-space: nowrap; }
#game-status { flex: 0 0 auto; margin: 0; padding: 2px 4px; text-align: center; font-size: 12px; line-height: 1.25; min-height: 18px; color: #b2c6d1; }
.memo-arena #finish { color: var(--memo-ink); }
.memo-arena #finish:not([hidden]) { background: #172b35; }
.memo-arena #guest-access { color: #bcf593; font-size: 12px; flex: 0 1 auto; overflow-wrap: anywhere; }
.memo-arena #save-status { display: block !important; color: #c9dce6; font-size: 12px; margin: 0; }
.memo-rankings { margin: 48px auto 64px; max-width: 780px; }
.memo-rankings h2 { font-size: clamp(30px, 5vw, 52px); line-height: 1.1; letter-spacing: -.04em; }
.memo-rankings ol { list-style: none; padding: 0; }
.memo-rankings li { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #2e3d4b; padding: 14px 4px; }
.memo-rankings li > span { overflow-wrap: anywhere; }
.memo-rankings li strong { margin-left: auto; white-space: nowrap; color: var(--memo-accent); }
@media (max-width: 600px) and (orientation: portrait) {
  .memo-arena[data-phase="compare"] .memo-stage { flex-direction: column; gap: 5px; }
  .memo-intro { padding-top: 30px; }
}
@media (max-height: 440px) and (orientation: landscape) {
  .memo-stage figcaption { font-size: 10px; line-height: 14px; flex-basis: 14px; }
  .memo-arena #game-status, .memo-arena #save-status { font-size: 10px; }
  .memo-arena #score { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .memo-page * { scroll-behavior: auto !important; } }
