.azur-shell {
  --azur-ink: #0a2335;
  --azur-gold: #ffda84;
  --azur-white: #f0fff7;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #0a2335;
  color: var(--azur-white);
  font-family: system-ui, sans-serif;
  padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right));
}
.azur-shell button { font: inherit; cursor: pointer; }
.azur-shell button:focus-visible { outline: 3px solid var(--azur-gold); outline-offset: 3px; }
.azur-shell button:disabled { opacity: .46; cursor: default; }
.azur-shell [hidden] { display: none; }
.azur-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 12px; min-height: 62px; padding: max(8px,env(safe-area-inset-top)) clamp(12px,4vw,48px) 8px;
  border-bottom: 1px solid #73d5be40;
}
.azur-bar h1 { margin: 0; font-size: clamp(17px,3vw,26px); text-align: center; letter-spacing: -.025em; color: var(--azur-white); }
.azur-tools { justify-self: end; display: flex; gap: 8px; }
.azur-quit, .azur-icon, .azur-back { color: var(--azur-white); background: transparent; border: 0; }
.azur-quit { justify-self: start; padding: 6px 0; min-height: 42px; white-space: nowrap; }
.azur-icon { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #bce3d64d; border-radius: 12px; }
.azur-icon:hover, .azur-quit:hover, .azur-back:hover { color: var(--azur-gold); }
.azur-stage { position: relative; overflow: hidden; min-height: 300px; height: calc(100dvh - 112px); touch-action: none; user-select: none; isolation: isolate; background: #216685; }
.azur-stage canvas { position: absolute; width: 100%; height: 100%; inset: 0; outline: 0; }
.azur-stage::after { content: ''; pointer-events: none; position: absolute; inset: 0; background: linear-gradient(180deg,#0919288c,transparent 23%,transparent 80%,#081d3277); }
.azur-hud {
  position: absolute; z-index: 1; pointer-events: none; inset: clamp(10px,2.4vw,28px) clamp(10px,3vw,36px) auto;
  display: flex; gap: clamp(6px,1.2vw,14px); align-items: start; font-variant-numeric: tabular-nums;
}
.azur-stat { display: grid; gap: 2px; min-width: 76px; padding: 8px clamp(9px,1.8vw,20px); border: 1px solid #d5fff549; border-radius: 13px; background: #0a263be0; }
.azur-stat > span { color: #b7e5df; font-size: .84rem; font-weight: 650; }
.azur-stat strong { display: flex; gap: 7px; align-items: center; font-size: clamp(19px,3.8vw,31px); font-weight: 850; line-height: 1.05; white-space: nowrap; }
.azur-stat small { color: #d3ebe4; font-size: .76rem; margin-top: 2px; }
.azur-score { margin-left: auto; }
.azur-gem i { width: .56em; height: .56em; margin: 0 .11em; border-radius: 2px; transform: rotate(45deg); background: var(--azur-gold); }
.azur-collected .azur-gem { border-color: var(--azur-gold); }
.azur-cue { position: absolute; z-index: 1; pointer-events: none; top: clamp(86px,22%,140px); left: 50%; transform: translateX(-50%); display: flex; gap: .55em; align-items: center; white-space: nowrap; padding: .44em 1em; background: var(--azur-gold); color: #19303d; border-radius: 999px; font-size: clamp(16px,2.8vw,26px); font-weight: 850; box-shadow: 0 4px 24px #15263665; }
.azur-cue[data-kind="confirmed"] { background: #b1f0cd; }
.azur-cue[data-kind="obstacle"] { background: #122f42ee; border: 1px solid #d5fff54f; color: var(--azur-white); }
.azur-cue span:first-child { font-size: 1.25em; line-height: 1; }
.azur-count { position: absolute; z-index: 1; top: 42%; left: 50%; transform: translate(-50%,-50%); color: var(--azur-gold); -webkit-text-stroke: 2px #14334b; font-size: clamp(56px,12vw,145px); font-weight: 950; line-height: 1; white-space: nowrap; text-shadow: 0 6px #14334b; pointer-events: none; }
.azur-controls { display: none; position: absolute; z-index: 1; bottom: 12px; inset-inline: 12px; gap: 6px; justify-content: center; }
.azur-controls button { display: grid; place-items: center; color: var(--azur-white); border: 1px solid #bce3d685; border-radius: 11px; background: #0a263bdc; min-height: 44px; width: min(15vw,56px); font-size: 23px; font-weight: 750; }
.azur-controls button:active { background: #17646a; }
.azur-legend { min-height: 50px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 17px; padding: 8px 12px max(8px,env(safe-area-inset-bottom)); color: #dcece9; font-size: .9rem; }
.azur-legend span { white-space: nowrap; }
.azur-legend kbd { display: inline-grid; min-width: 1.5em; padding: 0 .14em; place-items: center; border: 1px solid #bce3d667; color: #fff3cc; border-radius: 5px; font: inherit; margin-right: 3px; }
.azur-overlay { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; background: #061c2db3; padding: 13px; }
.azur-panel { width: min(100%,390px); padding: clamp(14px,4vh,30px); border: 1px solid #a6e2ce70; border-radius: 23px; text-align: center; background: #103249; box-shadow: 0 18px 70px #071a25ab; }
.azur-panel-label { margin: 0; color: #b8e4d7; font-weight: 700; }
.azur-panel h2 { font-size: clamp(26px,5vw,39px); margin: 6px 0; line-height: 1.05; letter-spacing: -.04em; color: var(--azur-white); }
.azur-message { margin: 10px 0; min-height: 0; color: #dfede9; }
.azur-primary { padding: .8em 1.3em; color: #102837; background: var(--azur-gold); border: 0; border-radius: 12px; min-width: 150px; margin-top: 6px; font-weight: 850 !important; }
.azur-back { display: block; min-height: 42px; padding: 8px; margin: 6px auto 0; text-decoration: underline; text-underline-offset: .2em; }
@media (pointer:coarse) { .azur-controls { display: flex; } }
@media (max-width:560px) {
  .azur-bar { min-height: 56px; gap: 5px; }
  .azur-tools { gap: 5px; }
  .azur-icon { width: 40px; height: 40px; }
  .azur-stage { height: calc(100dvh - 123px); }
  .azur-legend { min-height: 67px; gap: 4px 11px; }
  .azur-legend span:first-child { text-align: center; flex: 0 0 100%; }
}
@media (orientation:landscape) and (max-height:510px) {
  .azur-bar { min-height: 48px; padding-block: 4px; }
  .azur-icon { height: 40px; }
  .azur-stage { height: calc(100dvh - 82px); min-height: 215px; }
  .azur-legend { min-height: 34px; padding-block: 4px; }
  .azur-panel { padding: 12px; }
  .azur-controls { justify-content: end; }
  .azur-cue { top: 69px; }
}
.azur-match{position:relative;min-height:320px;height:calc(100dvh - 112px);overflow:hidden}
.azur-grid{width:100%;height:100%;display:grid;grid-template-columns:1fr}
.azur-grid .azur-stage{height:100%;min-height:0;min-width:0}
.azur-versus .azur-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:3px}
.azur-versus .azur-hud{inset:10px 10px auto}
.azur-versus .azur-stat{padding:6px 9px;min-width:0;max-width:65%}
.azur-versus .azur-stat>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.azur-versus .azur-stat strong{font-size:clamp(16px,3vw,25px)}
.azur-versus .azur-stat small{margin:0}
.azur-versus .azur-cue{top:auto;bottom:15%;font-size:clamp(12px,2.1vw,20px);padding:.38em .7em}
.azur-stopped{position:absolute;z-index:1;left:50%;top:47%;transform:translate(-50%,-50%);padding:9px 14px;background:#0a2335f2;color:#fff4db;border-radius:10px;margin:0;text-align:center;font-weight:800;min-width:55%}
.azur-frozen canvas{filter:saturate(.6) brightness(.65)}
.azur-setup{position:absolute;inset:0;display:grid;place-items:center;padding:11px;background:linear-gradient(180deg,#061e3677,#0b2337d9),url('/assets/games/azur-cover.webp') center 53% / cover}
.azur-setup .azur-panel{width:min(100%,455px)}
.azur-levels{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 14px;margin:14px 0 8px}
.azur-levels label{display:grid;gap:4px;text-align:left;min-width:125px;font-size:.88rem;font-weight:650}
.azur-levels select{min-height:40px;border:1px solid #82acb4;border-radius:8px;padding:4px 10px;background:#e6f4ea;color:#142c3c;font:inherit}
@media (max-width:560px){.azur-match{height:calc(100dvh - 123px)}}
@media (orientation:portrait) and (max-width:650px){.azur-versus .azur-grid{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(0,1fr)}.azur-versus .azur-match{min-height:330px}.azur-versus .azur-legend{min-height:42px}.azur-versus .azur-legend span:first-child{white-space:normal}.azur-versus .azur-match{height:calc(100dvh - 99px)}}
@media (orientation:landscape) and (max-height:510px){.azur-match{height:calc(100dvh - 82px);min-height:215px}.azur-setup .azur-panel{padding:10px}.azur-setup .azur-message{margin:5px 0}.azur-levels{margin:6px 0 2px}}
