:root{color-scheme:light;font-family:Trebuchet MS,Segoe UI,sans-serif;--bg-paper: #f7edd6;--bg-paper-deep: #efdfbe;--panel: rgba(255, 251, 244, .8);--stroke: rgba(111, 78, 55, .18);--text-main: #5a3c2c;--text-soft: #8b6a55;--accent: #cf8c5b;--accent-deep: #9f6237;--ui-surface: #f5f5f5;--ui-accent-green: #4caf50;--ui-ink: #333333;--ui-ink-soft: #8e8e93;--ui-overlay: rgba(255, 255, 255, .2);--mint: #7da37e;--danger: #bb604f;--scrollbar-track: rgba(223, 201, 166, .92);--scrollbar-thumb: rgba(143, 86, 47, .9);--scrollbar-thumb-hover: rgba(111, 67, 39, .98);--scrollbar-thumb-border: rgba(255, 248, 236, .88);--shadow-soft: 0 18px 40px rgba(121, 82, 54, .12);--shadow-card: 0 14px 28px rgba(125, 86, 54, .16);--radius-xl: 28px;--radius-lg: 20px}*{box-sizing:border-box}html,body{padding:0;margin:0;min-height:100%;height:var(--app-height, 100%);width:var(--app-width, 100%);overflow:hidden;overscroll-behavior:none;overscroll-behavior-y:contain;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;background:radial-gradient(circle at top,rgba(255,255,255,.55),transparent 34%),linear-gradient(180deg,#fbf3e0 0%,var(--bg-paper) 48%,var(--bg-paper-deep) 100%);background-repeat:no-repeat;background-size:cover;background-attachment:fixed;color:var(--text-main);touch-action:none}body{position:fixed;top:0;right:0;bottom:0;left:0;-webkit-user-select:none;user-select:none}button,input{font:inherit}button{cursor:pointer;border:none;background:none;color:inherit;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;outline:none}button *,button:before,button:after{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}button:focus,button:focus-visible,button:active{outline:none}button::selection,button *::selection{background:transparent;color:inherit}#app{position:fixed;top:var(--app-offset-top, 0);left:var(--app-offset-left, 0);width:var(--app-width, 100%);height:var(--app-height, 100vh);overflow:hidden;overscroll-behavior:none;overscroll-behavior-y:none}.app-shell{height:var(--app-height, 100vh);min-height:0;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;overscroll-behavior:none}.app-shell--paint{height:var(--app-height, 100vh);grid-template-rows:1fr auto;touch-action:none}.app-shell--paint .content{min-height:0;display:flex;padding:10px 10px 0;overflow:hidden}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 18px 10px}.topbar__title{min-width:0}.topbar h1,.section-heading h2,.paint-toolbar h2,.hero-card h2{margin:0;font-family:Georgia,Palatino Linotype,serif;font-weight:700}.eyebrow{margin:0 0 6px;text-transform:uppercase;letter-spacing:.12em;font-size:12px;color:var(--accent-deep)}.content{min-height:0;display:flex;flex-direction:column;overflow:hidden}.screen{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track);animation:screen-enter .28s ease}.app-shell--paint .screen{overflow:hidden;overscroll-behavior:none}.hero-card,.panel-card,.stat-card,.collection-item,.board-size-option,.primary-button,.ghost-button,.danger-button,.palette-chip,.nav-button{box-shadow:var(--shadow-card)}.hero-card{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(120px,.9fr);gap:16px;padding:18px;background:linear-gradient(140deg,#fffdf8eb,#f8e9cbe6);border:1px solid var(--stroke);border-radius:var(--radius-xl)}.hero-card__content{display:flex;flex-direction:column;gap:10px}.hero-card__content p,.section-heading p,.muted,.paint-toolbar p{margin:0;color:var(--text-soft)}.hero-card__actions{display:flex;align-items:center;gap:12px;margin-top:auto}.hero-card__progress{font-weight:700;color:var(--accent-deep)}.hero-card__art{display:block;width:100%;min-height:144px;border-radius:26px;border:8px solid rgba(182,129,88,.85);outline:4px solid rgba(255,245,228,.75);object-fit:cover;image-rendering:pixelated;background:#ffffffd1}.stats-panel{position:relative;z-index:1;padding:12px;border-radius:28px;background:linear-gradient(180deg,#fffffff5,#fffbf6e0);border:1px solid rgba(244,235,223,.95);box-shadow:0 16px 30px #805b3d12}.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}.reward-stars-button{width:100%;margin-top:12px;display:inline-flex;align-items:center;justify-content:center;gap:10px}.stat-card,.panel-card{padding:16px;background:var(--panel);border-radius:var(--radius-lg);border:1px solid var(--stroke);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.stat-card{display:grid;justify-items:center;align-content:start;gap:8px;min-height:126px;padding:16px 12px 14px;border-radius:22px;background:#fffcf7c2;text-align:center;box-shadow:none}.stat-card__icon{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;background:var(--stat-accent-soft);color:var(--stat-accent);box-shadow:inset 0 0 0 1px #ffffffa6}.stat-card__icon-svg{width:26px;height:26px}.stat-card__value{order:2;flex-shrink:0;font-size:40px;line-height:.95;font-weight:800;color:var(--stat-accent)}.stat-card__label{order:3;min-width:0;font-size:15px;font-weight:700;color:var(--text-main)}.panel-card span{display:block;font-size:13px;color:var(--text-soft)}.panel-card strong{display:block;margin-top:8px;font-size:24px}.section-heading{margin-bottom:14px}.levels-screen{position:relative;display:grid;gap:22px;padding:18px 18px 20px;overflow-x:hidden;overflow-y:auto;isolation:isolate}.levels-screen:before,.levels-screen:after{content:"";position:absolute;border-radius:999px;pointer-events:none;opacity:.5}.levels-screen:before{width:280px;height:280px;right:-70px;bottom:-120px;background:radial-gradient(circle,rgba(206,196,255,.22),transparent 70%)}.levels-screen:after{width:220px;height:220px;left:-80px;top:-80px;background:radial-gradient(circle,rgba(255,232,189,.24),transparent 68%)}.difficulty-groups{position:relative;z-index:1;display:grid;gap:20px}.difficulty-group{display:grid;gap:14px}.difficulty-group__header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px}.difficulty-group__header h3{margin:0;font-family:Georgia,Palatino Linotype,serif;font-size:25px;line-height:1;color:var(--text-main)}.difficulty-group__header span{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 12px;border-radius:999px;background:#fffcf7e6;border:1px solid rgba(232,219,210,.72);color:var(--text-soft);font-size:18px;font-weight:700;box-shadow:0 10px 24px #7d563614}.level-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:18px 14px;position:relative;z-index:1}.ad-level-block{position:relative;overflow:hidden;border-radius:28px}.ad-level-block--compact{min-height:260px}.ad-level-block__grid{filter:saturate(.8) brightness(.92)}.ad-level-block__grid--compact{grid-template-columns:repeat(auto-fit,minmax(148px,1fr));gap:12px;padding:10px}.ad-level-block__grid .level-card{padding:14px 12px 12px;border-radius:22px;gap:10px}.ad-level-block__grid .level-card__frame{width:min(132px,100%);padding:8px}.ad-level-block__grid .level-card__frame:before{top:8px;right:8px;bottom:8px;left:8px;border-width:5px}.ad-level-block__grid .level-card__meta{gap:6px}.ad-level-block__grid .level-card__meta strong{font-size:14px}.ad-level-block__grid .level-card__footer{display:none}.ad-level-block__more-card{display:grid;align-content:center;justify-items:center;gap:6px;min-height:100%;padding:18px 14px;border-radius:22px;border:1px dashed rgba(232,219,210,.95);background:linear-gradient(180deg,#ffffffe0,#f7f1ebd1);text-align:center}.ad-level-block__more-card strong{font-size:34px;line-height:1;color:var(--text-main)}.ad-level-block__more-card span{color:var(--text-soft);font-size:13px;font-weight:700}.ad-level-block__overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;display:grid;place-items:center;padding:18px;background:var(--ui-overlay);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.ad-level-block__content{width:min(360px,100%);display:grid;justify-items:center;gap:12px;padding:20px 18px 18px;border-radius:24px;background:#f5f5f5f0;border:1px solid rgba(255,255,255,.95);box-shadow:0 10px 26px #3333331a,0 2px 8px #3333330f;text-align:center}.ad-level-block__content strong{color:var(--ui-ink);font-size:18px;line-height:1.15}.ad-level-block__content span{color:var(--ui-ink-soft);font-size:14px;line-height:1.35}.ad-level-block__icon{width:20px;height:20px;object-fit:contain;filter:saturate(1.05)}.ad-level-block__button{min-width:min(260px,100%);margin-top:4px;display:flex;align-items:center;justify-content:center;gap:8px;min-height:64px;padding:0 22px;border-radius:20px;background:#f5f5f5f5;color:var(--ui-ink);border:1px solid rgba(51,51,51,.08);box-shadow:0 8px 20px #33333314,inset 0 1px #fffffff2;font-weight:700;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background-color .16s ease}.ad-level-block__button:hover,.ad-level-block__button:active{transform:translateY(-1px);border-color:#4caf504d;box-shadow:0 12px 24px #3333331a,0 0 0 4px #4caf5014}.ad-level-block__button .ad-level-block__icon{padding:10px;width:44px;height:44px;border-radius:14px;background:#4caf501f}.level-card{position:relative;display:flex;flex-direction:column;gap:14px;align-items:stretch;padding:18px 16px 16px;border-radius:28px;border:1px solid rgba(232,219,210,.72);background:linear-gradient(180deg,#fffffff2,#fbf6f0db);text-align:left;transition:transform .18s ease,filter .18s ease,box-shadow .18s ease,border-color .18s ease}.level-card:hover,.level-card:active{transform:translateY(-3px);box-shadow:0 18px 34px #845b3d24}.level-card--locked{border-color:#bab7b5d1;background:linear-gradient(180deg,#e1e1e1f5,#c9c9c9e6);box-shadow:inset 0 1px #ffffff57;filter:grayscale(.5) saturate(.58);opacity:.9}.level-card--locked .level-card__frame{background:radial-gradient(circle at center,rgba(245,245,245,.78) 58%,transparent 59%),linear-gradient(180deg,#e8e8e8f5,#d2d2d2e0)}.level-card--locked .level-card__meta,.level-card--locked .level-card__footer{color:#4f4f4feb}.level-card--done{border-color:var(--level-accent-border);background:linear-gradient(180deg,#f2fbf2f5,#e7f5e7e6);box-shadow:0 18px 38px var(--level-accent-glow),0 14px 28px #7c583a24}.level-card--done .level-card__percent{background:#93be8138;color:#5f8450}.level-card__sparkle{position:absolute;top:12px;left:12px;width:18px;height:18px;color:#f3d17aeb}.level-card__sparkle-icon{width:100%;height:100%}.level-card__frame{position:relative;width:min(172px,100%);aspect-ratio:1;display:block;margin:0 auto;padding:10px;border-radius:50%;background:radial-gradient(circle at center,rgba(255,255,255,.74) 58%,transparent 59%),linear-gradient(180deg,#ffffffeb,#fff8efcc);box-shadow:inset 0 0 0 1px #fffc}.level-card__frame:before{content:"";position:absolute;top:10px;right:10px;bottom:10px;left:10px;border-radius:50%;border:6px solid var(--level-accent);opacity:.58}.level-card__frame:after{content:"";position:absolute;top:4px;right:4px;bottom:4px;left:4px;border-radius:50%;border:2px solid rgba(255,255,255,.96)}.level-card__art{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;image-rendering:pixelated;background:#ffffffd1}.preview-art--unfinished{filter:grayscale(1) contrast(1.02) brightness(1.02)}.level-card__meta{display:grid;gap:10px;text-align:center}.level-card__meta strong{font-size:17px;line-height:1.2;letter-spacing:-.01em}.level-card__footer{display:flex;align-items:center;justify-content:space-between;gap:10px}.level-card__lock{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:34px;padding:7px 12px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.1}.level-card__lock--stars{background:#f5b53b;color:#795708}.level-card__lock--ad{background:#ba9be4;color:#5e00ff}.level-card__meta small,.level-card__footer small{display:inline-flex;align-items:center}.level-card__size{font-size:13px;color:var(--text-soft)}.level-card__percent{padding:8px 12px;border-radius:999px;background:var(--level-accent-pill);color:var(--level-accent);font-size:14px;font-weight:700;line-height:1}.paint-screen{display:grid;gap:14px}.app-shell--paint .paint-screen{flex:1 1 auto;min-height:0;grid-template-rows:auto 1fr auto auto;align-content:stretch;gap:8px;touch-action:none}.paint-toolbar{display:flex;width:100%;max-width:880px;margin:0 auto;justify-content:flex-start;align-items:center}.app-shell--paint .paint-toolbar{gap:10px}.app-shell--paint .ghost-button,.app-shell--paint .primary-button,.app-shell--paint .danger-button,.app-shell--paint .board-controls__button{touch-action:manipulation}.app-shell--paint .paint-toolbar,.app-shell--paint .paint-meta,.app-shell--paint .board-shell,.app-shell--paint .palette-bar,.app-shell--paint .palette-dock,.app-shell--paint .palette-strip{touch-action:none}.app-shell--paint .palette-strip{touch-action:pan-x}.app-shell--paint .paint-toolbar,.app-shell--paint .paint-meta,.app-shell--paint .board-shell,.app-shell--paint .ghost-button,.app-shell--paint .primary-button,.app-shell--paint .danger-button,.app-shell--paint .board-controls__button{-webkit-user-select:none}.app-shell--paint .paint-toolbar>.ghost-button[data-action=back-levels]{flex:1 1 100%;width:100%}.app-shell--paint .paint-toolbar>.ghost-button{flex:0 0 auto;justify-content:center}.paint-meta{display:grid;justify-items:stretch;gap:4px;width:min(100%,880px);margin:0 auto;padding:10px 14px;border-radius:22px;background:#fff8edd1;border:1px solid var(--stroke)}.paint-meta__summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px;width:100%}.paint-meta__title{display:grid;gap:0;justify-self:start;text-align:left}.paint-meta__title h2{margin:0;font-size:22px}.paint-meta__title p,.paint-meta__progress span{margin:0;font-size:11px;color:var(--text-soft)}.paint-meta__progress{display:grid;justify-self:end;justify-items:end;gap:0;text-align:right}.paint-meta__progress strong{font-size:20px}.paint-meta__controls{display:flex;gap:6px;flex-wrap:wrap;align-items:center;justify-content:center}.paint-meta__reward-buttons{width:100%;max-width:560px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:4px;justify-self:center}.paint-meta__hint-button{width:100%;display:inline-flex;align-items:center;justify-content:center;gap:10px;padding-left:10px;padding-right:10px}.ghost-button.paint-meta__hint-button{min-height:42px}.ad-inline-icon{width:24px;height:24px;object-fit:contain;flex:0 0 auto;background:#000}.completion-banner{padding:12px 16px;border-radius:16px;background:linear-gradient(135deg,#7da37e29,#7da37e0f);border:1px solid rgba(125,163,126,.32);color:#416342;font-weight:700}.app-shell--paint .completion-banner{width:min(100%,880px);margin:0 auto;padding:9px 12px;font-size:14px}.board-size-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:42;display:grid;place-items:center;padding:18px}.board-size-modal__backdrop{position:absolute;top:0;right:0;bottom:0;left:0;background:#39281f6b;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.board-size-modal__card{position:relative;width:min(820px,calc(100vw - 24px));display:grid;gap:16px;padding:22px;border-radius:28px;background:linear-gradient(180deg,#fffbf5fa,#f7e9cef5);border:1px solid rgba(129,92,58,.18);box-shadow:0 28px 60px #432c1e3d}.board-size-modal__header{display:grid;gap:6px}.board-size-modal__header h2{margin:0;font-family:Georgia,Palatino Linotype,serif}.board-size-modal__header p:last-child{margin:0;color:var(--text-soft)}.board-size-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.board-size-option{display:grid;gap:10px;padding:16px;text-align:left;border-radius:20px;background:#fffcf7eb;border:1px solid rgba(129,92,58,.12);transition:transform .16s ease,border-color .16s ease}.board-size-option:hover,.board-size-option:active{transform:translateY(-1px);border-color:#cf8c5b8f}.board-size-option--done{background:linear-gradient(135deg,#7da37e2e,#fffcf7f0)}.board-size-option__preview{display:grid;place-items:center;min-height:132px;padding:10px;border-radius:18px;background:linear-gradient(180deg,#fffbf5f0,#f6e8cde0);border:1px solid rgba(129,92,58,.1)}.board-size-option__preview-canvas{display:block;width:min(100%,132px);aspect-ratio:1;border-radius:14px;background:#fffdfa;image-rendering:pixelated;box-shadow:inset 0 0 0 1px #815c3a24,0 10px 20px #432c1e14}.board-size-option__meta{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.board-size-option__meta strong{font-size:20px}.board-size-option__meta small,.board-size-option__note{color:var(--text-soft)}.board-size-option__progress{justify-self:start;padding:6px 10px;border-radius:999px;background:#fff6e8eb;color:var(--accent-deep);font-weight:700}.board-size-modal__actions{display:flex;justify-content:flex-end}.completion-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;display:grid;place-items:center;padding:18px}.completion-modal__backdrop{position:absolute;top:0;right:0;bottom:0;left:0;background:#39281f85;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.completion-modal__card{position:relative;width:min(560px,calc(100vw - 24px));max-height:min(calc(100vh - 24px),100%);display:grid;gap:16px;padding:20px;border-radius:28px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track);background:linear-gradient(180deg,#fffbf5fa,#f7e9cef5);border:1px solid rgba(129,92,58,.18);box-shadow:0 28px 60px #432c1e3d}.completion-modal__header{display:grid;gap:6px}.completion-modal__header p{margin:0;color:var(--text-soft)}.completion-modal__header h2,.completion-modal__reward strong,.completion-modal__next strong{margin:0;font-family:Georgia,Palatino Linotype,serif}.completion-modal__body{display:grid;gap:14px}.completion-modal__image{display:block;width:100%;aspect-ratio:16 / 10;border-radius:22px;object-fit:contain;background:#fffc;image-rendering:pixelated}.completion-modal__meta{display:grid;gap:12px}.completion-modal__reward,.completion-modal__next{display:flex;align-items:center;gap:12px;min-width:0;width:100%;overflow:hidden;padding:14px;border-radius:18px;background:#fffcf7db;border:1px solid rgba(129,92,58,.12)}.completion-modal__reward span,.completion-modal__next span{flex:0 1 auto;color:var(--text-soft);font-size:13px;white-space:nowrap}.completion-modal__reward strong,.completion-modal__next strong{flex:1 1 auto;min-width:0;margin-left:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}.completion-modal__actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.completion-modal__actions .ghost-button,.completion-modal__actions .primary-button,.completion-modal__actions .danger-button{width:100%;min-height:52px;margin-top:0}.locked-level-offer-modal .primary-button{display:inline-flex;align-items:center;justify-content:center;gap:10px}@media (max-height: 540px){.completion-modal{align-items:start;overflow-y:auto}.completion-modal__card{gap:12px;padding:16px;border-radius:22px}.completion-modal__body,.completion-modal__meta,.completion-modal__reward,.completion-modal__next{gap:10px}.completion-modal__reward,.completion-modal__next{padding:12px}.completion-modal__image{aspect-ratio:16 / 8;max-height:128px}.completion-modal__actions .ghost-button,.completion-modal__actions .primary-button,.completion-modal__actions .danger-button{min-height:46px}}.board-shell{display:grid;padding:12px;border-radius:26px;background:#fff8edcc;border:1px solid var(--stroke)}.app-shell--paint .board-shell{width:min(100%,880px);margin:0 auto;height:auto;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch;justify-items:center;padding:10px;background:#fff8edd1;border:1px solid var(--stroke)}.app-shell--paint .board-shell .paint-meta__controls{justify-self:stretch;align-self:stretch;width:auto;height:100%;flex-direction:column;flex-wrap:nowrap;justify-content:center;align-items:stretch}.paint-replay-actions{width:min(100%,880px);margin:-2px auto 0;display:grid;justify-items:center}.paint-replay-button{min-width:180px;min-height:44px;padding:10px 22px;border-radius:18px;font-size:15px;font-weight:800}.board-controls__button{min-width:42px;min-height:42px;padding:0 12px}.app-shell--paint .board-controls__button{min-width:38px;min-height:38px;padding:0 12px;font-size:14px}.board-controls__value{padding:0 14px;min-height:42px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#fffcf6e0;color:var(--accent-deep);font-weight:700;box-shadow:var(--shadow-soft)}.app-shell--paint .board-controls__value{min-height:38px;padding:0 12px;font-size:13px}.board-stage{position:relative;min-height:480px;height:min(64vh,680px);border-radius:22px;overflow:hidden;background:radial-gradient(circle at top left,rgba(255,255,255,.55),transparent 28%),linear-gradient(180deg,#fffcf6f5,#f4e8d0db);border:1px solid rgba(129,92,58,.14)}.app-shell--paint .board-stage{width:100%;max-width:100%;max-height:none;min-height:0;height:100%;aspect-ratio:auto;justify-self:stretch;align-self:stretch}.paint-board{display:block;width:100%;height:100%;cursor:crosshair}.paint-board--panning{cursor:grabbing}.paint-board--pinching{cursor:zoom-in}.paint-board--painting{cursor:crosshair}.board-grid{display:grid;grid-template-columns:repeat(var(--columns),minmax(30px,1fr));gap:1px;min-width:max-content;background:#785f4c2e}.paint-cell{width:30px;aspect-ratio:1;display:inline-flex;align-items:center;justify-content:center;background:#fffffff5;color:#4e4b49;font-size:14px;font-weight:700;transition:transform .12s ease,background .12s ease,color .12s ease}.paint-cell--focus{background:linear-gradient(135deg,#fffffff5,#ffedd2f5),var(--cell-color);color:var(--accent-deep)}.paint-cell--filled{background:var(--cell-color);color:transparent}.paint-cell:active{transform:scale(.94)}.bottom-nav,.palette-bar{position:sticky;bottom:0;gap:12px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:linear-gradient(180deg,#f7edd6d1,#f0dfbefa);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-top:1px solid rgba(122,86,55,.12)}.bottom-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-self:end;margin-top:auto;gap:14px;padding:10px 18px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(180deg,#fff4e485,#f7ecfceb)}.nav-button,.primary-button,.ghost-button,.danger-button{min-height:52px;border-radius:18px}.nav-button{min-height:60px;height:60px;display:flex;align-items:center;justify-content:center;gap:12px;padding:0 18px;border-radius:24px;background:#fffbf6e0;border:1px solid rgba(236,224,213,.82);color:var(--text-soft);font-size:14px;font-weight:700;box-shadow:0 16px 28px #7d563614}.nav-button--active{background:linear-gradient(135deg,#c2d69861,#f3e8ceeb);border-color:#bcc994e6;color:var(--accent-deep)}.nav-button__icon{width:28px;height:28px;display:grid;place-items:center;color:currentColor}.nav-button__icon-svg{width:24px;height:24px}.nav-button__label{font-size:1.2em;line-height:1.1}.palette-bar{display:flex;align-items:stretch;flex-wrap:nowrap;width:100%;overflow:hidden}.app-shell--paint .palette-bar{gap:8px;padding-top:2px;padding-bottom:calc(8px + env(safe-area-inset-bottom));touch-action:none;overscroll-behavior:none}.screen::-webkit-scrollbar,.completion-modal__card::-webkit-scrollbar{width:12px}.palette-bar::-webkit-scrollbar{height:10px}.screen::-webkit-scrollbar-track,.completion-modal__card::-webkit-scrollbar-track,.palette-bar::-webkit-scrollbar-track{background:var(--scrollbar-track);border-radius:999px}.screen::-webkit-scrollbar-thumb,.completion-modal__card::-webkit-scrollbar-thumb,.palette-bar::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:999px;border:2px solid var(--scrollbar-thumb-border);background-clip:padding-box;box-shadow:inset 0 0 0 1px #5a3c2c2e}.screen::-webkit-scrollbar-thumb:hover,.completion-modal__card::-webkit-scrollbar-thumb:hover,.palette-bar::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}.palette-chip{display:grid;align-items:stretch;flex:0 0 168px;gap:10px;padding:8px 10px;min-height:58px;border-radius:18px;background:#fffaf2f0;border:2px solid transparent;scroll-snap-align:start;transition:transform .14s ease}.app-shell--paint .palette-chip{flex-basis:150px;gap:8px;padding:7px 8px;min-height:52px;border-radius:14px}.palette-chip--active{border-color:var(--accent);transform:translateY(-2px)}.palette-chip__swatch{display:block;height:100%;aspect-ratio:1;border-radius:12px;background:var(--swatch);border:3px solid rgba(255,255,255,.82)}.app-shell--paint .palette-chip__swatch{border-radius:10px}.palette-chip__info{color:var(--palette-chip-info-color, inherit);min-width:0;display:grid;gap:2px;justify-items:start}.palette-chip__id{font-weight:700;font-size:18px;line-height:1}.palette-chip small{color:inherit;line-height:1.15}.app-shell--paint .palette-chip__id,.app-shell--paint .palette-chip small{font-size:12px}.app-shell--paint .palette-chip__id{font-size:17px}.collection-columns,.settings-grid{display:grid;gap:14px}.panel-screen{display:grid;gap:18px}.settings-screen,.collection-screen{padding:12px 6px 8px}.settings-screen__header,.collection-screen .section-heading{padding:4px 6px 0}.settings-screen__header h2{margin:0;font-family:Georgia,Palatino Linotype,serif;font-size:28px;font-weight:700;color:var(--text-main)}.settings-grid{gap:16px}.collection-item{width:100%;display:grid;grid-template-columns:72px 1fr;gap:12px;align-items:center;padding:10px;margin-top:10px;background:#fffdf9e0;border-radius:18px;border:1px solid var(--stroke)}.collection-item__art{width:72px;height:72px;border-radius:18px;object-fit:cover;image-rendering:pixelated;background:#ffffffd1}.collection-item__meta{display:grid;gap:4px;text-align:left}.range-card input[type=range]{width:100%;margin:12px 0 8px;accent-color:var(--accent)}.primary-button{padding:0 18px;background:linear-gradient(135deg,#dfa673,#c97c50);color:#fffaf4;font-weight:700}.ghost-button{padding:0 18px;background:#fffbf4e6;color:var(--accent-deep);font-weight:700}.danger-button{width:100%;margin-top:14px;background:#bb604f1f;color:var(--danger);font-weight:700}.toast{position:fixed;z-index:60;left:50%;top:calc(16px + env(safe-area-inset-top));transform:translate(-50%);max-width:calc(100vw - 32px);padding:12px 16px;border-radius:999px;background:#4d382beb;color:#fff8f0;box-shadow:var(--shadow-card);pointer-events:none;animation:toast-enter .22s ease}@keyframes screen-enter{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes toast-enter{0%{opacity:0;transform:translate(-50%,-10px)}to{opacity:1;transform:translate(-50%)}}@media (max-width: 860px){.hero-card{grid-template-columns:1fr}.hero-card__art{min-height:120px}}@media (max-width: 640px){.topbar,.content{padding-left:6px;padding-right:6px}.topbar{padding-top:14px}.paint-toolbar{width:min(100%,calc(100vw - 24px));max-width:none;justify-content:flex-start;gap:8px}.app-shell--paint .paint-toolbar>.ghost-button{flex:1 1 0}.app-shell--paint .paint-toolbar>.ghost-button[data-action=back-levels]{min-height:42px;padding-top:0;padding-bottom:0}.paint-meta{width:min(100%,calc(100vw - 24px));max-width:none;gap:4px;padding-left:10px;padding-right:10px}.paint-meta__summary{grid-template-columns:minmax(0,1fr) auto;align-items:center}.paint-meta__title{justify-self:start;text-align:left}.paint-meta__title h2,.paint-meta__title p{text-align:left}.paint-meta__progress{justify-self:end;justify-items:end;text-align:right}.paint-meta__controls{justify-content:center;justify-self:stretch;width:100%;margin:0}.paint-meta__reward-buttons{max-width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.paint-meta__hint-button{max-width:100%;min-height:32px;gap:5px;padding:3px;font-size:11px;line-height:1.1;border-radius:14px}.paint-meta__hint-button .ad-inline-icon{width:18px;height:18px}.paint-meta__hint-button span{min-width:0}.app-shell--paint .completion-banner,.app-shell--paint .board-shell{width:min(100%,calc(100vw - 24px));max-width:none}.app-shell--paint .board-shell{grid-template-columns:minmax(0,1fr) auto;align-items:stretch;justify-items:stretch;padding:8px}.board-grid{grid-template-columns:repeat(var(--columns),minmax(26px,1fr))}.board-stage{min-height:360px;height:min(56vh,520px)}.app-shell--paint .board-stage{min-height:0;width:100%;max-width:100%;height:100%}.app-shell--paint .board-shell .paint-meta__controls{width:auto;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:8px}.board-controls__button{min-width:56px;min-height:42px}.app-shell--paint .board-shell .board-controls__button,.app-shell--paint .board-shell .board-controls__value{width:auto;min-width:56px;padding-left:8px;padding-right:8px}.app-shell--paint .board-shell .board-controls__value{min-height:42px;text-align:center}.board-controls__value{min-width:78px}.completion-modal__actions,.board-size-grid{grid-template-columns:1fr}.board-size-modal__actions{justify-content:stretch}.board-size-modal__actions .ghost-button{width:100%}.paint-cell{width:26px;font-size:12px}.levels-screen{padding:14px 0 18px;gap:16px}.stats-panel{padding:10px;border-radius:24px}.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.reward-stars-button{margin-top:10px;font-size:13px}.stat-card{min-height:92px;gap:6px;padding:10px 8px 8px;border-radius:18px}.stat-card__icon{width:36px;height:36px;border-radius:12px}.stat-card__label{font-size:11px}.stat-card__value{font-size:20px}.stat-card__icon-svg{width:18px;height:18px}.level-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 6px}.level-card{display:block;aspect-ratio:1;min-height:0;padding:0;border-radius:22px;overflow:hidden}.level-card__frame{width:100%;height:100%;margin:0;padding:0;border-radius:inherit;background:none;box-shadow:none}.level-card__frame:before{display:none}.level-card__frame:after{display:none}.level-card__art{border-radius:inherit}.level-card__meta{position:absolute;left:0;right:0;bottom:0;z-index:2;gap:4px;text-align:left;padding:30px 10px 10px;background:linear-gradient(180deg,#131a1e00,#131a1ed6)}.level-card__meta strong{font-size:12px;line-height:1.15;color:#fffaf2;text-shadow:0 1px 2px rgba(0,0,0,.35)}.level-card__footer{display:contents}.level-card__size{position:absolute;top:8px;left:8px;z-index:2;font-size:11px;padding:4px 7px;border-radius:999px;color:#fffaf2;background:#131a1e94;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.level-card__percent{position:absolute;top:8px;right:8px;z-index:2;display:inline-flex;padding:4px 7px;border-radius:999px;font-size:11px;line-height:1;color:#fffaf2;background:#131a1e94;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.level-card__lock{margin:0 auto;min-height:0;width:fit-content;max-width:100%;padding:2px 3px;gap:6px;text-align:center;font-size:8px;color:#fffaf2;background:#131a1e94;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.level-card__lock--ad{background:#ba9be4}.level-card__sparkle{top:8px;left:8px;width:14px;height:14px}.ad-inline-icon{width:16px;height:16px}.ad-level-block__grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:220px;overflow:hidden}.ad-level-block__grid--compact{padding:8px}.ad-level-block__grid .level-card{display:flex;flex-direction:column;align-items:stretch;padding:10px 8px 8px;aspect-ratio:auto;border-radius:18px;gap:8px;min-height:0}.ad-level-block__grid .level-card__frame{width:min(88px,100%);height:auto;margin:0 auto;padding:6px;border-radius:50%;background:radial-gradient(circle at center,rgba(255,255,255,.74) 58%,transparent 59%),linear-gradient(180deg,#ffffffeb,#fff8efcc);box-shadow:inset 0 0 0 1px #fffc}.ad-level-block__grid .level-card__frame:before{display:block;top:6px;right:6px;bottom:6px;left:6px;border-width:4px}.ad-level-block__grid .level-card__frame:after{display:block;top:4px;right:4px;bottom:4px;left:4px}.ad-level-block__grid .level-card__art{border-radius:50%}.ad-level-block__grid .level-card__meta{position:static;gap:4px;padding:0;text-align:center;background:none}.ad-level-block__grid .level-card__meta strong{font-size:11px;line-height:1.15;color:var(--text-main);text-shadow:none}.ad-level-block__grid .level-card__footer{position:static}.ad-level-block__overlay{padding:12px}.ad-level-block__content{gap:8px;padding:14px 12px;border-radius:18px}.ad-level-block__button{min-height:56px;padding:0 16px;border-radius:18px}.ad-level-block__button .ad-level-block__icon{width:40px;height:40px;padding:9px;border-radius:12px}.ad-level-block__more-card strong{font-size:26px}.ad-level-block__content strong{font-size:16px}.ad-level-block__content span{font-size:12px}.difficulty-group__header h3{font-size:22px}.settings-screen,.collection-screen{padding:8px 2px 6px}.settings-screen__header{padding-inline:2px}.settings-screen__header h2{font-size:24px}.level-card{padding:6px;border-radius:24px}.level-card__meta strong{font-size:10px;text-align:center}.bottom-nav{padding-left:8px;padding-right:8px}.nav-button{min-height:60px;height:60px;flex-direction:column;font-size:12px;gap:10px;padding:10px 12px 8px}.nav-button__icon-svg{width:22px;height:22px}.nav-button__label{text-align:center;font-size:1.05em}.palette-bar{gap:8px;padding-left:10px;padding-right:10px}.palette-chip{flex-basis:132px}}.app-shell--paint .content{min-width:0;padding:0}.app-shell--paint .paint-screen{position:relative;min-width:0;min-height:0;height:100%;grid-template-rows:minmax(0,1fr) auto;gap:0}.app-shell--paint .board-shell{position:relative;width:100%;max-width:none;min-width:0;min-height:0;height:100%;padding:0;display:grid;place-items:stretch;grid-template-columns:minmax(0,1fr);gap:0;overflow:hidden;background:radial-gradient(circle at top,rgba(255,255,255,.72),transparent 34%),linear-gradient(180deg,#f8f6f1,#f2eee6);border:none;box-shadow:none}.app-shell--paint .board-shell:before{content:"";position:absolute;top:16px;right:18px;bottom:98px;left:18px;border-radius:34px;background:#ffffff8f;box-shadow:inset 0 0 0 1px #73645314,0 22px 40px #756b5c14;pointer-events:none}.app-shell--paint .board-stage{position:relative;z-index:1;min-width:0;min-height:0;border-radius:24px;border:1px solid rgba(118,104,88,.12);background:#f7f6f2;box-shadow:0 10px 24px #5c534714}.paint-overlay,.paint-floating-controls{position:absolute;z-index:3}.paint-overlay--top{top:18px;left:18px;right:18px;display:grid;grid-template-columns:auto auto;justify-content:space-between;align-items:start;gap:12px;pointer-events:none}.paint-overlay--top>*{pointer-events:auto}.paint-fab,.palette-floating-action,.palette-scroll-button{min-height:54px;border-radius:18px;background:#fffffff5;border:1px solid rgba(191,185,177,.72);box-shadow:0 12px 28px #534f481f}.paint-fab--icon,.palette-floating-action{position:relative;width:54px;min-width:54px;padding:0;border-radius:22px;display:inline-flex;align-items:center;justify-content:center}.paint-fab__icon,.palette-scroll-button__icon,.palette-floating-action__icon{width:24px;height:24px}.palette-floating-action__icon--brush{width:26px;height:26px}.palette-floating-action__badge{position:absolute;right:4px;bottom:4px;width:18px;height:18px;border-radius:999px;box-shadow:0 2px 8px #432c1e38}.paint-progress-pill{min-width:76px;padding:11px 14px;border-radius:20px;background:#fffffffa;border:1px solid rgba(191,185,177,.72);box-shadow:0 12px 28px #534f481f;text-align:center}.paint-progress-pill small,.paint-progress-pill strong{display:block}.paint-progress-pill small{font-size:10px;line-height:1;color:var(--text-soft)}.paint-progress-pill strong{font-size:24px;line-height:1.05;color:var(--ui-ink)}.paint-progress-pill--done strong{color:var(--mint)}.paint-floating-controls{top:auto;right:18px;bottom:9px;left:18px;transform:none;display:flex;flex-direction:row;justify-content:center;gap:8px;align-items:stretch}.app-shell--paint .paint-floating-controls{width:auto}.app-shell--paint .board-controls__button,.app-shell--paint .board-controls__value{min-width:64px;min-height:54px;border-radius:18px;padding:0 10px;background:#fffffff5;border:1px solid rgba(191,185,177,.72);box-shadow:0 12px 28px #534f481f}.app-shell--paint .board-controls__value{display:inline-flex;justify-content:center;align-items:center;font-size:12px;color:var(--text-soft)}.paint-quick-actions{position:relative;z-index:1;display:flex;align-items:stretch;justify-content:center;gap:10px;width:100%;padding:5px 10px;margin-top:auto;flex-wrap:nowrap}.paint-screen .paint-quick-actions{flex:0 0 auto}.paint-quick-action{flex:1 1 0;min-width:0;min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 14px;border-radius:18px;background:#fffaf1f5;border:1px solid rgba(222,206,183,.88);box-shadow:0 12px 28px #534f481a}.paint-quick-action span{min-width:0;font-size:13px;--white-space: nowrap;overflow:hidden;text-overflow:ellipsis}.paint-quick-action__icon{width:20px;height:20px;flex:0 0 auto}.app-shell--paint .palette-bar{position:sticky;z-index:4;bottom:0;display:flex;align-items:stretch;justify-content:stretch;gap:12px;padding:0 14px calc(10px + env(safe-area-inset-bottom));background:transparent;border:0;-webkit-backdrop-filter:none;backdrop-filter:none;overflow:visible;scrollbar-width:none}.app-shell--paint .palette-bar::-webkit-scrollbar{display:none}.palette-dock{width:100%;flex:1 1 auto;min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;min-height:78px;padding:10px 12px;border-radius:28px 28px 20px 20px;background:#fffcf8fa;border:1px solid rgba(211,200,188,.92);box-shadow:0 -8px 20px #58524c0a,0 18px 40px #58524c1f}.palette-strip{min-width:0;display:flex;align-items:center;gap:10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:none}.app-shell--paint .palette-strip{padding-top:8px}.palette-strip::-webkit-scrollbar{display:none}.palette-scroll-button{width:44px;min-width:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:16px}.app-shell--paint .palette-chip{position:relative;flex:0 0 56px;min-width:56px;min-height:44px;padding:0;border-radius:16px;overflow:hidden;display:grid;place-items:center;background:transparent;border:2px solid rgba(255,255,255,.16);box-shadow:inset 0 1px #ffffff38,0 8px 16px #67503a29}.app-shell--paint .palette-chip__swatch{position:absolute;top:0;right:0;bottom:0;left:0;width:auto;height:auto;border:0;border-radius:inherit}.app-shell--paint .palette-chip__info{position:relative;z-index:1;justify-items:center;gap:2px}.app-shell--paint .palette-chip__id,.app-shell--paint .palette-chip small{color:var(--palette-chip-info-color, #fff);text-shadow:0 1px 2px rgba(69,50,34,.28)}.app-shell--paint .palette-chip__id{font-size:24px;font-weight:800;line-height:1}.app-shell--paint .palette-chip small{font-size:10px;line-height:1;opacity:.92}.app-shell--paint .palette-chip--active{transform:translateY(-6px) scale(1.06);border-color:#ffba9af5;box-shadow:0 14px 26px #ff906c42,inset 0 0 0 1px #fff0e670}.app-shell--paint .palette-floating-action--reward{color:#8db0f0}.app-shell--paint .palette-floating-action--mode{color:var(--accent-deep)}@media (orientation: landscape){.app-shell--paint{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:1fr;align-items:stretch}.app-shell--paint .content{min-width:0;min-height:0;padding:0}.app-shell--paint .paint-screen{min-width:0;min-height:0}.app-shell--paint .palette-bar{position:sticky;top:0;bottom:auto;right:0;align-self:stretch;width:96px;height:100%;max-height:100%;padding:0;overflow:hidden}.app-shell--paint .palette-dock{width:100%;height:100%;max-height:100%;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;justify-items:stretch;gap:8px;padding:0;border-radius:0;overflow:hidden}.app-shell--paint .palette-scroll-button{width:100%}.app-shell--paint .palette-strip{width:100%;min-width:0;min-height:0;align-self:stretch;padding-top:0;padding-inline:4px;box-sizing:border-box;display:flex;flex-direction:column;align-items:stretch;gap:8px;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y}.app-shell--paint .palette-scroll-button__icon{transform:rotate(90deg)}.app-shell--paint .palette-chip{flex:0 0 54px;min-width:0;width:100%;min-height:54px}.app-shell--paint .palette-chip--active{transform:scale(1.04)}}@media (max-width: 900px){.app-shell--paint .board-shell{padding:0}.app-shell--paint .board-shell:before{top:12px;right:12px;bottom:88px;left:12px;border-radius:28px}.paint-quick-actions{padding-inline:12px}}@media (orientation: portrait) and (max-height: 980px){.app-shell--paint .board-controls__button,.app-shell--paint .board-controls__value{min-width:56px;min-height:50px;border-radius:16px}.app-shell--paint .board-controls__button[data-action=zoom-reset]{padding-inline:12px}}@media (max-width: 640px){.app-shell--paint .board-shell{padding:0;background:#f5f3ed}.app-shell--paint .board-shell:before{top:0;right:0;bottom:84px;left:0;border-radius:0;background:#ffffff6b;box-shadow:none}.app-shell--paint .board-stage{border-radius:0;border:none;box-shadow:none;background:#f6f4ef}.paint-overlay--top{top:10px;left:10px;right:10px;grid-template-columns:auto auto;gap:8px}.paint-fab--icon,.palette-floating-action{width:50px;min-width:50px;min-height:50px;border-radius:18px}.paint-progress-pill{min-width:64px;padding:9px 10px;border-radius:18px}.paint-progress-pill strong{font-size:20px}.paint-floating-controls{right:10px;bottom:10px;left:10px;justify-content:center;gap:6px}.app-shell--paint .paint-floating-controls{width:auto}.app-shell--paint .board-controls__button,.app-shell--paint .board-controls__value{min-width:50px;min-height:50px;border-radius:16px}.app-shell--paint .board-controls__value,.app-shell--paint .board-controls__button[data-action=zoom-reset]{display:none}.paint-quick-actions{gap:8px;padding:8px 10px}.paint-quick-action{min-height:40px;border-radius:16px}.paint-quick-action span{font-size:11px}.app-shell--paint .palette-bar{gap:8px;padding:0 4px calc(2px + env(safe-area-inset-bottom))}.palette-dock{min-height:68px;gap:8px;padding:8px 8px 10px;border-radius:24px}.palette-scroll-button{width:42px;min-width:42px;min-height:42px;border-radius:14px}.palette-strip{gap:8px}.app-shell--paint .palette-strip{padding-top:6px}.app-shell--paint .palette-chip{flex-basis:48px;min-width:48px;min-height:44px;border-radius:14px}.app-shell--paint .palette-chip__id{font-size:18px}.app-shell--paint .palette-chip small{font-size:9px}}@media (max-width: 640px) and (orientation: portrait){.app-shell--paint .board-controls__value{min-width:64px;padding-inline:10px;display:inline-flex}}
