:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f7f9fc;
  background: #000000;
  --surface: #161b21;
  --raised: #232b34;
  --muted: #bdc7d2;
  --accent: #8de5eb;
  --line: #39444f;
}
* { box-sizing: border-box; }
html, body { width: 600px; height: 600px; margin: 0; overflow: hidden; background: #000000; }
body { -webkit-font-smoothing: antialiased; }
button { font: inherit; }
#app { position: relative; width: 600px; height: 600px; padding: 24px; }
#app.card-view { padding: 8px; }
#app.card-view #review { position: relative; width: 584px; height: 584px; gap: 0; }
/* Black emits no light on the glasses, leaving the world visible behind card text. */
.review-card.focusable { position: relative; display: flex; flex: 1; width: 100%; height: 100%; min-height: 0; padding: 8px; border: 0; border-radius: 4px; background: #000000; font-size: inherit; font-weight: normal; text-align: left; cursor: pointer; box-shadow: none; }
.review-card.focusable:focus { background: #000000; box-shadow: none; }
.review-card.focusable:active { background: #000000; }
.review-card .card-host { height: 100%; background: #000000; }
.review-card.show-info .card-host,.review-card.show-audio .card-host { visibility: hidden; }
.review-audio { position: absolute; inset: 8px; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 16px; background: #000000; cursor: default; }
.review-audio[hidden] { display: none; }
.review-audio h2 { margin: 0; font-size: 32px; }
.review-audio-status { min-height: 56px; font-size: 24px; line-height: 1.35; }
.review-audio button { min-height: 88px; font-size: 24px; }
.review-audio .review-info-return { white-space: pre-line; }
.review-info { position: absolute; inset: 8px; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 16px; background: #000000; cursor: default; }
.review-info[hidden] { display: none; }
.review-info-heading { display: flex; flex-direction: column; gap: 8px; }
.review-info h2 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 650; }
.remaining-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.remaining-count { display: flex; flex-direction: column; gap: 7px; padding: 12px 8px; border-top: 3px solid; }
.remaining-count.new { --count-color: #8bc0f2; border-color: var(--count-color); }
.remaining-count.learning { --count-color: #ff8f8f; border-color: var(--count-color); }
.remaining-count.review { --count-color: #9cdd9c; border-color: var(--count-color); }
.remaining-count dt { font-size: 19px; font-weight: 400; color: var(--muted); }
.remaining-count dd { margin: 0; font-size: 38px; line-height: 1; font-weight: 400; overflow-wrap: anywhere; }
.remaining-count.current { background: var(--count-color); }
.remaining-count.current dt, .remaining-count.current dd { color: #101820; }
.remaining-count.current dt { font-weight: 700; }
.review-info-ratings { display: flex; flex-direction: column; gap: 14px; }
.interval-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.interval-tile { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; background: transparent; }
.interval-icon { display: grid; place-items: center; width: 80px; height: 80px; font-size: 64px; line-height: 1; }
.interval-label { font-size: 21px; font-weight: 600; }
.interval-time { font-size: 24px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.interval-gesture { margin-top: 3px; font-size: 15px; color: var(--muted); }
.interval-tile.again .interval-icon { color: #ecac9e; }
.interval-tile.good .interval-icon { color: #8de5eb; font-size: 48px; }
.interval-tile.easy .interval-icon { color: #b7b3ee; }
.interval-tile.unavailable .interval-time { font-size: 17px; color: var(--muted); }
.review-info-return { margin: 0; color: var(--muted); text-align: center; font-size: 18px; }
.review-page { position: absolute; bottom: 22px; z-index: 3; padding: 2px 5px; border-radius: 4px; font-size: 20px; line-height: 24px; background: #000000; color: var(--muted); pointer-events: none; }
.review-page { right: 5px; }
.review-notice { position: absolute; bottom: 8px; left: 8px; right: 8px; padding: 12px; border: 1px solid #8c7653; border-radius: 8px; background: #25231e; font-size: 18px; line-height: 1.35; pointer-events: none; }
.review-notice[hidden],.review-page[hidden] { display: none; }
.rating-confirmation { position: absolute; top: 8px; right: 8px; width: 72px; height: 72px; display: grid; place-items: center; z-index: 5; background: transparent; border: 0; font-size: 54px; line-height: 1; font-weight: 700; pointer-events: none; user-select: none; opacity: 0; animation: rating-confirmation-fade 575ms linear forwards; }
.rating-confirmation.again { color: #ff6b6b; font-size: 66px; }
.rating-confirmation.good { color: #77e39b; }
.rating-confirmation.easy { color: #7bb7ff; }
.rating-confirmation.undo { color: #ffa94d; font-size: 64px; }
/* Fade in for 60 ms, hold until half a second, then fade out for 75 ms. */
@keyframes rating-confirmation-fade {
  0%, 100% { opacity: 0; }
  10.435%, 86.957% { opacity: 1; }
}
@keyframes rating-confirmation-still {
  from { opacity: 1; }
  to { opacity: 0; }
}
.screen { height: 552px; display: flex; flex-direction: column; gap: 12px; }
.screen[hidden] { display: none; }
.header { height: 60px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #12171d; border-radius: 14px; padding: 0 16px; }
.wordmark { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mark { width: 24px; height: 27px; border: 2px solid var(--accent); border-radius: 6px; transform: rotate(-8deg); box-shadow: 5px 2px 0 -2px #12171d, 6px 2px 0 0 var(--accent); flex-shrink: 0; }
h1 { font-size: 28px; font-weight: 650; letter-spacing: -.8px; margin: 0; }
.status { white-space: nowrap; color: var(--muted); font-size: 14px; font-weight: 650; letter-spacing: 1px; }
.status.demo { color: #ffdb95; }
.status.live { color: var(--accent); }
.eyebrow { color: var(--accent); font-size: 14px; letter-spacing: 1.7px; text-transform: uppercase; font-weight: 650; }
.hero { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding: 4px 16px; gap: 12px; }
.hero h2 { font-size: 36px; line-height: 1.12; font-weight: 580; letter-spacing: -1.3px; margin: 0; }
.hero p, .info p { color: var(--muted); font-size: 18px; line-height: 1.4; margin: 0; }
.actions { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; flex-shrink: 0; }
.row > button { flex: 1; min-width: 0; }
.focusable { position: relative; min-height: 88px; height: 88px; flex-shrink: 0; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: #f7f9fc; cursor: pointer; font-size: 22px; font-weight: 550; text-align: center; padding: 10px 12px; outline: none; transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease; }
.focusable .button-content { position: relative; opacity: .86; }
.focusable:focus { border-color: #8de5eb; background: #253740; box-shadow: 0 0 0 2px #000000, 0 0 0 4px #8de5eb; }
.focusable:focus .button-content { opacity: 1; }
.focusable:active { background: #35505a; }
.focusable.primary { background: #233c42; border-color: #648e94; }
.focusable:disabled { cursor: default; color: #aeb8c3; border-color: #2e3740; background: #151b21; }
.focusable:disabled .button-content { opacity: .65; }
.focusable .secondary { display: block; font-size: 15px; color: var(--muted); font-weight: 450; line-height: 1.25; margin-top: 4px; }
.button-leading { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 12px 18px; }
.button-leading .chevron { color: var(--accent); font-size: 30px; font-weight: 350; }
.body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 6px; }
.section-heading h2 { font-size: 23px; font-weight: 600; margin: 0; }
.section-heading span { color: var(--muted); font-size: 15px; }
.deck-list { flex: 1; min-height: 382px; display: grid; grid-template-rows: repeat(4, minmax(88px, 1fr)); gap: 10px; }
.sync-notice { margin: 0; padding: 0 6px; font-size: 14px; line-height: 1.35; color: var(--accent); }
.sync-notice.warning { color: #ffdb95; }
.hero .sync-notice { padding: 0; font-size: 15px; }
.deck { width: 100%; height: 100%; }
.deck .button-content { flex: 1; min-width: 0; }
.deck-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.deck-expand { flex: 0 0 24px; color: var(--accent); font-size: 28px; line-height: 1; font-weight: 650; text-align: center; }
.deck-name { display: -webkit-box; flex: 1; min-width: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-height: 50px; overflow: hidden; overflow-wrap: anywhere; font-size: 20px; line-height: 1.25; }
.deck-trail { font-size: 14px; line-height: 1.2; color: var(--muted); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.deck-trail + .deck-name { -webkit-line-clamp: 1; }
.deck-counts { display: flex; align-items: center; flex-shrink: 0; white-space: nowrap; pointer-events: none; }
.deck-count { display: inline-flex; align-items: center; }
.deck-count-divider { margin: 0 3px; color: var(--muted); font-size: 20px; line-height: 1; font-weight: 400; }
.deck-count-value { font-size: 24px; line-height: 1.1; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.deck-count.new { color: #8bc0f2; }
.deck-count.learning { color: #ff8f8f; }
.deck-count.review { color: #9cdd9c; }
.card-panel { min-height: 0; flex: 1; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 15px 18px; }
.card-meta { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-height: 23px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.card-deck { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 310px; }
.card-face { text-transform: uppercase; letter-spacing: 1.2px; font-weight: 650; color: var(--accent); }
.card-host { display: block; width: 100%; min-height: 0; flex: 1; }
.card-caption { color: var(--muted); font-size: 14px; margin-top: 7px; min-height: 18px; display: flex; justify-content: space-between; gap: 12px; }
.card-caption span:last-child { white-space: nowrap; }
.ratings { gap: 8px; }
.ratings button { font-size: 20px; padding: 8px 3px; }
.ratings button .secondary { font-size: 16px; }
.ratings .again { border-top-color: #ecac9e; }
.ratings .hard { border-top-color: #e4c787; }
.ratings .good { border-top-color: #8de5eb; }
.ratings .easy { border-top-color: #b7b3ee; }
.review-nav button { font-size: 20px; }
.info { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.info h2 { font-size: 24px; margin: 0; font-weight: 600; }
.info.compact { padding: 14px 16px; gap: 8px; }
.info.compact p { font-size: 16px; }
.size-options { gap: 8px; }
.size-options button { font-size: 24px; }
.size-options button[aria-pressed="true"] { border-color: var(--accent); background: #233c42; }
.footer-hint { color: var(--muted); font-size: 15px; text-align: center; }
.error-copy { max-height: 124px; overflow: hidden; overflow-wrap: anywhere; }
/* Full-canvas black hides the previous screen and emits no light on the glasses. */
.busy { position: absolute; inset: 0; border-radius: 0; background: #000000; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: #f7f9fc; font-size: 26px; }
.busy .eyebrow { font-size: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  .focusable { transition: none; }
  .rating-confirmation { animation: rating-confirmation-still 500ms step-end forwards; }
}
/* Pairing requires no text entry on the glasses. */
.pairing-body { flex: 1; padding: 16px 0; }
.pairing-body h2 { font-size: 32px; margin: 0 0 16px; }
.pairing-body p { font-size: 22px; line-height: 1.4; margin: 12px 0; }
.pairing-code { color: #7bdcde; font-size: 64px; letter-spacing: 5px; font-weight: 700; text-align: center; margin: 24px 0; font-variant-numeric: tabular-nums; }
.pairing-status { color: #b6c8d3; }
