:root {
  --night: #000000;
  --ink: #ffffff;
  --soft: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.9);
  --w98: #c0c0c0;
  --w98-hi: #ffffff;
  --w98-lite: #dfdfdf;
  --w98-shade: #808080;
  --w98-dark: #0a0a0a;
  --title-a: #000080;
  --title-b: #1084d0;
  --title-off-a: #808080;
  --title-off-b: #b5b5b5;
  --mono: 'JetBrains Mono Variable', ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); }
body { color: var(--ink); font-family: var(--mono); overflow: hidden; -webkit-font-smoothing: antialiased; }

.stage { position: relative; width: 100vw; height: 100vh; overflow: hidden; background: var(--night); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.label {
  display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--soft); line-height: 1.3; white-space: nowrap;
}
.value { display: block; font-size: clamp(13px, 1.5vw, 16px); line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* top */
.top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: clamp(14px, 3.4vh, 30px) clamp(16px, 4vw, 44px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; }
.brand__mark { width: 18px; height: 18px; fill: var(--ink); }
.brand__dot { fill: var(--ink); opacity: 0.6; }
.top__note { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }

/* the panel of the month */
.panel {
  position: absolute; z-index: 3;
  left: clamp(16px, 4vw, 44px); top: clamp(58px, 17vh, 170px);
  width: min(360px, calc(100vw - 32px));
  padding: clamp(14px, 2.6vh, 24px) clamp(16px, 2vw, 24px);
  border: 1px solid var(--line); background: var(--night);
  will-change: opacity, transform;
}
.panel__title { margin: 8px 0 6px; font-weight: 500; font-size: clamp(16px, min(2.2vw, 3.6vh), 22px); letter-spacing: 0.02em; line-height: 1.2; }
.panel__text { margin: 0 0 14px; font-size: 12px; line-height: 1.55; color: rgba(255, 255, 255, 0.78); max-width: 32ch; }
.panel__row { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.panel__meta .value { font-size: 12px; }
.moon { width: 22px; height: 22px; flex: none; }
.moon__disc { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1; }
.moon__lit { fill: var(--ink); }

.x {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 22px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 2px; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: var(--ink);
  transition: background-color 0.2s ease;
}
.x svg { width: 9px; height: 9px; stroke: currentColor; stroke-width: 1.4; fill: none; stroke-linecap: square; transition: transform 0.25s cubic-bezier(.3,1.6,.5,1); }
@media (hover: hover) {
  .x:hover { background: rgba(255, 255, 255, 0.26); }
  .x:hover svg { transform: rotate(90deg); }
}
.x:active svg, .x.is-down svg { transform: scale(0.82) rotate(90deg); }
.x.is-hov { background: rgba(255, 255, 255, 0.26); }
.x.is-hov svg { transform: rotate(90deg); }

/* ticker */
.ticker {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap;
  padding: 0 clamp(16px, 4vw, 44px) clamp(14px, 3.4vh, 28px);
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0.75) 40%, #000 70%);
  padding-top: 28px;
}
.ticker__col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ticker__col--count { align-items: center; flex: 1; }
.ticker__col--btn { align-items: flex-end; }

.count { display: inline-flex; align-items: baseline; gap: 0.5ch; font-size: clamp(22px, min(3.4vw, 6vh), 40px); line-height: 1.15; font-weight: 400; letter-spacing: 0.02em; }
.unit { display: inline-flex; align-items: baseline; }
.unit__u { font-size: 0.42em; color: var(--soft); margin-left: 0.15ch; letter-spacing: 0.1em; }
.digit { display: inline-block; width: 1ch; height: 1.15em; overflow: hidden; position: relative; }
.strip { display: block; will-change: transform; }
.strip span { display: block; height: 1.15em; line-height: 1.15em; text-align: center; }

/* Windows 98 bevels */
.w98btn {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #000; background: var(--w98); border: 0; border-radius: 0; cursor: pointer;
  padding: 6px 12px; white-space: nowrap;
  box-shadow: inset -1px -1px var(--w98-dark), inset 1px 1px var(--w98-hi), inset -2px -2px var(--w98-shade), inset 2px 2px var(--w98-lite);
}
.w98btn > * { position: relative; }
.w98btn:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.w98btn:active, .w98btn.is-down {
  box-shadow: inset -1px -1px var(--w98-hi), inset 1px 1px var(--w98-dark), inset -2px -2px var(--w98-lite), inset 2px 2px var(--w98-shade);
  padding: 7px 11px 5px 13px;
}
@media (hover: hover) { .ask:hover { background: #d4d4d4; } }
.ask.is-hov { background: #d4d4d4; }
.ask.is-open { box-shadow: inset -1px -1px var(--w98-hi), inset 1px 1px var(--w98-dark), inset -2px -2px var(--w98-lite), inset 2px 2px var(--w98-shade); padding: 7px 11px 5px 13px; background: #d4d4d4; }

/* the dotted frames of the opening */
.zooms { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.zoom { position: absolute; left: 0; top: 0; border: 1px dashed rgba(255, 255, 255, 0.9); opacity: 0; }

/* the window */
.win {
  position: absolute; z-index: 9; left: 0; top: 0;
  width: min(300px, calc(100vw - 32px));
  background: var(--w98); color: #000; padding: 3px;
  box-shadow: inset -1px -1px var(--w98-dark), inset 1px 1px var(--w98-lite), inset -2px -2px var(--w98-shade), inset 2px 2px var(--w98-hi), 2px 2px 0 rgba(0,0,0,0.6);
}
.win { visibility: hidden; }
.win__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 20px; padding: 0 2px 0 4px; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  background: linear-gradient(to right, var(--title-a), var(--title-b));
  position: relative; overflow: hidden;
}
.win__bar::before {
  content: ''; position: absolute; inset: 0; background: linear-gradient(to right, var(--title-off-a), var(--title-off-b));
  opacity: var(--off, 0); pointer-events: none;
}
.win__bar > * { position: relative; }
.win__title { display: inline-flex; align-items: center; gap: 5px; user-select: none; }
.win__icon { width: 12px; height: 12px; fill: #ffd84a; }
.win__icon-s { fill: #fff; }
.win__x { width: 16px; height: 14px; padding: 0; display: grid; place-items: center; }
.win__x svg { width: 8px; height: 7px; fill: #000; }
.win__x.is-down, .win__x:active { padding: 1px 0 0 1px; }
.win__body { display: flex; gap: 12px; align-items: flex-start; padding: 14px 12px 6px; }
.win__glyph { width: 32px; height: 32px; flex: none; }
.g-ring { fill: #000; }
.g-in { fill: #fff; }
.g-i { fill: var(--title-a); }
.win__text { margin: 0; font-size: 11px; line-height: 1.55; min-height: 6.2em; }
.caret { display: inline-block; width: 0.6em; height: 1.1em; margin-left: 1px; vertical-align: -0.2em; background: #000; }
.win__foot { display: flex; justify-content: center; padding: 6px 0 10px; }
.win__ok { min-width: 74px; text-align: center; padding: 5px 12px; }
.win__ok.is-down, .win__ok:active { padding: 6px 11px 4px 13px; }

/* the pointer of the autopilot */
.cursor { position: absolute; left: 0; top: 0; z-index: 20; width: 12px; height: 19px; opacity: 0; pointer-events: none; }
.cursor__b { fill: #000; }
.cursor__w { fill: #fff; }

/* phone: the countdown first, the date and the button under it */
@media (max-width: 560px) {
  .top__note { display: none; }
  .ticker { justify-content: space-between; }
  .ticker__col--count { order: -1; flex-basis: 100%; align-items: flex-start; }
  .panel__text { margin-bottom: 10px; }
}
@media (max-height: 460px) {
  .panel__text { display: none; }
}
