/* ===== Sofie's Sparkle Quest v2 styles ===== */
.choose-text { white-space: pre-line; }
.btn.small { font-size: 15px; padding: 7px 14px; box-shadow: 0 3px 0 var(--maroon); }
.linkish { background: none; color: var(--maroon); text-decoration: underline; font-size: 14px; margin-top: 6px; }

/* ---------- fractions ---------- */
.rich { line-height: 1.45; }
.frac-wrap { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; margin: 0 2px; }
.frac-w { font-weight: 700; font-size: 1.1em; }
.frac { display: inline-flex; flex-direction: column; align-items: center; font-size: .82em; font-weight: 700; line-height: 1.05; vertical-align: middle; }
.frac .fn { border-bottom: 2px solid currentColor; padding: 0 3px; }
.frac .fd { padding: 0 3px; }
.frac-bars { width: 100%; max-width: 320px; display: block; margin: 6px auto 0; }

/* ---------- question view ---------- */
.qview { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.q-prompt { font-size: 20px; font-weight: 600; text-align: center; color: var(--ink); background: #fff; border-radius: 16px; padding: 12px 14px; border: 3px solid #e3d3f0; }
.q-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-choices.long { grid-template-columns: 1fr; }
.q-choice { background: #fff; border: 3px solid var(--maroon); border-radius: 16px; padding: 12px 10px; font-size: 19px; font-weight: 600; box-shadow: 0 3px 0 var(--maroon); min-height: 54px; }
.q-choices.long .q-choice { font-size: 16px; text-align: left; }
.q-choice:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--maroon); }
.q-choice.right { background: #b4f0c0; }
.q-choice.wrong { background: #ffd0d8; opacity: .55; animation: shake .35s; }
.q-choice.gone { opacity: .25; text-decoration: line-through; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.shake { animation: shake .35s; }
.q-feedback { min-height: 26px; text-align: center; font-weight: 700; font-size: 18px; }
.q-feedback.good { color: #1f9e6e; }
.q-feedback.bad { color: #c2306a; }
.q-explain { font-weight: 500; font-size: 15px; color: var(--ink); margin-top: 4px; }
.q-free { font-size: 14px; color: var(--maroon); }
.q-hints { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hint-btn { font-size: 15px; padding: 7px 14px; display: inline-flex; gap: 8px; align-items: center; background: #fff3a6; }
.hint-cost { font-size: 13px; background: #fff; border-radius: 999px; padding: 1px 8px; border: 2px solid var(--maroon); }
.hint-out { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.hint-card { background: #fffbe0; border: 2px dashed #ffc83d; border-radius: 14px; padding: 8px 12px; font-size: 15px; }

/* fraction / number pad */
.q-pad { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pad-disp { display: flex; align-items: center; gap: 10px; justify-content: center; }
.pad-frac { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pad-line { width: 64px; height: 4px; background: var(--maroon); border-radius: 2px; }
.pad-box { min-width: 64px; height: 46px; border-radius: 12px; border: 3px solid #c9b0ff; background: #fff; font-size: 26px; font-weight: 700; color: var(--ink); position: relative; }
.pad-box:empty::before { content: attr(data-ph); font-size: 12px; font-weight: 500; color: #b9a6d6; }
.pad-box.whole { min-width: 56px; height: 60px; }
.pad-box.focus { border-color: var(--hot); box-shadow: 0 0 0 4px #ffc6e1; }
.pad-keys { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; }
.pad-key { height: 48px; border-radius: 14px; background: #fff; border: 3px solid var(--maroon); font-size: 22px; font-weight: 700; box-shadow: 0 3px 0 var(--maroon); }
.pad-key.ok { background: linear-gradient(180deg, #ffa8d4, var(--hot)); color: #fff; }
.pad-key.wide { grid-column: 1 / -1; font-size: 18px; }
.pad-tip { font-size: 13px; opacity: .75; text-align: center; }

/* spelling keyboard */
.q-spell { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; position: relative; }
.spell-top { display: flex; gap: 10px; }
.spell-typed { min-height: 48px; min-width: 70%; text-align: center; font-size: 30px; font-weight: 700; letter-spacing: 4px; background: #fff; border: 3px solid #c9b0ff; border-radius: 14px; padding: 2px 10px; text-transform: lowercase; }
.spell-typed.empty { color: #ddd; }
.spell-reveal { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--maroon); color: #fff; font-size: 28px; font-weight: 700; padding: 6px 18px; border-radius: 14px; z-index: 2; animation: fadein .2s; }
.kb { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 460px; }
.kb-row { display: flex; gap: 4px; justify-content: center; }
.kb-key { flex: 1; max-width: 42px; height: 46px; border-radius: 10px; background: #fff; border: 2px solid var(--maroon); font-size: 20px; font-weight: 700; box-shadow: 0 2px 0 var(--maroon); padding: 0; }
.kb-key.wide { max-width: 56px; flex: 1.4; }
.kb-key.ok { max-width: none; flex: none; padding: 0 28px; background: linear-gradient(180deg, #ffa8d4, var(--hot)); color: #fff; }

/* quiz pop-up */
.quiz-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(42, 22, 80, .55); display: flex; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 10px) 12px calc(var(--safe-b) + 10px); opacity: 0; transition: opacity .2s; }
.quiz-wrap.show { opacity: 1; }
.quiz-card { width: 100%; max-width: 520px; max-height: 100%; overflow-y: auto; background: linear-gradient(170deg, #fff7fb, #f3ecff); border: 4px solid var(--maroon); border-radius: 24px; padding: 14px; box-shadow: 0 6px 0 var(--maroon); display: flex; flex-direction: column; gap: 10px; animation: popin .25s; }
.quiz-head { display: flex; align-items: center; gap: 10px; }
.quiz-portrait { width: 58px; height: 58px; border-radius: 16px; border: 3px solid var(--maroon); background: #fff; object-fit: cover; }
.quiz-title { font-weight: 700; font-size: 20px; color: var(--maroon); }
.quiz-sub { font-size: 14px; opacity: .8; }
.quiz-frame { font-size: 16px; background: #ffe3f3; border-radius: 14px; padding: 8px 12px; }

/* ---------- minigame chrome ---------- */
#game { gap: 0; }
.g-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.g-status { margin: 0; }
.g-tools:empty { display: none; }
.g-tools .hint-btn { padding: 4px 12px; font-size: 14px; }
.g-hint-out { max-height: 16vh; overflow-y: auto; margin-bottom: 6px; }
.g-hint-out:empty { display: none; }
.g-hint-out .hint-card { font-size: 14px; padding: 6px 10px; }
.g-stars { display: flex; gap: 6px; font-size: 46px; }
.g-star { opacity: .35; animation: starpop .5s backwards; }
.g-star.on { opacity: 1; }
@keyframes starpop { from { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3); } }
.g-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.g-banner .btn { font-size: 17px; }
.mem-card.glow .mem-back { box-shadow: 0 0 0 4px #fff07a, 0 0 18px 6px #fff07a; }
.simon.six { grid-template-columns: repeat(3, 1fr); aspect-ratio: 3/2; }
.simon.six .simon-pad { font-size: 40px; }
.treat-bubble.two { width: 120px; right: -80px; border-radius: 40px; }
.slide-tile { position: relative; }
.slide-tile.sel { outline: 4px solid #fff07a; outline-offset: -4px; transform: scale(.94); }
.slide-tile.glow { box-shadow: inset 0 0 0 4px #fff07a, 0 0 16px 4px #fff07a; z-index: 1; }
.slide-num { position: absolute; top: 3px; left: 5px; background: #fffffff0; border: 2px solid var(--maroon); color: var(--maroon); font-weight: 700; font-size: 14px; border-radius: 8px; padding: 0 5px; }
.slide-board.swap .slide-tile.home { filter: saturate(1.15); }
.slide-tip { font-size: 13px; max-width: 110px; text-align: center; margin-top: 6px; }
.quizgame { width: 100%; height: 100%; overflow-y: auto; padding: 12px; display: flex; align-items: flex-start; justify-content: center; }
.quizgame .qview { max-width: 520px; }

/* potion */
.potion { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; height: 100%; padding: 8px; overflow-y: auto; justify-content: center; }
.potion-recipe { background: #fff; border: 3px solid var(--maroon); border-radius: 16px; padding: 8px 14px; text-align: center; font-size: 18px; font-weight: 600; }
.potion-title { font-size: 14px; color: var(--maroon); }
.potion-row { display: flex; gap: 16px; align-items: flex-end; justify-content: center; }
.potion-pot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.potion-glass { position: relative; width: 110px; height: min(26vh, 190px); border: 4px solid var(--maroon); border-radius: 18px 18px 40px 40px; background: rgba(255, 255, 255, .55); overflow: hidden; }
.potion-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(180deg, #ff9fe0, #b48cff); transition: height .35s cubic-bezier(.3, 1.4, .5, 1); }
.potion-line { position: absolute; left: -4px; right: -4px; height: 0; border-top: 3px dashed #4a2040; }
.potion-line::after { content: '★ goal'; position: absolute; right: 4px; top: -20px; font-size: 12px; font-weight: 700; color: #4a2040; }
.potion-amt { background: #fff; border-radius: 12px; padding: 4px 10px; font-weight: 600; border: 2px solid var(--maroon); }
.potion-side { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.potion-shelf { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.potion-bottle { display: flex; flex-direction: column; align-items: center; background: none; padding: 0; }
.potion-neck { width: 18px; height: 12px; background: #fff; border: 3px solid var(--maroon); border-bottom: none; border-radius: 4px 4px 0 0; }
.potion-body { min-width: 64px; height: 62px; border-radius: 18px; background: var(--c); border: 3px solid var(--maroon); display: grid; place-items: center; font-size: 22px; color: var(--ink); box-shadow: 0 3px 0 var(--maroon); }
.potion-bottle:active .potion-body { transform: translateY(2px); }
.potion-bottle.glow .potion-body { box-shadow: 0 0 0 4px #fff07a, 0 0 18px 6px #fff07a; }

/* match-3 */
.m3 { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 6px; }
.m3-goals { display: flex; gap: 10px; }
.m3-goal { display: flex; align-items: center; gap: 4px; background: #fff; border: 3px solid var(--maroon); border-radius: 999px; padding: 2px 12px 2px 4px; font-weight: 700; }
.m3-goal img { width: 30px; height: 30px; }
.m3-goal.done { background: #b4f0c0; }
.m3-board { display: grid; gap: 3px; width: min(94vw, 52vh, 420px); aspect-ratio: 1; background: rgba(74, 32, 64, .35); border-radius: 16px; padding: 5px; touch-action: none; }
.m3-cell { background: rgba(255, 255, 255, .3) center / 92% no-repeat; border-radius: 10px; padding: 0; transition: transform .12s; }
.m3-cell.sel { background-color: #fff07a; transform: scale(1.08); }
.m3-cell.glow { box-shadow: 0 0 0 3px #fff, 0 0 14px 4px #fff07a; }
.m3-cell.pop { animation: m3pop .26s forwards; }
@keyframes m3pop { to { transform: scale(1.4); opacity: 0; } }

/* crystal lights */
.lights-board { display: grid; gap: 8px; width: min(88vw, 50vh, 380px); aspect-ratio: 1; }
.crystal { border-radius: 18px; border: 3px solid var(--maroon); background: #3b2a5a; font-size: clamp(22px, 7vw, 38px); filter: saturate(.2) brightness(.6); transition: all .15s; padding: 0; }
.crystal.on { background: radial-gradient(circle, #fff, #c9b0ff 60%, #9f7bff); filter: none; box-shadow: 0 0 18px 4px #e6d9ff; }
.crystal.glow { outline: 4px dashed #fff07a; outline-offset: 2px; }
.lights-board.solved .crystal { animation: pulse .6s 2; }

/* scramble */
.scramble { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; padding: 10px; }
.scr-clue { background: #fff; border: 3px solid var(--maroon); border-radius: 16px; padding: 10px 14px; font-size: 18px; text-align: center; max-width: 520px; }
.scr-note { font-size: 13px; color: var(--maroon); margin-top: 4px; }
.scr-slots, .scr-tray { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.scr-slot { width: 34px; height: 44px; border-radius: 10px; border: 3px dashed #fff; background: rgba(255, 255, 255, .25); font-size: 24px; font-weight: 700; color: var(--ink); padding: 0; }
.scr-slot.full { background: #fff; border-style: solid; border-color: var(--maroon); }
.scr-slot.locked { background: #fff3a6; }
.scr-slots.good .scr-slot { background: #b4f0c0; }
.scr-slots.bad { animation: shake .35s; }
.scr-tile { width: 44px; height: 50px; border-radius: 12px; background: linear-gradient(180deg, #fff, #ffe3f3); border: 3px solid var(--maroon); font-size: 26px; font-weight: 700; box-shadow: 0 3px 0 var(--maroon); padding: 0; }
.scr-tile.used { opacity: .25; }

/* ---------- shop & style ---------- */
.shopov { z-index: 42; }
.shop-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.book-tab.text { font-size: 14px; font-weight: 700; min-width: 0; padding: 8px 6px; }
.shop-note { margin: 0 0 8px; font-size: 14px; text-align: center; opacity: .85; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; padding-bottom: 20px; }
.shop-card { background: #fff; border: 3px solid var(--maroon); border-radius: 18px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 0 var(--maroon); }
.shop-card img { width: 84px; height: 84px; }
.shop-card.poor { opacity: .55; }
.shop-card.owned { background: #e9fff0; }
.shop-card.wide { grid-column: span 2; background: linear-gradient(170deg, var(--a), var(--b)); }
.shop-emoji { font-size: 46px; }
.shop-place { font-size: 54px; }
.shop-name { font-size: 13px; font-weight: 600; text-align: center; }
.shop-card b { color: var(--maroon); }
.style-wrap { display: flex; gap: 12px; flex: 1; min-height: 0; }
.style-left { flex: none; width: 42%; max-width: 280px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.style-preview { width: 100%; max-height: 50vh; object-fit: contain; background: radial-gradient(circle at 50% 40%, #fff, #ffd6ea); border: 3px solid var(--maroon); border-radius: 24px; }
.style-left-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.style-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.style-tabs { display: flex; gap: 6px; overflow-x: auto; flex: none; padding-bottom: 4px; }
.style-tab { flex: none; background: #fff; border: 2px solid var(--maroon); border-radius: 14px; padding: 4px 10px; font-size: 13px; font-weight: 700; display: flex; flex-direction: column; align-items: center; }
.style-tab span { font-size: 20px; }
.style-tab.active { background: var(--hot); color: #fff; }
.style-buy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.style-buy:empty { display: none; }
.style-colors { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.style-colors:empty { display: none; }
.style-colors .paint-sw { width: 30px; height: 30px; }
.paint-sw.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--hot); }
.style-colors-label { font-weight: 700; font-size: 14px; }
.style-items { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; align-content: start; padding-bottom: 20px; }
.style-item { background: #fff; border: 2px dashed #c9b0ff; border-radius: 16px; padding: 4px; display: flex; flex-direction: column; align-items: center; }
.style-item img { width: 76px; height: 76px; object-fit: contain; }
.style-item.owned { border-style: solid; border-color: var(--maroon); }
.style-item.sel { box-shadow: 0 0 0 3px var(--hot); background: #ffe3f3; }
.style-swatch { width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--maroon); margin: 8px; }
.style-name { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.1; }
.style-price { font-size: 12px; color: var(--maroon); font-weight: 700; }
@media (max-width: 560px) {
  .style-wrap { flex-direction: column; }
  .style-left { width: 100%; max-width: none; flex-direction: row; justify-content: center; }
  .style-preview { width: auto; height: 26vh; }
  .style-left-btns { flex-direction: column; }
}

/* ---------- sanctuary ---------- */
#sanct-place { cursor: pointer; font-family: inherit; color: inherit; }
.shop-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.shop-tab { background: #fff; border: 3px solid var(--maroon); border-radius: 999px; padding: 4px 14px; font-weight: 700; }
.shop-tab.active { background: var(--hot); color: #fff; }
.move-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 60vh; overflow-y: auto; }
.move-card { background: #fff; border: 2px dashed #c9b0ff; border-radius: 14px; padding: 4px; display: flex; flex-direction: column; align-items: center; }
.move-card.here { border: 3px solid var(--hot); background: #ffe3f3; }
.move-card img { width: 64px; height: 64px; }
.move-name { font-size: 12px; font-weight: 700; text-align: center; }
.move-home { font-size: 11px; opacity: .8; }
.move h3 { margin: 0 0 4px; text-align: center; }

/* ---------- map & title ---------- */
.title-chapter { z-index: 1; color: #fff; font-weight: 700; font-size: 18px; text-shadow: 0 2px 0 var(--maroon); background: rgba(139, 43, 74, .35); padding: 2px 14px; border-radius: 999px; }
.title-chapter:empty { display: none; }
.silly-pill { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); z-index: 3; font-size: 14px; box-shadow: 0 2px 0 var(--maroon); padding: 3px 12px; }
.land-bubble { position: relative; }
.land-quest { position: absolute; top: -8px; right: -10px; font-size: 22px; background: #fff; border: 2px solid var(--maroon); border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center; animation: bob 1.4s ease-in-out infinite; }
.land-node.office .land-bubble { border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 35% 30%, #fff, #c8cbe0); }
.land-node.office .land-bubble img { width: 100%; height: 100%; object-fit: cover; }
.land-node.office.locked .land-bubble { filter: grayscale(.5); }
.btn.nav { padding: 6px 6px; max-width: 110px; }
.btn.nav span { font-size: 12px; }
.map-sofie { height: 30%; }
@media (orientation: landscape) and (max-height: 500px) {
  .bottombar { gap: 6px; }
  .btn.nav { padding: 2px 6px; font-size: 20px; }
}

/* ---------- book ---------- */
.book-stars { font-size: 11px; line-height: 1; min-height: 12px; }
.book-lv { font-size: 10px; opacity: .8; }
.card-hearts { text-align: center; font-size: 18px; }
.xpbar { width: 160px; height: 8px; background: #f3e3f0; border-radius: 4px; overflow: hidden; margin: 4px auto 0; border: 1px solid var(--maroon); }
.xpbar > div { height: 100%; background: linear-gradient(90deg, #ff8fc7, #b48cff); }
.card-forms { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.form-btn { background: #fff; border: 2px solid var(--maroon); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.form-btn.active { background: var(--hot); color: #fff; }
.form-btn.locked { opacity: .5; }

/* ---------- dialog ---------- */
.portrait.daddy { background: radial-gradient(circle, #fff, #d7dcef); object-fit: cover; }
.dialog-card.daddy .dialog-name { background: #4b5578; }
.portrait.sofie { object-fit: contain; }

/* ---------- parent corner ---------- */
.parent { z-index: 85; background: linear-gradient(170deg, #f6f3ff, #fff7fb); }
.parent-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 30px; }
.pin { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pin h3 { margin: 0; }
.pin-dots { display: flex; gap: 12px; }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--maroon); }
.pin-dot.on { background: var(--maroon); }
.rep-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.rep-tile { background: #fff; border: 2px solid #e3d3f0; border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.rep-tile b { font-size: 20px; color: var(--maroon); }
.rep-tile span { font-size: 12px; opacity: .8; }
.rep-needs { background: #fffbe0; border: 2px dashed #ffc83d; border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; font-size: 15px; }
.rep-sec { background: #fff; border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; border: 2px solid #e3d3f0; }
.rep-sec h4 { margin: 0 0 8px; }
.rep-table { display: flex; flex-direction: column; gap: 8px; }
.rep-row { display: grid; grid-template-columns: 1.3fr 1fr auto; grid-template-areas: 'name bar num' 'meta meta meta'; gap: 2px 10px; align-items: center; }
.rep-row.off { opacity: .45; }
.rep-name { grid-area: name; font-weight: 600; font-size: 14px; }
.rep-group { display: block; font-size: 11px; font-weight: 400; opacity: .7; }
.rep-bar { grid-area: bar; height: 12px; background: #f1edf7; border-radius: 6px; overflow: hidden; }
.rep-bar > div { height: 100%; border-radius: 6px; }
.rep-num { grid-area: num; font-size: 13px; font-weight: 700; white-space: nowrap; }
.rep-meta { grid-area: meta; font-size: 12px; opacity: .75; }
.rep-missed { display: flex; flex-direction: column; gap: 8px; }
.rep-miss { border-left: 4px solid #ff8fa3; padding-left: 8px; }
.rep-q { font-size: 14px; font-weight: 600; }
.rep-a { font-size: 12px; opacity: .8; }
.settings-grid { display: flex; flex-direction: column; gap: 10px; }
.set-card { background: #fff; border-radius: 16px; padding: 12px; border: 2px solid #e3d3f0; display: flex; flex-direction: column; gap: 8px; }
.set-card h4 { margin: 0; }
.set-label { font-weight: 700; font-size: 14px; margin-top: 4px; }
.tiny.left { text-align: left; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn { background: #fff; border: 2px solid var(--maroon); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.seg-btn.active { background: var(--maroon); color: #fff; }
.presets { display: flex; flex-direction: column; gap: 6px; }
.preset { text-align: left; background: #fff; border: 2px solid #e3d3f0; border-radius: 12px; padding: 8px 12px; font-weight: 600; }
.preset.active { border-color: var(--maroon); background: #ffe3f3; }
.topics { display: flex; flex-direction: column; gap: 4px; }
.topic { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.topic input { width: 22px; height: 22px; accent-color: var(--hot); flex: none; }
.topic span { flex: 1; }
.topic small { opacity: .6; }
.topic em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--maroon); }
.words-ta { width: 100%; font-family: inherit; font-size: 16px; border: 2px solid #c9b0ff; border-radius: 12px; padding: 10px; -webkit-user-select: text; user-select: text; resize: vertical; }
.help p { margin: 0; font-size: 15px; }
