/* Mobil öncelikli arayüz. Geniş ekran ayarları en altta (min-width: 900px). */
:root {
  --bg: #efe7dc;
  --surface: #fffdf9;
  --card: #ffffff;
  --soft: #f4ede3;
  --ink: #2a211b;
  --muted: #7d6f62;
  --accent: #1f6f54;
  --accent-2: #2b8a69;
  --danger: #c0392b;
  --warn: #c47a10;
  --gold: #e0a100;
  --line: rgba(42, 33, 27, .1);
  --shadow: 0 8px 28px rgba(40, 25, 10, .16);
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom);
  --safe-t: env(safe-area-inset-top);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; user-select: none; -webkit-user-select: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; overscroll-behavior: none; }
canvas { display: block; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .4; cursor: not-allowed; }
input[type=text] { font: inherit; font-size: 16px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
  background: var(--card); user-select: text; -webkit-user-select: text; }

/* ---------- butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 12px;
  font-weight: 700; font-size: 14px; background: var(--soft); color: var(--ink); white-space: nowrap; transition: transform .08s, background .15s; }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: #fbe9e7; color: var(--danger); }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; min-height: 48px; font-size: 15px; }
.btn.on { background: var(--ink); color: #fff; }

/* ---------- üst çubuk ---------- */
#topbar { position: fixed; top: 0; left: 0; right: 0; padding: calc(8px + var(--safe-t)) 10px 0; display: flex; flex-direction: column; gap: 6px;
  pointer-events: none; z-index: 20; }
#topbar .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#topbar .spacer { flex: 1; }
.pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px; border-radius: 17px;
  background: rgba(255, 253, 249, .94); box-shadow: 0 2px 10px rgba(40,25,10,.12); font-size: 13.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; flex: none; }
@media (max-width: 380px) { .pill { padding: 0 9px; font-size: 12.5px; gap: 4px; } .pill.money { font-size: 13.5px; } #topbar .row { gap: 5px; } }
button.pill:active { transform: scale(.95); }
.pill.money { color: var(--accent); font-weight: 800; font-size: 14.5px; }
.pill.money.neg { color: var(--danger); }
.pill.round { width: 34px; padding: 0; justify-content: center; font-size: 15px; }
.pill.speed { min-width: 46px; justify-content: center; font-weight: 800; }
.pill.paused { background: var(--ink); color: #fff; }
.pill.event { background: #fff1cf; }
.pill .low { color: var(--danger); }
.brandpill { display: none; font-weight: 800; letter-spacing: .02em; }

#tracker { display: none; }

/* ---------- alt sekme çubuğu ---------- */
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; align-items: stretch;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255, 253, 249, .97);
  box-shadow: 0 -4px 20px rgba(40,25,10,.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#tabbar button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 11px; font-weight: 700; }
#tabbar button .e { font-size: 23px; line-height: 1; filter: grayscale(.35); transition: transform .15s; }
#tabbar button.active { color: var(--accent); }
#tabbar button.active .e { filter: none; transform: translateY(-2px) scale(1.08); }
#tabbar button.active::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.badge { position: absolute; top: 6px; left: 50%; margin-left: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: none; align-items: center; justify-content: center; font-style: normal; }
.badge.show { display: flex; }

/* ---------- alttan açılan sayfa ---------- */
#sheet { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 25; background: var(--surface);
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 34px rgba(40,25,10,.18); display: flex; flex-direction: column;
  max-height: 64vh; max-height: 64dvh; transform: translateY(110%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
#sheet.open { transform: translateY(0); }
#sheet.drag { transition: none; }
.sheet-head { flex: none; padding: 6px 16px 0; touch-action: none; cursor: grab; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #d9cfc2; margin: 2px auto 8px; }
.sheet-title { display: flex; align-items: center; gap: 10px; }
.sheet-title h2 { margin: 0; font-size: 18px; flex: 1; }
.sheet-title .x { width: 34px; height: 34px; border-radius: 17px; background: var(--soft); font-size: 15px; font-weight: 800; }
.segs { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 10px; scrollbar-width: none; }
.segs::-webkit-scrollbar { display: none; }
.seg { flex: none; height: 34px; padding: 0 13px; border-radius: 17px; background: var(--soft); font-size: 13px; font-weight: 700; color: var(--muted); }
.seg.active { background: var(--ink); color: #fff; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 14px 18px; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }

/* ---------- sayfa içeriği ---------- */
.note { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 2px 2px 10px; }
.warn { background: #fff4dc; color: #8a5a00; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.sec { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 16px 2px 8px; }
.sec:first-child { margin-top: 4px; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; }
.item.col { flex-wrap: wrap; }
.item.col .ac { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
.item.dim { opacity: .65; }
.item .ic { width: 44px; height: 44px; flex: none; border-radius: 13px; background: var(--soft); display: grid; place-items: center; font-size: 22px; }
.item .bd { flex: 1; min-width: 0; }
.item .t { font-weight: 750; font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.item .s { color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.item .ac { display: flex; gap: 6px; flex: none; align-items: center; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; background: #e3f1ea; color: var(--accent); font-size: 11px; font-weight: 800; }
.tag.gray { background: var(--soft); color: var(--muted); }
.tag.red { background: #fbe4e1; color: var(--danger); }
.tag.gold { background: #fff1cf; color: #8a5a00; }
.good { color: var(--accent); } .bad { color: var(--danger); }
.meter { height: 7px; background: #ece4d8; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.meter.warn i { background: var(--warn); } .meter.bad i { background: var(--danger); }
.mlabel { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.stepper { display: inline-flex; align-items: center; background: var(--soft); border-radius: 12px; }
.stepper button { width: 38px; height: 38px; font-size: 20px; font-weight: 700; border-radius: 12px; }
.stepper button:active { background: #e8dfd2; }
.stepper b { min-width: 54px; text-align: center; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.segctl { display: inline-flex; background: var(--soft); border-radius: 11px; padding: 3px; gap: 2px; margin-top: 6px; }
.segctl button { height: 30px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.segctl button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 12px 6px 10px;
  min-height: 112px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-align: center; transition: transform .08s; }
.tile:active:not(:disabled) { transform: scale(.95); }
.tile .e { font-size: 32px; line-height: 1.1; }
.tile .n { font-size: 12.5px; font-weight: 750; line-height: 1.2; }
.tile .p { font-size: 12px; font-weight: 800; color: var(--accent); }
.tile .k { position: absolute; top: 7px; right: 8px; font-size: 10.5px; font-weight: 800; color: #8a5a00; }
.tile.tool { background: var(--soft); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.sw { width: 44px; height: 44px; border-radius: 13px; border: 3px solid transparent; font-size: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.sw.on { border-color: var(--ink); }
.big { font-size: 34px; font-weight: 800; line-height: 1; }
.stars { color: var(--gold); letter-spacing: 1px; }
.rev { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.rev .who { color: var(--muted); font-size: 12px; }
.rev p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; }
.barrow { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 12.5px; }
.barrow span:first-child { width: 120px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barrow .bar { flex: 1; height: 9px; background: #ece4d8; border-radius: 5px; overflow: hidden; }
.barrow .bar i { display: block; height: 100%; background: var(--accent); }
.barrow b { width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 140px; display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin: 6px 2px 0; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; vertical-align: 3px; margin-right: 4px; }

/* ---------- yerleştirme çubuğu ---------- */
#actionbar { position: fixed; left: 10px; right: 10px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); z-index: 28;
  display: none; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 22px; background: rgba(42,33,27,.95); color: #fff;
  box-shadow: var(--shadow); }
#actionbar.show { display: flex; }
#abInfo { min-width: 0; flex: 1; }
#abTitle { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#abMsg { font-size: 12px; opacity: .85; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#abMsg.bad { color: #ffb4a8; opacity: 1; }
.abbtn { width: 46px; height: 46px; flex: none; border-radius: 23px; background: rgba(255,255,255,.14); font-size: 19px; font-weight: 800; color: #fff; }
.abbtn.ok { background: var(--accent-2); width: auto; padding: 0 16px; font-size: 15px; }
.abbtn:active:not(:disabled) { transform: scale(.94); }

/* ---------- bildirimler ---------- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--top-h, 110px) + 8px); z-index: 40; width: min(440px, calc(100vw - 20px));
  display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { background: rgba(42,33,27,.95); color: #fff; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.4;
  box-shadow: var(--shadow); animation: tin .25s ease-out; }
.toast.out { animation: tout .3s ease-in forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
@keyframes tout { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- sahne üstü baloncuklar ---------- */
#overlay { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.bubble { position: absolute; transform: translate(-50%, -100%); background: #fff; border-radius: 10px; padding: 3px 7px;
  font-size: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.15); white-space: nowrap; }
.bubble.warnb { background: #fff3d6; }
.bubble.name { background: var(--ink); color: #fff; font-weight: 600; white-space: normal; width: max-content; max-width: min(240px, 62vw); text-align: center; line-height: 1.35; }
.bubble.vip { background: #ffe1ef; }
.bubble .bar { height: 4px; background: #eee; border-radius: 2px; margin-top: 3px; overflow: hidden; }
.bubble .bar i { display: block; height: 100%; background: var(--accent); width: 0; }
.artbtn { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; background: #fff; border: 2px solid var(--gold);
  border-radius: 16px; padding: 7px 12px; font-size: 14px; font-weight: 800; box-shadow: 0 3px 12px rgba(0,0,0,.22); cursor: pointer;
  animation: pulse 1s ease-in-out infinite alternate; white-space: nowrap; }
@keyframes pulse { to { transform: translate(-50%, -110%) scale(1.06); } }
.float { position: absolute; transform: translate(-50%, -100%); font-weight: 800; color: var(--accent); font-size: 14px;
  text-shadow: 0 1px 0 #fff, 0 0 4px #fff; animation: up 1.4s ease-out forwards; white-space: nowrap; }
.float.bad { color: var(--danger); } .float.star { color: var(--gold); font-size: 13px; letter-spacing: 1px; } .float.heart { color: #d6336c; }
@keyframes up { to { transform: translate(-50%, -230%); opacity: 0; } }

/* ---------- latte art ---------- */
#artGame { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); transform: translateX(-50%); z-index: 35;
  width: min(340px, calc(100vw - 24px)); background: var(--surface); border-radius: 20px; padding: 14px 16px 16px; box-shadow: var(--shadow);
  display: none; text-align: center; cursor: pointer; }
#artGame b { display: block; margin-bottom: 10px; font-size: 15px; }
#artTrack { position: relative; height: 30px; background: #efe5d8; border-radius: 15px; overflow: hidden; }
#artZone { position: absolute; top: 0; bottom: 0; background: rgba(31,111,84,.35); }
#artPerfect { position: absolute; top: 0; bottom: 0; background: rgba(31,111,84,.8); }
#artNeedle { position: absolute; top: -2px; bottom: -2px; width: 5px; margin-left: -2.5px; background: var(--ink); border-radius: 3px; }
#artGame small { display: block; margin-top: 8px; color: var(--muted); }

/* ---------- pencere (rapor, giriş, fotoğraf) ---------- */
#modal { position: fixed; inset: 0; z-index: 50; background: rgba(20, 15, 10, .5); display: none; align-items: flex-end; justify-content: center; }
#modal .box { background: var(--surface); width: 100%; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 24px 24px 0 0;
  padding: 20px 18px calc(16px + var(--safe-b)); font-size: 14.5px; line-height: 1.5; animation: mup .28s cubic-bezier(.2,.8,.2,1); }
@keyframes mup { from { transform: translateY(40px); opacity: 0; } }
#modal h2 { margin: 0 0 12px; font-size: 21px; }
#modal table { width: 100%; border-collapse: collapse; margin: 8px 0; font-variant-numeric: tabular-nums; }
#modal td { padding: 6px 0; border-bottom: 1px solid var(--line); }
#modal td:last-child { text-align: right; font-weight: 600; }
#modal tr.sum td { font-weight: 800; border-bottom: 2px solid var(--ink); }
#modal ul { padding-left: 20px; margin: 8px 0; }
#modal li { margin: 5px 0; }
#modal details { background: var(--soft); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
#modal .actions { position: sticky; bottom: calc(-16px - var(--safe-b)); margin: 16px -18px calc(-16px - var(--safe-b)); padding: 12px 18px calc(14px + var(--safe-b));
  background: linear-gradient(transparent, var(--surface) 30%); display: flex; gap: 8px; }
#modal .actions > * { flex: 1; }
#modal img.photo { width: 100%; border-radius: 14px; display: block; }
#modal .forecast { background: var(--soft); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
a.btn { text-decoration: none; }

/* ---------- geniş ekran ---------- */
@media (min-width: 900px) {
  #topbar { flex-direction: row; flex-wrap: wrap; padding: 12px 14px 0; }
  #topbar .row { flex-wrap: wrap; }
  .brandpill { display: inline-flex; }
  #tracker { display: block; position: fixed; top: 60px; right: 14px; width: 270px; z-index: 10; background: rgba(255,253,249,.95); border-radius: 18px;
    padding: 12px 14px; font-size: 12.5px; box-shadow: 0 4px 16px rgba(40,25,10,.1); pointer-events: none; }
  #tracker b { font-size: 13px; }
  #tracker .g { padding: 3px 0; color: var(--muted); }
  #tracker .g span { color: var(--ink); font-weight: 600; }
  #tabbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 14px; width: 520px; height: 66px; padding: 0 6px; border-radius: 22px; box-shadow: var(--shadow); }
  #tabbar button { font-size: 12px; }
  #sheet { left: 14px; right: auto; width: 420px; top: 64px; bottom: 94px; max-height: none; border-radius: 22px; transform: translateX(-120%); box-shadow: var(--shadow); }
  #sheet.open { transform: translateX(0); }
  .grab { display: none; }
  .sheet-head { padding-top: 14px; cursor: default; }
  #actionbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 96px; width: 520px; }
  #artGame { bottom: 96px; }
  #modal { align-items: center; padding: 20px; }
  #modal .box { width: 460px; border-radius: 24px; padding: 22px 24px 18px; }
  #modal .actions { position: static; margin: 16px 0 0; padding: 0; background: none; }
}

/* ---------- seviye rozeti, fotoğraf butonu, rehber, efektler ---------- */
.pill.level { position: relative; font-weight: 800; gap: 4px; overflow: hidden; }
.pill.level small { font-size: 11px; font-weight: 700; color: var(--muted); }
.pill.level i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--gold); border-radius: 0 2px 2px 0; transition: width .4s; }
.pill.event.rush { background: #ffe0d6; color: #a3341c; animation: rushpulse .8s ease-in-out infinite alternate; }
@keyframes rushpulse { to { transform: scale(1.05); } }
.fab { position: fixed; right: 12px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 82px); z-index: 15; width: 46px; height: 46px; border-radius: 23px;
  background: rgba(255,253,249,.95); box-shadow: 0 4px 14px rgba(40,25,10,.18); font-size: 20px; }
.fab:active { transform: scale(.94); }
.fab.edit { bottom: calc(var(--tabbar-h) + var(--safe-b) + 138px); width: auto; padding: 0 12px 0 10px; display: flex; align-items: center; gap: 5px; font-size: 17px; }
.fab.edit span { font-size: 12px; font-weight: 700; color: var(--ink); }
.fab.edit.on { background: var(--accent); }
.fab.edit.on span { color: #fff; }
#coach { position: fixed; z-index: 45; left: 10px; right: 10px; top: calc(var(--top-h, 110px) + 8px); display: none; background: var(--ink); color: #fff;
  border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.45; animation: tin .3s ease-out; }
#coach p { margin: 4px 0 10px; }
.coach-step { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.coach-btns { display: flex; gap: 8px; justify-content: flex-end; }
#coach .btn { background: rgba(255,255,255,.14); color: #fff; }
#coach .btn.primary { background: var(--accent-2); }
body.coach-on #toasts { top: calc(var(--top-h, 110px) + 150px); }
.coach-target { position: relative; z-index: 46; animation: coachring 1.1s ease-in-out infinite; border-radius: 14px; }
@keyframes coachring { 0%, 100% { box-shadow: 0 0 0 3px rgba(224,161,0,.95), 0 0 0 0 rgba(224,161,0,.5); } 50% { box-shadow: 0 0 0 3px rgba(224,161,0,.95), 0 0 0 12px rgba(224,161,0,0); } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
#confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; animation: fall 1.5s cubic-bezier(.25,.6,.4,1) forwards; }
@keyframes fall { to { top: 105vh; transform: rotate(720deg) translateX(40px); opacity: .9; } }
.coin { position: fixed; z-index: 55; font-size: 18px; margin: -10px 0 0 -10px; pointer-events: none; transition: transform .6s cubic-bezier(.5,-0.3,.6,1), opacity .6s; }
.pill.money.bump { animation: bump .3s ease-out; }
@keyframes bump { 50% { transform: scale(1.12); } }
#tabbar button.locked { opacity: .45; }
#tabbar button.locked::after { content: '🔒 Sv ' attr(data-lock); position: absolute; top: 4px; right: 50%; margin-right: -38px; font-size: 9px; font-weight: 800; color: var(--muted); }
.seg.locked { opacity: .55; }
.tile.lock .e { filter: grayscale(1); opacity: .6; }
#modal .center { text-align: center; }
.bigemoji { font-size: 54px; line-height: 1.1; }
.earn { font-size: 36px; font-weight: 800; color: var(--accent); margin: 10px 0; }
@media (min-width: 900px) {
  .fab { bottom: 100px; right: 300px; }
  .fab.edit { bottom: 156px; }
  #coach { left: 50%; right: auto; transform: translateX(-50%); width: 460px; }
}

/* ---------- hedef kartı ve parmak işareti ---------- */
.pill.goal { max-width: calc(100vw - 20px); font-weight: 650; gap: 6px; position: relative; overflow: hidden; padding-right: 13px; }
.pill.goal b { color: var(--accent); }
.pill.goal i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }
#finger { position: fixed; z-index: 47; display: none; font-size: 34px; pointer-events: none; transform: translate(-50%, 0); filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
#finger.up { animation: fup .8s ease-in-out infinite alternate; }
#finger.down { transform: translate(-50%, -100%); animation: fdown .8s ease-in-out infinite alternate; }
@keyframes fup { to { margin-top: 10px; } }
@keyframes fdown { to { margin-top: -10px; } }
.abbtn.ok#abSell { width: auto; padding: 0 12px; font-size: 13px; }
@media (min-width: 900px) {
  #coach { top: calc(var(--top-h, 60px) + 8px); }
  #toasts { top: calc(var(--top-h, 60px) + 8px); }
  body.coach-on #toasts { top: calc(var(--top-h, 60px) + 140px); }
}

/* ---------- genişletme ---------- */
.plot { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; background: rgba(255,253,249,.96); border: 2px dashed #b9a88f;
  border-radius: 14px; padding: 6px 12px; font-size: 13px; font-weight: 800; line-height: 1.25; text-align: center; box-shadow: 0 4px 14px rgba(40,25,10,.2); color: var(--ink); white-space: nowrap; }
.plot small { font-weight: 600; color: var(--muted); font-size: 11px; }
.plot b { color: var(--accent); }
.plot.ok { border: 2px solid var(--gold); animation: pulse 1s ease-in-out infinite alternate; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 0 12px; padding: 6px; background: #d8cfc2; border-radius: 16px; }
.lot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 70px; border-radius: 12px; background: #efe9e0; font-size: 22px; }
.lot small { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.lot.own { background: #e3f1ea; box-shadow: inset 0 0 0 2px var(--accent); }
.lot.rent { background: #fffdf9; border: 2px dashed #b9a88f; }
.lot.rent.ready { border: 2px solid var(--gold); animation: lotglow 1s ease-in-out infinite alternate; }
@keyframes lotglow { to { box-shadow: 0 0 0 5px rgba(224,161,0,.35); } }
.changelog { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; margin: 6px 0 4px; }
.cl { background: rgba(0,0,0,.035); border-radius: 12px; padding: 10px 12px; }
.cl-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cl-h small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.cl ul { margin: 6px 0 0; padding-left: 4px; list-style: none; font-size: 13px; line-height: 1.45; }
.cl li { margin: 4px 0; }
/* başarımlar ve koleksiyon */
.achgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: var(--soft); opacity: .55; }
.ach.on { background: var(--card); opacity: 1; box-shadow: inset 0 0 0 2px var(--gold); }
.ach .e { font-size: 24px; }
.ach .n { font-weight: 700; font-size: 12px; line-height: 1.2; }
.ach .d { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.achgrid.small .ach.on { box-shadow: inset 0 0 0 1.5px var(--line); }
.dots { color: var(--gold); letter-spacing: 1px; font-size: 11px; margin-left: 4px; }
/* meydan okuma skoru, franchise kural kartları */
.bigscore { font-size: 44px; font-weight: 800; color: var(--accent); line-height: 1; margin: 12px 0 6px; }
.bigscore small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.rulecard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 10px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font: inherit; color: inherit; cursor: pointer; }
.rulecard:not(:disabled):active { transform: scale(.97); }
.rulecard:disabled { opacity: .5; }
.rulecard .e { font-size: 26px; }
.rulecard .n { font-weight: 700; font-size: 13px; }
.rulecard .d { font-size: 11px; color: var(--muted); line-height: 1.25; min-height: 28px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 3px 0; }
.kv b { white-space: nowrap; }
.linkbtn { background: none; border: 0; padding: 4px 0 0; font: inherit; font-size: 11.5px; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* ---------- telefon: hedef kartı ve rehber altta, başparmağa yakın ---------- */
.fab.coach-target { position: fixed; }
@media (max-width: 899px) {
  #goalRow { position: fixed; left: 10px; right: 68px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); }
  body:has(#actionbar.show) #goalRow { visibility: hidden; }
}
@media (max-width: 899px) and (orientation: portrait) {
  /* rehber kutusu alt çubuğun üstünde; açıkken sağdaki düğmeler ve hedef kartı (gösterilmiyorsa) gizlenir */
  #coach { top: auto; bottom: calc(var(--tabbar-h) + var(--safe-b) + 56px); }
  body.coach-on .fab:not(.coach-target), body.coach-on #goalRow:not(:has(.coach-target)) { visibility: hidden; }
  body:has(#goalChip.coach-target) #coach { bottom: calc(var(--tabbar-h) + var(--safe-b) + 108px); }
  body:has(#actionbar.show) #coach { bottom: calc(var(--tabbar-h) + var(--safe-b) + 128px); }
  body:has(#sheet.open) #coach, body:has(.fab.coach-target) #coach { top: calc(var(--top-h, 110px) + 8px); bottom: auto; }
  body.coach-on #toasts { top: calc(var(--top-h, 110px) + 8px); }
  body.coach-on:has(#sheet.open) #toasts, body.coach-on:has(.fab.coach-target) #toasts { top: calc(var(--top-h, 110px) + 150px); }
}
