/* Timezone Converter — Apple-minimal, self-contained (shares the site's
   token values from app-style.css; tools with their own style.css do not
   get the shared sheet, so the tokens and the classes this page uses are
   duplicated here). */
:root {
  color-scheme: light;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  --canvas: #f5f5f7;
  --surface: #fff;
  --recessed: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #65656b;
  --line: rgb(0 0 0 / .06);
  --control-line: rgb(0 0 0 / .14);
  --selected: rgb(0 0 0 / .075);
  --accent: #0071e3;
  --accent-hover: #0065cc;
  --accent-ink: #fff;
  --motion: .2s cubic-bezier(.16, 1, .3, 1);
  color: var(--ink);
  background: var(--canvas);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #161618;
  --surface: #1e1e20;
  --recessed: #242426;
  --ink: #f5f5f7;
  --muted: #ababaf;
  --line: rgb(255 255 255 / .08);
  --control-line: rgb(255 255 255 / .19);
  --selected: rgb(255 255 255 / .10);
  --accent: #5aaaf9;
  --accent-hover: #7bbaff;
  --accent-ink: #101820;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; transition: background-color var(--motion), color var(--motion); }
main { width: min(896px, calc(100% - 32px)); margin: clamp(32px, 7vw, 80px) auto; }
h1 { font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 600; line-height: 1.12; letter-spacing: -.045em; margin: 16px 0 8px; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 0; }
h3 { font-size: 1rem; font-weight: 600; margin: 0; color: var(--ink); }
p { color: var(--muted); margin: 0; }
a { color: var(--ink); text-underline-offset: .2em; }
.subtitle { color: var(--ink); font-size: 1.05rem; font-weight: 500; }
.lede { margin-top: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 14px; }
.badges span { color: var(--muted); }
.panel { display: grid; gap: 24px; margin-block-start: 32px; border: 1px solid var(--line); border-radius: 24px; padding: clamp(16px, 4vw, 32px); background: var(--surface); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { min-width: 0; font-size: 14px; font-weight: 500; display: grid; gap: 8px; color: var(--ink); }
input, select { min-width: 0; width: 100%; color: inherit; background: var(--recessed); border: 1px solid var(--control-line); border-radius: 8px; font: inherit; padding: 8px 12px; min-height: 44px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; }
button { display: inline-flex; justify-content: center; align-items: center; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: 8px; min-height: 44px; font: inherit; font-size: 14px; font-weight: 500; padding: 8px 16px; text-decoration: none; cursor: pointer; transition: background-color var(--motion), transform var(--motion); }
button:not(:disabled):hover { background: var(--accent-hover); }
button:not(:disabled):active { transform: scale(.98); }
.secondary { color: var(--ink); background: var(--recessed); }
.secondary:not(:disabled):hover { background: var(--selected); }
.msg { min-height: 1.5em; font-size: 14px; }
/* Discreet brand line on every standalone app (Chan, 2026-11-27). */
.brand-line { text-align: center; color: var(--muted); font-size: 12.5px; letter-spacing: .14em; padding: 20px 0 28px; margin: 0; }
.note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 20px; }

/* ---------- result ---------- */
.result { text-align: center; padding: 8px 0 4px; }
.result-label { font-size: 14px; color: var(--muted); }
.result-time { font-size: clamp(3rem, 13vw, 4.5rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; color: var(--ink); }
.result-date { font-size: 1.05rem; font-weight: 500; color: var(--ink); margin-top: 4px; }
.result-zone { font-size: 14px; margin-top: 4px; }
.result-shift { font-size: 14px; margin-top: 2px; }

/* ---------- same moment ---------- */
.same-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.same-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--recessed); }
.same-list li b { color: var(--ink); font-weight: 600; }
.same-list li span { color: var(--muted); font-size: 14px; }
.same-list li .off { grid-column: 2; grid-row: 1; font-variant-numeric: tabular-nums; }

/* ---------- world clock ---------- */
.world-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.world-cell { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--recessed); }
.world-cell b { color: var(--ink); font-weight: 600; font-size: 14px; }
.world-time { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.world-meta { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields { grid-template-columns: 1fr; }
  .result-time { font-size: 3rem; }
}
