@charset "UTF-8";
:root {
  color-scheme: dark;
  --bg: #131514; --fg: #eee9de; --muted: #8d938b; --faint: #626a62;
  --card-top: #292d29; --card-bottom: #30342f; --seam: #121510; --edge: #464b43;
  --digit: #eee9db; --accent: #c3d3ac; --line: #333931; --panel: #1b1f1b;
  --glow: rgba(126, 142, 107, .10); --shadow: rgba(0, 0, 0, .4);
  --card-w: clamp(2.2rem, 10.4vw, 9rem); --card-h: calc(var(--card-w) * 1.44);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #eae7df; --fg: #2c332a; --muted: #656d60; --faint: #7c8375;
  --card-top: #30362d; --card-bottom: #394033; --seam: #20261e; --edge: #515847;
  --digit: #f1eddf; --accent: #50673d; --line: #cdcfc1; --panel: #e2e2d8;
  --glow: rgba(158, 175, 129, .2); --shadow: rgba(51, 58, 38, .18);
}
* { box-sizing: border-box; }
html { min-width: 280px; height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100%; color: var(--fg); background: radial-gradient(ellipse at 50% 44%, var(--glow), transparent 62%), var(--bg); font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif; transition: background-color .3s, color .3s; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .12; background-image: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(128, 128, 128, .08) 3px, rgba(128, 128, 128, .08) 4px); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.page { min-height: 100svh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 1800px; margin: auto; padding: max(32px, env(safe-area-inset-top)) max(40px, env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(40px, env(safe-area-inset-left)); }
.header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; font-size: 25px; font-weight: 600; letter-spacing: -.9px; }
.brand svg { width: 29px; height: 29px; color: var(--accent); }
.brand-dot { color: var(--accent); }
.local-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 9px; font-weight: 500; letter-spacing: 1.7px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px color-mix(in srgb, var(--accent) 20%, transparent); }
main { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 70px 0 85px; }
.clock-intro { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(25px, 5.5vh, 55px); color: var(--muted); }
.clock-intro p { margin: 0; font-size: 10px; letter-spacing: 3px; font-weight: 500; }
.intro-line { width: 24px; height: 1px; background: var(--line); }
.clock { display: flex; align-items: flex-start; justify-content: center; gap: clamp(7px, 1.6vw, 24px); user-select: none; font-variant-numeric: tabular-nums; }
.unit { display: flex; flex-direction: column; align-items: center; }
.digits { display: flex; gap: clamp(4px, .65vw, 10px); }
.digit { position: relative; width: var(--card-w); height: var(--card-h); border-radius: clamp(5px, .8vw, 10px); background: var(--seam); perspective: 700px; box-shadow: 0 2px 0 var(--seam), 0 5px 0 -1px var(--card-top), 0 7px 0 -1px var(--seam), 0 16px 26px -8px var(--shadow); }
.half { position: absolute; left: 0; width: 100%; height: 50%; overflow: hidden; color: var(--digit); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.half span { position: absolute; left: 0; width: 100%; height: var(--card-h); display: flex; justify-content: center; align-items: center; font-family: "Arial", "Helvetica Neue", sans-serif; font-size: calc(var(--card-w) * 1.21); font-weight: 600; letter-spacing: -.055em; padding-right: .045em; }
.top { top: 0; border-radius: clamp(5px, .8vw, 10px) clamp(5px, .8vw, 10px) 0 0; background: linear-gradient(180deg, var(--card-top), var(--card-top) 85%, var(--seam) 160%); box-shadow: inset 0 1px 0 var(--edge); }
.bottom { top: 50%; border-radius: 0 0 clamp(5px, .8vw, 10px) clamp(5px, .8vw, 10px); background: linear-gradient(180deg, var(--card-bottom), var(--card-top) 180%); }
.top span { top: 0; }
.bottom span { top: calc(var(--card-h) * -.5); }
.digit::after { content: ""; position: absolute; z-index: 5; top: calc(50% - 1px); left: 0; right: 0; height: 2px; background: var(--seam); box-shadow: 0 1px 0 rgba(255,255,255,.035); pointer-events: none; }
.hinge { position: absolute; z-index: 6; top: calc(50% - 4px); width: 3px; height: 8px; background: #171b15; border: 1px solid #3d4437; border-radius: 1px; }
.hinge.left { left: 0; } .hinge.right { right: 0; }
.flip-top { z-index: 3; transform-origin: center bottom; animation: fold-top 220ms cubic-bezier(.5,0,.9,.55) forwards; }
.flip-bottom { z-index: 4; transform-origin: center top; animation: fold-bottom 320ms cubic-bezier(.15,.45,.25,1) 220ms both; }
@keyframes fold-top { to { transform: rotateX(-90deg); filter: brightness(.55); } }
@keyframes fold-bottom { from { transform: rotateX(90deg); filter: brightness(.55); } to { transform: rotateX(0); filter: brightness(1); } }
.unit-label { margin-top: 25px; font-size: 9px; font-weight: 500; letter-spacing: 3px; color: var(--faint); padding-left: 3px; }
.separator { height: var(--card-h); display: flex; flex-direction: column; justify-content: center; gap: calc(var(--card-w) * .28); padding: 0 1px; }
.separator i { display: block; height: clamp(4px, .52vw, 7px); width: clamp(4px, .52vw, 7px); border-radius: 50%; background: var(--accent); opacity: .65; }
.date-line { display: flex; align-items: baseline; gap: 12px; margin-top: clamp(33px, 6vh, 55px); font-size: 14px; letter-spacing: .4px; color: var(--muted); }
#date { text-transform: capitalize; }
.date-dot { color: var(--faint); }
#year, #period { font-size: 12px; color: var(--faint); }
.footer { border-top: 1px solid var(--line); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-note { display: flex; align-items: flex-start; gap: 11px; font-size: 12px; color: var(--muted); }
.small-mark { color: var(--accent); font-size: 18px; line-height: 18px; }
.footer-note span#timezone { display: block; margin-top: 6px; font-size: 10px; color: var(--faint); letter-spacing: .2px; }
.controls { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 12px; padding: 5px; background: var(--panel); }
.controls button { border: 0; background: transparent; color: var(--muted); cursor: pointer; height: 36px; min-width: 39px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 7px; font-size: 11px; transition: background .2s, color .2s; }
.controls button:hover { color: var(--fg); background: var(--glow); }
.controls svg { width: 17px; height: 17px; }
.controls .icon-button { padding: 0 9px; }
.control-divider { width: 1px; height: 16px; background: var(--line); margin: 0 2px; }
.moon-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: none; }
.chrome { transition: opacity .5s, transform .5s; }
.is-idle .chrome { opacity: 0; pointer-events: none; }
.is-idle { cursor: none; }
.toast { position: fixed; bottom: 110px; left: 50%; transform: translate(-50%, 10px); padding: 12px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--fg); font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 40px); text-align: center; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.no-script { font-size: 14px; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }
@media (min-width: 1500px) { :root { --card-w: 9.8rem; } }
@media (max-width: 700px) {
  .page { padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom)); }
  .brand { font-size: 23px; gap: 9px; } .brand svg { width: 25px; height: 25px; }
  .local-status { font-size: 8px; letter-spacing: 1px; gap: 6px; }
  main { padding: 65px 0 70px; }
  .clock-intro p { font-size: 8px; letter-spacing: 2px; } .clock-intro { gap: 10px; margin-bottom: 32px; }
  .intro-line { width: 15px; } .unit-label { font-size: 7px; letter-spacing: 2px; margin-top: 20px; }
  .date-line { font-size: 12px; gap: 9px; margin-top: 35px; }
  .footer { padding-top: 20px; gap: 16px; } .footer-note { font-size: 11px; }
  .fullscreen-button span { display: none; } .controls { gap: 1px; padding: 4px; }
  .controls button { height: 36px; min-width: 35px; padding: 0 8px; }
}
@media (max-width: 370px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .local-status { font-size: 7px; letter-spacing: .6px; }
  .footer-note .small-mark { display: none; } .footer { gap: 8px; }
}
@media (max-width: 320px) { :root { --card-w: 10.1vw; } .clock { gap: 5px; } .footer-note { font-size: 10px; } }
@media (max-height: 500px) and (min-width: 600px) {
  :root { --card-w: min(9vw, 20vh); }
  .page { padding-top: 16px; padding-bottom: 14px; }
  .header .brand { font-size: 19px; } .header .brand svg { width: 23px; height: 23px; }
  main { padding: 15px 0 20px; } .clock-intro { display: none; }
  .unit-label { margin-top: 15px; } .date-line { margin-top: 15px; font-size: 12px; }
  .footer { padding-top: 12px; } .footer-note span#timezone { margin-top: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
