/* screensaver.css — Digimax screensaver overlay + settings card (screensaver.js). Prefix ss-. */
@font-face{font-family:Outfit;src:url(/brand/Outfit-Regular.ttf) format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:Outfit;src:url(/brand/Outfit-Bold.ttf) format("truetype");font-weight:700;font-display:swap}

html.ss-open, html.ss-open body { overflow: hidden; }

.ss-root {
  position: fixed; inset: 0; z-index: 2147483000;   /* above drawer (100) and toasts (200) */
  background: #0a0a0a; color: #fff; overflow: hidden; overscroll-behavior: contain;
  font-family: Outfit, system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: none; outline: none; user-select: none; -webkit-user-select: none; touch-action: none;
  animation: ss-in .5s ease-out both;
}
.ss-root.ss-woken { cursor: default; }
.ss-root.ss-leaving { animation: ss-out .2s ease-in both; }
@keyframes ss-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ss-out { to { opacity: 0; } }

.ss-canvas { position: absolute; inset: 0; display: block; transition: filter .4s ease, transform .4s ease; }
.ss-woken .ss-canvas, .ss-woken .ss-stage { filter: blur(14px) brightness(.55); }
.ss-woken .ss-canvas { transform: scale(1.04); }

.ss-stage {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(14px, 3vh, 32px); padding: 16px; text-align: center; pointer-events: none;
  transition: translate 2s ease, filter .4s ease;
}
.ss-logo { width: min(440px, 72vw); line-height: 0; transform-origin: 50% 50%; will-change: transform, filter; }
.ss-logo svg, .ss-logo img { width: 100%; height: auto; display: block; }
.ss-clock { display: flex; flex-direction: column; align-items: center; gap: .2em; }
.ss-time {
  font-weight: 700; font-size: clamp(64px, 13vw, 200px); line-height: .95; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; text-shadow: 0 2px 30px rgba(0,0,0,.6);
}
.ss-date { font-size: clamp(16px, 2.2vw, 28px); color: rgba(255,255,255,.72); letter-spacing: .01em; }
.ss-tag { display: none; font-size: clamp(15px, 1.8vw, 22px); color: rgba(255,255,255,.6); letter-spacing: .02em; }

/* pulse: logo is the hero, small clock */
.ss-style-pulse .ss-logo { width: min(560px, 80vw); }
.ss-style-pulse .ss-time { font-size: clamp(40px, 6vw, 84px); color: rgba(255,255,255,.88); }
.ss-style-pulse .ss-stage { justify-content: center; }
/* clock: minimal huge clock + tagline, small mark */
.ss-style-clock .ss-logo { order: 3; width: min(200px, 40vw); opacity: .9; }
.ss-style-clock .ss-time { font-size: clamp(88px, 22vw, 340px); font-weight: 400; letter-spacing: -0.05em; }
.ss-style-clock .ss-tag { display: block; order: 2; }

.ss-hint {
  position: absolute; left: 0; right: 0; bottom: max(24px, env(safe-area-inset-bottom));
  text-align: center; font-size: 13px; color: rgba(255,255,255,.38); letter-spacing: .06em; text-transform: uppercase;
  pointer-events: none; animation: ss-hint 1.2s 3s ease both;
}
.ss-woken .ss-hint { display: none; }
@keyframes ss-hint { from { opacity: 0; } to { opacity: 1; } }

/* unlock card */
.ss-card {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: min(400px, calc(100vw - 32px)); padding: 28px 28px 24px; border-radius: 16px;
  background: #fff; color: #161616; text-align: left; cursor: auto; user-select: text; -webkit-user-select: text;
  box-shadow: 8px 8px 0 -2px #0a0a0a, 8px 8px 0 1px #E3262E, 0 30px 80px rgba(0,0,0,.5);
  animation: ss-card-in .25s ease-out both;
}
@keyframes ss-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ss-card.ss-shake { animation: ss-shake .42s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes ss-shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); }
}
.ss-card-mark { width: 44px; height: 44px; margin-bottom: 14px; }
.ss-card-mark canvas { width: 44px; height: 44px; display: block; }
.ss-card-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.ss-card-text { margin: 0 0 18px; color: #5a5a5a; line-height: 1.45; }
.ss-form { display: flex; flex-direction: column; }
.ss-label { font-size: 15px; color: #5a5a5a; margin: 0 0 8px; }
.ss-input {
  font: 400 17px/1.3 inherit; font-family: inherit; padding: 12px 14px; border: 2px solid #d9d9d9; border-radius: 8px;
  background: #fff; color: #161616; width: 100%; box-sizing: border-box;
}
.ss-input:focus { outline: none; border-color: #E3262E; }
.ss-err { min-height: 1.4em; margin: 8px 0 10px; font-size: 14px; color: #C62828; }
.ss-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px;
  font: 700 15px/1.2 inherit; font-family: inherit; border-radius: 8px; border: 0; cursor: pointer; width: 100%;
}
.ss-btn-red { background: #E3262E; color: #fff; }
.ss-btn-red:hover { background: #B91D24; }
.ss-btn:focus-visible, .ss-root :focus-visible { outline: 2px solid #E3262E; outline-offset: 2px; }

/* reduced motion: no transitions, no entry animation */
.ss-reduce, .ss-reduce * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .ss-root, .ss-root * { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------ settings card */
.ss-set { display: block; }
.ss-set-title { margin: 0 0 16px; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.ss-set-row { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.ss-set-label { display: block; padding: 0; margin: 0 0 8px; font-weight: 600; font-size: .95rem; }
.ss-set-off .ss-set-dep { opacity: .5; }

.ss-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ss-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ss-switch-ui {
  flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; background: #d9d9d9; transition: background .15s;
}
.ss-switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s;
}
.ss-switch input:checked + .ss-switch-ui { background: var(--red, #E3262E); }
.ss-switch input:checked + .ss-switch-ui::after { transform: translateX(18px); }
.ss-switch input:focus-visible + .ss-switch-ui { outline: 2px solid var(--red, #E3262E); outline-offset: 2px; }

.ss-minutes { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ss-minutes input[type=range] { flex: 1 1 180px; min-width: 0; accent-color: var(--red, #E3262E); }
.ss-num { display: inline-flex; align-items: center; gap: 6px; color: var(--muted, #7a7f86); }
.ss-num input {
  width: 5.5em; padding: 8px 10px; border: 1px solid var(--line-strong, #d9d9d9); border-radius: 8px;
  font: inherit; color: var(--ink, #161616); background: var(--field, #fff);
}

.ss-seg { display: inline-flex; border: 1px solid var(--line-strong, #d9d9d9); border-radius: 10px; padding: 3px; gap: 3px; margin: 0 12px 8px 0; vertical-align: middle; }
.ss-seg label { position: relative; cursor: pointer; }
.ss-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ss-seg span { display: block; padding: 7px 16px; border-radius: 7px; font-weight: 600; font-size: .95rem; }
.ss-seg input:checked + span { background: var(--ink, #161616); color: #fff; }
.ss-seg input:focus-visible + span { outline: 2px solid var(--red, #E3262E); outline-offset: 1px; }
.ss-preview { vertical-align: middle; margin: 0 0 8px; }

.ss-radio { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; cursor: pointer; }
.ss-radio input { accent-color: var(--red, #E3262E); width: 18px; height: 18px; margin: 0; }
.ss-note { margin: 8px 0 0; font-size: .88rem; color: var(--muted, #7a7f86); line-height: 1.45; }
.ss-status { margin: 0; min-height: 1.3em; font-size: .88rem; color: var(--muted, #7a7f86); }

/* ------------------------------------------------ sign-in / one-time code (SPEC §14) */
.ss-signin .ss-hint { display: none; }
.ss-signin.ss-woken .ss-canvas { filter: blur(3px) brightness(.6); transform: none; }
.ss-signin.ss-woken .ss-stage { filter: blur(10px) brightness(.4); }
.ss-signin .ss-card { animation-delay: .25s; }
.ss-card[aria-busy="true"] .ss-btn-red { opacity: .75; cursor: progress; }
.ss-sent { margin: 0 0 14px; color: #5a5a5a; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.ss-step-code .ss-label { display: block; }
.ss-code { display: flex; gap: 8px; justify-content: space-between; }
.ss-digit {
  flex: 1 1 0; min-width: 0; max-width: 52px; height: 58px; padding: 0; text-align: center;
  font: 700 26px/1 inherit; font-family: inherit; font-variant-numeric: tabular-nums;
  border: 2px solid #d9d9d9; border-radius: 10px; background: #fff; color: #161616; caret-color: #E3262E;
}
.ss-digit:focus { outline: none; border-color: #E3262E; box-shadow: 0 0 0 3px rgba(227,38,46,.18); }
.ss-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.ss-link {
  background: none; border: 0; padding: 6px 0; min-height: 36px; font: 600 14px/1.2 inherit; font-family: inherit;
  color: #161616; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.ss-link:disabled { color: #8a8f96; text-decoration: none; cursor: default; }
.ss-link:not(:disabled):hover { color: #E3262E; }
@media (max-width: 380px) {
  .ss-card { padding: 22px 18px 18px; }
  .ss-code { gap: 5px; }
  .ss-digit { height: 50px; font-size: 22px; border-radius: 8px; }
  .ss-card-title { font-size: 22px; }
}
/* short screens (phone keyboard open): pin the card to the top so the field stays visible */
@media (max-height: 560px) {
  .ss-card { top: 12px; translate: -50% 0; max-height: calc(100% - 24px); overflow: auto; }
}
