/* ═══════════════════════════════════════════════════════
   DOKO — Design System (Light Mode)
   Font: Nunito (body) + Fraunces (display)
═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,300&display=swap');

/* ── Variables ── */
:root {
  /* Palette */
  --white:      #ffffff;
  --bg:         #f5f4f0;
  --bg2:        #eceae4;
  --surface:    #ffffff;
  --surface2:   #f9f8f5;
  --border:     #e2e0d8;
  --border2:    #d0cdc4;

  --ink1:       #1a1a22;
  --ink2:       #4a4a58;
  --ink3:       #8a8a9a;
  --ink4:       #b8b8c8;

  --accent:     #5c6bc0;
  --accent-lt:  #7986cb;
  --accent-bg:  rgba(92,107,192,0.10);
  --accent-br:  rgba(92,107,192,0.28);

  --personal:   #2196f3;
  --personal-bg:rgba(33,150,243,0.09);
  --work:       #f59e0b;
  --work-bg:    rgba(245,158,11,0.09);

  --green:      #22c55e;
  --green-bg:   rgba(34,197,94,0.10);
  --red:        #ef4444;
  --red-bg:     rgba(239,68,68,0.10);

  /* Shadows */
  --sh-xs: 0 1px 4px rgba(0,0,0,0.07);
  --sh-sm: 0 2px 10px rgba(0,0,0,0.09);
  --sh-md: 0 4px 24px rgba(0,0,0,0.11);
  --sh-lg: 0 8px 40px rgba(0,0,0,0.14);
  --sh-acc:0 4px 20px rgba(92,107,192,0.28);

  /* Radii */
  --r4:4px; --r8:8px; --r10:10px; --r12:12px;
  --r16:16px; --r20:20px; --r24:24px; --r99:999px;

  /* Fonts */
  --font:  'Nunito', sans-serif;
  --fontD: 'Fraunces', serif;

  /* Layout */
  --nav-h: 68px;
  --phone-w: 390px;
  --phone-h: 844px;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  width: 100%; height: 100%;
  font-family: var(--font);
  background: #e8e5de;
  color: var(--ink1);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── Outer wrapper (desktop bg) ── */
body {
  display: flex;
  align-items: center;
  justify-content: center;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(92,107,192,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 75%, rgba(245,158,11,0.05) 0%, transparent 60%),
    #e0ddd6;
  z-index: -1;
}

/* ══════════════════════════════════════
   PHONE SHELL
══════════════════════════════════════ */
#phone-shell {
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.12),
    0 0 0 9px #c8c4bb,
    0 0 0 10px rgba(0,0,0,0.09),
    var(--sh-lg);
  flex-shrink: 0;
}

/* On mobile (real phone) — go full screen */
@media (max-width: 430px) {
  #phone-shell {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  body { background: var(--bg); }
  body::before { display: none; }
}

/* Scale down on laptop so it fits without zooming out */
@media (min-width: 431px) and (max-height: 900px) {
  #phone-shell {
    transform: scale(calc((100vh - 40px) / var(--phone-h)));
    transform-origin: center center;
  }
}

/* ══════════════════════════════════════
   PAGES
══════════════════════════════════════ */
.page {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  animation: pgIn 0.22s ease;
}
.page.active { display: flex; }
@keyframes pgIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:none} }

.page-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + 8px);
}
.page-scroll::-webkit-scrollbar { display: none; }

/* Page title */
.pg-title {
  padding: 16px 20px 6px;
  font-family: var(--fontD);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink1);
  letter-spacing: -0.3px;
}
.pg-subtitle {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 12px 20px 4px;
}

/* ══════════════════════════════════════
   WELCOME HEADER
══════════════════════════════════════ */
.welcome-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 6px;
}
.welcome-orb {
  width: 34px; height: 34px;
  border-radius: var(--r10);
  background: var(--accent-bg);
  border: 1px solid var(--accent-br);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.welcome-text { font-size: 13px; color: var(--ink2); line-height: 1.3; }
.welcome-text strong { color: var(--ink1); font-weight: 700; }

/* ══════════════════════════════════════
   CALENDAR
══════════════════════════════════════ */
.cal-card {
  margin: 6px 14px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r20);
  box-shadow: var(--sh-sm);
  overflow: visible;
  position: relative;
}
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
.cal-arrow {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--ink2); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s; flex-shrink: 0; user-select: none;
}
.cal-arrow:hover { background: var(--accent-bg); border-color: var(--accent-br); color: var(--accent); }

.cal-month-btn {
  font-family: var(--fontD); font-size: 17px; font-weight: 600;
  color: var(--ink1); background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: var(--r8); transition: background 0.15s;
  display: flex; align-items: center; gap: 5px;
}
.cal-month-btn:hover { background: var(--bg2); }
.cal-month-btn .dd-arrow {
  font-size: 10px; color: var(--ink3); font-family: var(--font);
}

/* Month/year dropdown */
.month-dd {
  position: absolute; top: 60px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r16); z-index: 300;
  box-shadow: var(--sh-lg); min-width: 210px;
  display: none; overflow: hidden;
  animation: ddIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.month-dd.open { display: block; }
@keyframes ddIn { from{opacity:0;transform:translateX(-50%) scale(0.9)} to{opacity:1;transform:translateX(-50%) scale(1)} }

.dd-yr-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 8px; border-bottom: 1px solid var(--border);
}
.dd-yr-label { font-weight: 700; font-size: 14px; color: var(--ink1); }
.dd-yr-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--ink2); font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.dd-yr-btn:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-br); }

.dd-months {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; padding: 8px;
}
.dd-mon {
  padding: 8px 4px; text-align: center; border-radius: var(--r8);
  font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--ink2); transition: all 0.15s;
}
.dd-mon:hover { background: var(--bg2); color: var(--ink1); }
.dd-mon.active { background: var(--accent-bg); color: var(--accent); }

/* Day names */
.cal-daynames {
  display: grid; grid-template-columns: repeat(7,1fr);
  padding: 0 10px 2px;
}
.cal-dn {
  text-align: center; font-size: 10px; font-weight: 700;
  color: var(--ink4); letter-spacing: 0.4px; padding: 2px 0;
}

/* Grid */
.cal-grid {
  display: grid; grid-template-columns: repeat(7,1fr);
  padding: 0 10px 12px; gap: 1px;
}
.cal-cell {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; position: relative;
  font-size: 12.5px; font-weight: 600; color: var(--ink2);
  transition: all 0.15s; user-select: none;
}
.cal-cell:hover:not(.cal-other) { background: var(--bg2); color: var(--ink1); }
.cal-cell.cal-other { color: var(--ink4); cursor: default; font-weight: 400; }
.cal-cell.cal-today { color: var(--accent); font-weight: 800; }
.cal-cell.cal-selected {
  background: var(--accent); color: #fff; font-weight: 700;
  box-shadow: var(--sh-acc);
}
.cal-cell.cal-selected .act-dot { background: rgba(255,255,255,0.8); }

/* Single dot per date */
.act-dot {
  position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
  pointer-events: none;
}
.cal-cell.cal-today:not(.cal-selected) .act-dot { background: var(--accent); }

/* ══════════════════════════════════════
   SECTION DIVIDER
══════════════════════════════════════ */
.section-line {
  height: 1px; background: var(--border);
  margin: 12px 14px 0;
}

/* ══════════════════════════════════════
   ACTIVITY LIST (home + full page)
══════════════════════════════════════ */
.act-section { padding: 10px 14px 0; }
.act-sec-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.act-sec-label {
  font-family: var(--fontD); font-size: 15px; font-weight: 600; color: var(--ink1);
}
.act-count-pill {
  font-size: 10px; font-weight: 700; color: var(--ink3);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r99); padding: 2px 10px;
}

.act-list { display: flex; flex-direction: column; gap: 4px; }

.act-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r12); padding: 10px 13px;
  cursor: pointer; transition: all 0.18s;
  animation: itemIn 0.22s ease both;
}
.act-item:hover { border-color: var(--border2); box-shadow: var(--sh-xs); transform: translateX(2px); }
@keyframes itemIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }

.act-meta {
  display: flex; align-items: center; gap: 7px; margin-bottom: 3px; flex-wrap: wrap;
}
.act-time-lbl { font-size: 10px; color: var(--ink3); font-weight: 600; }

.tag {
  font-size: 9px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--r99);
}
.tag-personal { background: var(--personal-bg); color: var(--personal); }
.tag-work     { background: var(--work-bg);     color: var(--work); }
.tag-done     { background: var(--green-bg);     color: var(--green); }

.act-name { font-size: 13px; font-weight: 600; color: var(--ink1); line-height: 1.35; }
.act-item.done .act-name { text-decoration: line-through; color: var(--ink3); }

.act-empty {
  text-align: center; padding: 28px 20px;
  color: var(--ink3); font-size: 12.5px; line-height: 1.7;
}
.act-empty-icon { font-size: 28px; margin-bottom: 6px; opacity: 0.45; }

/* ══════════════════════════════════════
   FAB (floating action button)
══════════════════════════════════════ */
.fab {
  position: absolute;
  bottom: calc(var(--nav-h) + 14px);
  right: 18px;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  border: none; font-size: 26px; line-height: 1;
  cursor: pointer; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-acc), var(--sh-md);
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.fab:hover { transform: scale(1.1) rotate(45deg); background: var(--accent-lt); }

/* ══════════════════════════════════════
   BOTTOM NAV
══════════════════════════════════════ */
#nav-root {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 90;
}
.more-tray {
  display: flex; justify-content: space-around;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 4px 6px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.more-tray.open { transform: translateY(0); }
.bottom-nav {
  display: flex; justify-content: space-around;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  height: var(--nav-h);
  padding: 6px 0 14px;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 4px 10px; border-radius: var(--r12);
  cursor: pointer; transition: all 0.2s; min-width: 50px;
  user-select: none; -webkit-user-select: none;
}
.nav-item:hover { background: var(--bg2); }
.nav-item.nav-active { background: var(--accent-bg); }
.nav-icon { font-size: 20px; line-height: 1; transition: transform 0.2s; }
.nav-item.nav-active .nav-icon { transform: translateY(-1px); }
.nav-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.3px; color: var(--ink3);
}
.nav-item.nav-active .nav-label { color: var(--accent); }

/* Timer running */
.nav-item.timer-on .nav-icon { animation: timerTick 1s ease-in-out infinite; }
@keyframes timerTick { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2) rotate(10deg)} }

/* ══════════════════════════════════════
   ACTIVITY PAGE TOOLBAR
══════════════════════════════════════ */
.act-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px 8px; position: relative;
}
.tool-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: var(--r99);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink2); font-family: var(--font); font-size: 11px; font-weight: 700;
  cursor: pointer; letter-spacing: 0.3px; transition: all 0.18s; box-shadow: var(--sh-xs);
}
.tool-btn:hover { border-color: var(--border2); color: var(--ink1); box-shadow: var(--sh-sm); }

.sort-pop {
  position: absolute; top: 46px; right: 16px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r12); padding: 8px; z-index: 200;
  box-shadow: var(--sh-lg); min-width: 155px; display: none;
  animation: ddIn2 0.2s ease;
}
.sort-pop.open { display: block; }
@keyframes ddIn2 { from{opacity:0;transform:translateY(-5px)} to{opacity:1;transform:none} }
.sort-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--r8);
  font-size: 12px; color: var(--ink2); cursor: pointer; transition: background 0.14s;
  user-select: none;
}
.sort-opt:hover { background: var(--bg2); }
.sort-opt.active { color: var(--accent); font-weight: 700; }
.sort-opt input { accent-color: var(--accent); }

/* Full list */
.full-list {
  flex: 1; overflow-y: auto; padding: 0 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.full-list::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════
   FILTER PANEL
══════════════════════════════════════ */
.filter-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.3); z-index: 120;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.filter-overlay.open { opacity: 1; pointer-events: all; }

.filter-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: 80%;
  background: var(--surface); border-right: 1px solid var(--border2);
  z-index: 130; display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--sh-lg);
}
.filter-panel.open { transform: translateX(0); }
.fp-head { padding: 16px 16px 12px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--border); color: var(--ink1); }
.fp-body { display: flex; flex: 1; overflow: hidden; }
.fp-sidebar {
  width: 90px; background: var(--surface2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
}
.fp-sidebar::-webkit-scrollbar { display: none; }
.fp-cat {
  padding: 14px 12px; font-size: 11px; font-weight: 700;
  color: var(--ink3); cursor: pointer; border-left: 2px solid transparent; transition: all 0.15s;
}
.fp-cat.active { color: var(--accent); background: var(--accent-bg); border-left-color: var(--accent); }
.fp-content { flex: 1; padding: 10px; overflow-y: auto; }
.fp-content::-webkit-scrollbar { display: none; }
.fp-group { display: none; }
.fp-group.active { display: block; }
.fp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.fp-chip {
  padding: 6px 12px; border-radius: var(--r99);
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--ink2); font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.fp-chip:hover { border-color: var(--border2); color: var(--ink1); }
.fp-chip.active { background: var(--accent-bg); border-color: var(--accent-br); color: var(--accent); }
.fp-foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }

/* ══════════════════════════════════════
   MODAL / SHEET
══════════════════════════════════════ */
.overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(3px);
  z-index: 200; display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.overlay.open { opacity: 1; pointer-events: all; }

.sheet {
  width: 100%; background: var(--surface);
  border-radius: 22px 22px 0 0; border-top: 1px solid var(--border);
  max-height: 92%; overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 -4px 30px rgba(0,0,0,0.12);
}
.overlay.open .sheet { transform: translateY(0); }
.sheet::-webkit-scrollbar { display: none; }

.sheet-handle {
  width: 36px; height: 4px; background: var(--border2);
  border-radius: 2px; margin: 12px auto 0;
}
.sheet-title {
  padding: 12px 20px 10px; font-family: var(--fontD);
  font-size: 18px; font-weight: 600; color: var(--ink1); letter-spacing: -0.2px;
}
.sheet-line { height: 1px; background: var(--border); }
.sheet-body { padding: 16px 20px; }
.sheet-footer {
  display: flex; gap: 8px; padding: 10px 20px 22px;
  border-top: 1px solid var(--border); margin-top: 6px;
}
.sheet-footer .btn { flex: 1; }

/* ══════════════════════════════════════
   FORMS
══════════════════════════════════════ */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { margin-bottom: 13px; position: relative; }
.form-label {
  display: block; font-size: 10px; font-weight: 800;
  letter-spacing: 0.9px; text-transform: uppercase;
  color: var(--ink3); margin-bottom: 5px;
}

.inp {
  width: 100%; background: var(--surface2);
  border: 1.5px solid var(--border); border-radius: var(--r10);
  padding: 10px 13px; color: var(--ink1);
  font-family: var(--font); font-size: 13px; font-weight: 500;
  outline: none; transition: all 0.18s; appearance: none;
}
.inp:focus { border-color: var(--accent); background: var(--white); box-shadow: 0 0 0 3px var(--accent-bg); }
.inp::placeholder { color: var(--ink4); font-weight: 400; }
.inp:disabled, .inp[readonly] { background: var(--bg2); color: var(--ink2); cursor: default; }
.inp[readonly]:not([data-clickable]) { pointer-events: none; }
.inp[data-clickable] { cursor: pointer; }
.inp[data-clickable]:focus { box-shadow: 0 0 0 3px var(--accent-bg); }

textarea.inp { resize: none; }
select.inp { cursor: pointer; }

.seg {
  display: flex; background: var(--surface2);
  border: 1.5px solid var(--border); border-radius: var(--r10); padding: 3px; gap: 2px;
}
.seg-btn {
  flex: 1; padding: 7px; border-radius: 7px; border: none;
  background: transparent; color: var(--ink3);
  font-family: var(--font); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all 0.18s;
}
.seg-btn.active {
  background: var(--white); color: var(--ink1);
  box-shadow: var(--sh-xs);
}
.seg-btn:disabled { cursor: not-allowed; }
.seg-btn.active:disabled { background: var(--bg2); }

/* ══════════════════════════════════════
   PICKERS (date / time)
══════════════════════════════════════ */
.picker-pop {
  position: absolute; z-index: 500; left: 0;
  background: var(--surface); border: 1.5px solid var(--border2);
  border-radius: var(--r16); box-shadow: var(--sh-lg);
  display: none; overflow: hidden; min-width: 220px; top: 72px;
}
.picker-pop.open { display: block; animation: ddIn2 0.2s ease; }

/* Mini-cal in picker */
.mc-wrap { padding: 10px; }
.mc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.mc-title { font-size: 12px; font-weight: 700; color: var(--ink1); }
.mc-arr {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--ink2); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.mc-arr:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-br); }
.mc-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; }
.mc-dn { text-align: center; font-size: 9px; font-weight: 700; color: var(--ink4); padding: 3px 0; }
.mc-day {
  text-align: center; padding: 5px 2px; font-size: 11px; font-weight: 600;
  color: var(--ink2); cursor: pointer; border-radius: 50%; transition: all 0.13s;
}
.mc-day:hover { background: var(--bg2); color: var(--ink1); }
.mc-day.mc-today { color: var(--accent); font-weight: 800; }
.mc-day.mc-sel { background: var(--accent); color: #fff; }

/* Time picker */
.tp-wrap { padding: 12px; }
.tp-row { display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 10px; }
.tp-col { display: flex; flex-direction: column; align-items: center; gap: 0; }
.tp-item {
  width: 48px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; border-radius: var(--r8);
  cursor: pointer; transition: all 0.13s; font-variant-numeric: tabular-nums;
  user-select: none;
}
.tp-item.cur {
  background: var(--accent-bg); color: var(--accent); font-size: 20px;
  border: 1.5px solid var(--accent-br);
}
.tp-item.adj { color: var(--ink4); font-size: 13px; }
.tp-item.adj:hover { color: var(--ink2); background: var(--bg2); }
.tp-colon { font-size: 20px; font-weight: 800; color: var(--ink3); margin-bottom: 4px; }
.ampm-col { display: flex; flex-direction: column; gap: 4px; margin-left: 6px; }
.ampm-btn {
  padding: 5px 9px; border-radius: var(--r8);
  border: 1.5px solid var(--border); background: var(--surface2);
  color: var(--ink3); font-family: var(--font); font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
}
.ampm-btn.active { background: var(--accent-bg); border-color: var(--accent-br); color: var(--accent); }

/* ══════════════════════════════════════
   MORE INFO SECTION
══════════════════════════════════════ */
.more-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--accent); font-size: 12px; font-weight: 700;
  background: none; border: none; cursor: pointer; padding: 4px 0;
  font-family: var(--font); transition: opacity 0.15s;
}
.more-toggle:hover { opacity: 0.75; }
.more-section {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.35s ease, opacity 0.28s ease;
}
.more-section.open { max-height: 700px; opacity: 1; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 10px; }

/* Watchlist */
.wl-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.perm-sel {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: var(--r10); color: var(--ink1);
  font-family: var(--font); font-size: 11px; font-weight: 600;
  padding: 10px 8px; outline: none; min-width: 66px; cursor: pointer;
}
.perm-sel:disabled { background: var(--bg2); cursor: not-allowed; }

/* Autocomplete */
.ac-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 600;
  background: var(--surface); border: 1.5px solid var(--border2);
  border-radius: var(--r12); overflow: hidden; box-shadow: var(--sh-lg); display: none;
}
.ac-item {
  padding: 9px 12px; font-size: 12px; cursor: pointer; color: var(--ink1);
  transition: background 0.13s; display: flex; align-items: center; gap: 8px;
  font-weight: 600;
}
.ac-item:hover { background: var(--bg2); }
.ac-av {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-bg); border: 1px solid var(--accent-br);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: var(--accent);
}

/* ══════════════════════════════════════
   TIMER MODAL
══════════════════════════════════════ */
.timer-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  z-index: 300; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.timer-overlay.open { opacity: 1; pointer-events: all; }

.timer-box {
  width: 84%; background: var(--surface);
  border: 1px solid var(--border); border-radius: 22px;
  position: relative; overflow: visible;
  box-shadow: var(--sh-lg);
  animation: boxIn 0.32s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes boxIn { from{transform:scale(0.82);opacity:0} to{transform:scale(1);opacity:1} }

.timer-x {
  position: absolute; top: -13px; right: -13px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--border2);
  color: var(--ink2); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 10;
  transition: all 0.18s; box-shadow: var(--sh-sm);
}
.timer-x:hover { background: var(--red-bg); color: var(--red); border-color: rgba(239,68,68,0.3); }

.timer-head {
  padding: 16px 20px 12px; font-size: 10px; font-weight: 800;
  color: var(--ink3); letter-spacing: 1.8px; text-transform: uppercase;
  text-align: center; border-bottom: 1px solid var(--border);
}
.timer-body { padding: 20px 12px 22px; }

/* Roller */
.roller-wrap { display: flex; align-items: flex-start; justify-content: center; gap: 2px; }
.r-unit { display: flex; flex-direction: column; align-items: center; }
.r-scroll {
  display: flex; flex-direction: column; align-items: center;
  gap: 0; overflow: hidden; height: 104px; position: relative;
  cursor: ns-resize;
}
.r-item {
  width: 56px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; border-radius: var(--r8);
  transition: background 0.13s, color 0.13s;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.r-item.cur {
  background: var(--accent-bg); color: var(--accent);
  font-size: 22px; border: 1.5px solid var(--accent-br);
  height: 36px;
}
.r-item.adj1 { color: var(--ink2); font-size: 16px; }
.r-item.adj2 { color: var(--ink4); font-size: 13px; }
.r-colon {
  font-size: 24px; font-weight: 800; color: var(--ink3);
  align-self: center; margin: 0 1px; padding-bottom: 16px;
}
.r-label { font-size: 8px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink4); margin-top: 4px; }

/* Circle timer */
.circle-view { text-align: center; padding: 4px 0; }
.svg-ring { position: relative; width: 150px; height: 150px; margin: 0 auto 14px; }
.svg-ring svg { width: 150px; height: 150px; }
.ring-track { fill: none; stroke: var(--bg2); stroke-width: 10; }
.ring-prog {
  fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear;
}
/* Dot is CSS-positioned and uses JS transform */
.ring-dot {
  position: absolute;
  width: 14px; height: 14px;
  background: var(--accent); border-radius: 50%;
  border: 2.5px solid var(--surface);
  box-shadow: 0 0 8px rgba(92,107,192,0.5);
  /* top/left set by JS */ 
  pointer-events: none;
}
.ring-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fontD); font-size: 26px; font-weight: 600;
  color: var(--ink1); font-variant-numeric: tabular-nums; letter-spacing: 1px;
}

.t-controls { display: flex; justify-content: center; gap: 16px; margin-top: 4px; }
.t-btn {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1.5px solid var(--border2); background: var(--surface2);
  color: var(--ink1); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; box-shadow: var(--sh-xs);
}
.t-btn:hover { transform: scale(1.08); border-color: var(--border2); box-shadow: var(--sh-sm); }
.t-btn.play {
  background: var(--accent); border-color: var(--accent);
  color: #fff; width: 58px; height: 58px; font-size: 20px;
  box-shadow: var(--sh-acc);
}
.t-btn.play:hover { background: var(--accent-lt); }

/* ══════════════════════════════════════
   ACCOUNT PAGE
══════════════════════════════════════ */
.av-section { display: flex; flex-direction: column; align-items: center; padding: 16px 0 8px; }
.av-ring {
  width: 78px; height: 78px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fontD); font-size: 30px; color: #fff;
  position: relative; box-shadow: var(--sh-md); cursor: pointer;
  overflow: visible; /* allow edit btn to overflow */
}
.av-inner {
  width: 78px; height: 78px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fontD); font-size: 30px; color: #fff;
}
.av-edit-btn {
  position: absolute; bottom: -2px; right: -2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); border: 2.5px solid var(--surface);
  color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.2s;
  z-index: 2;
  box-shadow: var(--sh-sm);
}
.av-edit-btn:hover { transform: scale(1.15); background: var(--accent-lt); }

.av-name { font-family: var(--fontD); font-size: 20px; margin-top: 12px; letter-spacing: -0.3px; color: var(--ink1); }
.av-uid {
  font-size: 10px; color: var(--ink3); letter-spacing: 1.2px; margin-top: 3px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r99); padding: 2px 12px; font-weight: 700;
}

/* Avatar picker grid */
.av-picker { display: none; margin: 4px 14px 0; }
.av-picker.open { display: block; }
.av-picker-inner {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r16); overflow: hidden;
}
.av-picker-title { padding: 10px 14px 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.9px; text-transform: uppercase; color: var(--ink3); border-bottom: 1px solid var(--border); }
.av-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; padding: 10px; }
.av-opt {
  aspect-ratio: 1; border-radius: var(--r12); border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; cursor: pointer; transition: all 0.18s; overflow: hidden;
}
.av-opt img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r10); }
.av-opt:hover, .av-opt.sel { border-color: var(--accent); }

/* Profile card */
.acc-card {
  margin: 6px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r16); overflow: hidden;
  box-shadow: var(--sh-xs);
}
.acc-field {
  display: flex; align-items: center; padding: 11px 14px;
  border-bottom: 1px solid var(--border); gap: 10px;
}
.acc-field:last-child { border-bottom: none; }
.afl { font-size: 10px; font-weight: 800; color: var(--ink3); letter-spacing: 0.7px; text-transform: uppercase; min-width: 52px; }
.afi { flex: 1; background: transparent; border: none; outline: none; font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink1); cursor: default; }
.afi:enabled { cursor: text; border-bottom: 1.5px solid var(--accent); }

.fe-btn, .fs-btn, .fc-btn {
  width: 28px; height: 28px; border-radius: 50%; font-size: 11px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s; border: 1.5px solid var(--border);
}
.fe-btn { background: var(--surface2); color: var(--ink3); }
.fe-btn:hover { border-color: var(--accent-br); color: var(--accent); background: var(--accent-bg); }
.fs-btn { background: var(--green-bg); color: var(--green); border-color: rgba(34,197,94,0.3); }
.fc-btn { background: var(--red-bg); color: var(--red); border-color: rgba(239,68,68,0.3); margin-left: 3px; }

.acc-expand-btn {
  width: calc(100% - 28px); margin: 4px 14px;
  padding: 13px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r16);
  color: var(--ink1); font-family: var(--font); font-size: 13px; font-weight: 700;
  text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.18s; box-shadow: var(--sh-xs);
}
.acc-expand-btn:hover { border-color: var(--border2); background: var(--surface2); }
.aeb-chev { color: var(--ink3); font-size: 14px; transition: transform 0.22s; }
.acc-expand-btn.open .aeb-chev { transform: rotate(90deg); }

.acc-expand-body {
  margin: 0 14px 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r16); overflow: hidden; display: none;
  box-shadow: var(--sh-xs);
}
.acc-expand-body.open { display: block; animation: pgIn 0.2s ease; }
.aeb-head { padding: 11px 14px 9px; font-size: 10px; font-weight: 800; color: var(--ink3); letter-spacing: 0.9px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.aeb-inner { padding: 14px; }

.pw-match { font-size: 11px; margin-top: 4px; font-weight: 600; }
.pw-match.ok { color: var(--green); }
.pw-match.no { color: var(--red); }

.logout-btn {
  width: calc(100% - 28px); margin: 6px 14px 28px;
  padding: 13px; background: var(--red-bg);
  border: 1.5px solid rgba(239,68,68,0.2); border-radius: var(--r16);
  color: var(--red); font-family: var(--font); font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.18s;
}
.logout-btn:hover { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.35); }

/* ══════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════ */
.login-bg {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-logo {
  font-family: var(--fontD); font-size: 42px; font-weight: 600;
  color: var(--ink1); letter-spacing: -1px; margin-bottom: 4px;
}
.login-tagline {
  font-size: 12px; color: var(--ink3); font-weight: 500;
  margin-bottom: 36px; letter-spacing: 0.3px;
}
.login-card {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r20);
  padding: 24px 20px; box-shadow: var(--sh-md);
}
.login-card-title {
  font-family: var(--fontD); font-size: 19px; font-weight: 600;
  color: var(--ink1); margin-bottom: 18px; text-align: center;
}
.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0; color: var(--ink4); font-size: 11px; font-weight: 600;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.google-btn {
  width: 100%; padding: 11px; border-radius: var(--r10);
  border: 1.5px solid var(--border); background: var(--surface2);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  color: var(--ink1); cursor: pointer; transition: all 0.18s;
}
.google-btn:hover { border-color: var(--border2); box-shadow: var(--sh-sm); background: var(--white); }
.google-icon { width: 18px; height: 18px; }
.login-footer { text-align: center; margin-top: 16px; font-size: 11px; color: var(--ink3); }
.login-link { color: var(--accent); font-weight: 700; cursor: pointer; background: none; border: none; font-family: var(--font); font-size: 11px; }
.login-link:hover { text-decoration: underline; }
.login-error { color: var(--red); font-size: 11px; font-weight: 600; text-align: center; margin-top: 8px; display: none; }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--r99); border: none;
  cursor: pointer; font-family: var(--font); font-size: 13px; font-weight: 700;
  transition: all 0.18s; letter-spacing: 0.2px;
}
.btn-pri { background: var(--accent); color: #fff; box-shadow: var(--sh-acc); }
.btn-pri:hover { background: var(--accent-lt); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink2); border: 1.5px solid var(--border2); }
.btn-ghost:hover { background: var(--bg2); color: var(--ink1); }
.btn-full { width: 100%; }

/* ══════════════════════════════════════
   SUPPORT / ABOUT / STATIC PAGES
══════════════════════════════════════ */
.static-page { padding: 0 0 20px; }
.static-section {
  margin: 8px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r16); overflow: hidden; box-shadow: var(--sh-xs);
}
.static-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
}
.static-row:last-child { border-bottom: none; }
.static-row:hover { background: var(--surface2); }
.static-row-icon { font-size: 19px; width: 28px; text-align: center; }
.static-row-text { flex: 1; }
.static-row-title { font-size: 13px; font-weight: 700; color: var(--ink1); }
.static-row-sub { font-size: 11px; color: var(--ink3); margin-top: 1px; }
.static-row-chev { color: var(--ink4); font-size: 13px; }

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast {
  position: absolute; bottom: calc(var(--nav-h) + 12px); left: 50%;
  transform: translateX(-50%);
  background: var(--ink1); color: #fff;
  padding: 9px 18px; border-radius: var(--r99);
  font-size: 12px; font-weight: 600; z-index: 999;
  white-space: nowrap; box-shadow: var(--sh-md);
  animation: toastIn 0.25s ease;
}
@keyframes toastIn { from{opacity:0;transform:translateX(-50%) translateY(8px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* ══════════════════════════════════════
   UTILITY
══════════════════════════════════════ */
.hidden { display: none !important; }
.flex-1 { flex: 1; }
