/* AlberTask — estilos (antes ficavam dentro do index.html) */
  :root {
    color-scheme: light;
    --bg: #f2ede1;
    --surface: #faf6ec;
    --surface2: #ece5d3;
    --border: #d8cfba;
    --text: #2a2419;
    --text2: #6f6552;
    --text3: #a39882;
    --accent: #8c3b2a;
    --accent-light: #f0ddd4;
    --green: #4e7a52;
    --green-light: #e2ead9;
    --red: #b0342b;
    --red-light: #f4ddd6;
    --orange: #a8742a;
    --orange-light: #f0e3c6;
    --amber-light: #efe3c2;
    --amber-text: #7a5b18;
    --radius: 10px;
    --shadow: 3px 3px 0 rgba(42,36,25,0.08);
    --paper-dot: rgba(42,36,25,0.045);
  }
  [data-theme="dark"] {
    --bg: #191512;
    --surface: #211c17;
    --surface2: #2b251d;
    --border: #3d352a;
    --text: #ece3d2;
    --text2: #a89a80;
    --text3: #6f6452;
    --accent: #c99a4e;
    --accent-light: #3a3220;
    --green: #7fae7f;
    --green-light: #23301f;
    --red: #d97b6c;
    --red-light: #3a221c;
    --orange: #d9a24e;
    --orange-light: #3a2f1a;
    --amber-light: #3a3117;
    --amber-text: #e3c06e;
    --shadow: 3px 3px 0 rgba(0,0,0,0.4);
    --paper-dot: rgba(236,227,210,0.03);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; transition: background .2s; }
  input, button { font-family: inherit; }

  /* HEADER */
  .header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 58px; position: sticky; top: 0; z-index: 100; gap: 10px; }
  .header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .logo { font-weight: 800; font-size: 17px; color: var(--accent); white-space: nowrap; }
  .date-badge { background: var(--accent-light); color: var(--accent); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-right { display: flex; align-items: center; gap: 6px; }
  .nav-tabs { display: flex; gap: 4px; }
  .nav-tab { background: none; border: none; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text2); transition: all .15s; }
  .nav-tab.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
  .nav-tab:hover:not(.active) { background: var(--surface2); }
  .icon-btn { background: none; border: none; cursor: pointer; font-size: 17px; padding: 6px 9px; border-radius: 8px; color: var(--text2); }
  .icon-btn:hover { background: var(--surface2); }

  .main { max-width: 860px; margin: 0 auto; padding: 24px 16px 80px; }

  /* PROGRESS CARD */
  .progress-card { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
  .progress-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
  .progress-title { font-size: 13px; font-weight: 600; color: var(--text2); }
  .progress-stats { font-size: 12px; color: var(--text2); margin-top: 4px; }
  .progress-pct { font-size: 24px; font-weight: 800; color: var(--accent); }
  .progress-pct.complete { color: var(--green); }
  .progress-bar-track { height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
  .progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #8b9af9); border-radius: 4px; transition: width .4s ease; }
  .progress-bar-fill.complete { background: var(--green); }
  .celebrate { font-size: 13px; color: var(--green); font-weight: 600; margin-top: 8px; display: none; }
  .celebrate.show { display: block; }
  .streak { font-size: 12.5px; color: var(--orange); font-weight: 700; margin-top: 8px; }

  .check-all { background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text2); font-size: 11px; font-weight: 700; padding: 3px 9px; cursor: pointer; transition: all .15s; white-space: nowrap; }
  .check-all:hover { border-color: var(--green); color: var(--green); }
  .move-btn { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 13px; padding: 2px 5px; border-radius: 4px; line-height: 1; }
  .move-btn:hover { background: var(--surface2); color: var(--accent); }

  /* SECTIONS */
  .section { background: var(--surface); border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); overflow: hidden; }
  .section-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; cursor: pointer; user-select: none; transition: background .1s; gap: 8px; }
  .section-header:hover { background: var(--surface2); }
  .section-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .client-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
  .section-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .section-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .mini-progress { font-size: 12px; font-weight: 700; color: var(--text2); background: var(--surface2); padding: 3px 9px; border-radius: 10px; }
  .mini-progress.done { color: var(--green); background: var(--green-light); }
  .chevron { font-size: 10px; color: var(--text2); transition: transform .2s; }
  .section.open .chevron { transform: rotate(180deg); }
  .section-body { display: none; padding: 4px 0 12px; border-top: 1px solid var(--border); }
  .section.open .section-body { display: block; }

  .subsection-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text3); padding: 12px 18px 4px; }

  /* TASK ITEM */
  .task-item { display: flex; align-items: center; gap: 11px; padding: 8px 18px; transition: background .1s; }
  .task-item:hover { background: var(--surface2); }
  .task-item.done .task-text { text-decoration: line-through; color: var(--text3); }
  .task-checkbox { width: 21px; height: 21px; border: 2px solid var(--border); border-radius: 7px; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all .15s; background: var(--surface); }
  .task-checkbox:hover { border-color: var(--accent); }
  .task-checkbox.checked { background: var(--green); border-color: var(--green); }
  .task-checkbox.checked::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 800; }
  .task-text { font-size: 14px; flex: 1; line-height: 1.4; word-break: break-word; }
  .task-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 10px; background: var(--accent-light); color: var(--accent); font-weight: 600; flex-shrink: 0; }
  .task-tag.habit { background: var(--amber-light); color: var(--amber-text); }
  .task-tag.weekly { background: var(--orange-light); color: var(--orange); }
  .task-tag.monthly { background: #ecdfe7; color: #7d4a6a; }
  [data-theme="dark"] .task-tag.monthly { background: #38252f; color: #cf9ab8; }
  .task-tag.carried { background: var(--red-light); color: var(--red); }
  .task-delete { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 17px; opacity: 0; transition: all .1s; padding: 1px 7px; border-radius: 5px; line-height: 1; }
  .task-item:hover .task-delete { opacity: 1; }
  .task-delete:hover { background: var(--red-light); color: var(--red); }

  /* ADD ROW */
  .add-row { display: flex; align-items: center; gap: 8px; padding: 10px 18px 4px; }
  .add-input { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--text); background: var(--surface2); outline: none; transition: all .15s; }
  .add-input:focus { border-color: var(--accent); background: var(--surface); }
  .add-input::placeholder { color: var(--text3); }
  .add-btn { background: var(--accent); color: #fff; border: none; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: opacity .15s; }
  .add-btn:hover { opacity: .85; }
  .add-btn.secondary { background: var(--surface2); color: var(--text2); }
  .add-btn.secondary:hover { background: var(--border); }
  .add-btn.danger { background: var(--red-light); color: var(--red); }

  /* WEEKLY CARD */
  .weekly-banner { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 14px; box-shadow: var(--shadow); cursor: pointer; border-left: 4px solid var(--orange); }
  .weekly-banner:hover { background: var(--surface2); }
  .weekly-banner-title { font-size: 14px; font-weight: 700; }
  .weekly-banner-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }

  /* WEEK VIEW */
  .week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-bottom: 20px; }
  .week-day { background: var(--surface); border-radius: var(--radius); padding: 12px 6px; text-align: center; box-shadow: var(--shadow); cursor: pointer; border: 2px solid transparent; transition: all .15s; }
  .week-day:hover { border-color: var(--accent); }
  .week-day.today { border-color: var(--accent); }
  .week-day.selected { background: var(--accent-light); border-color: var(--accent); }
  .week-day-name { font-size: 10px; font-weight: 800; color: var(--text2); text-transform: uppercase; margin-bottom: 6px; }
  .week-ring { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 5px; display: flex; align-items: center; justify-content: center; }
  .week-ring-inner { background: var(--surface); border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; }
  .week-pct { font-size: 11px; font-weight: 600; color: var(--text2); }

  /* SETTINGS */
  .settings-section { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow); }
  .settings-title { font-size: 13px; font-weight: 800; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
  .settings-desc { font-size: 12.5px; color: var(--text2); margin-bottom: 14px; line-height: 1.4; }
  .settings-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
  .settings-input { flex: 1; min-width: 140px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 13px; outline: none; background: var(--surface2); color: var(--text); }
  .settings-input:focus { border-color: var(--accent); background: var(--surface); }
  .color-picker { border: 2px solid var(--border); border-radius: 8px; padding: 3px; width: 42px; height: 38px; cursor: pointer; background: var(--surface); }
  .divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
  .label { font-size: 12px; font-weight: 700; color: var(--text2); margin: 10px 0 6px; display: block; }

  /* CLIENT CARD (config) */
  .client-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
  .client-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
  .client-name-input { font-size: 14px; font-weight: 700; border: 1px solid transparent; background: none; color: var(--text); padding: 4px 8px; border-radius: 6px; flex: 1; min-width: 120px; outline: none; }
  .client-name-input:hover, .client-name-input:focus { border-color: var(--border); background: var(--surface2); }
  .mini-color { width: 30px; height: 30px; border: 2px solid var(--border); border-radius: 8px; padding: 2px; cursor: pointer; background: var(--surface); }
  .del-client-btn { background: none; border: none; color: var(--text3); font-size: 17px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
  .del-client-btn:hover { background: var(--red-light); color: var(--red); }

  .day-toggle-row { display: flex; gap: 5px; flex-wrap: wrap; }
  .day-toggle { width: 32px; height: 32px; border: 2px solid var(--border); border-radius: 50%; font-size: 10.5px; font-weight: 800; background: var(--surface); color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
  .day-toggle.on { background: var(--accent); border-color: var(--accent); color: #fff; }

  .std-task-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
  .std-task-item input[type=text] { flex: 1; border: 1px solid transparent; background: none; font-size: 13px; color: var(--text); padding: 5px 8px; border-radius: 6px; outline: none; }
  .std-task-item input[type=text]:hover, .std-task-item input[type=text]:focus { border-color: var(--border); background: var(--surface2); }
  .std-task-del { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 15px; padding: 2px 6px; border-radius: 5px; }
  .std-task-del:hover { background: var(--red-light); color: var(--red); }
  .std-icon { color: var(--text3); font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }

  .empty { text-align: center; padding: 22px; color: var(--text2); font-size: 13px; line-height: 1.5; }
  .empty b { color: var(--text); }

  .show-all-toggle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text2); margin-bottom: 12px; cursor: pointer; user-select: none; }
  .show-all-toggle input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

  /* DAY DETAIL */
  .day-detail { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
  .day-detail h3 { font-size: 15px; margin-bottom: 12px; }
  .dd-group { margin-bottom: 12px; }
  .dd-group-title { font-size: 12px; font-weight: 700; color: var(--text2); margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
  .dd-item { font-size: 13px; padding: 3px 0 3px 18px; color: var(--text); }
  .dd-item.done { color: var(--text3); text-decoration: line-through; }
  .dd-item::before { content: '○ '; color: var(--text3); }
  .dd-item.done::before { content: '✓ '; color: var(--green); text-decoration: none; display: inline-block; }

  /* TOAST */
  .toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--text); color: var(--bg); padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 600; opacity: 0; transition: all .25s; pointer-events: none; z-index: 999; width: max-content; max-width: calc(100vw - 32px); text-align: center; line-height: 1.4; }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  .onboard-card { background: var(--surface); border-radius: var(--radius); padding: 32px 24px; text-align: center; box-shadow: var(--shadow); }
  .onboard-card h2 { font-size: 18px; margin-bottom: 8px; }
  .onboard-card p { font-size: 13.5px; color: var(--text2); margin-bottom: 18px; line-height: 1.5; }
  .onboard-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

  @media (max-width: 640px) {
    .header { padding: 0 10px; height: auto; flex-wrap: wrap; padding: 8px 10px; }
    .date-badge { display: none; }
    .nav-tab { padding: 7px 10px; font-size: 13px; }
    .main { padding: 14px 10px 70px; }
    .week-ring { width: 34px; height: 34px; }
    .week-ring-inner { width: 25px; height: 25px; font-size: 8.5px; }
  }

  /* ═══════════ TOQUE VINTAGE-MODERNO ═══════════ */
  body, input, button {
    font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
  body {
    background-image: radial-gradient(var(--paper-dot) 1px, transparent 1px);
    background-size: 22px 22px;
  }

  /* cabeçalho estilo jornal antigo */
  .header {
    border-bottom: 4px double var(--text2);
    background: var(--surface);
  }
  .logo {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 21px;
    letter-spacing: .3px;
    color: var(--text);
  }
  .date-badge {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    background: none;
    border: 1px solid var(--border);
    color: var(--text2);
  }
  .nav-tab {
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 1.2px;
    font-weight: 700;
    border-radius: 6px;
  }
  .nav-tab.active { background: var(--text); color: var(--surface); }
  [data-theme="dark"] .nav-tab.active { background: var(--accent); color: var(--bg); }

  /* cartões com borda fina e sombra deslocada (letterpress) */
  .section, .progress-card, .settings-section, .weekly-banner, .day-detail, .onboard-card, .week-day, .client-card {
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  /* tipografia serifada nos títulos */
  .section-title, .weekly-banner-title, .day-detail h3, .onboard-card h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    letter-spacing: .2px;
  }
  .progress-pct {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: 28px;
  }
  .week-day-num { font-family: 'Fraunces', Georgia, serif; }

  /* rótulos em small caps espaçados */
  .settings-title, .subsection-label, .label, .week-day-name, .progress-title {
    letter-spacing: 1.4px;
    text-transform: uppercase;
  }
  .subsection-label { font-size: 10px; }
  .progress-title { font-size: 11px; }

  /* barra de progresso em tinta sólida com listras sutis */
  .progress-bar-track { border: 1px solid var(--border); height: 10px; border-radius: 5px; background: var(--surface2); }
  .progress-bar-fill {
    background: repeating-linear-gradient(-45deg, var(--accent), var(--accent) 6px, color-mix(in srgb, var(--accent) 85%, var(--surface)) 6px, color-mix(in srgb, var(--accent) 85%, var(--surface)) 12px);
  }
  .progress-bar-fill.complete {
    background: repeating-linear-gradient(-45deg, var(--green), var(--green) 6px, color-mix(in srgb, var(--green) 85%, var(--surface)) 6px, color-mix(in srgb, var(--green) 85%, var(--surface)) 12px);
  }

  /* botões com relevo de carimbo */
  .add-btn { box-shadow: 2px 2px 0 var(--border); border-radius: 8px; }
  .add-btn:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--border); }
  .add-btn:not(.secondary):not(.danger) { background: var(--text); color: var(--surface); }
  [data-theme="dark"] .add-btn:not(.secondary):not(.danger) { background: var(--accent); color: var(--bg); }
  .check-all { border-radius: 6px; text-transform: uppercase; font-size: 10px; letter-spacing: .8px; }

  /* caixas de marcação quadradas clássicas */
  .task-checkbox { border-radius: 4px; border-width: 1.5px; border-color: var(--text3); }
  .task-checkbox.checked { background: var(--text); border-color: var(--text); }
  [data-theme="dark"] .task-checkbox.checked { background: var(--accent); border-color: var(--accent); }
  .task-checkbox.checked::after { color: var(--surface); }
  [data-theme="dark"] .task-checkbox.checked::after { color: var(--bg); }
  .task-item.done .task-text { text-decoration-color: var(--text3); }

  /* etiquetas com contorno, estilo selo */
  .task-tag { border: 1px solid currentColor; background: none !important; text-transform: uppercase; font-size: 9.5px; letter-spacing: .7px; padding: 2px 7px; }
  .mini-progress { border: 1px solid var(--border); background: var(--surface); font-family: 'Fraunces', Georgia, serif; }
  .mini-progress.done { border-color: var(--green); background: var(--green-light); }

  /* divisores pontilhados */
  .divider { border-top: 1px dashed var(--border); }
  .section-body { border-top: 1px dashed var(--border); }
  .weekly-banner { border-left-width: 4px; }

  .toast { border-radius: 8px; font-family: 'Fraunces', Georgia, serif; font-style: italic; }
  .streak { font-family: 'Fraunces', Georgia, serif; font-style: italic; }
  .celebrate { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 14px; }

  /* saudação */
  .greeting { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 600; font-size: 22px; margin-bottom: 12px; color: var(--text); }

  /* goal-gradient: quase lá */
  .almost { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 13.5px; color: var(--accent); font-weight: 600; margin-top: 8px; }

  /* foco agora */
  .focus-card { border-left: 4px solid var(--accent); }
  .focus-card .section-header { cursor: default; }
  .focus-card .section-header:hover { background: none; }

  /* confete */
  .confetti-piece { position: fixed; top: -14px; width: 8px; height: 13px; z-index: 9999; pointer-events: none; animation: confetti-fall linear forwards; }
  @keyframes confetti-fall { to { transform: translateY(105vh) rotate(720deg); opacity: .85; } }

  /* ═══ relógio / cronômetro do dia ═══ */
  .hero { text-align: center; padding: 52px 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius); }
  .hero-greet { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 22px; font-weight: 600; margin-bottom: 6px; }
  .hero-date { font-size: 12px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--text2); margin-bottom: 26px; }
  .hero-clock { font-family: 'Fraunces', Georgia, serif; font-size: 72px; font-weight: 700; letter-spacing: 2px; line-height: 1; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
  .hero-pending { font-size: 14px; color: var(--text2); margin-bottom: 30px; }
  .start-btn { font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 700; padding: 14px 38px; border: none; border-radius: 12px; background: var(--text); color: var(--surface); cursor: pointer; box-shadow: 3px 3px 0 var(--border); transition: all .15s; }
  [data-theme="dark"] .start-btn { background: var(--accent); color: var(--bg); }
  .start-btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--border); }
  .start-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--border); }
  .hero-streak { margin-top: 22px; }

  .timer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 14px; border-left: 4px solid var(--green); flex-wrap: wrap; }
  .timer-bar.paused { border-left-color: var(--orange); }
  .timer-bar.ended { border-left-color: var(--text3); }
  .timer-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .timer-elapsed { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
  .timer-status { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text2); font-weight: 700; }
  .timer-actions { display: flex; gap: 8px; }
  .timer-btn { font-size: 12px; font-weight: 700; padding: 7px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text2); cursor: pointer; text-transform: uppercase; letter-spacing: .6px; }
  .timer-btn:hover { border-color: var(--accent); color: var(--accent); }
  .timer-btn.stop:hover { border-color: var(--red); color: var(--red); }

  /* sessões de foco */
  .focus-session { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; border-left: 4px solid #7d4a6a; }
  .fs-running { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  .focus-countdown { font-family: 'Fraunces', Georgia, serif; font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
  .fs-idle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .fs-title { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 15px; }
  .fs-presets { display: flex; gap: 6px; flex-wrap: wrap; }
  .fs-summary { font-size: 12px; color: var(--text2); margin-top: 9px; }

  .time-report { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
  .time-report h3 { font-family: 'Fraunces', Georgia, serif; font-size: 15px; margin-bottom: 12px; }
  .tr-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
  .tr-row:last-child { border-bottom: none; }
  .tr-day { color: var(--text2); }
  .tr-time { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-variant-numeric: tabular-nums; }
  .tr-sub { font-size: 11px; color: var(--text3); margin-left: 8px; }
  .tr-total { border-top: 1.5px solid var(--border); margin-top: 6px; padding-top: 9px; font-weight: 700; }

  @media (max-width: 640px) { .hero-clock { font-size: 52px; } }

  /* ═══ aba Mês ═══ */
  .month-header { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 14px; }
  .month-header .icon-btn { font-size: 22px; font-family: 'Fraunces', Georgia, serif; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; }
  .month-header .icon-btn:hover { border-color: var(--accent); color: var(--accent); }
  .month-title { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 600; font-size: 21px; text-transform: capitalize; min-width: 190px; text-align: center; }
  .month-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
  .stat-card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius); padding: 12px 8px; text-align: center; }
  .stat-num { font-family: 'Fraunces', Georgia, serif; font-size: 23px; font-weight: 700; color: var(--accent); }
  .stat-lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text2); margin-top: 3px; }
  .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 16px; }
  .mg-dow { text-align: center; font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--text2); text-transform: uppercase; padding: 4px 0; }
  .mg-day { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; transition: all .15s; box-shadow: var(--shadow); }
  .mg-day:hover { border-color: var(--accent); }
  .mg-day.empty { background: none; border: none; cursor: default; box-shadow: none; }
  .mg-day.today { border: 2px solid var(--accent); }
  .mg-day.selected { background: var(--accent-light); }
  .mg-day.future { opacity: .55; }
  .mg-day.future:hover { opacity: 1; }
  .mg-num { font-family: 'Fraunces', Georgia, serif; font-size: 13px; font-weight: 600; }
  .mg-ring { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); }
  @media (max-width: 640px) {
    .mg-ring { width: 12px; height: 12px; }
    .mg-num { font-size: 11px; }
    .month-stats { gap: 5px; }
    .stat-num { font-size: 18px; }
  }

  /* ═══ aba Notas ═══ */
  .notes-toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
  .notes-toolbar .add-input { flex: 1; min-width: 160px; }
  .notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
  .note-card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; gap: 6px; min-height: 110px; }
  .note-card:hover { border-color: var(--accent); transform: translateY(-1px); }
  .note-card.pinned { border-top: 3px solid var(--orange); }
  .nc-title { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
  .nc-snippet { font-size: 12.5px; color: var(--text2); line-height: 1.45; flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
  .nc-meta { font-size: 10.5px; color: var(--text3); display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .6px; }
  .note-editor { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius); padding: 18px 20px; }
  .ne-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
  .ne-title { width: 100%; border: none; background: none; font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; color: var(--text); outline: none; padding: 4px 0; border-bottom: 1px dashed var(--border); margin-bottom: 10px; }
  .ne-title::placeholder { color: var(--text3); font-style: italic; }
  .ne-body { width: 100%; min-height: 320px; border: none; background: none; font-family: 'Karla', sans-serif; font-size: 14.5px; line-height: 1.7; color: var(--text); outline: none; resize: vertical; }
  .ne-body::placeholder { color: var(--text3); font-style: italic; }
  .ne-meta { font-size: 11px; color: var(--text3); margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; font-style: italic; font-family: 'Fraunces', Georgia, serif; }

  /* ═══ aba Configurar ═══ */
  .config-nav { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 62px; z-index: 50; background: var(--bg); padding: 8px 0 10px; margin-bottom: 6px; }
  .config-nav a { text-decoration: none; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text2); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; background: var(--surface); transition: all .15s; }
  .config-nav a:hover { color: var(--accent); border-color: var(--accent); }
  .settings-section { scroll-margin-top: 120px; }
  .count-badge { display: inline-block; min-width: 18px; text-align: center; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; font-size: 10px; padding: 1px 7px; margin-left: 6px; color: var(--text2); font-family: 'Karla', sans-serif; letter-spacing: 0; }

  /* card de cliente colapsável */
  .cc-head { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
  .cc-head .cc-name { font-weight: 600; font-size: 15px; font-family: 'Fraunces', Georgia, serif; }
  .cc-head .cc-sub { margin-left: auto; font-size: 11.5px; color: var(--text3); text-align: right; }
  .cc-head .chevron { flex-shrink: 0; }
  .client-card.closed .cc-body { display: none; }
  .cc-body { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }

  /* ═══ cronômetro fixo no centro da barra de cima ═══ */
  .header { position: sticky; }
  .header-timer { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; align-items: center; gap: 10px; padding: 5px 14px; border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: 8px; background: var(--surface2); cursor: pointer; white-space: nowrap; transition: border-color .15s; }
  .header-timer.show { display: flex; }
  .header-timer:hover { border-color: var(--accent); }
  .header-timer.paused { border-left-color: var(--orange); }
  .header-timer.ended { border-left-color: var(--text3); }
  .ht-time { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1; }
  .ht-status { font-size: 9.5px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--text2); font-weight: 700; }
  .ht-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: ht-pulse 1.6s ease-in-out infinite; }
  .header-timer.paused .ht-dot, .header-timer.ended .ht-dot { animation: none; background: var(--text3); }
  @keyframes ht-pulse { 50% { opacity: .25; } }
  .ht-focus { font-size: 12px; font-weight: 700; color: #7d4a6a; border-left: 1px dashed var(--border); padding-left: 10px; font-variant-numeric: tabular-nums; }
  [data-theme="dark"] .ht-focus { color: #cf9ab8; }
  @media (max-width: 1180px) { .header.has-timer .date-badge { display: none; } }
  @media (max-width: 860px) {
    .header.has-timer { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
    .header-timer { position: static; transform: none; order: 3; width: 100%; justify-content: center; }
  }

  .ht-rest { border: 1px solid var(--border); background: var(--surface); color: var(--text2); border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 4px 9px; cursor: pointer; font-family: inherit; }
  .ht-rest:hover { border-color: var(--orange); color: var(--orange); }

  /* contador do topo no fluxo da barra (antes flutuava no centro e cobria as abas em telas médias) */
  .header-timer { position: static; transform: none; order: 1; margin: 0 auto; }
  .header-left { order: 0; }
  .header-right { order: 2; }
  @media (max-width: 1080px) {
    .header.has-timer { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
    .header.has-timer .header-timer { order: 3; width: 100%; justify-content: center; margin: 0; }
  }

  /* celular: campo de nova tarefa em uma linha, data e botão embaixo (o botão ficava cortado) */
  @media (max-width: 640px) {
    .add-row { flex-wrap: wrap; }
    .add-row .add-input { flex: 1 1 100%; }
    .add-row .add-date { flex: 1 1 auto; }
    /* abas compactas: antes o botão de tema passava da borda e criava rolagem lateral */
    .header-right { width: 100%; min-width: 0; justify-content: space-between; }
    .nav-tabs { flex: 1; min-width: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; }
    .nav-tab { padding: 7px 7px; letter-spacing: .5px; font-size: 11px; }
    /* Semana: 7 dias cabendo em 375px */
    .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
    .week-day { padding: 8px 1px; min-width: 0; }
    .week-day-name { font-size: 8.5px; letter-spacing: .3px; }
    .week-ring { width: 30px; height: 30px; }
    .week-ring-inner { width: 23px; height: 23px; font-size: 7.5px; }
    /* Configurar: nome da tarefa em cima, selo e × embaixo quando não cabe */
    .std-task-item { flex-wrap: wrap; }
    .std-task-item input[type=text] { min-width: 0; flex: 1 1 150px; }
    .rule-chip { max-width: calc(100% - 40px); }
  }

  /* ═══ navegação da semana / exportar planilha ═══ */
  .week-title { min-width: 230px; font-size: 19px; }
  .period-tools { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; margin: -6px 0 14px; font-size: 12px; color: var(--text3); }
  .period-tools .tag-rel { font-family: 'Fraunces', Georgia, serif; font-style: italic; color: var(--text2); }

  /* ═══ conta e nuvem ═══ */
  .sync-btn { font-size: 13px; font-weight: 700; white-space: nowrap; position: relative; }
  .sync-btn.off { font-size: 12px; border: 1px solid var(--border); padding: 5px 10px; color: var(--accent); }
  .sync-btn::after { content: ''; position: absolute; right: 4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; display: none; }
  .sync-btn.ok::after { display: block; background: var(--green); }
  .sync-btn.busy::after { display: block; background: var(--orange); animation: ht-pulse 1s ease-in-out infinite; }
  .sync-btn.err::after { display: block; background: var(--red); }
  .acct-form { display: grid; gap: 8px; max-width: 420px; }
  .acct-form .settings-input { width: 100%; }
  .acct-err { color: var(--red); font-size: 13px; min-height: 18px; }
  .acct-line { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; font-size: 13.5px; margin-bottom: 10px; }
  .acct-status { display: inline-flex; align-items: center; gap: 6px; }
  .acct-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
  .acct-status.busy::before { background: var(--orange); }
  .acct-status.err::before { background: var(--red); }
  .acct-box details { border-top: 1px dashed var(--border); padding: 10px 0 2px; }
  .acct-box summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text2); }
  .acct-box details[open] summary { margin-bottom: 10px; }
  .backup-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
  .plan-pill { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding: 2px 9px; border-radius: 12px; border: 1px solid currentColor; color: var(--green); }
  .plan-pill.free { color: var(--text2); }

  /* ═══ app e notificações ═══ */
  .app-line { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; font-size: 13.5px; margin-bottom: 10px; }
  .app-ok { color: var(--green); font-weight: 700; }
  .app-warn { color: var(--orange); font-weight: 700; }
  .app-steps { font-size: 13px; color: var(--text2); background: var(--surface2); border-radius: 8px; padding: 10px 12px; line-height: 1.5; }

  /* ═══ planos ═══ */
  .plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 6px 0 12px; }
  .plan-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; background: var(--surface); }
  .plan-card.pro { border: 2px solid var(--accent); }
  .plan-card h4 { font-family: 'Fraunces', Georgia, serif; font-size: 17px; margin: 0; }
  .plan-card ul { margin: 0; padding-left: 16px; font-size: 13px; color: var(--text2); display: grid; gap: 2px; }
  .plan-card .price { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 18px; }
  .plan-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .plan-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--amber-light); color: var(--amber-text); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
  .plan-banner .x { background: none; border: none; color: inherit; cursor: pointer; font-size: 16px; padding: 0 4px; }

  /* ═══ equipe ═══ */
  .team-code { font-family: ui-monospace, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: 3px; background: var(--surface2); border: 1px dashed var(--border); border-radius: 8px; padding: 6px 12px; }
  .team-members { display: grid; gap: 4px; margin: 8px 0 12px; }
  .team-member { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
  .team-member small { color: var(--text3); }
  .team-report { margin-top: 12px; display: grid; gap: 12px; }
  .team-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .team-table th, .team-table td { text-align: left; padding: 6px 8px; border-bottom: 1px dashed var(--border); font-variant-numeric: tabular-nums; }
  .team-table th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); }
  .team-scroll { overflow-x: auto; }

  /* ═══ integrações ═══ */
  .client-links { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 18px 2px; }
  .client-links a { font-size: 12px; font-weight: 700; color: var(--accent); border: 1px solid var(--border); border-radius: 14px; padding: 3px 10px; text-decoration: none; background: var(--surface); }
  .client-links a:hover { border-color: var(--accent); }
  .cal-url { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; background: var(--surface2); border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px; }
  .integ-block { border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 12px; }
  .integ-block:first-child { border-top: none; padding-top: 0; margin-top: 0; }
  .integ-block h4 { font-family: 'Fraunces', Georgia, serif; font-size: 15px; margin: 0 0 4px; }

  /* ═══ cronômetro por cliente ═══ */
  .ct-wrap { display: inline-flex; align-items: center; gap: 4px; }
  .ct-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text2); border-radius: 6px; font-size: 11px; font-weight: 700; padding: 3px 8px; cursor: pointer; font-family: inherit; line-height: 1.2; }
  .ct-btn:hover { border-color: var(--accent); color: var(--accent); }
  .ct-btn.pause { font-size: 10px; letter-spacing: 1px; padding: 3px 7px 3px 8px; }
  .ct-btn.stop:hover { border-color: var(--red); color: var(--red); }
  .ct-btn.idle { text-transform: uppercase; letter-spacing: .6px; font-size: 10px; border-style: dashed; }
  .ct-chip { display: inline-flex; align-items: center; gap: 6px; font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; padding: 2px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); }
  .ct-chip.running { border-color: var(--green); color: var(--green); }
  .ct-chip.paused { border-color: var(--orange); color: var(--orange); }
  .ct-chip.paused .ht-dot { display: none; }
  .ct-chip.done { color: var(--text2); }
  .header-timer.with-client .ht-status, .header-timer.with-client .rest-label { display: none; }
  .ht-client .ht-cname { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ht-client { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text); border-left: 1px dashed var(--border); padding-left: 10px; font-variant-numeric: tabular-nums; }
  .ct-row { gap: 10px; }
  .ct-row .tr-day { flex: 0 0 auto; min-width: 110px; }
  .ct-bar { flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
  .ct-bar span { display: block; height: 100%; }
  @media (max-width: 640px) { .ct-btn.idle { padding: 3px 6px; } .ct-chip { font-size: 12px; padding: 2px 6px; } }

  /* ═══ tela de descanso ═══ */
  .rest-screen { flex-direction: column; position: fixed; inset: 0; z-index: 400; background-color: var(--bg); background-image: radial-gradient(var(--paper-dot) 1px, transparent 1px); background-size: 22px 22px; display: flex; align-items: center; justify-content: center; padding: 20px 14px; overflow-y: auto; animation: rest-in .35s ease; }
  @keyframes rest-in { from { opacity: 0; } }
  .rest-card { width: 100%; max-width: 620px; border-top: 4px solid var(--orange); }
  .rest-card .hero-clock { color: var(--orange); }
  .brand-icon { height: 1.25em; width: 1.25em; vertical-align: -0.28em; margin-right: 6px; }
  [data-theme="dark"] .brand-icon { filter: drop-shadow(0 0 0.5px rgba(236,227,210,.6)); }
  .rest-brand { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 700; font-size: 44px; letter-spacing: .5px; color: var(--text); margin: 0 0 22px; padding-bottom: 12px; border-bottom: 4px double var(--text2); display: flex; align-items: center; gap: 4px; line-height: 1; }
  .rest-brand .brand-icon { height: 1.15em; width: 1.15em; margin-right: 10px; vertical-align: 0; }
  @media (max-width: 640px) { .rest-brand { font-size: 32px; } }
  .rest-card .hero-clock.rest-over { color: var(--green); }
  .rest-presets { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; margin: -12px 0 26px; font-size: 12px; color: var(--text2); }
  .rest-tip { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 14px; color: var(--text2); margin-top: 24px; }
  .rest-meta { font-size: 12px; color: var(--text3); margin: 12px 0 6px; }

  /* ═══ repetição / personalização ═══ */
  .rule-chip { flex-shrink: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; padding: 3px 9px; border-radius: 12px; border: 1px dashed var(--border); background: var(--surface); color: var(--text2); cursor: pointer; white-space: nowrap; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
  .rule-chip:hover { border-color: var(--accent); color: var(--accent); border-style: solid; }
  .rule-chip.custom { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
  .task-time { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 12.5px; color: var(--accent); flex-shrink: 0; font-variant-numeric: tabular-nums; }
  .task-star { color: var(--orange); flex-shrink: 0; font-size: 13px; }
  .task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .task-note { font-size: 11.5px; color: var(--text3); margin-top: 1px; font-style: italic; }
  .task-tag.rule { color: var(--text2); }
  .task-tag.skipped { color: var(--text3); }
  .task-item.skipped .task-text { color: var(--text3); font-style: italic; }
  .task-item.skipped .task-checkbox { opacity: .35; pointer-events: none; }
  .task-skip { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 11px; font-weight: 700; opacity: 0; transition: all .1s; padding: 2px 6px; border-radius: 5px; text-transform: uppercase; letter-spacing: .5px; }
  .task-item:hover .task-skip, .task-item.skipped .task-skip { opacity: 1; }
  .task-skip:hover { background: var(--surface2); color: var(--accent); }
  .add-date { flex: 0 0 auto; width: 138px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 8px; font-size: 12px; color: var(--text2); background: var(--surface2); outline: none; font-family: inherit; }
  .add-date:focus { border-color: var(--accent); }
  .off-banner { background: var(--green-light); border: 1px solid var(--green); color: var(--green); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 15px; }
  .link-btn { background: none; border: none; color: var(--text2); font-size: 12px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; padding: 4px 0; font-family: inherit; }
  .link-btn:hover { color: var(--accent); }
  .day-tools { display: flex; gap: 14px; flex-wrap: wrap; margin: -6px 0 14px; }
  .pref-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
  .pref-row:last-child { border-bottom: none; }
  .pref-row small { display: block; color: var(--text3); font-size: 11.5px; margin-top: 2px; }
  .switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .switch span { position: absolute; inset: 0; background: var(--surface2); border: 1px solid var(--border); border-radius: 22px; cursor: pointer; transition: .15s; }
  .switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: var(--text3); border-radius: 50%; transition: .15s; }
  .switch input:checked + span { background: var(--accent); border-color: var(--accent); }
  .switch input:checked + span::before { transform: translateX(16px); background: var(--surface); }
  .preset-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
  .preset-btn { font-size: 12px; padding: 5px 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text2); cursor: pointer; font-family: inherit; }
  .preset-btn.on { background: var(--text); color: var(--surface); border-color: var(--text); }
  [data-theme="dark"] .preset-btn.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }
  .help-tip { font-size: 12px; color: var(--text2); background: var(--amber-light); border-radius: 8px; padding: 8px 12px; margin: 4px 0 10px; line-height: 1.45; }
  .template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 6px 0 16px; text-align: left; }
  .template-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--surface); box-shadow: var(--shadow); transition: all .15s; }
  .template-card:hover { border-color: var(--accent); transform: translateY(-1px); }
  .template-card b { font-family: 'Fraunces', Georgia, serif; font-size: 15px; display: block; margin-bottom: 3px; }
  .template-card span { font-size: 12px; color: var(--text2); line-height: 1.4; }

  /* modal */
  .modal-back { position: fixed; inset: 0; background: rgba(20,16,10,.45); z-index: 500; display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow-y: auto; }
  .modal { background: var(--surface); border: 1px solid var(--border); box-shadow: 5px 5px 0 rgba(0,0,0,.18); border-radius: 12px; width: 100%; max-width: 520px; padding: 20px 22px; }
  .modal h3 { font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 600; margin-bottom: 4px; }
  .modal .sub { font-size: 12px; color: var(--text2); margin-bottom: 12px; }
  .modal select, .modal input[type=number], .modal input[type=date], .modal input[type=time] { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; background: var(--surface2); color: var(--text); outline: none; font-family: inherit; }
  .modal input[type=number] { width: 70px; }
  .modal .inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
  .modal-preview { background: var(--surface2); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: var(--text2); margin-top: 14px; line-height: 1.5; }
  .modal-preview b { color: var(--text); }
  .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
  .chk-line { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 10px; cursor: pointer; }
  .chk-line input { accent-color: var(--accent); width: 15px; height: 15px; }
