:root {
  color-scheme: light;
  background: #202d34;
  color: #142630;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow: hidden; }
#dial {
  width: 100vw;
  height: 100dvh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --label-x: clamp(30px, 10.2vw, 178px);
  --label-y: clamp(37px, 16.1dvh, 165px);
  --label-size: clamp(22px, 3vw, 42px);
  --hint-y: clamp(35px, 11.9dvh, 128px);
}
.plate, #graduations, #needles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.plate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
#hour-hand {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 11px;
  transform-origin: 50% 100%;
  background: transparent;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#hour-hand.ready { opacity: 1; }
#hour-hand:focus-visible {
  outline: 2px solid #611c2a;
  outline-offset: 3px;
  background: #fff2;
}
.panel-top {
  position: absolute;
  z-index: 2;
  inset: var(--label-y) var(--label-x) auto;
  pointer-events: none;
  color: #111b20;
  text-shadow: 0 1px 2px #ecf3f5c9;
}
.panel-top h1 {
  margin: 0;
  font: 600 var(--label-size)/1.05 "Songti SC", "SimSun", serif;
  letter-spacing: .14em;
}
:lang(en) .panel-top h1 {
  font-family: "Segoe UI", system-ui, sans-serif;
  letter-spacing: .015em;
}
.dial-language {
  position: absolute;
  z-index: 4;
  inset-block-start: calc(var(--label-y) + (var(--label-size) - 44px) / 2);
  inset-inline-end: var(--label-x);
  display: flex;
  align-items: center;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #10232b;
  font: 500 12px/1 "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  text-shadow: 0 1px 1px #f6faf56b;
}
.dial-language-icon {
  position: relative;
  inline-size: 14px;
  block-size: 14px;
  margin-inline-end: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}
.dial-language-icon::after {
  content: '';
  position: absolute;
  inset: -1px 3px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.dial-language label {
  position: relative;
  display: grid;
  min-inline-size: 34px;
  block-size: 44px;
  place-items: center;
  cursor: pointer;
}
.dial-language label + label::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  block-size: 11px;
  border-inline-start: 1px solid #17283240;
}
.dial-language label span { position: relative; }
.dial-language label[lang="en"] span { letter-spacing: .09em; }
.dial-language label:hover span,
.dial-language input:checked + span { color: #07171e; }
.dial-language input:checked + span { font-weight: 650; }
.dial-language input:checked + span::after {
  content: '';
  position: absolute;
  inset-block-end: -6px;
  inset-inline: 28%;
  border-block-end: 1px solid #842e3d;
}
.dial-language input:focus-visible + span {
  outline: 2px solid #611c2a;
  outline-offset: 5px;
  border-radius: 1px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#entry-hint {
  position: absolute;
  z-index: 2;
  left: var(--label-x);
  bottom: var(--hint-y);
  margin: 0;
  color: #17232b;
  text-shadow: 0 1px 3px #eff7facc, 0 0 12px #eef5f7ad;
  font-size: 12px;
  letter-spacing: .075em;
  pointer-events: none;
}
#dial::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: #10161e;
  opacity: 0;
  transition: opacity 170ms ease-out;
}
#dial.opening::after { opacity: .09; }
#chart-plane {
  position: fixed;
  inset: 0;
  z-index: 3;
  visibility: hidden;
  overflow: hidden;
  background: #10161e;
  will-change: opacity;
}
#chart-plane.visible { visibility: visible; }
#chart-plane[data-phase="ready"] { will-change: auto; }
#chart-plane iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
#entry-candle,
#moving-hand {
  position: fixed;
  z-index: 4;
  pointer-events: none;
}
#entry-candle::before,
#entry-candle::after {
  content: '';
  position: absolute;
  background: currentColor;
}
#entry-candle::before {
  width: var(--wick-width);
  height: 100%;
  left: 50%;
  translate: -50% 0;
}
#entry-candle::after {
  top: var(--body-top);
  height: var(--body-height);
  inset-inline: 0;
}
#arrival {
  position: fixed;
  z-index: 5;
  translate: -50% 0;
  padding: 5px 11px;
  border-radius: 6px;
  background: #1a252cde;
  color: #eef5f7;
  font-size: 12px;
  letter-spacing: .04em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}
#arrival:not(:empty) { opacity: 1; }
@media (orientation: portrait) {
  #dial {
    --label-x: clamp(29px, 9.2vw, 80px);
    --label-y: clamp(43px, 9.7dvh, 98px);
    --hint-y: clamp(37px, 8.7dvh, 94px);
  }
  #entry-hint { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  #dial::after, #arrival { transition: none; }
  #dial.opening::after { opacity: 0; }
}
