/* ============================================================
   Мяурзе — Duolingo-flavoured cute kitten UI
   ============================================================ */
:root {
  --bg: #fff7fa;
  --bg2: #ffeef3;
  --card: #ffffff;
  --text: #4b3b47;
  --muted: #9a8a95;
  --line: #f0d9e3;
  --line-dark: #e2c3d1;
  --accent: #f25287;
  --accent-dark: #c93f70;
  --accent-light: #ffd9e6;
  --green: #58cc02; --green-dark: #46a302; --green-bg: #d7ffb8; --green-text: #58a700; --green-line: #a5ed6e;
  --red: #ff4b4b; --red-dark: #ea2b2b; --red-bg: #ffdfe0; --red-text: #ea2b2b; --red-line: #ffb2b2;
  --blue: #1cb0f6; --yellow: #ffc800; --orange: #ff9600;
  --fur: #ffb37a; --fur-dark: #e8944f;
  --r: 18px;
  --statbar-h: 54px;
}
:root[data-accent="lavender"] { --accent: #8b6cf6; --accent-dark: #6a4fd1; --accent-light: #e4dcff; --bg: #f8f6ff; --bg2: #efeaff; --line: #e3dcf5; --line-dark: #cfc4ec; }
:root[data-accent="mint"] { --accent: #2bb3a3; --accent-dark: #1f8c80; --accent-light: #c9f2ec; --bg: #f3fcfa; --bg2: #e6f7f4; --line: #d3ece7; --line-dark: #b9ded7; }
:root[data-theme="dark"] {
  --bg: #241c28; --bg2: #2f2434; --card: #352a3b; --text: #f6e8f0; --muted: #b39cae; --line: #4a3a50; --line-dark: #2a2030;
  --green-bg: #2c4a1f; --green-text: #a6f27a; --red-bg: #4d2626; --red-text: #ffb3b3;
}
:root[data-theme="dark"][data-accent="lavender"] { --bg: #211c2e; --bg2: #2b2440; --card: #322a48; --line: #47406a; }
:root[data-theme="dark"][data-accent="mint"] { --bg: #1a2826; --bg2: #223330; --card: #283b38; --line: #3a5551; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: "Nunito", -apple-system, "SF Pro Rounded", "Segoe UI", Roboto, sans-serif;
  font-size: 16px; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
body { min-height: 100dvh; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); }
h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 22px 4px 10px; font-weight: 900; }
h2 .ico { width: 24px; height: 24px; }
p.muted, .muted { color: var(--muted); font-size: .9rem; margin: 0 4px 8px; font-weight: 700; }
.center { text-align: center; }
.hidden { display: none !important; }
img.ico { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex: 0 0 auto; }
img.ico.big { width: 44px; height: 44px; }
.with-ico { display: inline-flex; align-items: center; gap: 4px; }

/* ===== Stat bar ===== */
.statbar { position: sticky; top: 0; z-index: 12; height: var(--statbar-h); display: flex; justify-content: space-around; align-items: center;
  padding: 0 10px; background: var(--bg); border-bottom: 2px solid var(--line); }
.stat { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 1.02rem; }
.stat .ico { width: 26px; height: 26px; }
.s-fire b { color: var(--orange); } .s-xp b { color: #e0b000; } .s-ach b { color: var(--accent); } .s-book b { color: var(--blue); }
:root[data-theme="dark"] .s-xp b { color: var(--yellow); }

/* ===== Hero ===== */
.hero { display: grid; grid-template-columns: 104px 1fr; column-gap: 12px; row-gap: 6px; align-items: center; padding: 12px 16px 4px; }
.cat-wrap { position: relative; width: 104px; }
.cat { width: 100%; height: auto; display: block; animation: idle 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes idle { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-3px) } }
.cat .fur { fill: var(--fur); }
.cat .inner-ear { fill: #ffb3c6; }
.cat .stripes path { stroke: var(--fur-dark); stroke-width: 5; stroke-linecap: round; fill: none; opacity: .55; }
.cat .blush ellipse { fill: #ff8fab; opacity: .45; }
.cat .eyes ellipse, .cat .eyes circle:not([fill]) { fill: #3b2b3a; }
.cat .eyes path { stroke: #3b2b3a; stroke-width: 6; stroke-linecap: round; fill: none; }
.cat .eyes .brow { stroke-width: 4; }
.cat .eyes .tear { fill: #8fd3ff; stroke: none; }
.cat .nose { fill: #ff8fab; }
.cat .mouth { stroke: #3b2b3a; stroke-width: 3.5; stroke-linecap: round; fill: none; }
.cat .mouth-happy { fill: #f25287; stroke: #3b2b3a; }
.cat .mouth-wow { fill: #f25287; }
.cat .whiskers path { stroke: #3b2b3a; stroke-width: 2.2; stroke-linecap: round; opacity: .5; }
.cat .toes circle { fill: #ff8fab; opacity: .7; }
.cat .eyes, .cat .mouth { display: none; }
.mood-normal .eyes-normal, .mood-normal .mouth-normal { display: block; }
.mood-happy .eyes-happy, .mood-happy .mouth-happy { display: block; }
.mood-sad .eyes-sad, .mood-sad .mouth-sad { display: block; }
.mood-sleep .eyes-sleep, .mood-sleep .mouth-normal { display: block; }
.mood-wow .eyes-wow, .mood-wow .mouth-wow { display: block; }
.mood-happy .cat { animation: bounce .5s ease; }
.mood-sad .cat { animation: shake .4s ease; }
.mood-wow .cat { animation: pop .4s ease; }
@keyframes bounce { 0%{transform:translateY(0)} 40%{transform:translateY(-12px) scale(1.05)} 100%{transform:translateY(0)} }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }
@keyframes pop { 0%{transform:scale(1)} 50%{transform:scale(1.12)} 100%{transform:scale(1)} }

.bubble { position: relative; background: var(--card); padding: 10px 12px; border-radius: 14px; align-self: start; margin-top: 8px;
  font-size: .85rem; font-weight: 800; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line-dark); z-index: 2; }
.bubble::before { content: ""; position: absolute; left: -7px; top: 16px; border: 7px solid transparent; border-right-color: var(--line); border-left: 0; }
.bubble::after { content: ""; position: absolute; left: -4px; top: 18px; border: 5px solid transparent; border-right-color: var(--card); border-left: 0; }
.hero-meta { grid-column: 1 / -1; }
.level-title { font-weight: 900; font-size: .95rem; }
.xp-bar { height: 14px; background: var(--line); border-radius: 10px; overflow: hidden; margin: 6px 0 4px; }
.xp-fill { height: 100%; width: 0; background: var(--accent); border-radius: 10px; transition: width .6s ease; position: relative; }
.xp-fill::after { content: ""; position: absolute; left: 8px; right: 8px; top: 3px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.35); }
.xp-text { font-size: .75rem; color: var(--muted); font-weight: 800; }
@media (max-width: 380px) { .hero { grid-template-columns: 92px 1fr; } .cat-wrap { width: 92px; } }

/* ===== Screens ===== */
#screens { padding: 4px 14px 110px; }
.screen { display: none; animation: fade .25s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }

.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: 0 4px 0 var(--line-dark); margin-bottom: 12px; }
:root[data-theme="dark"] .card { box-shadow: 0 4px 0 var(--line-dark); }
.small-card { padding: 10px 14px; }
.card label { display: block; font-weight: 900; font-size: .85rem; margin-bottom: 6px; }
.card select, .card input[type=text], .card textarea { width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 11px 12px;
  background: var(--bg); outline: none; margin-top: 4px; font-weight: 700; -webkit-user-select: text; user-select: text; }
.card select:focus, .card input[type=text]:focus, .card textarea:focus { border-color: var(--accent); }
.card textarea { resize: none; }
.card input[type=range] { width: 100%; accent-color: var(--accent); margin-top: 8px; }
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 800 !important; margin-top: 10px; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; }

/* ===== Buttons (3D Duolingo style) ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 16px; border-radius: 16px;
  font-weight: 900; text-transform: uppercase; letter-spacing: .05em; font-size: .84rem; line-height: 1.1;
  background: var(--card); color: var(--text); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line-dark);
  transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line-dark); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 0 var(--accent-dark); }
.btn.primary:active { box-shadow: 0 0 0 var(--accent-dark); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-dark); }
.btn.green:active { box-shadow: 0 0 0 var(--green-dark); }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-dark); }
.btn.red:active { box-shadow: 0 0 0 var(--red-dark); }
.btn.danger { color: var(--red); }
.btn .ico { width: 22px; height: 22px; }
.btn.big-play { width: 100%; font-size: 1rem; padding: 18px; margin: 8px 0 12px; background: var(--accent-light); border-color: var(--accent-light); color: var(--accent-dark); box-shadow: 0 4px 0 var(--line-dark); }
:root[data-theme="dark"] .btn.big-play { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 4px 0 var(--accent-dark); }
.btn.big-play .ico { width: 28px; height: 28px; }
.row-btns { display: flex; gap: 8px; margin-top: 12px; }
.row-btns .btn { flex: 1; padding: 13px 6px; }
.row-btns .btn.primary { flex: 1.35; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* ===== Path (Duolingo) ===== */
.unit { --u: var(--accent); --u-dark: var(--accent-dark); --u-light: var(--accent-light); margin-bottom: 6px; }
.unit-banner { position: sticky; top: var(--statbar-h); z-index: 11; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--u); color: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: 0 4px 0 var(--u-dark); margin: 12px 0 6px; }
.unit-kicker { font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.unit-title { font-size: 1.15rem; font-weight: 900; margin-top: 2px; line-height: 1.15; }
.unit-sub { font-size: .78rem; font-weight: 800; opacity: .9; margin-top: 2px; }
.unit-guide { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.unit-guide:active { background: rgba(255,255,255,.35); }
.unit-guide .ico { width: 28px; height: 28px; }
.path { position: relative; padding: 56px 0 6px; }
.node-row { position: relative; height: 106px; display: flex; justify-content: center; align-items: center; }
.node-row.has-mascot { height: 134px; }
.node { position: relative; width: 78px; height: 78px; border-radius: 50%; background: var(--u); box-shadow: 0 8px 0 var(--u-dark);
  display: grid; place-items: center; transform: translateX(calc(var(--x) * 44px)); transition: transform .08s, box-shadow .08s; }
.node:active { transform: translateX(calc(var(--x) * 44px)) translateY(6px); box-shadow: 0 2px 0 var(--u-dark); }
.node .ico { width: 42px; height: 42px; }
.node.done .ico { width: 40px; height: 40px; }
.node.locked { background: #e5e5e5; box-shadow: 0 8px 0 #b7b7b7; }
.node.locked .ico { filter: grayscale(1); opacity: .45; }
:root[data-theme="dark"] .node.locked { background: #4a3f50; box-shadow: 0 8px 0 #2f2634; }
.node.current::before { content: ""; position: absolute; inset: -11px; border-radius: 50%; border: 7px solid var(--u-light); }
:root[data-theme="dark"] .node.current::before { border-color: color-mix(in srgb, var(--u) 35%, transparent); }
.tip { position: absolute; top: -54px; left: 50%; transform: translateX(-50%); background: var(--card); color: var(--u); font-weight: 900;
  text-transform: uppercase; letter-spacing: .07em; font-size: .74rem; padding: 9px 14px; border-radius: 12px; border: 2px solid var(--line);
  white-space: nowrap; animation: tipBounce 1.4s ease-in-out infinite; z-index: 3; }
.tip::after { content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px;
  background: var(--card); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); }
@keyframes tipBounce { 0%,100% { transform: translate(-50%, 0) } 50% { transform: translate(-50%, -6px) } }
.mascot { position: absolute; top: 50%; transform: translateY(-46%); width: 92px; z-index: 2; }
.mascot.left { left: 4%; } .mascot.right { right: 4%; }
.mascot .cat-wrap { width: 92px; }
.mascot .bubble { position: absolute; bottom: 84px; left: 0; width: 122px; margin: 0; font-size: .76rem; padding: 8px 10px; line-height: 1.25; }
.mascot .bubble::before, .mascot .bubble::after { display: none; }
.mascot.right .bubble { left: auto; right: 0; }
.path-end { text-align: center; padding: 10px 0 18px; }
.path-end .ico { width: 56px; height: 56px; }
.path-end p { margin: 6px 0 0; font-weight: 900; color: var(--muted); font-size: .85rem; }
@media (max-width: 380px) { .node { transform: translateX(calc(var(--x) * 38px)); } .node:active { transform: translateX(calc(var(--x) * 38px)) translateY(6px); } .mascot { width: 80px; } .mascot .cat-wrap { width: 80px; } }

/* ===== Lesson flow ===== */
.lesson-top { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.close { width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); border-radius: 10px; }
.close svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 3; stroke-linecap: round; fill: none; }
.progress { flex: 1; height: 16px; background: var(--line); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--green); border-radius: 10px; transition: width .3s; position: relative; }
.progress-fill::after { content: ""; position: absolute; left: 8px; right: 8px; top: 4px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.35); }
.lesson-streak { display: flex; align-items: center; gap: 4px; font-weight: 900; color: var(--orange); }
.lesson-streak .ico { width: 22px; height: 22px; }

.intro { text-align: center; padding: 10px 0; }
.intro .kicker { font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.intro .glyph { font-size: 5rem; font-weight: 900; line-height: 1; color: var(--accent); margin: 6px 0; }
.code-vis { display: flex; justify-content: center; gap: 10px; margin: 14px 0; min-height: 30px; }
.code-vis .sym { width: 22px; height: 22px; border-radius: 50%; background: var(--line); transition: background .1s, transform .1s; }
.code-vis .sym.dash { width: 56px; border-radius: 12px; }
.code-vis .sym.lit { background: var(--accent); transform: scale(1.15); box-shadow: 0 0 14px var(--accent-light); }
.code-text { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; font-weight: 800; letter-spacing: 4px; }
.napev { font-size: 1.2rem; font-weight: 900; color: var(--accent); margin-top: 8px; }
.napev-hint { color: var(--muted); font-size: .8rem; font-weight: 700; }

.question { text-align: center; }
.question .prompt { font-weight: 900; margin: 6px 0 12px; font-size: 1.15rem; text-align: left; }
.question .glyph { font-size: 4.2rem; font-weight: 900; color: var(--accent); line-height: 1.1; }
.question .code-text { font-size: 1.8rem; }
.hear-btn { width: 108px; height: 108px; border-radius: 26px; background: var(--accent); box-shadow: 0 6px 0 var(--accent-dark); margin: 6px auto 8px; display: grid; place-items: center; transition: transform .08s, box-shadow .08s; }
.hear-btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--accent-dark); }
.hear-btn .ico { width: 56px; height: 56px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.opt { background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line-dark); border-radius: 16px; padding: 20px 8px; font-size: 1.6rem; font-weight: 900; transition: all .12s; }
.opt:active { transform: translateY(4px); box-shadow: none; }
.opt.code { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; letter-spacing: 3px; }
.opt.ok { border-color: var(--green-line); background: var(--green-bg); color: var(--green-text); box-shadow: 0 4px 0 var(--green-line); }
.opt.bad { border-color: var(--red-line); background: var(--red-bg); color: var(--red-text); box-shadow: 0 4px 0 var(--red-line); }
.opt:disabled { pointer-events: none; }

.result { text-align: center; padding: 10px 0; }
.result .ico.hero-ico { width: 96px; height: 96px; }
.result h3 { margin: 8px 0 4px; font-size: 1.5rem; }
.result .acc { font-size: 2.4rem; font-weight: 900; color: var(--accent); }
.result .xp-gain { display: inline-flex; align-items: center; gap: 6px; color: #e0b000; font-weight: 900; font-size: 1.1rem; margin: 6px 0 16px; }
:root[data-theme="dark"] .result .xp-gain { color: var(--yellow); }

/* ===== Feedback sheet ===== */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; animation: up .22s ease; }
.sheet.ok { background: var(--green-bg); color: var(--green-text); }
.sheet.bad { background: var(--red-bg); color: var(--red-text); }
.sheet-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.sheet-title { font-weight: 900; font-size: 1.2rem; }
.sheet-sub { font-weight: 800; font-size: .95rem; margin-top: 2px; }
.sheet-sub .code-text { font-size: 1rem; }
.sheet .btn { width: 100%; }
.sheet.ok .btn { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-dark); }
.sheet.bad .btn { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-dark); }
.sheet .btn:active { box-shadow: none; }

/* ===== Key ===== */
.seg { display: flex; background: var(--bg2); border-radius: 16px; padding: 4px; gap: 4px; margin: 6px 0 12px; border: 2px solid var(--line); }
.seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 12px; font-weight: 900; font-size: .86rem; color: var(--muted); }
.seg-btn.active { background: var(--card); color: var(--text); box-shadow: 0 2px 0 var(--line-dark); }
.seg-btn .ico { width: 20px; height: 20px; }
.decoded-wrap { min-height: 96px; }
.decoded-label { font-size: .7rem; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.decoded { font-size: 1.7rem; font-weight: 900; letter-spacing: 2px; word-break: break-all; min-height: 40px; line-height: 1.3; -webkit-user-select: text; user-select: text; }
.decoded .placeholder { color: var(--muted); font-size: .85rem; letter-spacing: 0; font-weight: 700; }
.decoded .unk { color: var(--red); }
.buffer { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; letter-spacing: 4px; color: var(--accent); font-weight: 800; min-height: 24px; }
.key-area { display: flex; flex-direction: column; align-items: center; margin: 12px 0; }
.paw-key { width: 172px; height: 172px; border-radius: 50%; background: var(--accent-light); border: 4px solid var(--card); box-shadow: 0 12px 0 var(--accent-dark), 0 18px 28px rgba(0,0,0,.12);
  display: grid; place-items: center; transition: transform .06s, box-shadow .06s; touch-action: none; }
.paw-key svg { width: 108px; height: 108px; fill: var(--accent); pointer-events: none; }
.paw-key.down { transform: translateY(10px); box-shadow: 0 2px 0 var(--accent-dark), 0 6px 10px rgba(0,0,0,.12); background: var(--accent); }
.paw-key.down svg { fill: #fff; }
.key-hint { color: var(--muted); font-size: .85rem; margin-top: 18px; font-weight: 800; }
.morse-out { font-family: ui-monospace, Menlo, monospace; font-weight: 800; letter-spacing: 2px; margin-top: 10px; min-height: 26px; word-break: break-all; color: var(--accent); -webkit-user-select: text; user-select: text; }
.text-out { font-family: inherit; font-size: 1.3rem; color: var(--text); letter-spacing: 1px; }

/* ===== Alphabet ===== */
.alpha-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line-dark); border-radius: 14px; padding: 10px 4px 8px; text-align: center; position: relative; transition: transform .08s, box-shadow .08s; }
.tile:active { transform: translateY(3px); box-shadow: none; }
.tile .l { font-size: 1.5rem; font-weight: 900; }
.tile .c { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.tile .m { position: absolute; top: 5px; right: 5px; width: 16px; height: 16px; opacity: 0; }
.tile .m.m1 { opacity: .5; } .tile .m.m2 { opacity: 1; }

/* ===== Listen ===== */
.listen-stats { display: flex; justify-content: space-between; font-weight: 900; color: var(--muted); }
.listen-stats b { color: var(--orange); }
.feedback { min-height: 28px; margin-top: 10px; font-weight: 900; text-align: center; }
.feedback.ok { color: var(--green-text); } .feedback.bad { color: var(--red-text); }

/* ===== Profile ===== */
.profile-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; padding: 12px 6px; }
.stat-tile .ico { width: 30px; height: 30px; }
.stat-tile b { display: block; font-size: 1.25rem; color: var(--accent); margin-top: 2px; }
.stat-tile span { font-size: .66rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ach { background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line-dark); border-radius: 14px; padding: 10px 6px; text-align: center; }
.ach .ico { width: 44px; height: 44px; } .ach .n { font-size: .74rem; font-weight: 900; margin-top: 4px; } .ach .d { font-size: .62rem; color: var(--muted); font-weight: 700; }
.ach.locked { opacity: .45; } .ach.locked .ico { filter: grayscale(1); }
.settings label { margin-top: 12px; }
.fur-picker, .accent-picker { display: flex; gap: 10px; margin-top: 6px; }
.fur-picker button, .accent-picker button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); box-shadow: 0 3px 0 var(--line-dark); }
.fur-picker button.active, .accent-picker button.active { border-color: var(--text); }

/* ===== Tabs ===== */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; background: var(--card); border-top: 2px solid var(--line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 10; }
.tab { width: 60px; height: 52px; display: grid; place-items: center; border-radius: 14px; border: 2px solid transparent; }
.tab .ico { width: 32px; height: 32px; transition: transform .15s; }
.tab.active { background: var(--accent-light); border-color: var(--accent); }
.tab.active .ico { transform: scale(1.08); }
:root[data-theme="dark"] .tab.active { background: color-mix(in srgb, var(--accent) 25%, transparent); }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; background: rgba(40,20,35,.5); display: grid; place-items: end center; z-index: 20; animation: fade .2s; }
.modal-card { width: 100%; max-width: 480px; max-height: 85dvh; overflow-y: auto; background: var(--card); border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-card h3 { margin: 0 0 8px; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.choice-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.choice { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line-dark); border-radius: 16px; padding: 12px 14px; font-weight: 900; }
.choice:active { transform: translateY(4px); box-shadow: none; }
.choice .ico { width: 36px; height: 36px; }
.choice small { display: block; color: var(--muted); font-weight: 700; font-size: .75rem; }
.guide-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.guide-row .gl { font-size: 1.4rem; font-weight: 900; width: 32px; color: var(--accent); }
.guide-row .gc { font-family: ui-monospace, Menlo, monospace; font-weight: 800; letter-spacing: 2px; width: 80px; }
.guide-row .gn { color: var(--muted); font-weight: 800; font-size: .85rem; flex: 1; }

/* ===== Mascot extras ===== */
.cat-wrap { cursor: pointer; touch-action: manipulation; }
.cat-img { pointer-events: none; -webkit-user-drag: none; }
.cat-wrap.spin .cat { animation: spin .65s ease; }
@keyframes spin { from { transform: rotate(0) scale(1) } 50% { transform: rotate(180deg) scale(1.15) } to { transform: rotate(360deg) scale(1) } }
.new-ach { margin: 6px 0 14px; }
.new-ach .kicker { font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.new-ach-row { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; margin-top: 6px; }
.new-ach-row .ico { width: 28px; height: 28px; }

/* ===== Feed ===== */
.partner { display: flex; gap: 12px; align-items: center; }
.p-cat .cat-wrap { width: 84px; }
.p-info { flex: 1; min-width: 0; }
.p-name { font-weight: 900; font-size: 1.15rem; }
.p-level { color: var(--muted); font-weight: 800; font-size: .85rem; }
.p-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; font-weight: 900; font-size: .9rem; }
.p-stats span { display: inline-flex; align-items: center; gap: 3px; }
.p-stats .ico { width: 18px; height: 18px; }
.p-seen { color: var(--muted); font-size: .72rem; font-weight: 800; margin-top: 4px; }
.feed-item { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line-dark); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.feed-item > .ico { width: 30px; height: 30px; }
.feed-text { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; line-height: 1.3; }
.feed-time { color: var(--muted); font-size: .72rem; font-weight: 800; margin-top: 2px; }
.like { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 12px; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line-dark); font-weight: 900; color: var(--muted); transition: transform .08s, box-shadow .08s; }
.like:active { transform: translateY(3px); box-shadow: none; }
.like .ico { width: 22px; height: 22px; filter: grayscale(1); opacity: .6; }
.like.on { color: var(--accent); border-color: var(--accent-light); background: var(--accent-light); }
.like.on .ico { filter: none; opacity: 1; }
.likes { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; color: var(--accent); }
.likes .ico { width: 20px; height: 20px; }
.tab { width: 52px; }

/* ===== Toast + FX ===== */
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #3b2b3a; color: #fff; padding: 10px 16px; border-radius: 14px; font-weight: 900; font-size: .88rem; z-index: 30; display: inline-flex; align-items: center; gap: 8px; animation: fade .2s; max-width: 90vw; text-align: center; }
.toast .ico { width: 24px; height: 24px; }
.toast.top { bottom: auto; top: calc(64px + env(safe-area-inset-top)); }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 25; overflow: hidden; }
.fxi { position: absolute; width: 26px; height: 26px; animation: floatUp 1.4s ease-out forwards; }
@keyframes floatUp { 0% { transform: translateY(0) scale(.6); opacity: 1 } 100% { transform: translateY(-170px) scale(1.25) rotate(20deg); opacity: 0 } }
