/* bSmart — bold, playful, neo-brutalist (hard outlines + offset shadows), in the spirit of Gumroad. */
:root {
  --ink: #000;
  --bg: #f4f4f0;
  --paper: #fff;
  --pink: #ff90e8;
  --yellow: #ffc900;
  --teal: #23a094;
  --blue: #90a8ed;
  --mint: #b8f2dc;
  --coral: #ff9f8a;
  --mut: #4b4b4b;
  --radius: 16px;
  --shadow: 6px 6px 0 var(--ink);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 ui-rounded, "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg) radial-gradient(#00000022 1px, transparent 1.2px) 0 0 / 22px 22px;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
b, strong { font-weight: 800; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
button, input, select { font: inherit; color: inherit; }
kbd { border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); padding: 0 .35em; font-size: .78em; font-weight: 700; }
.hint { margin: 0; color: var(--mut); font-size: .85rem; }
.lbl { display: flex; align-items: baseline; gap: 8px; }
.note { font-weight: 500; color: var(--mut); font-size: .8rem; }

/* ---------- header ---------- */
.top { max-width: 1120px; margin: 0 auto; padding: 18px 20px 6px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.7rem; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; }
.logo { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; background: var(--pink); border: 3px solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-6deg); font-size: 1.4rem; }
.stats, .mini-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.sticker { display: inline-flex; align-items: center; gap: .4em; border: 2px solid var(--ink); border-radius: 999px; padding: .1em .75em; font-weight: 700; font-size: .9rem; box-shadow: 2px 2px 0 var(--ink); background: var(--paper); }
.sticker:nth-child(odd) { transform: rotate(-1.5deg); }
.sticker:nth-child(even) { transform: rotate(1.2deg); }
.s-yellow { background: var(--yellow); } .s-pink { background: var(--pink); } .s-teal { background: var(--teal); color: #fff; } .s-teal b { color: #fff; }

/* ---------- home ---------- */
.home { max-width: 1120px; margin: 0 auto; padding: 18px 20px 24px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.hero { min-width: 0; }
.kicker { display: inline-block; margin: 0 0 14px; padding: .2em .8em; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: .9rem; transform: rotate(-1deg); }
.hero h1 { font-size: clamp(2.7rem, 8vw, 5.2rem); font-weight: 900; line-height: .95; letter-spacing: -0.045em; }
.hero mark { background: var(--pink); color: var(--ink); padding: 0 .14em; border: 3px solid var(--ink); border-radius: 12px; box-decoration-break: clone; -webkit-box-decoration-break: clone; display: inline-block; transform: rotate(-1.5deg); margin-top: .1em; box-shadow: 5px 5px 0 var(--ink); }
.lede { max-width: 34em; margin: 22px 0 26px; font-size: 1.15rem; color: #222; }

.card { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.big-label { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .9rem; }
.grid2 { display: grid; grid-template-columns: 1fr 120px; gap: 14px; }
.check, .toggle { display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 600; }
input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 1.5rem; height: 1.5rem; margin: 0; border: 2px solid var(--ink); border-radius: 7px; background: var(--paper); display: grid; place-items: center; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
input[type=checkbox]:checked { background: var(--teal); }
input[type=checkbox]:checked::after { content: "✓"; color: #fff; font-weight: 900; font-size: 1rem; line-height: 1; }
input[type=checkbox]:disabled { opacity: .5; cursor: default; }

input:not([type=checkbox]), select {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); padding: .65em .85em; min-width: 0;
}
input:not([type=checkbox]):focus, select:focus, .btn:focus-visible, .opt:focus-visible, .chip:focus-visible, .link:focus-visible {
  outline: none; box-shadow: 4px 4px 0 var(--pink), 0 0 0 3px var(--ink);
}
.big-input { font-size: 1.5rem !important; font-weight: 700; padding: .55em .8em !important; border-radius: 14px !important; }
::placeholder { color: #8a8a8a; font-weight: 500; }

#topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#topic-chips:empty { display: none; }
.chip { cursor: pointer; border: 2px solid var(--ink); border-radius: 999px; padding: .2em .8em; font-size: .85rem; font-weight: 700; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.chip:nth-child(4n+1) { background: var(--yellow); } .chip:nth-child(4n+2) { background: var(--pink); } .chip:nth-child(4n+3) { background: var(--mint); } .chip:nth-child(4n) { background: var(--blue); }
.chip:hover { transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 3px 3px 0 var(--ink); }

/* ---------- buttons ---------- */
.btn, .opt {
  cursor: pointer; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper);
  padding: .6em 1.1em; font-weight: 800; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s;
}
.btn:hover:not(:disabled), .opt:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active:not(:disabled), .opt:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { cursor: default; opacity: .55; }
.primary { background: var(--pink); }
.xl { width: 100%; font-size: 1.25rem; padding: .85em 1.2em; border-radius: 14px; }
.small { padding: .3em .75em; font-size: .85rem; box-shadow: 3px 3px 0 var(--ink); border-radius: 10px; }
.ghost { background: transparent; }
.link { border: 0; background: none; padding: 4px 0; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; cursor: pointer; }
.link:hover { background: var(--yellow); }

/* ---------- voice bar (moves between home and the quiz modal) ---------- */
.voicebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; background: #fff0fb; border: 2px dashed var(--ink); border-radius: 14px; }
.voicebar select { padding: .3em .6em; font-weight: 600; font-size: .9rem; max-width: 11rem; }
.tempo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; }
#voice-slot-modal:empty { display: none; }
#voice-slot-modal .voicebar { background: transparent; border-style: solid; border-width: 2px; margin-top: 12px; }

/* ---------- side widgets ---------- */
.side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
.widget { border: 2px solid var(--ink); border-radius: 14px; padding: 14px 16px; box-shadow: 4px 4px 0 var(--ink); display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.widget h3 { font-size: 1rem; font-weight: 900; }
.widget p { margin: 0; }
.w-blue { background: #e4eaff; } .w-yellow { background: #fff1b8; }
.bulk-row { display: flex; gap: 8px; align-items: center; }
.bulk-row select { padding: .3em .5em; }
.progress { height: 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar { height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--teal) 0 10px, #1b8579 10px 20px); transition: width .3s; }

#diag { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px; color: var(--mut); font-size: .8rem; }
#diag summary { cursor: pointer; font-weight: 700; }
#log { white-space: pre-wrap; word-break: break-word; user-select: all; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 10px; font: .75rem/1.4 ui-monospace, Menlo, monospace; }

/* ---------- focus-mode quiz modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto; overscroll-behavior: contain;
  background: var(--pink) radial-gradient(#00000026 1.2px, transparent 1.5px) 0 0 / 24px 24px;
  display: flex; justify-content: center; align-items: flex-start;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  animation: fadeIn .18s ease-out;
}
.sheet {
  width: min(780px, 100%); margin: auto 0; background: var(--paper); border: 3px solid var(--ink); border-radius: 26px;
  box-shadow: 10px 10px 0 var(--ink); padding: 18px 22px 26px; animation: rise .22s cubic-bezier(.2, .9, .3, 1.2);
}
.sheet-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: .15em .8em; font-weight: 800; font-size: .85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-top .ghost { margin-left: auto; }
.sheet-body { padding-top: 12px; }
#qtext { font-size: clamp(1.55rem, 4.4vw, 2.6rem); font-weight: 900; line-height: 1.12; letter-spacing: -0.03em; margin: 14px 0 8px; text-wrap: balance; }
.speak-row { display: flex; align-items: center; gap: 10px; min-height: 1.6rem; margin-bottom: 16px; }

#options { display: grid; gap: 12px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; font-size: 1.15rem; font-weight: 700; padding: 14px 16px; border-radius: 16px; position: relative; }
.opt b { flex: none; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 10px; font-weight: 900; background: var(--pink); }
.opt:nth-child(2) b { background: var(--yellow); } .opt:nth-child(3) b { background: var(--mint); } .opt:nth-child(4) b { background: var(--blue); }
.opt:disabled { cursor: default; }
.opt:disabled:not(.right):not(.wrong) { opacity: .5; box-shadow: 2px 2px 0 var(--ink); }
.opt.right { background: var(--mint); animation: pop .35s ease-out; }
.opt.right::after { content: "✓"; margin-left: auto; font-size: 1.6rem; font-weight: 900; }
.opt.wrong { background: var(--coral); animation: shake .4s; }
.opt.wrong::after { content: "✗"; margin-left: auto; font-size: 1.6rem; font-weight: 900; }

#feedback { margin-top: 16px; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 14px; font-weight: 600; animation: pop .3s ease-out; }
#feedback.ok { background: var(--mint); } #feedback.bad { background: #ffd9cf; }
#feedback strong { display: block; font-size: 1.25rem; font-weight: 900; margin-bottom: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 18px; }
.actions .primary { width: auto; flex: 1 1 240px; }
.card-stage .actions .primary { font-size: 1.05rem; padding: .85em .9em; white-space: nowrap; }
.keys { margin-top: 18px; }

/* ---------- confetti (correct answers) ---------- */
.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: 38%; left: 50%; width: 10px; height: 14px; border: 2px solid var(--ink); border-radius: 3px; animation: burst 1.1s ease-out forwards; }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(24px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .confetti { display: none; } }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; gap: 24px; }
  .side { position: static; }
  #bulk { display: none !important; }   /* generating a bank is a desktop job */
}
@media (max-width: 560px) {
  .top { padding-top: 14px; }
  .card { padding: 18px; }
  .grid2 { grid-template-columns: 1fr 96px; }
  .modal { padding: 0; }
  .sheet { margin: 0; min-height: 100%; border-radius: 0; border-width: 0; box-shadow: none; padding: max(14px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom)); }
  .opt { font-size: 1.05rem; padding: 12px 14px; }
}

/* language switch */
.langswitch { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; box-shadow: 2px 2px 0 var(--ink); background: var(--paper); }
.lang { border: 0; background: transparent; padding: .1em .7em; font-weight: 800; font-size: .85rem; cursor: pointer; }
.lang + .lang { border-left: 2px solid var(--ink); }
.lang[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- accounts, Plus, gallery, players ---------- */
.s-blue { background: var(--blue); }
button.sticker { cursor: pointer; font-family: inherit; }
button.sticker:hover { transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 3px 3px 0 var(--ink); }
.top .stats { align-items: center; }
#acct-btn { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.promo { position: fixed; z-index: 40; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(760px, calc(100% - 28px));
  padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); font-weight: 700; font-size: .95rem; animation: rise .3s ease-out; }
body:has(#promo:not([hidden])) { padding-bottom: 110px; }
body:has(#promo:not([hidden])) .toasts { bottom: 120px; }
.promo span { flex: 1 1 320px; }
.promo .x { border: 0; background: none; cursor: pointer; font-weight: 900; font-size: 1.1rem; padding: 4px 8px; }
.nudge { margin: 16px 0 0; padding: 10px 14px; background: #fff1b8; border: 2px dashed var(--ink); border-radius: 12px; font-weight: 700; font-size: .9rem; }

.grid2.wide { grid-template-columns: 1fr; }
.party { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: #e4eaff; border: 2px dashed var(--ink); border-radius: 14px; }
.party #party-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pill.turn { background: var(--blue); white-space: normal; }

/* dialogs sit above the quiz modal */
.dlg { z-index: 60; background: rgba(0, 0, 0, .45); }
.sheet.narrow { width: min(520px, 100%); }
.sheet.wide { width: min(880px, 100%); }
.sheet.plus { background: #fff8d6; }
.dlg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dlg-top h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 900; }
.dlg .sheet > * + * { margin-top: 12px; }
.lede2 { margin: 0; font-size: 1rem; color: #222; }
.err { margin: 0; padding: 8px 12px; background: #ffd9cf; border: 2px solid var(--ink); border-radius: 10px; font-weight: 700; font-size: .9rem; }
.code { text-align: center; letter-spacing: .4em; font-size: 1.8rem !important; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.stack .btn { text-align: left; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.danger { margin-top: 18px; border-top: 2px dashed var(--ink); padding-top: 12px; }
.danger summary { cursor: pointer; font-weight: 700; color: var(--mut); }
.danger .btn { margin: 8px 0; background: var(--coral); }

.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.perks li { padding: 8px 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; font-weight: 700; font-size: .95rem; }
.plans { display: grid; gap: 10px; }

/* gallery */
.levelcard { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: #e4eaff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); }
.lv-top { display: flex; align-items: center; gap: 12px; }
.lv-top > div, .player .who { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.lv-av { display: grid; place-items: center; width: 3rem; height: 3rem; font-size: 1.7rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; flex: none; }
.mini-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.progress.thin { height: 9px; }
.callout { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 14px; font-weight: 700; }
.callout span { flex: 1 1 260px; }
h3.sec { font-size: 1.15rem; font-weight: 900; margin: 20px 0 8px !important; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.badge { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 2px solid var(--ink); border-radius: 14px; background: #ececec; color: #555; }
.badge .ic { font-size: 2rem; line-height: 1; filter: grayscale(1); opacity: .6; }
.badge.got { background: var(--mint); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.badge.got:nth-child(3n+1) { background: var(--yellow); } .badge.got:nth-child(3n+2) { background: var(--pink); }
.badge.got .ic { filter: none; opacity: 1; }
.badge .hint { color: inherit; opacity: .8; }
.locked-card, .goal { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); margin-bottom: 10px; }
.locked-card { background: #fff1b8; align-items: flex-start; }
.goal.done { background: var(--mint); }
.goal .link { align-self: flex-start; font-size: .85rem; }
.goal-form { display: flex; flex-wrap: wrap; gap: 8px; }
.goal-form input { flex: 1 1 160px; }
.board-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; margin-bottom: 8px; background: var(--paper); }
.board-row .rk { width: 2rem; text-align: center; font-weight: 900; }
.board-row b { margin-left: auto; }

/* players */
.player { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); margin-bottom: 10px; flex-wrap: wrap; }
.player.active { background: var(--mint); box-shadow: 3px 3px 0 var(--ink); }
.pform { padding-top: 6px; border-top: 2px dashed var(--ink); display: flex; flex-direction: column; gap: 12px; }
.avatars { display: flex; flex-wrap: wrap; gap: 8px; }
.av { width: 2.6rem; height: 2.6rem; font-size: 1.5rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); cursor: pointer; }
.av.on { background: var(--pink); box-shadow: 3px 3px 0 var(--ink); transform: scale(1.08); }

/* toasts + footer */
.toasts { position: fixed; z-index: 80; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 520px); pointer-events: none; }
.toast { padding: 10px 16px; background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: 12px; font-weight: 700; box-shadow: 4px 4px 0 var(--pink); animation: rise .22s ease-out; text-align: center; }
.toast.badge { background: var(--yellow); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.toast.bad { background: var(--coral); color: var(--ink); }
.toast.out { opacity: 0; transition: opacity .4s; }
.foot { max-width: 1120px; margin: 0 auto; padding: 0 20px 14px; font-size: .85rem; color: var(--mut); }
.foot a, .hint a { color: inherit; font-weight: 700; }
@media (max-width: 560px) {
  .dlg { padding: 0; }
  .dlg .sheet { margin: 0; min-height: 100%; border-radius: 0; border-width: 0; box-shadow: none; }
  .promo { font-size: .85rem; }
}

/* ---------- learning cards ---------- */
.drawbtn { background: var(--yellow); }
.card-sheet { width: min(640px, 100%); }
.card-stage { padding-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.pcard { border: 3px solid var(--ink); border-radius: 22px; box-shadow: 7px 7px 0 var(--ink); background: var(--paper); padding: 18px; }
.pcard.abc { background: #ffd1f4; } .pcard.kawa { background: #fff1b8; } .pcard.question { background: #d6e0ff; }
.pcard.back { display: grid; place-items: center; align-content: center; gap: 4px; min-height: 280px; background: repeating-linear-gradient(45deg, var(--pink) 0 14px, #ffb3ee 14px 28px); cursor: pointer; transform: rotate(-2deg); font-size: 1.4rem; }
.pcard-mark { font-size: 4.5rem; }
.pcard.back.shuffle { animation: shuffle .75s ease-in-out; }
@keyframes shuffle { 0% { transform: translateX(-30px) rotate(-8deg); } 25% { transform: translateX(30px) rotate(7deg); } 50% { transform: translateX(-18px) rotate(-5deg); } 75% { transform: translateX(14px) rotate(3deg); } 100% { transform: rotate(-2deg); } }
.pcard.face { animation: flipin .45s ease-out; display: flex; flex-direction: column; gap: 12px; }
@keyframes flipin { from { transform: perspective(700px) rotateY(80deg); opacity: .2; } to { transform: none; opacity: 1; } }
.pcard-head { display: flex; align-items: center; gap: 12px; }
.pcard-head > div { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.pcard-icon { font-size: 2.2rem; }
.pcard-title { font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; }
.pcard-topic { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-how { margin: 0; font-weight: 600; }
.pcard-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.pcard.question .pcard-body, .pcard.kawa .pcard-body { grid-template-columns: 1fr; }
.abc-row { display: flex; align-items: center; gap: 8px; }
.abc-row .ltr { flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); font-weight: 900; }
.abc-row .ltr.q { border-radius: 50%; }
.abc-row input { flex: 1; padding: .4em .6em; }
.kw-row { display: flex; align-items: center; gap: 10px; }
.kw { font-weight: 900; letter-spacing: .25em; text-transform: uppercase; font-size: 1.2rem; width: 11em; }
.sentence { width: 100%; border: 2px solid var(--ink); border-radius: 12px; padding: .6em .8em; font: inherit; resize: vertical; }
.pcard-count { margin: 0; }
.pcard.done { gap: 10px; }
.fb-sec { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; }
.fb-sec p { margin: 0; }
.fb-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 4px; }
.upsell { font-weight: 700; }
.nudge.wild { background: #d6e0ff; }
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shelf .mini { padding: 12px 8px; text-align: center; border: 2px solid var(--ink); border-radius: 14px; display: flex; flex-direction: column; gap: 2px; background: #ececec; color: #555; }
.shelf .mini .ic { font-size: 1.8rem; filter: grayscale(1); opacity: .6; }
.shelf .mini.got.abc { background: #ffd1f4; } .shelf .mini.got.kawa { background: #fff1b8; } .shelf .mini.got.question { background: #d6e0ff; }
.shelf .mini.got { color: var(--ink); box-shadow: 3px 3px 0 var(--ink); } .shelf .mini.got .ic { filter: none; opacity: 1; }
@media (max-width: 560px) { .pcard-body { grid-template-columns: 1fr 1fr; } .pcard { box-shadow: 5px 5px 0 var(--ink); padding: 14px; } }
