/* Oyun 06 — Akari / Işıklar */
.akari-catalog-art{background:linear-gradient(135deg,#fff5d7,#ffecb6);color:#8c6017;overflow:hidden}
.akari-demo{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);width:min(150px,100%);aspect-ratio:1;max-height:100%;gap:3px;place-items:stretch}
.akari-demo>*{display:grid;place-items:center;font-style:normal;font-weight:900;background:#fff8dd;border:1px solid #d2b879;color:#6d5219;border-radius:3px;font-size:clamp(.8rem,2vw,1.3rem)}
.akari-demo b{background:#243c4d;color:#fff}.akari-demo i{background:#fff5c6}
.akari-command-bar .arena-head-actions .btn{background:linear-gradient(180deg,#13a49a,#0a867f);color:white;border-color:#0a7872;box-shadow:0 4px 0 #085d56}
.akari-command-bar .arena-head-actions .btn:hover:not(:disabled){background:#0c8d84!important;color:white!important}
.akari-playground{background:var(--theme-bg,#f7fafb);display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:0}
.akari-play-area{width:min(100%,700px);height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:0}
.akari-board{--akari-size:500px;--akari-n:6;width:min(100%,var(--akari-size));height:auto;aspect-ratio:1;flex:0 0 auto;display:grid;grid-template-columns:repeat(var(--akari-n),minmax(0,1fr));grid-template-rows:repeat(var(--akari-n),minmax(0,1fr));border:4px solid #294459;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 0 0 7px #edf2f7,0 11px 24px #113c5222}
.akari-cell{min-width:0;min-height:0;appearance:none;border:1px solid #b9c9d4;display:grid;place-items:center;background:#fff;color:#1f3a50;font-family:Nunito,Arial,sans-serif;font-size:clamp(1rem,3.3vmin,2rem);font-weight:900;cursor:pointer;padding:0;user-select:none;touch-action:manipulation}
.akari-cell:hover:not(:disabled){box-shadow:inset 0 0 0 3px #69bdb3}
.akari-cell.lit{background:#fff2ad}
.akari-cell.bulb{background:#ffdf7b;font-size:clamp(1.1rem,3.5vmin,2.05rem)}
.akari-cell.is-wall{opacity:1!important;background:#243949;color:#fff;border-color:#1c3143;cursor:default}
.akari-controls{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.akari-controls .btn{min-width:112px;min-height:42px}
.akari-play-area .feedback{width:min(100%,630px);min-height:26px}
.akari-race-area{gap:9px}.akari-race-board{--akari-size:340px;box-shadow:0 0 0 4px #fff9,0 9px 20px #092b391a}.akari-race-board .akari-cell{font-size:clamp(.85rem,2vmin,1.55rem)}
html[data-theme="dark"] .akari-catalog-art{background:linear-gradient(135deg,#423715,#53472b);color:#ffe49b}
html[data-theme="dark"] .akari-playground{background:#182735}html[data-theme="dark"] .akari-board{border-color:#b1c5d3;box-shadow:0 0 0 7px #2a4153,0 12px 26px #0004}
html[data-theme="dark"] .akari-cell{background:#283e51;border-color:#576f80;color:#eaf5ff}
html[data-theme="dark"] .akari-cell.lit{background:#62502b;color:#fff4cb}html[data-theme="dark"] .akari-cell.bulb{background:#8c702d;color:#fff}html[data-theme="dark"] .akari-cell.is-wall{background:#10212e;color:#fff}
@media(max-width:700px){.akari-board{border-width:3px;border-radius:10px}.akari-cell{font-size:clamp(.85rem,4.1vw,1.35rem)}.akari-cell.bulb{font-size:clamp(.9rem,5vw,1.5rem)}.akari-controls .btn{min-width:92px;min-height:38px;font-size:.82rem}}
@page akariA4{size:A4 portrait;margin:5mm}
@media print{
.akari-print-sheet{page:akariA4;width:200mm!important;height:287mm!important;max-height:287mm!important}
.akari-print-sheet .sheet-head{height:25mm!important;min-height:25mm!important;padding-top:.25mm}
.akari-print-sheet .sheet-head h1{font-size:18pt!important}.akari-print-sheet .print-howto{font-size:8.5pt!important;margin-top:1mm!important}.akari-print-sheet .print-rule{font-size:8.9pt!important;margin-top:.5mm!important}
.akari-print-body{flex:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:1.5mm;min-height:0;align-items:center;justify-items:center}
.akari-print-card{width:64.3mm;height:76.3mm;max-width:100%;min-height:0;display:flex;align-items:center;justify-content:center;border:.28mm solid #909090;border-radius:1.6mm;break-inside:avoid}
.akari-print-grid{width:59mm;height:59mm;display:grid;grid-template-columns:repeat(var(--akari-n),minmax(0,1fr));grid-template-rows:repeat(var(--akari-n),minmax(0,1fr));border:.4mm solid #222}
.akari-print-cell,.akari-print-wall{display:grid;place-items:center;border:.14mm solid #888;font:bold 10pt/1 Arial,sans-serif;color:#141414}
.akari-print-wall{background:#222!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.akari-print-sheet .sheet-footer{height:8mm}
}
/* Explicit contrast: prevent white-on-white controls in the dark theme. */
.akari-command-bar #akari-settings{background:linear-gradient(180deg,#0fa49a,#0c857e);color:#fff;border:1px solid #0b726e;box-shadow:0 4px 0 #0a5d58}
.akari-command-bar #akari-settings:hover,.akari-command-bar #akari-settings:focus-visible{background:#087c77!important;color:#fff!important}
.akari-controls .btn.glass,.akari-race-stage .race-actions .btn.glass{background:#f3f8fc;color:#24415d;border:1px solid #bbcedd}
.akari-controls .btn.glass:hover:not(:disabled),.akari-race-stage .race-actions .btn.glass:hover:not(:disabled){background:#e2eff5;color:#173b56}
html[data-theme="dark"] .akari-controls .btn.glass,html[data-theme="dark"] .akari-race-stage .race-actions .btn.glass{background:#294456;color:#f0f9ff;border-color:#678397}
html[data-theme="dark"] .akari-controls .btn.glass:hover:not(:disabled),html[data-theme="dark"] .akari-race-stage .race-actions .btn.glass:hover:not(:disabled){background:#365b70;color:#fff}
html[data-theme="dark"] body[data-game="akari"] .mode-button:not(.active){color:#d5f7f4}
html[data-theme="dark"] body[data-game="akari"] #mode-print{color:#dbe5ff}
html[data-theme="dark"] body[data-game="akari"] #mode-race{color:#ffe4cf}
html[data-theme="dark"] .akari-controls button.btn.glass,html[data-theme="dark"] .akari-race-stage button.btn.glass{background:#294456!important;color:#f0f9ff!important;border-color:#678397!important}
html[data-theme="dark"] .akari-controls button.btn.glass:hover:not(:disabled),html[data-theme="dark"] .akari-race-stage button.btn.glass:hover:not(:disabled){background:#365b70!important;color:#fff!important}
html[data-theme="dark"] body[data-game="akari"] button.mode-button:not(.active){color:#e6efff!important}
html[data-theme="dark"] body[data-game="akari"] #mode-class{color:#def6f3!important}
html[data-theme="dark"] body[data-game="akari"] #mode-race{color:#ffead8!important}
html[data-theme="dark"] body[data-game="akari"] #mode-print{color:#e2e8ff!important}
/* Branded fallback controls, explicit IDs outrank generic glass button rules. */
#akari-undo,#akari-clear,#akari-race-left-undo,#akari-race-right-undo{background:#236277!important;color:#fff!important;border:1px solid #286b80!important}
#akari-undo:hover,#akari-clear:hover,#akari-race-left-undo:hover,#akari-race-right-undo:hover{background:#17536b!important;color:#fff!important}
#akari-settings{background:#117d78!important;color:#fff!important}
html[data-theme="dark"] #mode-class{color:#ddf8f2!important}
html[data-theme="dark"] #mode-race{color:#ffe8cf!important}
html[data-theme="dark"] #mode-print{color:#e2e9ff!important}
