:root {
  --paper: #f4eee2;
  --card: #fffcf5;
  --ink: #1d2620;
  --muted: #6c7468;
  --line: #e2d9c6;
  --accent: #d24e28;
  --accent-ink: #ffffff;
  --save: #2c7a52;
  --debt: #c0392b;
  --saffron: #e0a21b;
  --soft: #efe7d6;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(60, 40, 10, 0.25);
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
    --paper: #121512;
    --card: #1b1f1b;
    --ink: #ece5d6;
    --muted: #9aa094;
    --line: #2d332d;
    --accent: #ec6a43;
    --save: #4fbf85;
    --debt: #ef6b5b;
    --saffron: #f0b93a;
    --soft: #232823;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121512;
    --card: #1b1f1b;
    --ink: #ece5d6;
    --muted: #9aa094;
    --line: #2d332d;
    --accent: #ec6a43;
    --save: #4fbf85;
    --debt: #ef6b5b;
    --saffron: #f0b93a;
    --soft: #232823;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

#app { max-width: 560px; margin: 0 auto; padding: 16px 16px 110px; }

/* Üst bar */
.top { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.brand .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--saffron); box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--saffron) 60%, #7a4d00), inset -4px -4px 0 rgba(0, 0, 0, 0.12); position: relative; }
.brand .dot::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); top: -3px; right: -3px; }
.daynav { display: flex; align-items: center; gap: 6px; }
.daynav button { border: 1px solid var(--line); background: var(--card); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; line-height: 1; }
.daynav button:disabled { opacity: 0.35; cursor: default; }
.daynav .lbl { font-weight: 600; font-size: 14px; min-width: 112px; text-align: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }

/* Cüzdan */
.wallet { position: relative; overflow: hidden; }
.wallet .big { font-size: 56px; font-weight: 700; line-height: 1; margin: 8px 0 4px; }
.wallet .big small { font-size: 18px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.wallet .big.neg { color: var(--debt); }
.bar { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 14px 0 8px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.4s; }
.bar.over > i { background: var(--debt); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--soft); }
.chip.save { background: color-mix(in srgb, var(--save) 15%, transparent); color: var(--save); }
.chip.debt { background: color-mix(in srgb, var(--debt) 14%, transparent); color: var(--debt); }
.note { font-size: 13px; color: var(--muted); margin-top: 8px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 4px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; border-radius: 10px; }
.wd .col { width: 100%; max-width: 30px; height: 76px; background: var(--soft); border-radius: 8px; position: relative; overflow: hidden; }
.wd .col i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--save); border-radius: 8px 8px 0 0; }
.wd .col i.over { background: var(--debt); }
.wd .col .tl { position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); opacity: 0.35; }
.wd .col.unlogged { background: repeating-linear-gradient(-45deg, var(--soft), var(--soft) 4px, transparent 4px, transparent 8px); }
.wd span { font-size: 12px; color: var(--muted); font-weight: 600; }
.wd.sel span { color: var(--ink); }
.wd.sel .col { outline: 2px solid var(--ink); outline-offset: 2px; }
.wd.future .col { opacity: 0.5; }

/* Fiş */
.receipt { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 4px 4px; padding: 18px 18px 26px; position: relative; box-shadow: var(--shadow); margin-bottom: 20px; font-family: var(--mono); font-size: 14px; }
.receipt::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -10px; height: 12px;
  background: radial-gradient(circle at 6px 0, transparent 6px, var(--card) 6.5px) repeat-x; background-size: 12px 12px; }
.receipt .head { text-align: center; border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.receipt .head b { font-family: var(--sans); font-size: 18px; letter-spacing: 0.2em; }
.receipt .meal { margin-top: 12px; }
.receipt .meal-h { display: flex; justify-content: space-between; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 4px; }
.line { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; }
.line .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62%; }
.line .nm small { color: var(--muted); }
.line .dots { flex: 1; border-bottom: 1px dotted var(--muted); opacity: 0.5; transform: translateY(-4px); min-width: 10px; }
.line .x { border: 0; background: none; color: var(--muted); padding: 0 2px 0 6px; font-size: 16px; line-height: 1; }
.receipt .total { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; }
.receipt .total .line { font-weight: 700; font-size: 16px; }
.receipt .empty { text-align: center; color: var(--muted); padding: 14px 0; font-family: var(--sans); }

/* Butonlar ve formlar */
.btn { border: 0; background: var(--accent); color: var(--accent-ink); padding: 13px 18px; border-radius: 14px; font-weight: 700; font-size: 16px; width: 100%; }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.line-btn { background: none; border: 1px solid var(--line); color: var(--ink); }
.btn.sm { padding: 8px 12px; font-size: 14px; width: auto; border-radius: 10px; }
.btn.danger { background: none; color: var(--debt); border: 1px solid color-mix(in srgb, var(--debt) 40%, transparent); }
.btn:disabled { opacity: 0.5; }
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); outline: none; font-size: 16px; }
input:focus, select:focus { border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.seg button { border: 1px solid var(--line); background: var(--card); padding: 8px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; }
.seg button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Liste */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .t { flex: 1; min-width: 0; }
.item .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t small { color: var(--muted); }
.item .k { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.item button.add { border: 0; background: var(--soft); width: 36px; height: 36px; border-radius: 50%; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: var(--soft); color: var(--muted); font-weight: 600; margin-left: 6px; vertical-align: 1px; }

/* Ne yesem */
.combo { border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.combo ul { margin: 6px 0 10px; padding-left: 18px; }
.combo li { margin: 2px 0; }

/* Alt menü */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 20; }
nav.tabs .in { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 4px; width: 100%; max-width: 560px; }
nav.tabs button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 12px; font-weight: 600; color: var(--muted); border-radius: 12px; }
nav.tabs button svg { width: 24px; height: 24px; }
nav.tabs button.on { color: var(--ink); background: var(--soft); }
nav.tabs button.plus { color: var(--accent); }

/* Alt sayfa (sheet) */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade 0.15s; }
.sheet { background: var(--card); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 90vh; overflow-y: auto; animation: up 0.2s ease-out; }
.sheet .grip { width: 40px; height: 4px; border-radius: 9px; background: var(--line); margin: -6px auto 12px; }
.sheet h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.qty { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.qty button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 22px; }
.qty .v { font-family: var(--mono); font-size: 22px; font-weight: 700; min-width: 54px; text-align: center; }
.macro { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; background: var(--soft); border-radius: 14px; padding: 10px 6px; margin: 6px 0 14px; }
.macro b { display: block; font-family: var(--mono); font-size: 18px; }
.macro span { font-size: 12px; color: var(--muted); }
.swap { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 1px solid color-mix(in srgb, var(--save) 35%, transparent); background: color-mix(in srgb, var(--save) 7%, transparent);
  border-radius: 12px; padding: 9px 12px; margin-bottom: 6px; font-size: 14px; }
.swap b { color: var(--save); font-family: var(--mono); white-space: nowrap; }

/* Grafik */
.chart svg { width: 100%; height: auto; display: block; }
.chart .ax { stroke: var(--line); stroke-width: 1; }
.chart .lbl { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .pt { fill: var(--muted); opacity: 0.6; }
.chart .tr { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .fc { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 6; stroke-linecap: round; }
.chart .goal { stroke: var(--save); stroke-width: 1.5; stroke-dasharray: 2 4; }
.chart .goal-t { fill: var(--save); font-size: 11px; font-family: var(--mono); }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat3 > div { background: var(--soft); border-radius: 12px; padding: 10px; }
.stat3 b { display: block; font-family: var(--mono); font-size: 19px; }
.stat3 span { font-size: 12px; color: var(--muted); }
.conf { height: 6px; background: var(--soft); border-radius: 9px; overflow: hidden; margin: 8px 0 4px; }
.conf i { display: block; height: 100%; background: var(--saffron); }

/* Giriş ekranı */
.auth { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; }
.hero { margin-bottom: 26px; }
.hero h1 { font-size: 46px; line-height: 0.98; letter-spacing: -0.045em; margin: 16px 0 12px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); margin: 0; font-size: 17px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 60; max-width: calc(100% - 32px); animation: fade 0.2s; }
.toast.bad { background: var(--debt); color: #fff; }

@keyframes up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 380px) { .wallet .big { font-size: 46px; } .hero h1 { font-size: 38px; } }

/* Duyuru ve yönetim */
.announce { border-color: color-mix(in srgb, var(--saffron) 55%, transparent); background: color-mix(in srgb, var(--saffron) 10%, var(--card)); }
nav.tabs button { min-width: 0; }
.adm-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.adm-tiles > div { background: var(--soft); border-radius: 12px; padding: 12px; }
.adm-tiles b { display: block; font-family: var(--mono); font-size: 24px; }
.adm-tiles span { font-size: 12px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 70px; margin: 10px 0 4px; }
.bars i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: 0.85; }
.bars.alt i { background: var(--save); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 1px; }
.badge.ban { background: color-mix(in srgb, var(--debt) 15%, transparent); color: var(--debt); }
.badge.adm { background: color-mix(in srgb, var(--saffron) 20%, transparent); color: var(--ink); }
.badge.off { background: var(--soft); color: var(--muted); }
.item.dim { opacity: 0.55; }
.temp-pw { font-family: var(--mono); font-size: 26px; font-weight: 700; text-align: center; letter-spacing: 0.08em; background: var(--soft); border-radius: 12px; padding: 14px; margin: 10px 0; user-select: all; }
.por-row { display: grid; grid-template-columns: 1fr 90px 36px; gap: 6px; margin-bottom: 6px; }
.por-row button { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; }
textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font: inherit; color: inherit; min-height: 110px; resize: vertical; outline: none; }
textarea:focus { border-color: var(--accent); }
.logline { font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.logline:last-child { border-bottom: 0; }

/* Fotoğrafla ekle */
.scan-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.scan-ic { width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.scan-ic svg { width: 26px; height: 26px; }
.scan-wait { position: relative; border-radius: 16px; overflow: hidden; max-height: 46vh; background: var(--soft); }
.scan-wait img { width: 100%; display: block; object-fit: cover; max-height: 46vh; filter: saturate(0.9); }
.scan-line { position: absolute; left: 0; right: 0; height: 3px; background: var(--accent); box-shadow: 0 0 18px 4px color-mix(in srgb, var(--accent) 60%, transparent); animation: scanmove 1.6s ease-in-out infinite alternate; }
@keyframes scanmove { from { top: 4%; } to { top: 94%; } }
.scan-thumb { width: 76px; height: 76px; object-fit: cover; border-radius: 14px; flex-shrink: 0; }
.scan-item { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.scan-item.off { opacity: 0.5; }
.scan-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.scan-item .nm1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbtn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 18px; flex-shrink: 0; }
.gin { width: 80px !important; text-align: center; padding: 8px !important; }

/* ===== Genel dokunmatik iyileştirmeler ===== */
html { -webkit-tap-highlight-color: transparent; }
body { padding-top: env(safe-area-inset-top); }
button { touch-action: manipulation; }
nav.tabs .nav-brand, nav.tabs .nav-install { display: none; }
.cols > .col { min-width: 0; }
.scan-card.flash { animation: flash 1.4s ease-out 2; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }

/* ===== Kurulum kartı / penceresi ===== */
.inst-ic { width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.inst-banner { position: fixed; z-index: 50; background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 50px -12px rgba(30, 20, 0, .45); display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; animation: instin .35s cubic-bezier(.2,.9,.3,1.2); }
.inst-banner.mob { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); }
body:not(.has-nav) .inst-banner.mob { bottom: calc(12px + env(safe-area-inset-bottom)); }
.inst-banner.mob + .toast, body:not(.has-nav) .toast { bottom: 24px; }
.inst-banner.desk { right: 24px; bottom: 24px; width: 400px; }
.inst-banner.out { animation: instout .25s ease-in forwards; }
.inst-tx { flex: 1; min-width: 0; }
.inst-tx b { display: block; font-size: 15px; letter-spacing: -0.01em; }
.inst-tx span { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.inst-act { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.inst-act .btn { padding: 9px 18px; }
.inst-no { background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px; }
@keyframes instin { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes instout { to { transform: translateY(30px); opacity: 0; } }
.inst-steps { list-style: none; counter-reset: s; padding: 0; margin: 16px 0; }
.inst-steps li { counter-increment: s; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px dashed var(--line); font-size: 15px; }
.inst-steps li:last-child { border-bottom: 0; }
.inst-steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-family: var(--mono); font-size: 14px; }
.ios-arrow { text-align: center; font-size: 28px; color: var(--accent); animation: bob 1s ease-in-out infinite alternate; margin: -6px 0 8px; }
@keyframes bob { to { transform: translateY(6px); } }
.inst-card { border-color: color-mix(in srgb, var(--saffron) 45%, var(--line)); }

/* ===== Fare kullanılan cihazlar ===== */
@media (hover: hover) {
  .btn:not(:disabled):hover { filter: brightness(1.06); }
  .btn.ghost:hover, .btn.line-btn:hover { background: color-mix(in srgb, var(--ink) 8%, var(--soft)); filter: none; }
  .item[data-uid]:hover, .item[data-fid]:hover { background: var(--soft); }
  nav.tabs button:hover { color: var(--ink); }
  .seg button:not(.on):hover { border-color: var(--muted); }
}

/* ===== Tablet: biraz daha geniş tek sütun ===== */
@media (min-width: 700px) {
  #app { max-width: 680px; }
  .scrim { align-items: center; }
  .sheet { border-radius: 22px; max-width: 540px; max-height: 86vh; }
  .sheet .grip { display: none; }
  .toast { bottom: 110px; }
}

/* ===== Bilgisayar: sol menü + iki sütun ===== */
@media (min-width: 1000px) {
  body.has-nav { padding-left: 232px; }
  #app { max-width: 1080px; padding: 26px 32px 48px; }
  nav.tabs { top: 0; right: auto; width: 232px; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 6px; border-top: 0; border-right: 1px solid var(--line); padding: 26px 14px; background: var(--card); backdrop-filter: none; }
  nav.tabs .nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 24px; letter-spacing: -0.03em; padding: 0 10px 22px; }
  nav.tabs .nav-brand .dot { width: 26px; height: 26px; }
  nav.tabs .nav-brand .dot::after { width: 12px; height: 12px; background: var(--card); }
  nav.tabs .in { display: flex; flex-direction: column; gap: 4px; max-width: none; }
  nav.tabs button { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; font-size: 15px; }
  nav.tabs button svg { width: 22px; height: 22px; }
  nav.tabs .nav-install { display: flex; margin-top: auto; border: 1px dashed var(--line); color: var(--ink); }
  body.has-nav .top .brand { visibility: hidden; }
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 22px; align-items: start; }
  .wallet .big { font-size: 64px; }
  .auth { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; min-height: 86vh; }
  .auth .hero h1 { font-size: 64px; }
  .toast { bottom: 32px; }
  body.has-nav .toast { left: calc(50% + 116px); }
  .inst-banner.desk { right: 28px; bottom: 28px; }
}
@media (min-width: 1000px) and (prefers-color-scheme: dark) { nav.tabs { background: var(--card); } }

/* ===== Animasyonlu logo ===== */
.logo { display: inline-block; width: 28px; height: 28px; flex-shrink: 0; perspective: 120px; cursor: pointer; }
.logo svg { width: 100%; height: 100%; display: block; overflow: visible; transform-style: preserve-3d; filter: drop-shadow(0 1px 1.5px rgba(90, 60, 0, .35)); }
.logo .bite circle { fill: #000; transform-box: fill-box; transform-origin: center; }
.logo .shine { animation: logo-shine 6s ease-in-out 2.2s infinite; transform-box: view-box; }
.logo:not(.intro):not(.spin) svg { animation: logo-idle 6s cubic-bezier(.45, .05, .3, 1) 1.6s infinite; }
.logo:not(.intro) .bite circle { transform: scale(1); }
.logo.intro svg { animation: logo-flip 1.1s cubic-bezier(.25, .8, .3, 1) both; }
.logo.intro .bite circle { animation: logo-bite .38s cubic-bezier(.3, 1.6, .5, 1) both; }
.logo.intro .bite .b1 { animation-delay: 1.05s; }
.logo.intro .bite .b2 { animation-delay: 1.17s; }
.logo.intro .bite .b3 { animation-delay: 1.26s; }
.logo.spin svg { animation: logo-spin .8s cubic-bezier(.3, .7, .3, 1); }
@media (hover: hover) { .brand:hover .logo:not(.intro) svg { animation: logo-spin .8s cubic-bezier(.3, .7, .3, 1); } }
@keyframes logo-flip {
  0% { transform: translateY(-14px) rotateY(0) scale(.6); opacity: 0; }
  25% { opacity: 1; }
  70% { transform: translateY(0) rotateY(700deg) scale(1.08); }
  85% { transform: rotateY(730deg) scale(.96); }
  100% { transform: rotateY(720deg) scale(1); }
}
@keyframes logo-bite { 0% { transform: scale(0); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes logo-spin { 0% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }
@keyframes logo-shine {
  0%, 30% { transform: rotate(25deg) translateX(-30px); }
  44%, 100% { transform: rotate(25deg) translateX(75px); }
}
/* Boşta: her 6 saniyede bir yaylanarak tek tur döner, sonra hafifçe sallanır */
@keyframes logo-idle {
  0%, 12% { transform: rotateY(0) translateY(0); }
  20% { transform: rotateY(200deg) translateY(-3px) scale(1.08); }
  28% { transform: rotateY(360deg) translateY(0) scale(1); }
  33% { transform: rotateY(360deg) rotate(-8deg); }
  38% { transform: rotateY(360deg) rotate(6deg); }
  43%, 100% { transform: rotateY(360deg) rotate(0); }
}
.hero .logo { width: 34px; height: 34px; }
nav.tabs .nav-brand .logo { width: 30px; height: 30px; }

/* Yükleme ekranı */
.splash { min-height: 80vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); font-weight: 600; }
.splash .logo { width: 64px; height: 64px; }
.splash .logo svg { animation: logo-spin 1.2s cubic-bezier(.45, .05, .55, .95) infinite; }

@media (prefers-reduced-motion: reduce) {
  /* Hareketi azalt açıksa: dönüş ve kayma yok, yalnızca yumuşak parlama ve solma */
  .logo svg, .logo .bite circle, .splash .logo svg { animation: none !important; }
  .page.enter, .page.enter .card, .page.enter .receipt { animation-name: page-fade !important; }
}

/* ===== Menü geçiş efektleri ===== */
.page.enter { animation: page-in-right .38s cubic-bezier(.2, .8, .25, 1) both; }
.page.enter-left { animation-name: page-in-left; }
.page.enter .card, .page.enter .receipt, .page.enter > .seg, .page.enter > input, .page.enter .btn#goAdd { animation: card-in .45s cubic-bezier(.2, .8, .25, 1) both; }
.page.enter .col > :nth-child(1), .page.enter > :nth-child(2) { animation-delay: .04s; }
.page.enter .col > :nth-child(2), .page.enter > :nth-child(3) { animation-delay: .09s; }
.page.enter .col > :nth-child(3), .page.enter > :nth-child(4) { animation-delay: .14s; }
.page.enter .col > :nth-child(4), .page.enter > :nth-child(5) { animation-delay: .19s; }
.page.enter .col:nth-child(2) > :nth-child(1) { animation-delay: .1s; }
.page.enter .col:nth-child(2) > :nth-child(2) { animation-delay: .16s; }
.page.enter .col:nth-child(2) > :nth-child(3) { animation-delay: .22s; }
@keyframes page-in-right { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes page-in-left { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }
.page { overflow-x: clip; }

/* Menü: seçilen sekme ikonu zıplar, arka plan yumuşak geçer */
nav.tabs button { transition: background-color .25s, color .25s, transform .15s; }
nav.tabs button:active { transform: scale(.92); }
nav.tabs.pop button.on svg { animation: nav-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nav-pop { 0% { transform: scale(.7) translateY(3px); } 60% { transform: scale(1.18) translateY(-2px); } 100% { transform: none; } }

/* ===== Su ===== */
.water-card .glasses { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 2px; }
.gl svg { width: 22px; height: 28px; display: block; }
.gl .g-out { fill: none; stroke: color-mix(in srgb, #2f8fd8 55%, var(--line)); stroke-width: 1.6; stroke-linejoin: round; }
.gl .g-in { fill: transparent; transition: fill .3s; }
.gl.on .g-in { fill: #3a9be6; }
.gl.on svg { animation: glfill .35s ease-out; }
@keyframes glfill { from { transform: scale(.8); } to { transform: none; } }
.bar.water > i { background: #3a9be6; }
.water-card.flash { animation: flash 1.4s ease-out 2; }

/* ===== Hatırlatmalar ===== */
.rem-status { font-size: 14px; font-weight: 600; padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--muted); margin-top: 6px; }
.rem-status.ok { background: color-mix(in srgb, var(--save) 14%, transparent); color: var(--save); }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 6px 0 10px; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; transition: opacity .2s; }
.grid3.dim { opacity: .45; pointer-events: none; }
input[type="time"] { width: 100%; padding: 11px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font: inherit; color: inherit; }

/* ===== Tarif düzenleyici ===== */
.ing-row { display: grid; grid-template-columns: 1fr 74px 14px 46px 30px; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ing-row .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ing-row input { padding: 7px 8px; text-align: center; }
.ing-row .k { text-align: right; }
.ing-row button { border: 0; background: var(--soft); width: 28px; height: 28px; border-radius: 50%; }
.picks { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.pick { display: flex; justify-content: space-between; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.pick small { color: var(--muted); white-space: nowrap; }

/* ===== Akış ===== */
.feed-h h2 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.feed-h p { margin: 4px 0 12px; }
.feed-list { display: grid; gap: 0; }
@media (min-width: 1000px) { .feed-list { grid-template-columns: 1fr 1fr; gap: 0 22px; align-items: start; } .feed-list > .btn, .feed-list > .empty-feed { grid-column: 1 / -1; } }
.post { position: relative; overflow: hidden; }
.post::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--saffron); }
.post.k-tarif::before { background: var(--save); }
.post.k-uye::before { background: var(--accent); }
.badge-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.post-t { font-size: 18px !important; line-height: 1.3; margin: 6px 0 8px !important; }
.post-s { margin: 0 0 10px; font-size: 15px; }
.post-f { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.pbtn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--soft); border-radius: 99px; padding: 7px 12px; font-weight: 600; font-size: 14px; color: var(--muted); }
.pbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.pbtn.on { color: var(--debt); background: color-mix(in srgb, var(--debt) 12%, transparent); }
.pbtn.on svg { fill: currentColor; }
.pbtn.pop svg { animation: nav-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
a.btn { text-decoration: none; display: inline-block; text-align: center; }
.rec-d { margin: 0 0 10px; font-size: 14px; }
.rec-d summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.rec-d ul { margin: 8px 0; padding-left: 18px; }
.rec-d .steps { white-space: pre-wrap; margin: 8px 0; }
.cm-list { max-height: 46vh; overflow-y: auto; margin: 12px 0; display: grid; gap: 8px; }
.cm { background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.cm.mine { background: color-mix(in srgb, var(--accent) 9%, var(--soft)); }
.cm p { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.cm-form { display: grid; gap: 8px; }
.cm-form textarea { min-height: 70px; }
.lnk { border: 0; background: none; color: var(--debt); font-weight: 600; padding: 0; font-size: 12px; }
.err-t { color: var(--debt); }
@media (max-width: 400px) { nav.tabs button { font-size: 11px; } nav.tabs button svg { width: 22px; height: 22px; } }
.grid3 > * { min-width: 0; }
.grid3 input, .grid3 select { min-width: 0; padding: 10px 8px; font-size: 15px; }

/* ===== Şampiyon rozeti ===== */
.champ { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .01em; vertical-align: 1px; white-space: nowrap;
  color: #6b4500; background: linear-gradient(135deg, #ffe08a, #f2b73a 55%, #e09a14); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 4px rgba(160,100,0,.35); position: relative; overflow: hidden; }
.champ::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14px; left: -20px; background: rgba(255,255,255,.7); transform: skewX(-20deg); animation: champ-shine 3.5s ease-in-out infinite; }
@keyframes champ-shine { 0%, 70% { left: -20px; } 100% { left: 120%; } }
.cups { margin-left: 5px; font-size: 12px; font-weight: 700; color: var(--saffron); white-space: nowrap; }
.who { display: inline; }

/* ===== Yarış ===== */
.race { border-color: color-mix(in srgb, var(--saffron) 50%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--saffron) 9%, var(--card)), var(--card) 60%); }
.last-champ { margin-top: 10px; font-size: 14px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--saffron) 14%, transparent); }
.my-rank { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 4px; }
.my-rank span { color: var(--muted); font-size: 14px; }
.my-rank b { font-size: 30px; }
.rank-list { list-style: none; padding: 0; margin: 10px 0 0; }
.rk { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.rk:last-child { border-bottom: 0; }
.rk.me { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.rk .pos { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--soft); flex-shrink: 0; font-family: var(--mono); }
.rk .pos.p1 { background: linear-gradient(135deg, #ffe08a, #e09a14); color: #5a3a00; }
.rk .pos.p2 { background: linear-gradient(135deg, #f0f0f0, #b9bec4); color: #333; }
.rk .pos.p3 { background: linear-gradient(135deg, #f2c8a0, #c47b3d); color: #3d1f00; }
.rk .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rules { margin-top: 10px; font-size: 14px; }
.rules summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.rules ul { margin: 8px 0; padding-left: 18px; }
.rules li { margin: 4px 0; }
.lnk2 { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 0; font-size: 13px; cursor: pointer; }
.post.k-sampiyon::before { background: linear-gradient(180deg, #ffe08a, #e09a14); width: 6px; }
.post.k-sampiyon { background: linear-gradient(135deg, color-mix(in srgb, var(--saffron) 12%, var(--card)), var(--card)); }

/* ===== Yemek tahmini ===== */
.est-box { border-radius: 14px; padding: 10px 12px; margin: -4px 0 14px; font-size: 14px; border: 1px solid var(--line); background: var(--soft); }
.est-box.ok { border-color: color-mix(in srgb, var(--save) 40%, var(--line)); background: color-mix(in srgb, var(--save) 7%, var(--card)); }
.est-box.err { color: var(--debt); }
.est-box.loading { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Yarış sayfası ===== */
nav.tabs button[data-tab="yonetim"] { display: none; }
.mobile-only { display: block; }
@media (min-width: 1000px) { nav.tabs button[data-tab="yonetim"] { display: flex; } .mobile-only { display: none !important; } }
.race-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 22px 20px 18px; margin-bottom: 14px; color: #3d2600;
  background: radial-gradient(120% 140% at 100% 0%, #fff1b8 0%, #f6c94e 38%, #e09a14 75%, #b9730a 100%); box-shadow: 0 18px 40px -18px rgba(150, 90, 0, .6); }
.race-hero::after { content: "🏆"; position: absolute; right: -10px; bottom: -26px; font-size: 130px; opacity: .18; transform: rotate(-12deg); animation: hero-cup 6s ease-in-out infinite; }
@keyframes hero-cup { 50% { transform: rotate(-4deg) translateY(-6px); } }
.race-hero .eyebrow { color: #6b4500; }
.rh-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rh-dates { font-weight: 700; font-size: 13px; background: rgba(255, 255, 255, .45); padding: 4px 10px; border-radius: 99px; }
.race-hero h2 { margin: 8px 0 14px; font-size: 26px; line-height: 1.1; letter-spacing: -0.03em; max-width: 16ch; }
.cd { display: flex; gap: 8px; position: relative; z-index: 1; }
.cd-u { background: rgba(255, 255, 255, .55); backdrop-filter: blur(4px); border-radius: 14px; padding: 8px 0 6px; width: 64px; text-align: center; box-shadow: 0 1px 0 rgba(255,255,255,.7) inset; }
.cd-u b { display: block; font-size: 26px; line-height: 1; color: #3d2600; }
.cd-u span { font-size: 11px; font-weight: 700; color: #6b4500; text-transform: uppercase; letter-spacing: .06em; }
.rh-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 13px; font-weight: 600; position: relative; z-index: 1; }
.race-me .rm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rm-rank { font-size: 58px; font-weight: 800; line-height: .95; letter-spacing: -0.04em; }
.rm-rank small { font-size: 30px; color: var(--muted); }
.rm-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 14px; text-align: right; }
.rm-stats b { display: block; font-size: 20px; }
.rm-stats span { font-size: 12px; color: var(--muted); }
.rm-msg { margin: 12px 0 4px; font-size: 14px; padding: 9px 12px; border-radius: 12px; background: var(--soft); }
.rm-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.rd { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rd-col { width: 100%; max-width: 30px; height: 64px; border-radius: 8px; background: var(--soft); position: relative; overflow: hidden; }
.rd-col i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #f6c94e, #e09a14); animation: rd-up .6s cubic-bezier(.2,.8,.25,1) both; }
@keyframes rd-up { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
.rd b { font-size: 12px; min-height: 15px; }
.rd span { font-size: 11px; color: var(--muted); font-weight: 600; }
.rd.today .rd-col { outline: 2px solid var(--ink); outline-offset: 2px; }
.rd.fut .rd-col { opacity: .45; }
/* Kürsü */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin-top: 8px; }
.pod { display: flex; flex-direction: column; align-items: center; min-width: 0; animation: pod-in .7s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: var(--d); }
@keyframes pod-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.pod-who { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; margin-bottom: 8px; min-width: 0; max-width: 100%; }
.pod-who b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-who .num { font-size: 12px; color: var(--muted); }
.pod-who .champ { margin-left: 0; font-size: 10px; padding: 1px 6px; }
.pod-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 19px; background: var(--soft); border: 3px solid var(--line); }
.pod-1 .pod-av { width: 54px; height: 54px; font-size: 23px; border-color: #e0a21b; background: #fff3cf; color: #6b4500; box-shadow: 0 0 0 4px color-mix(in srgb, #f6c94e 30%, transparent); }
.pod-2 .pod-av { border-color: #b9bec4; }
.pod-3 .pod-av { border-color: #c47b3d; }
.pod-step { width: 100%; border-radius: 12px 12px 4px 4px; display: grid; place-items: start center; padding-top: 8px; font-weight: 800; font-size: 22px; font-family: var(--mono); }
.pod-1 .pod-step { height: 96px; background: linear-gradient(180deg, #ffe08a, #e09a14); color: #5a3a00; }
.pod-2 .pod-step { height: 70px; background: linear-gradient(180deg, #f0f0f0, #b9bec4); color: #333; }
.pod-3 .pod-step { height: 52px; background: linear-gradient(180deg, #f2c8a0, #c47b3d); color: #3d1f00; }
.pod.me .pod-who b { color: var(--accent); }
/* Şampiyonlar panosu */
.fame-list { list-style: none; padding: 0; margin: 0; }
.fame-list li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); border-radius: 10px; }
.fame-list li:last-child { border-bottom: 0; }
.fame-list li.cur { background: color-mix(in srgb, var(--saffron) 12%, transparent); }
.fame-list li.me b.who { color: var(--accent); }
.fame-list small { display: block; color: var(--muted); }
.fm-cup { font-size: 22px; }
.rules-list { margin: 0; padding-left: 18px; font-size: 14px; }
.rules-list li { margin: 5px 0; }
.score-ex { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; text-align: center; }
.score-ex div { background: var(--soft); border-radius: 12px; padding: 8px 4px; }
.score-ex b { display: block; font-family: var(--mono); font-size: 18px; }
.score-ex span { font-size: 11px; color: var(--muted); }
/* Akış tanıtım kartı ve cüzdan şeridi */
.race-teaser, .race-strip { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.race-teaser { border-color: color-mix(in srgb, var(--saffron) 50%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--saffron) 16%, var(--card)), var(--card)); }
.race-teaser small { display: block; color: var(--muted); margin-top: 2px; }
.rt-cup, .rs-cup { font-size: 26px; }
.rt-go { font-size: 26px; color: var(--muted); }
.race-strip { border: 1px solid color-mix(in srgb, var(--saffron) 45%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--saffron) 18%, var(--card)), var(--card)); border-radius: 16px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.race-strip .rs-cup { font-size: 20px; animation: hero-cup 4s ease-in-out infinite; display: inline-block; }
@media (max-width: 400px) { .cd-u { width: 56px; } .cd-u b { font-size: 22px; } .rm-rank { font-size: 48px; } .rm-stats { gap: 10px; } .rm-stats b { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .race-hero::after, .race-strip .rs-cup, .pod, .rd-col i { animation: none !important; } }

/* =====================================================================
   ALT MENÜ — telefon ve tablet: yüzen cam dock + kayan gösterge + ortada Ekle
   ===================================================================== */
body:not(.has-nav) nav.tabs { display: none !important; }
.top-r { display: flex; align-items: center; gap: 8px; }
.me-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-weight: 800; font-size: 16px; color: var(--ink); display: grid; place-items: center; flex-shrink: 0; position: relative; transition: transform .2s, box-shadow .2s; box-shadow: 0 2px 8px -4px rgba(0,0,0,.25); }
.me-btn:active { transform: scale(.92); }
.me-btn.on { border-color: var(--accent); color: var(--accent); }
.me-btn.champ-ring { border: 0; background: linear-gradient(var(--card), var(--card)) padding-box, conic-gradient(from 0deg, #ffe08a, #e09a14, #fff3c4, #e09a14, #ffe08a) border-box; border: 2.5px solid transparent; }
.me-btn.champ-ring::after { content: "🏆"; position: absolute; right: -6px; bottom: -5px; font-size: 13px; }
.rp { position: absolute; border-radius: 50%; pointer-events: none; background: color-mix(in srgb, var(--accent) 20%, transparent); transform: scale(0); animation: rp .6s ease-out forwards; z-index: 0; }
@keyframes rp { to { transform: scale(1); opacity: 0; } }

@media (max-width: 999px) {
  #app { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
  .daynav .lbl { min-width: 84px; font-size: 13px; }
  .daynav button { width: 32px; height: 32px; }
  nav.tabs { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 0; display: block; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
    transition: transform .42s cubic-bezier(.2, .8, .2, 1), opacity .3s; will-change: transform; }
  nav.tabs.hide { transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none; }
  nav.tabs .in { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; gap: 0; max-width: 520px; height: 66px; margin: 0 auto; padding: 0 6px; border-radius: 26px;
    background: color-mix(in srgb, var(--card) 76%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7);
    border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
    box-shadow: 0 14px 36px -14px rgba(45, 28, 0, .42), 0 3px 10px -2px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .55); }
  nav.tabs button[data-tab="ben"], nav.tabs button[data-tab="yonetim"] { display: none; }
  nav.tabs button { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 54px; padding: 0; border-radius: 18px;
    background: none !important; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .01em; z-index: 1; transition: color .25s; }
  nav.tabs button .ic { display: grid; place-items: center; position: relative; z-index: 1; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), color .25s; }
  nav.tabs button svg { width: 23px; height: 23px; }
  nav.tabs button .lb { position: relative; z-index: 1; transition: color .25s; }
  nav.tabs button:active .ic { transform: scale(.86); }
  nav.tabs button.on { color: var(--ink); }
  nav.tabs button.on .ic { transform: translateY(-2px) scale(1.08); color: var(--accent); }
  nav.tabs button.on .lb { font-weight: 800; }
  nav.tabs button.on:not(.fab)::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); animation: dotin .45s cubic-bezier(.34, 1.56, .64, 1) both; z-index: 1; }
  @keyframes dotin { from { transform: scale(0); } to { transform: scale(1); } }
  nav.tabs.pop button.on svg { animation: none; }
  nav.tabs.pop button.on:not(.fab) .ic { animation: navbounce .55s cubic-bezier(.34, 1.56, .64, 1); }
  @keyframes navbounce { 0% { transform: translateY(5px) scale(.75); } 55% { transform: translateY(-5px) scale(1.18); } 100% { transform: translateY(-2px) scale(1.08); } }
  .nav-ind { position: absolute; top: 6px; left: 0; height: 54px; width: 64px; border-radius: 18px; pointer-events: none; z-index: 0; opacity: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 15%, var(--card)), color-mix(in srgb, var(--accent) 8%, var(--soft)));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent), 0 4px 12px -6px color-mix(in srgb, var(--accent) 45%, transparent);
    transition: transform .55s cubic-bezier(.34, 1.36, .5, 1), width .35s, opacity .25s; }
  /* Ortadaki Ekle düğmesi */
  nav.tabs button.fab { overflow: visible; color: var(--accent); }
  nav.tabs button.fab .ic { width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; color: #fff;
    background: linear-gradient(145deg, #f37a4c 0%, var(--accent) 50%, #b23a17 100%);
    box-shadow: 0 0 0 5px var(--paper), 0 12px 24px -8px color-mix(in srgb, var(--accent) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 6px rgba(0, 0, 0, .12); }
  nav.tabs button.fab svg { width: 28px; height: 28px; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
  nav.tabs button.fab:active .ic { transform: scale(.9); }
  nav.tabs button.fab:active svg, nav.tabs button.fab.on svg { transform: rotate(90deg); }
  nav.tabs button.fab .lb { color: var(--accent); font-weight: 700; margin-top: 2px; }
  nav.tabs button.fab.on .ic { transform: none; animation: fabglow 2.4s ease-in-out infinite; }
  @keyframes fabglow { 0%, 100% { box-shadow: 0 0 0 5px var(--paper), 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent), 0 12px 24px -8px color-mix(in srgb, var(--accent) 75%, transparent); }
    50% { box-shadow: 0 0 0 5px var(--paper), 0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent), 0 12px 24px -8px color-mix(in srgb, var(--accent) 75%, transparent); } }
  nav.tabs button.fab .rp { display: none; }
  .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
  .inst-banner.mob { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
/* Tablet: daha geniş dock, daha büyük dokunma alanları */
@media (min-width: 700px) and (max-width: 999px) {
  nav.tabs .in { max-width: 580px; height: 74px; border-radius: 30px; padding: 0 10px; }
  nav.tabs button { height: 60px; font-size: 12.5px; gap: 4px; }
  nav.tabs button svg { width: 25px; height: 25px; }
  .nav-ind { height: 60px; top: 7px; border-radius: 20px; }
  nav.tabs button.fab .ic { width: 64px; height: 64px; margin-top: -34px; }
  nav.tabs button.fab svg { width: 30px; height: 30px; }
  #app { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
}
@media (max-width: 999px) {
  :root[data-theme="dark"] nav.tabs .in { box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06); }
}
@media (max-width: 999px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) nav.tabs .in { box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06); }
}
@media (min-width: 1000px) {
  .nav-ind, .me-btn { display: none !important; }
  nav.tabs button.fab { color: var(--accent); }
  nav.tabs button.fab.on { color: var(--ink); }
  nav.tabs button .ic { display: grid; place-items: center; }
  nav.tabs button { position: relative; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  nav.tabs, nav.tabs *, .nav-ind { transition: none !important; animation: none !important; }
}

/* Sayfa geçişi sırasında yatay taşma olmasın (menü göstergesi kaymasın) */
#app { overflow-x: clip; }
html, body { overflow-x: clip; }

/* ===== Tema değiştirme ===== */
:root[data-theme="light"] { color-scheme: light; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
.theme-fade, .theme-fade * { transition: background-color .4s, color .4s, border-color .4s, box-shadow .4s !important; }
.theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 16px; background: var(--soft); }
.theme-seg button { border: 0; background: none; border-radius: 12px; padding: 10px 6px 9px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--muted); transition: background .25s, color .25s, box-shadow .25s; }
.theme-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 3px 10px -4px rgba(0, 0, 0, .3); }
.theme-seg .sw { width: 46px; height: 30px; border-radius: 9px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.theme-seg .sw.l { background: #f4eee2; }
.theme-seg .sw.d { background: #121512; }
.theme-seg .sw.a { background: linear-gradient(135deg, #f4eee2 50%, #121512 50%); }
.theme-seg .sw::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 5px; height: 6px; border-radius: 3px; background: #d24e28; }
.theme-seg button.on .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-ico { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--ink); }
.theme-ico svg { width: 20px; height: 20px; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.theme-ico:active svg { transform: rotate(-60deg) scale(.85); }
.auth-theme { position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 30; }
nav.tabs .nav-theme { display: none; }
@media (min-width: 1000px) {
  nav.tabs .nav-theme { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 15px; border-radius: 12px; margin-top: auto; }
  nav.tabs .nav-theme:hover { color: var(--ink); background: var(--soft); }
  nav.tabs .nav-theme svg { width: 22px; height: 22px; }
  nav.tabs .nav-install { margin-top: 6px; }
}

/* ===== Arama: paketli ürünler ve yapay zekâ ===== */
.off-box:empty { display: none; }
.off-box { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.off-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; margin: 4px 0; color: var(--muted); }
.off-h b { color: var(--ink); }
.ai-btn { margin-top: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--saffron) 22%, var(--card)), color-mix(in srgb, var(--accent) 14%, var(--card))); color: var(--ink); border: 1px solid color-mix(in srgb, var(--saffron) 45%, var(--line)); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
.src-note { margin: 8px 0 2px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--saffron) 12%, var(--soft)); }

/* ---------- Akış: üye paylaşımları ---------- */
.composer { padding: 14px; }
.pav { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--saffron))); }
.comp-in { flex: 1; text-align: left; border: 1px solid var(--line); background: var(--soft); color: var(--muted); border-radius: 99px; padding: 11px 16px; font-size: 15px; cursor: pointer; transition: border-color .2s, background .2s; }
.comp-in:hover { border-color: var(--accent); background: var(--card); }
.comp-tags { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.comp-tags::-webkit-scrollbar { display: none; }
.comp-tags button { flex: 0 0 auto; border: 0; background: var(--soft); border-radius: 99px; padding: 7px 12px; font-weight: 600; font-size: 13px; color: var(--ink); cursor: pointer; transition: transform .15s; }
.comp-tags button:active { transform: scale(.95); }
.post.k-paylasim::before { background: var(--accent); }
.post.t-soru::before { background: #6c8cff; }
.post.t-ipucu::before { background: var(--saffron); }
.post.t-basari::before { background: linear-gradient(180deg, #ffe08a, #e09a14); }
.post.t-tabak::before { background: var(--save); }
.post-au { gap: 10px; align-items: center; margin-bottom: 8px; }
.post-au .who { font-weight: 700; }
.ptag { font-size: 12px; font-weight: 700; background: var(--soft); border-radius: 99px; padding: 4px 10px; white-space: nowrap; }
.pmore { border: 0; background: none; font-size: 20px; line-height: 1; padding: 4px 6px; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pmore:hover { background: var(--soft); }
.post-txt { white-space: pre-wrap; word-break: break-word; font-size: 15.5px; line-height: 1.5; }
.post.t-soru .post-txt { font-size: 17px; font-weight: 600; }
.plate { background: var(--soft); border-radius: 14px; padding: 10px 12px; margin: 4px 0 10px; }
.plate-h { margin-bottom: 4px; }
.plate ul { list-style: none; margin: 0 0 6px; padding: 0; }
.plate li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.plate li:last-child { border-bottom: 0; }
.win-kg { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--save); margin: 2px 0 6px; }
.post.is-hidden { opacity: .75; }
.post-status { font-size: 12px; font-weight: 600; color: var(--debt); background: color-mix(in srgb, var(--debt) 10%, transparent); border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; }
.seg.sm button { padding: 6px 10px; font-size: 13px; }
#cmp textarea { width: 100%; resize: vertical; }
.rules { margin-top: 14px; font-size: 13px; color: var(--muted); }
.rules summary { cursor: pointer; font-weight: 600; }
.rules ul { margin: 8px 0 0; padding-left: 18px; }
.rules li { margin: 4px 0; }
.rep-list { display: grid; gap: 6px; }
.mod-txt { white-space: pre-wrap; font-size: 14px; margin: 4px 0; padding: 8px 10px; background: var(--soft); border-radius: 10px; }
.tag.warn { background: color-mix(in srgb, var(--debt) 14%, transparent); color: var(--debt); }
.nbadge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--debt); color: #fff; font-size: 11px; font-weight: 800; margin-left: 4px; }
