@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f3ec;
  --bg-2: #eeeae0;
  --surface: #ffffff;
  --ink: #15201c;
  --muted: #6c7470;
  --line: #e1dcd0;
  --tile: #ffffff;
  --tile-line: #d3cdbf;
  --brand: #1c7a5c;
  --brand-ink: #ffffff;
  --ok: #2f9e6e;
  --ok-ink: #ffffff;
  --amber: #f0b13a;
  --amber-soft: rgba(240, 177, 58, .22);
  --target: #1c2b27;
  --target-ink: #ffffff;
  --danger: #d0503f;
  --key: #e6e1d5;
  --key-ink: #15201c;
  --bar: #a7aea9;
  --shadow-sm: 0 1px 0 rgba(21, 32, 28, .08), 0 2px 6px rgba(21, 32, 28, .06);
  --shadow: 0 18px 50px rgba(21, 32, 28, .22);
  --n: 4;
  --gap: 7px;
  --side: 16px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101614;
    --bg-2: #161e1b;
    --surface: #18211e;
    --ink: #eaf0ed;
    --muted: #93a09a;
    --line: #26312d;
    --tile: #18211e;
    --tile-line: #34413c;
    --brand: #3dbb8e;
    --brand-ink: #0b1210;
    --ok: #2f9e6e;
    --target: #e7eeea;
    --target-ink: #101614;
    --key: #26312d;
    --key-ink: #eaf0ed;
    --bar: #4d5a55;
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, .4);
    --shadow: 0 18px 50px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
svg { display: block; }

/* ---------- app shell: header / status / scrolling board / target / keyboard ---------- */
.app {
  height: 100dvh; max-width: 540px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
}

.top {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: 10px var(--side) 6px;
}
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; border: 0;
  background: transparent; display: grid; place-items: center; color: var(--ink);
  transition: background .15s, transform .15s;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 24px; height: 24px; fill: currentColor; }

.brand { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.logo { display: flex; align-items: center; gap: 9px; }
.mark { width: 40px; height: 40px; flex-shrink: 0; margin: -4px 0; }
.m-a { fill: var(--surface); stroke: var(--ink); stroke-width: 2.2; }
.m-b { fill: var(--ok); stroke: var(--bg); stroke-width: 2.2; }
.m-t { font-family: var(--font); font-weight: 800; font-size: 14px; text-anchor: middle; }
.m-ta { fill: var(--ink); }
.m-tb { fill: #fff; }
.wordmark { font-size: 1.55rem; font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.wm-a { color: var(--ink); }
.wm-b { color: var(--ok); margin-left: .18em; }
.sub { font-size: .72rem; color: var(--muted); margin-top: 5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }

.status {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 4px var(--side) 0; padding: 10px 12px 10px 14px;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-sm);
}
.pair { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.02rem; letter-spacing: .04em; min-width: 0; }
.pair .w { white-space: nowrap; }
.pair .w.end { color: var(--ok); }
.pair svg { width: 18px; height: 18px; fill: var(--muted); flex-shrink: 0; }
.status-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.steps-chip {
  font-size: .85rem; color: var(--muted); background: var(--bg-2);
  padding: 5px 10px; border-radius: 999px; font-weight: 500;
}
.steps-chip b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; display: inline-block; min-width: 1ch; }
.steps-chip b.bump { animation: bump .35s; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: .85rem; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { visibility: hidden; }

.board {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; padding: 14px var(--side) 6px;
  scrollbar-width: none;
}
.board::-webkit-scrollbar { display: none; }
.ladder { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ---------- tiles ---------- */
.row { display: flex; gap: var(--gap); position: relative; perspective: 600px; }
.tile {
  --size: min(60px, calc((100vw - 2 * var(--side) - 40px - (var(--n) - 1) * var(--gap)) / var(--n)));
  width: var(--size); height: var(--size);
  display: grid; place-items: center;
  font-size: calc(var(--size) * .5); font-weight: 700;
  background: var(--tile); border: 2px solid var(--tile-line); border-radius: 12px;
  user-select: none; position: relative;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.tile.ok { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); }

/* history rows are smaller so more of the path fits on a phone */
.row.hist .tile, .row.start .tile { --size: min(44px, calc((100vw - 2 * var(--side) - 90px - (var(--n) - 1) * 6px) / var(--n))); border-radius: 10px; font-size: calc(var(--size) * .48); }
.row.hist, .row.start { gap: 6px; }
.row.hist .tile.changed::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 4px; height: 3px; border-radius: 3px; background: var(--amber);
}
.row.start .tile { border-color: var(--ink); }
.row .num {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600;
}
.row.start .num { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.row.hist.enter .tile { animation: flipIn .42s cubic-bezier(.2, .8, .3, 1.2) both; }

/* the row being edited */
.row.current { margin-top: 6px; }
.row.current .tile { cursor: pointer; box-shadow: var(--shadow-sm); }
.row.current .tile:not(.sel):hover { border-color: var(--muted); }
.row.current .tile.sel {
  border-color: var(--amber); background: var(--surface); color: var(--ink);
  transform: translateY(-4px); box-shadow: 0 0 0 4px var(--amber-soft), 0 8px 18px rgba(0, 0, 0, .12);
  animation: selPulse 1.8s ease-in-out infinite;
}
.row.current .tile.sel.ok { background: var(--ok); color: var(--ok-ink); }
.row.current .tile.sel::after {
  content: ""; position: absolute; bottom: -12px; left: 50%; width: 0; height: 0; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--amber);
}
.row.current.shake { animation: shake .4s; }
.row.current.shake .tile.sel { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(208, 80, 63, .2); }

.msg {
  min-height: 28px; padding: 4px var(--side) 0; text-align: center;
  font-size: .9rem; color: var(--muted); transition: color .2s;
}
.msg.bad { color: var(--danger); font-weight: 600; }
.msg.in { animation: fadeUp .25s ease-out; }

.targetbar {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 4px var(--side) 12px;
}
.tb-label { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.row.target .tile { background: var(--target); border-color: var(--target); color: var(--target-ink); }
.row.target.won .tile { background: var(--ok); border-color: var(--ok); color: #fff; animation: winWave .7s cubic-bezier(.3, 1.6, .5, 1) both; }

/* ---------- keyboard ---------- */
.keyboard {
  padding: 8px 5px calc(8px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 7px;
  background: var(--bg-2); border-radius: 20px 20px 0 0;
}
.krow { display: flex; gap: 5px; justify-content: center; }
.key {
  flex: 1; max-width: 46px; height: 54px; border: 0; border-radius: 9px;
  background: var(--surface); color: var(--key-ink); font-weight: 600; font-size: 1.15rem;
  display: grid; place-items: center; padding: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
  transition: transform .08s, background .15s;
  user-select: none; -webkit-user-select: none;
}
.key:active, .key.down { transform: scale(.9); background: var(--amber-soft); }
.krow.r3 .key { max-width: 50px; }

.donebar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--side) calc(14px + env(safe-area-inset-bottom));
  background: var(--bg-2); border-radius: 20px 20px 0 0;
  animation: fadeUp .35s ease-out;
}
.donebar[hidden] { display: none; }
.donebar-next { text-align: right; font-size: .78rem; color: var(--muted); }
.donebar-next b { font-size: 1.1rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  border: 0; background: var(--bg-2); border-radius: 14px; padding: 12px 18px;
  font-size: 1rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s, filter .15s;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px rgba(28, 122, 92, .3); }
.btn.primary svg { width: 18px; height: 18px; fill: currentColor; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.wide { width: 100%; margin-top: 18px; padding: 14px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

/* ---------- dialogs: bottom sheet on phones, card on desktop ---------- */
dialog {
  border: 0; padding: 0; background: var(--surface); color: var(--ink);
  width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 40px);
  border-radius: 24px; box-shadow: var(--shadow); overflow: hidden;
}
dialog[open] { animation: pop .28s cubic-bezier(.2, .9, .3, 1.15); }
dialog::backdrop { background: rgba(10, 16, 14, .5); backdrop-filter: blur(3px); animation: fade .25s; }
.dlg { padding: 24px 22px 22px; position: relative; overflow-y: auto; max-height: inherit; }
.grab { display: none; }
@media (max-width: 600px) {
  dialog.sheet {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0;
    max-height: 92dvh;
  }
  dialog.sheet[open] { animation: sheetUp .34s cubic-bezier(.2, .9, .25, 1); }
  .sheet .dlg { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: -10px auto 14px; }
}
.dlg h2 { margin: 0 0 6px; font-size: 1.45rem; letter-spacing: -.02em; }
.dlg h3 { margin: 22px 0 10px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lead { margin: 0 0 6px; color: var(--muted); line-height: 1.45; }
.lead b { color: var(--ink); }
.close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--bg-2); font-size: 1.3rem; line-height: 1; color: var(--muted); display: grid; place-items: center;
}
.how { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.how li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; }
.how-n {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-2);
  display: grid; place-items: center; font-weight: 800; font-size: .85rem;
}
.chip { padding: 1px 7px; border-radius: 6px; font-weight: 600; }
.chip.ok { background: var(--ok); color: #fff; }
.demo { display: grid; gap: 5px; justify-content: center; padding: 14px; background: var(--bg); border-radius: 16px; }
.demo-row { display: flex; gap: 5px; }
.demo-row span {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; font-weight: 700;
  background: var(--tile); border: 2px solid var(--tile-line); position: relative;
}
.demo-row span.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.demo-row span.chg::after { content: ""; position: absolute; bottom: 3px; left: 25%; right: 25%; height: 3px; border-radius: 2px; background: var(--amber); }
.demo-row { animation: fadeUp .4s both; }
.demo-row:nth-child(2) { animation-delay: .15s; } .demo-row:nth-child(3) { animation-delay: .3s; }
.demo-row:nth-child(4) { animation-delay: .45s; } .demo-row:nth-child(5) { animation-delay: .6s; }
.notes { padding-left: 18px; margin: 16px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }

.res-head { display: flex; gap: 14px; align-items: center; padding-right: 36px; }
.res-emoji { font-size: 2.6rem; line-height: 1; animation: pop .5s .1s both cubic-bezier(.3, 1.8, .5, 1); }
.res-line { margin: 0; color: var(--muted); line-height: 1.4; }
.sol { background: var(--bg); border-radius: 16px; padding: 12px 14px; margin-top: 16px; }
.sol-label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 6px; font-weight: 600; }
.sol-path { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sol-path .sw { font-weight: 700; background: var(--surface); padding: 4px 9px; border-radius: 8px; letter-spacing: .04em; font-size: .92rem; }
.sol-path .sw.end { background: var(--ok); color: #fff; }
.sol-path .ar { color: var(--muted); font-size: .8rem; }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.share-row .btn { flex: 1; max-width: 220px; }
.next { text-align: right; font-size: .78rem; color: var(--muted); }
.next b { font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }

.dist { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; }
.dist .bar-row { display: flex; align-items: center; gap: 8px; }
.dist .bar-label { width: 74px; text-align: right; color: var(--muted); flex-shrink: 0; }
.dist .bar {
  background: var(--bar); color: #fff; border-radius: 6px; padding: 3px 8px; min-width: 28px; text-align: right;
  font-weight: 700; font-variant-numeric: tabular-nums; transform-origin: left; animation: grow .6s cubic-bezier(.2, .8, .3, 1) both;
}
.dist .bar.me { background: var(--ok); }
.dist .empty { color: var(--muted); }
.mystats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin-bottom: 12px; }
.mystats b { display: block; font-size: 1.6rem; font-weight: 800; }
.mystats span { font-size: .7rem; color: var(--muted); }

/* ---------- toast, confetti, dev bar ---------- */
.toast {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -20px);
  background: var(--target); color: var(--target-ink); padding: 11px 18px; border-radius: 14px;
  font-weight: 600; font-size: .92rem; opacity: 0; pointer-events: none; z-index: 50;
  transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.2); box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: fall linear forwards; }

.devbar {
  display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 8px var(--side) 0; padding: 5px 8px; border-radius: 12px; font-size: .82rem;
  border: 1.5px dashed var(--amber); background: var(--surface);
}
.devbar[hidden] { display: none; }
.dev-btn { border: 0; background: var(--bg-2); border-radius: 8px; padding: 4px 10px; font-size: .8rem; }
.devbar input { width: 54px; font: inherit; padding: 2px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }

/* ---------- motion ---------- */
@keyframes flipIn { from { transform: rotateX(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes selPulse { 0%, 100% { box-shadow: 0 0 0 4px var(--amber-soft), 0 8px 18px rgba(0,0,0,.12); } 50% { box-shadow: 0 0 0 7px var(--amber-soft), 0 8px 18px rgba(0,0,0,.12); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes bump { 50% { transform: scale(1.45); color: var(--ok); } }
@keyframes winWave { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-16px) scale(1.06); } 100% { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); } }

@media (min-width: 600px) {
  .app { padding-bottom: 16px; }
  .keyboard, .donebar { border-radius: 20px; margin: 0 var(--side); }
}
@media (max-height: 640px) {
  .key { height: 46px; }
  .top { padding-top: 4px; }
  .mark { width: 28px; height: 28px; }
  .wordmark { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.keyboard[hidden] { display: none; }
dialog :focus:not(:focus-visible) { outline: none; }

/* share sheet: result card preview */
.card-wrap { position: relative; margin-top: 14px; aspect-ratio: 4 / 5; width: min(100%, calc(52dvh * 0.8)); margin-inline: auto; border-radius: 18px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-sm); }
.card-img { width: 100%; height: 100%; object-fit: contain; display: block; animation: pop .35s ease-out; }
.card-img:not([src]) { visibility: hidden; }
.card-spin { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ok); animation: spin .8s linear infinite; display: none; }
#dlgShare.loading .card-spin { display: block; }
#dlgShare .btn.wide { margin-top: 14px; }
#dlgShare .btn-row { margin-top: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
#dlgShare .btn-row:has(> [hidden]) { grid-template-columns: 1fr; }
#dlgShare .btn[hidden] { display: none; }

/* header sides hold two buttons on the left */
.top { grid-template-columns: 1fr auto 1fr; }
.top-side { display: flex; gap: 2px; }
.top-side.right { justify-content: flex-end; }

/* "playing from the archive" bar */
.modebar {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin: 2px var(--side) 4px; padding: 7px 12px; border-radius: 12px;
  background: var(--amber-soft); font-size: .85rem; font-weight: 600;
}
.modebar[hidden] { display: none; }
.mode-link { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 700; text-decoration: none; font-size: .85rem; }

/* archive list */
.arc-list h3:first-of-type { margin-top: 16px; }
.arc-today { margin: 12px 0 4px; text-decoration: none; }
.arc-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px; border-radius: 14px; background: var(--bg); margin-bottom: 7px;
  color: var(--ink); text-decoration: none; transition: transform .12s, background .15s;
}
.arc-item:active { transform: scale(.98); }
.arc-item.current { outline: 2px solid var(--amber); }
.arc-title { font-weight: 700; font-size: .95rem; }
.arc-sub { font-size: .8rem; color: var(--muted); letter-spacing: .03em; margin-top: 2px; }
.arc-chip { font-size: .75rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.arc-chip.done { background: var(--ok); color: #fff; }
.arc-chip.wip { background: var(--amber-soft); color: var(--ink); }
.arc-chip.gave { background: var(--bg-2); color: var(--danger); }
.arc-list .empty { color: var(--muted); font-size: .9rem; padding: 4px 2px 8px; }
.donebar .btn:not(.primary) { padding: 12px 14px; }

/* start word: edited in place first, then pinned at the top while the path grows below; old rows fade */
.row.hist .tile, .row.hist .num { opacity: var(--fade, 1); transition: opacity 1.2s ease, background .2s, border-color .2s; }
.row.hist.start { position: sticky; top: -14px; z-index: 2; padding: 8px 0 10px; background: var(--bg); width: 100%; justify-content: center; }
.row.hist.start::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
.row.hist.start .num, .row.current.first .num { right: auto; left: 50%; top: -15px; transform: translateX(-50%); }
.row.current.first { margin-top: 18px; }
.row.hist.start { padding-top: 22px; }
.row.current.enter .tile { animation: flipIn .42s cubic-bezier(.2, .8, .3, 1.2) both; }
.row.current .num { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }

/* Zirve */
.zirve-banner {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; padding: 14px; border-radius: 16px;
  background: linear-gradient(120deg, var(--target), #2b4a40); color: #fff; text-decoration: none; font-weight: 700;
}
.zb-icon { font-size: 1.5rem; } .zb-text { flex: 1; } .zb-go { font-size: 1.2rem; }
.zr-progress { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; font-size: .9rem; }
.zr-bar { flex: 1; height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.zr-bar span { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width .6s; }
.arc-item.locked { opacity: .55; }
.arc-chip.lock { background: transparent; }
.zr-count { margin-top: 10px; }
.zr-count .empty { color: var(--muted); font-size: .9rem; }
body.zirve .modebar { background: rgba(28, 43, 39, .1); }
#btnNextLevel[hidden], #btnShare[hidden], #hMine[hidden], #myStats[hidden], #myDist[hidden], #btnGiveUp[hidden] { display: none; }

/* quiet credit line + privacy note */
.credit {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--muted);
}
.credit a { color: var(--muted); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; transition: color .15s, background .15s; }
.credit a:hover { color: var(--ink); background: var(--bg-2); }
.credit svg { width: 16px; height: 16px; fill: currentColor; }
.credit-link { border: 0; background: none; padding: 0; color: var(--muted); font-size: .78rem; text-decoration: underline; text-underline-offset: 3px; }
.privacy { padding-left: 18px; margin: 14px 0; line-height: 1.5; font-size: .92rem; display: grid; gap: 8px; }
.privacy b { color: var(--ink); }
.credit a.credit-link { width: auto; height: auto; display: inline; }
.credit a.credit-link:hover { background: none; }
