/* Wakatta — interactive phone "mini-app" internals (screens, tab bar, overlays,
 * review, sheets). Shared by the playable demo (option-c) and the interactive
 * hero on the full page (option-a). Pairs with phone.css + option-c.js. */

.screen#app { position: relative; }

/* tab-screens sit above the tab bar; overlays cover everything */
.scr { position: absolute; left: 0; right: 0; top: 34px; bottom: 60px; background: var(--paper); overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; display: none; }
.scr::-webkit-scrollbar { display: none; }
.scr.on { display: block; animation: wk-fade .25s ease; }
.scr-pad { padding: 6px 18px 18px; }

.kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 11px; }
.scr h3.big { font-family: var(--serif); font-weight: 500; font-size: 27px; margin: 2px 0 4px; letter-spacing: -.3px; }

/* tab bar */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; z-index: 22; display: flex; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.tabbar button { flex: 1; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font-family: var(--sans); font-weight: 700; font-size: 9.5px; padding: 0; transition: color .15s; }
.tabbar button .ic { font-size: 18px; line-height: 1; }
.tabbar button.on { color: var(--shu); }

/* generic small list rows */
.row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.row .art { width: 50px; height: 50px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.row .art .ji-m { font-size: 27px; color: rgba(255,255,255,.92); }
.row .t1 { font-weight: 700; font-size: 14px; }
.row .t2 { font-size: 11.5px; color: var(--ink-3); }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; border: 0; font-family: var(--sans); }
.chip.on { background: var(--shu); color: #fff; box-shadow: none; }

/* HOME */
.greet-sm { font-size: 12px; color: var(--ink-2); }
.greet-jp { font-family: var(--jp-mincho); font-size: 30px; font-weight: 600; margin: 2px 0 0; }
.continue { margin-top: 16px; background: var(--ink); border-radius: 18px; padding: 16px; color: var(--paper); display: flex; gap: 13px; align-items: center; cursor: pointer; position: relative; overflow: hidden; }
.continue .art { width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg,#DC4A30,#b53a23); }
.continue .lab { font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--shu); }
.continue .ti { font-family: var(--jp); font-weight: 700; font-size: 15px; margin-top: 2px; }
.continue .sub { font-size: 11.5px; color: var(--ink-on-dark-2); margin-top: 2px; }
.continue .go { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; background: var(--shu); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.goalcard { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-card); padding: 15px; display: flex; align-items: center; gap: 14px; }
.ring { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: conic-gradient(var(--shu) 70%, var(--paper-deep) 0); }
.ring i { width: 38px; height: 38px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.goalcard .g1 { font-weight: 700; font-size: 13.5px; }
.goalcard .g2 { font-size: 11.5px; color: var(--ink-3); }
.banner { margin-top: 12px; background: var(--matcha-soft); border-radius: 14px; padding: 13px 15px; display: flex; align-items: center; gap: 11px; cursor: pointer; }
.banner .bic { width: 32px; height: 32px; border-radius: 9px; background: var(--matcha); color: #fff; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
.banner .b1 { font-weight: 800; font-size: 13.5px; }
.banner .b2 { font-size: 11.5px; color: var(--ink-2); }
.banner .arr { margin-left: auto; color: var(--matcha); font-weight: 800; }
.wotd { margin-top: 12px; background: var(--surface-warm); border: 1px solid var(--line); border-radius: 16px; padding: 15px; }
.wotd .lab { font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); }
.wotd .hw { font-family: var(--jp-mincho); font-size: 26px; font-weight: 600; margin-top: 4px; }
.wotd .mn { font-family: var(--serif); font-size: 15px; color: var(--ink); margin-top: 2px; }

/* SAVED */
.wordrow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.wordrow .hw { font-family: var(--jp-mincho); font-size: 19px; font-weight: 600; }
.wordrow .rd { font-family: var(--jp); font-size: 11px; color: var(--ink-3); }
.wordrow .pos { font-size: 10.5px; color: var(--ink-2); }
.wordrow .uses { margin-left: auto; font-size: 10.5px; font-weight: 800; color: var(--ink-3); background: var(--paper-deep); border-radius: 999px; padding: 3px 9px; }
.empty { text-align: center; color: var(--ink-3); padding: 50px 20px; }
.empty .e-ic { font-size: 34px; }
.empty p { font-size: 13px; margin: 10px 0 0; line-height: 1.5; }

/* YOU */
.profile { display: flex; align-items: center; gap: 13px; margin-top: 12px; }
.profile .pic { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(155deg,#E4583E,#C13E27); display: grid; place-items: center; }
.profile .pic span { font-family: var(--jp-mincho); color: #fff; font-size: 27px; margin-top: -2px; }
.profile .pn { font-weight: 800; font-size: 16px; }
.profile .pe { font-size: 12px; color: var(--ink-3); }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.statbox { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-card); padding: 14px; }
.statbox .si { font-size: 16px; }
.statbox .sv { font-family: var(--serif); font-size: 26px; line-height: 1.1; margin-top: 6px; }
.statbox .sl { font-size: 11px; color: var(--ink-2); }
.statbox .ss { font-size: 10px; color: var(--ink-3); }

/* PLAYER + REVIEW overlays */
.overlay { position: absolute; inset: 0; z-index: 24; background: var(--paper); display: none; }
.overlay.on { display: block; animation: wk-sheet .34s cubic-bezier(.22,1,.36,1); }

/* reading toggles in player */
.rtoggles { display: flex; gap: 7px; padding: 2px 16px 4px; }
.rtoggles button { border: 0; cursor: pointer; font-family: var(--sans); font-weight: 700; font-size: 11.5px; border-radius: 999px; padding: 5px 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); }
.rtoggles button.on { background: var(--shu-soft); color: var(--shu-deep); box-shadow: inset 0 0 0 1px var(--shu-soft); }
/* romaji rendering toggle */
#app.show-romaji ruby.tap::after { content: attr(data-romaji); display: block; font-family: var(--sans); font-size: 9.5px; color: var(--ink-3); text-align: center; margin-top: 1px; }

/* REVIEW flashcard */
.rv-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px 4px; }
.rv-top .x { font-size: 18px; color: var(--ink-2); cursor: pointer; }
.rv-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--paper-deep); overflow: hidden; }
.rv-bar > i { display: block; height: 100%; background: var(--matcha); transition: width .3s ease; }
.rv-count { font-size: 11px; font-weight: 800; color: var(--ink-2); }
.rv-card { margin: 18px 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-card); padding: 26px 18px; text-align: center; }
.rv-card .rd { font-family: var(--jp); font-size: 12px; color: var(--ink-3); }
.rv-card .hw { font-family: var(--jp-mincho); font-size: 46px; font-weight: 600; margin: 4px 0; }
.rv-card .play-mini { width: 44px; height: 44px; border-radius: 50%; background: var(--shu); color: #fff; display: inline-grid; place-items: center; font-size: 16px; margin: 8px 0; box-shadow: 0 6px 16px var(--shu-glow); cursor: pointer; }
.rv-card .divider { width: 44px; height: 1px; background: var(--line); margin: 12px auto; }
.rv-card .mn { font-family: var(--serif); font-size: 19px; }
.rv-card .pos { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.rv-reveal { margin: 16px; display: flex; justify-content: center; }
.rv-reveal button { border: 0; cursor: pointer; background: var(--ink); color: var(--paper); font-family: var(--sans); font-weight: 700; font-size: 14px; border-radius: 999px; padding: 13px 26px; }
.rv-grades { display: none; gap: 6px; margin: 16px; }
.rv-grades.on { display: flex; }
.rv-grades button { flex: 1; border: 0; cursor: pointer; background: var(--surface); box-shadow: var(--shadow-card); border-radius: 12px; padding: 12px 2px; font-family: var(--sans); font-weight: 800; font-size: 12px; }
.rv-done { text-align: center; padding: 60px 24px; display: none; }
.rv-done.on { display: block; animation: wk-pop .5s cubic-bezier(.22,1,.36,1); }
.rv-done .seal { font-family: var(--jp-mincho); font-size: 70px; color: var(--shu); }
.rv-done h4 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 8px 0 0; }
.rv-done p { font-size: 13px; color: var(--ink-2); margin: 8px 0 0; }

/* small toast inside phone */
.ph-toast { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%) translateY(8px); background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 700; padding: 9px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 40; white-space: nowrap; }
.ph-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* word-lookup + moments content inside the bottom sheets */
.ph-sheet .wc-top { display: flex; align-items: baseline; gap: 10px; }
.ph-sheet .head { font-family: var(--jp-mincho); font-size: 28px; font-weight: 600; color: var(--ink); line-height: 1; }
.ph-sheet .read { font-family: var(--jp); font-size: 13px; color: var(--ink-3); }
.ph-sheet .tags { display: flex; gap: 6px; margin: 10px 0 8px; flex-wrap: wrap; }
.ph-sheet .tag { font-size: 10.5px; font-weight: 800; letter-spacing: .3px; border-radius: 999px; padding: 3px 9px; }
.ph-sheet .tag.pos { background: var(--shu-soft); color: var(--shu-deep); }
.ph-sheet .tag.jlpt { background: var(--ai-soft); color: var(--ai); }
.ph-sheet .gloss { font-family: var(--serif); font-size: 16px; color: var(--ink); line-height: 1.45; margin: 2px 0 0; }
.ph-sheet .ctx { font-size: 11.5px; color: var(--ink-2); line-height: 1.5; margin-top: 9px; }
.ph-sheet .ctx .spark { color: var(--ai); font-weight: 700; }
.ph-sheet .save { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 13px; background: var(--shu); color: #fff; border-radius: 12px; padding: 11px; font-weight: 800; font-size: 14px; box-shadow: 0 6px 16px var(--shu-glow); cursor: pointer; }
.ph-sheet .save.saved { background: var(--matcha); box-shadow: none; }
.ph-sheet .lost { display: inline-flex; align-items: center; gap: 6px; background: var(--shu-soft); color: var(--shu-deep); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 12px; cursor: pointer; }
.ph-sheet .explain { display: inline-flex; align-items: center; gap: 5px; color: var(--ai); font-weight: 700; font-size: 12px; cursor: pointer; }
