:root { color-scheme: light dark; font-family: "DM Sans", "Segoe UI", Arial, sans-serif; font-synthesis: none; --bg:#f8f8f3; --card:#fffefa; --ink:#2b1a47; --muted:#70687b; --line:#e5dfee; --primary:#6b2fbf; --primary-ink:#fff; --soft:#f2ebfa; --ring:#b893ef; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme:dark; --bg:#121018; --card:#1b1724; --ink:#f7f3fb; --muted:#b8b0c3; --line:#393142; --primary:#ffd93d; --primary-ink:#23192c; --soft:#2b2437; --ring:#ffd93d; } }
:root[data-theme="dark"] { color-scheme:dark; --bg:#121018; --card:#1b1724; --ink:#f7f3fb; --muted:#b8b0c3; --line:#393142; --primary:#ffd93d; --primary-ink:#23192c; --soft:#2b2437; --ring:#ffd93d; }
:root[data-theme="light"] { color-scheme:light; --bg:#f8f8f3; --card:#fffefa; --ink:#2b1a47; --muted:#70687b; --line:#e5dfee; --primary:#6b2fbf; --primary-ink:#fff; --soft:#f2ebfa; --ring:#b893ef; }
* { box-sizing:border-box; }
html { min-width:280px; }
body { margin:0; background:var(--bg); color:var(--ink); }
button, input, select { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.52; }
a { color:var(--primary); }
:focus-visible { outline:3px solid var(--ring); outline-offset:3px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
[hidden] { display:none !important; }
.widget-body { min-height:100vh; padding:12px; }
.widget { width:min(100%, 440px); margin:auto; padding:20px; border:1px solid var(--line); border-radius:24px; background:var(--card); box-shadow:0 12px 38px rgba(22,13,35,.06); }
.widget-header, .brand, .widget-footer, .timer-controls, .preset-row, .number-row, .switch-row { display:flex; align-items:center; }
.widget-header { justify-content:space-between; gap:12px; }
.brand { gap:9px; font-size:1.12rem; font-weight:800; letter-spacing:-.045em; }
.brand-logo { display:block; flex:0 0 34px; width:34px; height:34px; border-radius:8px; background:url('../assets/mark-day.svg') center/contain no-repeat; }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) .brand-logo { background-image:url('../assets/mark.svg'); } }
:root[data-theme="dark"] .brand-logo { background-image:url('../assets/mark.svg'); }
.theme-select { min-height:44px; border:1px solid var(--line); background:var(--soft); color:var(--ink); border-radius:12px; padding:0 12px; font-size:.85rem; }
.mode-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; padding:4px; margin-top:22px; border-radius:14px; background:var(--soft); }
.mode-tabs button, .choice-group button { border:0; border-radius:10px; color:var(--muted); background:transparent; font-size:.82rem; font-weight:650; min-height:44px; padding:7px 4px; }
.mode-tabs button[aria-pressed="true"], .choice-group button[aria-pressed="true"] { background:var(--card); color:var(--ink); box-shadow:0 1px 6px rgba(22,13,35,.09); }
.timer-intro { text-align:center; margin:24px 0 0; }
.eyebrow { margin:0; color:var(--primary); font-size:.69rem; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
h1 { margin:8px 0 0; font-size:clamp(1.15rem,4.4vw,1.52rem); font-weight:750; letter-spacing:-.04em; }
.dial { width:min(72%,248px); aspect-ratio:1; margin:20px auto 14px; position:relative; }
.dial svg { display:block; width:100%; height:100%; transform:rotate(-90deg); }
.dial circle { fill:none; stroke-width:8; }
.dial-track { stroke:var(--soft); }
.dial-progress { stroke:var(--primary); stroke-linecap:round; transition:stroke-dasharray .2s linear; }
.dial-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.time { font-size:clamp(2.4rem,12vw,3.8rem); font-weight:750; letter-spacing:-.065em; line-height:1; font-variant-numeric:tabular-nums; }
.timer-state { margin-top:10px; color:var(--muted); font-size:.78rem; }
.timer-controls { gap:8px; }
.timer-controls button { min-height:46px; border-radius:13px; font-weight:750; }
.primary-button { flex:1 1 auto; border:1px solid var(--primary); background:var(--primary); color:var(--primary-ink); }
.primary-button:hover:not(:disabled) { filter:brightness(.93); }
.secondary-button { flex:0 0 auto; padding:0 18px; border:1px solid var(--line); background:var(--card); color:var(--ink); }
.timer-options { border-top:1px solid var(--line); margin-top:20px; padding-top:8px; }
.timer-options > summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; list-style:none; cursor:pointer; font-size:.85rem; font-weight:750; }
.timer-options > summary::-webkit-details-marker { display:none; }
.timer-options > summary span { color:var(--muted); font-size:.73rem; font-weight:450; text-align:right; }
.timer-options > summary::after { content:""; flex:none; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); margin:0 3px 4px 6px; }
.timer-options[open] > summary::after { transform:rotate(225deg); margin-top:6px; margin-bottom:0; }
.preset-row { justify-content:space-between; gap:8px; }
.option-label, .number-row, .label-row { font-size:.82rem; font-weight:700; }
.choice-group { display:flex; gap:3px; padding:3px; background:var(--soft); border-radius:11px; }
.choice-group button { padding:7px 8px; min-height:38px; white-space:nowrap; font-size:.73rem; }
.number-row { justify-content:space-between; }
.number-row span { display:flex; align-items:center; gap:7px; color:var(--muted); }
.number-row input, .custom-grid input { width:64px; min-height:42px; border:1px solid var(--line); border-radius:10px; padding:4px 8px; background:var(--card); color:var(--ink); }
.custom-settings { margin-top:12px; color:var(--muted); font-size:.79rem; }
.custom-settings summary { cursor:pointer; width:max-content; min-height:40px; display:flex; align-items:center; }
.custom-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:5px 0 10px; }
.custom-grid label { display:flex; flex-direction:column; gap:5px; }
.custom-grid input { width:100%; }
.text-button { min-height:40px; padding:0 12px; border:1px solid var(--line); border-radius:10px; background:var(--soft); color:var(--ink); font-weight:700; }
.field-error { color:#b64058; margin:6px 0 0; }
.label-row { display:flex; gap:6px; margin:12px 0 7px; }
.label-row span { color:var(--muted); font-weight:400; }
#focus-label { width:100%; min-height:44px; border:1px solid var(--line); border-radius:11px; background:var(--card); color:var(--ink); padding:0 12px; font-size:.84rem; }
#focus-label::placeholder { color:var(--muted); }
.widget-footer { gap:8px; justify-content:space-between; border-top:1px solid var(--line); padding-top:16px; margin-top:20px; color:var(--muted); font-size:.74rem; }
.widget-footer a { font-weight:750; text-decoration:none; text-align:right; }
.widget-footer a:hover { text-decoration:underline; }
.clock-widget { min-height:390px; display:flex; flex-direction:column; }
.clock-content { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:24px 0 12px; }
.clock-time { margin:8px 0 0; font-size:clamp(3.3rem,17vw,5.6rem); line-height:1.08; font-variant-numeric:tabular-nums; white-space:nowrap; }
.clock-date { margin:4px 0 0; color:var(--muted); font-size:.95rem; }
.clock-settings { border-top:1px solid var(--line); padding-top:12px; }
.clock-settings p { margin:8px 0 0; color:var(--muted); font-size:.75rem; }
.switch-row { gap:9px; min-height:44px; font-size:.84rem; font-weight:700; cursor:pointer; }
.switch-row input { width:18px; height:18px; accent-color:var(--primary); }
.hub-body { min-height:100vh; padding:24px 16px 56px; background:var(--bg); }
.hub { max-width:1060px; margin:0 auto; }
.hub-header { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.hub-header .brand { font-size:1.4rem; }
.hub-header a { text-decoration:none; font-size:.87rem; font-weight:700; }
.hub-hero { max-width:690px; margin:70px 0 50px; }
.hub-hero h1 { font-size:clamp(2.4rem,6vw,4.7rem); line-height:1.04; }
.hub-hero p:last-child { color:var(--muted); font-size:1.1rem; line-height:1.6; }
.hub-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; gap:20px; }
.hub-panel { padding:24px; border:1px solid var(--line); border-radius:22px; background:var(--card); }
.hub-panel h2 { margin:0 0 8px; font-size:1.35rem; letter-spacing:-.04em; }
.hub-panel p { color:var(--muted); line-height:1.5; }
.hub-panel iframe { display:block; width:100%; min-height:640px; border:0; border-radius:17px; background:var(--bg); }
.hub-panel.clock-preview iframe { min-height:410px; }
.hub-panel a { display:inline-block; margin-top:14px; font-weight:750; text-decoration:none; }
.generator { margin-top:20px; }
.generator label { display:block; margin:15px 0 6px; font-size:.87rem; font-weight:700; }
.generator select, .generator input { width:100%; min-height:46px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:var(--card); color:var(--ink); }
.generator-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.copy-row { display:flex; gap:8px; }
.copy-row input { min-width:0; }
.copy-row button { padding:0 16px; border:0; border-radius:11px; background:var(--primary); color:var(--primary-ink); font-weight:750; min-height:46px; }
.generator-note { font-size:.82rem; }
@media (max-width:720px) { .hub-hero { margin:46px 0 32px; } .hub-grid { grid-template-columns:1fr; } .hub-panel { padding:16px; } }
@media (max-width:370px) { .widget-body { padding:6px; } .widget { padding:15px; border-radius:18px; } .mode-tabs button { font-size:.72rem; } .preset-row { flex-wrap:wrap; } .widget-footer { align-items:flex-start; } .clock-time { font-size:clamp(2.9rem,15vw,4rem); } }
@media (max-height:480px) {
  .widget-body { height:100dvh; min-height:0; padding:0; overflow:hidden; background:var(--card); }
  .widget { width:100%; max-width:none; height:100%; margin:0; padding:6px 14px; border:0; border-radius:0; box-shadow:none; display:flex; flex-direction:column; overflow-y:auto; }
  .widget-header { flex:none; min-height:44px; }
  .brand { font-size:1rem; }
  .brand-logo { flex-basis:28px; width:28px; height:28px; }
  .theme-select { min-height:44px; }
  .mode-tabs, .timer-controls, .timer-options, .widget-footer { width:min(100%,420px); margin-inline:auto; flex:none; }
  .mode-tabs { margin-top:4px; padding:2px; }
  .mode-tabs button { min-height:44px; }
  .timer-intro { margin:5px 0 0; }
  .timer-intro h1 { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .dial { flex:none; width:min(100%,420px); height:66px; aspect-ratio:auto; margin:2px auto; }
  .dial svg { display:none; }
  .time { font-size:clamp(2.15rem, 8vw, 2.6rem); }
  .timer-state { margin-top:4px; font-size:.7rem; }
  .timer-controls button { min-height:44px; }
  .timer-options { margin-top:2px; padding-top:0; border-top:0; }
  .timer-options > summary { min-height:44px; justify-content:center; }
  .timer-options > summary span { display:none; }
  .widget-footer { justify-content:center; min-height:22px; margin-top:auto; padding-top:0; border-top:0; font-size:.7rem; }
  .widget-footer > span { display:none; }
  .clock-content { min-height:0; padding:4px 0; }
  .clock-widget { min-height:0; }
  .clock-time { font-size:clamp(2.7rem, 12vw, 4.5rem); }
  .clock-date { font-size:.8rem; }
  .clock-settings { padding-top:3px; }
  .clock-settings p { margin:0; }
  .clock-widget .widget-footer { margin-top:2px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; } }
