:root {
  --bg: #000000;
  --card: #121418;
  --tile: #1d2026;
  --ink: #f1f4f6;
  --soft: rgba(241, 244, 246, 0.6);
  --faint: rgba(241, 244, 246, 0.14);
  --line: rgba(241, 244, 246, 0.1);
  --level: #f79a2e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.av { position: relative; width: min(324px, 100%); padding: 14px; border-radius: 26px; background: linear-gradient(180deg, #181b20, var(--card)); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07); }

.av__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.av__name { min-width: 0; display: grid; }
.av__name b { font-size: 16px; line-height: 21px; font-weight: 740; font-stretch: 108%; letter-spacing: -0.012em; white-space: nowrap; }
.av__name span { font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av__prob { flex: none; display: block; height: 26px; padding: 0 11px; border-radius: 13px; overflow: hidden; background: rgba(241, 244, 246, 0.08); font-size: 12px; line-height: 26px; font-weight: 660; box-shadow: inset 0 0 0 1px var(--line); }
.av__prob span { display: block; white-space: nowrap; }

.av__main { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 12px; }
.av__level { flex: 1 1 auto; min-width: 0; display: grid; gap: 7px; }
.av__tile { display: block; width: 54px; height: 54px; border-radius: 17px; background: var(--level); color: #16110a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 20px -10px var(--level); }
.av__tile b { display: block; height: 54px; overflow: hidden; font-size: 34px; line-height: 54px; font-weight: 780; text-align: center; font-variant-numeric: tabular-nums; }
.av__tile b span { display: block; }
.av__word { min-width: 0; display: grid; }
.av__roll { display: block; height: 19px; overflow: hidden; font-size: 14.500px; line-height: 19px; font-weight: 720; white-space: nowrap; }
.av__roll span { display: block; }
.av__roll--sub { height: 15px; font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); }

/* the mountain, split at the treeline: each half takes the colour of its own danger level */
.av__peak { flex: none; display: block; width: 100px; height: 80px; overflow: visible; }
.av__band { stroke: none; }
.av__ridge { fill: none; stroke: rgba(241, 244, 246, 0.5); stroke-width: 1.400; stroke-linejoin: round; stroke-linecap: round; }
.av__tree { fill: none; stroke: var(--card); stroke-width: 2.500; }
/* the compass rose: the slopes facing these ways are the ones at risk */
.av__rose { flex: none; display: block; width: 78px; height: 78px; overflow: visible; }
.av__rose path { fill: var(--faint); transform-box: fill-box; transform-origin: 50% 50%; }
.av__rose text { fill: var(--soft); font-size: 8.500px; font-weight: 700; text-anchor: middle; }

.av__scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; align-items: end; height: 12px; margin-top: 12px; }
.av__scale i { display: block; height: 5px; border-radius: 2.500px; opacity: 0.32; transform-origin: 50% 100%; }
.av__scale i:nth-child(1) { background: #6fcf5b; }
.av__scale i:nth-child(2) { background: #f5d93a; }
.av__scale i:nth-child(3) { background: #f79a2e; }
.av__scale i:nth-child(4) { background: #ef4136; }
.av__scale i:nth-child(5) { background: #a3202d; }

.av__days { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; padding: 4px; border-radius: 15px; background: rgba(241, 244, 246, 0.06); box-shadow: inset 0 0 0 1px var(--line); }
.av__pill { position: absolute; left: 0; top: 4px; bottom: 4px; width: 33%; border-radius: 11px; background: #2a2e36; box-shadow: inset 0 0 0 1px rgba(241, 244, 246, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 10px -6px rgba(0, 0, 0, 0.8); }
.av__day { position: relative; z-index: 1; height: 36px; border: 0; border-radius: 11px; background: transparent; color: var(--soft); font: inherit; font-size: 13px; font-weight: 660; cursor: pointer; outline: none; transition: color 0.25s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.av__day[aria-pressed="true"] { color: var(--ink); }
.av__day:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
@media (hover: hover) { .av__day[aria-pressed="false"]:hover { color: var(--ink); } }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f1f4f6; stroke: #000000; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 6; }
