#ast-button,#census-button,#new-game-button { left:87.1%; width:10.8%; }
#ast-button { top:59%; }
#census-button { top:66%; }
#new-game-button { top:73%; }
#timer-start,#timer-hide,#timer-return { top:82.2%; }

#card-fullscreen-overlay {
  position:fixed;
  inset:0;
  z-index:200;
  display:flex;
  align-items:center;
  justify-content:center;
  background-color:#000;
  background-position:center;
  background-repeat:no-repeat;
  background-size:contain;
  cursor:pointer;
  touch-action:manipulation;
}
#card-fullscreen-overlay.hidden { display:none; }
#card-fullscreen-image {
  display:none;
  width:auto;
  height:auto;
  max-width:100vw;
  max-height:100vh;
  object-fit:contain;
}

.game-screen {
  position:absolute;
  inset:0;
  z-index:30;
  overflow:hidden;
  background:#000;
  touch-action:none;
}
.game-screen.hidden { display:none; }
.game-master {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:fill;
  pointer-events:none;
  user-select:none;
}
.choice-hit {
  position:absolute;
  border:clamp(2px,.25vw,5px) solid transparent;
  border-radius:.55rem;
  background:transparent;
  box-shadow:none;
  color:transparent;
  touch-action:manipulation;
  transition:transform 90ms ease,border-color 120ms ease,box-shadow 120ms ease;
}
.choice-hit:active { transform:translateY(.35%) scale(.985); }
.choice-hit.selected {
  border-color:#ffe27a;
  box-shadow:0 0 0 2px rgba(74,42,4,.78),0 0 15px 5px rgba(255,211,81,.70),inset 0 0 12px rgba(255,233,145,.42);
}
.choice-hit:focus-visible { outline:3px solid #fff1a8; outline-offset:2px; }
#selection-accept {
  position:absolute;
  left:89.05%;
  top:31.8%;
  width:9.45%;
  height:33.9%;
  border:3px solid transparent;
  border-radius:.45rem;
  background:transparent;
  box-shadow:none;
  color:transparent;
  touch-action:manipulation;
}
#selection-accept:not(:disabled) { box-shadow:0 0 15px 5px rgba(255,222,113,.48),inset 0 0 0 2px rgba(255,238,173,.45); }
#selection-accept:disabled { opacity:1; background:rgba(35,35,35,.36); }
#selection-accept:active:not(:disabled) { transform:scale(.98); }

.token-layer { position:absolute; inset:0; }
.civilization-token {
  position:absolute;
  width:2.62%;
  height:auto;
  transform:translate(-50%,-50%);
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.58));
  user-select:none;
  -webkit-user-drag:none;
  touch-action:none;
  cursor:grab;
}
.civilization-token.dragging { cursor:grabbing; filter:drop-shadow(0 4px 5px rgba(0,0,0,.8)); }
.civilization-token.locked { cursor:default; }
.census-token { width:3.25%; }

.game-nav {
  position:absolute;
  z-index:8;
  width:11.5%;
  height:5.4%;
  font-size:clamp(.64rem,1.35vw,1.42rem);
}
#ast-end { left:2.25%; bottom:2.0%; }
#ast-home { left:43.9%; bottom:2.0%; }
#census-home { left:8.4%; bottom:6.7%; width:13.3%; height:6.4%; }
.game-lock {
  position:absolute;
  z-index:9;
  right:1.25%;
  bottom:1.2%;
  width:5.8%;
  height:10.2%;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  display:flex;
  align-items:center;
  justify-content:center;
  touch-action:manipulation;
}
.game-lock img { display:block; width:auto; height:60%; max-width:72%; object-fit:contain; filter:drop-shadow(0 2px 2px rgba(0,0,0,.62)); }
.game-lock:active img { transform:scale(.92); }

#end-game-confirmation {
  position:absolute;
  inset:0;
  z-index:50;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:6%;
  background:rgba(0,0,0,.78);
  color:#fff1bd;
  text-align:center;
  text-shadow:0 3px 6px #000;
  font:700 clamp(2rem,5.2vw,5.4rem)/1.08 'EB Garamond',serif;
}
#end-game-confirmation.hidden { display:none; }
#end-game-actions {
  margin-top:4%;
  display:flex;
  gap:clamp(1.2rem,4vw,4rem);
  align-items:center;
  justify-content:center;
}
#end-game-actions button {
  position:static;
  left:auto;
  top:auto;
  right:auto;
  bottom:auto;
  width:auto;
  height:auto;
  min-width:clamp(7.5rem,20vw,15rem);
  min-height:clamp(4rem,9vw,7rem);
  padding:.45em 1.15em;
  border:2px solid rgba(255,241,189,.82);
  border-radius:.22em;
  background:rgba(42,31,20,.96);
  color:#fff1bd;
  box-shadow:0 .12em .35em rgba(0,0,0,.65);
  font:700 clamp(1.4rem,3.4vw,3.4rem)/1 'EB Garamond',serif;
  text-shadow:0 2px 4px #000;
  touch-action:manipulation;
}
#end-game-actions button:active { transform:scale(.96); }
#end-game-actions button:focus-visible { outline:.12em solid #fff; outline-offset:.12em; }

@media (max-aspect-ratio:1/1) {
  #card-fullscreen-image { max-width:100vw; max-height:100vh; }
}
