/* ==========================================================
   "Ada" — isometric 3D theme.
   The puzzle is a floating island of blocks seen from an isometric camera.
   Letters stand on top of the blocks as upright signs facing the viewer
   (billboards), so the board reads like a 3D toy but stays legible.
   Across = blue, Down = orange — the same colours on the board and in the lists.
   ========================================================== */
:root {
  --sky-1: #f7fbff;
  --sky-2: #e4f0ff;
  --sky-3: #cfe2ff;
  --ink: #0b2a5b;
  --ink-2: #3d5a8a;
  --ink-3: #8aa0c6;
  --paper: #ffffff;
  --paper-2: #eef4ff;
  --blue: #1e63ff;
  --blue-d: #1446c2;
  --orange: #f0811f;
  --orange-d: #c8620c;
  --yellow: #ffe066;
  --green: #14b86a;
  --pink: #ff5c8a;
  --pink-ink: #d6336c;
  --bad: #ff4d5e;

  --bg: var(--sky-2);
  --surface: #fff; --surface-solid: #fff; --surface-2: #f4f8ff; --surface-3: #e3ecfb;
  --line: #dbe6f7; --line-2: #c9d8f1;
  --text: var(--ink); --muted: var(--ink-2); --faint: var(--ink-3);
  --accent: var(--blue); --accent-2: var(--blue-d); --accent-soft: rgba(30, 99, 255, .12); --accent-tint: #e6eeff;
  --ok: var(--green); --ok-soft: #dcf6ea; --bad-soft: #ffe3e6; --warn: var(--yellow); --flame: #ff7a1a;
  --radius: 18px; --radius-sm: 12px;
  --font: 'Inter', system-ui, sans-serif;
  --display: 'Unbounded', 'Inter', sans-serif;
  --mono: 'Inter', system-ui, sans-serif;
  --card-sh: 0 1px 0 rgba(11, 42, 91, .04), 0 16px 34px -20px rgba(20, 60, 140, .45);
  /* block geometry */
  --tilt: 46deg;
  --turn: -45deg;
  --depth: 12px;
}
html { background: var(--sky-2); }
body.iso { font-family: var(--font); color: var(--ink); background: radial-gradient(1200px 700px at 25% -10%, #fff 0, var(--sky-1) 30%, var(--sky-2) 65%, var(--sky-3) 100%) fixed; }
body.iso::selection { background: var(--yellow); }
.iso h1, .iso h2, .iso h3 { font-family: var(--display); letter-spacing: -.02em; font-style: normal; }
.iso .bg { background: none; }
.iso .bg::before, .iso .bg::after, .iso .aurora, .iso .gridbg { display: none; }
/* drifting clouds */
.iso .bg::before { display: block; content: ""; position: absolute; inset: 0; background:
  radial-gradient(60px 22px at 12% 22%, rgba(255,255,255,.9), transparent 70%),
  radial-gradient(90px 26px at 16% 24%, rgba(255,255,255,.8), transparent 70%),
  radial-gradient(70px 20px at 78% 14%, rgba(255,255,255,.85), transparent 70%),
  radial-gradient(110px 30px at 84% 16%, rgba(255,255,255,.7), transparent 70%);
  animation: clouds 40s linear infinite alternate; opacity: 1; mix-blend-mode: normal; }
@keyframes clouds { to { transform: translateX(40px); } }

/* ---------- Shell ---------- */
.iso .nav { background: rgba(255, 255, 255, .72); backdrop-filter: blur(14px); border-right: 1px solid var(--line); padding: 20px 14px; }
.iso .brand { flex-direction: row; align-items: center; border: 0; padding: 4px 8px 12px; }
.iso .mark { display: grid; width: 40px; height: 40px; border-radius: 12px; transform: none; background: var(--blue); color: #fff; border: 0; font: 800 1.2rem var(--display); box-shadow: -2px 2px 0 var(--blue-d), -4px 4px 0 var(--blue-d), -6px 6px 10px rgba(20, 60, 140, .35); }
.iso .brand-txt b { font: 800 1.15rem var(--display); font-style: normal; text-shadow: none; letter-spacing: -.02em; }
.iso .brand-txt b::before, .iso .brand-txt b::after { display: none; }
.iso .brand-txt small { font: 500 .72rem var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-3); margin-top: 2px; }
.iso .navlinks a { font: 600 .95rem var(--font); border-radius: 12px; padding: 10px 12px; color: var(--ink-2); }
.iso .navlinks a .i { display: block; }
.iso .navlinks a::after { display: none; }
.iso .navlinks a.active { background: #fff; color: var(--blue); font-style: normal; box-shadow: var(--card-sh); }
.iso .navlinks a.active::before { display: none; }
.iso .navlinks a .count { background: var(--pink); color: #fff !important; border-radius: 10px; }
.iso .me { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 10px; box-shadow: var(--card-sh); }
.iso .av { background: var(--blue); color: #fff; border: 0; font-style: normal; }

.iso .main { padding: 0 32px 48px; }
.iso .topbar { background: none; border-bottom: 0; padding: 18px 0 8px; margin-bottom: 4px; align-items: center; }
.iso .titles h1 { font: 800 1.7rem var(--display); font-style: normal; letter-spacing: -.03em; }
.iso .titles h1::before, .iso .titles h1::after { display: none; }
.iso .titles p { font: 500 .85rem var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-3); margin-top: 4px; }
.iso .issue { display: none; }
.iso .stats { gap: 8px; }
.iso .stat, .iso .chip-btn { background: #fff; border: 0; border-radius: 14px; box-shadow: var(--card-sh); padding: 6px 12px; height: auto; }
.iso .stat .k, .iso .chip-btn::before, .iso .ring::before { font: 600 .6rem var(--font); letter-spacing: .08em; color: var(--ink-3); }
.iso .stat .v, .iso .chip-btn b, .iso .ring b { font: 700 1.15rem var(--display); color: var(--ink); text-shadow: none; }
.iso .chip-btn.alive b { color: var(--flame); }
.iso .iconbtn { border: 0; background: #fff; border-radius: 12px; box-shadow: var(--card-sh); }
.iso .score-chip .v small { color: var(--blue); }

/* ---------- Cards & controls ---------- */
.iso .card { background: #fff; border: 0; border-radius: var(--radius); box-shadow: var(--card-sh); padding: 18px; }
.iso .card h3 { font-size: 1rem; font-style: normal; }
.iso .card h3::before { display: none; }
.iso .card h3 .i { display: inline-block; color: var(--blue); }
.iso .btn { border: 0; border-radius: 12px; background: #fff; color: var(--ink); font: 600 .9rem var(--font); box-shadow: 0 2px 0 var(--line-2), var(--card-sh); }
@media (hover: hover) { .iso .btn:hover { background: #fff; color: var(--blue); transform: translateY(-2px); box-shadow: 0 4px 0 var(--line-2), var(--card-sh); } }
.iso .btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--line-2); }
.iso .btn.primary { background: var(--blue); color: #fff; font-style: normal; box-shadow: 0 4px 0 var(--blue-d), 0 14px 24px -12px rgba(30, 99, 255, .8); }
@media (hover: hover) { .iso .btn.primary:hover { background: #2d6fff; color: #fff; box-shadow: 0 6px 0 var(--blue-d), 0 16px 26px -12px rgba(30, 99, 255, .9); } }
.iso .btn.ghost { background: transparent; box-shadow: none; text-decoration: none; }
.iso .btn.danger { color: var(--bad) !important; }
.iso select, .iso .input { border: 0; border-radius: 12px; background-color: #fff; box-shadow: var(--card-sh); font: 600 .92rem var(--font); padding-left: 12px; }
.iso .seg { background: #e3ecfb; border: 0; border-radius: 12px; padding: 3px; }
.iso .seg button { border-radius: 10px; font: 600 .8rem var(--font); text-transform: none; letter-spacing: 0; }
.iso .seg button + button { border-left: 0; }
.iso .seg button.on { background: #fff; color: var(--blue); box-shadow: 0 2px 6px rgba(20, 60, 140, .18); }
.iso .switch span { border-radius: 20px; border: 0; background: #d5e1f5; }
.iso .switch span::after { border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.iso .switch input:checked + span { background: var(--blue); }
.iso .pill { border: 0; border-radius: 999px; background: #eef4ff; text-transform: none; letter-spacing: 0; font: 600 .78rem var(--font); }
.iso .pbar-wrap { border: 0; border-radius: 6px; background: #e3ecfb; height: 8px; }
.iso .pbar-wrap i { background: linear-gradient(90deg, var(--blue), #5aa2ff); border-radius: 6px; }

/* ---------- Play ---------- */
.iso .toolbar { border-bottom: 0; padding-bottom: 0; }
.iso .tools .btn { font-style: normal; }
.iso .skin-tag { display: none; }
.iso .lesson-steps { color: var(--ink-3); font-family: var(--font); letter-spacing: .04em; }
.iso .lesson-steps span.on b { background: var(--yellow); border-color: var(--ink); }

/* clue bar: a floating card */
.iso .cluebar { background: #fff; border: 0; border-radius: 20px; box-shadow: var(--card-sh); padding: 12px 14px; min-height: 66px; align-items: center; z-index: 6; }
@media not all and (pointer: coarse) { .iso .cluebar { position: relative; } }
.iso .cluebar .tag { background: var(--dirc, var(--blue)); color: #fff; font: 800 .9rem var(--display); border-radius: 10px; padding: 4px 10px; box-shadow: 0 3px 0 var(--dird, var(--blue-d)); }
.iso .cluebar .tag i { font-style: normal; }
.iso .clue-text { font: 800 clamp(1.3rem, 1rem + 1vw, 1.8rem) var(--display); font-style: normal; color: var(--ink); }
.iso .clue-text mark { background: none; padding: 0; color: inherit; }
.iso .cluebar .len { font: 600 .8rem var(--font); text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.iso .bar-nav { border: 0; background: #eef4ff; color: var(--blue); font: 800 1.4rem var(--display); box-shadow: 0 2px 0 #d1dff6; }
@media (hover: hover) { .iso .bar-nav:hover { background: var(--blue); color: #fff; } }
.iso .bar-count { font: 700 .85rem var(--display); color: var(--ink-3); }
.iso .cluebar .extra { color: var(--green); font-style: normal; font-weight: 600; }
body.iso.dir-down .cluebar { --dirc: var(--orange); --dird: var(--orange-d); }

/* ---------- The island ---------- */
.iso .stage3d { perspective: 1800px; perspective-origin: 50% 30%; padding: 8px 0 18px; display: grid; place-items: center; overflow: visible; position: relative; }
.iso .stage3d::after { content: ""; position: absolute; left: 50%; bottom: 6%; width: 60%; height: 40px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(20, 60, 140, .22), transparent); filter: blur(6px); z-index: 0; }
.iso .grid {
  --rx: var(--tilt); --rz: var(--turn);
  gap: calc(var(--s) * .12); padding: calc(var(--s) * .4); border: 0; border-radius: calc(var(--s) * .45);
  background: linear-gradient(135deg, #bfe5b4, #9fd59b);
  transform: rotateX(var(--rx)) rotateZ(var(--rz)) rotateZ(var(--ry, 0deg));
  transform-style: preserve-3d;
  box-shadow: -1px 1px 0 #8bc487, -2px 2px 0 #8bc487, -3px 3px 0 #7db479, -4px 4px 0 #7db479, -5px 5px 0 #b48a5a, -6px 6px 0 #b48a5a, -7px 7px 0 #a77c4c, -8px 8px 0 #a77c4c, -9px 9px 0 #9a6f40, -10px 10px 0 #9a6f40, -11px 11px 0 #8d6334, -12px 12px 0 #8d6334, -14px 14px 0 #80582a, -30px 30px 40px rgba(20, 60, 140, .35);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
  position: relative; z-index: 1;
}
.iso .grid.intro { animation: islandIn 1s cubic-bezier(.2, .9, .3, 1.1) both; }
@keyframes islandIn { from { opacity: 0; transform: rotateX(var(--tilt)) rotateZ(calc(var(--turn) - 30deg)) translateZ(-120px) scale(.7); } }

/* every cell is a block; side faces are a stacked shadow toward screen-down */
.iso .c { border-radius: calc(var(--s) * .16); transform-style: preserve-3d; outline: 0 !important; transition: transform .25s cubic-bezier(.2, 1.4, .4, 1), background .2s, box-shadow .2s; }
.iso .c.blk { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); background-image: none !important; }
.iso .grid.intro .c { animation: rise .55s cubic-bezier(.2, 1.2, .4, 1) backwards; animation-delay: var(--delay); }
@keyframes rise { from { transform: translateZ(-60px); opacity: 0; } }

.iso .c.let, .iso .c.clue { --top: #ffffff; --s1: #d7e3f7; --s2: #b9cdee; --lift: 10px; background: var(--top); border: 0; transform: translateZ(var(--lift)); cursor: pointer;
  box-shadow: -1px 1px 0 var(--s1), -2px 2px 0 var(--s1), -3px 3px 0 var(--s1), -4px 4px 0 var(--s2), -5px 5px 0 var(--s2), -6px 6px 0 var(--s2), -7px 7px 0 var(--s2), -8px 8px 0 var(--s2), -12px 12px 14px rgba(20, 60, 140, .3); }
.iso .c.clue { --top: #dbe6ff; --s1: #b5c9f5; --s2: #95b0ea; --lift: 6px; }
.iso .c.clue.ca { --top: #5b8dff; --s1: #3f74f0; --s2: #2c5ed6; }
.iso .c.clue.cd { --top: #ffab5c; --s1: #f1913a; --s2: #d8761f; }
.iso .c.clue.ca.cd { background: linear-gradient(135deg, #5b8dff 50%, #ffab5c 50%); }
.iso .c.clue.hl { --lift: 16px; filter: saturate(1.2) brightness(1.06); }
@media (hover: hover) { .iso .c.let:hover { --lift: 16px; } }
.iso .c.let.word { --top: #fff4c2; --s1: #f3dc85; --s2: #e1c35c; --lift: 16px; }
.iso .c.let.cur { --top: var(--blue); --s1: #1652e0; --s2: #0f3fb8; --lift: 28px; animation: hop 1.1s ease-in-out infinite; z-index: 3; }
body.dir-down .iso .c.let.cur, body.iso.dir-down .c.let.cur { --top: var(--orange); --s1: #df7413; --s2: #bd5e0c; }
@keyframes hop { 50% { transform: translateZ(calc(var(--lift) + 10px)); } }
.iso .c.let.ok { --top: #6ee7a8; --s1: #3fcf86; --s2: #22b06b; --lift: 18px; animation: okwave 1.8s ease-in-out infinite; animation-delay: calc(var(--d) * 70ms); }
@keyframes okwave { 50% { transform: translateZ(30px); } }
.iso .c.let.bad { --top: #ffd2d7; --s1: #ffaab4; --s2: #f3808e; animation: nudge3 .3s; color: inherit !important; background: var(--top) !important; }
.iso .c.let.bad::before { display: none; }
@keyframes nudge3 { 25% { transform: translateZ(var(--lift)) translateX(-4px); } 75% { transform: translateZ(var(--lift)) translateX(4px); } }
.iso .c.let.typed { animation: plop .28s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes plop { from { transform: translateZ(calc(var(--lift) + 22px)); } }
.iso .c.let.flip { animation: pop3 .6s cubic-bezier(.2, 1.4, .4, 1) both !important; animation-delay: calc(var(--i) * 60ms) !important; }
.iso .c.let.flip::before { display: none; }
@keyframes pop3 { 40% { transform: translateZ(48px); --top: #6ee7a8; } }
.iso .c.let.cur:empty::after, .iso .c.let.cur .bb:empty::after { display: none; }

/* billboards: undo the board rotation so letters face the camera and stand up */
.iso .bb { display: grid; place-items: center; width: 100%; height: 100%; transform: rotateZ(calc(-1 * var(--rz, var(--turn)) - var(--ry, 0deg))) translateZ(1px); pointer-events: none; font-style: normal; }
.iso .c.let .bb { font: 700 calc(var(--s) * .58) var(--display); color: var(--ink); line-height: 1; }
.iso .c.let.cur .bb { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.iso .c.let.rev .bb { color: var(--blue); }
.iso .c.let.bad .bb { color: #c81e33; }
.iso .c.let.ok .bb { color: #0b5a34; }
.iso .c.clue .bb { display: flex; flex-direction: column; gap: 1px; align-items: center; justify-content: center; font: 800 calc(var(--s) * .3) var(--display); color: #fff; line-height: 1; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.iso .c.clue:not(.ca):not(.cd) .bb { color: var(--ink); }
.iso .c.clue em { color: inherit !important; font-style: normal; }

/* ---------- Clue lists: two coloured cards ---------- */
.iso .clues { border: 0 !important; border-radius: 22px; box-shadow: var(--card-sh); background: #fff !important; }
.iso .clues h3 { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; padding: 0 0 8px; font: 700 .95rem var(--display); letter-spacing: -.01em; text-transform: none; color: var(--hc); border-bottom: 3px solid var(--hc); }
.iso .clues h3:first-of-type { --hc: var(--blue); }
.iso .clues h3:last-of-type { --hc: var(--orange); }
.iso .clues h3 span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--hc); color: #fff; font-size: .9rem; }
.iso .clues li { border: 0; border-radius: 10px; padding: 8px 10px; font: 500 .95rem var(--font); }
.iso .clues li b { font: 700 .8rem var(--display); color: var(--ink-3); }
.iso #la li.act { background: #e6eeff; box-shadow: inset 4px 0 0 var(--blue); }
.iso #ld li.act { background: #fff0e2; box-shadow: inset 4px 0 0 var(--orange); }
.iso .clues li.act { transform: none; font-style: normal; }
.iso .clues li.done > span { text-decoration: line-through; color: var(--ink-3); }
.iso .clues .ph { font: 600 .78rem var(--font); text-transform: none; letter-spacing: 0; }
.iso .new-tag { background: var(--yellow); border: 0; border-radius: 5px; font: 800 .55rem var(--font); }
.iso .clues-top b { font: 800 1.05rem var(--display); }

/* ---------- Other views (keep them in the same light, rounded language) ---------- */
.iso .section-head { border-top: 0; padding-top: 8px; }
.iso .section-head small { color: var(--blue) !important; font-family: var(--font); letter-spacing: .08em; }
.iso .section-head h2 { font: 800 2rem var(--display); font-style: normal; }
.iso .section-head p { font-style: normal; color: var(--ink-2); font-size: 1rem; }
.iso .stage { border: 0; border-radius: 22px; background: #fff; box-shadow: var(--card-sh); padding: 18px 20px 34px; margin-bottom: 4px; }
.iso .stage::before { display: none; }
.iso .stage-head h3 { font: 800 1.3rem var(--display); font-style: normal; }
.iso .stage-head small { color: var(--ink-3); font-family: var(--font); letter-spacing: .06em; }
.iso .stage-head .pill, .iso .unit-acts { margin-right: 0; }
.iso .track { height: 6px; border-radius: 6px; background: #e3ecfb; }
.iso .track i { background: var(--sc); }
.iso .node { border: 0; border-radius: 16px; background: #fff; font: 800 1rem var(--display); font-style: normal; box-shadow: -1px 1px 0 #d7e3f7, -2px 2px 0 #d7e3f7, -3px 3px 0 #b9cdee, -4px 4px 0 #b9cdee, -6px 6px 10px rgba(20, 60, 140, .25); }
.iso .node.done { background: #fff; box-shadow: -1px 1px 0 color-mix(in srgb, var(--sc) 50%, #fff), -2px 2px 0 color-mix(in srgb, var(--sc) 50%, #fff), -3px 3px 0 color-mix(in srgb, var(--sc) 70%, #000), -4px 4px 0 color-mix(in srgb, var(--sc) 70%, #000), -6px 6px 10px rgba(20, 60, 140, .25); }
.iso .node.cur { background: var(--blue); color: #fff; animation: hopNode 1.2s ease-in-out infinite; box-shadow: -1px 1px 0 #1652e0, -2px 2px 0 #1652e0, -3px 3px 0 #0f3fb8, -4px 4px 0 #0f3fb8, -8px 8px 14px rgba(30, 99, 255, .45); }
@keyframes hopNode { 50% { transform: translateY(-6px); } }
.iso .node.lock { background: #eef2f8; color: var(--ink-3); border-style: solid; }
.iso .node .exam-lbl { background: var(--pink); color: #fff; border: 0; border-radius: 6px; font-family: var(--font); }
.iso .rank-badge, .iso .league-badge { border: 0; border-radius: 16px; box-shadow: var(--card-sh); }
.iso .rank-badge { background: var(--yellow); color: var(--ink); }
.iso .rank, .iso .league { background: #fff; border: 0; border-radius: 20px; box-shadow: var(--card-sh); padding: 16px 18px; }
.iso .lb-row { border-radius: 14px; border-bottom: 0; padding: 10px 12px; }
.iso .lb-row.me { background: #e6eeff; }
.iso .pos { border-radius: 10px; font: 800 1rem var(--display); font-style: normal; text-shadow: none; }
.iso .pos.p1 { background: var(--yellow); color: var(--ink); }
.iso .pos.p2 { background: #e3ecfb; color: var(--ink); }
.iso .pos.p3 { background: #ffd8b5; color: var(--ink); }
.iso .list-row { border: 0; border-radius: 14px; background: #f4f8ff; padding: 10px 12px; }
.iso .code { background: var(--yellow); border: 0; border-radius: 8px; font-family: var(--display); }
.iso .profile-head { border-bottom: 0; }
.iso .profile-head h2 { font: 800 2rem var(--display); font-style: normal; }
.iso .stat-grid { border: 0; gap: 12px; }
.iso .stat-card { border: 0; border-radius: 18px; background: #fff !important; box-shadow: var(--card-sh); }
.iso .stat-card b { font: 800 1.8rem var(--display); font-style: normal; }
.iso .stat-card span { font: 600 .72rem var(--font); text-transform: none; letter-spacing: 0; }
.iso .badge { border: 0; border-radius: 16px; background: #f4f8ff; }
.iso .badge.on { background: #fff7d6; }
.iso .chip { border: 0; border-radius: 999px; background: #eef4ff; font: 600 .8rem var(--font); }
.iso .quests li { border: 0; border-radius: 14px; background: #f4f8ff; padding: 12px; }
.iso .daily-card { background: var(--blue); color: #fff; border-radius: 22px; box-shadow: 0 6px 0 var(--blue-d), var(--card-sh); }
.iso .daily-card .muted { color: #dbe6ff; }
.iso .daily-card h3 { color: #fff; }
.iso .daily-card .btn.primary { background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 #d9b93a; }
.iso .streak-card .flame { border: 0; border-radius: 18px; }
.iso .shields { border: 0; border-radius: 14px; background: #f4f8ff; }
.iso .banner { border: 0; border-radius: 18px; box-shadow: var(--card-sh); }
.iso .lesson-pane { border: 0; background: #fff; border-radius: 22px; box-shadow: var(--card-sh); padding: 24px; }
.iso .warm h2 { font: 800 2.2rem var(--display); font-style: normal; }
.iso .ob-opts .btn { border-radius: 14px; }
.iso .ob-opts .btn.right { background: var(--green); color: #fff; }
.iso .ob-opts .btn.wrong { background: var(--bad); color: #fff; }
.iso .tile { border-radius: 12px; font: 800 1.3rem var(--display); font-style: normal; }
.iso .rv-card { background: #fff; border: 0; border-radius: 24px; box-shadow: var(--card-sh); background-image: none; padding-top: 32px; }
.iso .rv-tr { font: 800 2.6rem var(--display); font-style: normal; }
.iso .slots span { border: 0; border-radius: 12px; background: #f4f8ff; box-shadow: 0 3px 0 #d7e3f7; font: 800 1.4rem var(--display); font-style: normal; }
.iso .slots span.cur { background: #e6eeff; box-shadow: 0 3px 0 var(--blue); }
.iso .slots span.ok { background: var(--green); color: #fff; box-shadow: 0 3px 0 #0e8a4f; }
.iso .slots span.bad { background: var(--bad); color: #fff; box-shadow: 0 3px 0 #c81e33; }
.iso .word-list li { border-bottom: 1px solid var(--line); }
.iso .word-list b { font: 700 .95rem var(--display); font-style: normal; }
.iso .word-list .str { border: 0; border-radius: 4px; background: linear-gradient(90deg, var(--blue) calc(var(--s) * 100%), #e3ecfb 0); }
.iso .onboard { background: radial-gradient(1000px 600px at 30% 0, #fff, var(--sky-2)); }
.iso .onboard::before { display: none; }
.iso .ob-card { background: #fff; border: 0; border-radius: 26px; box-shadow: var(--card-sh); padding: 28px; }
.iso .ob-card h1 { font: 800 2.2rem var(--display); font-style: normal; }
.iso .ob-card p { font-style: normal; }
.iso .ob-step i { border: 0; border-radius: 4px; background: #e3ecfb; }
.iso .ob-step i.on { background: var(--blue); }

/* win dialog */
.iso .dialog::backdrop { background: rgba(11, 42, 91, .25); backdrop-filter: blur(4px); }
.iso .win { background: #fff; border: 0; border-radius: 26px; box-shadow: 0 30px 60px -20px rgba(11, 42, 91, .5); }
.iso .win h2 { font: 800 1.7rem var(--display); font-style: normal; }
.iso .win h2::before, .iso .win h2::after { display: none; }
.iso .win-stats { border: 0; gap: 8px; }
.iso .win-stats div { border: 0; border-radius: 14px; background: #f4f8ff !important; }
.iso .win-stats b { font: 800 1.2rem var(--display); font-style: normal; }
.iso .win-stars span.on .i { fill: var(--yellow); color: #e0b400; }
.iso .seal { color: var(--blue) !important; border-color: var(--blue) !important; mix-blend-mode: normal; filter: none; border-radius: 10px; font-family: var(--display); }
.iso .seal.fail { color: var(--bad) !important; border-color: var(--bad) !important; }
.iso .toast { border: 0; border-radius: 16px; background: #fff; box-shadow: 0 20px 40px -16px rgba(11, 42, 91, .45); font-family: var(--font); }
.iso .toast > .i { border: 0; border-radius: 12px; }
.iso .toast span { font-style: normal; }
.iso .lesson-mascot span { border: 0; border-radius: 14px; box-shadow: var(--card-sh); font-style: normal; font-family: var(--font); }
.iso .score-big b { font-style: normal; text-shadow: -3px 3px 0 #dbe6ff; }
.iso .score-big span { border: 0; border-radius: 10px; }
.iso .guide-list b { font-style: normal; }

/* ---------- Mobile: flatter camera, bigger tiles ---------- */
@media (max-width: 860px) {
  .iso .stage3d { padding: 14px 0 24px; }
  .iso .main { padding: 0 14px 96px; }
  .iso .nav { border-right: 0; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .94); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .iso .navlinks a { padding: 8px 2px; font-size: .66rem; }
  .iso .navlinks a.active { box-shadow: none; background: #e6eeff; }
  .iso .osk { background: rgba(255, 255, 255, .95); border-top: 1px solid var(--line); }
  .iso .osk button { border: 0; border-radius: 10px; background: #fff; box-shadow: 0 3px 0 #d7e3f7; font: 700 1.1rem var(--display); }
  .iso .osk button.down { background: var(--blue); color: #fff; }
  .iso .board .cluebar { background: #fff; border-top: 0; border-radius: 18px 18px 0 0; margin: 0 -14px; box-shadow: 0 -8px 24px -12px rgba(20, 60, 140, .35); }
  .iso .cluebar::before { display: none; }
}

/* ---------- Phone: one compact tool row so the island gets the room ---------- */
@media (max-width: 860px) {
  .iso .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 0 -14px; padding: 0 14px 2px; }
  .iso .toolbar::-webkit-scrollbar { display: none; }
  .iso .toolbar select { flex: 0 0 132px; height: 38px; font-size: .82rem; }
  .iso .toolbar .seg { flex: none; }
  .iso .toolbar .seg button { padding: 5px 8px; font-size: .74rem; }
  .iso .tools { width: auto; flex: none; flex-wrap: nowrap; gap: 4px; }
  .iso .tools .btn { flex: none; width: auto; height: 38px; padding: 0 10px; font-size: .8rem; gap: 5px; white-space: nowrap; }
  .iso .tools .btn .i { width: 18px; height: 18px; }
  .iso .tools #cluesBtn, .iso .tools #new { width: auto; padding: 0 12px; font-size: .82rem; gap: 6px; white-space: nowrap; }
  .iso .tools .switch { flex: none; }
  .iso .tools #new { order: -1; }
  .iso .lesson-steps { margin: 2px 0 0; font-size: .62rem; }
  .iso .topbar { padding: 8px 0 4px; }
  .iso .view-title, .iso .topbar h1 { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { .iso .grid { --ry: 0deg !important; } }
.iso .cluebar .tag, .iso .cluebar .tag * { color: #fff !important; }
/* the cursor block always shows its letter in white, whatever state the cell is in */
.iso .c.let.cur:not(.bad) .bb { color: #fff !important; text-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 0 8px rgba(0, 0, 0, .25); }
body.iso.dir-down .c.let.cur { --top: #ea6c0a; --s1: #cf5d06; --s2: #ad4c04; }

/* daily-goal ring: a real ring again (the card style above used to flatten it into a pill) */
.iso .ring { width: 48px; height: 48px; padding: 0; border-radius: 50%; box-shadow: var(--card-sh); background: conic-gradient(var(--blue) calc(var(--p) * 1turn), #e6eeff 0); flex: none; }
.iso .ring::before { content: ""; inset: 5px; background: #fff; }
.iso .ring b { font: 700 .68rem var(--display); color: var(--ink); letter-spacing: -.02em; }
.iso .ring.full { background: conic-gradient(var(--green) 1turn, var(--green) 0); }
.iso .ring.full b { color: var(--green); font-size: .8rem; }

/* ---------- Profile ---------- */
.iso #profileView { display: grid; gap: 16px; }
.iso .pf-hero { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 18px; align-items: center; padding: 22px; background: linear-gradient(135deg, #ffffff 0%, #eef4ff 60%, #fff5e8 100%) !important; overflow: hidden; }
.iso .pf-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.iso .pf-av { position: relative; flex: none; width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font: 800 2rem var(--display); color: #fff; background: linear-gradient(135deg, #3b7bff, #1e63ff); box-shadow: -4px 4px 0 #0f3fb8, 0 16px 26px -12px rgba(30, 99, 255, .8); transform: rotate(-4deg); }
.iso .pf-av em { position: absolute; right: -10px; bottom: -8px; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 12px; display: grid; place-items: center; font: 800 .8rem var(--display); font-style: normal; color: var(--ink); background: var(--yellow); box-shadow: 0 3px 0 #e1b400; transform: rotate(4deg); }
.iso .pf-name { min-width: 0; }
.iso .pf-name small, .iso .pf-now small { font: 600 .68rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.iso .pf-name h2 { margin: 2px 0 8px; font: 800 1.7rem var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iso .pf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.iso .pf-tags span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #fff; box-shadow: 0 2px 0 #dbe6ff; font: 600 .76rem var(--font); color: var(--ink-2); }
.iso .pf-tags .i { width: 14px; height: 14px; }
.iso .pf-id #logout { margin-left: auto; align-self: flex-start; }
.iso .pf-now { display: grid; gap: 4px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px #e3ebfa; }
.iso .pf-now b { font: 800 1.05rem var(--display); }
.iso .pf-now span { color: var(--ink-2); font-size: .88rem; }
.iso .pf-now .btn { margin-top: 6px; justify-self: start; }
.iso .pf-score { display: flex; align-items: center; gap: 14px; padding: 10px; border: 0; border-radius: 20px; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.iso .pf-score:disabled { cursor: default; opacity: .75; }
@media (hover: hover) { .iso .pf-score:not(:disabled):hover { background: rgba(255, 255, 255, .7); } }
.iso .pf-ring { flex: none; position: relative; width: 96px; height: 96px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(var(--blue) calc(var(--p) * 1turn), #dfe8fb 0); }
.iso .pf-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.iso .pf-ring > * { position: relative; }
.iso .pf-ring b { font: 800 1.9rem/1 var(--display); }
.iso .pf-ring small { font: 700 .7rem var(--display); color: var(--blue); }
.iso .pf-score-t { display: grid; gap: 3px; }
.iso .pf-score-t b { font: 800 1rem var(--display); }
.iso .pf-score-t span { font-size: .84rem; color: var(--blue); font-weight: 600; }
.iso .pf-score-t em { font-style: normal; font-size: .8rem; color: var(--ink-3); line-height: 1.35; }
.iso .pf-auth-t { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.iso .pf-auth-t .i { flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: #e6eeff; color: var(--blue); }
.iso .pf-auth-t b { display: block; font: 800 1rem var(--display); }
.iso .pf-auth-t span { color: var(--ink-2); font-size: .88rem; }

.iso .stat-grid { grid-template-columns: repeat(6, 1fr); }
.iso .stat-card { display: grid; gap: 2px; padding: 14px; }
.iso .stat-card b { font-size: 1.45rem; }
.iso .stat-card small { color: var(--ink-3); font-size: .72rem; }
.iso .stat-card .i { width: 22px; height: 22px; color: var(--blue); }

.iso .pf-growth-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.iso .pf-growth-h h3 { margin: 0; }
.iso .pf-deltas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 8px; }
.iso .pf-deltas div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: #f4f8ff; }
.iso .pf-deltas span { font-size: .74rem; color: var(--ink-3); font-weight: 600; }
.iso .pf-deltas b { font: 800 1.35rem var(--display); }
.iso .pf-deltas em { font: 700 .78rem var(--display); font-style: normal; color: var(--ink-3); }
.iso .pf-deltas em.up { color: var(--green); }
.iso .pf-deltas em.down { color: #d93a4c; }
.iso .pf-chart { display: block; width: 100%; height: 170px; overflow: visible; }
.iso .pf-chart .gl { stroke: #e6edf9; stroke-width: 1; stroke-dasharray: 4 6; }
.iso .pf-chart .ln { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.iso .pf-chart .ln.s { stroke: var(--blue); }
.iso .pf-chart .ln.w { stroke: var(--orange); }
.iso .pf-chart .ar.s { fill: rgba(30, 99, 255, .1); }
.iso .pf-chart .ar.w { fill: rgba(240, 129, 31, .1); }
.iso .pf-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-3); margin-top: 4px; }
.iso .pf-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; font-size: .76rem; color: var(--ink-3); }
.iso .pf-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.iso .pf-legend i.ls { background: var(--blue); } .iso .pf-legend i.lw { background: var(--orange); margin-left: 8px; }
.iso .pf-legend i.know { background: var(--green); } .iso .pf-legend i.seen { background: #cfe0ff; margin-left: 8px; }

.iso .pf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.iso .pf-bars { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 150px; align-items: end; margin-top: 10px; }
.iso .pf-bars::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(22px + (100% - 40px) * var(--goal) / 100%); border-top: 2px dashed #ffc94d; }
.iso .pf-bar { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; gap: 2px; }
.iso .pf-bar i { align-self: end; height: max(4px, var(--h)); border-radius: 10px 10px 4px 4px; background: #cfe0ff; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.iso .pf-bar.hit i { background: var(--blue); box-shadow: 0 -3px 0 #0f3fb8 inset; }
.iso .pf-bar.now span { color: var(--blue); font-weight: 800; }
.iso .pf-bar b { font: 700 .66rem var(--display); color: var(--ink-2); min-height: 1em; }
.iso .pf-bar span { font-size: .7rem; color: var(--ink-3); font-weight: 600; }
.iso .pf-mastery { display: grid; gap: 12px; margin-top: 12px; }
.iso .pf-cefr { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.iso .pf-cefr > b { display: grid; place-items: center; height: 26px; border-radius: 8px; font: 800 .72rem var(--display); color: #fff; background: var(--blue); }
.iso .pf-cefr .cefr-A1 { background: #22b06b; } .iso .pf-cefr .cefr-A2 { background: #1fa3c4; } .iso .pf-cefr .cefr-B1 { background: #1e63ff; } .iso .pf-cefr .cefr-B2 { background: #7a4dff; } .iso .pf-cefr .cefr-C1 { background: #f0811f; }
.iso .pf-track { position: relative; height: 12px; border-radius: 99px; background: #eef3fb; overflow: hidden; }
.iso .pf-track i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: inherit; }
.iso .pf-track i.seen { background: #cfe0ff; }
.iso .pf-track i.know { background: var(--green); }
.iso .pf-cefr span { font: 700 .85rem var(--display); min-width: 64px; text-align: right; }
.iso .pf-cefr span small { color: var(--ink-3); font-weight: 600; }
.iso .pf-heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 18px); gap: 4px; margin-top: 12px; justify-content: start; overflow-x: auto; }
.iso .pf-heat i { aspect-ratio: 1; border-radius: 4px; background: #eef3fb; }
.iso .pf-heat i.hf { background: transparent; }
.iso .pf-heat i.h1, .iso .pf-legend i.h1 { background: #cfe0ff; }
.iso .pf-heat i.h2, .iso .pf-legend i.h2 { background: #86adff; }
.iso .pf-heat i.h3, .iso .pf-legend i.h3 { background: #3b7bff; }
.iso .pf-heat i.h4, .iso .pf-legend i.h4 { background: #0f3fb8; }
.iso .pf-heat i.t { box-shadow: 0 0 0 2px var(--orange); }

@media (max-width: 1100px) {
  .iso .pf-hero { grid-template-columns: 1fr 1fr; }
  .iso .pf-id { grid-column: 1 / -1; }
  .iso .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .iso .pf-hero, .iso .pf-two { grid-template-columns: 1fr; }
  .iso .pf-deltas { grid-template-columns: repeat(2, 1fr); }
  .iso .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .iso .pf-heat { gap: 2px; }
  .iso .pf-heat i { border-radius: 2px; }
}
.iso .pf-auth { max-width: none; } .iso .pf-auth form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; } .iso .pf-auth form .err { grid-column: 1 / -1; order: 9; margin: 0; } @media (max-width: 700px) { .iso .pf-auth form { grid-template-columns: 1fr; } }
/* Play screen: the big page title gives its room to the puzzle */
body.iso[data-view="play"] #viewTitle { display: none; }
body.iso[data-view="play"] #viewSub { margin-top: 0; font-weight: 600; color: var(--ink-2); }
body.iso[data-view="play"] .topbar { padding-top: 10px; padding-bottom: 6px; }
body.iso[data-view="play"] .board { gap: 10px; }

/* =====================================================================
   UX pass 1 (docs/ux-ui-arastirmasi.md, quick wins):
   contrast tokens · direction cues beyond colour · clue bar · keyboard · calmer motion · lighter paint
   ===================================================================== */
:root {
  --ac-50: #eaf1ff; --ac-500: #1e63ff; --ac-700: #1446c2;   /* across: tint / fill / text */
  --dn-50: #fff1e3; --dn-500: #f0811f; --dn-700: #b8500a;   /* down */
  --ink-2: #3d5a8a; --ink-3: #56698f;                       /* was #8aa0c6 (2.6:1) → 4.8:1 */
  --ok-500: #14b86a; --ok-700: #0a6b3d; --bad-500: #ff4d5e; --bad-700: #b4232f;
  --dur-1: 90ms; --dur-2: 160ms; --dur-3: 280ms; --dur-4: 450ms;
  --ease-out: cubic-bezier(.05, .7, .1, 1); --ease-spring: cubic-bezier(.2, 1.4, .4, 1);
}

/* Clue blocks: light fills with navy numbers (white on orange was 1.9:1). Two-clue blocks split top=across, bottom=down. */
.iso .c.clue.ca { --top: #cfdcff; --s1: #a9c0fb; --s2: #8aa8f2; }
.iso .c.clue.cd { --top: #ffd9b3; --s1: #f6bd85; --s2: #e9a061; }
.iso .c.clue.ca.cd { background: linear-gradient(180deg, #cfdcff 50%, #ffd9b3 50%); }
.iso .c.clue .bb, .iso .c.clue:not(.ca):not(.cd) .bb { color: var(--ink) !important; text-shadow: none; font: 800 max(10px, calc(var(--s) * .3)) var(--display); gap: 2px; }
.iso .c.clue .bb span { display: inline-flex; align-items: center; gap: 1px; padding: 1px 3px; border-radius: 4px; background: rgba(255, 255, 255, .6); }
.iso .c.clue.hl { filter: none; --lift: 16px; }
.iso .c.clue.ca.hl { --top: #b3c9ff; }
.iso .c.clue.cd.hl { --top: #ffc68d; }

/* Active word wears its direction: tint + a bar on the reading edge (under the letters across, left of them down). */
.iso .c.let { position: relative; }
.iso .c.let.word { --top: var(--ac-50); --s1: #c9d8fb; --s2: #a9c0f3; }
body.iso.dir-down .c.let.word { --top: var(--dn-50); --s1: #f6d2ad; --s2: #eab486; }
.iso .c.let.word::after { content: ""; position: absolute; pointer-events: none; border-radius: 3px; background: var(--ac-700);
  left: 14%; right: 14%; bottom: 7%; height: max(3px, calc(var(--s) * .08)); }
body.iso.dir-down .c.let.word::after { background: var(--dn-700); left: 7%; top: 14%; bottom: 14%; right: auto; width: max(3px, calc(var(--s) * .08)); height: auto; }
.iso .c.let.cur::after, .iso .c.let.ok::after, .iso .c.let.bad::after { display: none; }
.iso .c.let.word.wave { animation: waveIn var(--dur-3) var(--ease-spring) backwards; animation-delay: calc(var(--wi, 0) * 35ms); }
@keyframes waveIn { from { transform: translateZ(calc(var(--lift) - 10px)); } }
/* Cursor: hops (as before) and wears a ring in the direction colour */
.iso .c.let.cur { animation: hop 1.1s ease-in-out infinite; --lift: 26px; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ac-500), -1px 1px 0 var(--s1), -2px 2px 0 var(--s1), -3px 3px 0 var(--s1), -4px 4px 0 var(--s2), -5px 5px 0 var(--s2), -6px 6px 0 var(--s2), -7px 7px 0 var(--s2), -8px 8px 0 var(--s2), -12px 14px 16px rgba(20, 60, 140, .32); }
body.iso.dir-down .c.let.cur { --top: var(--dn-500); --s1: #df7413; --s2: #bd5e0c; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--dn-500), -1px 1px 0 var(--s1), -2px 2px 0 var(--s1), -3px 3px 0 var(--s1), -4px 4px 0 var(--s2), -5px 5px 0 var(--s2), -6px 6px 0 var(--s2), -7px 7px 0 var(--s2), -8px 8px 0 var(--s2), -12px 14px 16px rgba(20, 60, 140, .32); }
body.iso.dir-down .c.let.cur:not(.bad) .bb { color: var(--ink) !important; text-shadow: none; } /* navy on orange 5.3:1 */


/* ---------- Clue bar: direction badge (arrow + number + word), Inter clue, letter slots, 44px buttons ---------- */
.iso .cluebar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; min-height: 74px; }
.iso .cluebar .tag { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 5px; row-gap: 1px; align-items: center;
  padding: 7px 10px; border-radius: 12px; background: var(--dirc, var(--ac-500)); box-shadow: 0 3px 0 var(--dird, var(--ac-700)); }
.iso .cluebar .tag i { grid-row: span 2; font: 800 1.15rem/1 var(--display); font-style: normal; }
.iso .cluebar .tag b { font: 800 1rem/1 var(--display); }
.iso .cluebar .tag small { font: 700 .56rem/1 var(--font); letter-spacing: .08em; }
body.iso.dir-down .cluebar { --dirc: var(--dn-500); --dird: var(--dn-700); }
body.iso.dir-down .cluebar .tag, body.iso.dir-down .cluebar .tag * { color: var(--ink) !important; }
.iso .cb-main { display: grid; gap: 6px; min-width: 0; }
.iso .cluebar .clue-text { font: 600 clamp(1rem, .92rem + .45vw, 1.22rem)/1.3 var(--font); color: var(--ink); letter-spacing: -.005em; }
.iso .cluebar .clue-text .new-tag { vertical-align: 2px; }
.iso .cb-slots { display: flex; flex-wrap: wrap; gap: 3px; }
.iso .cb-slots i { width: 20px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: #f1f5fd; box-shadow: inset 0 -2px 0 #d3def2;
  font: 700 .74rem var(--display); font-style: normal; color: var(--ink); }
.iso .cb-slots i.on { background: #fff; box-shadow: inset 0 -3px 0 var(--dirc, var(--ac-500)), 0 0 0 1.5px var(--dirc, var(--ac-500)); }
.iso .cluebar .extra { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; font: 500 .92rem var(--font); color: var(--ok-700); }
.iso .cluebar .extra b { font: 800 .95rem var(--display); color: var(--ok-700); }
.iso .cluebar .extra .i { width: 18px; height: 18px; color: var(--ok-500); }
.iso .cluebar.solved { background: #e9f9f0; box-shadow: inset 0 0 0 2px #bfeed5, var(--card-sh); }
.iso .cb-nav { display: flex; align-items: center; gap: 4px; }
.iso .cluebar .bar-nav { width: 44px; height: 44px; border-radius: 12px; }
.iso .bar-count, .iso .cluebar .len { color: var(--ink-3); font-weight: 600; }
@media (max-width: 480px) { .iso .cb-nav .bar-count { display: none; } .iso .cluebar .bar-nav { width: 40px; height: 40px; } .iso .cluebar { gap: 8px; padding: 8px 10px; } }

/* Clue list: number colour by direction, finished clues get a tick instead of a strike-through */
.iso #la li b { color: var(--ac-700); }
.iso #ld li b { color: var(--dn-700); }
.iso .clues li.done > span { text-decoration: none; color: var(--ink-3); }

/* ---------- Keyboard: 50px keys, Inter letters, key bubble, the direction key stands out ---------- */
@media (pointer: coarse) and (max-width: 860px) { :root { --osk-h: 184px; } }
.iso .osk button { position: relative; height: 50px; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: 0 2px 0 #cdd9ee; font: 600 1.15rem var(--font); transition: transform var(--dur-1) var(--ease-out); }
.iso .osk button.down { transform: translateY(2px); box-shadow: 0 0 0 #cdd9ee; background: #fff; color: var(--ink); }
.iso .osk button.down:not(.wide)::after { content: attr(data-k); position: absolute; left: 50%; bottom: calc(100% + 6px); width: 46px; height: 54px; margin-left: -23px;
  display: grid; place-items: center; border-radius: 12px; background: #fff; color: var(--ink); font: 700 1.55rem var(--display); box-shadow: 0 10px 24px -8px rgba(11, 42, 91, .45); pointer-events: none; z-index: 2; }
.iso .osk button[data-k="dir"] { background: var(--ac-500); color: #fff; box-shadow: 0 2px 0 var(--ac-700); font: 800 1.3rem var(--display); }
.iso .osk button[data-k="dir"][data-dir="down"] { background: var(--dn-500); color: var(--ink); box-shadow: 0 2px 0 var(--dn-700); }
.iso .osk .dir-ar { display: inline-block; transition: transform var(--dur-2) var(--ease-out); }
.iso .osk button[data-k="dir"][data-dir="down"] .dir-ar { transform: rotate(90deg); }
.iso .osk button[data-k="back"] { background: #e3ecfb; }

/* Answer buttons: readable text on green/red */
.iso .ob-opts .btn.right { background: var(--ok-500); color: var(--ink); border-color: transparent; }
.iso .ob-opts .btn.wrong { background: var(--bad-700); color: #fff; border-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .iso .c.let.word.wave, .iso .c.let.ok, .iso .c.let.cur { animation: none; }
  .iso .grid { transition: none; }
}

/* Camera per screen size: full isometric down to small tablets; phones get a gentler angle
   */
/* Camera steps chosen by fitGrid(): full isometric while tiles stay big enough, then gentler angles
   so a small screen never gets tiny, hard-to-read tiles. */
.iso .grid.cam-1 { --rx: 36deg; --rz: -18deg; }
.iso .grid.cam-2 { --rx: 26deg; --rz: -6deg; }
.iso .grid.cam-3 { --rx: 16deg; --rz: 0deg; }

/* =====================================================================
   Touch screens
   ===================================================================== */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button, a, .c, .osk, .cluebar, .node { touch-action: manipulation; } /* no double-tap zoom delay */
.board, .osk, .grid { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Hidden input that receives the phone keyboard (Settings → "Telefonun kendi klavyesini kullan") */
#kbIn { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; font-size: 16px; pointer-events: none; caret-color: transparent; }
body.native-kb .osk { display: none !important; }
body.native-kb { --osk-h: 0px; }
@media (pointer: coarse) {
  body.iso[data-view="play"] { overscroll-behavior-y: contain; }           /* no pull-to-refresh mid-puzzle */
  .iso .tools .btn, .iso .toolbar select, .iso .seg button, .iso .iconbtn, .iso .chip-btn { min-height: 44px; }
  .iso .toolbar .seg button { min-height: 38px; }
  .iso .btn { min-height: 44px; }
  .iso input, .iso select, .iso textarea { font-size: 16px; }              /* iOS: no auto-zoom on focus */
  .iso .clues li { padding: 12px 12px; }
  .iso .c.let:active { --lift: 16px; }                                     /* touch feedback instead of hover */
}
@media (hover: none) { .iso .c.let:hover { --lift: 10px; } }
.set-row small { display: block; font-size: .76rem; font-weight: 500; }

/* ---------- Admin dashboard ---------- */
.iso #adminView { display: grid; gap: 16px; }
.iso .adm-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.iso .adm-kpi { grid-template-columns: repeat(4, 1fr); }
.iso .adm-chart h3 small, .iso #adminView h3 small { margin-left: auto; font-weight: 500; }
.iso #adminView h3 { display: flex; align-items: center; gap: 8px; }
.iso .adm-bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; margin-top: 12px; }
.iso .adm-bars i { position: relative; flex: 1; height: max(2px, var(--h)); border-radius: 4px 4px 1px 1px; background: var(--ac-500); opacity: .85; }
.iso .adm-bars i:hover { opacity: 1; }
.iso .adm-bars i b { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); font: 700 .6rem var(--display); color: var(--ink-2); white-space: nowrap; display: none; }
.iso .adm-bars i:hover b, .iso .adm-bars i:last-child b { display: block; }
.iso .adm-ret { grid-template-columns: repeat(3, 1fr); }
.iso .adm-ret small { color: var(--ink-3); font-size: .72rem; }
.iso .adm-hours { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: 12px; }
.iso .adm-hours i { flex: 1; height: max(2px, var(--h)); border-radius: 3px; background: var(--dn-500); }
.iso .adm-levels { display: grid; gap: 6px; margin-top: 10px; max-height: 320px; overflow: auto; }
.iso .adm-levels div { display: grid; grid-template-columns: 54px 1fr 36px; gap: 8px; align-items: center; font-size: .82rem; }
.iso .adm-levels i { height: 10px; width: max(3px, var(--w)); border-radius: 99px; background: var(--ok-500); }
.iso .adm-levels b { font: 700 .8rem var(--display); text-align: right; }
.iso .adm-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .86rem; }
.iso .adm-table th { text-align: left; font: 600 .7rem var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 6px 4px; border-bottom: 1px solid #e6edf9; }
.iso .adm-table td { padding: 8px 4px; border-bottom: 1px solid #f0f4fb; }
.iso .adm-note { font-size: .8rem; margin: 8px 0 0; }
@media (max-width: 1100px) { .iso .adm-kpi { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .iso .adm-table th:nth-child(4), .iso .adm-table td:nth-child(4) { display: none; } }

/* ---------- Win card: share box, tomorrow card, "next" chain ---------- */
.iso .win-share { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px; border-radius: 16px; background: #f4f8ff; }
.iso .win-share pre { flex: 1; margin: 0; white-space: pre-wrap; font: 500 .82rem/1.35 var(--font); color: var(--ink-2); max-height: 150px; overflow: auto; }
.iso .win-tomorrow { margin: 12px 0 0; padding: 12px 14px; border-radius: 16px; border: 1.5px dashed #cfdcf3; display: grid; gap: 8px; text-align: left; }
.iso .tw-lead { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--ink-2); }
.iso .tw-lead .i { width: 18px; height: 18px; color: var(--ac-500); flex: none; }
.iso .tw-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.iso .tw-row > span { font: 700 .95rem var(--display); color: var(--ink); }
.iso .tw-row small { color: var(--ink-3); text-align: right; }
.iso .tw-sil { color: var(--ink) !important; filter: blur(.4px); opacity: .85; }
.iso .win-actions .btn.big { min-height: 52px; font-size: 1.02rem; padding: 0 22px; }
.iso .win-actions .chain { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .22); font: 800 .8rem var(--display); font-style: normal; }
.iso .win-actions .chain .i { width: 14px; height: 14px; }
.iso .win-share { flex-direction: column; align-items: stretch; text-align: left; }
.iso .win-share pre { white-space: pre; overflow-x: auto; font-size: .9rem; line-height: 1.4; }
.iso .win-share .btn { align-self: center; }
.iso .tw-row { flex-wrap: wrap; }
.iso .tw-row small { flex: 1 1 160px; }

/* ---------- Example sentences ---------- */
.iso .ex-sent { display: grid; gap: 2px; margin-top: 6px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .75); box-shadow: inset 3px 0 0 var(--ok-500); text-align: left; }
.iso .ex-sent i { font: 500 .95rem/1.35 var(--font); font-style: normal; color: var(--ink); }
.iso .ex-sent i b { color: var(--ok-700); }
.iso .ex-sent small { color: var(--ink-3); font-size: .82rem; }
.iso .cluebar .ex-sent { margin-top: 2px; }
.iso .rv-cloze { font: 700 1.25rem/1.4 var(--font); color: var(--ink); text-align: center; margin: 8px 0 2px; }
.iso .rv-cloze u { text-decoration: none; padding: 0 6px; border-bottom: 3px solid var(--ac-500); color: var(--ac-700); }
.iso .rv-sub { text-align: center; margin: 0 0 6px; }
.iso .rv-listen { margin: 10px auto 4px; display: flex; }
.iso .rv-fb .ex-sent, .iso .warm .ex-sent { margin: 10px auto 0; max-width: 520px; }

/* ---------- Account + legal links ---------- */
.iso .set-links { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 14px 0 2px; font-size: .86rem; }
.iso .set-links a { color: var(--ac-700); text-decoration: underline; text-underline-offset: 3px; }
.iso .set-row.acct { flex-wrap: wrap; gap: 10px; }
.iso .btn.danger { color: var(--bad-700); border-color: #f3c3c9; }
.iso .btn.danger-fill { background: var(--bad-700); color: #fff; border-color: transparent; }
.iso .del-form { display: grid; gap: 10px; margin-top: 12px; }
.iso .del-form input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #d3def2; font: 500 1rem var(--font); }
.iso .accept { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--ink-2); grid-column: 1 / -1; }
.iso .accept input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--ac-500); }
.iso .accept a { color: var(--ac-700); }
.iso .lb-more { margin-left: 6px; font-size: 1.1rem; line-height: 1; }
.iso .adm-acts { display: flex; gap: 4px; flex-wrap: wrap; }
