/* Gear Clock Tower: brass and blueprint. Scoped to .gct. */
.gct{--ink:#0e1a2b;--ink2:#14263d;--line:#26405e;--brass:#d9a441;--cream:#f3e7c8;--red:#e8503f;--green:#7fe08c;
  position:relative;background:var(--ink);color:var(--cream);border:3px solid var(--brass);border-radius:14px;padding:10px;
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
  padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
.gct button{font-family:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
.gct .hud{display:grid;gap:6px;margin-bottom:8px}
.gct .hrow{display:flex;align-items:center;gap:8px;justify-content:space-between}
.gct .hname{font-weight:800;font-size:.95rem;letter-spacing:.02em}
.gct .htime{font-variant-numeric:tabular-nums;font-weight:800;font-size:1.25rem;color:var(--brass)}
.gct .htime.low{color:var(--red)}
.gct .bar{position:relative;height:22px;background:#0a1422;border:2px solid var(--line);border-radius:11px;overflow:hidden;flex:1}
.gct .bar.wind{height:12px;border-radius:6px}
.gct .fill{height:100%;width:0;background:linear-gradient(#f0c870,#b27c2c);transition:width .12s linear}
.gct .bar.wind .fill{background:linear-gradient(#7fe08c,#3d9c52)}
.gct .btxt{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:800;color:#fff;text-shadow:0 1px 2px #000;font-variant-numeric:tabular-nums}
.gct .wl{font-size:.7rem;opacity:.7;min-width:44px}
.gct .read{font-size:.82rem;font-variant-numeric:tabular-nums;color:var(--cream);min-height:1.2em}
.gct .read.bad{color:#ff8068;font-weight:700}
.gct .stage{position:relative;margin:0 auto;border-radius:10px;overflow:hidden;min-height:300px;background:#0a1422}
.gct canvas{display:block;margin:0 auto;touch-action:none;max-width:100%;outline:none}
.gct canvas:focus-visible{outline:3px solid var(--cream);outline-offset:-3px}
.gct .tools{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.gct .b{min-height:48px;min-width:48px;padding:0 14px;border:2px solid var(--line);border-radius:10px;background:var(--ink2);color:var(--cream);font-weight:700;font-size:.9rem}
.gct .b:active{transform:translateY(1px)}
.gct .b.go{background:var(--brass);border-color:#8d6420;color:#241703}
.gct .b.wide{flex:1 1 100%;min-height:56px;font-size:1.05rem}
.gct .b.ghost{background:transparent}
.gct .b:disabled{opacity:.4;cursor:default}
.gct .b:focus-visible,.gct .tile:focus-visible{outline:3px solid var(--cream);outline-offset:2px}
.gct .tools .b:not(.wide){flex:1 1 0}
.gct .msg{font-size:.85rem;margin-top:8px;min-height:2.6em;color:#cdd6e0}
.gct .panel{position:absolute;inset:0;background:rgba(10,20,34,.93);overflow:auto;display:flex;padding:12px}
.gct .panel[hidden]{display:none}
.gct .card{margin:auto;width:100%;max-width:340px;text-align:center;display:grid;gap:10px}
.gct .card h2{font-size:1.7rem;letter-spacing:.01em;color:var(--brass)}
.gct .kick{font-size:.75rem;text-transform:uppercase;letter-spacing:.12em;opacity:.75}
.gct .card p{font-size:.92rem;line-height:1.4}
.gct .card .fine{font-size:.75rem;opacity:.7}
.gct .card .row{display:flex;gap:8px}.gct .card .row .b{flex:1;padding:0 6px}
.gct .coins{font-size:1.2rem;font-weight:800;color:var(--cream)}
.gct .grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.gct .tile{min-height:78px;border:2px solid var(--line);border-radius:10px;background:var(--ink2);color:var(--cream);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px}
.gct .tile b{font-size:1.2rem;color:var(--brass)}.gct .tile small{font-size:.65rem;opacity:.8;line-height:1.1}
.gct .tile.lock{opacity:.4}
.gct .up{display:flex;gap:10px;align-items:center;justify-content:space-between;text-align:left;background:var(--ink2);border:2px solid var(--line);border-radius:10px;padding:8px 10px}
.gct .up small{opacity:.75;font-size:.72rem}.gct .buy{min-width:84px;flex:none}
.gct .st{display:inline-flex;gap:6px;justify-content:center}
.gct .st i{width:20px;height:20px;background:#2a3b52;clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%)}
.gct .st i.on{background:var(--brass)}
.gct .how{text-align:left;font-size:.9rem;line-height:1.4;padding-left:1.3rem;display:grid;gap:4px}
.gct .cogs{position:relative;height:84px;margin:0 auto -4px;width:140px}
.gct .cogs i{position:absolute;border-radius:50%;background:repeating-conic-gradient(var(--brass) 0 12deg,transparent 12deg 30deg);-webkit-mask:radial-gradient(circle,transparent 30%,#000 32%,#000 70%,transparent 72%);mask:radial-gradient(circle,transparent 30%,#000 32%,#000 70%,transparent 72%);animation:gct-spin 9s linear infinite}
.gct .cogs i:first-child{width:78px;height:78px;left:6px;top:3px}
.gct .cogs i:last-child{width:56px;height:56px;left:76px;top:26px;animation-direction:reverse;animation-duration:6.5s;opacity:.8}
@keyframes gct-spin{to{transform:rotate(360deg)}}
.gct .st i.on{animation:gct-pop .45s ease-out both}.gct .st i.on:nth-child(2){animation-delay:.12s}.gct .st i.on:nth-child(3){animation-delay:.24s}
@keyframes gct-pop{0%{transform:scale(.2)}70%{transform:scale(1.35)}100%{transform:scale(1)}}
.gct .card{animation:gct-in .22s ease-out}@keyframes gct-in{from{opacity:0;transform:translateY(8px)}}
.gct .tile:active,.gct .b:active{filter:brightness(1.15)}
@media (prefers-reduced-motion:reduce){.gct *{animation:none!important;transition:none!important}}
/* Full screen: the stage (.game-wrap) is a flex column; the board takes the rest. */
html.pip-immersive .game-wrap,html.pip-native .game-wrap,.game-wrap:fullscreen{display:flex;flex-direction:column;padding:6px max(8px,env(safe-area-inset-left)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-right));max-width:none;background:#0e1a2b;overflow:hidden}
html.pip-immersive .game-wrap .ad-well,html.pip-native .game-wrap .ad-well,html.pip-immersive .game-wrap footer,html.pip-native .game-wrap footer,html.pip-immersive .game-wrap .pip-actions,html.pip-native .game-wrap .pip-actions{display:none}
html.pip-immersive .gct,html.pip-native .gct{flex:1 1 0;min-height:0;display:flex;flex-direction:column;border-width:2px;padding-top:6px;padding-bottom:6px}
html.pip-immersive .gct .hud,html.pip-native .gct .hud{gap:4px;margin-bottom:6px}
html.pip-immersive .gct .stage,html.pip-native .gct .stage{flex:1 1 0;min-height:0;display:flex;align-items:center;justify-content:center}
html.pip-immersive .gct .tools,html.pip-native .gct .tools{margin-top:6px;gap:6px;flex:none}
html.pip-immersive .gct .b.wide,html.pip-native .gct .b.wide{min-height:48px}
html.pip-immersive .gct .msg,html.pip-native .gct .msg{margin-top:4px;min-height:0;font-size:.78rem;max-height:2.6em;overflow:hidden}
html.pip-immersive .gct #b-mute,html.pip-native .gct #b-mute{display:none}
@media (orientation:landscape) and (max-height:560px){
 html.pip-immersive .gct,html.pip-native .gct{display:grid;grid-template-columns:minmax(0,1fr) 200px;grid-template-rows:auto 1fr auto auto;column-gap:10px}
 html.pip-immersive .gct .stage,html.pip-native .gct .stage{grid-column:1;grid-row:1/5}
 html.pip-immersive .gct .hud,html.pip-native .gct .hud{grid-column:2;grid-row:1}
 html.pip-immersive .gct .tools,html.pip-native .gct .tools{grid-column:2;grid-row:3;align-self:end}
 html.pip-immersive .gct .msg,html.pip-native .gct .msg{grid-column:2;grid-row:2;align-self:start}
 html.pip-immersive .gct .tools .b:not(.wide),html.pip-native .gct .tools .b:not(.wide){flex:1 1 40%}
}
.gct .stage{box-shadow:inset 0 0 0 1px rgba(217,164,65,.18),inset 0 0 24px rgba(0,0,0,.35)}
.gct .fill{box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}
.gct .b.go:active{box-shadow:inset 0 2px 6px rgba(0,0,0,.35)}
