:root{color-scheme:light;--surface:#eee8dc;--source:#715136;--target:#ffffff}
.cat-cross::before,.cat-cross::after{background:#fff}
.cat-cross{filter:none}
.tutorial-entry{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;padding:10px;margin:-5px 0 14px;border:1px solid var(--line);border-radius:12px}
.tutorial-entry>.icon:last-child{width:16px}
.cat-instruction,.cat-hint{padding:15px;border:1px solid var(--line);background:var(--sand);border-radius:14px;margin:0 0 15px}
.cat-instruction h2{font-size:18px;margin:5px 0 8px}.cat-instruction p,.cat-hint p{font-size:14px;line-height:1.65}
.cat-instruction .soft-button{margin-top:9px}.lesson-progress,.lesson-status{font-size:12px;color:var(--muted)}
.lesson-status{margin-top:8px;min-height:21px}.lesson-key{display:flex;align-items:center;gap:7px;margin-top:8px}
.cat-instruction .lesson-context{font-size:13px;margin-top:8px;color:var(--ink)}
.source-key,.goal-key{width:15px;height:15px;border:2px dashed var(--source);border-radius:3px}
.goal-key{border:2px solid var(--ink);margin-left:8px}
.cat-cell.tutorial-source::after,.cat-cell.hint-source::after{display:block;inset:3px;border:2px dashed var(--source);border-radius:4px}
.cat-cell.tutorial-goal::after,.cat-cell.hint-target::after{display:block;inset:2px;border:3px solid var(--target);box-shadow:inset 0 0 0 1px #343b40;border-radius:4px}
.cat-hint{margin:0 0 10px}.cat-hint h3{font-size:16px;margin-bottom:5px}.cat-hint .soft-button{margin:10px 8px 0 0}
.lesson-list{display:grid;gap:7px}.lesson-item{display:flex;align-items:center;gap:10px;padding:12px;text-align:left;background:var(--sand);border-radius:10px}
.lesson-item>span{min-width:23px;color:var(--muted)}.lesson-item>b{flex:1;font-size:14px}.lesson-item>.icon{width:16px}
.cat-filters{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.cat-filters .soft-button{min-height:38px;padding:8px 11px;font-size:13px}
.level-note{font-size:13px;line-height:1.65;margin-bottom:12px}
.xiangqi-board::before,.xiangqi-cell::before,.xiangqi-cell::after{content:none}
.xiangqi-grid{position:absolute;inset:8px;width:calc(100% - 16px);height:calc(100% - 16px);pointer-events:none;z-index:-1;color:#8b6f49}
.xiangqi-grid path{fill:none;stroke:currentColor;stroke-width:.025}
.xiangqi-grid text{fill:currentColor;font-size:.44px;text-anchor:middle;dominant-baseline:central;letter-spacing:.06px;font-family:"Microsoft YaHei","PingFang SC",sans-serif}
.chess-summary{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:14px;margin-top:12px;background:var(--sand);border:1px solid var(--line);border-radius:14px;text-align:center}
.chess-summary b{font-size:20px}.chess-summary span{font-size:12px;color:var(--muted);flex-basis:100%}.chess-summary p{font-size:13px}

:root[data-theme="dark"]{color-scheme:dark;--paper:#191b20;--ink:#e1d8ca;--muted:#aaa397;--line:#3c3d41;--sand:#27292f;--surface:#2c2d33;--tray:#3c3634;--cell:#514743;--orange:#e59c73;--source:#f7d8a1;--target:#ffffff}
[data-theme="dark"] .featured{background:#302a27}[data-theme="dark"] .featured.cats-feature{background:#252f2a}
[data-theme="dark"] .featured h2{color:#e0d0bb}[data-theme="dark"] .cats-feature h2{color:#b8cba5}
[data-theme="dark"] .game-card{background:#25262c;border-color:#32333a}
[data-theme="dark"] .card-art .icon,[data-theme="dark"] .art-sudoku,[data-theme="dark"] .card-symbol,[data-theme="dark"] .chess-preview{color:#b8a78e}
[data-theme="dark"] .art-sudoku span{background:#38383a}[data-theme="dark"] .art-puzzle span{background:#775e3d;color:#f0d6ac}[data-theme="dark"] .art-puzzle span:last-child{background:#343233}
[data-theme="dark"] .mini-2048{background:#4b4037}[data-theme="dark"] .mini-2048 span[data-v="0"]{background:#675648}
[data-theme="dark"] .mini-cats{background:#ffffff0d}[data-theme="dark"] .mini-cats span{filter:brightness(.68)}
[data-theme="dark"] .soft-button,[data-theme="dark"] .level-button,[data-theme="dark"] .number-pad button,[data-theme="dark"] .sokoban-controls button,[data-theme="dark"] .dialog-close{background:var(--surface)}
[data-theme="dark"] .soft-button.primary{background:#927958;color:#fff7e8}
[data-theme="dark"] .soft-button.active,[data-theme="dark"] .cat-view-controls .soft-button.active{background:#554733;color:#efd4a5}
[data-theme="dark"] .soft-button.quiet{background:transparent}[data-theme="dark"] .cat-view-controls .soft-button{background:var(--surface)}
[data-theme="dark"] .segmented{background:var(--surface)}[data-theme="dark"] .segmented button.selected{background:#4b443b;color:#f4dec0}
[data-theme="dark"] .choice-button,[data-theme="dark"] .choice-option,[data-theme="dark"] .difficulty{background:var(--surface);border-color:#4c4842}
[data-theme="dark"] .choice-option.selected{background:#554733;border-color:#9b8058}
[data-theme="dark"] .stat:first-child{background:var(--sand);border-color:var(--line)}[data-theme="dark"] .stat-label{color:var(--muted)}
[data-theme="dark"] .hearts .empty{color:#50433f}[data-theme="dark"] .cat-found .icon,[data-theme="dark"] .game-time,[data-theme="dark"] .chess-last-move{color:var(--muted)}
[data-theme="dark"] .switch i{background:#474747}[data-theme="dark"] .switch input:checked+i{background:#68835e}
[data-theme="dark"] .cat-board{background:#25272d}[data-theme="dark"] .region-number{color:#fff9dca6}
[data-theme="dark"] .gomoku-board{background:#796346}[data-theme="dark"] .gomoku-cell::before,[data-theme="dark"] .gomoku-cell::after{background:#c3a07388}[data-theme="dark"] .gomoku-cell .star{background:#c2a175}
[data-theme="dark"] .reversi-board{background:#394d40}[data-theme="dark"] .reversi-cell{background:#516851}[data-theme="dark"] .reversi-cell.legal::before{background:#c1d1a7b3}
[data-theme="dark"] .sudoku-board{background:#6f6251;border-color:#8a7962}[data-theme="dark"] .sudoku-cell{background:#26282c}
[data-theme="dark"] .sudoku-cell.given{color:#d7ccb8}[data-theme="dark"] .sudoku-cell.entered{color:#90c7b0}
[data-theme="dark"] .sudoku-cell.related{background:#303136}[data-theme="dark"] .sudoku-cell.same{background:#3c3b3d}[data-theme="dark"] .sudoku-cell.selected{background:#675137}
[data-theme="dark"] .sudoku-cell.conflict{background:#51312d;color:#ffc1a7}[data-theme="dark"] .notes-grid{color:#b7ad9c}
[data-theme="dark"] .number-pad button.selected{background:#675137}
[data-theme="dark"] .mine-board{background:#45423e}[data-theme="dark"] .mine-cell{background:#6a5c49}[data-theme="dark"] .mine-cell.open{background:#2d2f32}
[data-theme="dark"] .mine-cell[data-number="1"]{color:#8fbfe9}[data-theme="dark"] .mine-cell[data-number="2"]{color:#a0c984}[data-theme="dark"] .mine-cell[data-number="3"]{color:#f1aa88}[data-theme="dark"] .mine-cell[data-number="4"]{color:#c5a5e6}
[data-theme="dark"] .mine-cell .icon,[data-theme="dark"] .mine-symbol{color:#e5be8a}[data-theme="dark"] .mine-cell.revealed-mine{background:#51493f}
[data-theme="dark"] .mine-cell.exploded{background:#a94f3c;color:#ffe4d3}[data-theme="dark"] .mine-cell.wrong-flag{background:#654334}[data-theme="dark"] .flag-cross{color:#ffbba4}
[data-theme="dark"] .mine-summary{background:var(--sand)}[data-theme="dark"] .mine-summary.lost b{color:#eeac8d}[data-theme="dark"] .mine-summary.won b{color:#b5d29e}
[data-theme="dark"] .puzzle-board,[data-theme="dark"] .tictactoe-board{background:#4c4035}[data-theme="dark"] .puzzle-cell{background:#806542;color:#f5ddbd}
[data-theme="dark"] .puzzle-cell:nth-child(3n+2){background:#877052}[data-theme="dark"] .puzzle-cell.correct{background:#536746;color:#e1efd0}[data-theme="dark"] .puzzle-cell.empty{background:#493f34}
[data-theme="dark"] .tictactoe-cell{background:#313035}[data-theme="dark"] .tictactoe-cell.win{background:#4a5d43}[data-theme="dark"] .tic-mark{color:#eaa07c}[data-theme="dark"] .tic-mark.circle{color:#8ebfac}
[data-theme="dark"] .connect4-board{background:#405363}[data-theme="dark"] .connect-disc.empty{background:#282a2f}
[data-theme="dark"] .lights-board{background:#4d4035}[data-theme="dark"] .light-cell{background:#665b4d}[data-theme="dark"] .light-cell.on{background:#c59a41;box-shadow:inset 0 0 0 2px #debd6b}
[data-theme="dark"] .memory-board{background:#4f4438}[data-theme="dark"] .memory-cell{background:#846445}[data-theme="dark"] .memory-cell.shown{background:var(--card-color);filter:brightness(.72)}
[data-theme="dark"] .nonogram-board,[data-theme="dark"] .nurikabe-board,[data-theme="dark"] .sokoban-board{background:#4a4540}
[data-theme="dark"] .nonogram-cell{background:#292d30;color:#c1b29e}[data-theme="dark"] .nonogram-cell[data-mark="1"]{background:#719b92}
[data-theme="dark"] .nonogram-clue{color:#d1c3ae}[data-theme="dark"] .nonogram-clue.complete,[data-theme="dark"] .loop-clue.complete{color:#95c7aa}
[data-theme="dark"] .loop-board{background:#29292e;border-color:#50483d}[data-theme="dark"] .loop-dot{background:#b5a58c}
[data-theme="dark"] .loop-edge>span{color:#c2b69f}[data-theme="dark"] .loop-edge[data-mark="1"]>span{background:#e1a36f}[data-theme="dark"] .loop-clue.conflict{color:#efaa92}
[data-theme="dark"] .nurikabe-cell{background:#454140}[data-theme="dark"] .nurikabe-cell[data-mark="1"]{background:#988974;color:#191b20}[data-theme="dark"] .nurikabe-cell[data-mark="2"]{background:#315563;color:#e7e2d7}
[data-theme="dark"] .sokoban-cell{background:#675845}[data-theme="dark"] .sokoban-cell.wall{background:linear-gradient(0deg,#3c3735 48%,#63534b 49% 55%,#3c3735 56%)}
[data-theme="dark"] .sokoban-cell.goal{background:#4e6444}[data-theme="dark"] .box-person{color:#ffd4ac}[data-theme="dark"] .box-goal{color:#cee0b7}
[data-theme="dark"] .box-crate{background:#b8874f;color:#342314;border-color:#e0b67e}[data-theme="dark"] .sokoban-cell.goal .box-crate{background:#87a374;border-color:#c9dfa5}
[data-theme="dark"] .xiangqi-board{background:#6b553a;border-color:#917751}[data-theme="dark"] .xiangqi-grid{color:#d1b586}
[data-theme="dark"] .xiangqi-piece{background:radial-gradient(circle at 35% 25%,#cfb37e,#ab8654);box-shadow:0 2px 2px #17171a80,inset 0 0 0 2px #d7b583;color:#832f22;border-color:#863f2c}
[data-theme="dark"] .xiangqi-piece.black{color:#252d27;border-color:#374132}[data-theme="dark"] .xiangqi-cell.from{background:#e9b57535}[data-theme="dark"] .xiangqi-cell.last{background:#b9d28440}
[data-theme="dark"] .xiangqi-cell.legal:empty{background:radial-gradient(circle,#ccdfac 0 12%,transparent 14%)}
[data-theme="dark"] .chess-board{background:#645139}[data-theme="dark"] .chess-cell{background:#8d7b62}[data-theme="dark"] .chess-cell.dark{background:#45403c}
[data-theme="dark"] .chess-cell::after{color:#d8cbb6}[data-theme="dark"] .chess-cell.from,[data-theme="dark"] .chess-cell.last{background:#6b7650}[data-theme="dark"] .chess-cell.selected{background:#9d8243}
[data-theme="dark"] .chess-piece.black{color:#191b20;text-shadow:-1px 0 #baa988,0 1px #baa988,1px 0 #baa988,0 -1px #baa988}
[data-theme="dark"] .chess-notice{background:#37302aef;color:#ffc9a4}
[data-theme="dark"] .result-overlay,[data-theme="dark"] .result-overlay.transparent{background:#22252bea}[data-theme="dark"] .result-overlay p{color:var(--muted)}
[data-theme="dark"] .dialog-content,[data-theme="dark"] .settings-note,[data-theme="dark"] .release-heading time,[data-theme="dark"] .level-info{color:var(--muted)}
[data-theme="dark"] dialog::backdrop{background:#080a0d99}[data-theme="dark"] .level-item{background:var(--surface)}[data-theme="dark"] .level-item.current{background:#506140;color:#ebf2db}
[data-theme="dark"] .level-stars,[data-theme="dark"] .level-item.current .level-stars{color:#e6bc76}
[data-theme="dark"] .custom-fields input,[data-theme="dark"] #update-url,[data-theme="dark"] #feedback-form input,[data-theme="dark"] #feedback-form select,[data-theme="dark"] #feedback-form textarea{background:var(--surface);border-color:#565046}
[data-theme="dark"] .custom-fields input,[data-theme="dark"] .custom-fields .custom-error{color:var(--ink)}
@media(max-width:359px){.cat-top .soft-button{padding:9px;font-size:12px}.cat-instruction{padding:12px}.cat-instruction h2{font-size:17px}}
