/* The Reverse Times — history games */
.gm { max-width: 1100px; margin: 0 auto; padding: 130px 1.25rem 3rem; position: relative; z-index: 1; font-family: var(--ff-bangla-ui); }
.gm-detail { max-width: 900px; }
.gm-crumbs { font-size: .9rem; color: var(--text-muted); margin-bottom: 1rem; }
.gm-crumbs a { color:var(--gold-ink); text-decoration: none; }
.gm-hero { text-align: center; max-width: 760px; margin: 0 auto 2.4rem; }
.gm-hero-sm { margin-bottom: 1.6rem; }
.gm-eyebrow, .gm-tag { font-family: var(--ff-label); letter-spacing: .12em; text-transform: uppercase; color:var(--gold-ink); font-size: .85rem; margin: 0 0 .6rem; }
.gm-h1 { font-family: var(--ff-bangla-heading); font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.15; margin: 0; }
.gm-en { font-family: var(--ff-italic); font-style: italic; font-size: 1.2rem; color: var(--text-muted); margin: .3rem 0 0; }
.gm-lead { font-size: 1.12rem; line-height: 1.75; margin: 1rem auto 0; color: var(--text); opacity: .9; }
.gm-reward-strip { margin: 1.4rem auto 0; padding: .8rem 1rem; border: 1px dashed var(--gold); display: inline-block; font-size: .98rem; }
.gm-reward-strip a, .gm-reward-note a, .gm-link { color:var(--gold-ink); }
.gm-mycoupons { margin-top: .8rem; font-size: .92rem; }
.gm-mycoupons code { background: var(--gold10); padding: .1rem .4rem; letter-spacing: .05em; }

.gm-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.gm-card { position: relative; border: 1px solid var(--gold30); background: var(--dark2); transition: transform .3s, border-color .3s, box-shadow .3s; }
.gm-card:hover, .gm-card:focus-within { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.gm-card-link { position: absolute; inset: 0; z-index: 2; }
.gm-card-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gm-card-art { aspect-ratio: 3 / 2; display: grid; place-items: center; color:var(--gold-ink); background: var(--gold10); border-bottom: 1px solid var(--gold30); }
.gm-card-art svg, .gm-art svg { width: 55%; max-width: 180px; height: auto; }
.gm-card-body { padding: 1.2rem 1.3rem 1.4rem; }
.gm-card-num { font-size: .85rem; color: var(--text-muted); margin: 0 0 .3rem; }
.gm-card-title { font-family: var(--ff-bangla-heading); font-size: 1.7rem; margin: 0; }
.gm-card-en { font-family: var(--ff-italic); font-style: italic; color: var(--text-muted); margin: .1rem 0 .6rem; }
.gm-card-tag { margin: 0 0 .8rem; line-height: 1.6; }
.gm-card-top { font-size: .85rem; color: var(--text-muted); margin: 0 0 .8rem; }
.gm-play { color:var(--gold-ink); font-weight: 600; }
.gm-physical { max-width: 720px; margin: 3rem auto 0; text-align: center; }
.gm-physical h2, .gm-box h2, .gm-more h2 { font-family: var(--ff-bangla-heading); font-size: 1.35rem; margin: 0 0 .7rem; }

/* Play area */
.gm-stage { border: 1px solid var(--gold30); background: var(--dark2); padding: clamp(1.1rem, 4vw, 2rem); min-height: 320px; scroll-margin-top: 90px; }
.gm-intro { text-align: center; max-width: 620px; margin: 0 auto; }
.gm-intro p { line-height: 1.75; }
.gm-art { color:var(--gold-ink); display: block; margin: 0 auto .8rem; }
.gm-meta { font-size: .9rem; color: var(--text-muted); }
.gm-reward-note { font-size: .95rem; background: var(--gold10); padding: .7rem .9rem; }
.gm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.3rem; border: 1px solid var(--gold); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .2s, color .2s, transform .2s; }
.gm-btn-primary { background: var(--gold); color: #fff; }
.gm-btn-primary:hover { background: #c93519; }
.gm-btn-ghost { background: transparent; color: var(--text); margin-top: .8rem; }
.gm-btn-ghost:hover { color:var(--gold-ink); }
.gm-btn:focus-visible, .gm-option:focus-visible, .gm-slot-btn:focus-visible, .gm-tf button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gm-intro .gm-btn { margin-top: .6rem; }
.gm-hud { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; color: var(--text-muted); border-bottom: 1px solid var(--gold30); padding-bottom: .7rem; margin-bottom: 1.1rem; }
.gm-lives { color:var(--gold-ink); letter-spacing: .15em; }
.gm-score { font-weight: 600; color: var(--text); }
.gm-flash { color:var(--gold-ink); margin: 0 0 .6rem; }
.gm-hint { font-size: .92rem; color: var(--text-muted); margin: .8rem 0; }
.gm-event { border: 2px solid var(--gold); background: var(--bg); padding: 1.1rem 1.2rem; }
.gm-event-title { font-family: var(--ff-bangla-heading); font-size: clamp(1.15rem, 3.4vw, 1.45rem); line-height: 1.5; margin: 0; }
.gm-statement { text-align: center; padding: 1.6rem 1.2rem; }

.gm-line { list-style: none; padding: 0 0 0 1.2rem; margin: 0; border-left: 2px solid var(--gold30); }
.gm-placed { position: relative; display: flex; gap: .9rem; align-items: baseline; padding: .55rem .2rem; }
.gm-placed::before { content: ''; position: absolute; left: calc(-1.2rem - 7px); top: 1rem; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
.gm-placed b { flex: 0 0 auto; min-width: 6.5rem; color:var(--gold-ink); font-weight: 700; }
.gm-placed.gm-new { background: var(--gold10); animation: gmIn .5s ease; }
.gm-placed.bad b { color: #b33a1f; text-decoration: underline wavy; }
.gm-slot { padding: .15rem 0; }
.gm-slot-btn { width: 100%; min-height: 40px; border: 1px dashed var(--gold30); background: transparent; color: var(--text-muted); font: inherit; font-size: .9rem; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.gm-slot-btn:hover { border-color: var(--gold); color:var(--gold-ink); background: var(--gold10); }

.gm-clues { padding-left: 1.4rem; margin: 0; }
.gm-clues li { padding: .45rem 0; line-height: 1.6; font-size: 1.05rem; }
.gm-clues li.gm-new { animation: gmIn .5s ease; font-weight: 600; }
.gm-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.gm-option { min-height: 50px; padding: .6rem .9rem; border: 1px solid var(--gold30); background: var(--bg); color: var(--text); font: inherit; font-size: 1.02rem; cursor: pointer; text-align: left; transition: border-color .2s; }
.gm-option:hover:not(:disabled) { border-color: var(--gold); }
.gm-option.ok, .gm-tf .ok { border-color: #2f7d4a; background: rgba(47,125,74,.14); }
.gm-option.bad, .gm-tf .bad { border-color: #b33a1f; background: rgba(179,58,31,.12); }

.gm-timer { height: 6px; background: var(--gold10); margin-top: 1rem; overflow: hidden; }
.gm-timer span { display: block; height: 100%; width: 100%; background: var(--gold); transition: width .1s linear; }
.gm-tf { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.gm-tf button { min-height: 64px; font: inherit; font-size: 1.25rem; font-weight: 700; border: 2px solid var(--gold30); background: var(--bg); color: var(--text); cursor: pointer; }
.gm-tf button:hover:not(:disabled) { border-color: var(--gold); }

.gm-feedback { margin-top: 1.2rem; padding: 1rem 1.1rem; border-left: 4px solid #2f7d4a; background: rgba(47,125,74,.08); animation: gmIn .35s ease; }
.gm-feedback.bad { border-left-color: #b33a1f; background: rgba(179,58,31,.07); }
.gm-feedback strong { font-size: 1.15rem; }
.gm-feedback p { margin: .4rem 0; line-height: 1.7; }
.gm-answer { font-weight: 600; }
.gm-feedback .gm-btn { margin-top: .6rem; }
.gm-feedback .gm-link { display: inline-block; margin: .2rem 1rem .2rem 0; }

.gm-result { text-align: center; max-width: 560px; margin: 0 auto; }
.gm-big { font-family: var(--ff-display); font-size: clamp(2.6rem, 9vw, 4rem); font-weight: 900; margin: .2rem 0; color:var(--gold-ink); }
.gm-reward { margin: 1.2rem 0; padding: 1rem; border: 1px dashed var(--gold30); }
.gm-reward:empty { display: none; }
.gm-reward.won { border-color: var(--gold); background: var(--gold10); }
.gm-code { font-family: ui-monospace, Menlo, monospace; font-size: 1.6rem; letter-spacing: .12em; font-weight: 700; margin: .4rem 0; }
.gm-row { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: .8rem; }
.gm-row .gm-btn-ghost { margin-top: 0; }

.gm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 1.6rem; }
.gm-box { border: 1px solid var(--gold30); padding: 1.2rem 1.3rem; }
.gm-physical-box { margin-top: 1.2rem; background: var(--gold10); }
.gm-box p { line-height: 1.75; margin: 0 0 .6rem; }
.gm-rules { padding-left: 1.2rem; margin: 0; line-height: 1.7; }
.gm-leaders { list-style: decimal; padding-left: 1.4rem; margin: 0; }
.gm-leaders li { padding: .25rem 0; }
.gm-leaders li span { display: inline-block; min-width: 60%; }
.gm-more { margin-top: 2.6rem; }
.gm-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.gm-more-card { display: block; border: 1px solid var(--gold30); padding: 1rem; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.gm-more-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.gm-more-card .gm-art svg { width: 90px; }
.gm-more-card strong { display: block; font-family: var(--ff-bangla-heading); font-size: 1.2rem; }
.gm-more-card small { color: var(--text-muted); }

@keyframes gmIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gm *, .gm-card { animation: none !important; transition: none !important; } }
@media (max-width: 600px) {
  .gm { padding-top: 142px; } /* clears the menu + category bar, same gap as the shop page */
  .gm-placed { flex-direction: column; gap: .1rem; }
  .gm-placed b { min-width: 0; }
}

/* ── Play-in-the-browser games: Guti, Pen Fight, Amar Taka Gelo Koi ─────────────── */
.gm-arcade-intro { max-width: 640px; margin: 0 auto 1.2rem; text-align: center; line-height: 1.75; }
.gm-arcade-board { max-width: 560px; margin: 0 auto; }
.gm-arcade-note { text-align: center; margin-top: 1rem; }
.gt-controls { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-bottom: .9rem; }
.gt-set { border: 1px solid var(--gold30); padding: .45rem .7rem .55rem; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; min-width: 0; }
.gt-set[hidden] { display: none; }
.gt-set legend { font-size: .82rem; color: var(--text-muted); padding: 0 .3rem; }
.gt-set label { display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; cursor: pointer; font-size: .98rem; }
.gt-set input { accent-color: var(--gold); width: 18px; height: 18px; }
.gt-help { text-align: center; font-size: .95rem; line-height: 1.65; color: var(--text-muted); margin: 0 auto .8rem; max-width: 520px; }
.gt-score { display: flex; justify-content: center; gap: .7rem; margin-bottom: .6rem; }
.gt-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .8rem; border: 1px solid var(--gold30); border-radius: 999px; font-size: .95rem; background: var(--bg); }
.gt-chip::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #1a1410; background: #fff; }
.gt-chip.p2::before { background: #1a1410; }
.gt-chip.pf1::before { background: #1f5fbf; border-color: #0d3a80; }
.gt-chip.pf2::before { background: #cc3a1c; border-color: #8a2410; }
.gt-status { text-align: center; font-weight: 600; min-height: 1.7em; margin: 0 0 .8rem; line-height: 1.5; }
.gt-actions { display: flex; justify-content: center; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }
.gt-actions [hidden] { display: none; }

/* Guti board: wooden slab, lines drawn in SVG, every crossing is a button */
.gt-board { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto; padding: 0; box-sizing: content-box;
  border: 26px solid transparent; border-radius: 10px; background: linear-gradient(135deg, #e0aa62, #c48a45) border-box; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.gt-size-5 { border-width: 22px; }
.gt-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gt-lines line { stroke: #5a3210; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-width: 4px; stroke-linecap: round; }
.gt-pt { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.gt-size-5 .gt-pt { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.gt-pt:disabled { cursor: default; }
.gt-pt span { width: 12px; height: 12px; border-radius: 50%; background: #5a3210; transition: transform .18s ease, box-shadow .18s ease; }
.gt-pt.p1 span, .gt-pt.p2 span { width: 34px; height: 34px; border: 2px solid #1a1410; box-shadow: 0 3px 6px rgba(0,0,0,.4), inset 0 0 0 5px rgba(0,0,0,.12); }
.gt-size-5 .gt-pt.p1 span, .gt-size-5 .gt-pt.p2 span { width: 30px; height: 30px; }
.gt-pt.p1 span { background: radial-gradient(circle at 35% 30%, #fff, #d9d4c8); }
.gt-pt.p2 span { background: radial-gradient(circle at 35% 30%, #5a534b, #0e0b08); border-color: #000; }
.gt-pt.can-pick span { box-shadow: 0 3px 6px rgba(0,0,0,.4), 0 0 0 3px rgba(255,255,255,.75); }
.gt-pt.is-selected span { transform: scale(1.15); box-shadow: 0 0 0 4px #ffd24d, 0 6px 12px rgba(0,0,0,.45); }
.gt-pt.is-target span { width: 22px; height: 22px; background: #1f9d55; box-shadow: 0 0 0 4px rgba(255,255,255,.85); }
.gt-pt.is-last:not(.p1):not(.p2):not(.is-target) span { background: #fff; }
.gt-pt:focus-visible { outline: 3px solid #fff; outline-offset: 1px; box-shadow: 0 0 0 6px #1a1410; }
@media (prefers-reduced-motion: reduce) { .gt-pt span { transition: none; } }

/* Pen fight */
.pf-table { max-width: 360px; margin: 0 auto; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 26px rgba(0,0,0,.2); line-height: 0; }
.pf-table canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: grab; }
.pf-keys { max-width: 360px; margin: 1rem auto 0; font-size: .95rem; }
.pf-keys summary { cursor: pointer; color: var(--gold-ink); min-height: 32px; }
.pf-keys label { display: flex; align-items: center; gap: .6rem; margin: .6rem 0; }
.pf-keys input[type=range] { flex: 1; accent-color: var(--gold); min-height: 28px; }
.pf-keys output { min-width: 3.2em; text-align: right; }

/* Amar Taka Gelo Koi */
.tk-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: .7rem; margin-bottom: 1rem; border-bottom: 1px dashed var(--gold30); }
.tk-year { font-family: var(--ff-bangla-heading); font-size: 1.5rem; font-weight: 700; color: var(--gold-ink); }
.tk-score { font-size: .95rem; color: var(--text-muted); }
.tk-h { font-family: var(--ff-bangla-heading); font-size: 1.35rem; line-height: 1.4; margin: 0 0 .8rem; }
.tk-h:focus { outline: none; }
.tk-p { line-height: 1.75; margin: .8rem 0; }
.tk-wallet { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.1rem; background: var(--bg); border: 1px solid var(--gold30); border-left: 5px solid var(--gold); }
.tk-wallet-label { color: var(--text-muted); font-size: .95rem; }
.tk-wallet-amount { font-size: 1.9rem; font-family: var(--ff-bangla-heading); }
.tk-options { display: grid; gap: .7rem; margin: 1rem 0; }
.tk-guess { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.gm-btn.tk-option { flex-direction: column; align-items: flex-start; gap: .25rem; text-align: left; padding: .9rem 1rem; background: var(--bg); color: var(--text); min-height: 60px; height: auto; }
.tk-guess .gm-btn.tk-option { align-items: center; font-size: 1.25rem; font-weight: 700; }
.tk-option span { font-weight: 400; font-size: .92rem; color: var(--text-muted); }
.gm-btn.tk-option:hover, .gm-btn.tk-option:focus-visible { background: var(--gold10); border-color: var(--gold); }
.tk-bar { display: grid; grid-template-columns: minmax(64px, auto) 1fr auto; align-items: center; gap: .6rem; margin: .5rem 0; }
.tk-bar-label { font-size: .92rem; color: var(--text-muted); }
.tk-bar-track { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; min-height: 20px; }
.tk-bar-track em { font-style: normal; font-size: .85rem; color: var(--text-muted); }
.tk-basket { width: 16px; height: 14px; border-radius: 2px 2px 6px 6px; background: var(--text-muted); display: inline-block; }
.tk-bar.good .tk-basket { background: #1f7a45; }
.tk-bar.bad .tk-basket { background: var(--gold); }
.tk-bar-num { font-size: .98rem; white-space: nowrap; }
.tk-lesson { padding: .8rem 1rem; line-height: 1.7; border-left: 4px solid var(--gold); background: var(--gold10); margin: 1rem 0; }
.tk-lesson.good { border-left-color: #1f7a45; background: rgba(31,122,69,.1); }
.tk-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.tk-table caption { text-align: left; font-weight: 700; margin-bottom: .4rem; }
.tk-table th, .tk-table td { border: 1px solid var(--gold30); padding: .45rem .6rem; text-align: right; }
.tk-table th:first-child { text-align: left; }
.tk-table thead th { background: var(--gold10); }
.tk-tips { margin: 1rem 0; padding-left: 1.3rem; line-height: 1.75; }
.tk-score-final { font-weight: 700; font-size: 1.1rem; margin: 1rem 0; }
@media (max-width: 480px) { .tk-table { font-size: .82rem; } .tk-table th, .tk-table td { padding: .35rem .35rem; } .tk-wallet-amount { font-size: 1.6rem; } }
