/* month-subs — production styles. Design system from the mockup; fonts via CDN. */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500&display=swap');


*, *::before, *::after { box-sizing: border-box; }

:root {
  /* accent — overridden inline by Tweaks */
  --accent: oklch(0.68 0.145 42);          /* warm coral / terracotta */
  --accent-ink: color-mix(in oklch, var(--accent) 62%, black);
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-fg: #fff;

  /* density multiplier — overridden inline */
  --d: 1;

  /* warm-neutral light theme */
  --bg:        oklch(0.985 0.006 75);       /* warm paper */
  --bg-2:      oklch(0.965 0.008 75);       /* sunken */
  --surface:   oklch(1 0.002 75);           /* card */
  --surface-2: oklch(0.975 0.006 75);
  --ink:       oklch(0.26 0.014 60);        /* graphite */
  --ink-2:     oklch(0.46 0.012 60);        /* secondary */
  --ink-3:     oklch(0.62 0.010 60);        /* tertiary */
  --line:      oklch(0.91 0.008 75);        /* hairline */
  --line-2:    oklch(0.87 0.010 75);
  --good:      oklch(0.62 0.13 155);
  --warn:      oklch(0.70 0.14 65);
  --bad:       oklch(0.60 0.17 25);

  --shadow-sm: 0 1px 2px rgba(40,30,20,0.05), 0 1px 3px rgba(40,30,20,0.04);
  --shadow-md: 0 2px 6px rgba(40,30,20,0.05), 0 8px 24px rgba(40,30,20,0.07);
  --shadow-lg: 0 8px 20px rgba(40,30,20,0.08), 0 24px 60px rgba(40,30,20,0.12);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 32px;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}

[data-round="sharp"] {
  --r-sm: 7px; --r-md: 10px; --r-lg: 14px; --r-xl: 16px;
}

[data-theme="dark"] {
  --bg:        oklch(0.21 0.012 70);
  --bg-2:      oklch(0.18 0.012 70);
  --surface:   oklch(0.255 0.013 70);
  --surface-2: oklch(0.29 0.014 70);
  --ink:       oklch(0.95 0.008 75);
  --ink-2:     oklch(0.76 0.010 75);
  --ink-3:     oklch(0.60 0.010 75);
  --line:      oklch(0.34 0.012 70);
  --line-2:    oklch(0.40 0.014 70);
  --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.32), 0 10px 28px rgba(0,0,0,0.36);
  --shadow-lg: 0 10px 26px rgba(0,0,0,0.4), 0 28px 70px rgba(0,0,0,0.5);
}

body { margin: 0; background: #1b1b1f; }

/* app root inside the device */
.app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow: hidden;
}

.app, .app * { font-feature-settings: "ss01", "cv01"; }

/* numbers — tabular */
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── scroll area ── */
.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 116px; /* clear tab bar + home indicator */
}
.scroll::-webkit-scrollbar { width: 0; height: 0; }

/* ── header ── */
.hdr {
  padding: calc(58px + 6px * var(--d)) calc(20px * var(--d)) calc(10px * var(--d));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.hdr-hi { font-size: 14px; color: var(--ink-3); font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.hdr-title { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; line-height: 1.05; white-space: nowrap; }

.iconbtn {
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  transition: transform .15s, background .15s;
}
.iconbtn:active { transform: scale(0.92); }
.dot-badge {
  position: absolute; top: 7px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}

/* ── generic card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.section-pad { padding: 0 calc(20px * var(--d)); }
.stack { display: flex; flex-direction: column; gap: calc(14px * var(--d)); }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3);
}
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-s { gap: 8px; }
.gap-m { gap: 12px; }

/* monogram tile */
.mono-tile {
  flex: none;
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  position: relative;
  overflow: hidden;
}
.mono-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 55%);
}

/* category dot + chip */
.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}
.chip.active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-ink);
}
[data-theme="dark"] .chip.active { color: var(--ink); }

/* pill buttons */
.btn {
  font-family: var(--font);
  font-weight: 700; font-size: 15px;
  border: none; cursor: pointer;
  border-radius: 999px;
  padding: 13px 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .14s, filter .14s, background .14s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-fg); box-shadow: var(--shadow-md); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-block { width: 100%; }

/* segmented control */
.seg {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px;
}
.seg button {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font); font-weight: 600; font-size: 13px;
  color: var(--ink-2); padding: 7px 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .18s;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ── bottom tab bar ── */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 92px;
  padding: 8px 14px 30px;
  display: flex; align-items: center; justify-content: space-around;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.tab {
  border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-3); font-family: var(--font);
  font-size: 10.5px; font-weight: 600;
  padding: 4px 10px; flex: 1;
  transition: color .15s;
}
.tab.on { color: var(--accent); }
.tab svg { width: 24px; height: 24px; }

/* center add button */
.fab {
  width: 56px; height: 56px; border-radius: 20px;
  background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center; cursor: pointer; border: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent);
  margin-top: -22px;
  transition: transform .16s;
}
.fab:active { transform: scale(0.92); }

/* ── sheet / modal ── */
.sheet-scrim {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(20,15,10,0.42);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end;
  animation: fade .2s ease;
}
.sheet {
  width: 100%;
  max-height: 92%;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slideup .28s cubic-bezier(.22,.9,.3,1);
  overflow: hidden;
}
.sheet-grab {
  width: 40px; height: 5px; border-radius: 999px;
  background: var(--line-2); margin: 10px auto 4px;
  flex: none;
}
.sheet-body { overflow-y: auto; padding: 4px 20px 28px; }
.sheet-body::-webkit-scrollbar { width: 0; }

@keyframes fade { from { opacity: 0; } }
@keyframes slideup { from { transform: translateY(100%); } }

/* ── form fields ── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.input {
  font-family: var(--font); font-size: 15.5px; font-weight: 500;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 14px;
  padding: 13px 14px; width: 100%; outline: none;
  transition: border-color .15s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { border-color: var(--accent); }
textarea.input { resize: none; line-height: 1.5; }

/* progress / bars */
.track { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.track > span { display: block; height: 100%; border-radius: 999px; }

/* calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: calc(4px * var(--d)); }
.cal-cell {
  aspect-ratio: 1 / 1.08;
  border-radius: 13px;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 7px; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; position: relative;
  border: 1.5px solid transparent;
  transition: background .14s;
}
.cal-cell.muted { color: var(--ink-3); opacity: 0.45; }
.cal-cell.today { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
[data-theme="dark"] .cal-cell.today { color: var(--ink); }
.cal-cell.sel { border-color: var(--accent); }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; max-width: 80%; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }

.fade-in { animation: fade .25s ease; }

/* keep emoji-free, monospace explainer for image placeholders (unused but ready) */
.ph {
  background:
    repeating-linear-gradient(45deg, var(--bg-2), var(--bg-2) 8px, transparent 8px, transparent 16px);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}
</style>

/* ── production full-screen shell (replaces the device frame) ── */
html, body { height: 100%; margin: 0; }
body { background: var(--bg); }
#root { height: 100%; }
.app { height: 100%; }
/* respect the real status bar / notch via safe-area insets */
.hdr { padding-top: calc(env(safe-area-inset-top, 0px) + 18px); }
.tabbar { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); height: auto; }
