/* Night Shift themes — the lead colour. html[data-theme] beats each page's :root defaults. */
html[data-theme="amber"]  { --lead: #FFB23E; --lead-hi: #FFE2B0; --lead-rgb: 255, 178, 62;  --accent-ink: #8A4B00; }
html[data-theme="blue"]   { --lead: #5B9BFF; --lead-hi: #D3E3FF; --lead-rgb: 91, 155, 255;  --accent-ink: #1F4FB5; }
html[data-theme="violet"] { --lead: #A68BFF; --lead-hi: #E3DAFF; --lead-rgb: 166, 139, 255; --accent-ink: #5A3BC2; }
html[data-theme="mint"]   { --lead: #3EE6B0; --lead-hi: #C8FBEA; --lead-rgb: 62, 230, 176;  --accent-ink: #0B6E4F; }
html[data-theme="coral"]  { --lead: #FF7A66; --lead-hi: #FFD6CF; --lead-rgb: 255, 122, 102; --accent-ink: #A8321F; }

/* smooth recolour when switching */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: color .5s ease, background-color .5s ease, border-color .5s ease, box-shadow .5s ease, fill .5s ease, stroke .5s ease !important;
}

/* picker */
.tp { position: fixed; left: clamp(12px, 2vw, 24px); bottom: 22px; z-index: 180; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.tp-btn { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(10,12,20,.78); color: #EDEAE3; font: inherit; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.tp-btn:hover { border-color: var(--lead); }
.tp-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--lead); box-shadow: 0 0 14px rgba(var(--lead-rgb), .7); }
.tp-panel { position: absolute; left: 0; bottom: calc(100% + 10px); width: 230px; padding: 14px; border-radius: 18px; background: rgba(10,12,20,.94); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 50px rgba(0,0,0,.5); color: #EDEAE3; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s, transform .3s cubic-bezier(.16,1,.3,1); }
.tp.open .tp-panel { opacity: 1; transform: none; pointer-events: auto; }
.tp-h { margin: 0 0 10px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #A6A9B6; }
.tp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tp-opt { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 10px; border-radius: 12px; border: 1px solid transparent; background: none; color: inherit; font: inherit; font-size: 12px; letter-spacing: .06em; cursor: pointer; text-align: left; }
.tp-opt:hover, .tp-opt:focus-visible { background: rgba(255,255,255,.07); outline: none; }
.tp-opt[aria-checked="true"] { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.tp-sw { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.tp-opt[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--lead); }
body.is-day .tp-btn { background: rgba(20,21,26,.85); }
@media (max-width: 600px) { .tp-btn span:last-child { display: none; } .tp-btn { padding: 8px; } }

/* mobile menu */
.mm-btn { display: none; position: relative; width: 44px; height: 44px; margin-left: 10px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(10,12,20,.6); cursor: pointer; z-index: 2; }
.mm-btn i { position: absolute; left: 13px; right: 13px; height: 2px; background: #EDEAE3; transition: transform .35s cubic-bezier(.16,1,.3,1), top .35s; }
.mm-btn i:first-child { top: 17px; } .mm-btn i:last-child { top: 25px; }
body.mm-open .mm-btn i:first-child { top: 21px; transform: rotate(45deg); }
body.mm-open .mm-btn i:last-child { top: 21px; transform: rotate(-45deg); }
.mm { position: fixed; inset: 0; z-index: 95; background: rgba(7,8,13,.97); display: flex; align-items: center; padding: 100px 24px 40px; opacity: 0; pointer-events: none; transition: opacity .35s; }
.mm nav { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.mm a { font-family: 'Inter Tight', system-ui, sans-serif; font-weight: 800; font-size: 40px; letter-spacing: -0.03em; color: #EDEAE3; text-decoration: none; padding: 6px 0; transform: translateY(16px); transition: transform .5s cubic-bezier(.16,1,.3,1), color .3s; }
.mm a:hover { color: var(--lead); }
.mm .mm-book { margin-top: 18px; font-size: 22px; color: var(--lead); }
body.mm-open .mm { opacity: 1; pointer-events: auto; }
body.mm-open .mm a { transform: none; }
body.mm-open { overflow: hidden; }
@media (max-width: 960px) { .mm-btn { display: block; } }

/* small phones: keep the nav on one line */
@media (max-width: 600px) {
  .nav { gap: 10px; }
  .brand { white-space: nowrap; font-size: 18px; }
  .nav-cta { white-space: nowrap; padding: 10px 14px; font-size: 14px; margin-left: auto; }
  .nav-clock { display: none; }
  .mm-btn { margin-left: 0; flex: none; }
}

/* closed panels are not focusable (review fix 2026-11-06) */
.tp-panel { visibility: hidden; transition: opacity .25s, transform .3s cubic-bezier(.16,1,.3,1), visibility 0s linear .3s; }
.tp.open .tp-panel { visibility: visible; transition-delay: 0s; }
.mm { visibility: hidden; transition: opacity .35s, visibility 0s linear .35s; }
body.mm-open .mm { visibility: visible; transition-delay: 0s; }
