/* Recipes: light, modern, with a pop of rose. */
:root {
  --bg: #faf8f9;
  --surface: #ffffff;
  --surface-2: #f4f0f2;
  --text: #1c1519;
  --muted: #776a71;
  --faint: #b2a6ac;
  --line: #eee6ea;
  --ink: #1c1519;          /* primary buttons */
  --on-ink: #ffffff;
  --pop: #e8457a;          /* the pop of colour: rose */
  --on-pop: #ffffff;
  --pop-soft: #ffe9f0;     /* blush */
  --pop-text: #c42a5f;     /* rose text on light backgrounds */
  --danger: #d93a3a;
  --panel: #2e1426;        /* keep-back panel: deep plum */
  --on-panel: #fff5f9;
  --panel-muted: #c9aabb;
  --panel-line: #4a2540;
  --panel-pop: #ff9ec0;
  --shadow: 0 1px 2px rgba(60, 20, 40, .04), 0 6px 24px rgba(60, 20, 40, .06);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110d0f;
    --surface: #1b1619;
    --surface-2: #261f23;
    --text: #f7f1f4;
    --muted: #b3a5ac;
    --faint: #7d6f76;
    --line: #322a2e;
    --ink: #f7f1f4;
    --on-ink: #110d0f;
    --pop: #ff6b98;
    --pop-soft: #3a1a29;
    --pop-text: #ff8db0;
    --danger: #ff6b6f;
    --panel: #2a1322;
    --on-panel: #fff5f9;
    --panel-muted: #c9aabb;
    --panel-line: #45233a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
  scroll-padding-bottom: calc(env(safe-area-inset-bottom) + 96px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(env(safe-area-inset-bottom) + 84px);
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { letter-spacing: -0.02em; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.topbar h1 { flex: 1; margin: 0; font-size: 24px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  border: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; line-height: 1; padding: 0 0 3px; cursor: pointer; text-decoration: none; flex: none;
}

main {
  max-width: 1100px; margin: 0 auto;
  padding: 8px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left));
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer;
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 15px;
  white-space: nowrap; text-decoration: none; transition: transform .1s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.pop, .btn.is-on { background: var(--pop); color: var(--on-pop); }
.btn.danger { background: none; color: var(--danger); padding-left: 0; }
.btn:disabled { opacity: .45; }
.topbar .btn { padding: 7px 14px; font-size: 14px; }
.file-btn { cursor: pointer; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.toolbar.top { margin: 0 0 10px; }

/* ---------- inputs ---------- */
.search { margin-bottom: 12px; }
.search input { width: 100%; padding: 12px 16px; border-radius: 14px; border: 0; background: var(--surface-2); }
.search input::placeholder { color: var(--faint); }
input[type=text], input[type=number], input[type=url], input[type=password], input[type=date], textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 16px; /* 16px stops iOS zooming in */
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 0; background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.chip.on { background: var(--ink); color: var(--on-ink); box-shadow: none; }

/* ---------- recipe cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.card { display: block; text-decoration: none; color: inherit; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card .ph { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.card .ph .ic { width: 32px; height: 32px; stroke-width: 1.5; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 10px 12px 14px; }
.card h3 { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 700; }
.card .meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.fav .ic { width: 14px; height: 14px; fill: var(--text); stroke: var(--text); vertical-align: -1px; margin-right: 4px; }

.empty { text-align: center; color: var(--muted); padding: 56px 20px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; background: var(--pop); color: var(--on-pop); display: grid; place-items: center; }
.empty-icon .ic { width: 30px; height: 30px; }
.empty-title { color: var(--text); font-size: 20px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
.empty .btn { margin: 6px 4px 0; }

/* ---------- bottom tab bar ---------- */
body.logged-out #tabbar { display: none; }
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px max(10px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 8px) max(10px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
#tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--faint); text-decoration: none; }
#tabbar a span { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .15s; }
#tabbar a .ic { width: 21px; height: 21px; }
#tabbar a.on { color: var(--pop-text); }
#tabbar a.on span { background: var(--pop-soft); color: var(--pop-text); }

#toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  background: var(--ink); color: var(--on-ink); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18); z-index: 20; max-width: calc(100% - 32px);
}

/* ---------- login ---------- */
.login { max-width: 340px; margin: 14vh auto 0; text-align: center; display: grid; gap: 12px; }
.login img { width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 4px; }
.login h2 { margin: 0 0 8px; font-size: 28px; font-weight: 800; }
.login .btn { justify-content: center; padding: 12px; }
.error { color: var(--danger); font-size: 15px; }

/* ---------- week ---------- */
.weeknav { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; text-align: center; margin: 4px 0 14px; }
.weeknav .range { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.theme-name { display: inline-block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface-2); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.segmented a { text-align: center; padding: 8px 4px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.segmented a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
@media (prefers-color-scheme: dark) { .segmented a.on { background: #352b30; } }
@media (max-width: 380px) { .segmented a { font-size: 12px; } }

.days { display: grid; gap: 10px; }
.day-card { display: flex; align-items: stretch; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; overflow: hidden; }
.day-card.cooked .day-body { opacity: .45; }
.day-link { display: flex; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.day-name { flex: none; width: 60px; display: grid; place-content: center; text-align: center; padding: 12px 0; }
.day-name small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.day-name b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.day-name.today b { background: var(--pop); color: var(--on-pop); border-radius: 10px; padding: 0 6px; }
.day-name.icon-col .ic { width: 24px; height: 24px; }
.thumb { width: 64px; object-fit: cover; flex: none; }
.day-body { flex: 1; min-width: 0; padding: 12px 12px 12px 2px; display: grid; gap: 1px; align-content: center; }
.day-body b { line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.day-body > span { color: var(--muted); font-size: 14px; }
.day-body .chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; padding: 0; overflow: visible; }
.mini { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mini.warn { background: var(--pop-soft); color: var(--pop-text); }
.mini .ic { width: 12px; height: 12px; }
.day-actions { display: grid; gap: 8px; align-content: center; justify-items: center; padding: 8px 10px; }
.day-actions select { font-size: 12px; width: 70px; padding: 4px 6px; border-radius: 8px; border: 0; background: var(--surface-2); color: var(--muted); }
.cook-btn { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: none; color: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.cook-btn .ic { width: 18px; height: 18px; stroke-width: 3; }
.cook-btn.on { background: var(--pop); border-color: var(--pop); color: var(--on-pop); }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--pop); border-radius: 3px; }

.refchip { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 7px; margin-left: 4px; border-radius: 6px; background: var(--surface-2); color: var(--text); vertical-align: 2px; }
.refchip.done { color: var(--faint); text-decoration: line-through; }
.hint { color: var(--muted); font-size: 14px; }

/* ---------- checklists ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.cl-heading { font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 22px; padding-bottom: 4px; }
.cl-heading.depth-1 { text-transform: none; letter-spacing: -0.01em; font-size: 15px; color: var(--text); margin-top: 12px; }
.cl-note { color: var(--muted); font-size: 14px; }
.cl-plain { padding: 4px 0 4px 16px; }
.cl-plain.depth-2 { padding-left: 32px; }
.cl-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.cl-item.depth-2 { padding-left: 26px; }
.cl-item.depth-3 { padding-left: 52px; }
.cl-item.task { font-weight: 700; }
.box { flex: none; width: 22px; height: 22px; margin-top: 1px; border: 2px solid var(--faint); border-radius: 7px; transition: background .12s, border-color .12s; }
.done > .box, .cl-item.done .box {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
  border-color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  .done > .box, .cl-item.done .box { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
}
.cl-item.done .cl-text { color: var(--faint); text-decoration: line-through; }
.cl-text { flex: 1; min-width: 0; }
.uses-detail summary { font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; margin-top: 3px; list-style: none; }
.uses-detail summary::before { content: '+ '; }
.uses-detail[open] summary::before { content: '– '; }
.uses-detail .uses { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }

.el-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.el-card { display: grid; gap: 2px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.el-card b { font-weight: 700; letter-spacing: -0.01em; }
.el-card span { color: var(--muted); font-size: 13px; }
.el-card .refchip { margin: 6px 4px 0 0; }

/* ---------- recipe ---------- */
.recipe { max-width: 820px; margin: 0 auto; }
.hero { width: 100%; max-height: 440px; object-fit: cover; border-radius: 24px; display: block; margin-bottom: 18px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.recipe h2 { font-size: 32px; line-height: 1.1; margin: 0 0 6px; font-weight: 800; letter-spacing: -0.035em; }
.subtitle { margin: 0 0 10px; font-size: 18px; color: var(--muted); font-weight: 500; }
.desc { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.fact { background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 500; }
.scaler { display: inline-flex; align-items: center; gap: 6px; padding-right: 6px; }
.scaler button { border: 0; background: var(--surface-2); width: 28px; height: 28px; border-radius: 50%; font-size: 17px; cursor: pointer; display: grid; place-items: center; padding: 0; }
#cooked { margin: 4px 0 6px; }
.cols { display: grid; gap: 28px; margin-top: 8px; }
@media (min-width: 760px) { .cols { grid-template-columns: 2fr 3fr; } }
.recipe h4, main > h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 24px 0 8px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.ingredients { list-style: none; padding: 0; margin: 0; }
.ingredients li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; cursor: pointer; }
.ingredients li.heading { font-weight: 800; border: 0; padding: 18px 0 2px; cursor: default; letter-spacing: -0.01em; }
.ingredients li.done span:last-child { color: var(--faint); text-decoration: line-through; }
.ingredients li.from-prep span:last-child { font-weight: 600; }
.steps { padding-left: 0; list-style: none; counter-reset: step; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 2px 0 18px 42px; cursor: pointer; line-height: 1.6; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--text);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.steps li.current { background: var(--pop-soft); border-radius: 14px; margin: 0 -10px 8px; padding: 10px 10px 12px 52px; }
.steps li.current::before { left: 10px; top: 10px; background: var(--pop); color: var(--on-pop); }
.steps b { font-weight: 700; }
.steps .ref-el { font-weight: 700; color: var(--pop-text); text-decoration: underline; text-decoration-color: var(--pop); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-skip-ink: none; cursor: pointer; }
.amt { display: inline-block; margin-left: 3px; font-size: 12px; font-weight: 700; padding: 0 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); vertical-align: 1px; line-height: 1.6; }
.notes { white-space: pre-wrap; background: var(--surface); box-shadow: var(--shadow); border-radius: 16px; padding: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }

/* panels */
.panel { background: var(--surface); box-shadow: var(--shadow); border-radius: 20px; padding: 14px 16px; margin: 18px 0; }
.panel h4 { margin-top: 2px !important; }
.panel summary { font-weight: 700; cursor: pointer; }
.prep-panel { background: var(--surface); }
.el { padding: 10px 0; border-top: 1px solid var(--line); }
.el:first-of-type { border-top: 0; padding-top: 2px; }
.el-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.el-head a { color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.share { font-weight: 700; font-size: 13px; background: var(--surface-2); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.line { font-size: 14px; color: var(--muted); }
.el-keep { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 14px; font-weight: 600; background: var(--pop-soft); color: var(--pop-text); padding: 7px 10px; border-radius: 12px; }
.el-keep .ic { margin-top: 1px; }
.el-keep a { color: var(--pop-text); }
.ok { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 14px; color: var(--muted); }

/* the key view: keep back */
.keep-panel { background: var(--panel); color: var(--on-panel); box-shadow: 0 10px 30px rgba(46, 20, 38, .22); }
.keep-panel h4 { color: var(--panel-pop) !important; }
.kb { padding: 12px 0; border-top: 1px solid var(--panel-line); scroll-margin-top: 90px; transition: background .4s; border-radius: 10px; }
.kb:first-of-type { border-top: 0; padding-top: 2px; }
.kb.flash { background: color-mix(in srgb, var(--pop) 25%, transparent); }
.kb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kb-head b { font-size: 17px; letter-spacing: -0.01em; }
.bought { font-size: 12px; color: var(--panel-muted); white-space: nowrap; }
.kb-row { display: grid; grid-template-columns: 92px 1fr; gap: 8px; margin-top: 8px; font-size: 15px; }
.kb-row .lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--panel-muted); padding-top: 3px; }
.kb-row.keep .lbl { color: var(--panel-pop); }
.kb-row.keep .lbl b { display: inline-block; margin-top: 4px; font-size: 15px; text-transform: none; letter-spacing: 0; background: var(--pop); color: var(--on-pop); padding: 1px 8px; border-radius: 8px; }
.kb-row.used { opacity: .55; }
.keep-panel .uses a { color: var(--on-panel); }
.keep-panel .line { color: var(--panel-muted); }
.keep-panel .when { color: var(--panel-pop); }
.keep-panel .when.done { color: var(--panel-muted); }
details.panel .kb { border-color: var(--line); }
@media (max-width: 420px) { .kb-row, .kb-row.keep { grid-template-columns: 1fr; gap: 2px; } }
.uses { list-style: none; margin: 0; padding: 0; }
.uses li { padding: 3px 0; }
.uses a { color: var(--text); font-weight: 600; text-decoration: none; }
.when { display: inline-block; min-width: 38px; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: var(--pop-text); }
.when.done { color: var(--faint); text-decoration: line-through; }
.badge { display: inline-block; margin-left: 4px; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--pop); color: var(--on-pop); text-decoration: none; white-space: nowrap; }

/* videos */
.videos { display: grid; gap: 10px; margin: 16px 0; }
.video { margin: 0; }
.video video, .video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; background: #000; display: block; }
.video video { aspect-ratio: auto; max-height: 70vh; }
.video-title { font-size: 14px; color: var(--muted); margin-top: 6px; }
.video-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; font-weight: 700; }
.video-link .play { width: 40px; height: 40px; border-radius: 50%; background: var(--pop); color: var(--on-pop); display: grid; place-items: center; flex: none; }
.video-link .play .ic { fill: currentColor; width: 16px; height: 16px; }
.video-link small { display: block; color: var(--muted); font-weight: 500; }
.video-row { display: grid; gap: 6px; margin-bottom: 12px; justify-items: start; }
.video-row figure, .video-row .video-link { width: 100%; }

/* ---------- forms ---------- */
form.edit { max-width: 720px; margin: 0 auto; display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
label small { font-weight: 400; font-size: 13px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-form { display: flex; gap: 8px; margin: 8px 0; }
.row-form input { flex: 1; min-width: 0; }
.photo-pick { display: flex; align-items: center; gap: 12px; }
.photo-pick img { width: 96px; height: 72px; object-fit: cover; border-radius: 12px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 16px; }
label.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.form-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; }

/* ---------- library, import, calendar ---------- */
.theme-list { display: grid; gap: 10px; }
.theme-card { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); border: 0; text-decoration: none; color: inherit; cursor: pointer; font: inherit; }
.theme-card b { font-weight: 700; letter-spacing: -0.01em; }
.theme-card span { color: var(--muted); font-size: 14px; }
.theme-card small { font-size: 12px; font-weight: 700; margin-top: 4px; justify-self: start; background: var(--pop-soft); color: var(--pop-text); padding: 1px 8px; border-radius: 999px; }
.preview-list { padding-left: 20px; }
.preview-list li { margin-bottom: 8px; }
.preview-list a { text-decoration: none; }
.preview-list small { display: block; color: var(--muted); }
.warn-box { display: grid; gap: 4px; background: var(--pop-soft); color: var(--pop-text); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; margin: 8px 0; }
.import { max-width: 720px; margin: 0 auto; }
.import > p { color: var(--muted); }

.cal { display: grid; gap: 8px; }
.cal-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; align-items: center; padding: 10px 8px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.cal-head { background: none; box-shadow: none; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: center; padding: 0 8px; }
.cal-day { text-align: center; font-weight: 700; padding: 5px 0; border-radius: 10px; font-variant-numeric: tabular-nums; }
.cal-day.sun { color: var(--muted); }
.cal-day.other { opacity: .35; }
.cal-day.today { background: var(--ink); color: var(--on-ink); opacity: 1; }
.cal-theme { grid-column: 1 / -1; font-size: 13px; font-weight: 600; padding: 4px 6px 0; }
.cal-theme em { color: var(--faint); font-weight: 500; font-style: normal; }
.cal-row.planned .cal-theme { justify-self: start; background: var(--pop-soft); color: var(--pop-text); border-radius: 999px; padding: 2px 10px; margin: 6px 4px 0; }
