/* Sakin Taslar - stil. 50+ icin: buyuk dokunma hedefleri, yuksek kontrast (metin >= 7:1), sade yuzeyler, hareket azaltma. Sistem yazi tipi (indirme yok). */
:root, html[data-theme="garden"] {
  --bg: #f4eedd; --bg2: #e6eed3; --ink: #1c2b20; --ink2: #263829; --accent: #1f5a2e; --accent-ink: #ffffff; --card: #fffaf0; --line: #1c2b20;
  --sel: #b45309; --path: #e0a526; --hint: #1f64c8; --veil: rgba(244, 238, 221, .30); --veilg: rgba(244, 238, 221, .46); --warn: #8a1f1f; --tileside: #c9bb98; --tileface: #fffaf0; --overlay: rgba(28, 43, 32, .58);
  --u: 1;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans JP", "Noto Sans KR", sans-serif;
}
html[data-theme="sea"] { --veil: rgba(227, 240, 241, .30); --veilg: rgba(227, 240, 241, .46); --bg: #e3f0f1; --bg2: #cfe6ea; --ink: #0e2a38; --ink2: #1d3a4b; --accent: #0f4c6b; --card: #f7fcfc; --line: #0e2a38; --sel: #a14a00; --path: #e8a93a; --hint: #1f64c8; --tileside: #b9cfcf; }
html[data-theme="sunset"] { --veil: rgba(251, 232, 211, .32); --veilg: rgba(251, 232, 211, .50); --bg: #fbe8d3; --bg2: #f6d4c2; --ink: #3a1823; --ink2: #4a2331; --accent: #7e2a2a; --card: #fff8f0; --line: #3a1823; --sel: #8c3a00; --path: #e0a526; --hint: #1f64c8; --tileside: #d8bda6; }
html.hc { --bg: #ffffff; --bg2: #ffffff; --ink: #000000; --ink2: #000000; --accent: #000000; --accent-ink: #ffffff; --card: #ffffff; --line: #000000; --sel: #000000; --path: #ffcc00; --hint: #000000; --warn: #7a0000; --tileside: #777777; --tileface: #ffffff; --overlay: rgba(0, 0, 0, .7); }
html[data-text="1"] { --u: 1; } html[data-text="2"] { --u: 1.18; } html[data-text="3"] { --u: 1.36; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: calc(18px * var(--u)); line-height: 1.35; overflow: hidden; -webkit-user-select: none; user-select: none; overscroll-behavior: none; touch-action: manipulation; }
#app { position: fixed; inset: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); }
#bg svg { width: 100%; height: 100%; display: block; }
#bg.art { background-size: cover; background-position: center bottom; background-repeat: no-repeat; }
#bg.art::after { content: ""; position: absolute; inset: 0; background: var(--veil); }
html[data-screen="game"] #bg.art::after { background: var(--veilg); }
html.hc #bg { display: none; }
#screens { position: absolute; inset: 0; z-index: 1; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); transition: opacity .25s ease; }
.screen.enter { animation: sc-in .25s ease both; } .screen.leaving { opacity: 0; pointer-events: none; }
@keyframes sc-in { from { opacity: 0; } to { opacity: 1; } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--sel); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; } h1:focus, h2:focus { outline: none; }

/* ---- dugmeler ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 3px solid var(--line); background: var(--card); color: var(--ink); border-radius: 22px; font-weight: 700; min-height: calc(56px * var(--u)); padding: 8px 16px; }
.btn .bi { width: calc(30px * var(--u)); height: calc(30px * var(--u)); display: inline-flex; flex: none; } .btn .bi svg, .ic { width: 100%; height: 100%; display: block; } .aic { background-repeat: no-repeat; }
.btn.round { width: calc(56px * var(--u)); padding: 0; border-radius: 50%; flex: none; }
.btn.round .bl { display: none; }
.btn.round.lab { width: auto; border-radius: 28px; padding: 8px 18px 8px 12px; } .btn.round.lab .bl { display: inline; }
.bigbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: calc(76px * var(--u)); padding: 12px 18px; border: 3px solid var(--line); border-radius: 24px; background: var(--card); color: var(--ink); font-weight: 800; font-size: 1.2em; text-align: center; box-shadow: 0 5px 0 var(--tileside); }
.bigbtn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--tileside); }
.bigbtn .bs { font-size: .78em; font-weight: 600; color: inherit; opacity: 1; } .bigbtn .bi { width: calc(34px * var(--u)); height: calc(34px * var(--u)); }
.bigbtn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
html.hc .bigbtn.primary { border-color: #000; }
.bigbtn.warn { border-color: var(--warn); color: var(--warn); }
.bigbtn.done { border-style: solid; }
.btn.tool { min-width: 0; flex: 1; flex-direction: column; gap: 4px; min-height: calc(76px * var(--u)); border-radius: 22px; font-size: .86em; padding: 6px 4px; box-shadow: 0 4px 0 var(--tileside); }
.btn.half { min-width: 0; flex: 1; flex-direction: column; gap: 4px; min-height: calc(76px * var(--u)); font-size: .9em; box-shadow: 0 4px 0 var(--tileside); }

/* ---- ana ekran ---- */
.home { flex: 1; display: flex; flex-direction: column; justify-content: safe center; overflow-y: auto; gap: 26px; padding: 20px 22px; max-width: 520px; width: 100%; margin: 0 auto; }
.hhead { text-align: center; } .logo-wrap { width: calc(132px * var(--u)); margin: 0 auto 6px; } .logo { width: 100%; display: block; } .logo .o2 rect { stroke: var(--line); stroke-width: 3; }
.ttl { font-size: 2.1em; font-weight: 800; letter-spacing: .2px; line-height: 1.1; } .tag { margin-top: 6px; font-size: 1.02em; color: var(--ink2); font-weight: 600; }
.hbtns { display: flex; flex-direction: column; gap: 16px; } .hrow { display: flex; gap: 14px; }

/* ---- oyun ---- */
.game { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.gbar { display: flex; align-items: center; gap: 12px; padding: 4px 12px; height: calc(66px * var(--u)); flex: none; }
.gtt { min-width: 0; display: flex; flex-direction: column; } .gtitle { font-weight: 800; font-size: 1.15em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gcount { font-size: .92em; color: var(--ink2); font-weight: 700; }
.gmain { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px; position: relative; }
html.onehand .gmain { align-items: flex-end; }
.board { position: relative; flex: none; outline: none; }
.tile { position: absolute; margin: 0; padding: 5px; display: flex; align-items: center; justify-content: center; background-color: var(--tileface); background-image: linear-gradient(155deg, rgba(255, 255, 255, .75) 0%, rgba(255, 255, 255, 0) 52%, rgba(214, 190, 140, .22) 100%); border: 3px solid var(--line); border-radius: calc(var(--ts, 70px) * .2); box-shadow: 0 4px 0 var(--tileside); transition: transform .18s ease, opacity .3s ease, background-color .2s ease, box-shadow .2s ease; touch-action: manipulation; }
.tile .sym, .tile .aimg { width: 100%; height: 100%; display: block; pointer-events: none; } .tile .aimg { background-repeat: no-repeat; }
.sym { stroke: #1b2536; stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; fill: none; }
html.hc .sym { stroke-width: 6.5; stroke: #000; }
.tile:active { transform: translateY(2px); background-color: #ecd9ab; }
.tile.sel { background-color: #fff0c4; box-shadow: 0 0 0 6px var(--sel), 0 0 20px 8px rgba(255, 150, 40, .5), 0 4px 0 var(--tileside); transform: translateY(-2px) scale(1.04); z-index: 3; }
html.hc .tile.sel { background-color: #ffe14d; background-image: none; box-shadow: 0 0 0 8px #000; }
.tile.hint { background-color: #eef5ff; box-shadow: 0 0 0 6px var(--hint), 0 0 22px 8px rgba(60, 140, 255, .5); z-index: 3; }
html.hc .tile.hint { background-color: #ffe14d; background-image: none; box-shadow: 0 0 0 8px #000; }
.tile.matched { background-color: #fff2b0; transform: scale(1.07); z-index: 4; }
.board.dim .tile:not(.gone) { background-color: #d3dae6; background-image: none; box-shadow: 0 4px 0 #9aa6bb; transition: background-color .3s ease; } .board.dim .tile:not(.gone) .aimg, .board.dim .tile:not(.gone) .sym { opacity: .78; }
html.hc .aimg { filter: contrast(1.12) saturate(1.08); }
.tile.gone { opacity: 0; transform: scale(.82); visibility: hidden; pointer-events: none; transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s; }
.pathsvg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 6; }
.pl { fill: none; stroke-linecap: round; stroke-linejoin: round; } .pl.p1 { stroke: var(--line); stroke-width: 12; } .pl.p2 { stroke: var(--path); stroke-width: 6; } .pl.hintpath { opacity: .9; }
.gtools { display: flex; gap: 10px; padding: 6px 12px 12px; height: calc(92px * var(--u)); flex: none; }

/* ---- pencereler ---- */
#overlay { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.modal-wrap { position: absolute; inset: 0; pointer-events: auto; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; animation: sc-in .2s ease both; }
.modal-wrap.out { opacity: 0; transition: opacity .2s ease; }
.modal { background: var(--bg); color: var(--ink); border: 3px solid var(--line); border-radius: 28px; padding: 22px 20px; width: 100%; max-width: 480px; max-height: 92%; overflow-y: auto; }
.mtitle { font-size: 1.4em; font-weight: 800; text-align: center; margin-bottom: 12px; } .mtext { font-size: 1.05em; margin-bottom: 16px; }
.mbtns { display: flex; flex-direction: column; gap: 12px; }
.howto .steps { margin: 12px 0 18px; padding-left: 1.4em; font-size: 1em; display: flex; flex-direction: column; gap: 8px; font-weight: 600; } .demo-wrap { background: var(--card); border: 3px solid var(--line); border-radius: 18px; padding: 8px; } .demo { width: 100%; display: block; } .demo .o2 rect { stroke: var(--line); stroke-width: 3; }
.win { text-align: center; } .wmark { width: calc(64px * var(--u)); height: calc(64px * var(--u)); margin: 0 auto 8px; color: var(--accent); } .wcheer { font-size: 1.5em; font-weight: 800; margin-bottom: 8px; } .wl { font-size: 1.05em; color: var(--ink2); font-weight: 600; margin-bottom: 6px; } .wbtns { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.toast { position: absolute; left: 16px; right: 16px; bottom: calc(110px * var(--u) + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 480px; background: var(--ink); color: var(--bg); padding: 14px 18px; border-radius: 18px; font-weight: 700; font-size: 1em; text-align: center; z-index: 60; animation: sc-in .2s ease both; pointer-events: none; }
.toast.out { opacity: 0; transition: opacity .3s ease; }
html.hc .toast { background: #000; color: #fff; }

/* ---- ayarlar / gunluk ---- */
.settings, .daily { flex: 1; display: flex; flex-direction: column; min-height: 0; max-width: 620px; width: 100%; margin: 0 auto; }
.sbar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; flex: none; } .stitle { font-size: 1.5em; font-weight: 800; }
.sscroll, .dscroll { flex: 1; overflow-y: auto; padding: 6px 16px 28px; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 14px; }
.trow { display: flex; align-items: center; gap: 12px; min-height: calc(68px * var(--u)); padding: 10px 14px; background: var(--card); border: 3px solid var(--line); border-radius: 20px; } .tl { flex: 1; display: flex; flex-direction: column; } .tt { font-weight: 800; font-size: 1.08em; } .td { font-size: .84em; color: var(--ink2); font-weight: 600; }
.tgl { position: relative; flex: none; width: calc(76px * var(--u)); height: calc(44px * var(--u)); border-radius: 999px; border: 3px solid var(--line); background: var(--card); padding: 0; }
.tgl .knob { position: absolute; top: 2px; left: 2px; width: calc(34px * var(--u)); height: calc(34px * var(--u)); border-radius: 50%; background: var(--ink); color: var(--card); display: flex; align-items: center; justify-content: center; padding: 6px; transition: left .2s ease; }
.tgl .knob svg { width: 100%; height: 100%; stroke-width: 3; }
.tgl.on { background: var(--accent); } .tgl.on .knob { left: calc(100% - 34px * var(--u) - 5px); background: var(--card); color: var(--accent); } html.hc .tgl.on .knob { color: #000; }
.sec { display: flex; flex-direction: column; gap: 8px; } .sh { font-size: 1.1em; font-weight: 800; } .note, .ptext { font-size: .9em; color: var(--ink2); font-weight: 600; } .ptext { font-size: 1em; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; } .seg.col { flex-direction: column; } .seg.row3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.opt { flex: 1; min-width: 0; min-height: calc(60px * var(--u)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 10px; border: 3px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); font-weight: 800; text-align: center; }
.opt .os { font-size: .9em; font-weight: 600; } .opt.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } html.hc .opt.on { border-color: #000; }
.opt.locked { border-style: dashed; } .opt .ob { display: inline-flex; align-items: center; gap: 4px; font-size: .88em; font-weight: 800; } .obi { width: 1.1em; height: 1.1em; display: inline-flex; }
.langgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .lbtn { min-height: calc(56px * var(--u)); border: 3px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); font-weight: 700; padding: 6px 8px; } .lbtn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pack { background: var(--card); border: 3px solid var(--line); border-radius: 22px; padding: 16px; } .pw-price { font-weight: 800; font-size: 1.1em; } .pw-msg { min-height: 1.3em; color: var(--warn); font-weight: 700; font-size: .95em; }
.ver { text-align: center; color: var(--ink2); font-size: .85em; font-weight: 600; }
.dintro { font-size: .98em; color: var(--ink2); font-weight: 600; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .stat { background: var(--card); border: 3px solid var(--line); border-radius: 18px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; } .sv { font-size: 1.7em; font-weight: 800; line-height: 1.1; } .sl { font-size: .78em; font-weight: 700; color: var(--ink2); }
.l7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; } .l7d { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; border: 3px solid var(--line); border-radius: 14px; background: var(--card); font-weight: 800; } .l7k { width: 26px; height: 26px; display: inline-flex; }
.l7d.done { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } html.hc .l7d.done { border-color: #000; } .l7d.today { box-shadow: 0 0 0 3px var(--sel); }
.wkdays, .cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; } .wkdays span { text-align: center; font-weight: 800; font-size: .9em; color: var(--ink2); }
.cd { position: relative; min-height: calc(46px * var(--u)); display: flex; align-items: center; justify-content: center; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 700; } .cd.empty { border: none; background: none; } .cd.future { border-style: dashed; color: var(--ink2); }
.cd.done { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } html.hc .cd.done { border-color: #000; } .cd.today { box-shadow: 0 0 0 3px var(--sel); } .cd .dk { position: absolute; right: 2px; bottom: 1px; width: 15px; height: 15px; display: inline-flex; }
.dnote { font-weight: 700; font-size: 1em; color: var(--ink2); } .dnote.ok { color: var(--accent); font-weight: 800; } html.hc .dnote.ok { color: #000; }
.sscroll > *, .dscroll > * { flex: none; }
.dfoot { padding: 10px 16px calc(16px + 0px); flex: none; }
/* hareket azaltma */
html.reduce-fx *, html.reduce-fx *::before, html.reduce-fx *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
/* dar ekran */
@media (max-width: 340px) { .btn.tool .bl { font-size: .9em; } .ttl { font-size: 1.8em; } }
@media (orientation: landscape) and (max-height: 520px) {
  .game { display: grid; grid-template-columns: 1fr calc(132px * var(--u)); grid-template-rows: calc(64px * var(--u)) 1fr; }
  .gbar { grid-column: 1; grid-row: 1; height: calc(64px * var(--u)); } .gmain { grid-column: 1; grid-row: 2; }
  .gtools { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; height: auto; padding: 8px 10px 8px 4px; } .btn.tool { min-height: 0; flex: 1; } .home { flex-direction: row; flex-wrap: wrap; align-items: center; max-width: 900px; } .hhead { flex: 1 1 40%; } .hbtns { flex: 1 1 50%; } }

/* uzun yerel metinler: kirp/tasma yok */
.btn .bl, .bigbtn .bt, .bigbtn .bs, .opt .ot, .opt .os, .tt, .td, .sl, .lbtn { overflow-wrap: anywhere; hyphens: auto; min-width: 0; }
.btn.tool .bl, .btn.half .bl { font-size: .9em; line-height: 1.12; text-align: center; max-width: 100%; }
.btn.tool, .btn.half { padding: 6px 3px; }
.tl { min-width: 0; } .trow { min-width: 0; }
.seg.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.theme { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.stats3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stat { min-width: 0; padding: 10px 4px; } .stat .sv { font-size: 1.5em; } .stat .sl { font-size: .8em; }
.opt { font-size: .96em; padding: 8px 6px; }
html[data-text="2"] .logo-wrap, html[data-text="3"] .logo-wrap { width: 84px; } html[data-text="3"] .ttl { font-size: 1.8em; }
.home > * { flex: none; }
