/* ============================================================
   g3.css — the five newest games (js/games3.js):
   مين فينا؟ · اسم حيوان جماد بلاد · الكلمة الممنوعة · كلمة السر · أقرب تخمين
   Same ground as g2.css; everything here is sized to be read across
   a room, because that is the only screen these games have.
   ============================================================ */

/* ---- مين فينا؟ : the vote bars ---- */
.g3-bars{display:flex;flex-direction:column;gap:8px;margin:18px auto 0;max-width:620px;}
.g3-bar{
  position:relative;display:flex;align-items:center;gap:10px;
  padding:10px 14px;border-radius:14px;background:var(--bg-2);
  border:1px solid var(--line);overflow:hidden;
}
.g3-bar-fill{
  position:absolute;inset-inline-start:0;top:0;bottom:0;width:var(--w);
  background:linear-gradient(90deg,rgba(217,164,65,.30),rgba(217,164,65,.10));
  transition:width .35s ease;
}
.g3-bar-name,.g3-bar-n{position:relative;z-index:1;font-weight:900;}
.g3-bar-name{flex:1;text-align:start;font-size:16px;}
.g3-bar-n{font-size:19px;color:var(--warn);}
.g3-bar.win{border-color:var(--warn);box-shadow:0 0 0 2px rgba(217,164,65,.22);}
.g3-bar.win .g3-bar-name{color:#FFD98A;}

/* ---- اسم حيوان جماد بلاد ---- */
.g3-letter{
  font-size:clamp(64px,10vw,120px);font-weight:900;line-height:1;color:var(--warn);
  text-shadow:0 6px 30px rgba(217,164,65,.35);
}
.g3-letter.sm{font-size:clamp(34px,5vw,54px);}
.g3-fields{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:12px;}
.g3-fields span{
  font-size:13.5px;font-weight:900;padding:6px 14px;border-radius:999px;
  background:var(--surface-2);border:1px solid var(--line);color:var(--ink-soft);
}
.g3-table-wrap{overflow-x:auto;margin-top:16px;}
.g3-table{width:100%;border-collapse:separate;border-spacing:5px;min-width:620px;}
.g3-table th{
  font-size:12.5px;font-weight:900;color:var(--ink-dim);padding:4px 6px;text-align:center;
}
.g3-table td{text-align:center;}
.g3-who{
  font-size:14px;font-weight:900;padding:8px 12px;border-radius:10px;
  background:var(--surface-2);border:1px solid var(--line);white-space:nowrap;
}
.g3-cell{
  cursor:pointer;padding:8px 10px;border-radius:10px;border:1px solid var(--line);
  background:var(--bg-2);min-width:98px;transition:.14s;
}
.g3-cell b{display:block;font-size:14px;font-weight:800;}
.g3-cell i{display:block;font-style:normal;font-size:11px;font-weight:900;margin-top:3px;opacity:.85;}
.g3-cell.uniq{border-color:#2F8F55;color:#9FE7B8;}
.g3-cell.dup{border-color:#8A6412;color:#F0C463;}
.g3-cell.zero{color:var(--ink-dim);}
.g3-cell.dead{opacity:.45;border-style:dashed;}
.g3-cell.dead b{text-decoration:line-through;}
.g3-cell:hover{transform:translateY(-2px);}
.g3-total{
  font-size:19px;font-weight:900;color:var(--warn);
  padding:8px 12px;border-radius:10px;background:var(--surface-2);border:1px solid var(--line);
}

/* ---- teams (الكلمة الممنوعة · كلمة السر) ---- */
.g3-team-box{display:flex;flex-direction:column;gap:12px;}
.g3-team{padding:12px 14px;border-radius:14px;background:var(--bg-2);border:1px solid var(--line);}
.g3-team b{display:block;font-size:14px;font-weight:900;margin-bottom:8px;}
.g3-team.a{border-color:#2F8F55;} .g3-team.a b{color:#7BE3A2;}
.g3-team.b{border-color:#8A5A2B;} .g3-team.b b{color:#FFB05C;}

.g3-score2{
  display:flex;gap:12px;justify-content:center;margin:0 auto 14px;flex-wrap:wrap;
}
.g3-score2 span{
  font-size:15px;font-weight:900;padding:9px 20px;border-radius:999px;
  background:var(--surface);border:1.5px solid var(--line);color:var(--ink-soft);
}
.g3-score2 span b{font-size:20px;margin-inline-start:6px;}
.g3-score2 .a{color:#7BE3A2;} .g3-score2 .b{color:#FFB05C;}
.g3-score2 .a.now{border-color:#2F8F55;background:rgba(63,191,106,.12);}
.g3-score2 .b.now{border-color:#8A5A2B;background:rgba(232,128,42,.12);}

.g3-tally{display:flex;gap:10px;justify-content:center;margin-top:12px;flex-wrap:wrap;}
.g3-tally span{
  font-size:15px;font-weight:900;padding:7px 16px;border-radius:999px;
  background:var(--surface-2);border:1px solid var(--line);
}
.g3-tally .ok{color:#9FE7B8;border-color:#2F8F55;}
.g3-tally .skip{color:var(--ink-dim);}
.g3-tally .foul{color:#FF9A8F;border-color:#8E3226;}

/* ---- كلمة السر : the board ---- */
.g3-grid{
  display:grid;grid-template-columns:repeat(5,1fr);gap:8px;
  margin:18px auto 0;max-width:900px;
}
.g3-word{
  display:grid;place-items:center;text-align:center;
  min-height:clamp(52px,7vw,78px);padding:6px;border-radius:12px;
  background:var(--surface-2);border:1.5px solid var(--line);
  font-size:clamp(13px,1.7vw,19px);font-weight:900;line-height:1.4;word-break:break-word;
}
.g3-word.shown{opacity:.92;}
.g3-word.c-a{background:rgba(63,191,106,.22);border-color:#2F8F55;color:#BFF3D2;}
.g3-word.c-b{background:rgba(232,128,42,.22);border-color:#8A5A2B;color:#FFD2A8;}
.g3-word.c-n{background:#241F16;border-color:#4A4232;color:var(--ink-dim);}
.g3-word.c-x{background:#05060A;border-color:#6A6A6A;color:#fff;}
.g3-clue{
  margin-top:10px;font-size:clamp(17px,2.4vw,24px);font-weight:900;color:var(--ink);
  background:var(--bg-2);border:1px dashed var(--warn);border-radius:14px;
  padding:10px 18px;display:inline-block;
}
.g3-clue b{color:#FFD98A;} .g3-clue i{font-style:normal;color:var(--warn);}
.g3-note{margin-top:8px;font-size:14px;font-weight:800;color:var(--ink-soft);}

/* ---- أقرب تخمين : the number line ---- */
.g3-answer{
  font-size:clamp(34px,6vw,64px);font-weight:900;color:var(--warn);margin:10px 0 4px;line-height:1.2;
}
.g3-answer small{font-size:.38em;color:var(--ink-soft);margin-inline-start:8px;}
.g3-line{
  position:relative;height:96px;margin:22px auto 6px;max-width:860px;
  border-bottom:2px solid var(--line);
}
.g3-dot,.g3-true{position:absolute;bottom:0;inset-inline-start:var(--p);transform:translateX(50%);text-align:center;}
.g3-dot i,.g3-true i{
  display:block;width:12px;height:12px;border-radius:50%;margin:0 auto 4px;
  background:var(--ink-dim);
}
.g3-dot span,.g3-true span{
  display:block;font-size:11.5px;font-weight:800;color:var(--ink-soft);
  white-space:nowrap;transform:translateY(2px);
}
.g3-dot.best i{background:var(--ok);width:15px;height:15px;}
.g3-dot.best span{color:#9FE7B8;}
.g3-true i{background:var(--warn);width:16px;height:16px;box-shadow:0 0 0 5px rgba(217,164,65,.22);}
.g3-true span{color:#FFD98A;font-weight:900;}
.g3-true{bottom:46px;}
.g3-guesses{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:14px;}
.g3-guesses i{font-style:normal;color:var(--ink-dim);font-size:11.5px;}

@media (max-width:760px){
  .g3-grid{gap:5px;}
  .g3-word{min-height:48px;font-size:12px;}
  .g3-line{height:120px;}
}

/* the words nobody reached, shown once the board is over */
.g3-word.late{opacity:.5;border-style:dashed;}
/* Word-board refresh, scoped to this game. */
.g3-sir{max-width:1440px!important;width:100%;}
.g3-sir-stage{background:radial-gradient(ellipse at 50% 0,#24345d55,transparent 65%),#101729;border:1px solid #34405d;padding:clamp(14px,2.5vw,32px);box-shadow:0 18px 60px #0004;}
.g3-brief{max-width:900px;margin:auto;}
.g3-eyebrow{display:block;color:#9fadd3;font-size:12px;letter-spacing:1px;margin-bottom:12px;}
.g3-sir .g3-grid{max-width:none;gap:clamp(6px,1vw,14px);}
.g3-sir .g3-word{position:relative;min-height:clamp(82px,10vh,140px);padding:25px 6px 22px;background:linear-gradient(155deg,#263350,#172239);border:1px solid #526180;box-shadow:0 4px 0 #070d1c, inset 0 1px 0 #ffffff12;border-radius:14px;color:#f3f4ff;font-size:clamp(15px,2vw,27px);transition:background .25s,transform .25s;}
.g3-coordinate{position:absolute;top:7px;inset-inline-start:10px;font-size:10px;color:#b0bbd4;}
.g3-cell-status{position:absolute;bottom:5px;font-size:10px;opacity:.9;}
.g3-sir .g3-word.c-a{background:linear-gradient(140deg,#176446,#143e33);border-color:#62d4a1;color:#e5fff3;}
.g3-sir .g3-word.c-b{background:linear-gradient(140deg,#a15119,#59331e);border-color:#ffa868;color:#fff1de;}
.g3-sir .g3-word.c-n{background:#373b48;border-color:#747b8f;color:#e2e6f1;}
.g3-sir .g3-word.c-x{background:repeating-linear-gradient(135deg,#130f18 0 12px,#22131b 12px 24px);border-color:#e58298;color:#ffe3e9;}
.g3-sir .g3-word.late{opacity:.65;}
.g3-sir .g3-clue{border-style:solid;border-color:#998457;background:#242438;min-width:180px;}
.g3-sir .g3-score2 span{border-radius:16px;min-width:160px;padding:12px 24px;}
.g3-legend{font-size:12px!important;color:#b0bbd4!important;line-height:1.9;margin-top:18px;}
.g3-ref-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;max-width:850px;margin:24px auto;}
.g3-ref{padding:20px;border:1px solid #4b5c78;border-radius:20px;background:#111b30;text-align:center;min-width:0;}
.g3-ref.a{border-color:#419c79;}.g3-ref.b{border-color:#c7833d;}
.g3-ref .hn-qr{max-width:180px;margin:16px auto;}.g3-ref p{color:#b8c4dd;}
@media(max-width:600px){.g3-ref-grid{grid-template-columns:1fr;}.g3-sir .g3-grid{gap:5px;}.g3-sir .g3-word{min-height:76px;font-size:13px;border-radius:8px;padding:20px 3px;}.g3-coordinate{top:4px;inset-inline-start:5px;}.g3-sir .g3-score2 span{min-width:0;padding:8px 15px;}.g3-sir-stage{padding:10px;}}
@media(prefers-reduced-motion:reduce){.g3-sir *{transition:none!important;}}
/* Let the shared board use the available screen width. */
.g3-sir-stage{max-width:none;width:100%;margin-block:10px;padding:clamp(12px,1.5vw,24px);}
.g3-sir .g3-word{min-height:clamp(54px,8vh,112px);}
.g3-sir-stage h2{font-size:clamp(20px,2.3vw,30px);margin-block:6px;}
.g3-sir-stage .g3-brief p{margin-top:6px;font-size:15px;}
.g3-sir .g3-legend{margin:10px 0 0;}
.g3-sir .g3-eyebrow{margin-bottom:5px;}
@media(max-width:600px){.g3-sir .g3-word{min-height:76px;}.g3-sir-stage .g3-brief p{font-size:13px;}}
@media(max-width:780px){.g3-topbar{flex-wrap:wrap;}.g3-topbar .brand{position:static;order:-1;flex-basis:100%;text-align:center;max-width:none;}.g3-topbar .side{flex-wrap:wrap;max-width:100%;}}
