/* ---------------------------------------------------------------- tokens */
:root {
  --ink:        #1c2233;
  --ink-2:      #4b5468;
  --ink-3:      #8791a5;
  --line:       #e4e8f0;
  --bg:         #f4f6fa;
  --surface:    #ffffff;
  --surface-2:  #edf0f7;
  --primary:    #2563eb;
  --primary-2:  #1d4fd7;
  --primary-sf: #e8efff;
  --accent:     #f59e0b;
  --ok:         #16a34a;
  --ok-sf:      #e6f6ec;
  --danger:     #dc2626;
  --danger-sf:  #fdecec;
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(28,34,51,.05), 0 8px 24px -14px rgba(28,34,51,.14);
  --shadow-lg:  0 2px 6px rgba(28,34,51,.06), 0 22px 44px -20px rgba(28,34,51,.22);
  --font:       Arial, 'Helvetica Neue', Helvetica, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.35; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------------------------------------------------------------- login */
.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  background:
    radial-gradient(1000px 480px at 85% -10%, var(--primary-sf), transparent 65%),
    var(--bg);
}
.gate-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 34px 28px 30px;
  text-align: center;
}
.brand-mark {
  width: 58px; height: 58px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 18px;
  background: linear-gradient(140deg, var(--primary), var(--primary-2));
  color: #fff; font-size: 24px; font-weight: 700;
  box-shadow: 0 10px 22px -10px var(--primary);
}
.gate-card h1 { font-size: 22px; margin-bottom: 6px; }
.gate-card .sub { color: var(--ink-2); font-size: 14px; margin: 0 0 24px; }
.field { text-align: right; margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.code-input {
  width: 100%; padding: 15px 16px;
  font-family: var(--font);
  font-size: 24px; font-weight: 700; letter-spacing: .35em; text-align: center;
  text-transform: uppercase; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, background .15s;
}
.code-input::placeholder { letter-spacing: .25em; color: var(--ink-3); font-weight: 400; font-size: 18px; }
.code-input:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.btn {
  width: 100%; padding: 14px 18px; border: 0; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-weight: 700; font-size: 15.5px;
  transition: background .15s, transform .08s;
}
.btn:hover:not(:disabled) { background: var(--primary-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); width: auto; padding: 9px 15px; font-size: 14px; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.msg { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px; text-align: right; }
.msg-error { background: var(--danger-sf); color: var(--danger); }
.gate-help { margin: 20px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.9; }

/* ---------------------------------------------------------------- shell */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: linear-gradient(140deg, var(--primary), var(--primary-2)); color: #fff;
}
.topbar .who { flex: 1; min-width: 0; }
.topbar .who strong { display: block; font-size: 14.5px; }
.topbar .who span { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 20px 18px 110px; }

.tabs {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  border: 0; background: none; color: var(--ink-3);
  padding: 9px 4px 11px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 700;
  border-top: 2.5px solid transparent; margin-top: -1px;
  transition: color .15s;
}
.tabs button svg { width: 21px; height: 21px; }
.tabs button[aria-selected='true'] { color: var(--primary); border-top-color: var(--primary); }

/* ---------------------------------------------------------------- content */
.page-head { margin-bottom: 18px; }
.page-head h2 { font-size: 21px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }

/* posts */
.post {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.post.pinned { border-color: var(--accent); background: linear-gradient(180deg, #fffdf5, var(--surface)); }
.post-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.post-meta .author { font-weight: 700; color: var(--primary); }
.post-meta .pin { color: var(--accent); font-weight: 700; }
.post h3 { font-size: 15.5px; margin-bottom: 4px; }
.post p { margin: 0; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; }

.progress-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 22px; box-shadow: var(--shadow);
}
.progress-card .row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.progress-card .row strong { font-size: 14px; }
.progress-card .row span { font-size: 12.5px; color: var(--ink-3); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s ease; }

.module { margin-bottom: 26px; }
.module-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding-inline-start: 2px; }
.module-head h3 { font-size: 16.5px; }
.module-head em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.module-head p { margin: 0; width: 100%; font-size: 12.5px; color: var(--ink-3); }

.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; transition: border-color .15s, transform .08s, box-shadow .15s;
}
.item:hover:not(:disabled) { border-color: var(--primary); box-shadow: var(--shadow); }
.item:active:not(:disabled) { transform: scale(.995); }
.item:disabled { opacity: .6; cursor: not-allowed; }
.item .num {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 13px; font-weight: 700;
}
.item.done .num { background: var(--ok-sf); color: var(--ok); }
.item .body { flex: 1; min-width: 0; }
.item .body strong { display: block; font-size: 14.5px; }
.item .body span { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .tail { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink-3); }
.pill.done { background: var(--ok-sf); color: var(--ok); }
.item .mini-bar { width: 42px; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.item .mini-bar > i { display: block; height: 100%; background: var(--primary); }
.chev { width: 17px; height: 17px; color: var(--ink-3); transform: scaleX(-1); }

.empty { text-align: center; padding: 52px 24px; color: var(--ink-3); }
.empty svg { width: 40px; height: 40px; opacity: .45; margin-bottom: 12px; }
.empty p { margin: 0; font-size: 13.5px; line-height: 1.9; }

/* ---------------------------------------------------------------- player */
.player-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.player-head h2 { font-size: 18px; flex: 1; min-width: 0; }
.game-sub { font-size: 12.5px; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.back { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
        width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.back:hover { background: var(--surface-2); color: var(--ink); }
.back svg { width: 17px; height: 17px; transform: scaleX(-1); }

.frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); margin-bottom: 16px;
}
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-meta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.player-meta .en { font-size: 13px; color: var(--ink-3); margin: 0 0 12px; }
.player-meta .notes { font-size: 13.5px; color: var(--ink-2); margin: 0 0 14px; white-space: pre-wrap; }
.player-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.player-actions .btn { width: auto; flex: 1; min-width: 150px; }
.btn-done { background: var(--ok-sf); color: var(--ok); }
.btn-done:hover:not(:disabled) { background: var(--ok-sf); }

/* ---------------------------------------------------------------- games */
.games-grid { display: grid; gap: 12px; }
.game-card {
  border: 1px solid var(--line); border-radius: 18px; padding: 20px 18px;
  text-align: start; display: grid; gap: 3px; background: var(--surface);
  box-shadow: var(--shadow); transition: transform .1s, box-shadow .15s;
}
.game-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.game-card .gi { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.game-card strong { font-size: 16.5px; }
.game-card span:not(.gi) { font-size: 13px; color: var(--ink-2); }
.game-card em { font-style: normal; font-size: 12px; font-weight: 700; margin-top: 6px; }
.game-card.g1 { background: linear-gradient(135deg, #eef4ff, #fff); }
.game-card.g1 em { color: var(--primary); }
.game-card.g2 { background: linear-gradient(135deg, #fff7e8, #fff); }
.game-card.g2 em { color: var(--accent); }
.game-card.g3 { background: linear-gradient(135deg, #eafaf0, #fff); }
.game-card.g3 em { color: var(--ok); }
.game-card.g4 { background: linear-gradient(135deg, #f0ecff, #fff); }
.game-card.g4 em { color: #6d4aff; }
.game-card.g5 { background: linear-gradient(135deg, #ffeef0, #fff); }
.game-card.g5 em { color: var(--danger); }
.game-card.g6 { background: linear-gradient(135deg, #e9f7fb, #fff); }
.game-card.g6 em { color: #0d8ba1; }

.game-board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
              padding: 22px 18px; box-shadow: var(--shadow); text-align: center; }
.quiz-ask { margin: 0 0 8px; font-size: 13px; color: var(--ink-3); }
.quiz-word { font-size: 30px; font-weight: 700; margin-bottom: 20px; }
.options { display: grid; gap: 9px; }
.opt {
  padding: 13px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--surface-2); font-size: 16px; font-weight: 700; color: var(--ink);
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--primary); }
.opt.correct { background: var(--ok-sf); border-color: var(--ok); color: var(--ok); }
.opt.wrong { background: var(--danger-sf); border-color: var(--danger); color: var(--danger); }

.slots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.slot {
  width: 38px; height: 44px; border-radius: 9px; border: 1.5px dashed var(--line);
  background: var(--surface-2); display: grid; place-items: center;
  font-size: 19px; font-weight: 700; text-transform: uppercase;
}
.slot.filled { border-style: solid; border-color: var(--primary); background: var(--primary-sf); color: var(--primary); }
.slots.win .slot { border-color: var(--ok); background: var(--ok-sf); color: var(--ok); }
.slots.lose .slot { border-color: var(--danger); background: var(--danger-sf); color: var(--danger); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.tiles { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.tile {
  width: 42px; height: 46px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-size: 19px; font-weight: 700; text-transform: uppercase;
  box-shadow: var(--shadow); color: var(--ink);
}
.tile:disabled { opacity: .25; box-shadow: none; }

.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mem-card {
  min-height: 62px; border-radius: 11px; border: 1px solid var(--line);
  background: linear-gradient(140deg, var(--primary), var(--primary-2));
  color: transparent; font-size: 14px; font-weight: 700; padding: 4px;
  transition: background .15s;
}
.mem-card.open { background: var(--surface); color: var(--ink); }
.mem-card.matched { background: var(--ok-sf); color: var(--ok); border-color: var(--ok); }
.game-end { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
            padding: 34px 20px; box-shadow: var(--shadow); text-align: center; }
.game-end .gi { font-size: 46px; margin-bottom: 10px; }
.game-end h3 { font-size: 19px; margin-bottom: 4px; }
.game-end p { color: var(--ink-3); font-size: 13.5px; margin: 0 0 20px; }
.game-end .player-actions { justify-content: center; }

.toast { position: fixed; inset-inline: 0; bottom: 86px; z-index: 60; display: flex; justify-content: center; pointer-events: none; }
.toast > div { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px;
               font-size: 13px; font-weight: 700; box-shadow: var(--shadow-lg); }

@media (min-width: 700px) {
  body { font-size: 15.5px; }
  .main { padding: 28px 24px 60px; }
  .tabs {
    position: sticky; top: 57px; bottom: auto; inset-inline: auto;
    max-width: 860px; margin: 0 auto 22px; width: 100%;
    grid-template-columns: repeat(4, max-content);
    gap: 4px; border: 1px solid var(--line); border-radius: 99px; padding: 4px;
    background: var(--surface);
  }
  .tabs button { flex-direction: row; gap: 7px; padding: 8px 18px; border-top: 0; border-radius: 99px; font-size: 13.5px; margin: 0; }
  .tabs button[aria-selected='true'] { background: var(--primary-sf); }
  .games-grid { grid-template-columns: repeat(3, 1fr); }
  .options { grid-template-columns: 1fr 1fr; }
  .mem-grid { grid-template-columns: repeat(4, 1fr); }
  .toast { bottom: 32px; }
}

/* ---------------------------------------------------------------- post images */
.post-images { display: grid; gap: 5px; margin-top: 11px; }
.post-images.n1 { grid-template-columns: 1fr; }
.post-images.n2 { grid-template-columns: 1fr 1fr; }
.post-images.n3, .post-images.n4 { grid-template-columns: 1fr 1fr; }
.post-images img {
  width: 100%; height: 100%; max-height: 260px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; display: block;
  background: var(--surface-2);
}
.post-images.n1 img { max-height: 340px; }
.post-images.n3 img:first-child { grid-column: span 2; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(16,20,32,.9); padding: 20px; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 92dvh; border-radius: 10px; }
.lightbox button {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 14px;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.15); color: #fff; font-size: 22px; line-height: 1;
}

/* ---------------------------------------------------------------- tour */
.tour {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(16,20,32,.6);
  backdrop-filter: blur(2px);
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } }

/* Lift the real tab bar above the dim so the highlighted tab is legible. */
.tabs.tour-lift { z-index: 95; }
.tabs.tour-lift button.tour-on {
  color: var(--primary);
  background: var(--primary-sf);
  box-shadow: 0 0 0 3px var(--primary);
  border-radius: 12px;
}

.tour-card {
  position: fixed; z-index: 96;
  inset-inline: 16px; margin: 0 auto; width: auto; max-width: 400px;
  max-height: 76dvh; overflow-y: auto;
  background: var(--surface); border-radius: 20px; padding: 22px 22px 18px;
  box-shadow: var(--shadow-lg); text-align: center;
  animation: rise .22s cubic-bezier(.2,.8,.3,1);
}
.tour-card.centered { top: 50%; transform: translateY(-50%); padding: 30px 26px 24px; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.tour-card.centered { animation: none; }

.tour-mark {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 20px;
  display: grid; place-items: center; font-size: 29px;
  background: linear-gradient(140deg, var(--primary-sf), #fff3dc);
}
.tour-card h2 { font-size: 19px; margin-bottom: 8px; }
.tour-card.centered h2 { font-size: 21px; margin-bottom: 12px; }
.tour-card p {
  margin: 0 0 16px; font-size: 14px; line-height: 1.95; color: var(--ink-2);
  white-space: pre-wrap; text-align: start;
}
.tour-card.centered p { margin-bottom: 20px; line-height: 2; }

.tour-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line); transition: all .2s; }
.tour-dots i.on { width: 18px; background: var(--primary); }

.tour-actions { display: flex; gap: 8px; }
.tour-actions .btn { flex: 1; }
.tour-actions .btn-ghost { flex: 0 0 auto; }
.tour-skip {
  display: block; margin: 12px auto 0; border: 0; background: none;
  color: var(--ink-3); font-size: 12.5px; text-decoration: underline;
}

/* ---------------------------------------------------------------- comments */
.comments-toggle {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 6px 0 0; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--ink-3); font-size: 12.5px; font-weight: 700; width: 100%;
}
.comments-toggle svg { width: 15px; height: 15px; }
.comments-toggle:hover { color: var(--primary); }

.comments { margin-top: 10px; }
.c-loading, .c-empty { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-3); }
.c-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.c-item { background: var(--surface-2); border-radius: 12px; padding: 9px 12px; }
.c-item.staff { background: var(--primary-sf); }
.c-item p { margin: 0; font-size: 13.5px; color: var(--ink); white-space: pre-wrap; }
.c-head { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.c-author { font-size: 12.5px; font-weight: 700; }
.c-badge { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--primary); color: #fff; }
.c-date { font-size: 11px; color: var(--ink-3); }
.c-del { margin-inline-start: auto; border: 0; background: none; color: var(--ink-3); font-size: 11px; text-decoration: underline; }
.c-del:hover { color: var(--danger); }

.c-form { display: grid; gap: 7px; }
.c-name, .c-input {
  width: 100%; padding: 9px 11px; font: inherit; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 10px;
}
.c-input { resize: vertical; min-height: 44px; }
.c-name:focus, .c-input:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.c-send { width: auto; justify-self: start; padding: 9px 22px; font-size: 14px; }

/* ---------------------------------------------------------------- sentence builder */
.sentence-ar { font-size: 19px; font-weight: 700; margin-bottom: 18px; line-height: 1.6; }
.sentence-line {
  min-height: 56px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  align-items: center; padding: 10px; margin-bottom: 16px;
  border: 1.5px dashed var(--line); border-radius: 12px; background: var(--surface-2);
}
.sentence-line.win { border-style: solid; border-color: var(--ok); background: var(--ok-sf); }
.sentence-line.lose { border-color: var(--danger); background: var(--danger-sf); animation: shake .35s; }
.line-hint { font-size: 12.5px; color: var(--ink-3); }
.word-bank { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 18px; }
.word {
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 700;
  box-shadow: var(--shadow);
}
.word:disabled { opacity: .25; box-shadow: none; }
.word.placed { background: var(--primary-sf); border-color: var(--primary); color: var(--primary); box-shadow: none; }

/* ---------------------------------------------------------------- true / false */
.tf-timer { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 18px; }
.tf-timer > i { display: block; height: 100%; background: var(--primary); transition: width .1s linear; }
.tf-pair { display: grid; gap: 6px; margin-bottom: 22px; }
.tf-en { font-size: 26px; font-weight: 700; }
.tf-eq { font-size: 15px; color: var(--ink-3); }
.tf-ar { font-size: 22px; font-weight: 700; }
.tf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tf-btn {
  padding: 16px 10px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface-2); font-size: 16px; font-weight: 700; color: var(--ink);
}
.tf-btn.yes:hover { border-color: var(--ok); }
.tf-btn.no:hover { border-color: var(--danger); }
.tf-btn.right { background: var(--ok-sf); border-color: var(--ok); color: var(--ok); }
.tf-btn.wrong { background: var(--danger-sf); border-color: var(--danger); color: var(--danger); }
.tf-btn.picked { box-shadow: 0 0 0 3px currentColor inset; }

/* ---------------------------------------------------------------- spelling */
.spell-hint { font-size: 12.5px; color: var(--ink-3); margin: 0 0 12px; }
.spell-input {
  width: 100%; padding: 14px; margin-bottom: 16px;
  font-family: var(--font); font-size: 22px; font-weight: 700;
  text-align: center; letter-spacing: .06em; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 12px;
}
.spell-input:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.spell-input.win { border-color: var(--ok); background: var(--ok-sf); color: var(--ok); }
.spell-input.lose { border-color: var(--danger); background: var(--danger-sf); color: var(--danger); animation: shake .35s; }
.spell-input::placeholder { font-weight: 400; letter-spacing: normal; color: var(--ink-3); font-size: 16px; }

/* ---------------------------------------------------------------- profile */
.profile-card { text-align: center; }
.profile-card .field { margin-bottom: 12px; }
.profile-card .field input {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
}
.profile-card .field input:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.profile-card .field input::placeholder { color: var(--ink-3); }
.profile-card #pfPhone { letter-spacing: .06em; }
.profile-card .btn { margin-top: 6px; }
.profile-card p { text-align: center; }
