/* Kocie Klocki (docs/games/cat-blocks.md): an app shell over the 3D canvas. Colours follow the table (theme) bought in the shop. */
:root {
    --bg: #f7ecdc; --card: #fffaf2; --ink: #3a2a24; --muted: #8a7468; --accent: #ff7a45; --accent-ink: #fff; --accent-2: #ffb547;
    --line: rgba(58, 42, 36, .12); --shadow: 0 10px 30px rgba(80, 45, 20, .18); --btn-depth: #d9592a;
    --font: ui-rounded, "SF Pro Rounded", "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
html[data-table="garden"] { --bg: #e4f5dc; --card: #fbfff6; --ink: #24402a; --muted: #5f7d62; --accent: #43b05c; --btn-depth: #2f8a45; --accent-2: #ffd27a; }
html[data-table="beach"] { --bg: #f5ead3; --card: #fffdf6; --ink: #2d4250; --muted: #6f8794; --accent: #22a8d8; --btn-depth: #157fa6; --accent-2: #ffc35a; }
html[data-table="winter"] { --bg: #e7f0fa; --card: #ffffff; --ink: #24364e; --muted: #6c7f98; --accent: #e8607a; --btn-depth: #bf4560; --accent-2: #7cc2ff; }
html[data-table="night"] { --bg: #1d2445; --card: #2a325c; --ink: #f1f3ff; --muted: #a9b0d6; --accent: #ffcf6b; --accent-ink: #2b2140; --btn-depth: #d9a43d; --accent-2: #8c7bff; --line: rgba(255,255,255,.12); --shadow: 0 10px 30px rgba(0,0,0,.4); }
html[data-table="candy"] { --bg: #ffe6f3; --card: #fffafd; --ink: #5a2a48; --muted: #a07090; --accent: #ff5fa8; --btn-depth: #d63d86; --accent-2: #8fd7ff; }
html[data-table="garage"] { --bg: #cfd3da; --card: #f4f5f7; --ink: #17181b; --muted: #5d636d; --accent: #e8101a; --btn-depth: #a50c12; --accent-2: #ffc400; }
html[data-table="space"] { --bg: #0b0e24; --card: #1b1f45; --ink: #eceaff; --muted: #a6a3d6; --accent: #7a5cff; --btn-depth: #5638db; --accent-2: #3ee6c4; --line: rgba(255,255,255,.12); --shadow: 0 10px 30px rgba(0,0,0,.5); }
/* Dark mode (Profil → Tryb ciemny, on by default): Tildrix brand neutrals (tildrix-brand/colors/tokens.css, dark) under every
   light table; a bought table keeps its accent, the default kitchen takes the brand's Tide and Bloom and the tide → bloom wave.
   Night and space are dark already. */
html[data-dark] { color-scheme: dark; --line: #272b37; --shadow: 0 10px 30px rgba(0,0,0,.5); --wave: linear-gradient(90deg, #3f7df7, #ec5aae); }
html[data-dark]:not([data-table="night"]):not([data-table="space"]) { --bg: #0e1015; --card: #161922; --ink: #eef0f6; --muted: #9ea3b3; }
html[data-dark][data-table="kitchen"] { --accent: #3f7df7; --btn-depth: #1c4fc4; --accent-2: #ec5aae; --accent-ink: #fff; }
html[data-dark][data-table="kitchen"] .kk-splash-logo b, html[data-dark][data-table="kitchen"] .kk-logo b {
    background: var(--wave); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
    filter: drop-shadow(0 4px 0 #10131c); }
html[data-dark][data-table="kitchen"] .kk-play { background: var(--wave); box-shadow: 0 6px 0 #10131c, var(--shadow); }
html[data-dark][data-table="kitchen"] .kk-play:active { box-shadow: 0 2px 0 #10131c; }
html[data-dark][data-table="kitchen"] .kk-splash-bar i { background: var(--wave); }
html[data-dark] .kk-stars i.is-off { background: rgba(255,255,255,.14); }
html[data-dark] .kk-mile.is-done { background: #16301f; color: #cdeed3; }
html[data-dark] .kk-gift-row { background: #2e2814; color: #ffe9a8; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overscroll-behavior: none; }
body { overflow: hidden; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.kk { position: fixed; inset: 0; }
.kk-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.kk-screen { position: absolute; inset: 0; display: flex; flex-direction: column; pointer-events: none; }
.kk-screen > * { pointer-events: auto; }
.kk-screen[hidden], [hidden] { display: none !important; }

/* Splash */
.kk-splash { position: absolute; inset: 0; z-index: 50; display: grid; place-content: center; gap: 22px; text-align: center; background: var(--bg); transition: opacity .4s; }
.kk-splash.is-out { opacity: 0; }
.kk-splash p { color: var(--muted); margin: 0; max-width: 300px; }
.kk-splash-bar { width: 220px; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 0 auto; }
.kk-splash-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .3s; }
.kk-splash-logo, .kk-logo { font-weight: 800; letter-spacing: -.02em; line-height: .9; display: flex; flex-direction: column; align-items: center; }
.kk-splash-logo span, .kk-logo span { font-size: 28px; color: var(--muted); }
.kk-splash-logo b, .kk-logo b { font-size: 56px; color: var(--accent); text-shadow: 0 4px 0 var(--btn-depth); }

/* Top bar */
.kk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 8px; }
.kk-top h1 { margin: 0; font-size: 22px; font-weight: 800; }
.kk-icon-btn { width: 46px; height: 46px; border-radius: 16px; border: 0; background: var(--card); box-shadow: 0 3px 0 var(--line), var(--shadow); display: grid; place-items: center; color: var(--ink); text-decoration: none; }
.kk-icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.kk-coins { display: flex; align-items: center; gap: 6px; padding: 0 12px 0 8px; height: 40px; border-radius: 99px; border: 0; background: var(--card); box-shadow: 0 3px 0 var(--line), var(--shadow); font-weight: 800; font-size: 17px; }
.kk-plus { width: 22px; height: 22px; border-radius: 50%; background: #5cc96b; color: #fff; display: grid; place-items: center; font-size: 16px; line-height: 1; }
.kk-coin { display: inline-block; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff4b0, #ffcc33 45%, #e09a12 100%); box-shadow: inset 0 -2px 0 rgba(160, 90, 0, .35); vertical-align: -4px; flex: none; }

/* Home */
.kk-home { justify-content: space-between; }
.kk-home-hero { text-align: center; padding-top: 4px; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.kk-home-hero .kk-daily { pointer-events: auto; margin-top: 10px; }
.kk-logo b { font-size: 46px; }
.kk-logo span { font-size: 22px; }
.kk-chapter-name { margin: 8px 0 0; color: var(--muted); font-weight: 700; }
.kk-map { display: flex; gap: 10px; overflow-x: auto; padding: 10px 18px 6px; scroll-snap-type: x proximity; scrollbar-width: none; margin-top: auto; }
.kk-map::-webkit-scrollbar { display: none; }
.kk-node { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; font-weight: 800; scroll-snap-align: center;
    background: var(--card); color: var(--muted); box-shadow: 0 3px 0 var(--line); }
.kk-node.is-done { background: #5cc96b; color: #fff; box-shadow: 0 3px 0 #3c9a4b; }
.kk-node.is-current { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 var(--btn-depth), 0 0 0 4px rgba(255,255,255,.7); transform: scale(1.12); }
.kk-node.is-hard:not(.is-done) { background: #6b4bd6; color: #fff; box-shadow: 0 3px 0 #4b30a8; }
.kk-node.is-hard.is-current { box-shadow: 0 3px 0 #4b30a8, 0 0 0 4px rgba(255,255,255,.7); }
/* Very hard (every 20th, the end of a chapter): red, with a flame that stays after the win. */
.kk-node.is-very-hard:not(.is-done) { background: #e5484d; box-shadow: 0 3px 0 #b02a30; }
.kk-node.is-very-hard.is-current { box-shadow: 0 3px 0 #b02a30, 0 0 0 4px rgba(255,255,255,.7); }
.kk-node.is-very-hard::before { content: ""; position: absolute; top: -5px; right: -5px; width: 19px; height: 19px; border-radius: 50%;
    background: #ff8a1f; box-shadow: 0 2px 0 #c45e0a, 0 0 0 2px var(--card); }
.kk-node.is-very-hard::after { content: ""; position: absolute; top: 1.5px; right: 0.5px; width: 8px; height: 8px; background: #ffe066;
    border-radius: 0 50% 50% 50%; transform: rotate(45deg); }
.kk-node.is-locked { opacity: .55; }
.kk-node { position: relative; }
.kk-node-stars { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); font-style: normal; font-size: 10px; line-height: 1; letter-spacing: -1px;
    color: #ffc531; text-shadow: 0 1px 0 rgba(0,0,0,.25); white-space: nowrap; }
.kk-node-stars em { font-style: normal; color: rgba(255,255,255,.55); }
.kk-map { padding-bottom: 14px; }
.kk-quick { pointer-events: auto; display: flex; gap: 8px; justify-content: center; margin-top: 10px; padding: 0 12px; width: 100%; }
.kk-pill { flex: 1 1 0; max-width: 220px; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: 18px; background: var(--card);
    box-shadow: 0 3px 0 var(--line), var(--shadow); text-align: left; }
.kk-pill span { min-width: 0; display: grid; }
.kk-pill b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-pill small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-pill:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.kk-pill.is-done .kk-pill-clock { background: #5cc96b; box-shadow: 0 2px 0 #3c9a4b; }
.kk-pill-star, .kk-pill-clock { flex: none; width: 28px; height: 28px; border-radius: 10px; position: relative; }
.kk-pill-star { background: #ffc531; box-shadow: 0 2px 0 #d99a12; }
.kk-pill-star::after { content: ""; position: absolute; inset: 5px; background: #fff; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.kk-pill-clock { background: #6b4bd6; box-shadow: 0 2px 0 #4b30a8; }
.kk-pill-clock::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 2.5px solid #fff;
    background: linear-gradient(#fff, #fff) 50% 20% / 2.5px 40% no-repeat, linear-gradient(90deg, #fff, #fff) 75% 50% / 35% 2.5px no-repeat; }
.kk-big-icon { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto; }
.kk-big-icon::after { inset: 12px; }
.kk-badges { align-self: center; display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.kk-badges .kk-badge { margin-top: 0; }
.kk-badge.is-very-hard { background: #e5484d; box-shadow: 0 3px 0 #b02a30; }
.kk-timer { padding: 4px 12px; border-radius: 99px; background: var(--card); color: var(--ink); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums;
    box-shadow: 0 3px 0 var(--line), var(--shadow); min-width: 78px; text-align: center; }
.kk-boosters.is-challenge { grid-template-columns: minmax(0, 140px); justify-content: center; }
.kk-stars i.is-off { background: rgba(0,0,0,.14); }
.kk-small { font-size: 13px; }
.kk-event-gain { margin-top: 4px; padding: 8px 12px; border-radius: 14px; background: var(--bg); font-weight: 700; }
.kk-event-gain b { color: var(--accent); }
.kk-gift-row { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px 12px; border-radius: 14px; background: #fff3c4; color: #5a4300; font-size: 14px; }
.kk-gift-row .kk-gift { width: 22px; height: 22px; flex: none; }
.kk-event-name { margin: 0; font-weight: 800; color: var(--accent); font-size: 18px; }
.kk-progress.kk-event-bar { height: 14px; }
.kk-progress.kk-event-bar i { background: linear-gradient(90deg, #ffc531, #ff7a45); }
.kk-miles { display: grid; gap: 6px; text-align: left; margin-top: 4px; }
.kk-mile { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 14px; background: var(--bg); font-size: 14px; }
.kk-mile b { font-size: 16px; }
.kk-mile b::after { content: " pkt"; font-size: 11px; color: var(--muted); }
.kk-mile.is-done { background: #dff5e2; color: #24502c; }
.kk-mile.is-done b::before { content: "✓ "; color: #3c9a4b; }
.kk-ranking .kk-tabs { margin-top: 4px; }
.kk-rank-head { margin: -4px 14px 10px; text-align: center; color: var(--muted); font-weight: 700; font-size: 14px; }
.kk-rank-row.is-top1 .kk-rank-no { color: #d9a400; }
.kk-rank-row.is-top2 .kk-rank-no { color: #8e98a6; }
.kk-rank-row.is-top3 .kk-rank-no { color: #b8733b; }
.kk-home-actions { display: grid; gap: 10px; padding: 8px 18px calc(86px + var(--safe-b)); }
.kk-play { height: 72px; border: 0; border-radius: 26px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 0 var(--btn-depth), var(--shadow);
    display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; animation: kk-breathe 2.4s ease-in-out infinite; }
.kk-play span { font-size: 28px; line-height: 1; }
.kk-play small { font-size: 14px; opacity: .85; margin-top: 4px; }
.kk-play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--btn-depth); animation: none; }
.kk-daily { height: 44px; padding: 0 18px 0 12px; border: 0; border-radius: 99px; background: var(--card); box-shadow: 0 4px 0 var(--line), var(--shadow); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 17px; }
.kk-gift { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(90deg, transparent 42%, #ffd34d 42% 58%, transparent 58%), #ff6b6b; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); position: relative; animation: kk-wiggle 1.6s ease-in-out infinite; }
@keyframes kk-breathe { 50% { transform: scale(1.025); } }
@keyframes kk-wiggle { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-12deg); } 90% { transform: rotate(12deg); } }

/* Tab bar */
.kk-tabbar { position: absolute; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
    border-radius: 24px; background: var(--card); box-shadow: 0 4px 0 var(--line), var(--shadow); }
.kk-tabbar button { border: 0; background: transparent; border-radius: 18px; padding: 7px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 12px; font-weight: 800; }
.kk-tabbar button[aria-current] { background: var(--bg); color: var(--accent); }

/* Game HUD */
.kk-hud { gap: 8px; }
.kk-level-pill { flex: 1; min-width: 0; text-align: center; padding: 6px 12px; border-radius: 18px; background: var(--card); box-shadow: 0 3px 0 var(--line), var(--shadow); }
.kk-level-pill b { display: block; font-size: 17px; }
.kk-level-pill small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-badge { align-self: center; margin-top: 2px; padding: 4px 12px; border-radius: 99px; background: #6b4bd6; color: #fff; font-weight: 800; font-size: 13px; box-shadow: 0 3px 0 #4b30a8; }
.kk-toast { position: absolute; left: 50%; top: calc(76px + var(--safe-t)); transform: translateX(-50%); width: min(92vw, 420px); padding: 12px 16px; border-radius: 18px;
    background: rgba(30, 22, 18, .86); color: #fff; font-weight: 700; text-align: center; box-shadow: var(--shadow); transition: opacity .3s; z-index: 6; pointer-events: none; }
.kk-toast.is-out, .kk-flash.is-out { opacity: 0; }
.kk-boosters { margin-top: auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 8px 10px calc(10px + var(--safe-b)); }
.kk-booster { position: relative; border: 0; border-radius: 18px; background: var(--card); box-shadow: 0 4px 0 var(--line), var(--shadow); padding: 9px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: var(--ink); }
.kk-booster svg { width: 26px; height: 26px; color: var(--accent); }
.kk-booster:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.kk-count { position: absolute; top: -6px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #5cc96b; color: #fff; font-size: 12px; display: grid; place-items: center; box-shadow: 0 2px 0 #3c9a4b; }
.kk-price { position: absolute; top: -8px; right: -4px; display: flex; align-items: center; gap: 2px; padding: 2px 6px 2px 3px; border-radius: 99px; background: var(--card); box-shadow: 0 2px 0 var(--line), var(--shadow); font-size: 11px; }
.kk-price .kk-coin { width: 14px; height: 14px; vertical-align: -2px; }

/* Shop, ranking, settings: opaque screens */
.kk-shop, .kk-ranking, .kk-settings, .kk-achievements { background: var(--bg); overflow-y: auto; padding-bottom: calc(96px + var(--safe-b)); }
.kk-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 14px 12px; padding: 5px; border-radius: 18px; background: var(--card); box-shadow: 0 3px 0 var(--line); }
.kk-tabs button { border: 0; background: transparent; padding: 9px 0; border-radius: 13px; font-weight: 800; color: var(--muted); }
.kk-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 var(--btn-depth); }
.kk-shop-list { display: grid; gap: 10px; padding: 0 14px; grid-template-columns: 1fr; }
.kk-shop-list:has(.kk-skin) { grid-template-columns: repeat(2, 1fr); }
.kk-shop-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 22px; background: var(--card); box-shadow: 0 4px 0 var(--line), var(--shadow); }
.kk-shop-card.kk-skin { grid-template-columns: 1fr; text-align: center; padding: 10px; }
.kk-shop-card.is-active { outline: 3px solid var(--accent); }
.kk-shop-media img { width: 100%; aspect-ratio: 1; border-radius: 16px; display: block; background: var(--bg); }
.kk-shop-text b { display: block; font-size: 16px; }
.kk-shop-text small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.kk-note { font-weight: 800; }
.kk-shop-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--bg); position: relative; }
.kk-shop-icon::after { content: ""; position: absolute; inset: 14px; border-radius: 12px; background: var(--accent); box-shadow: 0 4px 0 var(--btn-depth); }
.kk-b-slot::after { border-radius: 99px; inset: 22px 10px; background: #f4a7c0; box-shadow: 0 4px 0 #d07a98; }
.kk-b-paw::after { border-radius: 50%; background: #ffb547; box-shadow: 0 4px 0 #d98a1e; }
.kk-b-hint::after { border-radius: 50% 50% 40% 40%; background: #ffe066; box-shadow: 0 4px 0 #d9b434; }
.kk-b-shuffle::after { background: linear-gradient(135deg, #4cb5ec 50%, #f283b7 50%); box-shadow: 0 4px 0 #2f86b8; }
.kk-b-bundle::after { background: linear-gradient(90deg, transparent 42%, #ffd34d 42% 58%, transparent 58%), #8f5ad8; box-shadow: 0 4px 0 #6a3fae; }
.kk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 16px; font-weight: 800; font-size: 16px; text-decoration: none; }
.kk-btn small { font-size: 12px; opacity: .9; display: inline-flex; align-items: center; gap: 3px; }
.kk-btn-main { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 0 var(--btn-depth); }
.kk-btn-ghost { background: var(--bg); color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.kk-btn-buy { background: #5cc96b; color: #fff; box-shadow: 0 4px 0 #3c9a4b; min-height: 42px; padding: 0 14px; }
.kk-btn-buy[disabled] { background: var(--bg); color: var(--muted); box-shadow: none; }
.kk-btn:active { transform: translateY(3px); box-shadow: none; }
.kk-card { margin: 0 14px 12px; padding: 16px; border-radius: 22px; background: var(--card); box-shadow: 0 4px 0 var(--line), var(--shadow); display: grid; gap: 10px; }
.kk-card p { margin: 0; color: var(--muted); line-height: 1.4; }
.kk-card h3 { margin: 0; }
.kk-switch { display: flex; align-items: center; justify-content: space-between; font-weight: 800; padding: 6px 0; }
.kk-switch input { position: absolute; opacity: 0; pointer-events: none; }
.kk-switch i { width: 52px; height: 30px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.kk-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.kk-switch input:checked + i { background: #5cc96b; }
.kk-switch input:checked + i::after { transform: translateX(22px); }
.kk-progress { height: 12px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.kk-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: #5cc96b; transition: width .2s; }
.kk-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kk-stat-grid div { padding: 12px; border-radius: 16px; background: var(--bg); }
.kk-stat-grid b { display: block; font-size: 22px; }
.kk-stat-grid small { color: var(--muted); }
.kk-stat-grid b em { font-style: normal; font-size: 14px; color: var(--muted); }
.kk-stats h4 { margin: 4px 0 -2px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kk-top-right { display: flex; gap: 8px; }

/* Achievements (docs/games/cat-blocks.md, "Statystyki i osiągnięcia"): medals of the tiers bronze → diamond */
.kk-ach-total { display: flex; align-items: baseline; gap: 6px; }
.kk-ach-total b { font-size: 34px; line-height: 1; }
.kk-ach-total span { color: var(--muted); font-weight: 700; }
.kk-ach-list { display: grid; gap: 10px; padding: 0 14px; }
.kk-ach { display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; row-gap: 6px; align-items: center; padding: 12px 14px; border-radius: 22px;
    background: var(--card); box-shadow: 0 4px 0 var(--line), var(--shadow); }
.kk-ach > .kk-ach-medal { grid-row: 1 / span 2; }
.kk-ach-text { display: grid; gap: 4px; min-width: 0; }
.kk-ach-text b { font-size: 16px; }
.kk-ach-text small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.kk-ach-text .kk-ach-next { color: var(--ink); font-weight: 800; }
.kk-ach-next .kk-coin { width: 15px; height: 15px; vertical-align: -3px; }
.kk-ach .kk-progress { height: 10px; }
.kk-ach.is-full .kk-progress i { background: linear-gradient(90deg, #ffc531, #ff7a45); }
.kk-ach-pips { grid-column: 2; display: flex; gap: 5px; }
.kk-ach-pips i { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); }
.kk-ach-medal { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,.3); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 3px 0 var(--line); }
.kk-ach-medal.is-none { background: var(--bg); box-shadow: inset 0 0 0 3px var(--line); color: var(--line); text-shadow: none; }
.kk-ach-medal.t0, .kk-ach-pips i.is-done.t0 { background: radial-gradient(circle at 35% 30%, #f6d2ad, #c8823f 55%, #8f5326); }
.kk-ach-medal.t1, .kk-ach-pips i.is-done.t1 { background: radial-gradient(circle at 35% 30%, #ffffff, #b9c1cd 55%, #7d8796); }
.kk-ach-medal.t2, .kk-ach-pips i.is-done.t2 { background: radial-gradient(circle at 35% 30%, #fff4b0, #ffcc33 50%, #d48d0c); }
.kk-ach-medal.t3, .kk-ach-pips i.is-done.t3 { background: radial-gradient(circle at 35% 30%, #eafcff, #8fd3e3 55%, #4d97ad); }
.kk-ach-medal.t4, .kk-ach-pips i.is-done.t4 { background: radial-gradient(circle at 35% 30%, #f5ecff, #b48cff 55%, #6d3fd0); }
.kk-ach-pips i.is-done { box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.kk-ach-row { text-align: left; justify-content: flex-start; }
.kk-ach-row .kk-ach-medal { width: 24px; height: 24px; flex: none; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.kk-ach-row .kk-coin { width: 15px; height: 15px; vertical-align: -3px; }
.kk-rank-list { display: grid; gap: 8px; padding: 0 14px; }
.kk-rank-row { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--card); box-shadow: 0 3px 0 var(--line); }
.kk-rank-row.is-me { outline: 3px solid var(--accent); }
.kk-rank-no { font-weight: 800; color: var(--muted); }
.kk-cta { margin-top: 8px; }
.kk-muted { color: var(--muted); }
.kk-center { text-align: center; }

/* Modal sheet */
.kk-modal { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 12, 8, 0); transition: background .22s; }
.kk-modal.is-open { background: rgba(20, 12, 8, .45); }
.kk-sheet { width: min(100%, 480px); margin: 0 10px calc(10px + var(--safe-b)); padding: 22px 18px 18px; border-radius: 30px; background: var(--card); box-shadow: var(--shadow);
    transform: translateY(110%); transition: transform .28s cubic-bezier(.2, .9, .3, 1.2); }
.kk-modal.is-open .kk-sheet { transform: none; }
.kk-result { text-align: center; display: grid; gap: 8px; }
.kk-result h2 { margin: 4px 0 0; font-size: 30px; }
.kk-result p { margin: 0; }
.kk-actions { display: grid; gap: 8px; margin-top: 10px; }
.kk-reward { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 40px; font-weight: 800; }
.kk-reward .kk-coin { width: 40px; height: 40px; }
.kk-stars { display: flex; justify-content: center; gap: 6px; }
.kk-stars i { width: 46px; height: 46px; background: #ffcc33; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); animation: kk-star .5s cubic-bezier(.2, .9, .3, 1.6) both; }
.kk-stars i:nth-child(2) { width: 58px; height: 58px; margin-top: -10px; animation-delay: .12s; }
.kk-stars i:nth-child(3) { animation-delay: .24s; }
@keyframes kk-star { from { transform: scale(0) rotate(-40deg); } }
.kk-sad { width: 70px; height: 70px; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle at 35% 42%, #2b2530 6px, transparent 7px), radial-gradient(circle at 65% 42%, #2b2530 6px, transparent 7px), #c9c2d6; position: relative; }
.kk-sad::before, .kk-sad::after { content: ""; position: absolute; top: -10px; width: 24px; height: 26px; background: #c9c2d6; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.kk-sad::before { left: 6px; transform: rotate(-18deg); }
.kk-sad::after { right: 6px; transform: rotate(18deg); }
.kk-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.kk-day { padding: 8px 4px; border-radius: 14px; background: var(--bg); display: grid; justify-items: center; gap: 2px; font-weight: 800; }
.kk-day small { color: var(--muted); font-size: 11px; }
.kk-day em { font-style: normal; font-size: 10px; color: var(--accent); }
.kk-day.is-done { opacity: .5; }
.kk-day.is-today { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 var(--btn-depth); }
.kk-day.is-today small, .kk-day.is-today em { color: inherit; }
.kk-flash { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 30; padding: 16px 24px; border-radius: 22px; background: var(--card); color: var(--ink);
    font-size: 22px; font-weight: 800; box-shadow: var(--shadow); transition: opacity .3s; pointer-events: none; text-align: center; max-width: 86vw; }
.kk-noscript { position: absolute; inset: 0; display: grid; place-items: center; }

@media (min-width: 760px) {
    .kk-shop-list:has(.kk-skin) { grid-template-columns: repeat(4, 1fr); }
    .kk-shop, .kk-ranking, .kk-settings, .kk-achievements { align-items: stretch; }
    .kk-shop-list, .kk-rank-list, .kk-card, .kk-tabs, .kk-rank-head, .kk-ach-list { width: min(720px, 100% - 28px); margin-left: auto; margin-right: auto; }
    .kk-ach-list { padding: 0; grid-template-columns: repeat(2, 1fr); }
    .kk-stat-grid { grid-template-columns: repeat(3, 1fr); }
    .kk-tabbar { left: 50%; right: auto; transform: translateX(-50%); width: 440px; }
    .kk-boosters { width: 560px; margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) { .kk-play, .kk-gift { animation: none; } }
