/* ==========================================================
   TimeRoom – site styles
   ========================================================== */
:root {
  --bg: #0b0f1a; --bg2: #0f1524; --panel: #131b2e; --panel2: #18223a;
  --text: #e8ecf6; --muted: #93a0bd; --line: rgba(255,255,255,.09);
  --accent: #5eead4; --accent2: #818cf8; --accent3: #f472b6;
  --radius: 16px; --shadow: 0 10px 30px rgba(0,0,0,.35);
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html { --cd-ink-1: #ffffff; --cd-ink-2: #f4f6ff; --cd-ink-3: #cfd8ff; }
html[data-site-theme="light"] {
  --cd-ink-1: #05070d; --cd-ink-2: #161d38; --cd-ink-3: #2c3a6e;
  --bg: #f6f7fb; --bg2: #eef0f7; --panel: #ffffff; --panel2: #f1f3fa;
  --text: #121826; --muted: #5b6785; --line: rgba(15,23,42,.1);
  --accent: #0d9488; --accent2: #4f46e5; --accent3: #db2777;
  --shadow: 0 10px 30px rgba(30,41,80,.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.tr-noscroll, html.tr-noscroll body { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
kbd { font: inherit; font-size: .72em; padding: 1px 6px; border-radius: 6px; border: 1px solid currentColor; opacity: .7; margin-left: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons / chips / inputs ---------- */
.btn, .chip, .icon-btn, select.chip {
  white-space: nowrap;
  font: inherit; cursor: pointer; color: var(--text); text-decoration: none;
  border: 1px solid var(--line); background: var(--panel2); border-radius: 12px;
  padding: 9px 14px; display: inline-flex; align-items: center; gap: 6px; line-height: 1.1;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #06121a; border-color: transparent; font-weight: 700; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(94,234,212,.28); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: var(--panel2); color: var(--text); font-weight: 500; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-danger { background: #ef4444; color: #fff; }
.chip:hover, .icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--accent); color: #06121a; border-color: transparent; font-weight: 700; }
.icon-btn { padding: 9px 12px; }
input[type=text], input[type=search], input[type=password], input[type=url], textarea, select {
  font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(94,234,212,.18); }
select.chip { width: auto; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.hdr { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* Logo: white parts use an ink gradient (white on dark, black on light). Hover → clock shows 6:00 */
.logo { display: block; height: 46px; width: auto; aspect-ratio: 1435 / 390; overflow: visible; }
.brand { --hm: -52.3deg; --hh: 54.5deg; --dm: 81.5px; --dh: 85.7px; }
.brand:hover, .brand:focus-visible { --hm: 0deg; --hh: 180deg; --dm: 70px; --dh: 60px; }
.cd-hm { transform: rotate(var(--hm)); stroke-dasharray: var(--dm) 999; transition: transform .75s cubic-bezier(.34,1.35,.5,1), stroke-dasharray .75s ease; }
.cd-hh { transform: rotate(var(--hh)); stroke-dasharray: var(--dh) 999; transition: transform .75s cubic-bezier(.34,1.35,.5,1), stroke-dasharray .75s ease; }
@media (prefers-reduced-motion: reduce) { .cd-hm, .cd-hh { transition: none; } }
.foot-brand .logo { height: 52px; }
@media (max-width: 480px) { .logo { height: 38px; } }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link { position: relative; font: inherit; background: none; border: 0; color: var(--text); padding: 10px 12px; cursor: pointer; text-decoration: none; border-radius: 10px; display: inline-flex; gap: 4px; align-items: center; }
.nav-link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; background: linear-gradient(90deg, var(--accent2), var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav-link:hover::after, .nav-link.is-active::after, .dd:focus-within > .nav-link::after { transform: scaleX(1); }
.caret { font-size: .7em; opacity: .7; transition: transform .2s; }
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 280px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; z-index: 60; }
.dd:hover .dd-menu, .dd.open .dd-menu, .dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd:hover .caret, .dd.open .caret { transform: rotate(180deg); }
.dd-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none; transition: background .15s, transform .15s; }
.dd-item:hover, .dd-item.is-active { background: var(--panel2); transform: translateX(3px); }
.dd-item strong { display: block; font-weight: 600; }
.dd-item small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.dd-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--panel2); font-size: 1.15rem; flex: none; transition: transform .25s; }
.dd-item:hover .dd-ico { transform: rotate(-8deg) scale(1.1); }
.nav-toggle { display: none; margin-left: auto; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; inset: 64px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100vh - 64px); overflow: auto; display: none; margin: 0; }
  .nav.open { display: flex; }
  .nav-link { padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; justify-content: space-between; width: 100%; }
  .nav-link::after { display: none; }
  .dd-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; display: none; padding: 4px 0 8px 8px; min-width: 0; }
  .dd.open .dd-menu { display: block; }
  .dd:hover .dd-menu { display: none; } .dd.open:hover .dd-menu { display: block; }
}


/* ---------- "Time zones" mega menu ---------- */
.dd-mega { position: relative; }
.mega { right: 0; left: auto; width: min(660px, 92vw); padding: 0; overflow: visible; min-height: 340px; }
.mega-list { list-style: none; margin: 0; padding: 8px 0; width: 270px; position: static; max-height: min(78vh, 600px); overflow-y: auto; overscroll-behavior: contain; }
.mega-item { position: static; padding: 0 8px; } /* side padding lives here (not on the list) so the hover area reaches the right-hand panel with no gap */
.mega-country { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px; text-decoration: none; transition: background .15s; }
.mega-country small { color: var(--muted); font-size: .76rem; }
.mega-nm { font-weight: 600; }
.mega-item:hover > .mega-country, .mega-item:focus-within > .mega-country, .mega-list:not(:hover):not(:focus-within) .mega-item:first-child > .mega-country { background: var(--panel2); }
.mega-more { display: none; }
/* panels are always laid out but hidden; showing is slightly delayed and hiding is lingering, so moving diagonally from a country to its time zones does not flip to another country on the way */
.mega-sub { display: block; visibility: hidden; opacity: 0; z-index: 1; transition: opacity .12s ease .6s, visibility 0s .72s; position: absolute; left: 270px; top: 0; bottom: 0; width: calc(100% - 270px); box-sizing: border-box; padding: 14px 16px; overflow: auto; border-left: 1px solid var(--line); background: var(--panel); border-radius: 0 14px 14px 0; }
.mega-item:hover > .mega-sub, .mega-item:focus-within > .mega-sub, .mega-list:not(:hover):not(:focus-within) .mega-item:first-child > .mega-sub { visibility: inherit; opacity: 1; z-index: 2; transition: opacity .12s ease .2s, visibility 0s .2s; } /* inherit (not visible): a panel must never be reachable while the whole menu is closed */
@keyframes megaIn { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
.mega-sub-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.mega-sub-h strong { font-size: 1.02rem; }
.mega-sub-h a { font-size: .82rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.mz { padding: 9px 0; border-top: 1px solid var(--line); }
.mz-t { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mz-n { font-weight: 600; font-size: .92rem; }
.mz-o { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.mz-c { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; }
.mz-c a { font-size: .84rem; color: var(--muted); text-decoration: none; }
.mz-c a:hover, .mz-c a:focus-visible { color: var(--accent); text-decoration: underline; }
.mega-all { display: block; padding: 10px 18px 12px; border-top: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .9rem; width: 270px; box-sizing: border-box; }
.mega-all:hover { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .mega-item:hover > .mega-sub { animation: none; } }
@media (max-width: 860px) {
  .mega { width: auto; padding: 0; }
  .mega-list { width: auto; padding: 0; max-height: none; }
  .mega-item { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 0; }
  .mega-country { padding: 11px 6px; }
  .mega-more { display: grid; place-items: center; width: 40px; height: 40px; background: none; border: 0; color: var(--text); font-size: 1.3rem; cursor: pointer; transition: transform .2s; }
  .mega-item.open > .mega-more { transform: rotate(90deg); }
  .mega-sub, .mega-item:hover > .mega-sub, .mega-list:not(:hover):not(:focus-within) .mega-item:first-child > .mega-sub { visibility: visible; opacity: 1; z-index: auto; transition: none; display: none; position: static; grid-column: 1 / -1; width: auto; border: 0; padding: 0 6px 8px 34px; background: none; animation: none; }
  .mega-item.open > .mega-sub, .mega-list .mega-item.open:first-child > .mega-sub, .mega-list:not(:hover):not(:focus-within) .mega-item.open:first-child > .mega-sub { display: block; }
  .mega-item:hover > .mega-country, .mega-list:not(:hover):not(:focus-within) .mega-item:first-child > .mega-country { background: none; }
  .mega-all { width: auto; padding: 12px 6px; border-top: 0; }
}

/* ---------- sections ---------- */
.section { padding: 44px 0 8px; } .section-last { padding-bottom: 70px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 1.5rem; }
.link-more { color: var(--accent); text-decoration: none; font-weight: 600; } .link-more:hover { text-decoration: underline; }
.page-head { padding: 36px 0 18px; } .page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.group-title { margin: 30px 0 14px; font-size: 1.2rem; color: var(--muted); font-weight: 600; }
.prose { max-width: 760px; } .prose p { color: var(--muted); }

/* ---------- tool cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tool-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "i t g" "i d g"; column-gap: 14px; align-items: center; padding: 16px; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.tool-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, var(--accent2), var(--accent), var(--accent3)); opacity: 0; transition: opacity .25s; z-index: 0; }
.tool-card > * { position: relative; z-index: 1; }
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.tool-card:hover::before { opacity: .14; }
.tc-icon { grid-area: i; width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.5rem; background: var(--panel2); border-radius: 14px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.tool-card:hover .tc-icon { transform: scale(1.12) rotate(-6deg); }
.tc-title { grid-area: t; font-weight: 700; } .tc-desc { grid-area: d; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.tc-go { grid-area: g; opacity: 0; transform: translateX(-6px); transition: .22s; color: var(--accent); font-weight: 700; }
.tool-card:hover .tc-go { opacity: 1; transform: none; }

/* ---------- tool page ---------- */
.tool-head { padding: 26px 0 8px; } .tool-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); display: flex; align-items: center; gap: 12px; margin-bottom: .2em; }
.th-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--panel2); font-size: 1.4rem; }
.crumbs { display: flex; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; } .crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--accent); }
.tool-body { padding: 14px 0 10px; }
.tool-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--bg2); }
.foot { display: grid; grid-template-columns: 1.2fr 2fr; gap: 30px; padding: 36px 0 20px; }
.foot-brand p { color: var(--muted); max-width: 320px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px; }
.foot-col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.foot-col a { display: block; text-decoration: none; padding: 4px 0; transition: color .15s, transform .15s; } .foot-col a:hover { color: var(--accent); transform: translateX(3px); }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
@media (max-width: 700px) { .foot { grid-template-columns: 1fr; } }

/* ==========================================================
   Clock stage
   ========================================================== */
.stage-wrap { padding: 22px 0 6px; }
.stage {
  --st-bg: radial-gradient(120% 120% at 20% 0%, #14305a 0%, #0a1226 55%, #060a16 100%);
  --st-fg: #eafcff; --st-glow: #38bdf8; --st-dim: #7f9cc0; --st-bar: #38bdf8; --st-panel: rgba(255,255,255,.07);
  position: relative; color: var(--st-fg); background: var(--st-bg); border-radius: 28px; border: 1px solid var(--line);
  min-height: min(76vh, 640px); display: flex; flex-direction: column; justify-content: space-between; padding: 22px; overflow: hidden;
  transition: background .5s ease;
}
.stage[data-theme="neon"]    { --st-bg: radial-gradient(100% 100% at 50% 0%, #06200f 0%, #020805 70%); --st-fg: #b6ffcf; --st-glow: #22ff7a; --st-dim: #4a9a68; --st-bar: #22ff7a; }
.stage[data-theme="amber"]   { --st-bg: radial-gradient(100% 100% at 50% 0%, #2a1500 0%, #0d0700 70%); --st-fg: #ffd9a0; --st-glow: #ff9d1c; --st-dim: #a8742f; --st-bar: #ff9d1c; }
.stage[data-theme="sunset"]  { --st-bg: linear-gradient(160deg, #3b0764 0%, #be185d 55%, #f97316 100%); --st-fg: #fff7ed; --st-glow: #fb7185; --st-dim: #fcd5c0; --st-bar: #fde68a; }
.stage[data-theme="ice"]     { --st-bg: linear-gradient(160deg, #f8fbff 0%, #dbeafe 100%); --st-fg: #0f2547; --st-glow: transparent; --st-dim: #54709a; --st-bar: #2563eb; --st-panel: rgba(15,37,71,.07); }
.stage[data-theme="mono"]    { --st-bg: #000; --st-fg: #fff; --st-glow: transparent; --st-dim: #8a8a8a; --st-bar: #fff; }

.stage-top, .stage-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; transition: opacity .5s ease; }
.place { display: flex; gap: 10px; align-items: center; min-width: 0; }
.place h1 { margin: 0; font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 700; }
.place-status { margin: 0; font-size: .8rem; color: var(--st-dim); min-height: 1.1em; }
.stage-search { display: flex; gap: 8px; align-items: center; }
.stage-search input { width: 220px; background: var(--st-panel); border-color: transparent; color: inherit; }
.stage-search input::placeholder { color: var(--st-dim); }
.stage .btn-ghost, .stage .chip, .stage select.chip { background: var(--st-panel); color: var(--st-fg); border-color: transparent; }
.stage .chip[aria-pressed="true"] { background: var(--st-fg); color: #000; }
.stage[data-theme="ice"] .chip[aria-pressed="true"] { background: #0f2547; color: #fff; }
.stage .btn { background: var(--st-fg); color: #000; } .stage[data-theme="ice"] .btn { background: #0f2547; color: #fff; }
.stage select.chip option { color: #000; }
.ctrl-group { display: flex; gap: 6px; } .stage-bottom { row-gap: 10px; }
.swatches .sw { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .15s; }
.swatches .sw:hover { transform: scale(1.18); } .swatches .sw[aria-pressed="true"] { border-color: var(--st-fg); box-shadow: 0 0 0 2px var(--st-bg); }

.stage-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px 0; min-width: 0; }
.clock { display: flex; align-items: baseline; justify-content: center; white-space: nowrap; line-height: 1; font-weight: 700; font-size: 120px; color: var(--st-fg); text-shadow: 0 0 .1em color-mix(in srgb, var(--st-glow) 28%, transparent), 0 0 .32em color-mix(in srgb, var(--st-glow) 10%, transparent); -webkit-font-smoothing: antialiased; max-width: 100%; }
.stage[data-font="digital"] .clock { font-family: "Orbitron", "Share Tech Mono", ui-monospace, monospace; font-weight: 700; }
.stage[data-font="clean"] .clock   { font-family: var(--font); font-weight: 500; letter-spacing: -.02em; }
.stage[data-font="mono"] .clock    { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 500; }
.clock .d { display: inline-block; text-align: center; min-width: .66em; }
.stage[data-font="clean"] .clock .d { min-width: .6em; }
.clock .s { display: inline-block; min-width: .32em; text-align: center; opacity: .75; animation: blink 1s steps(2, jump-none) infinite; }
.clock .ap { font-size: .22em; margin-left: .35em; opacity: .85; font-weight: 700; letter-spacing: .04em; }
.clock .d.tick { animation: pop .38s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { transform: translateY(-14%); opacity: .25; } to { transform: none; opacity: 1; } }
@keyframes blink { 50% { opacity: .25; } }
.date-line { margin-top: 18px; font-size: clamp(1rem, 2.4vw, 1.6rem); font-weight: 500; }
.sync-line { margin-top: 4px; color: var(--st-dim); font-size: clamp(.7rem, 1.3vw, .85rem); opacity: .85; }
.sync-line[data-state="on"] { color: var(--st-glow); }
.tz-line { margin-top: 6px; color: var(--st-dim); font-size: clamp(.8rem, 1.6vw, 1rem); }
.day-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--st-panel); }
.day-progress span { display: block; height: 100%; width: 0; background: var(--st-bar); box-shadow: 0 0 12px var(--st-bar); transition: width 1s linear; }

/* full screen (real or pseudo) */
.stage.is-fs, .stage.tr-pseudo-fs { width: 100vw; height: 100vh; min-height: 0; border-radius: 0; border: 0; padding: 26px 30px; }
.stage.is-fs .place h1 { font-size: clamp(1.2rem, 2.6vw, 2rem); }
.tr-pseudo-fs { position: fixed; inset: 0; z-index: 9999; }
.tr-idle { cursor: none; }
.tr-idle .tr-hide-on-idle { opacity: 0; pointer-events: none; }

/* ---------- world clocks ---------- */
.world-add { display: flex; gap: 8px; } .world-add input { width: 220px; }
.world-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.world-grid:empty { min-height: 266px; } /* reserved until JS adds the city cards, so the page below does not jump */
.w-card { position: relative; text-align: left; font: inherit; color: var(--text); cursor: pointer; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.w-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.w-card.is-main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.w-name { display: flex; align-items: center; gap: 8px; font-weight: 600; } .w-name .fl { font-size: 1.15rem; }
.w-time { font-family: "Orbitron", ui-monospace, monospace; font-size: 1.7rem; font-weight: 700; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.w-time small { font-size: .5em; margin-left: 4px; color: var(--muted); }
.w-sub { color: var(--muted); font-size: .8rem; }
.w-x { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--panel2); color: var(--muted); cursor: pointer; opacity: 0; transition: .15s; line-height: 1; }
.w-card:hover .w-x, .w-x:focus-visible { opacity: 1; } .w-x:hover { background: #ef4444; color: #fff; }

@media (max-width: 640px) {
  .stage { padding: 16px; border-radius: 22px; min-height: 70vh; }
  .stage-search input { width: 100%; } .stage-search { width: 100%; }
  .world-add input { width: 100%; } .world-add { width: 100%; }
}

/* ==========================================================
   Admin
   ========================================================== */
.admin .container { width: min(1100px, 100% - 32px); }
.admin-bar { background: var(--bg2); border-bottom: 1px solid var(--line); }
.admin-bar .container { display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap; }
.admin-bar .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 18px 0; }
.card h2 { font-size: 1.15rem; }
.alert { padding: 12px 16px; border-radius: 12px; margin: 16px 0; border: 1px solid; }
.alert.ok { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.4); }
.alert.err { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.45); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table .ico { font-size: 1.3rem; } .table .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.table form { display: inline; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75rem; border: 1px solid var(--line); background: var(--panel2); }
.pill.on { background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.4); } .pill.off { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); }
.btn-sm { padding: 6px 10px; font-size: .85rem; border-radius: 9px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; } .field.full { grid-column: 1 / -1; }
.field > label { font-weight: 600; font-size: .9rem; } .field .hint { color: var(--muted); font-size: .8rem; }
.field textarea { min-height: 380px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.5; tab-size: 2; white-space: pre; }
.checks { display: flex; gap: 22px; flex-wrap: wrap; } .checks label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); }
.login-box { max-width: 420px; margin: 9vh auto; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; background: var(--panel2); padding: 2px 6px; border-radius: 6px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } .table .hide-m { display: none; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ==========================================================
   Mobile polish
   ========================================================== */
html { -webkit-tap-highlight-color: transparent; }
.stage, .btn, .chip, .icon-btn, .w-card, .nav-link { touch-action: manipulation; }
.icon-btn { font-size: 1.1rem; }

/* stacked clock (portrait full screen): hours / minutes / seconds on separate lines */
.clock.stacked { flex-wrap: wrap; align-content: center; justify-content: center; }
.clock.stacked .s { flex: 0 0 100%; height: 0; min-width: 0; overflow: hidden; font-size: 0; animation: none; }
.clock.stacked .ap { flex: 0 0 100%; text-align: center; margin: .35em 0 0; }

/* full screen on phones: dynamic viewport height + notch safe areas */
.stage.is-fs, .stage.tr-pseudo-fs {
  height: 100vh; height: 100dvh;
  padding: max(22px, env(safe-area-inset-top)) max(26px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(26px, env(safe-area-inset-left));
}
.tr-pseudo-fs { height: 100dvh; }

/* touch screens: comfortable tap targets, no hover-only controls */
@media (pointer: coarse) {
  .btn, .chip, .icon-btn, select.chip { min-height: 44px; }
  .btn-sm { min-height: 40px; padding: 8px 12px; }
  .brand { min-height: 44px; }
  .swatches { gap: 8px; } .swatches .sw { width: 36px; height: 36px; }
  .foot-col a { padding: 10px 0; }
  .foot-bottom a { display: inline-block; padding: 10px 6px; }
  .crumbs a { display: inline-block; padding: 8px 2px; }
  .dd-item { padding: 12px 10px; }
  .w-x { opacity: 1; width: 34px; height: 34px; top: 6px; right: 6px; font-size: 1.2rem; }
  .w-card .w-name { padding-right: 32px; }
  input[type=text], input[type=search], input[type=password], input[type=url], select { min-height: 46px; }
}

@media (max-width: 860px) { .nav { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); } }

@media (max-width: 640px) {
  .container { width: min(1180px, 100% - 24px); }
  .section { padding-top: 32px; }
  .world-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .w-card { padding: 12px; }
  .w-time { font-size: 1.3rem; }
  .w-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .w-sub { font-size: .74rem; }
  .tool-panel { padding: 18px; border-radius: 18px; }
  .stage-bottom .btn { flex: 1 1 100%; justify-content: center; }
  .stage-bottom kbd { display: none; }
}

/* admin tool list becomes cards on phones */
@media (max-width: 760px) {
  .table thead { display: none; }
  .table, .table tbody { display: block; }
  .table tr { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .table td { display: block; padding: 0; border: 0; }
  .table td.hide-m { display: none; }
  .table td.t-acts { grid-column: 1 / -1; }
  .table td.t-acts .acts { justify-content: flex-start; }
  .code { word-break: break-all; }
  .admin-bar .sp { margin-left: 0; width: 100%; }
}

/* keep two-column world clocks inside the screen on very narrow phones */
@media (max-width: 640px) {
  .world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w-card { min-width: 0; }
  .w-x { width: 36px; height: 36px; }
}

/* ---- folder-system additions ---- */
.dd-all { display: block; margin-top: 6px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 600; text-decoration: none; border-radius: 0 0 10px 10px; }
.dd-all:hover { text-decoration: underline; }
.group-title a { text-decoration: none; color: inherit; } .group-title a:hover { color: var(--accent); }
.foot-col h3 a { text-decoration: none; color: inherit; display: inline; padding: 0; } .foot-col h3 a:hover { color: var(--accent); transform: none; }

/* Clean look: the pin, the time-zone line and the sync status stay hidden (they still work in the background).
   Delete this block if you ever want them back. */
.place-pin, .tz-line, .sync-line { display: none !important; }

/* City search dropdown */
.ac-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
.ac-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); min-width: 260px; max-height: 340px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); text-align: left; }
.ac-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.ac-list li[aria-selected="true"] { background: var(--panel2); }
.ac-fl { font-size: 1.15rem; } .ac-n { font-weight: 600; } .ac-c { margin-left: auto; color: var(--muted); font-size: .85rem; }
.ac-list .ac-none { color: var(--muted); cursor: default; }
.ac-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ac-c { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
@media (max-width: 640px) { .ac-list { right: auto; width: min(340px, calc(100vw - 56px)); min-width: 0; } .stage-search .ac-wrap, .world-add .ac-wrap { flex: 1; } }

/* ---------- city / country pages ---------- */
.place .place-name { margin: 0; font-size: clamp(1.05rem, 2.2vw, 1.45rem); font-weight: 700; line-height: 1.2; }
.stage.is-fs .place .place-name { font-size: clamp(1.2rem, 2.6vw, 2rem); }
.section-tight { padding-block: 18px; }
.page-h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 6px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.fact { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.fact-k { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fact strong { font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.fact-s { color: var(--muted); font-size: .88rem; }
.dtable { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); margin-top: 10px; }
.dtr { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; align-items: center; padding: 12px 16px; text-decoration: none; border-top: 1px solid var(--line); min-height: 48px; }
.dtr:first-child, .dtr[hidden] + .dtr { border-top: 0; }
a.dtr:hover { background: var(--panel2); }
.dtd-n small { display: block; color: var(--muted); font-size: .8rem; }
.dtd-t { font-variant-numeric: tabular-nums; font-weight: 600; }
.dtd-d { color: var(--muted); text-align: right; font-size: .92rem; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.zone-card { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.zone-t { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.zone-n { margin-top: 6px; font-weight: 600; } .zone-s { color: var(--muted); font-size: .88rem; }
.zone-c { margin-top: 8px; font-size: .9rem; } .zone-c a { color: var(--accent2); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chip-link { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; min-height: 44px; transition: transform .2s, border-color .2s; }
.chip-link small { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; display: inline-block; min-width: 5.6em; } /* reserved width: the live time is filled in by JS, so the pills must not resize */
.chip-link:hover { transform: translateY(-2px); border-color: var(--accent); }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; margin-top: 10px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 14px; color: var(--muted); }
.ad-wrap { margin: 18px 0; min-height: 100px; text-align: center; overflow: hidden; }
.ad-label { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
@media (max-width: 560px) {
  .dtr { grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); row-gap: 2px; }
  .dtd-d { grid-column: 1 / -1; text-align: left; }
  .chip-link { padding: 9px 12px; }
}
.chips + .section-head { margin-top: 30px; }

/* ---------- Time zones menu, desktop: the country panel follows a short "hover intent" (set in site.js) so moving the mouse
   diagonally towards the right-hand panel never flips to another country on the way. Phone layout is not touched. ---------- */
@media (min-width: 861px) {
  .mega.mega-js .mega-sub { display: block; visibility: hidden; opacity: 0; z-index: 1; transition: none; animation: none; }
  .mega.mega-js .mega-item.is-active > .mega-sub { visibility: inherit; opacity: 1; z-index: 2; animation: megaIn .16s ease; }
  .mega.mega-js .mega-item:hover:not(.is-active) > .mega-sub,
  .mega.mega-js .mega-item:focus-within:not(.is-active) > .mega-sub,
  .mega.mega-js .mega-list:not(:hover):not(:focus-within) .mega-item:first-child:not(.is-active) > .mega-sub { visibility: hidden; opacity: 0; z-index: 1; }
  .mega.mega-js .mega-item:hover:not(.is-active) > .mega-country,
  .mega.mega-js .mega-item:focus-within:not(.is-active) > .mega-country,
  .mega.mega-js .mega-list:not(:hover):not(:focus-within) .mega-item:first-child:not(.is-active) > .mega-country { background: none; }
  .mega.mega-js .mega-item.is-active > .mega-country { background: var(--panel2); }
}

/* ---------- time zone converter ---------- */
.cv-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cv-row { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr); gap: 14px; align-items: start; }
.cv label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.cv input[type="text"], .cv input[type="date"], .cv input[type="time"] { width: 100%; font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; min-height: 46px; color-scheme: dark; }
html[data-site-theme="light"] .cv input { color-scheme: light; }
.cv input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cv-from-box { display: flex; align-items: center; gap: 8px; } .cv-from-box .cv-ac { flex: 1; }
.cv-flag { font-size: 1.5rem; line-height: 1; }
.cv-when-row { display: flex; gap: 8px; align-items: center; } .cv-when-row input[type="date"] { flex: 1.3; } .cv-when-row input[type="time"] { flex: 1; min-width: 0; }
.cv-tz { margin-top: 6px; min-height: 1.3em; }
.cv-swap { align-self: center; margin-top: 18px; font-size: 1.2rem; }
.cv-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cv-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin: 16px 0; }
.cv-empty, .cv-legend { grid-column: 1 / -1; margin: 0; }
.cv-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.cv-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.cv-place { display: flex; gap: 10px; align-items: center; min-width: 0; } .cv-place > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cv-place strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cv-place .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-card-acts { display: flex; gap: 4px; flex: none; }
.cv-big { font-size: clamp(2rem, 6vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.cv-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .92rem; margin-top: 2px; }
.cv-badge { font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); }
.cv-badge.shift { background: rgba(244,114,182,.15); border-color: var(--accent3); }
.cv-strip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; margin-top: 12px; }
.cv-strip i { height: 26px; border-radius: 4px; position: relative; font-style: normal; background: var(--panel2); }
.cv-strip i b { position: absolute; left: 0; right: 0; bottom: -17px; text-align: center; font-size: .56rem; font-weight: 600; color: var(--muted); }
.cv-strip { margin-bottom: 18px; }
.cv-strip .w { background: var(--accent); opacity: .85; } .cv-strip .d { background: var(--accent2); opacity: .5; } .cv-strip .n { background: var(--panel2); border: 1px solid var(--line); }
.cv-strip .now { outline: 2px solid var(--text); outline-offset: 1px; opacity: 1; z-index: 1; }
.cv-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 10px; } .cv-legend .lg:first-child { margin-left: 0; }
.cv-legend .lg.w { background: var(--accent); } .cv-legend .lg.d { background: var(--accent2); opacity: .6; } .cv-legend .lg.n { background: var(--panel2); border: 1px solid var(--line); }
.cv-add { margin-bottom: 8px; } .cv-add-row { max-width: 520px; }
.cv-quick { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); }
.cv-q { font: inherit; font-size: .82rem; cursor: pointer; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; min-height: 36px; } .cv-q:hover { border-color: var(--accent); }
.cv-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cv-table th, .cv-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.cv-table th { color: var(--muted); font-size: .8rem; font-weight: 600; } .cv-table td small { color: var(--accent3); font-weight: 600; margin-left: 6px; }
.cv-table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; padding: 6px 4px; }
.cv-lead { font-size: 1.05rem; max-width: 780px; } .cv-lead strong { color: var(--text); }
.cv-now2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 14px 0; }
.cv-now2 > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cv-now2 .k { color: var(--muted); font-size: .8rem; font-weight: 600; } .cv-now2 .v { display: block; font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0; }
@media (max-width: 760px) { .cv-row { grid-template-columns: 1fr; } .cv-swap { margin: 0; justify-self: start; } .cv-when-row { flex-wrap: wrap; } .cv-when-row input[type="date"] { flex: 1 1 100%; } .cv-when-row input[type="time"] { flex: 1 1 120px; } }

/* ---------- /clock : only the clock, covering the whole browser window ---------- */
.page-clock .site-header, .page-clock .site-footer { display: none; }
.page-clock main, .page-clock .stage-wrap { padding: 0; margin: 0; }
.page-clock .stage-wrap .container { width: 100%; max-width: none; margin: 0; }
.page-clock .stage { width: 100%; min-height: 100vh; min-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; padding: 26px 30px; }
.stage-home { --hm: 62deg; --hh: -55deg; display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; margin-right: 14px; border-radius: 14px; flex: none; text-decoration: none;
  color: var(--st-fg); background: var(--st-panel); border: 1px solid color-mix(in srgb, var(--st-fg) 22%, transparent); opacity: .92; transition: background .2s, border-color .2s, transform .2s; }
.stage-home:hover, .stage-home:focus-visible { --hm: 0deg; --hh: 180deg; opacity: 1; border-color: var(--st-fg); transform: translateY(-1px); }
.stage-home .sh-face { fill: color-mix(in srgb, var(--st-fg) 14%, transparent); }
.sh-hm, .sh-hh { transform-box: view-box; transform-origin: 32px 40px; transition: transform .75s cubic-bezier(.34,1.35,.5,1); }
.sh-hm { transform: rotate(var(--hm)); } .sh-hh { transform: rotate(var(--hh)); }
@media (prefers-reduced-motion: reduce) { .sh-hm, .sh-hh { transition: none; } }
.stage-top .place { flex: 1 1 auto; min-width: 0; } .stage-home + .place { flex: 1 1 0; }

/* ---------- meeting planner: plain day bars + one draggable selection ---------- */
.mp-wrap { --mp-w: color-mix(in srgb, var(--accent) 38%, var(--panel)); --mp-e: color-mix(in srgb, var(--accent) 13%, var(--panel)); --mp-n: var(--panel2); margin: 16px 0 8px; border-radius: 16px; padding: 16px; background: var(--panel); border: 1px solid var(--line); }
.mp-board { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 16px; }
.mp-labels, .mp-tracks { display: flex; flex-direction: column; gap: 8px; }
.mp-axis-sp, .mp-axis { height: 22px; }
.mp-lab { height: 48px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.mp-lab .cv-flag { font-size: 1.4rem; }
.mp-lab > div { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.mp-lab strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; }
.mp-lab small { color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-acts { margin-left: auto; display: flex; gap: 3px; opacity: .5; transition: opacity .15s; } .mp-lab:hover .mp-acts, .mp-acts:focus-within { opacity: 1; }
.mp-x { font: inherit; font-size: .8rem; cursor: pointer; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 8px; width: 28px; height: 28px; padding: 0; } .mp-x:hover { border-color: var(--accent); }
.mp-tracks { position: relative; touch-action: pan-y; cursor: ew-resize; outline: none; user-select: none; -webkit-user-select: none; }
.mp-tracks:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.mp-axis { position: relative; font-size: .7rem; font-weight: 600; color: var(--muted); } .mp-axis span { position: absolute; top: 4px; transform: translateX(-2px); }
.mp-strip { position: relative; height: 48px; border-radius: 8px; border: 1px solid var(--line); background-clip: padding-box; }
.mp-band { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 1; border-radius: 8px; }
.mp-band.r1 { box-shadow: inset 0 0 0 1px var(--muted); opacity: .55; }
.mp-band.r2 { box-shadow: inset 0 0 0 2px var(--accent); }
.mp-lens { position: absolute; top: -2px; bottom: -2px; z-index: 3; pointer-events: none; border-radius: 8px; background: color-mix(in srgb, var(--text) 8%, transparent); border: 2px solid var(--text); transition: left .12s ease-out; }
.mp-tracks.drag .mp-lens { transition: none; }
.mp-lens span { display: none; }
.mp-mark { position: absolute; top: 50%; z-index: 4; transform: translate(-50%, -50%); padding: 2px 8px; border-radius: 6px; background: var(--bg); color: var(--text); border: 1px solid var(--line); font-size: .78rem; white-space: nowrap; transition: left .12s ease-out; }
.mp-tracks.drag .mp-mark { transition: none; }
.mp-mark b { font-variant-numeric: tabular-nums; } .mp-mark em { font-style: normal; font-size: .62rem; color: var(--muted); font-weight: 700; margin-left: 4px; }
.mp-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.mp-legend .lg { display: inline-block; width: 16px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 6px; border: 1px solid var(--line); }
.mp-legend .lg.w { background: color-mix(in srgb, var(--accent) 38%, var(--panel)); } .mp-legend .lg.e { background: color-mix(in srgb, var(--accent) 13%, var(--panel)); } .mp-legend .lg.n { background: var(--panel2); } .mp-legend .lg.g { background: transparent; border: 2px solid var(--accent); }
.mp-chip { font: inherit; font-size: .88rem; cursor: pointer; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; min-height: 40px; } .mp-chip:hover { border-color: var(--accent); }
.mp-sum li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); }
.mp-sum li > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; } .mp-sum li small { color: var(--muted); }
@media (max-width: 760px) { .mp-bar { grid-template-columns: 1fr; } .mp-board { grid-template-columns: 104px minmax(0, 1fr); gap: 10px; } .mp-wrap { padding: 12px; } .mp-lab small { display: none; } .mp-lab .cv-flag { font-size: 1.2rem; } .mp-lab strong { font-size: .88rem; } .mp-acts { opacity: 1; gap: 2px; } .mp-x { width: 24px; height: 24px; font-size: .72rem; } .mp-lab { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .mp-lens, .mp-mark { transition: none; } }

.mp-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px 18px; align-items: end; }
.mp-bar .cv-tools { grid-column: 1 / -1; margin-top: 0; }
.mp input[type="text"], .mp input[type="date"] { width: 100%; font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; min-height: 46px; color-scheme: dark; }
html[data-site-theme="light"] .mp input { color-scheme: light; }
.mp label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.mp-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; } .mp-two .cv-panel h3 { font-size: 1.05rem; }
.mp-kind { margin: 0 0 10px; font-weight: 600; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-sum { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.mp-sum li > b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* ---------- footer: one tidy row of four columns ---------- */
.foot { grid-template-columns: minmax(200px, .8fr) 3fr; gap: 40px; align-items: start; }
.foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; align-items: start; }
.foot-col h3 { margin: 0 0 8px; }
.foot-col a { font-size: .93rem; padding: 3px 0; }
.foot-col a.foot-more { color: var(--accent); font-weight: 600; margin-top: 4px; }
@media (max-width: 800px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .foot { grid-template-columns: 1fr; gap: 20px; } .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .foot-col a { font-size: .88rem; } .foot-cols { gap: 14px 18px; } }

/* ---------- home page: calm, even grids ---------- */
.page-home .chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.page-home .chip-link { border-radius: 16px; justify-content: space-between; padding: 12px 16px; min-height: 52px; }
.page-home .chip-link small { min-width: 0; text-align: right; }
.page-home .world-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.page-home .world-grid:empty { min-height: 300px; }
.page-home .section-head { margin-bottom: 20px; }
@media (max-width: 900px) { .page-home .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } .page-home .world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .page-home .chip-link { padding: 10px 12px; gap: 6px; font-size: .92rem; } .page-home .chip-link small { font-size: .78rem; } }
.page-home .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .page-home .tool-grid { grid-template-columns: 1fr; } }
.page-home .chip-link > span, .page-home .chip-link small { white-space: nowrap; }
@media (max-width: 420px) { .page-home .chip-link { padding: 10px 10px; gap: 4px; font-size: .86rem; } .page-home .chip-link small { font-size: .72rem; } }

/* ---------- country page: city cards ---------- */
.city-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.city-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n d" "t t"; gap: 6px 10px; align-items: baseline; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.city-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cc-n { grid-area: n; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-d { grid-area: d; font-size: .74rem; color: var(--muted); white-space: nowrap; }
.cc-t { grid-area: t; font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .city-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .city-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .city-card { padding: 12px; } .cc-t { font-size: 1.2rem; } }

.mp-why { margin: 0 0 12px; }
.mp-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; line-height: 1.3; padding: 10px 14px; }
.mp-chip span { font-variant-numeric: tabular-nums; } .mp-chip em { font-style: normal; color: var(--muted); font-size: .78rem; display: inline-block; min-width: 74px; }

/* ---------- city page: time difference cards ---------- */
.diff-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.diff-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.diff-card[hidden] { display: none; }
a.diff-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.diff-you { border-color: var(--accent); }
.dc-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dc-n small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.dc-t { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dc-d { font-size: .82rem; color: var(--muted); }
@media (max-width: 1000px) { .diff-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .diff-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .diff-card { padding: 12px; } .dc-t { font-size: 1.2rem; } }

/* ---------- menu: compact dropdowns ---------- */
.dd-compact { min-width: 210px; padding: 6px; }
.dd-compact .dd-item { padding: 8px 10px; gap: 10px; }
.dd-compact .dd-item strong { font-size: .93rem; }
.dd-compact .dd-ico { width: 26px; height: 26px; font-size: 1rem; }
.dd-cat { display: block; padding: 8px 10px 2px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dd-compact .dd-all { margin-top: 4px; padding: 8px 10px; font-size: .88rem; }
.mega { min-height: 0; width: min(600px, 92vw); }
.mega-country { padding: 6px 10px; }
.mega-nm { font-size: .93rem; }
.mega-country small { font-size: .72rem; }
.mega-sub { padding: 10px 14px; }
.mz { padding: 6px 0; }
.mz-n { font-size: .9rem; }
.mz-c a { font-size: .8rem; }
.mega-all { padding: 8px 18px 10px; font-size: .86rem; }
.dd-compact { min-width: 240px; } .dd-compact .dd-item strong { white-space: nowrap; }
