/* Compact HUD: leave the town visible and keep the map above the controls. */
#vignette { background: linear-gradient(0deg,#2762810a,transparent 20%); }
.vitals, .mapbox, #settings-open { background: #fffff4ed; border-color: #394236; }
header { justify-content: flex-end; pointer-events: none; }
header button { pointer-events: auto; }
.score, .playerlabel, footer, #combo { display: none; }
.vitals {
  position: fixed; top: 24px; left: 24px; width: 220px;
  padding: 15px 17px; border: 1px solid #fff9; border-radius: 15px;
  background: #fffbeddf; backdrop-filter: blur(14px);
  box-shadow: 0 7px 28px #3e4b3420; pointer-events: none;
}
.vital + .vital { margin-top: 13px; }
.vital-label { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; margin-bottom: 7px; }
.vital-label i { font-style: normal; color: #cf735a; margin-right: 5px; }
.stamina .vital-label i { color: #7d9754; font-size: 16px; line-height: 10px; }
.vital-label output { font-size: 10px; font-weight: 500; color: #7d846e; font-variant-numeric: tabular-nums; }
.vital-track { height: 7px; border-radius: 8px; overflow: hidden; background: #dedfcb; }
.vital-track > div { width: 100%; height: 100%; border-radius: inherit; }
#health-fill { background: linear-gradient(90deg,#c96c56,#e29670); }
#stamina-fill { background: linear-gradient(90deg,#819657,#b0bb73); }
.vitals.low-health { border-color: #d7755f; }
#settings-open { display: flex; align-items: center; gap: 8px; border: 1px solid #fff9; border-radius: 11px; background: #fffbeddf; padding: 8px 11px; box-shadow: 0 4px 16px #3e4b3414; }
#settings-open > span { font-size: 21px; line-height: 24px; }
#settings-open kbd { font: 10px Arial,sans-serif; color: #778068; background: #e7e8d6; border: 1px solid #c9ceba; padding: 4px 5px; }
.settings-card { position: relative; width: min(480px,92vw); max-height: 90dvh; overflow-y: auto; padding: 28px 32px; }
.settings-card h2 { margin: 9px 0 5px; font-size: 27px; }
.settings-card #modal-copy { margin: 0 0 18px; font-size: 11px; }
#settings-close { position: absolute; top: 18px; right: 20px; width: 31px; height: 31px; border: 0; background: #ecebdc; border-radius: 9px; font-size: 22px; }
.music-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 16px; border-radius: 12px; background: #eeeedf; }
.music-row strong { font-size: 12px; }
.music-row p { margin: 4px 0 0; font-size: 10px; }
#music-toggle { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 8px 0 8px 8px; font-size: 10px; }
#music-toggle i { display: block; position: relative; width: 37px; height: 21px; background: #c8cebb; border-radius: 20px; transition: background .2s; }
#music-toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fffdf1; box-shadow: 0 1px 3px #4f5c3a30; transition: transform .2s; }
#music-toggle[aria-checked='true'] i { background: #859d5a; }
#music-toggle[aria-checked='true'] i::after { transform: translateX(16px); }
.settings-card h3 { margin: 21px 0 10px; font-size: 12px; }
.settings-card .guide { margin: 0 0 12px; padding: 5px 0; }
.settings-card .guide p { margin: 10px 0; align-items: center; gap: 10px; font-size: 10px; }
.settings-card .guide kbd { color: #626f4c; border: 1px solid #d3d8c2; background: #edeee0; font-size: 9px; }
.settings-card .settings-note { font-size: 9px; line-height: 1.7; margin: 10px 0 15px; }
.settings-card .secondary { margin-top: 12px; }
button:focus-visible { outline: 2px solid #a57b41; outline-offset: 3px; }
#damage-flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 90px #c6564c88; }
#damage-flash.flash { animation: damage .5s ease-out; }
@keyframes damage { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #damage-flash.flash { animation: none; } }
.left[hidden] { display: none; }
.mapbox {
  left: 24px;
  right: auto;
  bottom: 24px;
  width: 156px;
  padding: 10px 12px 9px;
  border-radius: 12px;
  pointer-events: none;
}
.maphead { font-size: 8px; margin-bottom: 6px; }
.maphead span { font-size: 7px; }
#map { display: block; width: 130px; height: auto; }
.maplegend { font-size: 7px; gap: 3px; margin-top: 6px; }
.maplegend i, .maplegend b, .maplegend em { margin-left: 3px; }
@media (max-width: 1000px) {
  .mapbox { left: 22px; right: auto; }
}
@media (max-width: 650px) {
  .vitals { top: 17px; left: 16px; width: 174px; padding: 12px 13px; }
  .vital-label { font-size: 10px; }
  .vital-label output { font-size: 9px; }
  .vital + .vital { margin-top: 10px; }
  .vital-track { height: 6px; }
  #settings-open { padding: 6px 9px; }
  .settings-card { padding: 23px 24px; }
  .mapbox {
    left: 16px;
    right: auto;
    bottom: 142px;
    width: 120px;
    padding: 8px;
  }
  #map { width: 102px; height: auto; }
}

.billiards-hud { position:fixed; z-index:35; left:50%; bottom:max(24px,env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(360px,calc(100vw - 32px)); box-sizing:border-box; padding:16px 22px; border:1px solid #d2b87c; border-radius:14px; background:#172e29ed; color:#f4e8c9; box-shadow:0 6px 24px #10221f45; pointer-events:none; font-family:inherit; }
.billiards-hud[hidden] { display:none; }
.pool-heading { font-size:11px; letter-spacing:1.5px; color:#c8b27e; display:flex; justify-content:space-between; }
.pool-heading span { letter-spacing:0; }
.pool-score { display:flex; align-items:baseline; justify-content:space-between; margin-top:8px; gap:12px; }
.pool-score strong { font-size:28px; font-variant-numeric:tabular-nums; }
.pool-stats { font-size:12px; color:#c9d8cd; }
.pool-status { font-size:13px; margin:6px 0 10px; }
.pool-power { height:5px; background:#0c211c; border-radius:3px; overflow:hidden; }
.pool-power i { display:block; height:100%; width:0; background:linear-gradient(90deg,#79be9f,#ecd179,#df835d); }
body.pool-active .mapbox,body.pool-active .vitals,body.pool-active #rifle-ammo,body.pool-active #rifle-crosshair,body.pool-active #awp-crosshair,body.pool-active .score,body.pool-active #resident-voice-panel,body.pool-active #toast,body.pool-active #combo { visibility:hidden!important; }

/* Tabletop miniature language: matte paper plaques, a thin wood edge and crisp type. */
:root { --ink: #334c55; --paper: #f1e8cf; --orange: #d76645; --green: #456d4f; }
body { background: #bfdce0; }
#vignette { background: linear-gradient(0deg, #334c5510, transparent 14%); }
.vitals, .mapbox, #settings-open, .modal-card {
  background: #f1e8cff2;
  border: 1px solid #9a725470;
  box-shadow: 0 3px 0 #9a725470, 0 11px 22px #334c5529;
  backdrop-filter: blur(4px);
}
.vitals { padding: 15px 17px; }
.vital-label, .vital-label output { font-size: 12px; color: #334c55; }
.vital-track { background: #c9d0bd; height: 9px; box-shadow: inset 0 1px 2px #334c5530; }
#health-fill { background: #d76645; }
#stamina-fill { background: #80ad72; }
#settings-open { min-width: 54px; min-height: 44px; }
#settings-open kbd { font-size: 11px; color: #334c55; background: #e4dbc4; border-color: #9a725470; }
.maphead, .maphead span { font-size: 12px; color: #334c55; }
.maplegend { display: none; }
.mapbox { width: 156px; }
#map { border: 1px solid #9a725470; background: #dce9d6; }
.settings-card #modal-copy, .settings-card h3, .music-row strong,
.settings-card .guide p, .settings-card .settings-note,
.music-row p, #music-toggle { font-size: 12px; }
.settings-card p, .settings-card .guide p, .settings-card .eyebrow,
.settings-card .secondary { color: #334c55; }
.music-row { background: #e4dbc4; border: 1px solid #9a72543d; }
.settings-card .guide kbd { font-size: 11px; color: #334c55; }
#resume { background: #d76645; min-height: 44px; }
#settings-close { min-width: 44px; min-height: 44px; background: #e4dbc4; }
#loading { background: #bfdce0; color: #334c55; }
#loading::before { content: ''; width: min(430px, 85vw); height: 245px; position: absolute; border-radius: 24px; background: #f1e8cf; border: 1px solid #9a725470; box-shadow: 0 9px 0 #9a7254, 0 24px 50px #334c5530; }
#loading > * { position: relative; z-index: 1; }
#loading .loading-acorn { display: block; width: 53px; height: 62px; border-radius: 46% 46% 50% 50%; background: #9a7254; box-shadow: inset -8px -6px 0 #76553f; transform: rotate(-8deg); }
#loading .loading-acorn::before { content: ''; position: absolute; left: -3px; top: -5px; width: 59px; height: 22px; border-radius: 55% 55% 24% 24%; background: #456d4f; box-shadow: inset -5px -4px 0 #334c55; }
#loading .loading-acorn::after { content: ''; position: absolute; left: 27px; top: -14px; width: 7px; height: 13px; border-radius: 4px; background: #334c55; transform: rotate(19deg); }
#loading h2 { font-size: 26px; letter-spacing: 4px; }
#loading p { font-size: 12px; letter-spacing: 1px; }
button:focus-visible { outline: 3px solid #334c55; outline-offset: 3px; }
#visual-settings { margin: 20px 0 12px; padding: 12px 14px; border: 1px solid #9a725470; border-radius: 12px; }
#visual-settings legend { padding: 0 6px; font-size: 14px; font-weight: 700; }
.visual-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
.visual-option label, .visual-wind { font-size: 14px; color: #334c55; }
.visual-option select { min-height: 44px; max-width: 65%; border: 1px solid #9a7254; border-radius: 8px; padding: 6px 10px; background: #f1e8cf; color: #334c55; font: 16px system-ui; }
.visual-wind { display: flex; align-items: center; min-height: 44px; gap: 10px; cursor: pointer; }
.visual-wind input { width: 22px; height: 22px; accent-color: #68774b; }
#visual-settings #climate-note { font-size: 13px; line-height: 1.6; color: #334c55; margin: 5px 0 0; }
#visual-settings[hidden] { display: none; }
#awp-scope { position: fixed; inset: 0; z-index: 9; pointer-events: none; background: radial-gradient(circle at center, transparent 0 calc(min(44vw, 44vh) - 2px), #060808 calc(min(44vw, 44vh) + 1px)); }
#awp-scope[hidden] { display: none; }
.scope-glass { position: absolute; width: min(88vw,88vh); height: min(88vw,88vh); left: 50%; top: 50%; transform: translate(-50%,-50%); border: 3px solid #111; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 24px #001a2440; }
.scope-cross-h, .scope-cross-v { position: absolute; display: block; background: #101310; }
.scope-cross-h { left: 0; right: 0; top: 50%; height: 1px; }
.scope-cross-v { top: 0; bottom: 0; left: 50%; width: 1px; }
.scope-dot { position: absolute; width: 3px; height: 3px; background: #9a3026; left: 50%; top: 50%; transform: translate(-50%,-50%); border-radius: 50%; }
body.awp-scoped #first-person-reticle { display: none; }
body.awp-scoped #toast { display: none; }
/* Gameplay stays clear; the full keyboard guide remains in Settings. */
#map-view, #first-person-toggle, #vehicle-toggle, #rifle-toggle,
#rifle-fire, #rifle-reload, #lime-pickup, #lime-equip,
footer, #touch { display: none !important; }
#rifle-ammo { right: 24px !important; bottom: max(20px, env(safe-area-inset-bottom)) !important; }
#resident-voice-panel {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 12; display: flex; flex-direction: column;
  align-items: center; gap: 8px; width: max-content; max-width: min(460px, calc(100vw - 40px));
  pointer-events: none;
}
#resident-voice-panel[hidden], #resident-voice-caption[hidden], #resident-interact[hidden] { display: none !important; }
#resident-interact {
  position: static !important; inset: auto !important; pointer-events: auto;
  max-width: 100%; white-space: normal;
}
#resident-voice-caption {
  background: #263b3ce8; color: #fff2cf; border: 1px solid #d6c7a6;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; text-align: center;
  overflow-wrap: anywhere; max-width: 100%;
}
@media (max-width: 760px) {
  #resident-voice-panel { bottom: max(78px, calc(env(safe-area-inset-bottom) + 62px)); }
  #rifle-ammo { right: 16px !important; }
}
@media (max-width: 650px) {
  .vitals { padding: 12px 13px; }
  .vital-label, .vital-label output, .maphead, .maphead span { font-size: 12px; }
  .mapbox { width: 120px; }
  .touch button { min-width: 48px; min-height: 44px; background: #f1e8cff2; border: 1px solid #9a725470; box-shadow: 0 3px 0 #9a725470; }
  .touch > div:last-child button { background: #d76645; }
}

body.piano-active .mapbox,body.piano-active .vitals,body.piano-active .score,body.piano-active #rifle-ammo,body.piano-active #first-person-reticle,body.piano-active #resident-voice-panel,body.piano-active #toast,body.piano-active #combo { visibility:hidden!important; }
body.pool-active #first-person-reticle { visibility:hidden!important; }
