@font-face {
  font-family: Geist;
  src: url("geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@layer base, surfaces, workspace, forms, responsive;
@layer base {
  :root {
    color-scheme: light;
    --ink: #102e32;
    --text: #223c3e;
    --muted: #465e60;
    --brand: #10675f;
    --active: #0b554f;
    --line: #c7d6d4;
    --surface: #f9fcfb;
    --glass: rgb(249 253 252 / 83%);
    --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
    --content: 1480px;
    --edge: clamp(16px, 3.6vw, 60px);
    --radius: 18px;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0; font: 14px/1.5 Geist, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text); background: #edf3f2;
    background-image: radial-gradient(ellipse at 80% 4%, #dcebe8, transparent 57%), linear-gradient(140deg, #f2f6f5, #e9f0ef);
    background-attachment: fixed;
  }
  button, input, select, textarea { color: inherit; font: inherit; }
  button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  button { background: transparent; border: 0; cursor: pointer; }
  a { color: inherit; text-decoration: none; }
  button:disabled { cursor: wait; opacity: .66; }
  :focus-visible { outline: 3px solid #08757d; outline-offset: 3px; }
  h1, h2, h3, p { margin: 0; }
  h1, h2, h3 { color: var(--ink); text-wrap: balance; }
  h1 { font-size: clamp(32px, 3.65vw, 58px); letter-spacing: -.06em; line-height: 1.04; font-weight: 620; }
  h2 { letter-spacing: -.045em; font-size: 24px; font-weight: 620; line-height: 1.18; }
  h3 { font-size: 17px; letter-spacing: -.03em; }
  svg { display: block; width: 19px; height: 19px; flex-shrink: 0; }
  img { max-inline-size: 100%; }
  .brand, .mobile-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 660; font-size: 27px; letter-spacing: -.065em; }
  .brand img { width: 37px; height: 37px; }
  .cap { font: 600 11px/1.45 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
  .hint, .sub { font-size: 13px; line-height: 1.55; color: var(--muted); }
  .primary, .secondary, .dark, .reset, .icon, .text-btn, .link-task, .reminder-action, .studio-launch {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 44px; border-radius: 10px;
  }
  .primary, .dark { color: white; background: var(--active); padding: 10px 17px; font-weight: 620; }
  .secondary, .reset { background: #f8fbfb; border: 1px solid var(--line); padding: 9px 14px; font-weight: 560; }
  .icon { inline-size: 44px; flex-shrink: 0; }
  .icon:hover, .text-btn:hover, .choice:hover { background: #e1ece9; }
  .primary:hover, .dark:hover { background: #08463f; }
  .secondary:hover, .reset:hover { background: #e6f0ed; }
  .text-link, .gate-restore, .account { text-decoration: underline; text-underline-offset: 3px; }
  .dot { display: inline-block; width: 9px; height: 9px; background: var(--dot); border-radius: 50%; flex: none; }
  .empty { padding: 28px 16px; border: 1px dashed #b6c9c6; border-radius: 12px; background: #f5f9f7; text-align: center; color: var(--muted); }
  .empty button { margin: 10px auto 0; display: flex; }
  .mobile, .mobile-brand, #veil, #bottom-nav { display: none; }
}
@layer surfaces {
  /* Solid surfaces are the default for browsers without backdrop filtering. */
  .gate-form, #sidebar, .top, .panel, .tasks-card, #bottom-nav, dialog { background: var(--surface); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .gate-form, #sidebar, .top, .panel, #bottom-nav, dialog {
      background: var(--glass);
      -webkit-backdrop-filter: blur(22px) saturate(125%);
      backdrop-filter: blur(22px) saturate(125%);
    }
  }
  #gate {
    min-block-size: 100vh; min-block-size: 100svh; color: #eaf8f5;
    background-color: #102a30;
    background-image: radial-gradient(ellipse at 46% 65%, rgb(75 144 132 / 65%), transparent 54%),
      radial-gradient(ellipse at 91% 2%, #405459, transparent 58%), linear-gradient(145deg, #10272c, #102f33 58%, #0d272d);
  }
  .gate-bar { display: flex; align-items: center; gap: 18px; max-width: var(--content); margin-inline: auto; min-height: 80px; padding: 12px var(--edge); }
  .gate-bar .brand { color: #f5fffc; }
  .gate-bar .brand img { outline: 1px solid #769b94; border-radius: 9px; }
  .gate-type { padding-inline-start: 20px; border-inline-start: 1px solid #6c8b88; color: #d2e4de; font-size: 13px; }
  .gate-type svg { display: none; }
  .gate-bar .lang-select { margin-inline-start: auto; color: #f8fffc; background: #1c383c; border-color: #789593; }
  #gate { position: relative; isolation: isolate; }
  #gate::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse at 76% 58%, #547f72a3, transparent 37%),
      linear-gradient(128deg, transparent 53%, #b4e3d60b 55%, transparent 65%);
  }
  .gate-main { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(340px,.8fr); align-items: center; gap: clamp(22px, 3.5vw, 62px); max-width: 1320px; min-height: min(82svh,820px); margin: auto; padding: 36px var(--edge) 62px; }
  .gate-art { position: relative; min-width: 0; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; }
  .gate-art h1 { color: #f6fdfb; font-size: clamp(48px,5.9vw,86px); letter-spacing: -.075em; line-height: .99; font-weight: 580; }
  .gate-art h1 span { color: #a9d5c6; }
  .gate-art p { color: #d7eae4; max-width: 37ch; margin-top: 18px; font-size: clamp(14px,1.22vw,18px); }
  .gate-art img { width: min(100%, 660px); height: auto; margin: -38px 0 -13px 5%; filter: drop-shadow(0 22px 17px #061d216b); z-index: -1; }
  .gate-benefits { display: flex; align-items: center; flex-wrap: wrap; gap: 19px; color: #d7eae4; font-size: 12px; }
  .gate-benefits span { display: inline-flex; align-items: center; gap: 7px; }
  .gate-benefits svg { width: 16px; color: #a0d9c7; }
  .gate-form { --glass: rgb(239 249 246 / 89%); color: var(--text); border: 1px solid #fff9; border-radius: 24px; padding: clamp(24px,3vw,42px); box-shadow: 0 24px 76px #061b242d, inset 0 1px 0 #fffc; }
  .auth-tabs, .timer-modes { display: flex; gap: 4px; padding: 4px; border: 1px solid #bbcfc9; background: #cfdfda; border-radius: 12px; }
  .auth-tabs { margin-bottom: 27px; }
  .auth-tabs button, .timer-modes button { flex: 1; min-height: 44px; color: #35514f; font-weight: 570; border-radius: 8px; }
  .auth-tabs .active, .timer-modes .active { color: var(--ink); background: white; box-shadow: 0 1px 4px #152d3029; }
  .gate-form h2 { font-size: clamp(25px,2.4vw,35px); }
  .gate-form .hint { margin-top: 7px; }
  .gate-form form { margin-top: 22px; }
  .gate-form .primary { width: 100%; justify-content: space-between; margin-top: 10px; }
  .gate-restore { display: block; margin: 8px auto -10px; min-height: 44px; color: var(--muted); font-size: 12px; }
  #auth-error { color: #ffd1b8; font-size: 13px; }
  .studio-launch { color: #e6faf2; border: 1px solid #90b6ab; padding: 8px 13px; font-weight: 600; font-size: 12px; background: #163d3d; }
  .studio-launch:hover { background: #215552; }
  .gate-art .studio-launch { margin-block: 0 15px; }
  .hero .studio-launch { position: absolute; z-index: 2; bottom: 14px; right: 18px; }
}
@layer workspace {
  #shell { display: flex; min-height: 100vh; min-height: 100dvh; }
  #sidebar { --glass: rgb(245 250 248 / 86%); flex: 0 0 clamp(185px,17vw,245px); display: flex; flex-direction: column; height: 100vh; height: 100dvh; position: sticky; top: 0; padding: 25px 17px 15px; border-inline-end: 1px solid var(--line); z-index: 4; }
  #sidebar .brand { margin: 0 8px 32px; align-self: flex-start; }
  .navbody { overflow: auto; min-height: 0; padding: 3px; }
  .navbody .cap { margin: 0 9px 9px; color: #4d6867; }
  .navbody .lists { margin-top: 25px; }
  .navbody button, .settings, .account { width: 100%; display: flex; align-items: center; gap: 11px; min-height: 44px; text-align: start; padding: 9px 11px; border-radius: 8px; font-weight: 525; }
  .navbody .on { background: #d6e9e1; color: #164e44; }
  .navbody button:hover, .settings:hover { background: #e0ece6; }
  .navbody .dot { margin-inline: 5px; }
  .settings { border-top: 1px solid var(--line); border-radius: 0; margin-block-start: auto; }
  .account { color: var(--muted); font-size: 12px; }
  #shell main { flex: 1; min-width: 0; }
  .top { display: flex; align-items: center; justify-content: space-between; min-height: 65px; padding-inline: var(--edge); border-bottom: 1px solid var(--line); }
  .crumb, .tools, .date, .hero .cap, .section-head, .progressline, .card-head, .meta, .timer-footer, .toast-actions, .shop-summary .cap { display: flex; align-items: center; gap: 9px; }
  .crumb { color: var(--muted); font-size: 12px; }
  .crumb strong { color: var(--text); font-weight: 600; }
  .crumb svg { width: 16px; }
  .tools { gap: 2px; }
  .tools .icon { position: relative; }
  .tools b { position: absolute; top: 8px; right: 9px; background: #aa4b22; width: 7px; height: 7px; border-radius: 50%; }
  .content { max-width: var(--content); margin-inline: auto; padding: 32px var(--edge) 60px; }
  .heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
  .date { color: var(--muted); margin-bottom: 8px; }
  .date svg { width: 15px; height: 15px; }
  .heading .primary { flex-shrink: 0; }
  .hero { isolation: isolate; position: relative; overflow: hidden; display: flex; align-items: center; min-height: 205px; border-radius: var(--radius); padding: 25px 30px; color: #e3f5f0; background: radial-gradient(ellipse at 79% 42%, #396961, transparent 53%), linear-gradient(117deg,#112e33,#1f4546 75%,#17363a); box-shadow: inset 0 0 0 1px #658880; }
  .hero-text { position: relative; z-index: 1; width: 58%; }
  .hero .cap { color: #b5ded3; font-size: 10px; }
  .hero h2 { color: #f7fffc; font-size: clamp(24px,2.65vw,40px); letter-spacing: -.055em; margin: 9px 0 16px; }
  .hero .sub { color: #d1e9e2; }
  .illustration { position: absolute; inset-inline-end: 3%; top: 0; width: 40%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 8px #08272870); }
  .progressline { gap: 10px; margin-bottom: 5px; }
  .progressline b { font: 600 12px var(--mono); }
  progress { appearance: none; -webkit-appearance: none; border: 0; border-radius: 8px; overflow: hidden; width: min(75%,250px); height: 6px; color: #97dfc8; background: #527270; }
  progress::-webkit-progress-bar { background: #527270; }
  progress::-webkit-progress-value { background: #97dfc8; border-radius: 8px; }
  progress::-moz-progress-bar { background: #97dfc8; }
  .columns { display: grid; grid-template-columns: minmax(0,1fr) minmax(235px,32%); gap: 22px; margin-top: 26px; align-items: start; }
  .section-head { justify-content: space-between; }
  .text-btn { color: var(--muted); padding-inline: 9px; font-size: 13px; }
  .filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0; }
  .filters button { padding: 6px 12px; min-height: 44px; color: var(--muted); background: #f7faf9; border: 1px solid #c5d6d0; border-radius: 9px; }
  .filters .active { background: #d2e7df; color: #124d40; border-color: #97baae; }
  .filters span { font: 600 11px var(--mono); margin-inline-start: 4px; }
  .tasks-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 17px #25433f06, inset 0 1px 0 white; }
  .tasks-card { padding-inline: 9px; }
  .row { display: flex; align-items: center; gap: 6px; padding: 9px 2px; }
  .row + .row { border-top: 1px solid #dae4e0; }
  .checkhit { width: 44px; min-height: 44px; display: grid; place-items: center; flex: none; }
  .tick { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid #748b87; border-radius: 6px; background: white; }
  .checked { background: var(--brand); border-color: var(--brand); color: white; }
  .tick svg { width: 14px; }
  .task-text { min-width: 0; min-height: 44px; flex: 1; text-align: start; padding: 3px 0; }
  .task-name { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.4; }
  .done .task-name { text-decoration: line-through; color: var(--muted); }
  .meta { flex-wrap: wrap; gap: 6px 10px; font-size: 12px; line-height: 1.4; color: var(--muted); margin-top: 5px; }
  .meta span, .tag { display: inline-flex; align-items: center; gap: 4px; }
  .meta svg { width: 13px; height: 13px; }
  .tag { background: var(--tint); color: #344a48; border-radius: 5px; padding: 2px 6px; font-size: 11px; font-weight: 560; }
  .tag .dot { width: 6px; height: 6px; }
  .high,.overdue,.danger { color: #913c19; }
  .more { color: #51696a; }
  .rail { display: grid; gap: 16px; }
  .panel { padding: 18px; }
  .card-head h2 { font-size: 20px; }
  .card-head picture { margin: -8px -4px -7px -5px; }
  .model { width: 50px; height: 50px; display: block; object-fit: contain; }
  .card-head .small { margin-inline-start: auto; }
  .timer-modes { margin-block: 16px 8px; }
  .timer-modes button { font-size: 13px; }
  .clock { text-align: center; font-size: clamp(43px,4.3vw,68px); font-weight: 440; line-height: 1.3; letter-spacing: -.065em; font-variant-numeric: tabular-nums; color: var(--ink); }
  .timer-footer { margin-top: 8px; gap: 7px; }
  .dark { flex: 1; }
  .dark svg { width: 15px; }
  .reset { width: 44px; padding: 0; }
  .link-task { width: 100%; margin: 7px 0 -6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
  .link-task svg { width: 14px; }
  .up-row { width: 100%; min-height: 44px; padding: 8px 0; text-align: start; display: flex; align-items: flex-start; gap: 9px; }
  .up-row .dot { margin-top: 5px; }
  .up-title { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
  .up-time { color: var(--muted); font-size: 12px; }
  .reminder-action { justify-content: space-between; border-top: 1px solid var(--line); border-radius: 0; margin-top: 8px; width: 100%; color: var(--brand); font-weight: 580; font-size: 13px; }
  .reminders .hint { margin: 12px 0; }
  .shop-summary { background: linear-gradient(120deg,#193a3e,#2b5a52); color: #e4f5ee; padding: 24px; border-radius: var(--radius); }
  .shop-summary strong { display: block; font-size: 45px; color: white; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
  .shop-head { margin: 22px 0 12px; }
  .shop-tools { margin-bottom: 12px; color: var(--muted); }
}
@layer forms {
  dialog { --glass: rgb(247 252 251 / 94%); width: min(460px, calc(100% - 24px)); max-width: 100%; max-height: min(90dvh,820px); border: 1px solid #f7fffc; padding: 0; border-radius: 20px; box-shadow: 0 20px 80px #09242152; color: var(--text); }
  /* Frosted dark glass uses a solid backup with the same text contrast. */
  .gate-form {
    color: #f3fbf8; background: #29474a; border: 1px solid #a0bbb1a6;
    box-shadow: inset 0 1px 0 #f0fff978, inset 0 -1px 0 #a9cabe34, 0 22px 66px #03191f3d;
  }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .gate-form { background: linear-gradient(135deg, #e8fff329, #d2f5e819 42%, #9dbdb71a); }
  }
  .gate-form h2, .gate-form .field { color: #f6fffb; }
  .gate-form .hint, .gate-form .gate-restore { color: #e0eee9; }
  .gate-form .auth-tabs { background: #133639b3; border-color: #739992; }
  .gate-form .auth-tabs button { color: #ecf9f3; }
  .gate-form .auth-tabs .active { background: #c8e5d9; color: #183a36; }
  .gate-form .primary { background: #b7e9d1; color: #10332d; }
  .gate-form .primary:hover { background: #c8f2dd; }
  .gate-form .field input { background: #183739d9; color: #f7fffb; border-color: #91aca4; }
  .gate-form .field input::placeholder { color: #d2dfd9; }
  .gate-form :focus-visible, .gate-bar :focus-visible, .studio-launch:focus-visible { outline-color: #b2f5d4; }
  .gate-bar .lang-select { background: #213e42; color: #f8fffc; border-color: #8aa49e; }
  dialog::backdrop { background: rgb(12 34 38 / 56%); }
  #dialog-inner { padding: clamp(17px,2.5vw,26px); }
  .modal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
  .modal-head h2 { font-size: 25px; overflow-wrap: anywhere; }
  .field { display: block; margin: 12px 0; font-size: 13px; font-weight: 580; }
  .field input, .field select, .field textarea, .search-input, .lang-select, .shop-tools select {
    background: #fbfefd; border: 1px solid #859c97; border-radius: 9px; min-height: 44px; padding: 9px 12px;
  }
  .field input, .field select, .field textarea, .search-input { display: block; width: 100%; min-width: 0; margin-top: 5px; font-size: 16px; font-weight: 430; }
  .field input::placeholder, .field textarea::placeholder, .search-input::placeholder { color: #5d706f; }
  .field textarea { resize: vertical; }
  .form-grid, .cal-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
  .actions, .toast-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .actions { justify-content: flex-end; margin-top: 18px; }
  .actions .danger { margin-inline-end: auto; min-height: 44px; }
  .choice { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 46px; text-align: start; border-bottom: 1px solid var(--line); padding: 10px 5px; }
  .choice svg { width: 16px; }
  .search-results { max-height: 45dvh; overflow: auto; }
  .setting-section + .setting-section, .alert-card + .alert-card { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
  .setting-section h3, .lang-setting, .calendar-summary { margin-bottom: 8px; }
  .setting-section button, .toast-actions { margin-top: 10px; }
  .alert-card b, .calendar-summary b { overflow-wrap: anywhere; }
  .calendar-summary { display: flex; gap: 12px; align-items: center; }
  .cal-buttons { grid-template-columns: 1fr; gap: 7px; margin: 14px 0; }
  .fine { font-size: 12px; }
  .offline-state { color: #2c6351; margin: 6px 0; }
  .calc-prev, .calculator output { background: #153c40; color: #b7f2d9; display: block; text-align: end; font-family: var(--mono); padding: 12px 15px 0; border-radius: 10px 10px 0 0; }
  .calculator output { padding: 2px 15px 13px; font-size: 38px; border-radius: 0 0 10px 10px; overflow-wrap: anywhere; }
  .keys { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
  .keys button { min-height: 48px; background: #e3eeea; border-radius: 9px; font-size: 20px; }
  .keys .operator { background: #c9e2d8; }
  .keys .equals { color: white; background: var(--active); }
  #toast { position: fixed; inset-inline-start: 50%; transform: translateX(-50%); bottom: 18px; z-index: 20; max-width: min(450px,95vw); width: max-content; padding: 11px 16px; border: 1px solid #587774; background: #193b3a; color: white; border-radius: 10px; font-size: 13px; box-shadow: 0 4px 18px #152b2926; }
  #toast:empty { display: none; }
  .studio-dialog { width: min(660px,calc(100% - 24px)); }
  .studio-stage { aspect-ratio: 1.5; position: relative; isolation: isolate; overflow: hidden; border-radius: 15px; background: radial-gradient(ellipse at 60% 40%, #41695f,#182e34 80%); }
  .studio-stage > img, model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
  model-viewer { --poster-color: transparent; --progress-bar-color: #7bceae; }
  .studio-hint { margin-top: 12px; }
  .studio-controls { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
}
@layer responsive {
  @media (max-width: 1060px) {
    :root { --edge: clamp(16px,2.4vw,30px); }
    #sidebar { flex-basis: 182px; padding-inline: 10px; }
    .columns { gap: 14px; grid-template-columns: minmax(0,1fr) minmax(216px,32%); }
    .card-head h2 { font-size: 18px; }
    .panel { padding: 14px; }
  }
  @media (max-width: 800px) {
    #sidebar { position: fixed; inset: 0 auto 0 0; width: min(270px,85vw); z-index: 9; transform: translateX(-101%); visibility: hidden; transition: transform .18s ease-out; --glass: rgb(245 251 248 / 96%); }
    .menu-open #sidebar { transform: none; visibility: visible; }
    .menu-open #veil { display: block; position: fixed; inset: 0; background: #09252b6b; z-index: 8; }
    .top { min-height: 57px; gap: 3px; padding-inline: 8px; }
    .mobile { display: inline-flex; }
    .mobile-brand { display: inline-flex; gap: 6px; font-size: 21px; }
    .mobile-brand img { width: 24px; height: 24px; }
    .top .crumb { display: none; }
    .tools { margin-inline-start: auto; }
    .content { padding: 23px var(--edge) calc(85px + env(safe-area-inset-bottom)); }
    #bottom-nav { --glass: rgb(247 252 250 / 92%); display: flex; position: fixed; z-index: 5; bottom: 0; inset-inline: 0; padding: 5px max(5px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)); border-top: 1px solid #aec6be; }
    #bottom-nav { inset-inline: 9px; bottom: max(7px,env(safe-area-inset-bottom)); padding: 4px; border: 1px solid #afc7bea8; border-radius: 17px; --glass: rgb(241 250 246 / 83%); box-shadow: 0 5px 22px #14362b24, inset 0 1px 0 white; }
    #bottom-nav button { flex: 1; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 48px; font-size: 11px; color: #425c59; border-radius: 10px; }
    #bottom-nav .selected { color: #0b4e40; font-weight: 680; background: #daebe2; }
    #toast { bottom: calc(73px + env(safe-area-inset-bottom)); }
    .gate-main { grid-template-columns: minmax(0,1fr) minmax(300px,1fr); gap: 18px; }
    .gate-form { padding: 24px 20px; }
    .gate-art img { margin: -4px 0 0; width: 100%; }
    .gate-type { display: none; }
  }
  @media (max-width: 650px) {
    .gate-bar { min-height: 62px; padding: 9px 17px; }
    .gate-bar .brand { font-size: 23px; }
    .brand img { width: 32px; height: 32px; }
    .gate-main { display: block; max-width: 500px; padding: 10px 15px 34px; }
    .gate-art { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.95fr); padding: 9px 2px 20px; }
    .gate-art h1 { font-size: clamp(34px,8.3vw,46px); }
    .gate-art p { grid-column: 1; font-size: 13px; line-height: 1.45; margin-top: 9px; max-width: 23ch; }
    .gate-art img { grid-column: 2; grid-row: 1/4; align-self: center; width: 120%; max-width: none; margin-inline-start: -12%; }
    .gate-art .studio-launch { grid-column: 1; justify-self: start; margin: 11px 0 0; }
    .gate-benefits { display: none; }
    .gate-form { border-radius: 19px; padding: 19px; }
    .auth-tabs { margin-bottom: 20px; }
    .gate-form form { margin-top: 13px; }
    .heading { gap: 8px; margin-bottom: 16px; }
    .heading .primary { max-width: 45%; padding-inline: 12px; font-size: 13px; }
    .date { font-size: 10px; gap: 5px; letter-spacing: .06em; }
    .hero { min-height: 168px; padding: 16px; }
    .hero-text { width: 58%; }
    .hero h2 { font-size: clamp(22px,5.6vw,30px); line-height: 1.08; margin: 9px 0 12px; }
    .illustration { top: -11px; width: 47%; right: 0; height: 92%; }
    .hero .studio-launch { right: 9px; bottom: 7px; }
    .hero .sub { font-size: 12px; }
    .columns { grid-template-columns: minmax(0,1fr); gap: 20px; margin-top: 18px; }
    .panel { padding: 18px; }
    .row { gap: 3px; }
    .section-head h2 { font-size: 23px; }
    .task-name { font-size: 14px; }
    .tasks-card { padding-inline: 4px; }
    .rail { gap: 13px; }
    .rail .card-head h2 { font-size: 21px; }
    .clock { font-size: 54px; }
    .fine { line-height: 1.55; }
    .gate-main .lang-select, input, select, textarea { font-size: 16px; }
    .lang-select { min-width: 85px; }
  }
  @media (max-width: 370px) {
    :root { --edge: 12px; }
    .hero { padding: 13px; }
    .hero .studio-launch { padding-inline: 8px; }
    .date { flex-wrap: wrap; }
    .gate-art img { max-width: 111%; }
    .form-grid { gap: 0 8px; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  }
  @media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .gate-form { background: #29474a; backdrop-filter: none; -webkit-backdrop-filter: none; }
    #sidebar, .top, .panel, #bottom-nav, dialog { background: #f7fbfa; backdrop-filter: none; -webkit-backdrop-filter: none; }
  }
}

@layer personalization {
  :root {
    --accent-dark: #0b554f;
    --accent-mid: #237870;
    --accent-light: #b7e9d1;
  }
  :root[data-color="blue"] { --accent-dark: #204f83; --accent-mid: #356fa7; --accent-light: #c2dfff; }
  :root[data-color="plum"] { --accent-dark: #654576; --accent-mid: #855f97; --accent-light: #ead0f5; }
  :root[data-color="copper"] { --accent-dark: #75452c; --accent-mid: #985d3a; --accent-light: #ffd7b6; }
  :root[data-color] { --brand: var(--accent-dark); --active: var(--accent-dark); }
  :root[data-color]:not([data-color="teal"]) #gate {
    background: radial-gradient(ellipse at 55% 65%, var(--accent-mid), transparent 62%), linear-gradient(120deg, #17252a, color-mix(in srgb, var(--accent-dark) 70%, #102229));
  }
  .gate-art h1 span { color: var(--accent-light); }
  .gate-form .auth-tabs .active, .gate-form .primary { background: var(--accent-light); color: #182a2d; }
  .gate-form .primary:hover { background: color-mix(in srgb,var(--accent-light) 80%,white); }
  :root[data-color]:not([data-color="teal"]) :is(.hero,.shop-summary) {
    background: radial-gradient(ellipse at 76% 35%, color-mix(in srgb,var(--accent-mid) 78%,#17292f), transparent 70%), linear-gradient(116deg,#17262c,var(--accent-dark));
  }
  .hero .cap, .hero .sub { color: #e7f2ef; }
  progress::-webkit-progress-value { background: var(--accent-light); }
  progress::-moz-progress-bar { background: var(--accent-light); }
  .navbody .on, .filters .active, #bottom-nav .selected {
    color: var(--accent-dark); background: color-mix(in srgb,var(--accent-light) 56%,white);
  }
  .primary:hover, .dark:hover { background: color-mix(in srgb,var(--accent-dark) 80%,#15232b); }
  .color-picker, .timing-picker { min-inline-size: 0; padding: 0; border: 0; margin: 15px 0; }
  .color-picker legend, .timing-picker legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 580; }
  .color-picker > div, .timing-picker > div { display: grid; gap: 5px; }
  .color-picker > div { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .color-choice, .timing-picker label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #98ada8; border-radius: 9px; cursor: pointer; }
  .color-choice { flex-direction: column; gap: 4px; text-align: center; padding: 6px 2px; font-size: 12px; line-height: 1.2; }
  .color-choice input, .timing-picker input { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  .color-chip { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #adbbb8; display: grid; place-items: center; }
  [data-swatch="teal"] { background: #237870; }
  [data-swatch="blue"] { background: #356fa7; }
  [data-swatch="plum"] { background: #855f97; }
  [data-swatch="copper"] { background: #985d3a; }
  .color-chip svg { visibility: hidden; width: 14px; height: 14px; color: white; stroke-width: 2.8; }
  .color-choice input:checked + .color-chip svg { visibility: visible; }
  .color-choice:has(:checked), .timing-picker label:has(:checked) { border-color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent-dark); background: color-mix(in srgb,var(--accent-light) 35%,white); color: #182a2d; }
  .gate-form .color-choice:has(:checked) { border-color: var(--accent-light); background: #162e32b3; box-shadow: inset 0 0 0 1px var(--accent-light); color: white; }
  .color-choice:has(:focus-visible), .timing-picker label:has(:focus-visible) { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
  .gate-form .color-choice:has(:focus-visible) { outline-color: var(--accent-light); }
  .timing-picker > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .timing-picker label { font-size: 14px; font-weight: 560; }
  .timing-picker { margin-bottom: 7px; }
  .timing-hint { margin-bottom: 2px; }
  .deadline-note { display: block; color: var(--text); margin-top: 2px; font-size: 12px; }
}
@layer personalization {
  .day-hours { min-inline-size: 0; padding: 0; margin: 16px 0 12px; border: 0; }
  .day-hours legend { padding: 0; font-size: 14px; font-weight: 620; }
  .day-hours .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
  .day-hours .field { margin: 4px 0 5px; min-width: 0; }
  .field input:is([type="time"], [type="date"]) { box-sizing: border-box; min-inline-size: 0; max-inline-size: 100%; }
  .form-grid > .field { min-inline-size: 0; }
  @supports (-webkit-touch-callout: none) {
    .field input:is([type="time"], [type="date"]) { -webkit-appearance: none; appearance: none; }
  }
  .day-hours .hint { margin-top: 3px; font-size: 12px; }
  .day-range { margin-top: 9px; color: #e7f2ef; font-size: 12px; font-weight: 560; }
  #hours-form { padding-block: 2px 14px; border-block: 1px solid var(--line); }
}

@layer calendar {
  .calendar-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:16px; align-items:start; }
  .month-head, .month-head>div, .repeat-presets { display:flex; align-items:center; gap:6px; }
  .month-head { justify-content:space-between; margin-bottom:12px; }
  .month-head h2,.agenda h2,.series-panel h2 { font-size:clamp(19px,2vw,25px); }
  .month-head .previous svg { transform:rotate(180deg); }
  .month-grid,.week-picks { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; text-align:center; }
  .weekday { padding:5px 0; font-size:12px; font-weight:600; color:var(--muted); }
  .month-day { display:grid; justify-items:center; align-content:center; gap:2px; min-height:46px; padding:4px 0; border-radius:9px; font-variant-numeric:tabular-nums; font-weight:550; }
  .month-day:hover { background:#e2eae7; }
  .month-day.outside { color:#586966; }
  .month-day[aria-current="date"] { box-shadow:inset 0 0 0 1.5px var(--accent-dark); }
  .month-day[aria-pressed="true"] { background:var(--accent-dark);color:white; }
  .event-dots { display:flex; justify-content:center; gap:3px; min-height:5px; }
  .event-dots i { width:5px; height:5px; background:var(--dot); border-radius:50%; }
  .month-day[aria-pressed="true"] i { background:white; }
  .agenda h2 { margin-bottom:12px; }
  .agenda .secondary { margin-top:10px; }
  .calendar-empty { margin:15px 0; }
  .series-panel { margin-top:16px; }
  .repeat-presets { flex-wrap:wrap; margin:9px 0; color:var(--muted); font-size:12px; }
  .repeat-presets button { font-size:13px; }
  .projected-row { display:flex; width:100%; align-items:center; gap:8px; text-align:start; min-height:55px; padding:8px 0; }
  .projected-row strong,.series-panel strong { overflow-wrap:anywhere; }
  .projected-row>svg { margin-inline-start:auto; }
  .repeat-mark { color:var(--brand); padding:6px; }
  .repeat-box,#repeat-week { min-width:0; margin:10px 0; padding:0; border:0; }
  .repeat-box legend,#repeat-week legend { font-size:13px; font-weight:620; margin:0 0 4px; }
  .repeat-box .form-grid .field { margin-block:5px; }
  .week-picks label { display:grid; position:relative; place-items:center; min-height:44px; border:1px solid var(--line); border-radius:7px; font-size:12px; cursor:pointer; }
  .week-picks input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
  .week-picks label:has(:checked) { background:var(--accent-dark); color:white; }
  .week-picks label:has(:focus-visible) { outline:3px solid var(--brand); outline-offset:2px; }
  @media(max-width:1050px){.calendar-layout{grid-template-columns:1fr;}}
  @media(max-width:650px){.month-panel{padding:12px 7px}.month-head{padding-inline:4px}.month-grid{gap:1px}.month-head .icon{width:40px}.month-head>div{gap:0}#bottom-nav button{min-width:0;font-size:10px}.agenda{padding:15px 10px;}}
}

@layer personalization {
  .bedtime-settings { min-inline-size: 0; padding: 0; border: 0; margin: 16px 0 12px; }
  .bedtime-settings legend { padding: 0; font-size: 14px; font-weight: 620; }
  .bedtime-settings .field { max-width: 15em; margin: 4px 0; }
  .check-option { display: flex; align-items: center; gap: 10px; min-height: 44px; width: fit-content; cursor: pointer; }
  .check-option input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent-dark); }
  .bedtime-line, .bedtime-card { display: flex; align-items: center; gap: 7px; }
  .bedtime-line { font-size: 12px; font-weight: 560; margin-top: 3px; color: #e7f2ef; }
  .bedtime-line svg { width: 15px; height: 15px; }
  .bedtime-card { border-top: 1px solid var(--line); padding: 10px 3px 0; margin-top: 10px; }
  .bedtime-card svg { color: var(--brand); }
  .bedtime-card small { display: block; color: var(--muted); }
  .gate-form input[type="time"], .gate-form input[type="checkbox"] { color-scheme: dark; }
  .gate-form .check-option input { accent-color: var(--accent-light); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .gate-form { background-color: rgb(9 26 32 / 42%); }
    @media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
      .gate-form { background: #29474a; }
    }
  }
  :is(dialog,.shop-tools) :is(.field input,.field select,.field textarea,.search-input,.lang-select,#currency) { border-color: #647b77; }
  .navbody .on, #bottom-nav .selected, .filters .active, .timer-modes .active {
    text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em;
  }
}
@layer calendar {
  @media (forced-colors: active) {
    .month-day[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
    .month-day[aria-current="date"] > span:first-child { text-decoration: underline double; text-underline-offset: 3px; }
    .month-day:focus-visible { outline: 3px dashed Highlight; outline-offset: -1px; }
    .event-dots i, #bell-dot { border: 2px solid CanvasText; }
    #bell-dot { outline: 1px solid Canvas; }
    .timing-picker input:checked ~ span::after, .week-picks input:checked ~ span::after { content: " ✓" / ""; font-weight: 700; }
    .auth-tabs .active { text-decoration: underline; text-underline-offset: .25em; }
  }
}

/* Connector (Claude, ChatGPT) in Settings */
.connector-url{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px}
.connector-url code{flex:1 1 220px;min-width:0;overflow-wrap:anywhere;font-size:.84rem;padding:9px 11px;border-radius:10px;background:var(--soft,rgba(18,54,57,.06));border:1px solid var(--line)}
.connector-url button{margin-top:0}
.connected-apps{margin-top:10px}
.connected-app{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.connected-app:first-child{border-top:0}
.connected-app>div{display:grid;gap:2px;min-width:0}
.connected-app b{overflow-wrap:anywhere}
.connected-app button{margin-top:0;flex:none}

/* ---- AI-ready features: lists, Inbox, people, photos, protected time, brief, recent changes */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.nav-count{margin-inline-start:auto;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--brand);color:#fff;font-size:11px;font-weight:650;display:inline-grid;place-items:center}
.lists-edit{display:flex;align-items:center;gap:8px;width:100%;min-height:38px;padding:6px 9px;border-radius:10px;color:var(--muted);font-size:13px}
.lists-edit svg{width:15px;height:15px}.lists-edit:hover{background:#e1ece9}
.lists-editor{display:grid;gap:8px;margin:12px 0}
.list-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:44px;padding:6px 8px;border:1px solid var(--line);border-radius:12px;background:#fff}
.list-row.builtin{background:#f4f8f7;color:var(--muted)}.list-row.builtin span:first-of-type{color:var(--ink);font-weight:560;flex:1}
.list-row input{flex:1 1 140px;min-width:0;min-height:38px;border:1px solid var(--line);border-radius:9px;padding:6px 9px;background:#fff}
.list-row select{min-height:38px;border:1px solid var(--line);border-radius:9px;padding:6px;background:#fff}
.list-row .icon svg{width:16px}.list-new{border-style:dashed}
.photo-strip{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.photo-thumb{position:relative;display:block;width:76px;height:76px;border-radius:12px;overflow:hidden;background:#e4eeeb;border:1px solid var(--line);padding:0;flex:none}
.photo-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.photo-x{position:absolute;top:4px;right:4px;width:28px;height:28px;border-radius:50%;background:rgb(16 46 50 / 78%);color:#fff;display:grid;place-items:center}
.photo-x svg{width:13px;height:13px}
.photo-add{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:76px;height:76px;border:1px dashed #9fb8b4;border-radius:12px;color:var(--muted);font-size:11px;line-height:1.2;text-align:center;padding:4px}
.photo-add svg{width:20px;height:20px}.photo-add:hover{background:#eef5f3;color:var(--ink)}
.photo-view{margin:0 0 12px}.photo-view img{display:block;max-width:100%;max-height:70vh;margin:0 auto;border-radius:12px}
.photo-count,.waiting-tag{display:inline-flex;align-items:center;gap:4px}
.waiting-tag{background:#fdf0d8;color:#6b4a0c;border-radius:5px;padding:2px 6px;font-size:11px;font-weight:560}
.waiting-tag svg,.photo-count svg{width:12px;height:12px}
.capture{padding:14px;border:1px solid var(--line);border-radius:var(--radius);margin-bottom:18px;display:grid;gap:10px}
.capture textarea{width:100%;min-height:76px;border:1px solid var(--line);border-radius:12px;padding:11px 12px;background:#fff;resize:vertical}
.capture-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.capture-actions .secondary{display:inline-flex;align-items:center;gap:6px}.capture-actions .secondary svg{width:16px}
.capture-actions .primary{margin-inline-start:auto}
.inbox-items{display:grid;gap:10px}
.inbox-item{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;padding:13px 14px;border:1px solid var(--line);border-radius:14px}
.inbox-text{flex:1 1 260px;min-width:0}.inbox-text p[data-user]{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink)}
.inbox-text .meta{display:flex;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:12px;margin-top:4px}
.inbox-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.inbox-actions .secondary{padding:7px 11px}
.people-card{padding:4px 8px}
.person-row{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:9px 6px;text-align:start}
.person-row + .person-row{border-top:1px solid #dae4e0}.person-row > svg{width:16px;color:var(--muted)}
.person-text{flex:1;min-width:0;display:grid;gap:2px}.person-text .meta{display:flex;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:12px}
.avatar{width:42px;height:42px;border-radius:50%;flex:none;display:grid;place-items:center;background:#d7e9e5;color:var(--brand);font-weight:650;overflow:hidden}
.avatar.photo-thumb{border:0}
.person-head{display:flex;gap:14px;align-items:center;margin-bottom:12px}.person-head .avatar{width:56px;height:56px;font-size:18px}
.person-contact{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.person-contact a{display:inline-flex;align-items:center;gap:6px;min-height:42px;border-radius:10px}.person-contact svg{width:15px}
.person-notes{white-space:pre-wrap;margin-bottom:8px}
.person-section{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.person-section h3{margin-bottom:8px;font-size:15px}
.person-log-form{display:grid;gap:8px;margin-bottom:10px}
.person-log{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.person-log li{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:start;padding:8px 0;border-top:1px solid #e2ebe8}
.person-log p{white-space:pre-wrap;overflow-wrap:anywhere}.person-log .cap{white-space:nowrap;padding-top:2px}
#today-extra{display:grid;gap:12px;margin-bottom:18px}
.brief{padding:16px 18px;border:1px solid #b9d6d0;border-radius:var(--radius);background:linear-gradient(160deg,#f4fbf9,#eaf5f2)}
.brief-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.brief-head .cap{display:inline-flex;align-items:center;gap:6px;color:var(--brand)}.brief-head .cap svg{width:15px}
.brief-head .text-btn{margin-inline-start:auto;min-height:34px}
.brief-body{color:var(--ink)}.brief-body p + p,.brief-body ul,.brief-body ol,.brief-body h2,.brief-body h3{margin-top:8px}
.brief-body ul,.brief-body ol{padding-inline-start:20px;margin-bottom:0}
.today-chips{display:flex;flex-wrap:wrap;gap:8px}
.today-chip{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:7px 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:13px;text-align:start}
.today-chip svg{width:15px;flex:none}.today-chip:hover{background:#eaf3f1}
.today-chip.guard{background:#f3effa;border-color:#d8cdea}.today-chip.guard svg{color:#5d4a86}
.event-dots .guard-dot{background:#7a62a8;border-radius:1.5px;transform:rotate(45deg) scale(.9)}
.block-row{display:flex;align-items:center;gap:12px;width:100%;min-height:54px;padding:9px 10px;text-align:start;border:1px solid #d8cdea;border-radius:12px;background:#f6f2fb;margin-bottom:8px}
.block-row > span:nth-child(2){flex:1;min-width:0;display:grid;gap:2px}.block-row .meta{display:flex;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:12px}
.block-row > svg{width:16px;color:var(--muted)}
.block-mark{width:32px;height:32px;border-radius:9px;background:#e6dcf3;color:#5d4a86;display:grid;place-items:center;flex:none}.block-mark svg{width:16px}
.agenda-add{display:flex;flex-wrap:wrap;gap:8px}
.check-field{display:flex;flex-direction:row;align-items:center;gap:8px;align-self:end;min-height:44px}
.check-field input{width:20px;height:20px}
.activity{list-style:none;margin:12px 0;padding:0;display:grid}
.activity li{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:10px 0;border-top:1px solid var(--line)}
.activity li > div{display:grid;gap:2px;min-width:0}.activity li span[data-user]{overflow-wrap:anywhere}
.activity li.undone{opacity:.6}.activity li.undone b{text-decoration:line-through}
.note-photos .photo-strip{margin:4px 0 8px}
@media (max-width:640px){
  .inbox-actions{width:100%}.inbox-actions .secondary{flex:1}
  .capture-actions .primary{width:100%;margin-inline-start:0}
  .person-log li{grid-template-columns:1fr auto}.person-log .cap{grid-column:1/-1}
}
@media (pointer:fine) and (min-width:900px){ .navbody button{min-height:36px;padding-block:6px} .navbody .lists{margin-top:16px} }
.brief .brief-body{min-height:0;padding:0}
