    :root {
      --bg: #f6f7f3;
      --white: #fff;
      --surface: #fffdf8;
      --surface-soft: #eceae1;
      --surface-disabled: #f2efe8;
      --ink: #1f2320;
      --muted: #68706b;
      --line: #d8d4c8;
      --line-dashed: var(--line-dashed);
      --green: #2e7d67;
      --green-soft: #dcefe8;
      --green-border-soft: rgba(46, 125, 103, 0.42);
      --amber: #b96a16;
      --amber-soft: #fff1d4;
      --red: #a24b43;
      --red-soft: #f8e4e0;
      --red-wash: #fff8f7;
      --blue: #3e6f8e;
      --blue-soft: #e4eef3;
      --focus-soft: #fff8e6;
      --done-soft: #f0faf5;
      --surface-glass: rgba(255, 253, 248, 0.78);
      --surface-glass-strong: rgba(255, 253, 248, 0.84);
      --scrim: rgba(32, 33, 36, 0.34);
      --scrim-soft: rgba(32, 33, 36, 0.32);
      --floating-surface: rgba(255, 253, 248, 0.96);
      --mobile-surface-glass: rgba(246, 247, 243, 0.94);
      --toggle-shadow: 0 2px 5px rgba(32, 33, 36, 0.16);
      --shadow: 0 18px 42px rgba(31, 35, 32, 0.08);
      --radius: 8px;
      --mobile-top-height: 74px;
      --view-head-action-width: 280px;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      min-height: 100%;
      margin: 0;
      background: var(--bg);
      color: var(--ink);
      font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
      letter-spacing: 0;
    }

    body {
      overflow-x: hidden;
    }

    [data-client-mode="web"] [data-pwa-only] {
      display: none !important;
    }

    button,
    input,
    select,
    textarea {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 252px minmax(0, 1fr);
    }

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 28px 22px;
      border-right: 1px solid var(--line);
      background: var(--surface-glass);
      display: flex;
      flex-direction: column;
      gap: 28px;
    }

    .brand {
      display: grid;
      gap: 4px;
    }

    .brand-refresh,
    .mobile-brand-refresh {
      appearance: none;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      text-align: left;
      padding: 0;
      cursor: pointer;
    }

    .brand-refresh:focus-visible,
    .mobile-brand-refresh:focus-visible {
      outline: 3px solid color-mix(in srgb, var(--green) 42%, white);
      outline-offset: 4px;
      border-radius: 8px;
    }

    .brand h1 {
      margin: 0;
      font-size: 34px;
      line-height: 1;
      font-weight: 950;
    }

    .brand p {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      font-weight: 750;
    }

    .nav {
      display: grid;
      gap: 8px;
    }

    .nav button {
      width: 100%;
      border: 0;
      border-radius: var(--radius);
      background: transparent;
      color: var(--muted);
      padding: 13px 14px;
      text-align: left;
      font-weight: 900;
    }

    .nav button.active {
      background: var(--surface-soft);
      color: var(--ink);
    }

    .nav-section {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 14px 2px 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
    }

    .nav-section::after {
      content: "";
      height: 1px;
      flex: 1;
      background: var(--line);
    }

    .main {
      min-width: 0;
      padding: 28px clamp(18px, 4vw, 54px) 52px;
    }

    .mobile-top {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 16px;
    }

    .mobile-top strong {
      font-size: 24px;
      font-weight: 950;
    }

    .mobile-brand-refresh {
      display: block;
    }

    .mobile-console-label {
      margin: 4px 0 0;
      font-size: 14px;
    }

    .icon-button {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--ink);
      width: 44px;
      height: 44px;
      font-size: 22px;
      font-weight: 950;
    }

    .view {
      display: none;
      gap: 18px;
    }

    .view.active {
      display: grid;
    }

    .hero {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
      padding: clamp(18px, 3vw, 28px);
      display: grid;
      grid-template-columns: minmax(0, 1.16fr) minmax(280px, 0.84fr);
      gap: 28px;
      align-items: stretch;
    }

    .today-note {
      display: grid;
      gap: 20px;
      align-content: space-between;
      min-height: 282px;
    }

    .eyebrow {
      margin: 0 0 14px;
      color: var(--green);
      font-size: 17px;
      line-height: 1.4;
      font-weight: 950;
    }

    .buddy-copy {
      margin: 0;
      color: var(--muted);
      font-size: clamp(17px, 1.35vw, 22px);
      line-height: 1.58;
      font-weight: 800;
    }

    .review-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .review-chip {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      color: var(--muted);
      min-height: 34px;
      padding: 6px 11px;
      font-size: 13px;
      font-weight: 800;
    }

    .review-chip strong {
      color: var(--ink);
      font-weight: 900;
    }

    .flow {
      display: grid;
      gap: 14px;
    }

    .section-title {
      margin: 0;
      font-size: clamp(24px, 2.4vw, 34px);
      line-height: 1.2;
      font-weight: 950;
    }

    .flow-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .flow-tile {
      min-height: 96px;
      border-radius: var(--radius);
      background: var(--surface-soft);
      padding: 18px;
      display: grid;
      align-content: center;
      gap: 3px;
    }

    .flow-tile strong {
      font-size: clamp(30px, 3vw, 42px);
      line-height: 1;
      font-weight: 950;
    }

    .flow-tile span {
      color: var(--muted);
      font-weight: 900;
    }

    .primary-wide {
      width: 100%;
      border: 0;
      border-radius: var(--radius);
      background: var(--ink);
      color: var(--white);
      min-height: 54px;
      padding: 14px 18px;
      font-size: 18px;
      font-weight: 950;
    }

    .view-head-action {
      max-width: var(--view-head-action-width);
    }

    .quick-add {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 14px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 14px;
      align-items: center;
    }

    .quick-add strong {
      white-space: nowrap;
      font-size: 15px;
      font-weight: 950;
    }

    .quick-buttons {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
      gap: 10px;
    }

    .dash-button {
      min-height: 46px;
      border: 1px dashed var(--line-dashed);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 10px 12px;
      font-weight: 950;
    }

    .drawer-kicker {
      margin-bottom: 6px;
    }

    .content-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 22px;
      align-items: start;
    }

    .panel {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 22px;
      display: grid;
      gap: 16px;
    }

    .panel-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .panel-head h2 {
      margin: 0;
      font-size: clamp(24px, 2vw, 30px);
      line-height: 1.25;
      font-weight: 950;
    }

    .count {
      color: var(--muted);
      font-size: 18px;
      font-weight: 950;
    }

    .schedule-list {
      display: grid;
      gap: 14px;
    }

    .schedule-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 16px;
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      align-items: start;
    }

    .schedule-card.important {
      border-color: color-mix(in srgb, var(--amber) 62%, white);
      background: var(--focus-soft);
    }

    .schedule-card.done {
      border-color: color-mix(in srgb, var(--green) 35%, white);
      background: var(--done-soft);
    }

    .schedule-card.canceled {
      border-color: color-mix(in srgb, var(--red) 32%, white);
      background: var(--red-wash);
      opacity: 0.78;
    }

    .card-main {
      min-width: 0;
      display: grid;
      gap: 10px;
    }

    .badges {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .badge {
      border-radius: 999px;
      background: var(--surface-soft);
      color: var(--muted);
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 950;
    }

    .badge.must {
      background: var(--amber-soft);
      color: var(--amber);
    }

    .badge.sensitive {
      background: var(--blue-soft);
      color: var(--blue);
    }

    .schedule-card h3 {
      margin: 0;
      font-size: 23px;
      line-height: 1.28;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .schedule-card p {
      margin: 0;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.55;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .card-actions {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
      gap: 8px;
      width: 100%;
    }

    .action {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      min-height: 44px;
      padding: 8px 9px;
      font-size: 14px;
      font-weight: 950;
    }

    .action.primary {
      border-color: color-mix(in srgb, var(--green) 35%, white);
      background: var(--green-soft);
      color: var(--green);
    }

    .action.danger {
      border-color: color-mix(in srgb, var(--red) 32%, white);
      background: var(--white);
      color: var(--ink);
    }

    .action:disabled {
      cursor: default;
      opacity: 0.72;
    }

    .period-views,
    .settings-grid {
      display: grid;
      gap: 18px;
    }

    .view-head {
      display: flex;
      justify-content: space-between;
      align-items: end;
      gap: 18px;
    }

    .view-head h2 {
      margin: 0;
      font-size: clamp(34px, 4vw, 54px);
      line-height: 1.08;
      font-weight: 950;
    }

    .view-head p {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 17px;
      line-height: 1.5;
      font-weight: 750;
    }

    .date-group {
      display: grid;
      gap: 12px;
    }

    .date-line {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--green);
      font-weight: 950;
    }

    .date-line::after {
      content: "";
      height: 1px;
      flex: 1;
      background: var(--line);
    }

    .history-tools {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr) minmax(130px, 0.2fr);
      gap: 12px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface-glass-strong);
    }

    .history-tools label,
    .history-filter-field {
      min-width: 0;
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 950;
    }

    .history-tools input,
    .history-tools select {
      width: 100%;
      min-width: 0;
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 10px 12px;
      font-size: 15px;
      font-weight: 800;
    }

    .history-filter-options {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      min-height: 44px;
    }

    .history-filter-option {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      color: var(--muted);
      padding: 8px 12px;
      font-size: 14px;
      font-weight: 950;
      cursor: pointer;
    }

    .history-filter-option.active {
      border-color: var(--green-border-soft);
      background: var(--mint);
      color: var(--green);
    }

    .history-custom-range {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .history-custom-range[hidden] {
      display: none;
    }

    .history-mode {
      color: var(--muted);
      font-size: 14px;
      font-weight: 850;
    }

    .history-days {
      display: grid;
      gap: 16px;
    }

    .history-day {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 18px;
      display: grid;
      gap: 16px;
    }

    .history-day-head {
      display: block;
      border-bottom: 1px solid var(--line);
      padding-bottom: 14px;
      cursor: pointer;
      list-style: none;
    }

    .history-day-head::-webkit-details-marker {
      display: none;
    }

    .history-day:not([open]) .history-day-head {
      border-bottom: 0;
      padding-bottom: 0;
    }

    .history-day-head h3 {
      margin: 0;
      font-size: 24px;
      line-height: 1.24;
      font-weight: 950;
    }

    .history-morning-message {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 14px;
      font-weight: 800;
      line-height: 1.55;
    }

    .history-day:not([open]) .history-morning-message {
      display: none;
    }

    .history-summary-line {
      color: var(--green);
      font-size: 18px;
      font-weight: 950;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      margin-top: 6px;
    }

    .history-summary-line strong {
      font: inherit;
    }

    .history-toggle-label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .history-toggle-label::before {
      content: "· 접기";
    }

    .history-day:not([open]) .history-toggle-label::before {
      content: "· 펼치기";
    }

    .history-groups {
      display: grid;
      gap: 14px;
    }

    .history-group {
      display: grid;
      gap: 10px;
    }

    .history-group-title {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--green);
      font-weight: 950;
    }

    .history-group-title::after {
      content: "";
      height: 1px;
      flex: 1;
      background: var(--line);
    }

    .history-card-note {
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .week-flow {
      display: grid;
      gap: 10px;
    }

    .week-row {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 15px 16px;
      display: grid;
      grid-template-columns: 92px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
    }

    .week-row strong {
      font-size: 17px;
      font-weight: 950;
    }

    .week-row span {
      color: var(--muted);
      line-height: 1.5;
      font-weight: 780;
    }

    .settings-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 20px;
      display: grid;
      gap: 16px;
    }

    .settings-card-head {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: start;
    }

    .settings-card-head > div:first-child {
      display: grid;
      gap: 6px;
    }

    .settings-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .settings-card h3 {
      margin: 0;
      font-size: 22px;
      font-weight: 950;
    }

    .settings-card-head p {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
      font-weight: 750;
    }

    .settings-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(300px, 0.46fr);
      gap: 14px;
      align-items: center;
      padding-top: 12px;
      border-top: 1px solid var(--line);
    }

    .settings-card.notifications-off [data-notification-dependent] {
      opacity: 0.62;
      background: var(--surface-disabled);
      border-radius: 12px;
      padding: 12px;
      border-top-color: transparent;
    }

    .settings-card.notifications-off [data-notification-dependent] + [data-notification-dependent] {
      margin-top: -4px;
    }

    .settings-row:first-of-type {
      border-top: 0;
      padding-top: 0;
    }

    .settings-row label,
    .settings-label {
      display: grid;
      gap: 4px;
      font-weight: 950;
    }

    .settings-row small {
      color: var(--muted);
      font-weight: 700;
      line-height: 1.45;
    }

    .settings-row input,
    .settings-row select {
      width: 100%;
      min-width: 0;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 9px 10px;
    }

    .settings-row input:disabled,
    .settings-row select:disabled {
      background: var(--surface-disabled);
      color: var(--muted);
      -webkit-text-fill-color: var(--muted);
      opacity: 1;
    }

    .settings-control {
      display: grid;
      min-width: 0;
      gap: 8px;
    }

    .settings-control.inline {
      grid-template-columns: minmax(0, 1fr) auto auto;
      align-items: center;
    }

    .settings-control.split {
      grid-template-columns: minmax(0, 1fr) minmax(120px, 0.46fr);
      align-items: center;
      gap: 10px;
    }

    .quiet-times {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      align-items: end;
    }

    .time-field {
      display: grid;
      min-width: 0;
      gap: 5px;
    }

    .time-field span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .setting-edit-button {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      min-height: 42px;
      padding: 9px 13px;
      font-weight: 950;
      white-space: nowrap;
    }

    .setting-edit-button.primary {
      border-color: var(--ink);
      background: var(--ink);
      color: var(--white);
    }

    .setting-edit-button:disabled {
      cursor: wait;
      opacity: 0.72;
    }

    @media (max-width: 1500px) {
      .settings-row {
        grid-template-columns: 1fr;
        align-items: start;
      }

      .settings-control.split,
      .quiet-times {
        grid-template-columns: 1fr;
      }

      .history-tools {
        grid-template-columns: 1fr;
      }
    }

    .overlay {
      position: fixed;
      inset: 0;
      z-index: 50;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.18s ease;
    }

    .overlay.open {
      pointer-events: auto;
      opacity: 1;
    }

    .confirm-overlay {
      position: fixed;
      inset: 0;
      z-index: 40;
      pointer-events: none;
      opacity: 0;
      display: grid;
      place-items: center;
      padding: 24px 18px;
      transition: opacity 0.18s ease;
    }

    .confirm-overlay.open {
      pointer-events: auto;
      opacity: 1;
    }

    .confirm-overlay[data-first-push-prompt] {
      place-items: end center;
      padding: 18px;
      padding-bottom: max(18px, env(safe-area-inset-bottom));
      background: var(--scrim);
    }

    .confirm-overlay[data-first-push-prompt] .confirm-dialog {
      width: min(520px, 100%);
      border-radius: 18px 18px 12px 12px;
      padding: 24px 22px 22px;
      transform: translateY(24px);
      transition: transform 0.22s ease;
    }

    .confirm-overlay[data-first-push-prompt].open .confirm-dialog {
      transform: translateY(0);
    }

    .confirm-overlay[data-first-push-prompt] .confirm-dialog h2 {
      font-size: 26px;
    }

    .confirm-overlay[data-first-push-prompt] .confirm-dialog p {
      color: var(--text);
      font-size: 16px;
    }

    .confirm-overlay[data-cancel-confirm].open {
      z-index: 70;
    }

    .scrim {
      position: absolute;
      inset: 0;
      background: var(--scrim-soft);
    }

    .confirm-dialog {
      position: relative;
      z-index: 1;
      width: min(420px, 100%);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
      padding: 22px;
      display: grid;
      gap: 14px;
    }

    .confirm-dialog h2 {
      margin: 0;
      font-size: 24px;
      line-height: 1.25;
      font-weight: 950;
    }

    .confirm-dialog p {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
      font-weight: 750;
    }

    .confirm-target {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: color-mix(in srgb, var(--surface) 72%, var(--surface-soft));
      padding: 12px;
      font-weight: 950;
    }

    .modal-list {
      display: grid;
      gap: 10px;
      align-content: start;
      align-items: start;
    }

    .work-dialog {
      width: min(860px, 100%);
      height: min(720px, 78vh);
      max-height: calc(100vh - 48px);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .work-dialog .modal-list {
      min-height: 0;
      flex: 1 1 auto;
      overflow-y: auto;
      padding-right: 4px;
      padding-bottom: 14px;
      grid-auto-rows: max-content;
      align-content: start;
      align-items: start;
    }

    .modal-group {
      display: grid;
      gap: 10px;
      align-content: start;
      align-items: start;
    }

    .modal-line {
      margin-top: 4px;
      font-size: 14px;
    }

    .modal-group:first-child .modal-line {
      margin-top: 0;
    }

    .work-dialog .schedule-card {
      padding: 12px;
      gap: 9px;
      align-self: start;
    }

    .work-dialog .card-main {
      gap: 7px;
    }

    .work-dialog .badges {
      gap: 6px;
    }

    .work-dialog .badge {
      padding: 4px 8px;
      font-size: 11px;
    }

    .work-dialog .schedule-card h3 {
      font-size: 18px;
      line-height: 1.25;
    }

    .work-dialog .schedule-card p {
      font-size: 13px;
      line-height: 1.35;
    }

    .work-dialog .card-actions {
      gap: 6px;
      grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    }

    .work-dialog .action {
      min-height: 36px;
      padding: 6px 8px;
      font-size: 13px;
    }

    .schedule-detail {
      display: grid;
      gap: 10px;
    }

    .detail-row {
      display: grid;
      grid-template-columns: minmax(90px, 0.34fr) minmax(0, 1fr);
      gap: 10px;
      align-items: start;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: color-mix(in srgb, var(--surface) 76%, var(--surface-soft));
      padding: 11px 12px;
    }

    .detail-row span,
    .detail-note span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .detail-row strong {
      min-width: 0;
      color: var(--ink);
      font-size: 14px;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }

    .detail-note {
      display: grid;
      gap: 7px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 12px;
    }

    .detail-note p {
      color: var(--ink);
      font-size: 14px;
      line-height: 1.55;
      font-weight: 760;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }

    .work-dialog .confirm-actions {
      flex: 0 0 auto;
      padding-top: 14px;
      border-top: 1px solid var(--line);
      background: var(--surface);
    }

    .confirm-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .confirm-actions.single {
      grid-template-columns: 1fr;
    }

    .confirm-actions button {
      min-height: 44px;
      border-radius: var(--radius);
      padding: 10px 14px;
      font-weight: 950;
    }

    .drawer {
      position: absolute;
      top: 0;
      right: 0;
      width: min(620px, 100%);
      height: 100%;
      background: var(--surface);
      padding: 26px;
      overflow: auto;
      transform: translateX(100%);
      transition: transform 0.2s ease;
      display: grid;
      gap: 18px;
      align-content: start;
    }

    .overlay.open .drawer {
      transform: translateX(0);
    }

    .drawer-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
    }

    .drawer-head h2 {
      margin: 0;
      font-size: 31px;
      line-height: 1.18;
      font-weight: 950;
    }

    .form {
      display: grid;
      gap: 14px;
    }

    .form-section {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: color-mix(in srgb, var(--surface) 72%, var(--surface-soft));
      padding: 16px;
      display: grid;
      gap: 12px;
    }

    .form-section h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 950;
    }

    .form-help {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
      font-weight: 760;
    }

    .field-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .field {
      display: grid;
      gap: 7px;
    }

    .field.full {
      grid-column: 1 / -1;
    }

    .field label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .field input,
    .field textarea,
    .field select {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 10px 11px;
    }

    .field textarea {
      min-height: 86px;
      resize: vertical;
      line-height: 1.5;
    }

    .option-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .repeat-options {
      display: none;
    }

    .repeat-options.show {
      display: flex;
    }

    .repeat-detail {
      display: none;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 12px;
      gap: 10px;
    }

    .repeat-detail.show {
      display: grid;
    }

    .mini-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .weekday-row {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
    }

    .weekday-row button {
      min-width: 38px;
      min-height: 34px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      font-weight: 900;
    }

    .weekday-row button.active {
      border-color: color-mix(in srgb, var(--green) 35%, white);
      background: var(--green-soft);
      color: var(--green);
    }

    .option {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      color: var(--muted);
      padding: 8px 12px;
      font-weight: 900;
    }

    .option.active {
      background: var(--green-soft);
      border-color: color-mix(in srgb, var(--green) 35%, white);
      color: var(--green);
    }

    .switch-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
    }

    .toggle-label {
      color: var(--muted);
      font-weight: 900;
    }

    .toggle {
      width: 58px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--surface-soft);
      padding: 3px;
      position: relative;
      transition: background 0.18s ease, border-color 0.18s ease;
    }

    .toggle::after {
      content: "";
      position: absolute;
      top: 3px;
      left: 3px;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--white);
      box-shadow: var(--toggle-shadow);
      transition: transform 0.18s ease;
    }

    .toggle.on {
      border-color: color-mix(in srgb, var(--green) 35%, white);
      background: var(--green-soft);
    }

    .toggle.on::after {
      transform: translateX(24px);
    }

    .toggle:disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }

    .preview-card {
      border: 1px solid color-mix(in srgb, var(--amber) 62%, white);
      border-radius: var(--radius);
      background: var(--focus-soft);
      padding: 14px;
      display: grid;
      gap: 8px;
    }

    .preview-card h3 {
      margin: 0;
      font-size: 18px;
      line-height: 1.28;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .preview-card p {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
      font-weight: 760;
      overflow-wrap: anywhere;
    }

    .drawer-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding-top: 4px;
    }

    .drawer-actions button {
      border-radius: var(--radius);
      min-height: 44px;
      padding: 10px 16px;
      font-weight: 950;
    }

    .secondary {
      border: 1px solid var(--line);
      background: var(--white);
      color: var(--ink);
    }

    .primary {
      border: 0;
      background: var(--ink);
      color: var(--white);
    }

    .toast {
      position: fixed;
      left: 50%;
      bottom: 22px;
      z-index: 60;
      transform: translate(-50%, 16px);
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--ink);
      color: var(--white);
      box-shadow: var(--shadow);
      padding: 11px 16px;
      font-size: 14px;
      font-weight: 900;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .toast.show {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    .pull-refresh {
      position: fixed;
      left: 50%;
      top: calc(12px + env(safe-area-inset-top));
      z-index: 45;
      min-width: 132px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--floating-surface);
      color: var(--muted);
      box-shadow: var(--shadow);
      padding: 9px 14px;
      font-size: 13px;
      font-weight: 900;
      text-align: center;
      opacity: 0;
      pointer-events: none;
      transform: translate(-50%, -18px);
      transition: opacity 0.16s ease, transform 0.16s ease, color 0.16s ease;
    }

    .pull-refresh.visible {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    .pull-refresh.ready {
      color: var(--green);
    }

    .menu-drawer {
      position: fixed;
      inset: 0;
      z-index: 30;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.18s ease;
    }

    .menu-drawer.open {
      pointer-events: auto;
      opacity: 1;
    }

    .menu-panel {
      position: absolute;
      inset: 0 auto 0 0;
      width: min(320px, 100%);
      background: var(--surface);
      padding: 26px 22px;
      transform: translateX(-100%);
      transition: transform 0.2s ease;
      display: grid;
      align-content: start;
      gap: 24px;
    }

    .menu-drawer.open .menu-panel {
      transform: translateX(0);
    }

    @media (max-width: 1180px) {
      html,
      body {
        height: 100%;
        overflow: hidden;
      }

      .app {
        grid-template-columns: 1fr;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
      }

      .sidebar {
        display: none;
      }

      .mobile-top {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 15;
        min-height: var(--mobile-top-height);
        margin: 0 0 18px;
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
        background: var(--mobile-surface-glass);
        backdrop-filter: blur(10px);
      }

      .main {
        padding-top: 0;
        height: 100vh;
        height: 100dvh;
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom));
      }

      .hero {
        grid-template-columns: 1fr;
      }

      .today-note {
        min-height: auto;
      }

      .content-grid {
        grid-template-columns: 1fr;
      }

      .settings-row {
        grid-template-columns: 1fr;
        align-items: start;
      }
    }

    @media (max-width: 760px) {
      .main {
        padding-inline: 14px;
      }

      .mobile-top {
        margin-bottom: 16px;
      }

      .hero,
      .panel,
      .settings-card {
        padding: 16px;
      }

      .settings-card-head {
        display: grid;
      }

      .settings-title-row {
        width: 100%;
      }

      .hero {
        gap: 14px;
      }

      .today-note {
        gap: 14px;
      }

      .quick-add {
        grid-template-columns: 1fr;
      }

      .quick-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .field-grid {
        grid-template-columns: 1fr;
      }

      .review-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .history-custom-range {
        grid-template-columns: 1fr;
      }

      .review-chip {
        width: 100%;
        min-height: 38px;
        padding: 7px 8px;
        font-size: 12px;
        text-align: center;
      }

      .flow {
        gap: 10px;
      }

      .section-title {
        font-size: 30px;
      }

      .flow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }

      .flow-tile {
        min-height: 74px;
        padding: 12px 14px;
      }

      .flow-tile strong {
        font-size: 32px;
      }

      .flow-tile span {
        font-size: 13px;
        line-height: 1.25;
      }

      .primary-wide {
        min-height: 48px;
        padding: 12px 14px;
        font-size: 16px;
      }

      .schedule-card {
        grid-template-columns: 1fr;
      }

      .history-day {
        padding: 14px;
      }

      .history-day-head {
        display: block;
      }

      .buddy-copy {
        font-size: clamp(16px, 4.2vw, 19px);
      }

      .week-row,
      .settings-row {
        grid-template-columns: 1fr;
      }

      .settings-control.inline,
      .quiet-times {
        grid-template-columns: 1fr;
      }

      .drawer {
        width: 100%;
        padding: 20px 14px;
      }

      .view-head {
        display: grid;
        align-items: start;
      }
    }
