/* Storybank design system ------------------------------------------------ */
:root {
  /* Clean white canvas; warm beige (sand) is saved for products, search and inputs. */
  --bg: #FCFCFB;
  --bg-2: #F5F5F3;
  --surface: #FFFFFF;
  --surface-2: #F5F5F3;
  --sand: #F5F5F3;
  --sand-2: #EDEDE9;
  /* Warm paper tone, kept only for the boxes people write their stories in. */
  --paper: #FAFAF7;
  --ink: #252525;
  --ink-2: #3A3D42;
  --muted: #5F6368;
  --faint: #9AA0A6;
  --line: #E5E5E2;
  --line-2: #D4D4CF;
  --chip: #F1F1EE;
  --sage: #7a8769;
  --sage-ink: #5d6a4f;
  --sage-soft: #e6e9dd;
  --charcoal: #2b2f33;
  --charcoal-2: #23262a;
  --danger: #a3533f;
  --danger-soft: #f3e3dc;
  --warn: #9a7a3a;
  --warn-soft: #f4ead3;
  /* Website type: the rounded Nunito Sans from the logo, for headings and text.
     Books keep an elegant serif (--book): pages, inserts and the writing area. */
  --serif: 'Nunito Sans', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --sans: 'Nunito Sans', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --book: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --r: 10px;
  --r-sm: 7px;
  --shadow: 0 1px 2px rgba(60, 50, 40, .04), 0 8px 24px rgba(60, 50, 40, .05);
  --shadow-lg: 0 24px 60px rgba(40, 32, 24, .18);
  --header: 64px;
  --sidebar: 196px;
  /* Brand light blue (logo / marketing). */
  --brand: #B8E8F8;
  --brand-soft: #E3F6FD;
  --brand-ink: #111111;
  /* Warm accents that sit beside the brand blue. Films use the blue, photo
     books the rose, chapter books the honey. */
  --rose: #f2c4b4;
  --rose-soft: #fbe9e2;
  --rose-ink: #9a4f3a;
  --honey: #f1d68f;
  --honey-soft: #fbf2d8;
  --honey-ink: #85621a;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.01em; color: var(--ink); }
.serif { font-family: var(--serif); }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.kicker { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: 13px; letter-spacing: .02em;
  transition: background .15s, border-color .15s, color .15s, opacity .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--charcoal); border-color: var(--charcoal); color: #F5F5F3; }
.btn.primary:hover { background: var(--charcoal-2); }
.btn.sage { background: var(--sage); border-color: var(--sage); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--chip); }
.btn.danger { color: var(--danger); border-color: #e3c7bd; }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.sm { height: 30px; padding: 0 13px; font-size: 12px; }
.btn.xs { height: 26px; padding: 0 10px; font-size: 11.5px; }
.btn.lg { height: 46px; padding: 0 26px; font-size: 14px; }
.btn.block { width: 100%; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 999px; display: inline-grid; place-items: center;
  border: 0; background: transparent; cursor: pointer; color: var(--ink-2); flex: none;
}
.icon-btn:hover { background: var(--chip); color: var(--ink); }
.icon-btn.sm { width: 28px; height: 28px; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { text-decoration-color: var(--ink); }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.xs { width: 13px; height: 13px; }
svg.i.lg { width: 22px; height: 22px; }

/* Forms ----------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12px; color: var(--ink-2); letter-spacing: .02em; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: var(--sand); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: #B8E8F8; box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
.input.sm, .select.sm { padding: 6px 10px; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); }
.error-text { font-size: 12.5px; color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { accent-color: var(--charcoal); margin-top: 3px; }
.radio-row { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13px; }
.radio-row input { accent-color: var(--charcoal); }
.toggle { position: relative; width: 36px; height: 20px; flex: none; }
.toggle input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; transition: .2s; }
.toggle span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.toggle input:checked + span { background: #252525; }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 2px; }

.search {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px; border: 1px solid var(--line);
  background: var(--sand); border-radius: 999px; min-width: 260px; color: var(--muted);
}
.search input { border: 0; background: transparent; outline: none; flex: 1; font-size: 13px; color: var(--ink); min-width: 0; }
.search:focus-within { border-color: #B8E8F8; box-shadow: 0 0 0 3px var(--brand-soft); }

/* App shell ------------------------------------------------------------- */
.app-header {
  position: sticky; top: 0; z-index: 40; height: var(--header); background: #fff;
  border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px 0 32px; gap: 14px;
}
.wordmark { font-family: 'Nunito Sans', 'Avenir Next', Avenir, var(--sans); font-weight: 400; font-size: 27px; letter-spacing: .1em; color: var(--ink); line-height: 1; display: inline-flex; align-items: center; gap: .42em; }
.logo-mark { width: 1.3em; height: 1.3em; flex: none; display: block; filter: drop-shadow(0 2px 4px rgba(31,99,120,.14)); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 10px; }
.badge-dot {
  position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--charcoal); color: #fff; font-size: 9.5px; display: grid; place-items: center; line-height: 1;
}
.badge-dot.alert { background: #a8584a; }
.rel { position: relative; }
.avatar-btn { display: flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; padding: 3px; border-radius: 999px; color: var(--ink-2); }
.avatar-btn:hover { background: var(--chip); }

.app-body { display: flex; min-height: calc(100vh - var(--header)); }
.sidebar {
  width: var(--sidebar); flex: none; border-right: 1px solid var(--line); padding: 26px 12px; background: #fff;
  position: sticky; top: var(--header); height: calc(100vh - var(--header)); display: flex; flex-direction: column;
}
.nav-item {
  display: flex; align-items: center; gap: 13px; padding: 10px 14px; border-radius: 999px; color: var(--ink-2);
  font-size: 13.5px; letter-spacing: .06em; margin-bottom: 4px; transition: background .15s, color .15s;
}
.nav-item svg.i { width: 21px; height: 21px; }
.nav-item:hover { background: var(--chip); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-ink); }
.sidebar-foot { margin-top: auto; text-align: center; color: var(--ink-2); padding-bottom: 14px; }
.sidebar-foot .sprig { width: 44px; height: 44px; margin: 0 auto 8px; stroke: var(--ink-2); }
.sidebar-foot .tag { font-size: 9px; letter-spacing: .24em; line-height: 1.9; color: var(--muted); }
.sidebar-foot .rule { width: 30px; height: 1px; background: var(--line-2); margin: 12px auto 0; }
.main { flex: 1; min-width: 0; padding: 30px 40px 80px; }
.main.wide { padding-right: 28px; }
.page { max-width: 1180px; }

.page-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 52px; line-height: 1.05; font-weight: 500; }
.page-head .sub { margin-top: 8px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; cursor: pointer; background: none; border: 0; padding: 0; }
.crumb:hover { color: var(--ink); }
.crumb.case { text-transform: none; letter-spacing: .02em; font-size: 12.5px; }

/* Tabs & chips ---------------------------------------------------------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab {
  padding: 12px 14px; font-size: 14px; letter-spacing: .04em; color: var(--ink-2); background: none; border: 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.tab .count { font-size: 11px; color: var(--muted); margin-left: 4px; }
.chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--sand-2); background: var(--sand); font-size: 12.5px; color: var(--ink-2); cursor: pointer; letter-spacing: .02em;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--chip); border-color: var(--chip); color: var(--ink); }
.chip.plain { border-color: transparent; }
.chip.plain[aria-pressed="true"] { border-color: var(--chip); }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.library-toolbar { gap: 14px; }
.library-toolbar .sort { margin-left: 0; }
.library-search { flex: 1; min-width: 220px; max-width: 420px; margin-left: auto; }
.library-search .search { min-width: 0; height: 38px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-left: auto; }
.sort select { border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); padding: 7px 30px 7px 14px; font-size: 12.5px; color: var(--ink); appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2357514a' stroke-width='1.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }

/* Cards ----------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.card.pad { padding: 20px 22px; }
.card h3 { font-size: 24px; }
.panel-title { font-family: var(--serif); font-size: 23px; font-weight: 500; }
.thumb { position: relative; overflow: hidden; border-radius: var(--r-sm); background: linear-gradient(135deg, #EFEFEC, #d5dae0); flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #a39886; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.9); background: rgba(30,25,20,.25); display: grid; place-items: center; color: #fff; backdrop-filter: blur(2px);
}
.play svg { width: 14px; height: 14px; fill: #fff; stroke: none; margin-left: 2px; }
.play.lg { width: 58px; height: 58px; }
.play.lg svg { width: 22px; height: 22px; }
.type-label { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.type-label svg.i { width: 13px; height: 13px; }
.card-title { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.2; color: var(--ink); }
.card-title.sm { font-size: 18px; }
.desc { color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.status {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: .06em; background: var(--chip); color: var(--ink-2); white-space: nowrap;
}
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.status.sage { background: var(--sage-soft); color: var(--sage-ink); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.plain::before { display: none; }
.status.upper { text-transform: uppercase; letter-spacing: .1em; font-size: 9.5px; }
.progress { height: 4px; background: #e6e0d6; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #B8E8F8); border-radius: 99px; }
.clickable { cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .2s; }
.clickable:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.avatars { display: flex; }
.avatars > * { margin-left: -6px; border: 2px solid var(--surface); }
.avatars > *:first-child { margin-left: 0; }
.avatar { border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; font-size: 11px; color: #fff; font-weight: 500; letter-spacing: .02em; background: #aab2bb; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
a.avatar { cursor: pointer; transition: box-shadow .15s; }
a.avatar:hover { box-shadow: 0 0 0 2px var(--sage); }
.profile-link { color: inherit; text-decoration: none; }
.profile-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.mgr-tag { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-ink); background: var(--sage-soft); padding: 2px 7px; border-radius: 99px; }
.stat-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12.5px; background: none; border: 0; padding: 4px 6px; margin-left: -6px; border-radius: 6px; cursor: pointer; }
.stat-inline:hover { background: var(--chip); }
.stat-inline.on { color: var(--ink); }
.stat-inline.on svg.heart { fill: #b8665a; stroke: #b8665a; }

/* Library: Stories to Tell ---------------------------------------------- */
.ideas { max-width: 860px; }
.ideas-hero { display: flex; align-items: flex-end; gap: 20px; margin: 4px 0 18px; }
.ideas-hero h2 { font-size: 34px; font-weight: 400; }
.ideas-hero p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; max-width: 520px; }
.ideas-count { margin-left: auto; text-align: right; font-size: 11.5px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.ideas-count b { display: block; font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1; color: var(--ink); }
.ideas-add { padding: 16px 18px; margin-bottom: 18px; border-style: dashed; border-color: var(--line-2); background: var(--surface-2); }
.ideas-input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-family: var(--serif); font-size: 21px; color: var(--ink); }
.ideas-input::placeholder { color: var(--faint); font-style: italic; }
.ideas-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.idea { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; }
.idea-check { position: relative; width: 24px; height: 24px; margin-top: 2px; cursor: pointer; }
.idea-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.idea-check span { position: absolute; inset: 0; border: 1.5px solid var(--line-2); border-radius: 50%; background: var(--surface-2); transition: .2s; }
.idea-check input:checked + span { background: #B8E8F8; border-color: #B8E8F8; }
.idea-check input:checked + span::after { content: ''; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.idea-check input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 2px; }
.idea-title { display: block; background: none; border: 0; padding: 0; text-align: left; cursor: text; font-family: var(--serif); font-size: 20px; line-height: 1.25; color: var(--ink); }
.idea-note { font-size: 13px; color: var(--ink-2); margin-top: 3px; white-space: pre-line; }
.idea-meta { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.idea-actions { display: flex; align-items: center; gap: 4px; }
.idea.is-done { opacity: .7; }
.idea.is-done .idea-title { text-decoration: line-through; text-decoration-color: var(--faint); cursor: default; }
.ideas-done { margin-top: 18px; }
.ideas-done .ideas-list { margin-top: 10px; }
.ideas-empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.ideas-empty p { font-family: var(--serif); font-size: 19px; color: var(--ink-2); margin: 8px 0 0; }
.idea-templates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.idea-template { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; font-size: 13px; transition: border-color .15s, transform .15s; }
.idea-template:hover { border-color: var(--ink-2); transform: translateY(-2px); }
.idea-template .ring { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 6px 14px rgba(60,45,30,.18); }
.idea-template .ring img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .ideas-hero { flex-direction: column; align-items: flex-start; }
  .ideas-count { margin-left: 0; text-align: left; }
  .idea { grid-template-columns: 28px minmax(0, 1fr); }
  .idea-actions { grid-column: 2; }
  .idea-templates { grid-template-columns: repeat(2, 1fr); }
}

/* Library bookshelf ------------------------------------------------------ */
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface-2); }
.view-toggle button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--chip); color: var(--ink); }
.bookshelf { padding: 26px 18px 10px; border-radius: 16px; background: linear-gradient(180deg, #EFEFEC 0%, #EFEFEC 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.shelf-row { margin-bottom: 74px; }
.shelf-row:last-child { margin-bottom: 64px; }
.shelf-books { display: flex; align-items: flex-end; gap: 26px; padding: 0 24px; min-height: 170px; }
.shelf-plank {
  position: relative; height: 14px; border-radius: 3px;
  background: linear-gradient(180deg, #F5F5F3 0%, #e2d6c3 55%, #cfbfa6 100%);
  box-shadow: 0 14px 20px -8px rgba(70, 52, 34, .45), inset 0 1px 0 rgba(255,255,255,.8);
}
.shelf-plank::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 6px; background: linear-gradient(180deg, rgba(120,95,65,.25), transparent); border-radius: 0 0 3px 3px; }
.shelf-book { position: relative; flex: none; background: none; border: 0; padding: 0; cursor: pointer; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.shelf-book:hover, .shelf-book:focus-visible { transform: translateY(-10px); }
.shelf-cover { position: relative; display: block; overflow: hidden; background: #ddd3c4; box-shadow: 0 10px 16px -6px rgba(50,38,26,.45), 0 2px 4px rgba(50,38,26,.18); transition: box-shadow .25s; }
.shelf-book:hover .shelf-cover { box-shadow: 0 22px 26px -10px rgba(50,38,26,.5), 0 3px 6px rgba(50,38,26,.2); }
.shelf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.is-written .shelf-cover { aspect-ratio: 2 / 3; border-radius: 2px 5px 5px 2px; }
.is-photo .shelf-cover { aspect-ratio: 1; border-radius: 2px 4px 4px 2px; }
/* Book spine: darker band and a crease along the left edge. */
.is-written .shelf-cover::before, .is-photo .shelf-cover::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 12px; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.18) 55%, rgba(0,0,0,.08));
}
.is-film .shelf-cover { aspect-ratio: 16 / 10; border: 5px solid #2b2724; border-radius: 6px; }
.shelf-cover .play { width: 32px; height: 32px; }
.shelf-blank { display: grid; place-items: center; height: 100%; padding: 10px; font-family: var(--book); font-size: 14px; color: var(--ink-2); text-align: center; }
.shelf-flag { position: absolute; top: 6px; right: 6px; z-index: 2; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; background: rgba(30,25,20,.55); color: #fff; padding: 2px 6px; border-radius: 99px; }
.shelf-label { position: absolute; left: 50%; top: calc(100% + 26px); width: max(100%, 120px); transform: translateX(-50%); text-align: center; pointer-events: none; }
.shelf-book:hover .shelf-label { transform: translate(-50%, 10px); }
.shelf-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--serif); font-size: 14px; line-height: 1.2; color: var(--ink); }
.shelf-sub { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .bookshelf { padding: 18px 8px 4px; }
  .shelf-books { gap: 18px; padding: 0 12px; min-height: 140px; }
}

/* Lists in Library ------------------------------------------------------ */
.list-rows { display: flex; flex-direction: column; gap: 12px; }
.list-rows { gap: 10px; }
.lib-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 18px; padding: 10px 14px 10px 10px; align-items: center; background: #fff; }
.lib-row .thumb { width: 76px; height: 64px; border-radius: 7px; }
.lib-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lib-row .mk-title { font-size: 19px; }
.lib-row-progress { display: flex; align-items: center; gap: 10px; max-width: 280px; margin-top: 3px; }
.lib-row-progress .progress { flex: 1; }
.lib-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.tile-badge { position: absolute; left: 10px; top: 10px; }
.tile-badge .status { box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.tile-badge .status.plain { background: rgba(255,255,255,.94); }
.tile-menu { position: absolute; right: 8px; top: 8px; border-radius: 99px; background: rgba(255,255,255,.94); box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.tile-menu .icon-btn { width: 30px; height: 30px; }
.grid-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini-card { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 12px; position: relative; }
.mini-card .thumb { width: 96px; height: 88px; }
.mini-card .top-right { position: absolute; top: 12px; right: 10px; display: flex; align-items: center; gap: 4px; }
.mini-card .body { min-width: 0; padding-right: 110px; display: flex; flex-direction: column; gap: 4px; }
.mini-card .foot { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 22px; }
.pager button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.pager button[aria-current="true"] { background: var(--chip); color: var(--ink); }
.pager button:disabled { opacity: .35; cursor: default; }

/* Menus, popovers, modals ---------------------------------------------- */
.menu {
  position: absolute; z-index: 60; min-width: 190px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .14s ease-out;
}
.menu button, .menu a { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; font-size: 13px; color: var(--ink-2); background: none; border: 0; border-radius: 8px; cursor: pointer; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--chip); color: var(--ink); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu .count { margin-left: auto; background: #a8584a; color: #fff; font-size: 10px; border-radius: 99px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(42, 36, 30, .38); display: grid; place-items: center; padding: 24px; animation: fade .15s ease-out; backdrop-filter: blur(2px); }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface-2); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; position: relative; animation: pop .18s ease-out; }
.modal.wide { width: min(980px, 100%); }
.modal.mid { width: min(720px, 100%); }
.modal-head { padding: 22px 26px 0; display: flex; align-items: flex-start; gap: 12px; }
.modal-head h2 { font-size: 28px; }
.modal-body { padding: 18px 26px 24px; }
.modal-foot { padding: 14px 26px 22px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }
.modal .close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--charcoal); color: #F5F5F3; padding: 11px 18px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow-lg); pointer-events: auto; display: flex; gap: 12px; align-items: center; animation: pop .2s ease-out; }
.toast.error { background: #8d4636; }
.toast button { background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; font-size: 12.5px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--sage-soft); color: var(--sage-ink); font-size: 12.5px; line-height: 1.5; }
.notice.warn { background: var(--warn-soft); color: #7a5f2a; }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.plain { background: var(--bg-2); color: var(--ink-2); }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #7a5f2a; background: var(--warn-soft); border-radius: 99px; padding: 3px 9px; }

/* Empty / loading -------------------------------------------------------- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.empty h3 { font-size: 28px; margin-bottom: 8px; }
.empty p { max-width: 420px; margin: 0 auto 18px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, #EFEFEC 0%, #F5F5F3 50%, #EFEFEC 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--ink-2); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Feed ------------------------------------------------------------------ */
.feed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.feed-card { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.feed-card .thumb { width: 100%; aspect-ratio: 5 / 4; border-radius: 6px; }
.feed-card .creator { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.feed-card .foot { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.price { margin-left: auto; font-size: 13px; color: var(--ink); letter-spacing: .02em; }
.price.free { color: var(--sage-ink); }

/* Marketplace ---------------------------------------------------------- */
.mk-hero {
  position: relative; overflow: hidden; border-radius: 16px; margin-bottom: 30px; padding: 24px 32px;
  display: flex; align-items: center; gap: 30px; color: var(--ink);
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(40,32,24,.06);
}
.mk-hero .eyebrow { letter-spacing: .26em; }
.mk-hero-text { flex: 1; min-width: 0; }
.mk-hero h1 { font-size: clamp(28px, 2.5vw, 38px); line-height: 1.08; font-weight: 400; margin: 8px 0 8px; letter-spacing: -0.01em; color: var(--ink); }
.mk-hero h1 em { font-style: italic; }
.mk-hero p { color: var(--ink-2); font-size: 14px; line-height: 1.55; margin: 0; max-width: 520px; }
.mk-hero-side { display: flex; flex-direction: column; gap: 12px; flex: none; padding-left: 26px; border-left: 1px solid var(--line); }
.mk-tagline { font-family: var(--serif); font-size: 20px; color: var(--ink-2); margin-top: 6px; }
.mk-tagline em { color: var(--ink); }
.mk-stat { display: flex; align-items: baseline; gap: 10px; max-width: 220px; }
.mk-stat b { font-family: var(--serif); font-size: 24px; min-width: 34px; font-weight: 500; line-height: 1; color: var(--ink); }
.mk-stat span { font-size: 11px; letter-spacing: .05em; line-height: 1.35; color: var(--ink-2); }
.btn.mk-cta { background: #F5F5F3; color: #23262a; border-color: #F5F5F3; height: 42px; padding: 0 20px; }
.btn.mk-cta:hover { background: #fff; }
/* Rotating "Write your ___ story" call to action */
.write-your.hero { background: none; border: 0; padding: 0; border-radius: 0; gap: 14px; font-size: clamp(34px, 3.5vw, 52px); font-weight: 400; color: var(--ink); }
.write-your.hero:hover, .write-your.hero:focus-visible { background: none; }
.write-your.hero .wy-slot { border-bottom-width: 2px; padding-bottom: 2px; }
.write-your.hero svg.i { width: 26px; height: 26px; transition: transform .2s; }
.write-your.hero:hover svg.i { transform: translateX(4px); }
.mk-hero h1 .write-your { max-width: 100%; }
.sw-preview { background: #2a2622; border-radius: 999px; padding: 6px; }
.sw-preview .write-your { font-size: 17px; padding: 9px 16px; }
.write-your {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 12px 20px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(127, 207, 230, .45); color: #F5F5F3;
  font-family: var(--serif); font-size: 20px; line-height: 1.1; transition: background .2s, border-color .2s;
}
.write-your:hover, .write-your:focus-visible { background: rgba(255, 255, 255, .16); border-color: #B8E8F8; }
.write-your svg.i { align-self: center; margin-left: 2px; color: #B8E8F8; }
.wy-slot { position: relative; display: inline-grid; text-align: center; padding: 0 2px 3px; border-bottom: 1.5px solid #B8E8F8; overflow: hidden; }
.wy-sizer { visibility: hidden; grid-area: 1 / 1; }
.wy-word { grid-area: 1 / 1; font-style: italic; color: #e8d7b4; animation: wy-in .38s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes wy-in { from { transform: translateY(70%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wy-word { animation: none; } }
.mk-people-row { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.mk-people-row .kicker { flex: none; writing-mode: horizontal-tb; }
.mk-people { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px; flex: 1; min-width: 0; }
.mk-person { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; flex: none; width: 70px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.mk-ring { padding: 2.5px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--surface-2); transition: transform .2s; }
.mk-ring.has-new { border-color: #c9a96a; box-shadow: 0 0 0 2px rgba(201,169,106,.2); }
.mk-person:hover .mk-ring { transform: translateY(-2px); }
.mk-person-name { font-size: 11.5px; letter-spacing: .02em; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-new { position: absolute; top: -2px; right: -4px; font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; background: #b8955a; color: #fff; padding: 2px 6px; border-radius: 99px; }
.mk-plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); border: 1px dashed var(--line-2); }
.mk-trending { margin-bottom: 30px; }
.mk-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 16px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.mk-trend { cursor: pointer; scroll-snap-align: start; outline-offset: 4px; }
.mk-trend-cover { position: relative; }
.mk-trend-cover .thumb { width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; box-shadow: 0 10px 24px rgba(60,45,30,.18); transition: transform .25s, box-shadow .25s; }
.mk-trend:hover .mk-trend-cover .thumb { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(60,45,30,.24); }
.mk-rank { position: absolute; left: 10px; bottom: 8px; font-family: var(--serif); font-size: 44px; line-height: 1; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.mk-trend-likes { position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #fff; background: rgba(30,25,20,.45); padding: 3px 8px; border-radius: 99px; backdrop-filter: blur(4px); }
.mk-trend-title { font-family: var(--serif); font-size: 18px; line-height: 1.2; margin-top: 10px; }
.mk-trend-by { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); margin-top: 3px; min-width: 0; }
.mk-trend-by .profile-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-toolbar { margin-bottom: 12px; }
.mk-toolbar .panel-title { font-size: 26px; }
/* Product tiles (Marketplace, Library): cover on top, details below, lots of
   air. Covers share one shape so rows line up. */
.mk-grid, .tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 30px 22px; }
.mk-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; border-radius: 12px; outline-offset: 4px; }
.mk-thumb { position: relative; }
.mk-thumb .thumb { width: 100%; aspect-ratio: 4 / 3.4; border-radius: 10px; box-shadow: 0 6px 18px rgba(60,45,30,.12); transition: transform .18s ease, box-shadow .18s ease; }
.mk-card:hover .mk-thumb .thumb { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(60,45,30,.16); }
.mk-thumb .play { width: 38px; height: 38px; }
.mk-price { position: absolute; left: 10px; bottom: 10px; font-size: 11.5px; font-weight: 500; letter-spacing: .03em; color: var(--ink); background: rgba(255,255,255,.94); padding: 4px 9px; border-radius: 99px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.mk-price.free { color: var(--sage-ink); }
.mk-price.owned { color: var(--ink-2); }
.mk-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 0 2px; }
.mk-title { font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.15; margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-desc { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-width: 0; }
.mk-foot .like-btn, .mk-foot .stat-inline { font-size: 12px; }
.byline { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.byline .profile-link, .byline-names { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.byline.is-team .avatars > * { border-color: var(--bg); }
@media (max-width: 860px) {
  .mk-hero { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 20px; }
  .mk-hero-side { width: 100%; gap: 18px; flex-wrap: wrap; }
  .mk-stat b { font-size: 28px; }
  .write-your { font-size: 18px; padding: 10px 16px; }
  .write-your.hero { font-size: 30px; padding: 0; gap: 8px; white-space: normal; flex-wrap: wrap; }
  .mk-hero-side { padding-left: 0; border-left: 0; }
  .mk-tagline { font-size: 17px; }
  .mk-people-row .kicker { display: none; }
  .mk-rail { grid-auto-columns: 140px; }
  .mk-trend-sub { display: none; }
  .mk-grid, .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .mk-title { font-size: 17px; }
  .mk-desc { display: none; }
  .mk-toolbar .panel-title { font-size: 22px; width: 100%; }
}

/* Preview modal -------------------------------------------------------- */
.preview-grid { display: grid; grid-template-columns: 1.35fr 1fr; min-height: 520px; }
.preview-stage { background: #EFEFEC; padding: 26px; display: flex; flex-direction: column; justify-content: center; gap: 12px; border-radius: 16px 0 0 16px; }
.preview-side { padding: 30px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.offer { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.offer:has(input:checked) { border-color: var(--ink-2); background: var(--surface); }
.offer input { accent-color: var(--charcoal); }
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.comment:last-child { border-bottom: 0; }

/* Book spread ----------------------------------------------------------- */
.book { display: flex; justify-content: center; filter: drop-shadow(0 18px 28px rgba(60, 45, 30, .22)); }
.book .leaf { width: 50%; aspect-ratio: 1 / 1; background: #fbf9f4; position: relative; overflow: hidden; }
.book .leaf.left { border-radius: 4px 0 0 4px; box-shadow: inset -18px 0 24px -16px rgba(0,0,0,.18); }
.book .leaf.right { border-radius: 0 4px 4px 0; box-shadow: inset 18px 0 24px -16px rgba(0,0,0,.14); }
.book .leaf img { width: 100%; height: 100%; }
.book .leaf .txt { position: absolute; inset: 0; padding: 12% 12%; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.book .leaf .txt h4 { font-size: clamp(16px, 2.2vw, 26px); }
.book .leaf .txt p { font-family: var(--book); font-style: italic; font-size: clamp(11px, 1.2vw, 14px); line-height: 1.6; color: var(--ink-2); margin: 0; }
.book .leaf .folio { position: absolute; bottom: 4%; left: 0; right: 0; text-align: center; font-size: 9px; letter-spacing: .2em; color: var(--muted); }
.book .leaf.empty-photo { display: grid; place-items: center; color: var(--faint); background: repeating-linear-gradient(45deg, #f4f0e8, #f4f0e8 8px, #f0ebe2 8px, #f0ebe2 16px); }
.bg-white { background: #fff !important; }
.bg-sand { background: #efe7da !important; }
.bg-charcoal { background: #34302b !important; }
.bg-charcoal h4, .bg-charcoal p { color: #f0ebe2 !important; }
.font-sans h4, .font-sans p { font-family: var(--sans) !important; font-style: normal !important; }
.font-script h4 { font-style: italic; }
.safe-margin { position: absolute; inset: 5%; border: 1px dashed rgba(122, 135, 105, .7); pointer-events: none; }
.pager-pill { display: inline-flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px; font-size: 12px; }
.written-page { background: #fbf9f4; box-shadow: 0 18px 30px rgba(60, 45, 30, .18); border-radius: 3px; padding: 48px 52px; font-family: var(--book); font-size: 17px; line-height: 1.75; max-height: 520px; overflow: auto; }
.written-page h3 { font-size: 28px; margin-bottom: 18px; text-align: center; }
.written-page p { margin: 0 0 1em; }

/* Editors --------------------------------------------------------------- */
.editor-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 16px; }
.editor-head .title-input { font-family: var(--serif); font-size: 40px; font-weight: 500; border: 1px solid transparent; background: transparent; padding: 0 6px; margin-left: -7px; border-radius: 6px; width: 100%; max-width: 640px; line-height: 1.2; }
.editor-head .title-input:hover { border-color: var(--line); }
.editor-head .title-input:focus { outline: none; border-color: var(--sage); background: var(--surface-2); }
.desc-input { border: 1px solid transparent; background: transparent; padding: 4px 6px; margin-left: -7px; border-radius: 6px; width: 100%; max-width: 640px; color: var(--ink-2); font-size: 13px; resize: none; }
.desc-input:hover { border-color: var(--line); }
.desc-input:focus { outline: none; border-color: var(--sage); background: var(--surface-2); }
.save-state { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-state.error { color: var(--danger); }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.side-panel { position: sticky; top: calc(var(--header) + 16px); max-height: calc(100vh - var(--header) - 32px); display: flex; flex-direction: column; overflow: hidden; }
.side-panel .scroll { overflow-y: auto; flex: 1; }
.side-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.shot-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.shot-row:hover { background: var(--bg-2); }
.shot-row.selected { background: #EFEFEC; }
.shot-row.drop { background: var(--sage-soft); outline: 1.5px dashed var(--sage); outline-offset: -3px; }
.shot-row .thumb { width: 56px; height: 38px; border-radius: 4px; }
.shot-row .t { font-size: 12.5px; color: var(--ink); line-height: 1.3; }
.added { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--sage-ink); }
.added .dot { width: 15px; height: 15px; border-radius: 50%; background: var(--sage); display: grid; place-items: center; }
.added .dot svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 2.2; }
.tray { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.tray-item { flex: none; width: 104px; height: 82px; border-radius: 7px; position: relative; overflow: hidden; cursor: grab; scroll-snap-align: start; border: 2px solid transparent; background: #e3dcd0; }
.tray-item img, .tray-item video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tray-item.selected { border-color: var(--ink); }
.tray-item.used img, .tray-item.used video { filter: grayscale(.4) brightness(.72) blur(.6px); }
.tray-item .used-label { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 11.5px; letter-spacing: .04em; text-align: center; padding: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.tray-item .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.9); border: 0; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.tray-item:hover .x, .tray-item:focus-within .x { opacity: 1; }
.tray-item .dur { position: absolute; bottom: 4px; right: 5px; font-size: 10px; color: #fff; background: rgba(0,0,0,.45); border-radius: 4px; padding: 0 4px; }
.upload-tile { flex: none; width: 104px; height: 82px; border-radius: 7px; border: 1.5px dashed var(--line-2); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--ink-2); cursor: pointer; }
.upload-tile:hover { border-color: var(--ink-2); }
.upload-tile.drag { border-color: #B8E8F8; background: var(--brand-soft); }
.uploads-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.upload-item { display: grid; grid-template-columns: 1fr 120px auto; gap: 12px; align-items: center; font-size: 12px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.upload-item.err { border-color: #e3c7bd; background: var(--danger-soft); }
.player { position: relative; background: #1d1a17; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; }
.player video, .player img.still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player img.still { animation: kenburns 12s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1) translate(-1%, -1%); } }
.player .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; background: linear-gradient(transparent, rgba(0,0,0,.55)); display: flex; align-items: center; gap: 12px; color: #fff; font-size: 12px; }
.player .bar input[type=range] { flex: 1; accent-color: #fff; }
.player .bar button { background: none; border: 0; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 2px; }
.player .center-play { position: absolute; inset: 0; display: grid; place-items: center; background: none; border: 0; cursor: pointer; }
.player .label { position: absolute; top: 12px; left: 14px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.85); background: rgba(0,0,0,.3); padding: 3px 8px; border-radius: 99px; }
.player .shot-title { position: absolute; top: 12px; right: 14px; font-size: 12px; color: #fff; background: rgba(0,0,0,.3); padding: 3px 10px; border-radius: 99px; }
.player .empty-player { position: absolute; inset: 0; display: grid; place-items: center; color: #b8afa2; text-align: center; padding: 20px; }
.timeline { position: relative; height: 54px; background: #26292d; border-radius: 8px; overflow: hidden; touch-action: none; }
.timeline .window { position: absolute; top: 0; bottom: 0; background: rgba(122, 135, 105, .35); border: 2px solid #c9d3b8; border-radius: 6px; }
.timeline .handle { position: absolute; top: 0; bottom: 0; width: 14px; background: #e6ebdc; cursor: ew-resize; border-radius: 4px; display: grid; place-items: center; }
.timeline .handle::after { content: ''; width: 2px; height: 18px; background: #6e7b5f; border-radius: 2px; }
.timeline .playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; }
.page-row { display: grid; grid-template-columns: 18px 22px 52px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; margin: 6px 8px; cursor: pointer; background: transparent; }
.page-row:hover { background: var(--bg-2); }
.page-row.selected { border-color: var(--line-2); background: var(--surface-2); box-shadow: var(--shadow); }
.page-row.drop-before { box-shadow: inset 0 2px 0 var(--sage); }
.page-row.photo-drop { background: var(--sage-soft); outline: 1.5px dashed var(--sage); }
.page-row .thumb { width: 52px; height: 40px; border-radius: 4px; }
.page-row .num { font-size: 12px; color: var(--muted); text-align: right; }
.drag-handle { color: var(--faint); cursor: grab; display: grid; place-items: center; }
.chapter-row { display: grid; grid-template-columns: 16px 22px 1fr auto auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.chapter-row:hover { background: var(--bg-2); }
.chapter-row.selected { background: #EFEFEC; }
.chapter-row.drop-before { box-shadow: inset 0 2px 0 var(--sage); }
.rte-toolbar { display: flex; align-items: center; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rte-toolbar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.rte-toolbar button { width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--ink-2); font-size: 13px; display: grid; place-items: center; }
.rte-toolbar button:hover { background: var(--chip); color: var(--ink); }
.rte-toolbar select { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.rte { min-height: 420px; padding: 34px 48px; font-family: var(--book); font-size: 18.5px; line-height: 1.8; outline: none; color: var(--ink); }
.rte:empty::before { content: attr(data-placeholder); color: var(--faint); font-style: italic; }
.rte p { margin: 0 0 1em; }
.rte h2 { font-size: 28px; margin: .6em 0 .4em; }
.rte h3 { font-size: 22px; margin: .6em 0 .4em; }
.rte blockquote { border-left: 2px solid var(--line-2); margin: 0 0 1em; padding-left: 18px; color: var(--ink-2); font-style: italic; }
.writing-empty { position: absolute; inset: 60px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); pointer-events: none; text-align: center; padding: 0 30px; }
.writing-empty h4 { font-size: 24px; color: var(--ink-2); }
.upgrade-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.upgrade { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.upgrade.on { border-color: var(--ink-2); background: var(--surface-2); }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff > div { padding: 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-family: var(--book); font-size: 15px; line-height: 1.6; max-height: 360px; overflow: auto; }
.diff del { background: #f1dcd5; color: #8d4636; text-decoration: line-through; }
.diff ins { background: #e1e8d4; color: #4f5e40; text-decoration: none; }

/* Create picker --------------------------------------------------------- */
.picker-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: center; gap: 20px; min-height: 560px; }
.pie { width: min(460px, 82vw); aspect-ratio: 1; position: relative; margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(60, 45, 30, .18)); }
.pie svg { width: 100%; height: 100%; overflow: visible; }
.pie .seg { cursor: pointer; transition: opacity .25s; outline: none; }
.pie .seg .shade { transition: opacity .3s; }
.pie .seg:hover .shade, .pie .seg:focus-visible .shade, .pie .seg.active .shade { opacity: 0; }
.pie .seg:focus-visible path.edge { stroke: var(--sage); stroke-width: 4; }
.pie .seg-label { font-family: var(--sans); font-size: 14px; letter-spacing: .2em; fill: #6c645a; text-anchor: middle; pointer-events: none; transition: fill .3s; }
.pie .seg.active .seg-label, .pie .seg:hover .seg-label { fill: #fff; }
.bubbles { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 40px; }
.bubbles::before { content: ''; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 140px; border-left: 1.5px solid #c9c0b2; border-radius: 50%; }
.bubble { display: flex; align-items: center; gap: 16px; background: none; border: 0; cursor: pointer; padding: 4px; text-align: left; position: relative; border-radius: 999px; animation: bubble .35s ease-out backwards; }
.bubble:nth-child(2) { margin-left: 30px; animation-delay: .04s; }
.bubble:nth-child(3) { margin-left: 46px; animation-delay: .08s; }
.bubble:nth-child(4) { margin-left: 46px; animation-delay: .12s; }
.bubble:nth-child(5) { margin-left: 30px; animation-delay: .16s; }
.bubble:nth-child(6) { animation-delay: .2s; }
@keyframes bubble { from { transform: translateX(-10px) scale(.92); } }
.bubble .ring { width: 62px; height: 62px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(60,45,30,.18); flex: none; transition: transform .2s; }
.bubble .ring img { width: 100%; height: 100%; object-fit: cover; }
.bubble:hover .ring, .bubble:focus-visible .ring { transform: scale(1.08); }
.bubble span { font-size: 14px; letter-spacing: .05em; color: var(--ink); }
.bubble::before { content: ''; position: absolute; left: -36px; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: #9c9386; transform: translateY(-50%); }
.bubble.busy { opacity: .6; pointer-events: none; }

/* Orbit picker: centered circle, templates on a rail beside the selected slice */
.orbit-stage { position: relative; width: min(1120px, 100%); margin: 0 auto; }
.orbit-rail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.rail-dot { animation: dot-in .3s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes rail-draw { to { stroke-dashoffset: 0; } }
@keyframes dot-in { from { opacity: 0; transform: scale(0); } }
.orbit-pie { position: absolute; transform: translate(-50%, -50%); }
.orbit-pie .pie { width: 100%; filter: drop-shadow(0 0 22px rgba(255, 255, 255, .75)) drop-shadow(0 22px 40px rgba(60, 45, 30, .16)); }
.orbit-bubble {
  position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer;
  animation: orbit-pop .34s cubic-bezier(.34, 1.56, .64, 1) both;
}
.orbit-bubble .ring { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 2.5px solid #fff; box-shadow: 0 6px 16px rgba(60, 45, 30, .22); transition: transform .2s; background: var(--chip); }
.orbit-bubble .ring img { width: 100%; height: 100%; object-fit: cover; }
.orbit-bubble .name { position: absolute; top: 50%; white-space: nowrap; font-size: 13px; letter-spacing: .08em; color: var(--ink); text-shadow: 0 0 10px rgba(244, 241, 236, .9); }
.orbit-bubble.label-right .name { left: calc(100% + 12px); transform: translateY(-50%); }
.orbit-bubble.label-left .name { right: calc(100% + 12px); transform: translateY(-50%); }
.orbit-bubble.label-below .name { top: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
.orbit-bubble:hover .ring, .orbit-bubble:focus-visible .ring { transform: scale(1.1); }
.orbit-bubble.busy { opacity: .6; pointer-events: none; }
@keyframes orbit-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.3); } }
@media (prefers-reduced-motion: reduce) { .orbit-bubble, .rail-dot { animation: none; } .orbit-rail path { animation: none !important; stroke-dashoffset: 0 !important; } }
/* Phones: circle on top, templates in a grid underneath. */
@media (max-width: 700px) {
  .orbit-stage { aspect-ratio: auto !important; width: 100% !important; display: flex; flex-direction: column; align-items: center; gap: 22px; }
  .orbit-rail { display: none; }
  .orbit-pie { position: relative; left: auto !important; top: auto !important; transform: none; width: min(320px, 82vw) !important; }
  .orbit-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 10px; width: 100%; max-width: 360px; }
  .orbit-bubble { position: relative; left: auto !important; top: auto !important; width: auto !important; transform: none; display: flex; flex-direction: column; align-items: center; gap: 6px; animation-name: orbit-pop-m; }
  .orbit-bubble .ring { width: 64px; }
  .orbit-bubble .name { position: static; transform: none !important; font-size: 11.5px; letter-spacing: .04em; white-space: normal; text-align: center; }
  @keyframes orbit-pop-m { from { opacity: 0; transform: scale(.4); } }
}

/* Landing --------------------------------------------------------------- */
.landing { background: var(--bg); }
.landing-hero { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
/* Background photo from the welcome-page design, shown as-is (cup and flowers on the left, lake behind the circle). */
.landing-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 72%; }
.landing-hero .wash { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(246,243,238,.55) 0%, rgba(246,243,238,.12) 38%, rgba(246,243,238,0) 60%); }
.landing-hero > * { position: relative; }
.pub-nav { display: flex; align-items: center; padding: 26px 48px; gap: 36px; }
.pub-nav .wordmark { font-size: 40px; }
.pub-nav nav { margin-left: auto; display: flex; gap: 38px; align-items: center; }
.pub-nav nav a, .pub-nav nav button { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); background: none; border: 0; cursor: pointer; }
.pub-nav nav a:hover, .pub-nav nav button:hover { color: var(--ink); }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 84px); text-align: center; margin-top: 24px; letter-spacing: -0.02em; line-height: 1; }
.hero-rule { width: 50px; height: 1px; background: var(--ink-2); margin: 30px auto 24px; }
.hero-sub { text-align: center; font-size: 14px; letter-spacing: .32em; color: var(--ink-2); }
.hero-sub span { margin: 0 14px; color: var(--faint); }
/* Create page uses the welcome-page header, a little smaller to leave room for the circle. */
.create-page { max-width: none; position: relative; }
/* The Create page is sized to the window, so drop the usual bottom spacing. */
.main:has(.create-page) { padding-bottom: 12px; }
.create-page > :not(.create-bg) { position: relative; z-index: 1; }
/* Design background photo behind the Create page (right of the menu, below the header). */
.create-bg { position: fixed; z-index: 0; top: var(--header); left: var(--sidebar); right: 0; bottom: 0; pointer-events: none; }
.create-bg .bg { position: absolute; inset: 0; background: url(/img/welcome-hero.jpg) center 72% / cover no-repeat; }
.create-bg .wash { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.88) 45%, rgba(255,255,255,.84) 100%); }
/* Center the title and circle on the whole window, not just the area right of the menu. */
@media (min-width: 861px) {
  .create-page > .hero-title, .create-page > .hero-rule, .create-page > .hero-sub, .create-page > .orbit-stage { left: calc(var(--sidebar) / -4); }
  .create-page > .orbit-stage { max-width: calc(100vw - 2 * var(--sidebar) - 48px); }
}
@media (max-width: 860px) { .create-bg { left: 0; top: var(--header); bottom: 0; } }
.create-page .hero-title { font-size: clamp(38px, 4.6vw, 64px); margin-top: 6px; }
.create-page .hero-rule { margin: 16px auto 0; }
/* Tagline sits under the circle, just above the Hire a Pro band. */
.create-page .hero-sub { font-size: 12.5px; margin: 22px 0 12px; }
.section { padding: 96px 48px; max-width: 1180px; margin: 0 auto; }
.section h2 { font-size: 46px; text-align: center; font-weight: 400; }
.section .lede { text-align: center; color: var(--ink-2); max-width: 620px; margin: 14px auto 50px; font-size: 15px; line-height: 1.7; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step .n { font-family: var(--serif); font-size: 44px; color: var(--faint); line-height: 1; }
.step h4 { font-size: 24px; margin: 10px 0 8px; }
.step p { color: var(--ink-2); line-height: 1.65; margin: 0; }
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-split img { border-radius: 14px; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price-card { padding: 30px 28px; text-align: center; }
.price-card .amt { font-family: var(--serif); font-size: 52px; line-height: 1; margin: 16px 0 6px; }
.footer { border-top: 1px solid var(--line); padding: 40px 48px; display: flex; gap: 20px; align-items: center; color: var(--muted); font-size: 12px; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background-size: cover; background-position: center; position: relative; }
.auth-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42,36,30,0) 40%, rgba(42,36,30,.55)); }
.auth-art .quote { position: absolute; left: 48px; right: 48px; bottom: 48px; color: #fff; font-family: var(--serif); font-size: 34px; line-height: 1.2; z-index: 1; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 8vw, 120px); gap: 18px; }

/* Profile --------------------------------------------------------------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.cover-photo { height: 150px; border-radius: 10px 10px 0 0; background: #d5dae0 center / cover no-repeat; }
.profile-head { display: grid; grid-template-columns: 150px 1fr auto; gap: 26px; padding: 0 26px 22px; }
.profile-head .big-avatar { width: 136px; height: 136px; margin-top: -58px; border: 4px solid var(--bg); border-radius: 50%; overflow: hidden; background: #aab2bb; display: grid; place-items: center; color: #fff; font-size: 40px; font-family: var(--serif); }
.profile-head .big-avatar img { width: 100%; height: 100%; object-fit: cover; }
.counts { display: flex; gap: 32px; margin-top: 12px; }
.counts b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 500; }
.counts span { font-size: 11.5px; color: var(--muted); }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.work-card { overflow: hidden; }
.work-card .thumb { aspect-ratio: 16 / 10; border-radius: 0; }
.work-card .info { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.side-stack { display: flex; flex-direction: column; gap: 14px; }
.tag-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--chip); font-size: 11.5px; color: var(--ink-2); margin: 0 6px 6px 0; }
.kv { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: center; padding: 8px 0; }
.kv b { font-family: var(--serif); font-size: 20px; font-weight: 500; display: block; line-height: 1.1; }

/* Settings -------------------------------------------------------------- */
.settings-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { padding: 8px; }
.settings-nav button { display: grid; grid-template-columns: 26px 1fr 16px; gap: 14px; align-items: center; width: 100%; padding: 16px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; border-radius: 0; }
.settings-nav button:last-child { border-bottom: 0; }
.settings-nav button[aria-current="true"] { background: #EFEFEC; border-radius: 10px; border-bottom-color: transparent; }
.settings-nav b { font-family: var(--serif); font-size: 18px; font-weight: 500; display: block; }
.settings-nav small { color: var(--muted); font-size: 12px; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }

/* Stats ------------------------------------------------------------------- */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric { padding: 16px 18px 12px; position: relative; overflow: hidden; }
.metric .num { font-family: var(--serif); font-size: 42px; line-height: 1.1; margin-top: 6px; }
.metric .chg { font-size: 11px; color: var(--muted); }
.metric .chg.up { color: var(--sage-ink); }
.metric .chg.down { color: var(--danger); }
.metric svg.spark { position: absolute; right: 14px; bottom: 12px; width: 46%; height: 34px; }
.chart svg text { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
.chart-tip { position: absolute; pointer-events: none; background: var(--charcoal); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, -110%); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.stats-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 400; text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th button { background: none; border: 0; font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; padding: 0; text-transform: inherit; }
.tbl th button[aria-pressed="true"] { color: var(--ink); }
.tbl td { padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tbl tr.clickrow { cursor: pointer; }
.tbl tr.clickrow:hover td { background: var(--bg-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.activity { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.activity:last-child { border-bottom: 0; }
.activity .thumb { width: 40px; height: 32px; border-radius: 4px; }

/* Checkout -------------------------------------------------------------- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.steps-mini { display: flex; align-items: center; gap: 0; }
.steps-mini .st { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); width: 96px; }
.steps-mini .st b { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 400; font-size: 11px; background: var(--surface-2); }
.steps-mini .st.on b { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
.steps-mini .st.on { color: var(--ink); }
.steps-mini .ln { width: 50px; height: 1px; background: var(--line-2); margin-bottom: 20px; }
.cart-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.1fr) 90px; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-item .thumb { width: 110px; height: 90px; }
.sum-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: var(--ink-2); }
.sum-row.total { font-family: var(--serif); font-size: 26px; color: var(--ink); padding-top: 12px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.qty button { width: 28px; height: 30px; border: 0; background: none; cursor: pointer; }
.qty input { width: 40px; border: 0; text-align: center; background: none; height: 30px; }

/* Notifications --------------------------------------------------------- */
.notif-panel { width: 360px; max-height: 460px; overflow: auto; padding: 0; }
.notif { display: grid; grid-template-columns: 32px 1fr 8px; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; cursor: pointer; }
.notif:hover { background: var(--bg-2); }
.notif .dot { width: 7px; height: 7px; border-radius: 50%; background: #a8584a; margin-top: 6px; }

/* Responsive ------------------------------------------------------------- */
.mobile-nav { display: none; }
@media (max-width: 1100px) {
  .editor-grid { grid-template-columns: 1fr; }
  .side-panel { position: static; max-height: none; }
  .side-panel .scroll { max-height: 480px; }
  .profile-grid, .stats-grid, .checkout-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker-wrap { grid-template-columns: 1fr; }
  .bubbles { padding-left: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
  .bubbles::before, .bubble::before { display: none; }
  .bubble:nth-child(n) { margin-left: 0; }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-stage { border-radius: 16px 16px 0 0; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --header: 58px; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--ink-2); padding: 4px 12px; border-radius: 10px; }
  .mobile-nav a.active { color: var(--brand-ink); background: var(--brand-soft); }
  .main { padding: 20px 16px 96px; }
  .app-header { padding: 0 12px 0 16px; }
  .wordmark { font-size: 21px; }
  .header-sep { margin: 0 4px; }
  .page-head { flex-direction: column; }
  .page-head h1 { font-size: 40px; }
  .search { min-width: 0; width: 100%; }
  .feed-grid, .grid-cards, .grid2 { grid-template-columns: 1fr; }
  .lib-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; }
  .lib-row .thumb { width: 64px; height: 56px; }
  .lib-row-side > .tiny { display: none; }
  .mini-card .body { padding-right: 0; }
  .mini-card .top-right { position: static; grid-column: 1 / -1; justify-content: flex-end; order: -1; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .profile-head { grid-template-columns: 1fr; padding: 0 16px 18px; gap: 10px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric .num { font-size: 32px; }
  .cart-item { grid-template-columns: 80px 1fr; }
  .cart-item .thumb { width: 80px; height: 70px; }
  .cart-item > :nth-child(3), .cart-item > :nth-child(4) { grid-column: 1 / -1; }
  .steps-mini { display: none; }
  .pub-nav { padding: 18px 16px; gap: 12px; }
  .pub-nav nav { gap: 14px; }
  .pub-nav nav .hide-sm { display: none; }
  .hero-sub { font-size: 11px; letter-spacing: .2em; }
  .hero-sub span { margin: 0 6px; }
  .section { padding: 60px 16px; }
  .steps, .price-grid, .feature-split { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .overlay { padding: 0; align-items: end; }
  .modal { border-radius: 16px 16px 0 0; max-height: 94vh; }
  .rte { padding: 22px 18px; }
  .editor-head { flex-direction: column; }
  .editor-head .title-input { font-size: 30px; }
  .bubbles { grid-template-columns: repeat(2, 1fr); }
  .diff { grid-template-columns: 1fr; }
  .tbl .hide-sm { display: none; }
  .notif-panel { width: calc(100vw - 24px); }
}
@media (max-width: 480px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ---- Create circle: slice hint + "See all" bubble -------------------------- */
.pie .seg-hint { font-family: var(--sans); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; fill: rgba(255,255,255,.85); text-anchor: middle; pointer-events: none; }
.orbit-bubble.see-all .ring { display: grid; place-items: center; background: rgba(42,39,35,.82); }
.orbit-bubble.see-all .see-all-glyph { color: #fff; font-size: 22px; line-height: 1; }
.orbit-bubble.see-all .name { font-weight: 500; }

/* ---- Hire a Pro ------------------------------------------------------------ */
.pro-corner-wrap { position: fixed; right: 20px; bottom: 18px; z-index: 20; display: flex; gap: 8px; }
.pro-corner { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 0; background: var(--brand); color: var(--brand-ink); font: inherit; font-size: 12.5px; font-weight: 500; letter-spacing: .04em; cursor: pointer; box-shadow: 0 6px 18px rgba(40,32,24,.2); backdrop-filter: blur(6px); }
.create-page > .pro-corner-wrap, .gallery-page > .pro-corner-wrap { position: fixed; }
.pro-corner.light { background: rgba(255,255,255,.88); color: var(--ink-2); }
.pro-corner.light:hover, .pro-corner.light:focus-visible { background: #fff; }
.pro-corner:hover, .pro-corner:focus-visible { background: #97def2; }
.pro-price { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; font-size: 11.5px !important; }
.pro-price b { font-weight: 500; font-size: 14px; color: var(--ink); }
.pro-page { max-width: 900px; }
.pro-form { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.pro-form fieldset { border: 0; padding: 0; margin: 0; }
.pro-form legend { font-weight: 500; margin-bottom: 10px; }
.pro-form .field > span { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.pro-services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pro-service { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.pro-service input { position: absolute; top: 10px; right: 10px; }
.pro-service span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.pro-service.on { border-color: var(--ink-2); background: #fff; }
.pro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.pro-sent { padding: 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 560px; margin: 40px auto; }
.pro-req .status { font-size: 11px; }
.studio-tabs { display: flex; gap: 8px; margin-bottom: 18px; }

/* ---- Template gallery (/create/:slice) ------------------------------------- */
.gallery-page { max-width: 1180px; }
.gallery-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 16px; }
.gallery-head .link { flex-basis: 100%; justify-content: flex-start; text-align: left; display: flex; align-items: center; gap: 4px; }
.gallery-head h1 { font-size: 46px; font-weight: 500; margin: 0; }
.gallery-slices { display: flex; gap: 4px; margin-left: auto; }
.gallery-slice { padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.gallery-slice.on { background: var(--charcoal); color: #fff; }
.gallery-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.gallery-toolbar .search { width: min(360px, 100%); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.tpl-card { text-align: left; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; font: inherit; color: inherit; padding: 0; transition: transform .15s, box-shadow .15s; }
.tpl-card:hover:not(:disabled), .tpl-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tpl-card.busy { opacity: .6; }
.tpl-art { position: relative; flex: none; height: 190px; overflow: hidden; background: var(--chip); }
.tpl-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl-flag { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 2px 9px; font-size: 11px; letter-spacing: .06em; }
.tpl-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.tpl-body b { font-weight: 500; font-size: 15px; }
.tpl-card.blank { border-style: dashed; background: transparent; }
.tpl-blank-art { display: grid; place-items: center; color: var(--muted); background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,.02) 8px, rgba(0,0,0,.02) 16px); }

/* ---- Recorder / voice ------------------------------------------------------ */
.recorder .rec-btn .icon { color: var(--danger); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: rec-pulse 1s ease-in-out infinite; flex: none; }
@keyframes rec-pulse { 50% { opacity: .3; } }
.rec-meter { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; min-width: 60px; }
.rec-meter i { display: block; height: 100%; background: var(--danger); }
.rec-live, .rec-review { width: 100%; max-width: 420px; border-radius: 8px; }
video.rec-live, video.rec-review { background: #000; aspect-ratio: 16 / 9; margin-bottom: 8px; }
audio.rec-review, .voice-clip audio, .narration audio { height: 36px; width: 100%; max-width: 360px; }
.voice-clip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.voice-clip audio { flex: 1; min-width: 180px; }
.voice-clip .voice-video { width: 100%; max-width: 360px; border-radius: 6px; background: #000; }
.voice-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.page-voice-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.voice-on { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 999px; }
.narration { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.book .page-voice { position: absolute; top: 4%; right: 5%; color: var(--muted); }
.book.kind-board .leaf .txt h4 { font-size: clamp(20px, 3vw, 34px); }
.book.kind-board .leaf .txt p { font-style: normal; font-size: clamp(14px, 1.8vw, 20px); }
.group-banner { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; background: var(--sage-soft); border-color: transparent; }
hr.rule { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 4px 0; }

/* ---- Story Insert (3 × 7 card) --------------------------------------------- */
.insert-stage { background: #EFEFEC; padding: 28px 24px 16px; }
.insert-pair { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.insert-pair figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.insert-pair figcaption { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.insert-card { width: 190px; aspect-ratio: 3 / 7; position: relative; overflow: hidden; border-radius: 3px; background: #fbf9f4 center / cover no-repeat; box-shadow: 0 14px 26px rgba(60,45,30,.2); display: flex; flex-direction: column; }
.insert-card.bg-white { background-color: #fff; } .insert-card.bg-sand { background-color: #efe7da; } .insert-card.bg-sage { background-color: #e3e8de; } .insert-card.bg-blush { background-color: #f3e4e0; }
.insert-card.bg-charcoal { background-color: #34302b; color: #f4f1ec; }
.insert-photo { flex: 0 0 64%; margin: 8%; margin-bottom: 0; overflow: hidden; border-radius: 2px; background: rgba(0,0,0,.05); display: grid; place-items: center; color: var(--muted); }
.insert-photo[role=button] { cursor: pointer; }
.insert-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.insert-photo.empty { background: repeating-linear-gradient(45deg, #F5F5F3, #F5F5F3 8px, #EFEFEC 8px, #EFEFEC 16px); }
.insert-title { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 6px 10%; }
.insert-title h4 { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.1; margin: 0; }
.insert-sub { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.insert-back { flex: 1; padding: 16% 11%; display: flex; flex-direction: column; justify-content: center; gap: 8px; overflow: hidden; }
.insert-back h5 { font-family: var(--serif); font-weight: 500; font-size: 17px; margin: 0; }
.insert-back p { margin: 0; font-family: var(--serif); font-size: 11px; line-height: 1.6; white-space: pre-wrap; color: var(--ink-2); }
.insert-card.bg-charcoal .insert-back p, .insert-card.bg-charcoal .insert-sub { color: rgba(244,241,236,.8); }
.insert-card.font-sans h4, .insert-card.font-sans h5, .insert-card.font-sans p { font-family: var(--sans); }
.insert-card.font-script h4, .insert-card.font-script h5, .insert-card.font-script p { font-style: italic; }
.insert-sprig { color: var(--muted); }
.insert-card .insert-back[style*="left"] .insert-sprig { align-self: flex-start; }
.insert-pair.viewer .insert-card { width: min(220px, 40vw); }

/* ---- Story Interview ------------------------------------------------------- */
.interview-question { width: 100%; border: 0; background: transparent; resize: none; font-family: var(--serif); font-size: 28px; line-height: 1.2; color: var(--ink); padding: 6px 0 12px; }
.interview-question:focus { outline: none; border-bottom: 1px solid var(--line-2); }
.shot-row .num { width: 18px; text-align: center; }
.podcast { padding: 0; overflow: hidden; }
.podcast-head { display: flex; gap: 16px; align-items: center; padding: 20px; background: var(--charcoal); color: #F5F5F3; }
.podcast-head .kicker { color: rgba(244,241,236,.7); }
.podcast-head h3 { color: #F5F5F3; }
.podcast-head p { color: rgba(244,241,236,.75) !important; }
.podcast-art { flex: none; width: 76px; height: 76px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #7a8769, #2b2f33); color: #fff; }
.podcast-now { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.podcast-now audio { width: 100%; }
.podcast-now video { width: 100%; border-radius: 8px; background: #000; max-height: 420px; }
.podcast-transcript { white-space: pre-wrap; font-family: var(--serif); font-size: 16px; line-height: 1.6; max-height: 260px; overflow: auto; padding: 12px 14px; background: var(--bg-2); border-radius: 8px; }
.podcast-chapters { list-style: none; margin: 0; padding: 6px 0; }
.podcast-chapters button { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 20px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.podcast-chapters button:hover { background: var(--bg-2); }
.podcast-chapters button.on { background: var(--sage-soft); }
.podcast-chapters .n { color: var(--muted); font-size: 12px; }
.podcast-chapters .d { color: var(--muted); font-size: 12px; }

@media (max-width: 860px) {
  .pro-services { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .gallery-head h1 { font-size: 34px; }
  .gallery-slices { margin-left: 0; }
  .gallery-toolbar .search { width: 100%; }
  .tpl-art { height: 130px; }
  .tpl-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .insert-card { width: 150px; }
  .interview-question { font-size: 22px; }
}
@media (max-width: 700px) { .create-page .hero-sub { margin-top: 20px; } }
/* Above the phone/tablet bottom menu. */
@media (max-width: 860px) { .pro-corner-wrap { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); right: 12px; } }
.guided-q { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.guided-q:last-child { border-bottom: 0; }

/* ---- Bulk upload packages ---------------------------------------------------- */
.pkg-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pkg-card { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; font: inherit; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pkg-card:hover, .pkg-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.pkg-card b { font-weight: 500; font-size: 16px; }
.pkg-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.pkg-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pkg-price { font-family: var(--serif); font-size: 22px; color: var(--brand-ink); }
.pkg-cards.compact .pkg-card { padding: 14px; }
.pkg-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; counter-reset: s; font-size: 12.5px; color: var(--muted); }
.pkg-steps li { counter-increment: s; padding: 5px 12px; border-radius: 999px; background: var(--bg-2); }
.pkg-steps li::before { content: counter(s) ". "; }
.pkg-steps li.on { background: var(--brand-soft); color: var(--brand-ink); }
.pkg-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; border: 2px dashed var(--line-2); border-radius: 14px; text-align: center; cursor: pointer; color: var(--ink-2); }
.pkg-drop.drag, .pkg-drop:hover { border-color: var(--brand-ink); background: var(--brand-soft); }
.pkg-drop b { font-weight: 500; font-size: 16px; color: var(--ink); }
.pkg-series { display: flex; flex-direction: column; gap: 8px; }
.pkg-items summary { cursor: pointer; color: var(--ink-2); }
.pkg-items ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.pkg-done { display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
@media (max-width: 860px) { .pkg-cards { grid-template-columns: 1fr; } }

/* In Progress + Stories to Tell side panel */
.library-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
.library-main { min-width: 0; }
@media (max-width: 1100px) {
  .library-split { grid-template-columns: 1fr; }
  .upnext { position: static; }
}

.upnext { position: sticky; top: calc(var(--header) + 16px); padding: 16px 16px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.upnext-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.upnext-head h2 { font-size: 22px; font-weight: 400; margin: 0; }
.upnext-add { margin-bottom: 6px; }
.upnext-add .input { width: 100%; }
.upnext-list { list-style: none; margin: 0; padding: 0; }
.upnext-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.upnext-row:last-child { border-bottom: 0; }
.upnext-row .idea-check { width: 18px; height: 18px; margin: 0; }
.upnext-row .idea-check input:checked + span::after { left: 5px; top: 2px; width: 5px; height: 9px; }
.upnext-title { background: none; border: 0; padding: 2px 0; text-align: left; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upnext-title:hover:not(:disabled) { color: var(--brand-ink); }
.upnext-row.is-done .upnext-title { color: var(--muted); text-decoration: line-through; cursor: default; }
.upnext-row .icon-btn, .upnext-row .menu-trigger { opacity: .5; }
.upnext-row:hover .icon-btn, .upnext-row:hover .menu-trigger { opacity: 1; }
.upnext-empty { margin: 4px 0; font-size: 13px; color: var(--muted); }
.upnext-made { margin-top: 8px; background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }

/* A little color ----------------------------------------------------------- */
.type-label[data-type="film"] { color: var(--brand-ink); }
.type-label[data-type="photo"] { color: var(--rose-ink); }
.type-label[data-type="written"], .type-label[data-type="insert"] { color: var(--honey-ink); }
.chip[data-value="films"][aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.chip[data-value="books"][aria-pressed="true"] { background: var(--rose-soft); border-color: var(--rose); color: var(--rose-ink); }
.chip[data-value="chapters"][aria-pressed="true"] { background: var(--honey-soft); border-color: var(--honey); color: var(--honey-ink); }
.tab[aria-selected="true"] { border-bottom-color: #B8E8F8; }
.status.warn { background: var(--honey-soft); color: var(--honey-ink); }

/* Library header: title with a small rotating quote on the right. */
.lib-hero { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 18px; padding: 24px 32px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(40,32,24,.05); }
.lib-hero-text .eyebrow { letter-spacing: .26em; }
.lib-hero h1 { font-size: 46px; line-height: 1.05; font-weight: 500; margin: 6px 0 0; }
.lib-quote { margin: 0; max-width: 340px; text-align: right; animation: quote-in .8s ease both; }
.lib-quote blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.35; color: var(--ink-2); }
.lib-quote figcaption { margin-top: 8px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.lib-quote figcaption::before { content: ''; display: inline-block; width: 18px; height: 1px; background: var(--line-2); vertical-align: middle; margin-right: 8px; }
@keyframes quote-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .lib-hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; }
  .lib-hero h1 { font-size: 36px; }
  .lib-quote { text-align: left; max-width: none; }
  .lib-quote blockquote { font-size: 16px; }
}

/* Publishing page: your products with prices. */
.pub-products { margin-bottom: 26px; }
.pub-section-title { margin: 0 0 12px; }
.pub-list { display: flex; flex-direction: column; }
.pub-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 104px 84px 84px 96px auto; gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pub-item .thumb { width: 56px; height: 48px; border-radius: 6px; }
.pub-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.pub-title { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--serif); font-size: 19px; color: var(--ink); text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-title:hover { text-decoration: underline; }
.pub-price { display: flex; flex-direction: column; gap: 1px; }
.pub-price b { font-weight: 500; font-size: 13.5px; }
.pub-price.earned b { color: var(--sage-ink); }
@media (max-width: 760px) {
  .pub-item { grid-template-columns: 48px minmax(0, 1fr) auto; row-gap: 8px; }
  .pub-item .status { display: none; }
  .pub-item { grid-template-columns: 48px repeat(4, minmax(0, 1fr)); }
  .pub-info { grid-column: 2 / -1; }
  .pub-price { grid-row: 2; }
  .pub-price:nth-of-type(1) { grid-column: 2; }
  .pub-item > .btn { grid-column: 2 / -1; justify-self: start; }
}

/* How-to side panels */
.with-tip { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
.with-tip-main { min-width: 0; }
.tip-panel { position: sticky; top: calc(var(--header) + 16px); padding: 22px 22px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.tip-close { position: absolute; top: 10px; right: 10px; color: var(--muted); }
.tip-title { font-size: 26px; font-weight: 400; margin: 0 26px 4px 0; line-height: 1.1; }
.tip-kicker { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tip-item { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.tip-item:first-of-type { border-top: 0; }
.tip-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; color: var(--ink-2); }
.tip-item-title { font-family: var(--serif); font-size: 20px; margin-bottom: 2px; }
.tip-item p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 1100px) {
  .with-tip { grid-template-columns: 1fr; }
  .tip-panel { position: static; }
}

/* Gifts */
.gift-card.on { border-color: var(--rose); background: linear-gradient(180deg, var(--rose-soft), var(--surface) 60%); }
.gift-card .tip-icon { background: var(--rose-soft); color: var(--rose-ink); }
.gift-notice { background: var(--rose-soft); color: var(--rose-ink); }
.gift-tag { align-self: flex-start; background: var(--rose-soft); color: var(--rose-ink); gap: 5px; }
.gift-tag::before { display: none; }
.gift-btn { color: var(--rose-ink); border-color: var(--rose); }
.gift-btn:hover { background: var(--rose-soft); }
.write-your.is-static, .write-your.is-static:hover { cursor: default; background: none; }

/* Template Studio: big product tabs and a light, one-line template list */
.sw-card { margin-bottom: 30px; }
.sw-words { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sw-word { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 12px; border-radius: 99px; background: var(--bg-2); font-size: 13px; }
.sw-word button { border: 0; background: none; padding: 2px; display: grid; place-items: center; color: var(--muted); cursor: pointer; border-radius: 50%; }
.sw-word button:hover { background: var(--chip); color: var(--ink); }
.sw-add .input { width: 150px; border-radius: 99px; }
.studio-types { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.studio-type { display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 16px; color: var(--ink-2); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.studio-type b { font-weight: 500; font-size: 12px; min-width: 24px; padding: 2px 7px; border-radius: 99px; background: var(--bg-2); color: var(--muted); }
.studio-type:hover { border-color: var(--line-2); color: var(--ink); }
.studio-type[aria-selected="true"].is-films { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.studio-type[aria-selected="true"].is-books { background: var(--rose-soft); border-color: var(--rose); color: var(--rose-ink); }
.studio-type[aria-selected="true"].is-chapters { background: var(--honey-soft); border-color: var(--honey); color: var(--honey-ink); }
.studio-type[aria-selected="true"] b { background: rgba(255,255,255,.7); color: inherit; }
.studio-list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.studio-row { display: grid; grid-template-columns: 52px minmax(0, 1.4fr) minmax(0, 1fr) 110px 70px; gap: 20px; align-items: center; padding: 12px 20px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.studio-row:first-child { border-top: 0; }
.studio-row:hover { background: var(--surface-2); }
.studio-thumb { width: 52px; height: 44px; border-radius: 7px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; color: var(--faint); }
.studio-thumb img { width: 100%; height: 100%; object-fit: cover; }
.studio-name { font-family: var(--serif); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-star { color: var(--honey-ink); font-size: 14px; }
.studio-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-row .status { justify-self: end; }
@media (max-width: 760px) {
  .studio-type { padding: 10px 14px; font-size: 14px; }
  .studio-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; padding: 10px 14px; }
  .studio-row .studio-meta { display: none; }
}
.sw-preview .write-your.is-static { background: #fff; border-color: var(--line); color: var(--ink); }
.sw-preview .write-your.is-static .wy-slot { border-bottom-color: var(--line-2); }

/* Admin → Payouts */
.payout-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.payout-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.payout-card span { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.payout-card b { font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.1; }
.payout-card small { font-size: 11.5px; color: var(--muted); }
.payout-card.brand { background: var(--brand-soft); border-color: var(--brand); }
.payout-card.brand b { color: var(--brand-ink); }
.job-list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.job-row, .pro-row { display: grid; gap: 20px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.job-row { grid-template-columns: minmax(0, 1.5fr) 110px minmax(0, 1.2fr) auto; }
.pro-row { grid-template-columns: minmax(0, 1.5fr) 110px minmax(0, 1fr) auto; }
.job-row:first-child, .pro-row:first-child { border-top: 0; }
.job-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.job-title { font-family: var(--serif); font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-money { display: flex; flex-direction: column; }
.job-money b { font-weight: 500; font-size: 15px; }
.job-pro { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.job-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 900px) {
  .payout-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-row, .pro-row { grid-template-columns: 1fr auto; }
  .job-pro { grid-column: 1 / -1; }
  .job-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Admin → Analytics */
.an-week { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.an-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.an-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.an-tile-label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.an-tile b { font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.1; }
.an-tile-ch { font-size: 11.5px; color: var(--muted); }
.an-tile-ch .up { color: var(--sage-ink); }
.an-tile-ch .down { color: var(--danger); }
.an-tile.brand { background: var(--brand-soft); border-color: var(--brand); }
.an-tile.brand b { color: var(--brand-ink); }
.an-card { background: #fff; margin-bottom: 16px; }
.an-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.an-axis { font-size: 11px; fill: var(--muted); font-family: var(--sans); }
.an-tip { position: absolute; top: 4px; transform: translateX(-50%); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: 0 8px 22px rgba(40,32,24,.12); font-size: 12px; min-width: 170px; pointer-events: none; }
.an-tip b { display: block; font-weight: 500; margin-bottom: 4px; }
.an-tip div { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-2); }
.an-funnel { display: flex; flex-direction: column; gap: 14px; }
.an-track { height: 8px; border-radius: 99px; background: var(--bg-2); margin-top: 6px; overflow: hidden; }
.an-track i { display: block; height: 100%; border-radius: 99px; background: #252525; }
.an-owed { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 18px; }
.an-owed div { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.an-owed span { font-size: 11.5px; color: var(--muted); }
.an-owed b { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.an-kv { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.an-kv b { font-weight: 500; }
.an-tbl td .tiny { margin-top: 1px; }
.an-sheet { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; max-width: 340px; }
@media (max-width: 1100px) { .an-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .an-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-grid { grid-template-columns: 1fr; }
  .page-head .an-sheet { max-width: none; }
}
.an-reports { display: flex; flex-direction: column; margin-top: 8px; }
.an-report { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.payout-hero { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.pro-banner { margin-bottom: 12px; background: var(--brand-soft); color: var(--brand-ink); align-items: center; }
.pro-banner.ready { background: var(--sage-soft); color: var(--sage-ink); }
.job-row.pro-job { grid-template-columns: minmax(0, 1.6fr) 90px minmax(0, 1fr) auto; }
.review-card { background: #fff; gap: 18px; }
.review-note { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.5; white-space: pre-line; }

/* Story Assistant chat (editors) */
.sa-fab { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border-radius: 99px; border: 1px solid var(--brand); background: #fff; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; box-shadow: 0 10px 28px rgba(31,99,120,.18); transition: transform .15s, box-shadow .15s; }
.sa-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(31,99,120,.24); }
.sa-fab-icon { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.sa-dot { position: absolute; right: -1px; top: -1px; width: 10px; height: 10px; border-radius: 50%; background: #3fb26b; border: 2px solid #fff; }
.sa-dot.inline { position: static; display: inline-block; margin-right: 5px; border: 0; width: 8px; height: 8px; vertical-align: middle; }
.sa-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 500; display: grid; place-items: center; }
.sa-panel { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 370px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(40,32,24,.22); overflow: hidden; }
.sa-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 12px; background: linear-gradient(180deg, var(--brand-soft), #fff); border-bottom: 1px solid var(--line); }
.sa-title { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.sa-sub { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.sa-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.sa-hello { margin: auto 0; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.sa-hello b { display: block; color: var(--ink); font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.sa-hello p { margin: 0; }
.sa-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.sa-msg.me { align-self: flex-end; }
.sa-bubble { padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.sa-msg.them .sa-bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.sa-msg.me .sa-bubble { background: var(--brand-soft); color: var(--ink); border-bottom-right-radius: 4px; }
.sa-time { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.sa-access { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--line); background: #fff; cursor: pointer; }
.sa-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.sa-compose textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font: inherit; font-size: 13.5px; outline: none; }
.sa-compose textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
@media (max-width: 860px) {
  .sa-fab { right: 16px; bottom: 84px; padding: 8px; }
  .sa-fab > span:nth-child(2) { display: none; }
  .sa-panel { right: 8px; left: 8px; width: auto; bottom: 76px; height: auto; top: 76px; max-height: none; }
}

/* Admin → Assistant inbox */
.ai-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; height: calc(100vh - 230px); min-height: 520px; }
.ai-threads { overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.ai-thread { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink); position: relative; }
.ai-thread:hover { background: var(--surface-2); }
.ai-thread.on { background: var(--brand-soft); }
.ai-thread-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-thread-main b { font-weight: 400; font-size: 14px; }
.ai-thread.unread .ai-thread-main b { font-weight: 600; }
.ai-snippet { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-unread { width: 9px; height: 9px; border-radius: 50%; background: #252525; flex: none; }
.ai-conv, .ai-empty { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-height: 0; }
.ai-empty { justify-content: center; }
.ai-conv-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ai-projects { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ai-proj { display: flex; align-items: center; gap: 10px; }
.ai-proj b { display: block; font-weight: 500; font-size: 13px; }
.ai-proj-thumb { width: 38px; height: 32px; border-radius: 6px; background: var(--bg-2) center/cover; flex: none; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
@media (max-width: 860px) {
  .ai-layout { grid-template-columns: 1fr; height: auto; }
  .ai-threads { max-height: 260px; }
  .ai-conv { height: 70vh; }
}

/* Story Assistants page */
.as-page { max-width: 1080px; margin: 0 auto; }
.as-public { padding: 0 48px 60px; }
.as-hero { text-align: center; padding: 34px 20px 30px; }
.as-hero .eyebrow { letter-spacing: .26em; color: var(--brand-ink); }
.as-hero h1 { font-size: clamp(34px, 4.4vw, 54px); font-weight: 400; line-height: 1.08; margin: 12px auto 14px; max-width: 760px; }
.as-hero p { font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 620px; margin: 0 auto; }
.as-cta { justify-content: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.as-promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 10px 0 40px; }
.as-promises div { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.as-promises div:nth-child(1) { border-top: 3px solid var(--brand); }
.as-promises div:nth-child(2) { border-top: 3px solid var(--rose); }
.as-promises div:nth-child(3) { border-top: 3px solid var(--honey); }
.as-promises b { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.as-promises span { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.as-h2 { font-size: 30px; font-weight: 400; margin: 10px 0 16px; text-align: center; }
.as-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.as-card { padding: 20px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.as-card h3 { font-size: 20px; font-weight: 500; margin: 12px 0 6px; }
.as-card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.as-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.as-card:nth-child(3n+2) .as-icon { background: var(--rose-soft); color: var(--rose-ink); }
.as-card:nth-child(3n) .as-icon { background: var(--honey-soft); color: var(--honey-ink); }
.as-anything { text-align: center; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink-2); margin: 22px 0 44px; }
.as-steps { list-style: none; padding: 0; margin: 0 0 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.as-steps li { display: flex; gap: 14px; padding: 18px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.as-step-n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; }
.as-steps b { font-weight: 500; }
.as-steps p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.as-faq { max-width: 760px; margin: 0 auto 44px; display: flex; flex-direction: column; gap: 8px; }
.as-faq details { padding: 14px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.as-faq summary { cursor: pointer; font-size: 15px; }
.as-faq p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.as-final { text-align: center; padding: 34px 20px; border-radius: 18px; background: linear-gradient(160deg, var(--brand-soft), var(--rose-soft)); }
.as-final h2 { font-size: 34px; font-weight: 400; margin: 0 0 6px; }
.as-final p { margin: 0 0 18px; color: var(--ink-2); }
@media (max-width: 1000px) { .as-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .as-public { padding: 0 16px 40px; }
  .as-promises, .as-steps { grid-template-columns: 1fr; }
  .as-grid { grid-template-columns: 1fr; }
}

/* White and modern: white surfaces with thin borders, light blue for anything
   selected or highlighted, and warm paper only where people write. */
.input, .select { background: #fff; border-color: var(--line-2); }
.textarea, .rte, .editor-card .textarea { background: var(--paper); }
.search { background: #fff; border-color: var(--line-2); }
.chip { background: #fff; border-color: var(--line-2); }
.chip:hover { border-color: #B8E8F8; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--brand-soft); border-color: #B8E8F8; color: var(--brand-ink); }
.mk-card { padding: 10px 10px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: border-color .15s, box-shadow .2s; }
.mk-card:hover { border-color: #B8E8F8; box-shadow: 0 10px 24px rgba(31,99,120,.08); }
.mk-card .mk-body { padding: 0 4px; }
.lib-row { background: #fff; border: 1px solid var(--line); }
.lib-row:hover { border-color: #B8E8F8; }
.view-toggle { background: #fff; border-color: var(--line-2); }
.view-toggle button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-ink); }
.sort select { background-color: #fff; border-color: var(--line-2); }
.tabs { border-bottom-color: var(--line); }
.upnext { background: #fff; border: 1px solid var(--line); }
.tip-panel { background: var(--brand-soft); border-color: transparent; }
.tip-panel .tip-icon { background: #fff; color: var(--brand-ink); }
.tip-item { border-top-color: rgba(31,99,120,.12); }
.notice.plain { background: var(--surface-2); }

.thumb { background: linear-gradient(135deg, #F5F5F3, #EFEFEC); }

/* Editor header: big, always-there help button */
.sa-header-btn { display: inline-flex; align-items: center; gap: 14px; flex: none; align-self: flex-start; padding: 12px 18px 12px 12px; border-radius: 18px; border: 1px solid var(--brand); background: linear-gradient(135deg, var(--brand-soft), #fff 85%); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 8px 22px rgba(31,99,120,.12); transition: transform .15s, box-shadow .15s; }
.sa-header-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31,99,120,.18); }
.sa-header-icon { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.sa-header-icon svg.i { width: 22px; height: 22px; }
.sa-header-text { display: flex; flex-direction: column; gap: 2px; }
.sa-header-text b { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.15; }
.sa-header-text span { font-size: 12.5px; color: var(--brand-ink); }
.sa-header-btn > svg.i { color: var(--brand-ink); }
.sa-header-btn { margin-top: 14px; }
@media (max-width: 860px) {
  .sa-header-btn { width: 100%; }
  .sa-header-btn > svg.i { margin-left: auto; }
  .sa-header-text b { font-size: 18px; }
}
.help-card { display: flex; gap: 24px; align-items: center; margin-top: 22px; padding: 22px 24px; border-radius: 16px; border: 1px solid var(--brand); background: linear-gradient(135deg, var(--brand-soft), #fff 70%); flex-wrap: wrap; }
.help-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.help-chips .chip { background: #fff; border-color: var(--line); }
.help-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.header-help { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 14px; }
.header-help .sa-header-btn { margin-top: 0; }
.header-help .help-chips .chip { background: #fff; border-color: var(--line); }
.header-help .help-chips .chip.plain { background: transparent; border-color: transparent; color: var(--ink-2); }
@media (max-width: 860px) { .header-help { align-items: stretch; } }

/* Library: three big tabs, one tidy toolbar, room to breathe */
.lib-tabs .tabs { gap: 10px; margin: 6px 0 28px; }
.lib-tabs .tab { font-size: 18px; padding: 14px 24px; letter-spacing: .02em; }
.lib-tabs .tab[aria-selected="true"] { border-bottom-width: 3px; }
.library-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-bottom: 26px; }
.library-toolbar .library-search { flex: 1 1 170px; min-width: 170px; max-width: none; margin-left: 0; }
.library-toolbar .library-search .search { min-width: 0; width: 100%; }
.library-toolbar .sort { margin-left: 0; }
.library-toolbar .sort { font-size: 0; gap: 0; } /* drop the "Sort by" label: the menu says it */
.library-split { gap: 40px; }
.list-rows { gap: 14px; }
.lib-row { padding: 14px 18px 14px 14px; }
.lib-row-team { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; }
.invites { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.invite-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; border-radius: 14px; border: 1px solid var(--brand); background: var(--brand-soft); }
.invite-row .thumb { width: 64px; height: 54px; border-radius: 8px; }
@media (max-width: 760px) {
  .lib-tabs .tab { font-size: 15px; padding: 12px 14px; }
  .invite-row { flex-wrap: wrap; }
}
.header-help { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 4px 0 18px; }
.header-help .help-chips { flex: 1; min-width: 260px; }
.sa-header-text b { white-space: nowrap; }
@media (max-width: 860px) { .sa-header-text b { white-space: normal; } }

/* Clean product tiles: just the cover and a few words, lots of white space */
.mk-grid, .tile-grid { gap: 44px 30px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.mk-card { padding: 0; background: none; border: 0; border-radius: 12px; gap: 14px; }
.mk-card:hover { border: 0; box-shadow: none; background: none; }
.mk-card .mk-body { padding: 0 2px; gap: 4px; }
.mk-thumb .thumb { box-shadow: 0 1px 2px rgba(20,30,40,.06), 0 8px 20px rgba(20,30,40,.08); }
.mk-card:hover .mk-thumb .thumb { box-shadow: 0 2px 4px rgba(20,30,40,.06), 0 14px 30px rgba(20,30,40,.12); }
.mk-title { font-size: 21px; margin-top: 2px; }
.mk-desc { color: var(--muted); font-size: 12.5px; }
.mk-foot { margin-top: 6px; }
.mk-price { background: rgba(255,255,255,.95); }
/* The ••• menu shows when you hover a cover (always shown on touch screens). */
.tile-menu { opacity: 0; transition: opacity .15s; }
.lib-tile:hover .tile-menu, .lib-tile:focus-within .tile-menu { opacity: 1; }
@media (hover: none) { .tile-menu { opacity: 1; } }
/* Toolbar: three types, a search bar, and a tiny grid/shelf icon toggle */
.mk-heading { margin: 4px 0 14px; font-size: 26px; }
.library-toolbar { margin-bottom: 32px; }
.icon-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; }
.icon-toggle button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.icon-toggle button:hover { color: var(--ink); }
.icon-toggle button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-ink); }
@media (max-width: 760px) {
  .mk-grid, .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .mk-title { font-size: 17px; }
}
.fav-line { color: var(--honey-ink); }

/* Trending: one slim row */
.mk-trending { margin-bottom: 26px; }
.mk-trend-head { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); margin-bottom: 10px; }
.mk-rail { grid-auto-columns: 230px; gap: 12px; padding: 2px 2px 8px; }
.mk-trend { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s; }
.mk-trend:hover { border-color: #B8E8F8; }
.mk-trend .thumb { width: 58px; height: 58px; border-radius: 10px; flex: none; box-shadow: none; }
.mk-trend-text { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mk-trend-title { font-size: 14px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.mk-trend-by { margin: 0; gap: 8px; }
.mk-trend-type { display: inline-flex; }
@media (max-width: 860px) { .mk-rail { grid-auto-columns: 200px; } }

/* Book pages and inserts set their headings in the book serif. */
.book .leaf h4, .book .leaf h5, .insert-card h4, .insert-card h5, .insert-card p, .written-page, .written-page h3, .rte h2, .rte h3 { font-family: var(--book); }
.insert-card.font-sans h4, .insert-card.font-sans h5, .insert-card.font-sans p, .font-sans h4, .font-sans p { font-family: var(--sans) !important; }
/* Nunito is larger than Cormorant at the same size: tone the big type down a step. */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.015em; }
.page-head h1 { font-size: 40px; font-weight: 700; }
.lib-hero h1 { font-size: 36px; font-weight: 700; }
.mk-hero h1, .write-your.hero { font-size: clamp(26px, 2.6vw, 38px); }
.write-your { font-weight: 600; }
.panel-title { font-size: 19px; font-weight: 700; }
.card-title { font-size: 17px; font-weight: 700; }
.mk-title { font-size: 16px; font-weight: 700; letter-spacing: -0.005em; }
.editor-head .title-input { font-size: 32px; font-weight: 700; }
.sa-header-text b { font-size: 17px; font-weight: 700; }
.tip-title { font-size: 20px; font-weight: 700; }
.tip-item-title, .as-promises b, .as-card h3 { font-size: 16px; font-weight: 700; }
.as-hero h1 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; }
.as-h2, .as-final h2 { font-size: 26px; font-weight: 700; }
.hero-title { font-size: clamp(36px, 5.4vw, 64px); font-weight: 600; }
.metric .num, .payout-card b, .an-tile b { font-size: 28px; font-weight: 700; }
.mk-stat b, .counts b, .kv b, .settings-nav b, .an-owed b, .sum-row.total { font-weight: 700; }
.studio-name, .job-title, .ai-thread-main b { font-weight: 700; font-size: 15px; }
.review-note, .sa-title { font-size: 18px; }
.mk-tagline { font-size: 16px; }
.tab { font-weight: 600; }

/* Book covers drawn from the story (photo book: white square; chapter book: white 6x9) */
.thumb.book-thumb { background: #F2F2EF; display: grid; place-items: center; container-type: size; }
.bookcover { position: relative; display: flex; flex-direction: column; align-items: center; background: #fff; box-shadow: 0 1px 2px rgba(20,30,40,.08), 0 6px 14px rgba(20,30,40,.12); font-family: var(--book); color: #23262a; overflow: hidden; }
.bookcover::before { content: ''; position: absolute; left: 3%; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,.06); }
.bookcover.is-photo { height: 78cqh; aspect-ratio: 1 / 1; max-width: 78cqw; padding: 7% 12% 5%; gap: 6%; }
.bookcover.is-photo .bc-title { font-size: max(7px, 6.2cqh); line-height: 1.1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bookcover.is-photo .bc-photo { flex: 1; width: 100%; min-height: 0; background: #EFEFEC; display: grid; place-items: center; color: #b3b8bf; overflow: hidden; }
.bookcover.is-photo .bc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bookcover.is-photo .bc-foot { font-size: max(5px, 3.4cqh); letter-spacing: .3em; color: #4f555c; }
.bookcover.is-written { height: 84cqh; aspect-ratio: 6 / 9; max-width: 70cqw; justify-content: center; padding: 10%; gap: 6%; text-align: center; }
.bookcover.is-written .bc-title { font-size: max(8px, 7cqh); line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bookcover.is-written .bc-rule { width: 22%; height: 1px; background: #c9ced5; }
.bookcover.is-written .bc-by { font-family: var(--sans); font-size: max(5px, 3cqh); letter-spacing: .22em; text-transform: uppercase; color: #868c94; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* Small thumbnails (rows, trending) just show the cover itself, no backdrop */
.lib-row .thumb.book-thumb, .mk-trend .thumb.book-thumb, .invite-row .thumb.book-thumb { background: #F2F2EF; }
/* On the bookshelf the cover fills the book exactly */
.shelf-cover { container-type: size; }
.shelf-cover .bookcover { width: 100%; height: 100%; max-width: none; aspect-ratio: auto; box-shadow: none; }
.is-written .shelf-cover::before, .is-photo .shelf-cover::before { z-index: 2; opacity: .45; }

/* Bookstore look: each product is just the book itself on white. Covers in a
   row share one height and sit on a common baseline; no box behind them. */
.mk-thumb { height: 240px; display: flex; align-items: flex-end; justify-content: flex-start; }
.mk-thumb .thumb { width: 100%; aspect-ratio: 16 / 10; height: auto; border-radius: 8px; }
.mk-thumb .thumb.book-thumb { width: 100%; height: 100%; aspect-ratio: auto; background: transparent; box-shadow: none; border-radius: 0; place-items: end start; overflow: visible; }
.mk-card:hover .mk-thumb .thumb.book-thumb { box-shadow: none; }
.thumb.book-thumb { background: transparent; overflow: visible; }
.bookcover { border-radius: 1px 3px 3px 1px; box-shadow: 0 1px 1px rgba(20,30,40,.08), 0 4px 8px rgba(20,30,40,.08), 0 14px 26px rgba(20,30,40,.14); transition: transform .2s, box-shadow .2s; }
.bookcover::before { left: 0; width: 7%; background: linear-gradient(90deg, rgba(0,0,0,.10), rgba(255,255,255,.35) 45%, rgba(0,0,0,.04) 70%, transparent); }
.mk-card:hover .bookcover { transform: translateY(-4px); box-shadow: 0 1px 1px rgba(20,30,40,.08), 0 8px 14px rgba(20,30,40,.10), 0 22px 36px rgba(20,30,40,.18); }
.bookcover.is-photo { height: min(100cqh, 100cqw); max-width: none; }
.bookcover.is-written { height: 100cqh; max-width: 100cqw; }
.mk-price-line { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.mk-price-line.free { color: var(--sage-ink); }
.mk-price-line.owned { color: var(--muted); font-weight: 600; font-size: 12.5px; }
/* Small thumbnails (draft rows, trending, invites): the little book, no box */
.lib-row .thumb.book-thumb, .mk-trend .thumb.book-thumb, .invite-row .thumb.book-thumb { background: transparent; place-items: center; }
.lib-row .bookcover, .mk-trend .bookcover, .invite-row .bookcover { box-shadow: 0 1px 2px rgba(20,30,40,.1), 0 4px 10px rgba(20,30,40,.12); }
/* Tab row with search on the right (Library and Marketplace) */
.lib-tabs { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); margin: 6px 0 24px; }
.lib-tabs .tabs { border-bottom: 0; margin: 0; flex: none; }
.lib-tab-search { margin-left: auto; width: min(340px, 40%); padding: 8px 0; }
.lib-tab-search .search { min-width: 0; width: 100%; height: 40px; }
.mk-head-row { padding-bottom: 6px; }
.mk-head-row .mk-heading { margin: 0; }
.library-toolbar { margin-bottom: 30px; }
.saved-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--honey); background: #fff; color: var(--honey-ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.saved-btn.on { background: var(--honey-soft); }
@media (max-width: 860px) {
  .lib-tabs { flex-wrap: wrap; gap: 0; }
  .lib-tab-search { width: 100%; order: -1; padding: 0 0 8px; }
  .mk-thumb { height: 170px; }
}
/* Films sit centered (up and down) in the cover row; the play button is
   drawn inside the video frame so it is always in the middle. */
.mk-thumb > .thumb:not(.book-thumb) { align-self: center; }
.mk-thumb .thumb .play { width: 42px; height: 42px; }

/* Smaller products so more are in view: three across in the Library and
   Marketplace columns (more on wide screens). */
.mk-grid, .tile-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 30px 26px; }
.mk-thumb { height: 170px; }
.mk-card { gap: 10px; }
.mk-title { font-size: 14.5px; }
.mk-card .type-label { font-size: 9px; letter-spacing: .14em; }
.mk-desc { font-size: 12px; }
.mk-foot { margin-top: 4px; }
.mk-price-line { font-size: 13px; margin-top: 4px; }
.mk-thumb .thumb .play { width: 36px; height: 36px; }
.tile-progress { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--muted); }
.tile-progress .progress { flex: 1; height: 4px; }
/* Trending: little squares, no boxes */
.mk-trend { border: 0; padding: 4px 6px 4px 0; background: none; border-radius: 0; }
.mk-trend:hover { border: 0; }
.mk-trend:hover .mk-trend-title { color: var(--brand-ink); }
.mk-trend .thumb { width: 52px; height: 52px; border-radius: 8px; }
.mk-trend .thumb:not(.book-thumb) { box-shadow: 0 1px 2px rgba(20,30,40,.08), 0 4px 10px rgba(20,30,40,.10); }
.mk-rail { grid-auto-columns: 210px; gap: 8px 18px; }
@media (max-width: 760px) {
  .mk-grid, .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .mk-thumb { height: 150px; }
}

/* ===== Six book products ================================================= */

/* --- Welcome layout: the product line (Create + landing) ----------------- */
/* Welcome / Create page type: an editorial serif for the headline and prices,
   with a light geometric sans (Jost) for labels. */
.welcome-page, .welcome-hero { --wl-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; --wl-label: 'Inter', 'Avenir Next', 'Helvetica Neue', sans-serif; }
.welcome-page { max-width: 1320px; padding-bottom: 80px; }
.welcome-hero { min-height: 0; background: #fff; padding-bottom: 60px; }
.wl-head { text-align: center; margin: 28px auto 44px; max-width: 760px; }
.wl-kicker { margin: 0; font-family: var(--wl-label); font-size: 12px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.wl-title { margin: 14px 0 0; font-family: var(--wl-display); font-weight: 400; font-size: clamp(40px, 5.6vw, 72px); letter-spacing: -0.015em; line-height: 1.02; color: var(--ink); }
.wl-sub { margin: 16px 0 0; font-family: var(--wl-label); font-weight: 400; font-size: 17px; letter-spacing: .02em; color: var(--ink-2); }
.wl-sub b { font-weight: 500; color: var(--ink); }

.pline { --pl-win: 1; padding: 0 8px; }
.pl-grid, .pl-panel { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.pl-side { position: relative; font-family: var(--wl-label); font-weight: 400; font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }
.pl-s1 { position: absolute; top: 36%; }
.pl-s2 { position: absolute; bottom: 8px; }
.pl-s3 { position: absolute; top: 18px; }
.pl-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; align-items: end; }
.pl-col { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 8px 12px; background: none; border: 0; border-radius: 18px; cursor: pointer; color: var(--ink); transition: transform .3s cubic-bezier(.2,.8,.2,1), background .25s; transform-origin: 50% 80%; }
.pl-col:hover, .pl-col.on { transform: translateY(-4px); }
.pl-col.on { background: linear-gradient(180deg, rgba(234,248,253,.85), rgba(234,248,253,.35)); }
.pl-row:hover .pl-col:not(:hover):not(.on) { opacity: .7; }
.pl-name { min-height: 38px; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; font-family: var(--wl-label); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; text-align: center; line-height: 1.35; }
.pl-name small { font-size: 11px; font-weight: 400; letter-spacing: .06em; color: var(--muted); text-transform: none; }
/* Same-sized window for every product, so the line is straight; the products
   are cut out (transparent PNG) and float on the page with a soft shadow. */
.pl-window { position: relative; width: 100%; display: grid; place-items: center; overflow: visible; background: none; }
.pl-window.front { aspect-ratio: 4 / 5; }
.pl-window.back { aspect-ratio: 4 / 4.2; }
.pl-window > img { position: absolute; inset: 5% 6%; width: 88%; height: 90%; object-fit: contain; display: block; filter: drop-shadow(0 14px 18px rgba(40, 34, 28, .16)) drop-shadow(0 2px 3px rgba(40, 34, 28, .10)); transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s; }
.pl-col:hover .pl-window > img, .pl-col.on .pl-window > img { transform: translateY(-3px) scale(1.03); filter: drop-shadow(0 22px 26px rgba(40, 34, 28, .2)) drop-shadow(0 3px 5px rgba(40, 34, 28, .1)); }
.pl-price { font-family: var(--wl-display); font-size: 26px; font-weight: 500; letter-spacing: 0; line-height: 1; }
.pl-col.on .pl-price { color: var(--brand-ink, #252525); }

/* Drawn short story (a phone-shaped digital book). */
.ss-art { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 10px 22px rgba(0,0,0,.12); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; align-items: center; }
.ss-front { height: 86%; aspect-ratio: 9 / 16; padding: 9% 8% 6%; gap: 6%; }
.ss-front .ss-t { font-family: var(--book); font-size: clamp(9px, 1vw, 13px); text-align: center; line-height: 1.1; }
.ss-front img { width: 100%; flex: 1; min-height: 0; object-fit: cover; }
.ss-front .ss-c { font-size: clamp(5px, .5vw, 7px); letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.ss-pair { display: flex; gap: 8%; height: 80%; align-items: center; justify-content: center; width: 100%; }
.ss-pair .ss-art { height: 100%; aspect-ratio: 9 / 16; }
.ss-photo img { width: 100%; height: 100%; object-fit: cover; }
.ss-text { padding: 14% 10%; gap: 5px; }
.ss-text .ss-k { font-size: 5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ss-text .ss-h { font-family: var(--book); font-size: clamp(7px, .75vw, 10px); text-align: center; }
.ss-text i { display: block; width: 100%; height: 2px; background: #E5E5E2; border-radius: 2px; }

.pl-panel { margin-top: 26px; }
.pl-panel-body { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px 26px 22px; box-shadow: 0 1px 2px rgba(40,34,28,.03), 0 18px 40px rgba(40,34,28,.06); }
.pl-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pl-tpl { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 14px 9px 9px; background: #f7f7f5; border: 1px solid transparent; border-radius: 14px; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; min-height: 54px; }
.pl-tpl:hover { background: #fff; border-color: var(--line-2); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(40,34,28,.07); }
.pl-tpl-img { width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden; background: #ebeae6; display: grid; place-items: center; color: var(--ink-2); }
.pl-tpl-img img { width: 100%; height: 100%; object-fit: cover; }
.pl-tpl-name { font-family: var(--wl-label); font-size: 14px; font-weight: 400; letter-spacing: .01em; line-height: 1.3; color: var(--ink); }
.pl-tpl.custom { background: #fff; border: 1px dashed var(--line-2); }
.pl-tpl.busy { opacity: .6; }
.pl-flag { position: absolute; top: -8px; right: 10px; padding: 2px 8px; border-radius: 99px; background: var(--brand, #B8E8F8); color: #0c4d6b; font-family: var(--wl-label); font-size: 9.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.pl-series { margin-top: 16px; width: 100%; display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--brand, #B8E8F8); background: var(--brand-soft, #E3F6FD); cursor: pointer; text-align: left; color: var(--ink); transition: background .15s; }
.pl-series:hover { background: #dcf3fb; }
.pl-series-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #252525; }
.pl-series-text { flex: 1; display: flex; flex-direction: column; gap: 3px; font-family: var(--wl-label); font-size: 13px; font-weight: 400; color: var(--ink-2); }
.pl-series-text b { font-family: var(--wl-display); font-size: 20px; font-weight: 500; line-height: 1.1; color: var(--ink); }
.pl-series-text em { font-style: italic; color: var(--muted); }

@media (max-width: 1100px) {
  .pl-grid, .pl-panel { grid-template-columns: minmax(0, 1fr); }
  .pl-side { display: none; }
}
@media (max-width: 760px) {
  .pline { padding: 0; }
  .pl-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 8px 16px 12px; margin: 0 -16px; align-items: stretch; }
  .pl-col { flex: 0 0 44%; scroll-snap-align: center; transform: none !important; opacity: 1 !important; }
  .pl-col:hover { transform: none; }
  .pl-panel-body { padding: 16px 14px; border-radius: 14px; }
  .pl-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-tpl-name { font-size: 12.5px; }
  .wl-head { margin: 10px auto 24px; padding: 0 8px; }
  .wl-kicker { font-size: 10.5px; letter-spacing: .2em; }
  .wl-sub { font-size: 15px; }
}

.series-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.series-mode { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.series-mode.on { border-color: #252525; background: var(--brand-soft, #E3F6FD); }
.series-mode input { position: absolute; opacity: 0; pointer-events: none; }
.price-grid.six { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.public-page { max-width: 1200px; margin: 0 auto; padding: 10px 20px 60px; }
.tpl-outline { margin: 18px 0 0; }
.tpl-outline ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 26px; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.tpl-outline.insert { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--book); }
.tpl-outline.insert p { white-space: pre-wrap; color: var(--ink-2); }

/* --- Covers for all six products ------------------------------------------- */
.bookcover.is-photo.is-shortstory { aspect-ratio: 9 / 16; height: 100cqh; max-width: 100cqw; padding: 9% 9% 6%; gap: 5%; border-radius: 6px; }
.bookcover.is-photo.is-shortstory .bc-title { font-size: max(6px, 4.6cqh); }
.bookcover.is-photo.is-shortstory .bc-foot { font-size: max(5px, 2.4cqh); }
.bookcover.is-photo.is-written { aspect-ratio: 6 / 9; height: 100cqh; max-width: 100cqw; padding: 9% 11% 6%; gap: 5%; }
.bookcover.is-photo.is-written .bc-title { font-size: max(6px, 4.8cqh); }
.bookcover.is-photo.is-written .bc-foot { font-size: max(5px, 2.5cqh); letter-spacing: .24em; text-transform: uppercase; }
.bookcover.is-photo.is-board { border-radius: 4px 16% 16% 4px / 4px 16% 16% 4px; padding: 8% 11% 7%; }
.bookcover.is-photo.is-spiral { aspect-ratio: 8.5 / 11; height: 100cqh; max-width: 100cqw; padding: 9% 9% 6% 16%; gap: 5%; }
.bookcover.is-photo.is-spiral .bc-title { font-size: max(6px, 4.8cqh); }
.bookcover.is-photo.is-spiral::before { display: none; }
.bc-coil { position: absolute; left: 2%; top: 3%; bottom: 3%; width: 9%; background: radial-gradient(circle at 50% 50%, transparent 32%, #2b2f33 34%, #2b2f33 48%, transparent 50%) 0 0 / 100% 3.2cqh repeat-y; }
.bookcover.is-insert { aspect-ratio: 3 / 7; height: 100cqh; max-width: 100cqw; justify-content: flex-start; padding: 12% 12%; gap: 4%; border: 1px solid #d9dde2; outline: 1px solid #2b2f33; outline-offset: -6%; }
.bookcover.is-insert .bc-title { font-size: max(6px, 4.4cqh); text-align: center; text-transform: uppercase; letter-spacing: .04em; line-height: 1.1; }
.bookcover.is-insert .bc-rule { width: 50%; height: 1px; background: #2b2f33; }
.bookcover.is-insert .bc-lines { display: flex; flex-direction: column; gap: 5%; width: 100%; flex: 1; padding-top: 6%; }
.bookcover.is-insert .bc-lines i { height: 1.2cqh; min-height: 2px; background: #e5e8ec; border-radius: 2px; }
.bookcover.is-insert .bc-lines i:nth-child(3n) { width: 80%; margin: 0 auto; }

/* Shelf widths per product (heights come from the cover shape). */
.shelf-book.is-shortstory .shelf-cover { aspect-ratio: 9 / 16; border-radius: 5px; }
.shelf-book.is-board .shelf-cover { aspect-ratio: 1; border-radius: 3px 14px 14px 3px; }
.shelf-book.is-spiral .shelf-cover { aspect-ratio: 8.5 / 11; }
.shelf-book.is-insert .shelf-cover { aspect-ratio: 3 / 7; }
.shelf-cover .bookcover.is-insert, .shelf-cover .bookcover.is-photo.is-shortstory, .shelf-cover .bookcover.is-photo.is-spiral, .shelf-cover .bookcover.is-photo.is-written { aspect-ratio: auto; }

/* --- Editor spreads in each product's real shape ---------------------------- */
.book.kind-shortstory .leaf { aspect-ratio: 9 / 16; width: min(34%, 260px); }
.book.kind-shortstory { gap: 14px; filter: none; }
.book.kind-shortstory .leaf.left, .book.kind-shortstory .leaf.right { border-radius: 12px; box-shadow: 0 10px 26px rgba(30,40,50,.16); }
.book.kind-spiral .leaf { aspect-ratio: 8.5 / 11; width: min(44%, 380px); }
.book.kind-spiral .leaf.right::before { content: ''; position: absolute; left: -2px; top: 2%; bottom: 2%; width: 14px; background: radial-gradient(circle, transparent 35%, #2b2f33 37%, #2b2f33 52%, transparent 54%) 0 0 / 14px 22px repeat-y; z-index: 2; }
.book.kind-board .leaf.left { border-radius: 18px 0 0 18px; }
.book.kind-board .leaf.right { border-radius: 0 18px 18px 0; }
.book .leaf .txt p.hint-text { color: var(--faint); font-style: italic; }
.chapter-hint { display: flex; gap: 8px; align-items: baseline; margin: 12px 18px 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft, #E3F6FD); font-size: 13px; color: var(--ink-2); }
.chapter-hint b { font-weight: 700; color: var(--ink); }
.chapter-hint span { flex: 1; }
.page-each { margin: 12px 0 0; align-items: center; }
.menu-note { margin-left: auto; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* --- Short story player (Instagram-story style) ---------------------------- */
.story-stage { position: fixed; inset: 0; background: #0f1113; display: grid; place-items: center; z-index: 50; }
.story-frame { position: relative; height: 100vh; height: 100dvh; width: min(100vw, calc(100dvh * 9 / 16)); background: #fff; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: pointer; }
@media (min-width: 700px) { .story-frame { height: min(94dvh, 900px); width: calc(min(94dvh, 900px) * 9 / 16); border-radius: 16px; } }
.story-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.story-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(0,0,0,.14); overflow: hidden; }
.story-bars b { display: block; height: 100%; background: rgba(0,0,0,.6); }
.story-slide.is-photo ~ .story-bars i, .story-frame:has(.is-photo) .story-bars i { background: rgba(255,255,255,.35); }
.story-frame:has(.is-photo) .story-bars b { background: #fff; }
.story-top { position: absolute; top: 22px; left: 12px; right: 8px; display: flex; align-items: center; gap: 6px; z-index: 3; }
.story-by { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--ink); }
.story-by img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.story-by span { display: flex; flex-direction: column; min-width: 0; }
.story-by small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-frame:has(.is-photo) .story-by { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.story-frame:has(.is-photo) .story-by small { color: rgba(255,255,255,.85); }
.story-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.story-slide { position: absolute; inset: 0; display: flex; flex-direction: column; animation: story-in .35s ease; }
@keyframes story-in { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: none; } }
.story-slide.is-cover { align-items: center; padding: 22% 9% 11%; gap: 5%; text-align: center; }
.story-slide.is-cover h1 { margin: 0; font-family: var(--book); font-weight: 500; font-size: clamp(26px, 7.5vw, 40px); line-height: 1.05; }
.story-cover-photo { flex: 1; width: 100%; min-height: 0; background: #EFEFEC; }
.story-cover-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-slide.is-cover p { margin: 0; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-2); }
.story-slide.is-photo { background: #000; }
.story-slide.is-photo img { width: 100%; height: 100%; object-fit: cover; }
.story-slide.is-text { justify-content: center; align-items: center; padding: 22% 12% 16%; gap: 14px; text-align: center; font-family: var(--book); }
.story-k { font-family: var(--sans); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.story-slide.is-text h2 { margin: 0; font-weight: 500; font-size: clamp(24px, 6.4vw, 32px); }
.story-slide.is-text p { margin: 0; font-size: clamp(16px, 4.3vw, 20px); line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; overflow: auto; }
.story-n { position: absolute; bottom: 4%; font-family: var(--sans); font-size: 10px; color: var(--muted); }
.story-slide.is-end { justify-content: center; align-items: center; padding: 20% 10% 8%; gap: 30px; text-align: center; }
.story-quote { margin: 0; font-family: var(--book); font-style: italic; font-size: clamp(20px, 5.4vw, 26px); }
.story-end-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 260px; }
.story-brand { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.story-brand img, .leaf-brand img { width: 22px; height: 22px; }
.story-preview-note { position: absolute; bottom: 64px; left: 0; right: 0; text-align: center; font-size: 12px; }
.story-paused { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; z-index: 4; }

/* --- eBook reader ---------------------------------------------------------- */
.reader { min-height: 100vh; background: #f4f5f7; padding-bottom: 50px; }
.reader-msg { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; text-align: center; }
.reader-msg img { width: 46px; }
.reader-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.reader-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reader-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-title span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-pages { max-width: 1100px; margin: 0 auto; padding: 26px 16px 0; }
.reader-view { display: flex; justify-content: center; filter: drop-shadow(0 18px 30px rgba(30,40,50,.18)); touch-action: pan-y; }
.leaf-r { position: relative; background: #fff; overflow: hidden; width: min(46%, 470px); aspect-ratio: 1; display: flex; flex-direction: column; }
.reader-view.n1 .leaf-r { width: min(92%, 520px); border-radius: 4px; }
.reader-view.n2 .leaf-r:first-child { border-radius: 4px 0 0 4px; box-shadow: inset -18px 0 24px -16px rgba(0,0,0,.16); }
.reader-view.n2 .leaf-r:last-child { border-radius: 0 4px 4px 0; box-shadow: inset 18px 0 24px -16px rgba(0,0,0,.12); }
.reader.is-spiral .leaf-r { aspect-ratio: 8.5 / 11; }
.reader.is-board .leaf-r { border-radius: 18px; }
.reader.is-board .reader-view.n2 .leaf-r:first-child { border-radius: 18px 0 0 18px; }
.reader.is-board .reader-view.n2 .leaf-r:last-child { border-radius: 0 18px 18px 0; }
.leaf-r.photo img { width: 100%; height: 100%; display: block; }
.leaf-empty { flex: 1; background: #EFEFEC; }
.leaf-r.text { justify-content: center; padding: 12%; font-family: var(--book); }
.leaf-r.text h2 { margin: 0 0 12px; font-weight: 500; font-size: clamp(20px, 2.6vw, 30px); }
.leaf-r.text p { margin: 0; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; }
.reader.is-board .leaf-r.text h2 { font-size: clamp(26px, 3.4vw, 40px); }
.reader.is-board .leaf-r.text p { font-family: var(--sans); font-size: clamp(17px, 2vw, 24px); }
.leaf-folio { position: absolute; bottom: 4%; left: 0; right: 0; text-align: center; font-family: var(--sans); font-size: 10px; color: var(--muted); }
.leaf-audio { position: absolute; bottom: 8%; left: 10%; right: 10%; width: 80%; height: 32px; }
.leaf-r.cover { align-items: center; padding: 8% 11% 6%; gap: 5%; text-align: center; }
.leaf-r.cover h1 { margin: 0; font-family: var(--book); font-weight: 500; font-size: clamp(22px, 3.2vw, 38px); line-height: 1.05; }
.leaf-cover-photo { flex: 1; width: 100%; min-height: 0; background: #EFEFEC; }
.leaf-cover-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.leaf-r.cover p { margin: 0; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-2); min-height: 1em; }
.leaf-r.cover .coil { position: absolute; left: 2%; top: 3%; bottom: 3%; width: 18px; background: radial-gradient(circle, transparent 35%, #2b2f33 37%, #2b2f33 52%, transparent 54%) 0 0 / 18px 26px repeat-y; }
.reader.is-spiral .leaf-r.cover { padding-left: 14%; }
.leaf-r.back { justify-content: center; align-items: center; padding: 10%; }
.leaf-quote { margin: auto 0; font-family: var(--book); font-style: italic; font-size: clamp(17px, 1.8vw, 22px); text-align: center; }
.leaf-brand { position: absolute; bottom: 7%; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.reader-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.reader-scrub { display: block; width: min(420px, 90%); margin: 12px auto 0; accent-color: #252525; }
.reader-preview { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 30px; padding: 12px 16px; background: #fff; border-top: 1px solid var(--line); font-size: 14px; }
.reader-series { text-align: center; font-size: 13px; color: var(--muted); }
.reader-insert { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; padding: 30px 16px; }
.reader-insert .insert-card { width: min(300px, 86vw); }
.reader-book { max-width: 680px; margin: 0 auto; padding: 46px 22px; background: #fff; min-height: 70vh; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.reader-titlepage { text-align: center; padding: 40px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 26px; font-family: var(--book); }
.reader-titlepage h1 { margin: 0; font-weight: 500; font-size: clamp(34px, 6vw, 48px); line-height: 1.05; }
.reader-titlepage .sub { margin: 10px 0 0; font-style: italic; font-size: 19px; color: var(--ink-2); }
.reader-titlepage .by { margin: 24px 0 0; font-family: var(--sans); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.reader-toc h2 { font-family: var(--book); font-weight: 500; font-size: 24px; text-align: center; margin: 0 0 14px; }
.reader-toc ol { list-style: none; margin: 0 0 26px; padding: 0; }
.reader-toc button { width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 10px 2px; border: 0; background: none; cursor: pointer; font-family: var(--book); font-size: 18px; color: var(--ink); text-align: left; }
.reader-toc button i { flex: 1; border-bottom: 1px dotted var(--line-2); }
.reader-toc button small { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.reader-toc button:hover span { color: #252525; }
.reader-k { display: block; text-align: center; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.reader-ch { margin: 8px 0 26px; text-align: center; font-family: var(--book); font-weight: 500; font-size: clamp(28px, 5vw, 38px); }
.reader-opener { width: 100%; border-radius: 3px; margin-bottom: 20px; }
.reader-text { font-family: var(--book); font-size: 19px; line-height: 1.75; color: #2a2d31; }
.reader-text p { margin: 0 0 1em; }
.reader-chnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .reader-pages { padding: 16px 10px 0; }
  .reader-view.n1 .leaf-r { width: 100%; }
  .reader-book { padding: 30px 18px; }
  .reader-text { font-size: 18px; }
}

/* --- Map ------------------------------------------------------------------- */
.map-page { display: flex; flex-direction: column; min-height: calc(100vh - var(--header) - 40px); }
.map-page.public { min-height: calc(100vh - 120px); }
.map-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.map-head h1 { margin: 4px 0 0; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.map-key { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; cursor: pointer; }
.map-key i { width: 10px; height: 10px; border-radius: 50%; }
.map-key.on { border-color: var(--ink); }
.map-key .muted { font-size: 11px; }
.map-box { flex: 1; min-height: 460px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #e8edf1; z-index: 0; }
.map-pop { display: flex; gap: 10px; font-family: var(--sans); }
.map-pop img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; }
.map-pop div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.map-pop b { font-size: 14px; color: var(--ink); line-height: 1.2; }
.map-pop a { margin-top: 4px; font-weight: 700; color: #252525; }
.map-pop-kind { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.loc-map { height: 300px; border-radius: 12px; overflow: hidden; margin-top: 12px; border: 1px solid var(--line); z-index: 0; }
.loc-results { display: flex; flex-direction: column; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.loc-results button { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; font-size: 13.5px; cursor: pointer; }
.loc-results button:hover { background: var(--bg-2); }
@media (max-width: 760px) { .map-box { min-height: 62vh; } .map-legend { margin-left: 0; } }

/* --- Series, contributions, commissions, sponsors ---------------------------- */
.series-head { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin: 10px 0 26px; }
.series-head h1 { margin: 0; }
.series-head .eyebrow { display: inline-flex; gap: 6px; align-items: center; }
.series-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px; }
.series-book { display: flex; flex-direction: column; gap: 6px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.series-n { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.series-cover .thumb { width: 100%; aspect-ratio: 4 / 4.6; border-radius: 10px; }
.contribute-page { max-width: 760px; }
.contribute-q { font-family: var(--book); font-weight: 500; font-size: clamp(28px, 5vw, 40px); line-height: 1.1; margin: 0; }
.contribute-form { display: grid; grid-template-columns: 240px 1fr; gap: 18px; margin-top: 6px; }
.contribute-photo { position: relative; aspect-ratio: 1; border-radius: 12px; border: 1.5px dashed var(--line-2); background: var(--bg-2); overflow: hidden; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.contribute-photo span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.contribute-photo img { width: 100%; height: 100%; object-fit: cover; }
.contribute-progress { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 5px; border-radius: 4px; background: rgba(255,255,255,.7); }
.contribute-progress i { display: block; height: 100%; background: #252525; border-radius: 4px; }
@media (max-width: 640px) { .contribute-form { grid-template-columns: 1fr; } }
.commission-msg { white-space: pre-wrap; font-family: var(--sans); font-size: 13.5px; line-height: 1.55; background: var(--paper); border-radius: 10px; padding: 14px; margin: 0 0 8px; max-height: 260px; overflow: auto; }
.commission-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.commission-main { flex: 1; min-width: 240px; }
.commission-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.commission-invite { max-width: 680px; }
.commission-invite h1 { margin: 4px 0; font-family: var(--book); font-weight: 500; font-size: clamp(30px, 5vw, 44px); }
.commission-facts { display: flex; flex-wrap: wrap; gap: 24px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.commission-facts div { display: flex; flex-direction: column; }
.commission-facts b { font-size: 18px; }
.sponsor-page { max-width: 860px; margin: 0 auto; }
.sponsor-hero { text-align: center; padding: 10px 0 26px; }
.sponsor-hero h1 { margin: 8px 0; font-size: clamp(30px, 5vw, 46px); }
.sponsor-hero p { max-width: 560px; margin: 0 auto; color: var(--ink-2); }
.sponsor-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.sponsor-steps div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; border-radius: 14px; background: var(--brand-soft, #E3F6FD); font-size: 13px; color: var(--ink-2); }
.sponsor-steps b { color: var(--ink); font-size: 15px; }
.sponsor-steps .i { color: #252525; width: 26px; height: 26px; }
@media (max-width: 640px) { .sponsor-steps { grid-template-columns: 1fr; } }
.sponsor-row { display: flex; gap: 18px; flex-wrap: wrap; }
.sponsor-fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 99px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 10px 26px rgba(20,30,40,.25); transition: transform .15s; }
.sponsor-fab:hover { transform: translateY(-2px); color: #fff; }
@media (max-width: 760px) { .sponsor-fab { bottom: 78px; right: 14px; padding: 10px 14px; font-size: 13px; } }
/* Editor header: the title keeps its room; buttons wrap below when narrow. */
.editor-head { flex-wrap: wrap; row-gap: 12px; }
.editor-head > div:first-child { min-width: min(100%, 320px); }

/* --- Story Map: dark map, glowing dots ------------------------------------ */
.map-head { align-items: flex-end; }
.map-total { margin-left: auto; font-size: 13px; color: var(--muted); }
.map-wrap { position: relative; flex: 1; display: flex; min-height: 520px; }
.map-wrap .map-box { flex: 1; min-height: 520px; height: auto; border: 0; border-radius: 18px; background: #0e1726; box-shadow: 0 18px 40px rgba(10,20,35,.25); }
.map-wrap .map-legend { position: absolute; left: 14px; bottom: 14px; z-index: 700; margin: 0; max-width: calc(100% - 28px); padding: 8px; border-radius: 14px; background: rgba(14,23,38,.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.08); }
.map-wrap .map-key { background: transparent; border-color: transparent; color: #e7ecf2; }
.map-wrap .map-key span { font-size: 11px; color: #8d9bb0; }
.map-wrap .map-key:hover { background: rgba(255,255,255,.06); }
.map-wrap .map-key.on { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); }
.map-wrap .leaflet-control-zoom a { background: rgba(14,23,38,.85); color: #e7ecf2; border-color: rgba(255,255,255,.1); }
.map-wrap .leaflet-control-attribution { background: rgba(14,23,38,.7); color: #8d9bb0; font-size: 10px; }
.map-wrap .leaflet-control-attribution a { color: #b8c4d4; }
.dark-pop .leaflet-popup-content-wrapper, .dark-pop .leaflet-popup-tip { background: #152033; color: #e7ecf2; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.dark-pop .map-pop b { color: #fff; }
.dark-pop .map-pop div { color: #9fb0c6; }
.dark-pop .map-pop a { color: #7cc4ff; }
.dark-pop a.leaflet-popup-close-button { color: #9fb0c6; }
.loc-map { background: #0e1726; }
@media (max-width: 760px) {
  .map-wrap, .map-wrap .map-box { min-height: 64vh; }
  .map-wrap .map-legend { left: 8px; right: 8px; bottom: 8px; padding: 6px; gap: 2px; }
  .map-wrap .map-key { padding: 5px 8px; font-size: 11.5px; }
  .map-total { display: none; }
}
/* OpenStreetMap turned into a night map: deep navy water, charcoal land,
   soft gray roads and borders. Only the map images are filtered; dots stay bright. */
.map-dark .leaflet-tile, .leaflet-tile.map-dark { filter: grayscale(.55) brightness(.42) contrast(1.45) saturate(2.4) hue-rotate(16deg); }

/* --- Editor previews: closed book covers ----------------------------------- */
.closed-book { display: flex; justify-content: center; filter: drop-shadow(0 18px 28px rgba(30,40,50,.2)); }
.closed-book .leaf-r { width: min(52%, 440px); aspect-ratio: 1; border-radius: 3px 6px 6px 3px; box-shadow: inset 10px 0 14px -10px rgba(0,0,0,.18); }
.closed-book .leaf-r.back { border-radius: 6px 3px 3px 6px; box-shadow: inset -10px 0 14px -10px rgba(0,0,0,.18); }
.closed-book.is-written .leaf-r { width: min(40%, 320px); aspect-ratio: 6 / 9; }
.closed-book.is-shortstory .leaf-r { width: min(34%, 270px); aspect-ratio: 9 / 16; border-radius: 12px; box-shadow: none; }
.closed-book.is-spiral .leaf-r { width: min(46%, 380px); aspect-ratio: 8.5 / 11; }
.closed-book.is-spiral .leaf-r.cover { padding-left: 15%; }
.closed-book.is-board .leaf-r.cover { border-radius: 4px 22px 22px 4px; }
.closed-book.is-board .leaf-r.back { border-radius: 22px 4px 4px 22px; }
.leaf-r .coil.right { left: auto; right: 2%; }
.cover-ph { display: grid; place-items: center; height: 100%; padding: 12px; text-align: center; font-family: var(--sans); font-size: 12px; color: var(--faint); }
.leaf-r.back .cover-ph { height: auto; margin: auto 0; }
.leaf-r .cover-rule { width: 22%; height: 1px; background: #c9ced5; margin: 6% 0; }
.closed-book.is-written .leaf-r.cover { justify-content: center; }
.closed-book.is-written .leaf-r.cover:has(.leaf-cover-photo) { justify-content: flex-start; }
@media (max-width: 760px) {
  .closed-book .leaf-r { width: 86%; }
  .closed-book.is-written .leaf-r, .closed-book.is-spiral .leaf-r { width: 72%; }
  .closed-book.is-shortstory .leaf-r { width: 62%; }
}

/* --- Story Map: standard light map (reliable for now) ---------------------- */
.map-wrap .map-box { background: #aad3df; box-shadow: 0 10px 30px rgba(20,30,40,.12); border: 1px solid var(--line); }
.map-wrap .map-legend { background: rgba(255,255,255,.92); border-color: var(--line); box-shadow: 0 6px 18px rgba(20,30,40,.12); }
.map-wrap .map-key { color: var(--ink); }
.map-wrap .map-key span { color: var(--muted); }
.map-wrap .map-key:hover { background: var(--bg-2); }
.map-wrap .map-key.on { border-color: var(--ink); background: #fff; }
.map-wrap .leaflet-control-zoom a { background: #fff; color: var(--ink); border-color: var(--line); }
.map-wrap .leaflet-control-attribution { background: rgba(255,255,255,.85); color: var(--muted); }
.map-wrap .leaflet-control-attribution a { color: var(--ink-2); }
.loc-map { background: #aad3df; }
.closed-book .leaf-r.cover h1 { font-size: clamp(18px, 2.3vw, 30px); }
.closed-book.is-shortstory .leaf-r.cover h1 { font-size: clamp(16px, 1.8vw, 22px); }
/* Editor header: the title always gets a real line; buttons go below it. */
.editor-head > div:first-child { flex: 1 1 380px; }
.editor-head > div.row { flex: 1 1 auto; }
/* Published list: when its box is narrow (help panel open, small laptop),
   details move to a second row under the title instead of squeezing it. */
.pub-products { container-type: inline-size; }
@container (max-width: 900px) {
  .pub-item { grid-template-columns: 56px repeat(4, minmax(0, 1fr)) auto; row-gap: 6px; }
  .pub-item .thumb { grid-row: 1 / span 2; }
  .pub-info { grid-column: 2 / 6; }
  .pub-item > .status { grid-column: 6; grid-row: 1; justify-self: end; }
  .pub-price { grid-row: 2; }
  .pub-price:nth-of-type(1) { grid-column: 2; }
  .pub-item > .btn { grid-column: 6; grid-row: 2; justify-self: end; }
}

/* --- Header search (books and authors) ------------------------------------- */
.hsearch { position: relative; flex: 1 1 auto; max-width: 440px; margin-left: 26px; }
.pub-nav .hsearch { margin-left: 10px; max-width: 380px; }
.pub-nav nav { margin-left: auto; }
.hsearch-box { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); transition: border-color .15s, background .15s, box-shadow .15s; }
.hsearch-box:focus-within { background: #fff; border-color: #9fd6ea; box-shadow: 0 0 0 3px var(--brand-soft); }
.hsearch-box input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 14px; color: var(--ink); }
.hsearch-box input::-webkit-search-cancel-button { cursor: pointer; }
.hsearch-icon-only { display: none; }
.hsearch-panel { position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 320px; z-index: 60; max-height: min(70vh, 560px); overflow: auto; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(20,30,40,.16); }
.hsearch-k { padding: 10px 10px 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hsearch-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.hsearch-row.on { background: var(--bg-2); }
.hsearch-thumb { width: 38px; height: 38px; flex: none; }
.hsearch-thumb .thumb { width: 38px; height: 38px; border-radius: 6px; }
.hsearch-text { display: flex; flex-direction: column; min-width: 0; }
.hsearch-text b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsearch-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsearch-all { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; padding: 10px; border: 0; border-top: 1px solid var(--line); background: none; font-size: 13px; font-weight: 600; color: #252525; cursor: pointer; }
.hsearch-empty { padding: 18px; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .hsearch { flex: 0 0 auto; margin-left: auto; max-width: none; }
  .hsearch-box, .hsearch-panel { display: none; }
  .hsearch-icon-only { display: inline-grid; }
  .header-actions { margin-left: 0; }
}

/* --- Search page ------------------------------------------------------------ */
.search-page { max-width: 1100px; }
.search-hero { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border: 1px solid var(--line-2); border-radius: 99px; background: #fff; box-shadow: var(--shadow); margin-bottom: 26px; color: var(--muted); }
.search-hero input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 17px; color: var(--ink); }
.search-title { margin: 0 0 6px; font-size: clamp(26px, 4vw, 36px); }
.search-section { margin-top: 24px; }
.search-section h2 { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.search-authors { display: flex; flex-wrap: wrap; gap: 10px; }
.search-author { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); }
.search-author:hover { background: var(--bg-2); }
.search-author span { display: flex; flex-direction: column; }
.search-author small { font-size: 12px; color: var(--muted); }
.search-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px; }
.search-book { display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.search-book b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.search-cover .thumb { width: 100%; aspect-ratio: 4 / 4.4; border-radius: 10px; margin-bottom: 4px; }
.search-book:hover .bookcover { transform: translateY(-3px); }
.search-author-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.search-author-head h1 { margin: 2px 0 0; }

/* Print files (Lulu) */
.print-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 0; margin-bottom: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.print-facts div { display: flex; flex-direction: column; }
.print-facts b { font-size: 17px; }
.print-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.print-file:hover { background: var(--bg-2); }
.print-file span { display: flex; flex-direction: column; }
.print-file small { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .print-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Print queue (admin) */
.pq-job { display: flex; flex-direction: column; gap: 14px; }
.pq-title { font-size: 19px; font-weight: 700; color: var(--ink); }
.pq-grid { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(150px, 0.8fr) minmax(240px, 1.4fr); gap: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.pq-address { font-style: normal; font-size: 14px; line-height: 1.5; margin: 6px 0 8px; }
.pq-track { margin: 4px 0 0; }
@media (max-width: 800px) { .pq-grid { grid-template-columns: 1fr; } }

/* ---- Story picker (Create page): pick the story first, the format second ---- */
.stp { --wl-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; --wl-label: 'Inter', 'Avenir Next', 'Helvetica Neue', sans-serif; max-width: 1180px; margin: 0 auto; padding: 0 8px; }
.stp-steps { list-style: none; margin: -12px auto 34px; padding: 0; display: flex; justify-content: center; align-items: center; gap: 0; font-family: var(--wl-label); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.stp-steps li { display: flex; align-items: center; gap: 10px; }
.stp-steps li + li::before { content: ''; width: 46px; height: 1px; background: var(--line-2); margin: 0 16px; }
.stp-steps span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); font-size: 11px; letter-spacing: 0; color: var(--ink-2); }
.stp-steps li.on { color: var(--ink); }
.stp-steps li.on span { background: var(--ink); border-color: var(--ink); color: #fff; }

.stp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stp-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 6px; min-height: 196px; padding: 22px 20px 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; color: var(--ink);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .2s, background .2s; animation: stp-in .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 30ms); }
@keyframes stp-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stp-tile:hover, .stp-tile:focus-visible { transform: translateY(-4px); border-color: var(--brand, #B8E8F8); box-shadow: 0 2px 4px rgba(40,34,28,.03), 0 20px 40px rgba(40,34,28,.09); outline: none; }
.stp-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft, #E3F6FD); color: #252525; margin-bottom: 10px; transition: background .25s, color .25s; }
.stp-tile:hover .stp-icon, .stp-tile:focus-visible .stp-icon { background: #252525; color: #fff; }
.stp-name { font-family: var(--wl-display); font-size: 26px; font-weight: 500; line-height: 1.05; letter-spacing: -0.005em; }
.stp-line { font-family: var(--wl-label); font-size: 13.5px; font-weight: 400; line-height: 1.45; color: var(--ink-2); }
.stp-go { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--wl-label); font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); transition: color .2s, gap .2s; }
.stp-tile:hover .stp-go, .stp-tile:focus-visible .stp-go { color: #252525; gap: 10px; }

.stp-or { display: flex; align-items: center; gap: 18px; max-width: 1180px; margin: 64px auto 22px; padding: 0 8px; font-family: 'Inter', var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.stp-or::before, .stp-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Pop-up */
.modal.stp-modal { --wl-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; --wl-label: 'Inter', 'Avenir Next', 'Helvetica Neue', sans-serif; width: min(1100px, 100%); background: #fff; border-radius: 24px; }
.stp-modal .modal-body { padding: 40px 36px 34px; }
.stp-m-head { text-align: center; max-width: 600px; margin: 0 auto 30px; }
.stp-m-icon { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--brand-soft, #E3F6FD); color: #252525; }
.stp-m-kicker { margin: 14px 0 0; font-family: var(--wl-label); font-size: 11.5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.stp-m-title { margin: 8px 0 0; font-family: var(--wl-display); font-size: clamp(30px, 3.6vw, 44px); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; }
.stp-m-sub { margin: 12px 0 0; font-family: var(--wl-label); font-size: 15px; font-weight: 400; color: var(--ink-2); }
.stp-formats { display: grid; gap: 14px; justify-content: center; grid-template-columns: repeat(var(--n, 4), minmax(0, 220px)); }
.stp-formats.n1 { --n: 1; } .stp-formats.n2 { --n: 2; } .stp-formats.n3 { --n: 3; } .stp-formats.n4 { --n: 4; } .stp-formats.n5 { --n: 5; }
.stp-fmt { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 3px; padding: 16px 16px 14px; background: #f8f7f4; border: 1px solid transparent; border-radius: 18px; cursor: pointer; color: var(--ink); transition: transform .25s cubic-bezier(.2,.8,.2,1), background .2s, border-color .2s, box-shadow .25s; animation: stp-in .45s cubic-bezier(.2,.8,.2,1) both; }
.stp-fmt:nth-child(2) { animation-delay: 50ms; } .stp-fmt:nth-child(3) { animation-delay: 100ms; } .stp-fmt:nth-child(4) { animation-delay: 150ms; } .stp-fmt:nth-child(5) { animation-delay: 200ms; }
.stp-fmt:hover, .stp-fmt:focus-visible { transform: translateY(-4px); background: #fff; border-color: var(--line-2); box-shadow: 0 20px 40px rgba(40,34,28,.1); outline: none; }
.stp-fmt.busy { opacity: .6; }
.stp-fmt-flag { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 9px; border-radius: 99px; background: var(--ink); color: #fff; font-family: var(--wl-label); font-size: 9.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.stp-fmt-art { position: relative; width: 100%; height: 190px; margin-bottom: 12px; display: grid; place-items: center; }
.stp-fmt-art > img { position: absolute; inset: 8% 10%; width: 80%; height: 84%; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(40,34,28,.16)) drop-shadow(0 2px 3px rgba(40,34,28,.1)); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.stp-fmt:hover .stp-fmt-art > img { transform: translateY(-3px) scale(1.04); }
.stp-fmt-kind { font-family: var(--wl-label); font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.stp-fmt-size { font-family: var(--wl-label); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.stp-fmt-tpl { margin-top: 8px; font-family: var(--wl-display); font-size: 21px; font-weight: 500; line-height: 1.1; }
.stp-fmt-ready { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--wl-label); font-size: 12.5px; font-weight: 400; color: var(--sage-ink, #5d6a4f); }
.stp-fmt-foot { margin-top: auto; padding-top: 14px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stp-fmt-price { font-family: var(--wl-display); font-size: 26px; font-weight: 500; line-height: 1; }
.stp-fmt-cta { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; background: var(--ink); color: #fff; font-family: var(--wl-label); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; transition: background .2s, gap .2s; }
.stp-fmt:hover .stp-fmt-cta { background: #252525; gap: 10px; }

@media (max-width: 1100px) { .stp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stp-formats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
@media (max-width: 640px) {
  .stp { padding: 0; }
  .stp-steps { margin: -8px auto 24px; font-size: 9.5px; letter-spacing: .12em; }
  .stp-steps li { gap: 6px; flex-direction: column; text-align: center; }
  .stp-steps li + li::before { display: none; }
  .stp-steps li + li { margin-left: 18px; }
  .stp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stp-tile { min-height: 168px; padding: 16px 14px 14px; border-radius: 16px; }
  .stp-icon { width: 36px; height: 36px; margin-bottom: 6px; }
  .stp-name { font-size: 21px; }
  .stp-line { font-size: 12.5px; }
  .stp-modal .modal-body { padding: 30px 16px 22px; }
  .stp-formats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stp-fmt-art { height: 130px; }
  .stp-fmt-tpl { font-size: 18px; }
  .stp-fmt-cta { padding: 6px 10px; font-size: 10px; }
}

/* ---- Digitizing: teaser link, banner and /digitize page ---- */
.wl-digitize { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 7px 16px 7px 7px; border-radius: 99px; background: #fff; border: 1px solid var(--line-2); font-family: 'Inter', var(--sans); font-size: 14px; font-weight: 400; color: var(--ink); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.wl-digitize:hover { border-color: #252525; box-shadow: 0 6px 18px rgba(19,138,194,.12); transform: translateY(-1px); }
.wl-dg-tag { padding: 3px 9px; border-radius: 99px; background: #252525; color: #fff; font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }

.dg-band { --dg-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; --dg-label: 'Inter', 'Avenir Next', 'Helvetica Neue', sans-serif;
  max-width: 1180px; margin: 56px auto 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center;
  padding: 44px 48px; border-radius: 28px; background: radial-gradient(120% 140% at 0% 0%, #2c3b44 0%, #1f2a31 55%, #1a2328 100%); color: #f4f1ec; box-shadow: 0 30px 60px rgba(26,35,40,.18); }
.dg-band-kicker { margin: 0; font-family: var(--dg-label); font-size: 11.5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--brand, #B8E8F8); }
.dg-band-title { margin: 12px 0 0; font-family: var(--dg-display); font-size: clamp(30px, 3.4vw, 46px); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; color: #fff; }
.dg-band-sub { margin: 14px 0 0; max-width: 520px; font-family: var(--dg-label); font-size: 15.5px; font-weight: 400; line-height: 1.55; color: rgba(244,241,236,.78); }
.dg-band-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.dg-band .dg-btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.dg-band .dg-btn:hover { border-color: #fff; }
.dg-band .dg-btn.primary { background: var(--brand, #B8E8F8); border-color: var(--brand, #B8E8F8); color: #0c3a50; }
.dg-band .dg-btn.primary:hover { background: #c8f0fa; }
.dg-band-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dg-band-items li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); font-family: var(--dg-label); font-size: 14px; font-weight: 400; color: #f4f1ec; }
.dg-band-items .dg-ic { background: rgba(174,232,247,.14); color: var(--brand, #B8E8F8); }

.dg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-family: 'Inter', var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, gap .2s, color .2s; }
.dg-btn:hover { border-color: var(--ink); gap: 12px; }
.dg-btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.dg-btn.primary:hover { background: #252525; border-color: #252525; }
.dg-btn.lg { padding: 14px 26px; font-size: 12.5px; }
.dg-btn:disabled { opacity: .45; cursor: default; }
.dg-ic { width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--brand-soft, #E3F6FD); color: #252525; }
.dg-ic.lg { width: 48px; height: 48px; }

.dg-page { --dg-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; --dg-label: 'Inter', 'Avenir Next', 'Helvetica Neue', sans-serif; max-width: 1080px; margin: 0 auto; padding: 20px 8px 90px; }
.dg-hero { text-align: center; max-width: 780px; margin: 24px auto 64px; }
.dg-kicker { margin: 0; font-family: var(--dg-label); font-size: 12px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: #252525; }
.dg-title { margin: 14px 0 0; font-family: var(--dg-display); font-size: clamp(40px, 5.4vw, 68px); font-weight: 400; line-height: 1.02; letter-spacing: -0.015em; }
.dg-sub { margin: 18px auto 0; max-width: 620px; font-family: var(--dg-label); font-size: 17px; font-weight: 400; line-height: 1.55; color: var(--ink-2); }
.dg-hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.dg-fine { margin: 14px 0 0; font-family: var(--dg-label); font-size: 12.5px; font-weight: 400; color: var(--muted); }
.dg-h2 { margin: 0 0 22px; text-align: center; font-family: var(--dg-display); font-size: 34px; font-weight: 400; }
.dg-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 70px; }
.dg-item { padding: 24px 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.dg-item h3 { margin: 14px 0 0; font-family: var(--dg-display); font-size: 24px; font-weight: 500; }
.dg-item p { margin: 6px 0 0; font-family: var(--dg-label); font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--ink-2); }
.dg-steps { list-style: none; margin: 0 0 70px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dg-steps li { text-align: center; padding: 10px 18px; }
.dg-step-n { width: 40px; height: 40px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--dg-display); font-size: 20px; }
.dg-steps b { display: block; font-family: var(--dg-display); font-size: 23px; font-weight: 500; }
.dg-steps p { margin: 6px 0 0; font-family: var(--dg-label); font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--ink-2); }
.dg-form { max-width: 760px; margin: 0 auto; padding: 38px 40px; border-radius: 24px; background: #f8f7f4; scroll-margin-top: 90px; }
.dg-form-title { margin: 0; text-align: center; font-family: var(--dg-display); font-size: 34px; font-weight: 400; }
.dg-form-sub { margin: 8px 0 24px; text-align: center; font-family: var(--dg-label); font-size: 14.5px; font-weight: 400; color: var(--ink-2); }
.dg-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.dg-pick { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); transition: border-color .2s; }
.dg-pick.on { border-color: #252525; }
.dg-pick label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--dg-label); font-size: 14.5px; }
.dg-pick input[type=checkbox] { width: 16px; height: 16px; accent-color: #252525; }
.dg-form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.dg-form-foot .dg-fine { margin: 0; }
.dg-sent { text-align: center; }
.dg-sent h2 { margin: 14px 0 0; font-family: var(--dg-display); font-size: 34px; font-weight: 400; }
.dg-sent p { margin: 8px auto 0; max-width: 460px; font-family: var(--dg-label); font-size: 15px; font-weight: 400; color: var(--ink-2); }
.landing-dg { padding: 0 20px 40px; }

@media (max-width: 900px) {
  .dg-band { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; gap: 26px; border-radius: 22px; }
  .dg-items, .dg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wl-digitize { font-size: 12.5px; gap: 8px; padding-right: 12px; }
  .dg-band-items { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dg-band-items li { font-size: 12.5px; padding: 10px; gap: 8px; }
  .dg-band-items .dg-ic { width: 28px; height: 28px; }
  .dg-items, .dg-steps, .dg-picks { grid-template-columns: minmax(0, 1fr); }
  .dg-form { padding: 26px 18px; }
  .landing-dg { padding: 0 16px 30px; }
}

/* ---- Library: compact lists (In Progress, Collaborated) and 5-up Created grid ---- */
.lib-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.lib-list .lib-row { display: grid; grid-template-columns: 40px minmax(0, 1.6fr) minmax(0, .9fr) minmax(140px, 1fr) 96px 32px; align-items: center; gap: 16px; padding: 9px 6px 9px 4px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; cursor: pointer; transition: background .15s; }
.lib-list .lib-row:hover, .lib-list .lib-row:focus-visible { background: #f8f7f4; border-color: var(--line); outline: none; }
.lib-row-cover { width: 40px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 4px; background: #f1efea; color: var(--muted); box-shadow: 0 1px 2px rgba(40,34,28,.12); }
.lib-row-cover img { width: 100%; height: 100%; object-fit: cover; }
.lib-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lib-row-title { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-row-main .type-label { font-size: 10px; }
.lib-row-people { min-width: 0; overflow: hidden; font-size: 12.5px; }
.lib-row-progress { display: flex; align-items: center; gap: 10px; max-width: none; margin-top: 0; }
.lib-row-progress .progress { flex: 1; height: 3px; }
.lib-row-pct { width: 34px; text-align: right; font-size: 12px; color: var(--muted); }
.lib-row-status { font-size: 12.5px; color: var(--sage-ink, #5d6a4f); }
.lib-row-date { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.lib-row-menu { display: flex; justify-content: flex-end; }
.tile-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 26px; }
@media (max-width: 1200px) { .tile-grid.five { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 960px) { .tile-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .tile-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .lib-list .lib-row { grid-template-columns: 36px minmax(0, 1fr) 90px 28px; gap: 12px; }
  .lib-row-people, .lib-row-date { display: none; }
  .lib-row-cover { width: 36px; height: 44px; }
}

/* ---- Home and Log: shared editorial type ---- */
.home-page, .log-page { --lx-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; --lx-label: 'Inter', 'Avenir Next', 'Helvetica Neue', sans-serif; max-width: 1180px; }
.lx-kicker { margin: 0; font-family: var(--lx-label, 'Inter'); font-size: 11.5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.lx-title { margin: 8px 0 0; font-family: var(--lx-display, serif); font-size: clamp(40px, 4.6vw, 60px); font-weight: 400; line-height: 1.02; letter-spacing: -0.015em; color: var(--ink); }
.lx-sub { margin: 12px 0 0; max-width: 560px; font-family: var(--lx-label, 'Inter'); font-size: 16px; font-weight: 400; line-height: 1.55; color: var(--ink-2); }
.lx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-family: 'Inter', var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, gap .2s, transform .2s, box-shadow .2s; }
.lx-btn:hover { border-color: var(--ink); gap: 12px; }
.lx-btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.lx-btn.primary:hover { background: #252525; border-color: #252525; box-shadow: 0 10px 24px rgba(19,138,194,.22); transform: translateY(-1px); }
.lx-btn.lg { padding: 15px 26px; font-size: 12.5px; }

/* Log */
.log-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding: 18px 0 34px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.log-split { grid-template-columns: minmax(0, 1fr) 320px; }
.log-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.log-count { font-family: 'Inter', var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.log-search { width: min(320px, 100%); }
.log-none { padding: 30px 0; color: var(--muted); }
.log-empty { text-align: center; padding: 60px 24px 70px; border: 1px dashed var(--line-2); border-radius: 22px; background: #fbfaf8; }
.log-empty-icon { width: 54px; height: 54px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--brand-soft, #E3F6FD); color: #252525; }
.log-empty h2 { margin: 16px 0 0; font-family: var(--lx-display); font-size: 32px; font-weight: 400; }
.log-empty p { margin: 8px auto 24px; max-width: 420px; font-family: 'Inter', var(--sans); font-size: 15px; font-weight: 400; color: var(--ink-2); }
.wl-back { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0 8px; }

/* Home */
.home-hero { padding: 22px 0 34px; }
.home-tally { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 16px 0 0; font-family: 'Inter', var(--sans); font-size: 15px; font-weight: 400; color: var(--ink-2); min-height: 22px; }
.home-tally a { color: inherit; text-decoration: none; transition: color .2s; }
.home-tally a:hover { color: #252525; }
.home-tally b { font-family: var(--lx-display); font-size: 22px; font-weight: 500; color: var(--ink); margin-right: 4px; }
.home-tally i { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.home-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; margin-bottom: 52px; }
.home-continue { position: relative; display: flex; gap: 34px; align-items: center; min-height: 300px; padding: 34px 38px; border-radius: 26px; cursor: pointer; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, #eef9fd 0%, #f7fbfc 45%, #fbf9f5 100%); border: 1px solid #e3eef2; transition: box-shadow .3s, transform .3s; }
.home-continue:hover { box-shadow: 0 24px 50px rgba(30,60,75,.1); transform: translateY(-2px); }
.home-continue.skeleton { cursor: default; }
.home-continue.is-empty { cursor: default; }
.home-cover { flex: none; width: 150px; filter: drop-shadow(0 18px 24px rgba(40,34,28,.18)); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.home-continue:hover .home-cover { transform: translateY(-4px) rotate(-1deg); }
.home-cover .thumb { width: 150px; height: 190px; background: transparent; }
.home-continue-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.home-continue-body h2 { margin: 2px 0 0; font-family: var(--lx-display); font-size: clamp(28px, 2.6vw, 38px); font-weight: 400; line-height: 1.08; }
.home-progress { display: flex; align-items: center; gap: 12px; width: min(320px, 100%); margin-top: 8px; font-family: 'Inter', var(--sans); font-size: 12.5px; color: var(--ink-2); }
.home-progress .progress { flex: 1; height: 3px; }
.home-edited { margin: 0 0 10px; font-family: 'Inter', var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); }
.home-actions { display: flex; flex-direction: column; gap: 12px; }
.home-action { flex: 1; display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; color: var(--muted); transition: border-color .2s, box-shadow .25s, transform .25s; }
.home-action:hover { border-color: var(--brand, #B8E8F8); box-shadow: 0 14px 30px rgba(40,34,28,.07); transform: translateY(-2px); color: #252525; }
.home-action > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-action b { font-family: var(--lx-display); font-size: 22px; font-weight: 500; color: var(--ink); line-height: 1.1; }
.home-action b + span { font-family: 'Inter', var(--sans); font-size: 13px; font-weight: 400; color: var(--ink-2); }
.home-action-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft, #E3F6FD); color: #252525; transition: background .2s, color .2s; }
.home-action:hover .home-action-icon { background: #252525; color: #fff; }
.home-updates { max-width: 820px; }
.home-updates-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.home-updates-head h2 { margin: 0; font-family: var(--lx-display); font-size: 30px; font-weight: 400; }
.home-quiet { margin: 18px 0 0; font-family: 'Inter', var(--sans); font-size: 14.5px; font-weight: 400; color: var(--muted); }
.home-feed { list-style: none; margin: 0; padding: 0; }
.home-feed li { border-bottom: 1px solid var(--line); }
.home-feed button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 4px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--ink-2); transition: background .15s; }
.home-feed button:hover { background: #f8f7f4; }
.home-feed li.unread .home-feed-text { color: var(--ink); font-weight: 500; }
.home-feed li.unread .home-feed-time::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #252525; vertical-align: middle; }
.home-feed-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #f1efea; color: var(--ink-2); }
.home-feed-text { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.4; }
.home-feed-time { flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

@media (max-width: 1000px) { .home-top { grid-template-columns: minmax(0, 1fr); } .log-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .home-continue { flex-direction: column; align-items: flex-start; gap: 22px; padding: 26px 22px; min-height: 0; }
  .home-cover, .home-cover .thumb { width: 112px; } .home-cover .thumb { height: 142px; }
  .log-head { padding: 8px 0 24px; }
  .log-head .lx-btn { width: 100%; }
  .home-feed-time { display: none; }
}


/* ---- Home: lakeside welcome + the Storybank Journal ---- */
.home-page { max-width: none; --hj-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; --hj-label: 'Inter', 'Avenir Next', 'Helvetica Neue', sans-serif; }
.main:has(.home-page) { padding-top: 0; }
.hw { position: relative; margin: 0 -40px; min-height: calc(100vh - var(--header)); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 40px 24px 90px; }
.hw-bg { position: absolute; inset: 0; background: url(/img/welcome-hero.jpg) center 72% / cover no-repeat; transform: scale(1.04); animation: hw-drift 30s ease-in-out infinite alternate; }
@keyframes hw-drift { to { transform: scale(1.1) translateY(-1.5%); } }
.hw-wash { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(248,245,240,.82) 0%, rgba(248,245,240,.5) 34%, rgba(248,245,240,.12) 62%, rgba(248,245,240,.35) 100%); }
.hw-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; animation: hw-in 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hw-in { from { opacity: 0; transform: translateY(14px); } }
.hw-hello { margin: 0; font-family: var(--hj-label); font-size: 12px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: #4a453e; }
.hw-title { margin: 14px 0 0; font-family: var(--hj-display); font-size: clamp(46px, 6.6vw, 88px); font-weight: 400; line-height: 1; letter-spacing: -0.02em; color: #1d1b18; }
.hw-rule { width: 54px; height: 1px; background: #4f4a43; margin: 30px auto 22px; }
.hw-sub { margin: 0; font-family: var(--hj-label); font-size: 13px; font-weight: 400; letter-spacing: .38em; text-transform: uppercase; color: #4f4a43; }
.hw-sub span { margin: 0 16px; color: #7a7165; }
.hw-pie { width: min(440px, 78vw); margin-top: 46px; filter: drop-shadow(0 0 26px rgba(255,255,255,.7)) drop-shadow(0 26px 44px rgba(60,45,30,.2)); }
.hw-pie .seg { cursor: default; }
.hw-pie .seg .shade { transition: opacity 1.2s ease; }
.hw-pie .seg:hover .shade { opacity: 1; }
.hw-pie .seg.active .shade { opacity: 0; }
.hw-pie image { transition: transform 3.6s ease; transform-origin: center; }
.hw-pie .seg.active image { transform: scale(1.06); }
.hw-slice-label { width: 160px; height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #655d52; transition: color 1s; }
.hw-slice-label svg { width: 30px; height: 30px; margin-bottom: 8px; stroke-width: 1.3; }
.hw-pie .seg.active .hw-slice-label { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.hw-scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; font-family: var(--hj-label); font-size: 10.5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: #4f4a43; animation: hw-bob 2.4s ease-in-out infinite; }
@keyframes hw-bob { 50% { transform: translate(-50%, 5px); } }
@media (prefers-reduced-motion: reduce) { .hw-bg, .hw-scroll { animation: none; } }

.hj { max-width: 1120px; margin: 0 auto; padding: 80px 0 40px; }
.hj-mast { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; margin-bottom: 56px; text-align: center; }
.hj-mast h2 { margin: 0; font-family: var(--hj-display); font-size: clamp(34px, 3.6vw, 48px); font-weight: 400; letter-spacing: -0.01em; }
.hj-mast p { grid-column: 1 / -1; margin: -18px 0 0; font-family: var(--hj-label); font-size: 11px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.hj-mast p span { margin: 0 12px; }
.hj-mast-rule { height: 1px; background: var(--line-2); }
.hj-kicker { margin: 0; font-family: var(--hj-label); font-size: 10.5px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: #252525; }
.hj-lead { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; cursor: pointer; margin-bottom: 84px; }
.hj-lead-img { aspect-ratio: 5 / 4; border-radius: 6px; background: #eee center / cover no-repeat; box-shadow: 0 30px 60px rgba(40,34,28,.12); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.hj-lead:hover .hj-lead-img { transform: scale(1.015); }
.hj-lead h3 { margin: 16px 0 0; font-family: var(--hj-display); font-size: clamp(34px, 3.8vw, 54px); font-weight: 400; line-height: 1.04; letter-spacing: -0.01em; }
.hj-dek { margin: 18px 0 0; font-family: var(--hj-label); font-size: 17px; font-weight: 400; line-height: 1.6; color: var(--ink-2); }
.hj-read { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-family: var(--hj-label); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 4px; transition: gap .2s; }
.hj-lead:hover .hj-read { gap: 12px; }
.hj-section { margin-bottom: 84px; }
.hj-section-head { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 30px; border-bottom: 1px solid var(--ink); }
.hj-section-head h3 { margin: 0; font-family: var(--hj-display); font-size: 30px; font-weight: 400; }
.hj-section-head p { margin: 0; font-family: var(--hj-label); font-size: 13.5px; font-weight: 400; color: var(--muted); }
.hj-stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 30px; }
.hj-story, .hj-card { cursor: pointer; }
.hj-story.wide { grid-column: span 2; grid-row: span 2; }
.hj-story-img, .hj-card-img { aspect-ratio: 4 / 3; border-radius: 4px; margin-bottom: 16px; background: #f1efea center / cover no-repeat; transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s; }
.hj-story.wide .hj-story-img { aspect-ratio: 16 / 10; }
.hj-story:hover .hj-story-img, .hj-card:hover .hj-card-img { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(40,34,28,.12); }
.hj-story h4, .hj-card h4 { margin: 8px 0 0; font-family: var(--hj-display); font-size: 25px; font-weight: 500; line-height: 1.1; }
.hj-story.wide h4 { font-size: 38px; font-weight: 400; }
.hj-story-dek { margin: 8px 0 0; font-family: var(--hj-label); font-size: 14.5px; font-weight: 400; line-height: 1.55; color: var(--ink-2); }
.hj-by { margin: 10px 0 0; font-family: var(--hj-display); font-size: 16px; font-style: italic; color: var(--muted); }
.hj-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.modal.hj-modal { background: #fff; }
.hj-modal .modal-body { padding: 0 0 34px; }
.hj-modal-img { aspect-ratio: 16 / 7; background: #eee center / cover no-repeat; margin-bottom: 28px; border-radius: 16px 16px 0 0; }
.hj-modal .hj-kicker, .hj-modal-title, .hj-modal-dek, .hj-modal-body, .hj-modal .lx-btn { margin-left: 40px; margin-right: 40px; }
.hj-modal-title { margin-top: 12px; margin-bottom: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 40px; font-weight: 400; line-height: 1.05; }
.hj-modal-dek { margin-top: 14px; font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 400; color: var(--ink-2); line-height: 1.55; }
.hj-modal-body { margin-top: 22px; margin-bottom: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.hj-modal-body p { margin: 0 0 14px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; line-height: 1.6; color: var(--ink); }
@media (max-width: 900px) {
  .hj-lead { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .hj-stories, .hj-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) { .hw { margin: 0 -16px; } }
@media (max-width: 600px) {
  .hw { min-height: calc(100vh - var(--header) - 70px); padding-bottom: 80px; }
  .hw-sub { font-size: 11px; letter-spacing: .24em; } .hw-sub span { margin: 0 8px; }
  .hj { padding-top: 56px; }
  .hj-mast { grid-template-columns: 1fr; gap: 10px; } .hj-mast-rule { display: none; } .hj-mast p { margin: 0; }
  .hj-stories, .hj-more { grid-template-columns: minmax(0, 1fr); }
  .hj-story.wide { grid-column: auto; grid-row: auto; } .hj-story.wide h4 { font-size: 30px; }
  .hj-modal .hj-kicker, .hj-modal-title, .hj-modal-dek, .hj-modal-body, .hj-modal .lx-btn { margin-left: 20px; margin-right: 20px; }
  .hj-modal-title { font-size: 32px; }
}
.hj-mast-rule:first-child { grid-column: 1; grid-row: 1; }
.hj-mast-rule:last-child { grid-column: 3; grid-row: 1; }
.hj-mast h2 { grid-column: 2; grid-row: 1; }
.hj-mast p { grid-row: 2; }

/* ---- Dashboard ---- */
.dash-page { --lx-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; --lx-label: 'Inter', 'Avenir Next', 'Helvetica Neue', sans-serif; max-width: 1180px; }
.dash-head { padding: 18px 0 34px; }
.dash-head .lx-title { font-family: var(--lx-display); }
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.dash-stat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px 22px 20px; background: #fff; border: 1px solid var(--line); border-radius: 20px; animation: stp-in .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 40ms); }
.dash-stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft, #E3F6FD); color: #252525; margin-bottom: 10px; }
.dash-stat-label { font-family: var(--lx-label); font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.dash-stat-value { font-family: var(--lx-display); font-size: 44px; font-weight: 400; line-height: 1; color: var(--ink); margin-top: 4px; }
.dash-stat-note { font-family: var(--lx-label); font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--ink-2); }
.dash-stat.loading .dash-stat-value { color: var(--faint); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.dash-card { padding: 28px 30px; background: #fff; border: 1px solid var(--line); border-radius: 22px; }
.dash-card h2 { margin: 0; font-family: var(--lx-display); font-size: 28px; font-weight: 400; }
.dash-card h3 { margin: 28px 0 12px; font-family: var(--lx-label); font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.dash-muted { margin: 6px 0 0; font-family: var(--lx-label); font-size: 13.5px; font-weight: 400; color: var(--ink-2); }
.dash-bar { display: flex; height: 12px; margin-top: 20px; border-radius: 99px; overflow: hidden; background: #f1efea; }
.dash-bar i { display: block; height: 100%; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.dash-bar i.draft, .sw.draft { background: linear-gradient(90deg, var(--brand, #B8E8F8), #B8E8F8); }
.dash-bar i.done, .sw.done { background: #1f2a31; }
.sw.shared { background: #d9c9a8; }
.dash-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.dash-legend a { display: inline-flex; align-items: center; gap: 8px; font-family: var(--lx-label); font-size: 13.5px; font-weight: 400; color: var(--ink-2); text-decoration: none; }
.dash-legend a:hover { color: #252525; }
.dash-legend b { font-family: var(--lx-display); font-size: 20px; font-weight: 500; color: var(--ink); }
.sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dash-formats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dash-formats li { display: grid; grid-template-columns: 160px minmax(0, 1fr) 30px; align-items: center; gap: 14px; font-family: var(--lx-label); font-size: 13.5px; color: var(--ink-2); }
.dash-formats b { text-align: right; font-family: var(--lx-display); font-size: 18px; font-weight: 500; color: var(--ink); }
.dash-format-bar { height: 6px; border-radius: 99px; background: #f1efea; overflow: hidden; }
.dash-format-bar i { display: block; height: 100%; border-radius: 99px; background: #252525; opacity: .7; }
.dash-weeks { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 170px; margin-top: 26px; }
.dash-week { height: 100%; display: flex; align-items: flex-end; }
.dash-week i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #B8E8F8, var(--brand, #B8E8F8)); transition: height .8s cubic-bezier(.2,.8,.2,1); }
.dash-week i.none { background: #f1efea; }
.dash-weeks-axis { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--lx-label); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dash-closest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dash-closest-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dash-near { display: flex; gap: 14px; align-items: center; padding: 14px; text-align: left; background: #f8f7f4; border: 1px solid transparent; border-radius: 16px; cursor: pointer; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; min-width: 0; }
.dash-near:hover { background: #fff; border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(40,34,28,.08); }
.dash-near-cover { flex: none; width: 54px; }
.dash-near-cover .thumb { width: 54px; height: 70px; background: transparent; }
.dash-near-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dash-near-body b { font-family: var(--lx-display); font-size: 18px; font-weight: 500; line-height: 1.1; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-near-body .type-label { font-size: 9.5px; }
.dash-near-progress { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--lx-label); font-size: 12px; color: var(--muted); }
.dash-near-progress .progress { flex: 1; height: 3px; }
@media (max-width: 1100px) { .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-closest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .dash-stat { padding: 18px 16px; } .dash-stat-value { font-size: 34px; }
  .dash-closest-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-formats li { grid-template-columns: 110px minmax(0, 1fr) 26px; }
  .dash-card { padding: 22px 18px; }
}

/* Log without a header: a line across the top, the button just under it. */
.log-page { padding-top: 0; }
.log-page .log-split { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 4px; }
.log-page .log-toolbar { margin-bottom: 16px; }
.log-page .log-count { margin-left: 6px; margin-right: auto; }
.lib-search { width: min(320px, 100%); }
@media (max-width: 640px) { .log-page .log-toolbar { flex-wrap: wrap; } .log-page .log-toolbar .lx-btn { width: 100%; } .log-page .log-count { margin-left: 0; } }
.log-page .log-count { white-space: nowrap; }

/* ---- Editor: calm and simple ---- */
.ed-top { margin-bottom: 18px; }
.ed-bar { display: flex; align-items: center; gap: 18px; padding: 4px 0 18px; border-bottom: 1px solid var(--line); }
.ed-back { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px 8px 8px; border-radius: 99px; font-size: 15px; color: var(--ink-2); text-decoration: none; transition: background .15s, color .15s; }
.ed-back:hover { background: #f3f2ef; color: var(--ink); }
.ed-title { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid transparent; border-radius: 10px; background: none; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 32px; font-weight: 500; color: var(--ink); text-overflow: ellipsis; transition: border-color .15s, background .15s; }
.ed-title:hover { background: #faf9f7; }
.ed-title:focus { outline: none; border-color: var(--line-2); background: #fff; }
.ed-people { flex: none; }
.ed-actions { flex: none; display: flex; align-items: center; gap: 12px; }
.ed-actions .save-state { font-size: 14px; color: var(--muted); }
.ed-actions .btn.primary { height: 46px; padding: 0 24px; font-size: 15px; border-radius: 99px; }
.ed-more { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 99px; background: #fff; font-size: 15px; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.ed-more:hover, .ed-more[aria-expanded="true"] { border-color: var(--ink-2); background: #faf9f7; }
.ed-actions .menu { min-width: 260px; }
.ed-actions .menu button { padding: 11px 14px; font-size: 15px; }
.ed-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 15px; color: var(--ink-2); }

.wr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 34px; align-items: start; margin-top: 26px; }
.wr-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.wr-head { padding: 30px 48px 6px; }
.wr-num { font-family: 'Inter', var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.wr-title { display: block; width: 100%; margin: 6px 0 0 -8px; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; background: none; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 38px; font-weight: 500; line-height: 1.15; color: var(--ink); }
.wr-title:hover { background: #faf9f7; }
.wr-title:focus { outline: none; border-color: var(--line-2); background: #fff; }
.wr-hint { margin: 10px 0 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; font-style: italic; line-height: 1.45; color: #655d52; }
.rte-toolbar.simple { display: flex; align-items: center; gap: 4px; margin: 14px 48px 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); background: none; }
.rte-toolbar.simple button { width: 42px; height: 42px; border-radius: 10px; }
.wr-card .rte { min-height: 460px; padding: 26px 48px 40px; background: #fff; font-size: 20px; line-height: 1.8; }
.wr-card .writing-empty { top: 140px; }
.wr-card .writing-empty h4 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 28px; font-weight: 400; }
.wr-foot { padding: 12px 48px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: right; }

.wr-side { position: sticky; top: calc(var(--header) + 20px); }
.wr-side-title { margin: 4px 0 12px; font-family: 'Inter', var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.wr-chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.wr-ch { display: flex; align-items: center; gap: 12px; padding: 11px 8px 11px 12px; border-radius: 12px; cursor: pointer; font-size: 16px; color: var(--ink-2); transition: background .15s, color .15s; }
.wr-ch:hover { background: #f6f5f2; color: var(--ink); }
.wr-ch.on { background: var(--brand-soft, #E3F6FD); color: var(--ink); }
.wr-ch.drop-before { box-shadow: inset 0 2px 0 #252525; }
.wr-ch-num { flex: none; width: 22px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 18px; color: var(--muted); text-align: center; }
.wr-ch-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-ch-menu { opacity: 0; transition: opacity .15s; }
.wr-ch:hover .wr-ch-menu, .wr-ch.on .wr-ch-menu, .wr-ch:focus-within .wr-ch-menu { opacity: 1; }
.wr-add { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 12px; background: none; font-size: 15px; color: var(--ink-2); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.wr-add:hover { border-color: #252525; color: #252525; background: #f7fcfe; }

@media (max-width: 960px) { .wr-grid { grid-template-columns: minmax(0, 1fr); } .wr-side { position: static; order: -1; } }
@media (max-width: 640px) {
  .ed-bar { flex-wrap: wrap; gap: 10px; }
  .ed-title { order: 3; flex-basis: 100%; font-size: 26px; }
  .ed-actions { margin-left: auto; }
  .ed-actions .save-state { display: none; }
  .wr-head, .wr-foot { padding-left: 20px; padding-right: 20px; }
  .rte-toolbar.simple { margin: 12px 20px 0; }
  .wr-card .rte { padding: 20px 20px 30px; font-size: 18px; }
  .wr-title { font-size: 30px; }
}

/* ---- Navigation across the top (the sidebar is retired) ---- */
:root { --sidebar: 0px; }
.app-body { display: block; }
.app-header { gap: 28px; }
.top-nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.top-nav-item { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 99px; font-family: 'Inter', var(--sans); font-size: 14.5px; font-weight: 400; letter-spacing: .02em; color: var(--ink-2); text-decoration: none; transition: background .15s, color .15s; }
.top-nav-item svg.i { width: 19px; height: 19px; }
.top-nav-item:hover { background: #f4f3f0; color: var(--ink); }
.top-nav-item.active { background: var(--brand-soft, #E3F6FD); color: var(--brand-ink, #252525); }
.main { max-width: 1320px; margin: 0 auto; }
.app-foot { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px 40px; font-family: 'Inter', var(--sans); font-size: 10px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--faint); }
.app-foot-rule { width: 30px; height: 1px; background: var(--line-2); }
.mobile-nav { display: none !important; }
@media (max-width: 860px) {
  .app-header { gap: 8px; }
  .wordmark-text { display: none; }
  .top-nav { margin-left: 4px; gap: 2px; }
  .top-nav-item { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .top-nav-item span { display: none; }
  .top-nav-item svg.i { width: 22px; height: 22px; }
  .main { padding-bottom: 24px; }
  .app-foot { padding-bottom: 28px; }
}
.main:has(.home-page) { max-width: none; }
.main > .page { margin-left: auto; margin-right: auto; }
@media (max-width: 860px) {
  .app-header { gap: 2px; padding: 0 10px; }
  .header-sep { display: none; }
  .avatar-btn > svg { display: none; }
  .header-actions { gap: 0; }
  .top-nav-item { width: 40px; }
}

/* Log: the six products across the top, photo and name only */
.log-products { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 8px 0 26px; }
.log-product { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 8px 12px; background: none; border: 0; border-radius: 18px; cursor: pointer; transition: background .2s; }
.log-product:hover, .log-product:focus-visible { background: #f7f6f3; outline: none; }
.log-product-art { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.log-product-art > img { position: absolute; inset: 6% 10%; width: 80%; height: 88%; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(40,34,28,.16)) drop-shadow(0 2px 3px rgba(40,34,28,.08)); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.log-product-art .ss-front { height: 88%; }
.log-product:hover .log-product-art > img, .log-product:hover .ss-art { transform: translateY(-4px); }
.log-product-name { font-family: 'Inter', var(--sans); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); text-align: center; line-height: 1.35; }
.log-product:hover .log-product-name { color: var(--ink); }
@media (max-width: 860px) {
  .log-products { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 6px; margin: 0 -16px; padding: 4px 16px 20px; }
  .log-product { flex: 0 0 34%; scroll-snap-align: start; }
}
.log-product-art .ss-front { position: absolute; top: 6%; height: 86%; width: auto; }

/* ---- Readability: more contrast, same airy white look ----
   Text grays are darker (body copy and labels now pass WCAG AA on white),
   lines are a touch firmer, and small print is a little larger. */
:root {
  --ink: #17191c;
  --ink-2: #3a4046;
  --muted: #5c636b;
  --faint: #8b9199;
  --line: #dadfe4;
  --line-2: #c4cbd2;
  --chip: #eceff2;
}
body { font-size: 15px; }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hint, .desc { color: var(--ink-2); }
.app-foot { color: #7d838b; }
.lib-list .lib-row, .home-feed li, .wr-foot { border-color: var(--line); }
.progress { background: #e4dfd6; }
/* Book-type labels: same hues, readable strength. */
.type-label { color: var(--muted); }
.type-label[data-type="written"], .type-label[data-type="insert"] { color: #8a5a12; }

/* ---- Template gallery: the title leads, then a line, then tiny covers ---- */
.tpl2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tpl2 { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px 24px 22px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; color: var(--ink); transition: border-color .2s, box-shadow .25s, transform .25s; }
.tpl2:hover:not(:disabled), .tpl2:focus-visible { border-color: #B8E8F8; box-shadow: 0 16px 34px rgba(40,34,28,.09); transform: translateY(-2px); outline: none; }
.tpl2.busy { opacity: .6; }
.tpl2.blank { border-style: dashed; background: #fbfaf8; }
.tpl2-title { margin: 0; padding-right: 64px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 28px; font-weight: 500; line-height: 1.08; letter-spacing: -0.005em; }
.tpl2-desc { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.tpl2-thumbs { display: flex; align-items: flex-end; gap: 10px; margin-top: auto; padding-top: 14px; }
.tpl2-thumb { width: 66px; height: 74px; background: transparent !important; border-radius: 0; }
.tpl2-back { justify-content: center !important; gap: 10% !important; }
.tpl2-back-line { width: 34%; height: 1px; background: #c9ced5; }
.tpl2-back-mark { font-family: var(--sans); font-size: max(5px, 6cqh); letter-spacing: .14em; color: #8b9199; }
.tpl2-blank { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft, #E3F6FD); color: #252525; }
.tpl2-flag { position: absolute; top: 20px; right: 18px; padding: 3px 9px; border-radius: 99px; background: var(--brand-soft, #E3F6FD); color: var(--brand-ink, #111111); font-family: 'Inter', var(--sans); font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 560px) { .tpl2-grid { grid-template-columns: minmax(0, 1fr); } .tpl2-title { font-size: 25px; } }
.tpl2-title { padding-right: 0; }
.tpl2-flag { position: static; align-self: flex-start; margin-bottom: 2px; }

/* ---- Black covers (cover style: dark) ---- */
.leaf-r.cover.dark, .leaf-r.back.dark { background: #111 !important; color: #fff; }
.leaf-r.cover.dark h1, .leaf-r.cover.dark p, .leaf-r.back.dark .leaf-quote { color: #fff !important; }
.leaf-r.back.dark .leaf-brand { color: #c9c4bc !important; }
.leaf-r.cover.dark .cover-rule { background: rgba(255,255,255,.5) !important; }
.leaf-r.dark .cover-ph { color: rgba(255,255,255,.55) !important; }
.bookcover.dark { background: #111 !important; }
.bookcover.dark .bc-title, .bookcover.dark .bc-foot, .bookcover.dark .bc-by { color: #fff !important; }
.bookcover.dark .bc-rule { background: rgba(255,255,255,.45) !important; }
.bookcover.dark::before { background: rgba(255,255,255,.08); }
/* Toggle */
.cs-row { display: flex; gap: 12px; }
.cs-opt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 12px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cs-opt:hover { border-color: var(--line-2); }
.cs-opt.on { border-color: #252525; box-shadow: 0 0 0 3px var(--brand-soft, #E3F6FD); }
.cs-cover { width: 70px; height: 96px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 2px 4px 4px 2px; box-shadow: 0 1px 2px rgba(20,30,40,.1), 0 8px 16px rgba(20,30,40,.14); }
.cs-cover.light { background: #fff; color: #17191c; }
.cs-cover.dark { background: #111; color: #fff; }
.cs-t { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 9px; line-height: 1.1; text-align: center; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cs-ph { flex: 1; width: 100%; background: linear-gradient(135deg, #d9cbb6, #a9b8c0); }
.cs-r { width: 40%; height: 1px; background: currentColor; opacity: .5; }
.cs-label { font-size: 14.5px; color: var(--ink); }

/* Book preview: every page keeps the book's shape on the same stage */
.pv-stage { display: grid; place-items: center; min-height: 420px; padding: 30px; border-radius: 12px; background: #e9ecef; }
.pv-stage .closed-book { width: 100%; }
.pv-page { position: relative; display: block !important; overflow-y: auto; padding: 11% 10% 12%; background: #fdfcf9; text-align: left; font-family: var(--book); font-size: clamp(9px, .95vw, 11.5px); line-height: 1.65; color: #26231f; scrollbar-width: none; }
.pv-page::-webkit-scrollbar { display: none; }
.pv-opener { width: 100%; border-radius: 2px; margin-bottom: 1.4em; }
.pv-num { display: block; text-align: center; font-family: 'Inter', var(--sans); font-size: .72em; letter-spacing: .26em; text-transform: uppercase; color: #6b6358; }
.pv-title { margin: .5em 0 1.4em; text-align: center; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.9em; font-weight: 500; line-height: 1.15; }
.pv-text p { margin: 0 0 .9em; text-indent: 1.2em; }
.pv-text p:first-child { text-indent: 0; }
.pv-folio { position: sticky; display: block; bottom: -12%; margin-top: 1.5em; text-align: center; font-size: .8em; color: #8b8378; }

/* Editor: more contrast */
.ed-bar { border-bottom-color: var(--line-2); }
.ed-back { color: var(--ink); }
.ed-actions .save-state { color: var(--ink-2); }
.ed-more { border-color: #B0B0AA; }
.wr-card { border-color: #cfd5db; box-shadow: 0 1px 2px rgba(20,30,40,.04), 0 10px 30px rgba(20,30,40,.06); }
.wr-num { color: var(--ink-2); }
.wr-hint { color: #4c463e; }
.rte-toolbar.simple { border-bottom-color: var(--line-2); }
.rte-toolbar.simple button { color: #2c3136; }
.rte-toolbar.simple button:hover { background: #eceff2; color: var(--ink); }
.rte-toolbar.simple .sep { background: var(--line-2); }
.wr-card .writing-empty { color: var(--ink-2); }
.wr-card .writing-empty h4 { color: var(--ink); }
.wr-foot { color: var(--ink-2); border-top-color: var(--line-2); }
.wr-side-title { color: var(--ink-2); }
.wr-ch { color: #2a2f34; }
.wr-ch-num { color: var(--ink-2); }
.wr-ch.on { background: #dff3fa; color: var(--ink); font-weight: 500; }
.wr-add { border-color: #aab2ba; color: var(--ink); }

/* Library sort switch */
.lib-sort { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 99px; background: #fff; }
.lib-sort button { height: 32px; padding: 0 14px; border: 0; border-radius: 99px; background: none; font-size: 13.5px; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.lib-sort button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.rte-toolbar.simple svg.i { width: 20px; height: 20px; stroke-width: 2; }
/* Template cards: no outlines, covers centered under the words */
.tpl2 { border-color: transparent; background: none; }
.tpl2:hover:not(:disabled), .tpl2:focus-visible { border-color: transparent; background: #f7f6f3; box-shadow: none; }
.tpl2.blank { border: 1px dashed var(--line-2); background: none; }
.tpl2-thumbs { align-self: center; justify-content: center; }
.pv-folio { position: absolute; left: 0; right: 0; bottom: 5%; margin: 0; }

/* ---- Bookshelf: spines side by side, grouped by book type ---- */
.spineshelf { padding: 36px 28px 8px; border-radius: 16px; background: linear-gradient(180deg, #eceff2, #E5E5E2); }
.spineshelf.empty { padding: 60px 20px; text-align: center; color: var(--ink-2); }
.ss-row { margin-bottom: 70px; }
.ss-books { display: flex; align-items: flex-end; gap: 44px; padding: 0 22px; min-height: 120px; }
.ss-group { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.ss-spines { display: flex; align-items: flex-end; gap: 2px; }
.ss-label { position: absolute; left: 0; top: calc(100% + 26px); white-space: nowrap; font-family: 'Inter', var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.spine { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 14px 0 10px; border: 0; border-radius: 3px 3px 1px 1px; cursor: pointer;
  background: linear-gradient(90deg, rgba(0,0,0,.08) 0%, rgba(255,255,255,.55) 18%, rgba(255,255,255,0) 45%, rgba(0,0,0,.04) 82%, rgba(0,0,0,.12) 100%), var(--paper, #fbfaf7);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 1px 0 rgba(0,0,0,.08); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.spine:hover, .spine:focus-visible { transform: translateY(-10px); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 14px 18px -8px rgba(40,30,20,.35); outline: none; z-index: 1; }
.spine-title { flex: 1; min-height: 0; overflow: hidden; writing-mode: vertical-rl; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 15px; font-weight: 500; line-height: 1; letter-spacing: .02em; color: #1d1b18; white-space: nowrap; text-overflow: ellipsis; }
.spine-mark { flex: none; width: 14px; height: 14px; margin-top: 8px; border-radius: 50%; opacity: .9; }
.spine.dark .spine-title { color: #fff; }
.spine.dark { background: linear-gradient(90deg, rgba(0,0,0,.4) 0%, rgba(255,255,255,.1) 18%, rgba(255,255,255,0) 45%, rgba(0,0,0,.25) 100%), var(--paper); }
.spine.is-photobook .spine-title { font-size: 14px; }
.spine.is-board { border-radius: 6px 6px 2px 2px; }
.spine.is-board .spine-title { font-size: 13.5px; }
.spine.is-shortstory { border-radius: 6px; }
.spine.is-shortstory .spine-title { font-size: 11.5px; }
.spine.is-shortstory .spine-mark { width: 10px; height: 10px; }
/* Spiral books show their coil. */
.spine.is-spiral { background: repeating-linear-gradient(180deg, transparent 0 7px, #3a3d42 7px 10px, transparent 10px 14px), linear-gradient(90deg, rgba(0,0,0,.08), rgba(255,255,255,.5) 30%, rgba(0,0,0,.08)), var(--paper, #fbfaf7); }
.spine.is-spiral .spine-title { background: var(--paper, #fbfaf7); padding: 4px 0; border-radius: 2px; font-size: 13px; }
.spine.is-spiral.dark .spine-title { background: #141414; }
@media (max-width: 760px) {
  .spineshelf { padding: 26px 12px 4px; }
  .ss-books { gap: 30px; padding: 0 8px; }
}

/* Editor: Preview button and the small tools list */
.ed-preview { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border: 1px solid #B0B0AA; border-radius: 99px; background: #fff; font-size: 15px; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.ed-preview:hover { border-color: var(--ink-2); background: #faf9f7; }
.ed-tools { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.ed-tool { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 14.5px; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.ed-tool:hover { background: #f3f2ef; color: var(--ink); }
.ed-tool svg.i { flex: none; color: var(--ink-2); }
.ed-tools.row { flex-direction: row; flex-wrap: wrap; gap: 4px 6px; margin: 12px 0 0; padding: 0; border: 0; }
.ed-tools.row .ed-tool { padding: 7px 12px; font-size: 13.5px; }
@media (max-width: 640px) { .ed-preview { height: 42px; padding: 0 14px; } .ed-preview svg { display: none; } }

/* ---- Editor v3: title + description, covers on the left, floating spell check ---- */
.ed-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.ed-desc { width: 100%; padding: 2px 10px 4px; border: 1px solid transparent; border-radius: 8px; background: none; font-size: 15px; color: var(--ink-2); }
.ed-desc::placeholder { color: #8b9199; }
.ed-desc:hover { background: #faf9f7; }
.ed-desc:focus { outline: none; border-color: var(--line-2); background: #fff; }
.ed-people { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.ed-invite { width: 38px; height: 38px; display: grid; place-items: center; border: 1px dashed #B0B0AA; border-radius: 50%; background: #fff; color: var(--ink-2); cursor: pointer; transition: border-color .15s, color .15s; }
.ed-invite:hover { border-color: #252525; color: #252525; }
.wr-grid { grid-template-columns: 150px minmax(0, 1fr) 260px; gap: 28px; }
.wr-covers { position: sticky; top: calc(var(--header) + 20px); display: flex; flex-direction: column; gap: 22px; }
.wr-cover { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 8px 8px; border: 0; border-radius: 14px; background: none; cursor: pointer; transition: background .15s; }
.wr-cover:hover { background: #f3f2ef; }
.wr-cover .closed-book { width: 100%; filter: drop-shadow(0 8px 12px rgba(30,40,50,.18)); }
.wr-cover .closed-book .leaf-r { width: 100% !important; font-size: 7px; }
.wr-cover .closed-book h1 { font-size: 13px !important; }
.wr-cover .closed-book p, .wr-cover .leaf-brand, .wr-cover .cover-ph, .wr-cover .leaf-quote { font-size: 7px !important; }
.wr-cover > span { font-size: 13px; color: var(--ink-2); }
.ce-photo { width: 84px; height: 84px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #eef0f2 center / cover no-repeat; color: var(--muted); }
.ed-spell { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid #B0B0AA; border-radius: 99px; background: #fff; font-size: 14px; color: var(--ink); cursor: pointer; box-shadow: 0 8px 20px rgba(20,30,40,.1); transition: border-color .15s, box-shadow .15s; }
.ed-spell:hover { border-color: var(--ink-2); box-shadow: 0 10px 24px rgba(20,30,40,.14); }
@media (max-width: 1100px) { .wr-grid { grid-template-columns: 120px minmax(0, 1fr); } .wr-side { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .wr-grid { grid-template-columns: minmax(0, 1fr); }
  .wr-covers { position: static; flex-direction: row; justify-content: center; }
  .wr-cover { width: 120px; }
  .ed-desc { font-size: 14px; }
  .ed-spell { bottom: 16px; right: 16px; }
}

/* Photo storybooks on the shelf: thin, with crisp corners */
.spine.is-photobook { border-radius: 1px; padding: 10px 0 8px; }
.spine.is-photobook .spine-title { font-size: 11.5px; }
.spine.is-photobook .spine-mark { width: 10px; height: 10px; margin-top: 6px; }

/* ---- Launch: agree checkbox, legal pages, discount codes ---- */
.agree { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.agree input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: #17191c; }
.legal { max-width: 720px; margin: 10px auto 40px; font-size: 16px; line-height: 1.7; color: var(--ink); }
.legal h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 46px; font-weight: 400; margin: 10px 0 6px; }
.legal h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 26px; font-weight: 500; margin: 34px 0 8px; }
.legal h3 { font-size: 17px; font-weight: 600; margin: 22px 0 6px; }
.legal p { margin: 0 0 14px; color: var(--ink-2); }
.legal ul { margin: 0 0 14px; padding-left: 22px; color: var(--ink-2); }
.legal li { margin-bottom: 6px; }
.legal-links, .app-foot-links { display: flex; gap: 18px; justify-content: center; }
.legal-links { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.legal-links a, .app-foot-links a { color: inherit; }
.app-foot { flex-wrap: wrap; }
.app-foot-links { flex-basis: 100%; gap: 16px; margin-top: 8px; font-size: 10px; letter-spacing: .22em; }
.discount-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.discount-form .input { flex: 1; min-width: 0; text-transform: uppercase; }
.discount-on { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; background: #eaf6ee; font-size: 13.5px; color: #2f5d3a; }
.disc-new { display: grid; grid-template-columns: 1.2fr .6fr .8fr 1.2fr auto; gap: 12px; align-items: end; margin-bottom: 22px; }
.disc-new .field { margin: 0; }
@media (max-width: 760px) { .disc-new { grid-template-columns: 1fr 1fr; } }

/* ---- Side navigation is back (top nav only on phones) ---- */
:root { --sidebar: 230px; }
.app-body { display: flex; }
.top-nav { display: none; }
.sidebar { padding: 28px 16px 18px; }
.nav-item { padding: 12px 16px; font-family: 'Inter', var(--sans); font-size: 15.5px; letter-spacing: .02em; color: var(--ink-2); margin-bottom: 6px; }
.nav-item svg.i { width: 22px; height: 22px; }
.nav-item.active { background: var(--brand-soft, #E3F6FD); color: var(--ink); font-weight: 500; }
.side-new { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 18px; padding: 13px 16px; border: 0; border-radius: 99px; background: var(--ink); color: #fff; font-family: 'Inter', var(--sans); font-size: 14.5px; cursor: pointer; transition: background .15s, transform .15s; }
.side-new:hover { background: #252525; transform: translateY(-1px); }
.app-foot > span { display: none; }
.app-foot-links { margin-top: 0; }
@media (max-width: 860px) { .top-nav { display: flex; } .app-foot > span { display: inline; } }

/* ---- Today ---- */
.td-page { --td-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif; max-width: 1240px; }
.main:has(.td-page) { padding-top: 0; }
.td-hero { position: relative; margin: 0 -40px; height: 270px; padding: 46px 56px; background: url(/img/welcome-hero.jpg) center 64% / cover no-repeat; overflow: hidden; }
.td-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,26,32,.55) 0%, rgba(20,26,32,.25) 45%, rgba(20,26,32,0) 75%), linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(255,255,255,.75) 100%); }
.td-hero-text { position: relative; max-width: 620px; color: #fff; }
.td-kicker { margin: 0; font-family: 'Inter', var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.td-title { margin: 10px 0 0; font-family: var(--td-display); font-size: clamp(40px, 4.4vw, 58px); font-weight: 400; line-height: 1.02; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.2); }
.td-sub { margin: 12px 0 0; font-family: 'Inter', var(--sans); font-size: 16.5px; line-height: 1.5; color: rgba(255,255,255,.92); }
.td-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; margin-top: -84px; align-items: start; }
.td-add, .td-card { background: #fff; border: 1px solid #E5E5E2; border-radius: 22px; box-shadow: 0 2px 4px rgba(20,30,40,.03), 0 18px 44px rgba(20,30,40,.08); }
.td-add { padding: 20px; }
.td-add-top { display: flex; gap: 16px; align-items: stretch; }
.td-photos { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; max-width: 50%; }
.td-photo { position: relative; flex: none; width: 108px; height: 108px; border-radius: 14px; overflow: hidden; background: #f1f2f4; }
.td-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.td-photo button { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(23,25,28,.7); color: #fff; cursor: pointer; }
.td-photo.add { display: grid; place-items: center; border: 1.5px dashed #B0B0AA; background: #fafbfc; color: var(--ink-2); cursor: pointer; transition: border-color .15s, color .15s; }
.td-photo.add:hover:not(:disabled) { border-color: #252525; color: #252525; }
.td-photo.add:disabled { opacity: .45; cursor: default; }
.td-text { flex: 1; min-width: 0; min-height: 108px; padding: 14px 16px; border: 0; border-radius: 14px; background: #FAFAF8; resize: vertical; font-family: var(--book); font-size: 19px; line-height: 1.55; color: var(--ink); }
.td-text::placeholder { color: #7d838b; }
.td-text:focus { outline: none; background: #F3F5F7; }
.td-add-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.td-pick { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px; background: #F2F2EF; color: var(--ink); font-size: 14.5px; cursor: pointer; }
.td-pick select, .td-pick input { appearance: none; -webkit-appearance: none; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; max-width: 230px; text-overflow: ellipsis; padding-right: 2px; }
.td-pick select:focus, .td-pick input:focus { outline: none; }
.td-pick:focus-within { box-shadow: 0 0 0 2px #B8E8F8; }
.td-camera { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: #F2F2EF; color: var(--ink-2); cursor: pointer; }
.td-camera:disabled { opacity: .45; cursor: default; }
.td-save { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; cursor: pointer; transition: background .15s; }
.td-save:hover:not(:disabled) { background: #252525; }
.td-save:disabled { opacity: .4; cursor: default; }
.td-note { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.td-add-empty { padding: 30px 28px; text-align: center; }
.td-add-empty h2 { margin: 0; font-family: var(--td-display); font-size: 28px; font-weight: 400; }
.td-add-empty p { margin: 8px auto 18px; max-width: 420px; color: var(--ink-2); }
.td-recent { margin-top: 34px; }
.td-recent-head h2, .td-card h2 { margin: 0; font-family: var(--td-display); font-size: 28px; font-weight: 500; }
.td-recent-head { margin-bottom: 14px; }
.td-empty { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.td-entry { position: relative; display: flex; gap: 20px; align-items: center; margin-bottom: 14px; padding: 14px; padding-right: 48px; background: #fff; border: 1px solid #E5E5E2; border-radius: 18px; cursor: pointer; transition: box-shadow .2s, transform .2s; }
.td-entry:hover { box-shadow: 0 12px 28px rgba(20,30,40,.08); transform: translateY(-1px); }
.td-entry-photos { flex: none; display: flex; gap: 6px; }
.td-entry-photos img { width: 150px; height: 116px; object-fit: cover; border-radius: 12px; display: block; }
.td-entry-photos.n2 img:last-child { width: 108px; }
.td-entry-body { min-width: 0; }
.td-entry-meta { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--ink-2); }
.td-entry-meta i { width: 4px; height: 4px; border-radius: 50%; background: #9aa1a8; }
.td-entry-meta span { color: #252525; font-weight: 500; }
.td-entry-text { margin: 6px 0 0; font-family: var(--book); font-size: 18.5px; line-height: 1.5; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.td-entry-menu { position: absolute; top: 12px; right: 10px; }
.td-side { display: flex; flex-direction: column; gap: 22px; }
.td-card { padding: 22px 22px 18px; }
.td-card-head { display: flex; align-items: center; justify-content: space-between; }
.td-plus { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.td-plus:hover { background: #F2F2EF; }
.td-stories { list-style: none; margin: 14px 0 6px; padding: 0; }
.td-stories button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 8px 6px; border: 0; border-radius: 14px; background: none; text-align: left; cursor: pointer; color: var(--ink-2); }
.td-stories button:hover { background: #F5F5F3; }
.td-story-cover { flex: none; width: 56px; }
.td-story-cover .thumb { width: 56px; height: 56px; background: transparent; }
.td-story-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.td-story-text b { font-size: 15.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-story-text .type-label { font-size: 9.5px; }
.td-story-bar { height: 3px; margin-top: 4px; border-radius: 99px; background: #E8E8E4; overflow: hidden; }
.td-story-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand, #B8E8F8), #B8E8F8); }
.td-all { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 12px 8px 4px; border-top: 1px solid #eceef0; font-size: 14.5px; color: #252525; text-decoration: none; }
.td-all svg:last-child { margin-left: auto; }
.td-checks { list-style: none; margin: 14px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.td-checks li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; color: var(--ink); }
.td-box { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border: 1.5px solid #B0B0AA; border-radius: 7px; color: #fff; }
.td-checks li.ok .td-box { background: #252525; border-color: #252525; }
.td-checks li.ok { color: var(--ink-2); }
.td-progress { display: flex; align-items: center; gap: 12px; }
.td-progress span { flex: 1; height: 8px; border-radius: 99px; background: #EDEDEA; overflow: hidden; }
.td-progress span i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand, #B8E8F8), #252525); transition: width .5s; }
.td-progress b { font-size: 14px; font-weight: 500; color: var(--ink-2); }
@media (max-width: 1100px) { .td-grid { grid-template-columns: minmax(0, 1fr); } .td-side { display: grid; grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .td-hero { margin: 0 -16px; padding: 34px 22px; height: 230px; } }
@media (max-width: 640px) {
  .td-add-top { flex-direction: column; }
  .td-photos { max-width: none; }
  .td-photo { width: 84px; height: 84px; }
  .td-side { grid-template-columns: 1fr; }
  .td-entry { flex-direction: column; align-items: stretch; padding-right: 14px; }
  .td-entry-photos img { width: 100%; height: 180px; }
  .td-entry-photos.n2 img { width: 50%; }
  .td-camera { margin-left: 0; }
  .td-pick select { max-width: 160px; }
}
@media (max-width: 640px) {
  .td-hero { height: auto; padding: 26px 20px 108px; }
  .td-title { font-size: 36px; }
  .td-sub { font-size: 15px; }
  .td-save { flex: 1; justify-content: center; }
}
/* Today as a journal */
.td-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.td-pick.sm { height: 38px; font-size: 13.5px; }
.td-cat { color: #6a5a3c !important; font-weight: 500; }
.td-entry.no-book { cursor: default; }
.td-entry.no-book:hover { transform: none; box-shadow: none; }

/* Library: products on top, then in progress, then finished */
.lib-page .log-products { padding-top: 4px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.lib-sec { margin-bottom: 44px; }
.lib-sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.lib-sec-head h2 { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 30px; font-weight: 500; }
.lib-sec-count { font-family: 'Inter', var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.lib-none { margin: 4px 0 0; color: var(--ink-2); }
.lib-fin-head { margin-bottom: 4px; }
/* Journal import */
.ji-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ji-filters button { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px; background: #fff; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.ji-filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ji-list { max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; }
.ji-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ji-row:last-child { border-bottom: 0; }
.ji-row input { width: 18px; height: 18px; flex: none; accent-color: #17191c; }
.ji-row img { width: 44px; height: 44px; flex: none; object-fit: cover; border-radius: 8px; }
.ji-row-text { flex: 1; min-width: 0; }
.ji-row-text b { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.ji-row-text span { display: block; font-family: var(--book); font-size: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-journal { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px dashed #B0B0AA; border-radius: 99px; background: #fff; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.ed-journal:hover { border-color: #252525; color: #252525; }
/* Written books: a photo now and then */
.rte img { display: block; max-width: 100%; max-height: 420px; margin: 8px auto; border-radius: 6px; box-shadow: 0 6px 16px rgba(20,30,40,.12); }
.rte-toolbar.simple .rte-photo { width: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 14px; color: #2c3136; }
.pv-text img { display: block; max-width: 100%; margin: .6em auto; }

/* ---- Photo, board, spiral and short-story books: edit right on the open book ---- */
.pb-page { max-width: 1400px; }
.pb-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr) 270px; gap: 28px; align-items: start; margin-top: 26px; }
.pb-stage { padding: 34px 36px 22px; border-radius: 22px; background: #e9ecef; }
.pb-book { max-width: 860px; margin: 0 auto; }
.pb-book.flip { flex-direction: row-reverse; }
.pb-book.flip .leaf.left { border-radius: 0 4px 4px 0; box-shadow: inset 18px 0 24px -16px rgba(0,0,0,.18); }
.pb-book.flip .leaf.right { border-radius: 4px 0 0 4px; }
.pb-photo { display: grid; place-items: center; padding: 0; border: 0; cursor: pointer; background: #f3f1ec; font: inherit; }
.pb-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.pb-photo.empty { background: repeating-linear-gradient(45deg, #f4f2ee 0 12px, #efede8 12px 24px); }
.pb-photo-note { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 16px; color: var(--ink-2); }
.pb-plus { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #252525; box-shadow: 0 6px 18px rgba(20,30,40,.12); transition: transform .2s; }
.pb-photo:hover .pb-plus { transform: scale(1.08); }
.pb-photo-change { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: rgba(23,25,28,.72); color: #fff; font-size: 13.5px; opacity: 0; transition: opacity .2s; }
.pb-photo:hover .pb-photo-change, .pb-photo:focus-visible .pb-photo-change { opacity: 1; }
.pb-words { display: flex; flex-direction: column; padding: 9% 9% 7%; }
.pb-heading, .pb-body { width: 100%; border: 1px dashed transparent; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: center; transition: border-color .15s, background .15s; }
.pb-heading { padding: 6px 8px; font-family: var(--book); font-size: clamp(16px, 1.7vw, 24px); }
.pb-body { flex: 1; min-height: 0; margin-top: 10px; padding: 8px; resize: none; font-family: var(--book); font-style: italic; font-size: clamp(13px, 1.15vw, 16px); line-height: 1.65; }
.pb-heading:hover, .pb-body:hover { border-color: #c9ced5; }
.pb-heading:focus, .pb-body:focus { outline: none; border-color: #B8E8F8; background: rgba(255,255,255,.55); }
.pb-heading::placeholder, .pb-body::placeholder { color: #8b8378; }
.font-sans .pb-heading, .font-sans .pb-body { font-family: var(--sans); font-style: normal; }
.bg-charcoal .pb-heading::placeholder, .bg-charcoal .pb-body::placeholder { color: #bdb7ae; }
.pb-words .folio { position: static; margin-top: 8px; text-align: center; }
.pb-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; }
.pb-ctl { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border: 1px solid #B0B0AA; border-radius: 99px; background: #fff; font-size: 14px; color: var(--ink); cursor: pointer; }
.pb-ctl:hover { border-color: var(--ink-2); }
.pb-warn { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: 13.5px; color: #7a5f2a; }
.pb-voice { max-width: 560px; margin: 16px auto 0; padding: 14px 16px; border-radius: 14px; background: #fff; }
.pb-empty { padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: 22px; text-align: center; color: var(--ink-2); }
.pb-pages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - var(--header) - 230px); overflow-y: auto; }
.pb-pg { display: flex; align-items: center; gap: 10px; padding: 7px 6px 7px 8px; border-radius: 12px; cursor: pointer; font-size: 14.5px; color: #2a2f34; transition: background .15s; }
.pb-pg:hover { background: #f6f5f2; }
.pb-pg.on { background: #dff3fa; color: var(--ink); font-weight: 500; }
.pb-pg-num { flex: none; width: 20px; text-align: center; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 17px; color: var(--ink-2); }
.pb-pg-thumb { flex: none; width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: #eef0f2; color: var(--muted); }
.pb-pg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pb-pg-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-pg-done { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #252525; color: #fff; }
.pb-pg:hover .wr-ch-menu, .pb-pg.on .wr-ch-menu { opacity: 1; }
@media (max-width: 1150px) { .pb-grid { grid-template-columns: 120px minmax(0, 1fr); } .pb-side { grid-column: 1 / -1; } .pb-pages { max-height: none; } }
@media (max-width: 760px) {
  .pb-grid { grid-template-columns: minmax(0, 1fr); }
  .pb-stage { padding: 18px 12px 16px; margin: 0 -8px; }
  .pb-words { padding: 7% 6%; }
}
.pb-heading { resize: none; line-height: 1.2; overflow: hidden; flex: none; }

/* Dashboard: small "By the numbers" strip at the bottom */
.dash-numbers { margin-top: 26px; padding: 18px 4px 6px; border-top: 1px solid var(--line); }
.dash-numbers h2 { font-family: var(--lx-label); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.dash-numbers ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px 18px; }
.dash-numbers li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-numbers b { font-family: var(--lx-display); font-size: 26px; font-weight: 500; line-height: 1.1; color: var(--ink); white-space: nowrap; }
.dash-numbers span { font-family: var(--lx-label); font-size: 12px; line-height: 1.3; color: var(--ink-2); }
@media (max-width: 1100px) { .dash-numbers ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dash-numbers ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Top-bar themes (Settings → Theme) ---- */
.app-header.themed:not(.th-default) { border-bottom-color: rgba(0,0,0,.06); }
/* Pictures and patterns: words sit on soft frosted pills so they stay easy to read */
.app-header.th-scene .wordmark, .app-header.th-pattern .wordmark,
.app-header.th-scene .top-nav, .app-header.th-pattern .top-nav,
.app-header.th-scene .header-actions, .app-header.th-pattern .header-actions {
  background: rgba(255,255,255,.84); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.app-header.th-scene .wordmark, .app-header.th-pattern .wordmark { padding: 6px 16px 6px 8px; font-size: 22px; }
.app-header.th-scene .top-nav, .app-header.th-pattern .top-nav { padding: 4px; }
.app-header.th-scene .header-actions, .app-header.th-pattern .header-actions { padding: 2px 6px; }
.app-header.th-scene .top-nav-item, .app-header.th-pattern .top-nav-item { height: 36px; }
/* Solid colors */
.app-header.th-solid .top-nav-item:hover { background: rgba(255,255,255,.5); }
.app-header.th-solid:not(.th-default) .top-nav-item.active { background: rgba(255,255,255,.75); }
.app-header.th-solid:not(.th-default) .header-sep { background: rgba(0,0,0,.12); }
/* Dark solid colors: white words */
.app-header.th-solid.th-dark { border-bottom-color: transparent; }
.app-header.th-solid.th-dark .wordmark, .app-header.th-solid.th-dark .top-nav-item,
.app-header.th-solid.th-dark .icon-btn, .app-header.th-solid.th-dark .avatar-btn { color: #fff; }
.app-header.th-solid.th-dark .top-nav-item:hover, .app-header.th-solid.th-dark .icon-btn:hover, .app-header.th-solid.th-dark .avatar-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.app-header.th-solid.th-dark .top-nav-item.active { background: rgba(255,255,255,.2); color: #fff; }
.app-header.th-solid.th-dark .header-sep { background: rgba(255,255,255,.25); }
.app-header.th-solid.th-dark .logo-mark { filter: none; }
@media (max-width: 860px) {
  .app-header.th-scene .wordmark, .app-header.th-pattern .wordmark { padding: 5px; }
  .app-header.th-scene .top-nav-item, .app-header.th-pattern .top-nav-item { width: 36px; }
}

/* Theme picker */
.th-group { margin-top: 18px; }
.th-group:first-of-type { margin-top: 4px; }
.th-group-title { font-family: 'Inter', var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.th-swatch { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; }
.th-bar { position: relative; display: block; height: 52px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.th-swatch:hover .th-bar { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.th-swatch.on .th-bar { border-color: #252525; box-shadow: 0 0 0 2px #252525; }
.th-check { position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #252525; color: #fff; }
.th-name { font-family: 'Inter', var(--sans); font-size: 14px; color: var(--ink); }
.th-bar.th-scene { background-position: right center !important; }

/* Product row: drawn to scale, standing on one line, with the size above */
.log-product { gap: 8px; }
.log-product-size { font-family: 'Inter', var(--sans); font-size: 11px; font-weight: 400; letter-spacing: .08em; color: var(--muted); }
.log-product-art > img { inset: auto; left: 50%; bottom: 4%; width: auto; max-width: 100%; height: calc(90% * var(--h, .8)); transform: translateX(-50%); object-position: bottom; }
.log-product:hover .log-product-art > img { transform: translateX(-50%) translateY(-4px); }

/* ---- Theme accents (set on <html> by applyAccent when a theme is picked) ---- */
html.accented body, html.accented .app-body, html.accented .sidebar { background: var(--accent-wash); }
html.accented .app-header { background: var(--accent-wash); }
html.accented .nav-item.active, html.accented .top-nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
html.accented .side-new, html.accented .td-save { background: var(--accent); }
html.accented .side-new:hover, html.accented .td-save:hover:not(:disabled) { background: var(--accent); filter: brightness(1.12); }
html.accented .td-pick, html.accented .td-camera { background: var(--accent-soft); }
html.accented .td-text { background: color-mix(in srgb, var(--accent-soft) 35%, #fff); }
html.accented .td-pick:focus-within { box-shadow: 0 0 0 2px var(--accent); }
html.accented .td-photo.add:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
html.accented .td-entry-meta span, html.accented .td-cat { color: var(--accent) !important; }
html.accented .td-checks li.ok .td-box { background: var(--accent); border-color: var(--accent); }
html.accented .td-progress span i, html.accented .td-story-bar i { background: var(--accent); }
html.accented .td-stories button:hover, html.accented .td-plus:hover { background: var(--accent-soft); }

/* ---- Today banner themes ---- */
.td-hero.themed { background-color: var(--accent-wash, #fff); }
/* Photos and dark colors: keep the soft dark shade so white words read well */
.td-hero.th-solid.th-words-light::before { background: linear-gradient(180deg, rgba(255,255,255,0) 60%, rgba(255,255,255,.25) 100%); }
/* Light colors and patterns: dark words, no shade */
.td-hero.th-words-dark::before { background: linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(255,255,255,.6) 100%); }
.td-hero.th-pattern.th-words-dark .td-hero-text { display: inline-block; padding: 18px 24px; margin: -18px -24px; border-radius: 20px; background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.td-hero.th-words-dark .td-title { color: var(--ink); text-shadow: none; }
.td-hero.th-words-dark .td-kicker { color: var(--accent, var(--ink-2)); }
.td-hero.th-words-dark .td-sub { color: var(--ink-2); }

/* ---- Calendar ---- */
.cal-page { max-width: 1180px; }
.cal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 6px 0 22px; }
.cal-title { margin: 6px 0 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 52px; font-weight: 400; line-height: 1; color: var(--ink); }
.cal-sub { margin: 10px 0 0; font-size: 15.5px; color: var(--ink-2); }
.cal-actions { display: flex; align-items: center; gap: 14px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-arrow { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.cal-arrow:hover { background: var(--accent-soft, #E3F6FD); }
.cal-now { height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font: inherit; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.cal-make { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border: 0; border-radius: 99px; background: var(--accent, var(--ink)); color: #fff; font-family: 'Inter', var(--sans); font-size: 15px; cursor: pointer; }
.cal-make:hover { filter: brightness(1.12); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.cal-week { padding: 0 4px 2px; font-family: 'Inter', var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cal-cell { position: relative; aspect-ratio: 1; display: block; padding: 0; border: 1px solid #E5E5E2; border-radius: 16px; background: #fff center / cover no-repeat; overflow: hidden; text-align: left; font: inherit; }
.cal-cell.blank { border: 0; background: none; }
.cal-cell.future { background: #fafafa; }
.cal-cell.future .cal-num { color: #b8bdc3; }
.cal-cell.today { border: 2px solid var(--accent, #252525); }
.cal-cell.has { cursor: pointer; transition: transform .18s, box-shadow .18s; }
.cal-cell.has:hover, .cal-cell.has:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20,30,40,.14); outline: none; }
.cal-cell.words { background: var(--accent-soft, #E3F6FD); }
.cal-num { position: absolute; top: 9px; left: 10px; font-size: 15px; font-weight: 500; color: var(--ink-2); line-height: 1; }
.cal-cell.photo .cal-num { padding: 5px 8px; border-radius: 99px; background: rgba(255,255,255,.9); color: var(--ink); font-size: 13.5px; top: 7px; left: 7px; }
.cal-words { position: absolute; left: 10px; right: 10px; bottom: 10px; font-family: var(--book); font-size: 15px; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-more { position: absolute; right: 7px; bottom: 7px; padding: 4px 8px; border-radius: 99px; background: rgba(20,24,28,.72); color: #fff; font-size: 12.5px; font-weight: 500; }
/* A day, opened */
.cal-day { display: flex; flex-direction: column; gap: 26px; }
.cal-entry-photos { display: grid; gap: 8px; }
.cal-entry-photos.n2 { grid-template-columns: 1fr 1fr; }
.cal-entry-photos.n3 { grid-template-columns: repeat(3, 1fr); }
.cal-entry-photos img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 14px; display: block; }
.cal-entry-photos.n2 img, .cal-entry-photos.n3 img { aspect-ratio: 1; }
.cal-entry-text { margin: 14px 0 0; font-family: var(--book); font-size: 21px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }
.cal-entry-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.cal-tag { padding: 6px 12px; border-radius: 99px; background: var(--accent-soft, #E3F6FD); color: var(--accent, #111111); font-size: 13.5px; font-weight: 500; }
.cal-link, .cal-del { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.cal-del { margin-left: auto; color: var(--ink-2); border-color: transparent; }
.cal-del:hover { color: #a3533f; }
/* Make a photo book */
.cal-make-note { margin: 0 0 18px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.cal-make-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cal-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.cal-field select { height: 48px; padding: 0 14px; border: 1px solid var(--line-2, #D4D4CF); border-radius: 12px; background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
.cal-make-sum { margin: 16px 0 0; font-size: 15.5px; color: var(--ink); }
.cal-make-sum b { font-size: 20px; }
.cal-make-sum span { color: var(--ink-2); }
@media (max-width: 760px) {
  .cal-title { font-size: 38px; }
  .cal-grid { gap: 4px; }
  .cal-cell { border-radius: 9px; }
  .cal-num, .cal-cell.photo .cal-num { top: 4px; left: 4px; font-size: 11.5px; padding: 2px 5px; }
  .cal-words, .cal-more { display: none; }
  .cal-week { font-size: 10px; letter-spacing: .06em; text-align: center; padding: 0; }
  .cal-actions { width: 100%; justify-content: space-between; }
}

/* ---- Welcome page: How Storybank works ---- */
.hw-how { max-width: 1120px; margin: 56px auto 20px; padding: 0 20px; text-align: center; }
.hw-how-kicker { margin: 0; font-family: 'Inter', var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--accent, #252525); }
.hw-how h2 { margin: 12px auto 0; max-width: 760px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(34px, 4vw, 48px); font-weight: 400; line-height: 1.1; color: var(--ink); }
.hw-how-lead { margin: 16px auto 0; max-width: 720px; font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.hw-steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; text-align: left; }
.hw-steps li { position: relative; padding: 26px 22px 24px; background: #fff; border: 1px solid #E5E5E2; border-radius: 20px; }
.hw-step-num { position: absolute; top: 18px; right: 20px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 40px; line-height: 1; color: #d9dde1; }
.hw-step-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft, #E3F6FD); color: var(--accent, #252525); }
.hw-steps h3 { margin: 18px 0 0; font-family: 'Inter', var(--sans); font-size: 19px; font-weight: 500; color: var(--ink); }
.hw-steps p { margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.hw-how-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hw-btn { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 26px; border: 1px solid var(--line-2, #D4D4CF); border-radius: 99px; background: #fff; font-family: 'Inter', var(--sans); font-size: 16px; color: var(--ink); cursor: pointer; }
.hw-btn.primary { border-color: transparent; background: var(--accent, var(--ink)); color: #fff; }
.hw-btn:hover { filter: brightness(1.08); }
@media (max-width: 1000px) { .hw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hw-steps { grid-template-columns: 1fr; } .hw-how-lead { font-size: 17px; } }

/* Side menu: a little more room on the left, lined up with the logo */
:root { --sidebar: 248px; }
.sidebar { padding: 28px 20px 22px 28px; }
@media (max-width: 860px) { .sidebar { padding: 0; } }

/* ---- Welcome page: "You're an author!" with the four steps on the photo ---- */
.hw { padding: 56px 40px 110px; }
.hw-wash { background: linear-gradient(180deg, rgba(248,245,240,.88) 0%, rgba(248,245,240,.66) 40%, rgba(248,245,240,.4) 70%, rgba(248,245,240,.55) 100%); }
.hw-hello { font-size: 14px; letter-spacing: .3em; color: #3f3a33; }
.hw-title { margin-top: 18px; font-size: clamp(44px, 5.6vw, 78px); line-height: 1.04; }
.hw-lead { margin: 22px auto 0; max-width: 640px; font-family: 'Inter', var(--sans); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: #2f2b26; }
.hw .hw-steps { width: min(1080px, 100%); margin: 38px auto 0; gap: 16px; }
.hw .hw-steps li { padding: 22px 22px 22px; background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.95); border-radius: 22px; box-shadow: 0 18px 40px rgba(60,45,30,.12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hw-step-top { display: flex; align-items: center; justify-content: space-between; }
.hw .hw-step-num { position: static; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--accent, #1d1b18); color: #fff; font-family: 'Inter', var(--sans); font-size: 19px; font-weight: 500; }
.hw .hw-step-icon { width: 44px; height: 44px; background: var(--accent-soft, #E3F6FD); color: var(--accent, #111111); }
.hw .hw-steps h3 { margin-top: 16px; font-size: 20px; line-height: 1.25; }
.hw .hw-steps p { margin-top: 6px; font-size: 16.5px; line-height: 1.5; color: #4a453e; }
.hw-start { margin-top: 30px; height: 56px; padding: 0 30px; font-size: 17px; }
.hw-start:not(:hover) { box-shadow: 0 12px 28px rgba(30,25,20,.18); }
@media (max-width: 1000px) { .hw .hw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hw { padding: 36px 16px 96px; } .hw .hw-steps { grid-template-columns: 1fr; } }

/* Library: "Start a new book" row */
.log-start { margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.lib-page .log-start .log-products { border-bottom: 0; margin-bottom: 0; }
.log-start-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 4px 0 2px; }
.log-start-head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 30px; font-weight: 500; color: var(--ink); }
.log-start-head h2 svg { width: 22px; height: 22px; color: var(--accent, #252525); }
.log-start-head p { margin: 0; font-size: 15px; color: var(--ink-2); }
.log-product-go { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border: 1px solid var(--line-2, #D4D4CF); border-radius: 99px; background: #fff; font-family: 'Inter', var(--sans); font-size: 12.5px; color: var(--ink); transition: background .15s, color .15s, border-color .15s; }
.log-product:hover .log-product-go, .log-product:focus-visible .log-product-go { background: var(--accent, var(--ink)); border-color: transparent; color: #fff; }
.log-start .log-product-name { min-height: 2.7em; }

/* Welcome page: the "Start a new book" row under the hero */
.hw-products { max-width: 1180px; margin: 44px auto 10px; padding: 0 20px; }
.hw-products .log-start-head { justify-content: center; text-align: center; margin-bottom: 8px; }
.hw-products .log-start-head h2 { font-size: 38px; }
.hw-products .log-start-head p { font-size: 17px; flex-basis: 100%; }
.hw-products .log-start { border-bottom: 0; }

/* ---- Voice notes: the big green "Click to record" button ---- */
.vn-big { width: 100%; display: flex; align-items: center; gap: 22px; margin-bottom: 18px; padding: 20px 28px; border: 0; border-radius: 24px; background: linear-gradient(180deg, #94E3FB, #94E3FB); color: #0B3A52; text-align: left; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.06), 0 16px 34px rgba(43,138,76,.28); transition: transform .15s, box-shadow .15s, filter .15s; }
.vn-big:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 22px 40px rgba(43,138,76,.34); }
.vn-big:focus-visible { outline: 4px solid #B8E8F8; outline-offset: 3px; }
.vn-big-icon { flex: none; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #1A6E96; }
.vn-big-icon svg.i { width: 36px; height: 36px; stroke-width: 2; }
.vn-big-text { display: flex; flex-direction: column; gap: 4px; }
.vn-big-text b { font-family: 'Inter', var(--sans); font-size: 30px; font-weight: 500; line-height: 1.1; letter-spacing: .01em; }
.vn-big-text small { font-size: 17px; opacity: .95; }

/* The steps (one at a time, large) */
.vn-modal .modal-body, .vn-modal { font-size: 17px; }
.vn-step { display: flex; flex-direction: column; gap: 14px; }
.vn-lead { margin: 0; font-size: 19px; line-height: 1.5; color: var(--ink); }
.vn-small { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.vn-choices { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.vn-choice { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 18px; border: 2px solid #E0E0DC; border-radius: 16px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.vn-choice:hover { border-color: #b9c1c9; }
.vn-choice.on { border-color: #1A6E96; background: #F2FBFE; }
.vn-choice-icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: #F2F2EF; color: var(--ink-2); }
.vn-choice.on .vn-choice-icon { background: #E3F6FD; color: #1A6E96; }
.vn-choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vn-choice-text b { font-size: 18px; font-weight: 500; }
.vn-choice-text small { font-size: 15px; color: var(--ink-2); }
.vn-radio { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid #BDBDB7; border-radius: 50%; color: #fff; }
.vn-choice.on .vn-radio { background: #94E3FB; border-color: #94E3FB; }
.vn-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 62px; margin-top: 4px; border: 0; border-radius: 16px; background: #94E3FB; color: #0B3A52; font-family: 'Inter', var(--sans); font-size: 20px; cursor: pointer; }
.vn-go:hover:not(:disabled) { background: #7FD9F6; }
.vn-go:disabled { opacity: .45; cursor: default; }
.vn-alt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; border: 2px solid #D4D4CF; border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-size: 17px; cursor: pointer; }
.vn-alt:hover:not(:disabled) { border-color: #9aa3ad; }
.vn-row { display: flex; gap: 10px; }
.vn-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.vn-facts li { display: flex; gap: 12px; font-size: 16.5px; line-height: 1.5; color: var(--ink); }
.vn-facts li svg { flex: none; margin-top: 4px; color: #1A6E96; }
/* Recording */
.vn-live { align-items: center; text-align: center; padding: 8px 0 4px; }
.vn-orb { width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; background: #EEF8FD; color: #1A6E96; }
.vn-orb svg.i { width: 54px; height: 54px; stroke-width: 1.8; }
.vn-orb.on { background: #d33a2c; color: #fff; animation: vn-pulse 1.6s ease-in-out infinite; }
@keyframes vn-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(211,58,44,.35); } 50% { box-shadow: 0 0 0 22px rgba(211,58,44,0); } }
@media (prefers-reduced-motion: reduce) { .vn-orb.on { animation: none; } }
.vn-time { margin: 6px 0 0; font-family: 'Inter', var(--sans); font-size: 40px; font-weight: 400; letter-spacing: .04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.vn-hint { margin: 0; font-size: 18px; color: var(--ink-2); min-height: 1.4em; }
.vn-words { width: 100%; min-height: 110px; max-height: 200px; overflow-y: auto; padding: 14px 16px; border-radius: 14px; background: #F5F5F3; text-align: left; font-family: var(--book); font-size: 21px; line-height: 1.5; color: var(--ink); }
.vn-words .interim { color: #7d838b; }
.vn-stop { display: inline-flex; align-items: center; justify-content: center; gap: 14px; width: 100%; height: 66px; border: 0; border-radius: 18px; background: #1f2326; color: #fff; font-family: 'Inter', var(--sans); font-size: 21px; cursor: pointer; }
.vn-stop .sq { width: 20px; height: 20px; border-radius: 4px; background: #e2493a; }
.vn-stop:disabled { opacity: .5; cursor: default; }
/* Review */
.vn-audio { width: 100%; }
.vn-label { font-size: 17px; font-weight: 500; color: var(--ink); }
.vn-text { width: 100%; padding: 14px 16px; border: 2px solid #D4D4CF; border-radius: 14px; font-family: var(--book); font-size: 21px; line-height: 1.5; color: var(--ink); resize: vertical; }
.vn-text:focus { outline: none; border-color: #1A6E96; }
/* Voice in the journal */
.td-entry-audio, .cal-entry-audio { display: block; width: 100%; max-width: 360px; height: 40px; margin-top: 10px; }
.cal-entry-audio { max-width: none; margin: 0 0 6px; }
.cal-mic { position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); color: #1A6E96; }
@media (max-width: 560px) {
  .vn-big { gap: 14px; padding: 16px 18px; }
  .vn-big-icon { width: 56px; height: 56px; } .vn-big-icon svg.i { width: 28px; height: 28px; }
  .vn-big-text b { font-size: 24px; } .vn-big-text small { font-size: 15px; }
  .vn-row { flex-direction: column; }
}

/* ---- Welcome page v3: small steps, the books right in the hero, tagline ---- */
.hw { padding: 40px 40px 96px; }
.hw-title { font-size: clamp(40px, 4.6vw, 64px); margin-top: 12px; }
.hw-steps-mini { list-style: none; margin: 26px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; max-width: 1100px; }
.hw-steps-mini li { display: flex; align-items: center; gap: 10px; text-align: left; }
.hw-mini-num { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent, #1d1b18); color: #fff; font-family: 'Inter', var(--sans); font-size: 14.5px; font-weight: 500; }
.hw-steps-mini b { display: block; font-family: 'Inter', var(--sans); font-size: 16px; font-weight: 500; color: #1d1b18; }
.hw-steps-mini small { display: block; font-size: 13.5px; color: #4a453e; }
.hw-products-in { width: min(1120px, 100%); margin: 26px auto 0; padding: 18px 22px 8px; background: rgba(255,255,255,.86); border-radius: 26px; box-shadow: 0 20px 44px rgba(60,45,30,.12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hw-products-in .log-start { border-bottom: 0; margin-bottom: 0; }
.hw-products-in .log-start-head { justify-content: center; }
.hw-products-in .log-products { padding-bottom: 12px; }
.hw-tagline { margin: 22px 0 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(22px, 2.2vw, 30px); color: #1d1b18; }
.hw-tagline b { font-style: italic; font-weight: 600; }
@media (max-width: 860px) { .hw-steps-mini { flex-direction: column; align-items: flex-start; max-width: 340px; } .hw-products-in { padding: 14px 8px 4px; } }

/* Profile library search */
.pf-search { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; margin-left: auto; border: 1px solid var(--line-2, #D4D4CF); border-radius: 99px; background: #fff; color: var(--ink-2); }
.pf-search input { border: 0; outline: none; background: none; font: inherit; font-size: 14.5px; width: 200px; color: var(--ink); }
.pf-sold { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; background: #fff4d6; color: #85621a; font-size: 12px; font-weight: 500; }

/* ---- Start a new book (/create/:slice) ---- */
.cs-page { max-width: 1120px; }
.cs-head { display: flex; align-items: center; gap: 22px; margin: 18px 0 22px; }
.cs-art { flex: none; width: 110px; height: 110px; display: grid; place-items: center; }
.cs-art img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(40,34,28,.16)); }
.cs-kicker { margin: 0; font-family: 'Inter', var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.cs-title { margin: 6px 0 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(34px, 4vw, 50px); font-weight: 400; line-height: 1.05; }
.cs-scratch { width: 100%; display: flex; align-items: center; gap: 22px; padding: 28px 30px; border: 2px solid var(--ink); border-radius: 24px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; }
.cs-scratch:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(20,30,40,.1); background: var(--accent-soft, #f6fbfd); }
.cs-scratch-icon { flex: none; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; background: var(--accent, var(--ink)); color: #fff; }
.cs-scratch-icon svg.i { width: 30px; height: 30px; }
.cs-scratch-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cs-scratch-text b { font-family: 'Inter', var(--sans); font-size: 28px; font-weight: 500; }
.cs-scratch-text small { font-size: 16.5px; color: var(--ink-2); }
.cs-or { display: flex; align-items: center; gap: 16px; margin: 30px 0 18px; font-family: 'Inter', var(--sans); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.cs-or::before, .cs-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cs-tpls { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.cs-tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 1px solid #E5E5E2; border-radius: 18px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.cs-tpl:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20,30,40,.08); }
.cs-tpl-cover { width: 100%; height: 120px; display: grid; place-items: center; margin-bottom: 4px; }
.cs-tpl-cover .thumb { max-height: 120px; width: auto; }
.cs-tpl b { font-size: 15.5px; font-weight: 500; line-height: 1.25; }
.cs-tpl small { font-size: 13px; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cs-all { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1.5px dashed #C4C4BE; border-radius: 18px; color: var(--ink); font-family: 'Inter', var(--sans); font-size: 15.5px; text-decoration: none; }
.cs-all svg.i { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--accent-soft, #E3F6FD); color: var(--accent, var(--ink)); }
.cs-all:hover { border-color: var(--accent, var(--ink)); }
@media (max-width: 1000px) { .cs-tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cs-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cs-scratch { padding: 20px; gap: 14px; } .cs-scratch-text b { font-size: 22px; } }

/* ---- Templates page ---- */
.tp-page { max-width: 1180px; }
.tp-head { margin: 6px 0 26px; }
.tp-title { margin: 6px 0 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(38px, 4vw, 52px); font-weight: 400; line-height: 1.05; }
.tp-sub { margin: 10px 0 0; font-size: 17px; color: var(--ink-2); }
.tp-h2 { margin: 0 0 14px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 30px; font-weight: 500; }
.tp-ideas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tp-idea { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 16px 14px; border: 1px solid #E5E5E2; border-radius: 18px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.tp-idea:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20,30,40,.08); }
.tp-idea-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft, #E3F6FD); color: var(--accent, #111111); margin-bottom: 4px; }
.tp-idea b { font-size: 17px; font-weight: 500; }
.tp-idea small { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); flex: 1; }
.tp-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tp-kind { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #F2F2EF; color: var(--ink-2); }
.tp-all { margin-top: 44px; scroll-margin-top: calc(var(--header) + 16px); }
.tp-all-head { display: flex; align-items: center; gap: 16px; }
.tp-all-head .tp-h2 { margin: 0; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.tp-chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid var(--line-2, #D4D4CF); border-radius: 99px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.tp-chip.on { background: var(--accent, var(--ink)); border-color: transparent; color: #fff; }
.tp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tp-tpl-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tp-empty { color: var(--ink-2); }
@media (max-width: 1000px) { .tp-ideas, .tp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tp-ideas, .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tp-all-head { flex-wrap: wrap; } }

/* ---- Group books ---- */
.gb-page { max-width: 1080px; }
.gb-head { margin: 6px 0 24px; }
.gb-title { margin: 6px 0 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(36px, 4vw, 52px); font-weight: 400; line-height: 1.05; }
.gb-sub { margin: 12px 0 0; max-width: 720px; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.gb-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gb-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; border: 1px solid #E5E5E2; border-radius: 22px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.gb-mode:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(20,30,40,.09); }
.gb-mode-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft, #E3F6FD); color: var(--accent, #111111); margin-bottom: 4px; }
.gb-mode b { font-family: 'Inter', var(--sans); font-size: 21px; font-weight: 500; }
.gb-mode small { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); flex: 1; }
.gb-mode-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; height: 42px; padding: 0 18px; border-radius: 99px; background: var(--accent, var(--ink)); color: #fff; font-family: 'Inter', var(--sans); font-size: 15px; }
.gb-mine { margin-top: 40px; }
.gb-empty { color: var(--ink-2); font-size: 16px; }
.gb-row { display: flex; align-items: center; gap: 18px; padding: 16px 18px; margin-bottom: 12px; border: 1px solid #E5E5E2; border-radius: 18px; background: #fff; }
.gb-row-art { flex: none; width: 70px; height: 70px; display: grid; place-items: center; }
.gb-row-art img, .gb-kind-art img, .gb-land-art img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(40,34,28,.14)); }
.gb-row-body { flex: 1; min-width: 0; }
.gb-row-body b { font-size: 18px; font-weight: 500; }
.gb-row-q { margin: 4px 0 0; font-family: var(--book); font-size: 17px; color: var(--ink); }
.gb-row-meta { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.gb-row-actions { display: flex; flex-direction: column; gap: 8px; }
.gb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px; border: 0; border-radius: 99px; background: var(--accent, var(--ink)); color: #fff; font: inherit; font-size: 14.5px; cursor: pointer; white-space: nowrap; }
.gb-btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2, #D4D4CF); }
.gb-field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: 15px; font-weight: 500; color: var(--ink); }
.gb-field input, .gb-field textarea { padding: 12px 14px; border: 2px solid #D4D4CF; border-radius: 12px; font: inherit; font-size: 17px; font-weight: 400; color: var(--ink); }
.gb-field textarea { font-family: var(--book); font-size: 19px; resize: vertical; }
.gb-field input:focus, .gb-field textarea:focus { outline: none; border-color: var(--accent, #252525); }
.gb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gb-kind { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border: 2px solid #E0E0DC; border-radius: 16px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; text-align: center; }
.gb-kind.on { border-color: var(--accent, #1A6E96); background: var(--accent-soft, #F2FBFE); }
.gb-kind-art { width: 70px; height: 70px; display: grid; place-items: center; }
.gb-kind b { font-size: 16px; font-weight: 500; }
.gb-kind small { font-size: 13px; color: var(--ink-2); font-weight: 400; }
.gb-make { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px; margin-top: 20px; border: 0; border-radius: 16px; background: var(--accent, #94E3FB); color: #0B3A52; font-family: 'Inter', var(--sans); font-size: 19px; cursor: pointer; }
.gb-make:disabled { opacity: .45; cursor: default; }
.gb-note { margin: 10px 0 0; font-size: 14.5px; color: var(--ink-2); }
/* Landing from the link */
.gb-land { text-align: center; padding: 20px 0 10px; }
.gb-land-art { display: inline-grid; place-items: center; width: 120px; height: 120px; margin-bottom: 8px; }
.gb-prompt { margin: 14px auto 0; max-width: 720px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(26px, 3vw, 34px); line-height: 1.25; color: var(--ink); }
.gb-land .gb-sub { margin-left: auto; margin-right: auto; }
.gb-answer { max-width: 760px; margin: 26px auto 0; padding: 24px; border: 1px solid #E5E5E2; border-radius: 22px; background: #fff; box-shadow: 0 16px 40px rgba(20,30,40,.06); }
.gb-text { width: 100%; padding: 14px 16px; border: 2px solid #D4D4CF; border-radius: 14px; font-family: var(--book); font-size: 20px; line-height: 1.55; color: var(--ink); resize: vertical; }
.gb-text:focus { outline: none; border-color: var(--accent, #1A6E96); }
.gb-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.gb-photos .td-photo { width: 90px; height: 90px; }
.gb-photos-hint { font-size: 14.5px; color: var(--ink-2); }
.gb-closed { text-align: center; color: var(--ink-2); font-size: 16px; }
@media (max-width: 760px) { .gb-modes { grid-template-columns: 1fr; } .gb-row { flex-wrap: wrap; } .gb-row-actions { flex-direction: row; width: 100%; } }

/* Bot checks and email confirmation */
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.human-box { min-height: 65px; }
.td-verify { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: #fff7e0; color: #5c4712; font-size: 15px; }
.td-verify span { flex: 1; }
.td-verify-btn { flex: none; height: 38px; padding: 0 14px; border: 1px solid #e3c873; border-radius: 99px; background: #fff; color: #5c4712; font: inherit; font-size: 14px; cursor: pointer; }
.ed-invite.labeled { width: auto; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 99px; font: inherit; font-size: 14px; white-space: nowrap; }
@media (min-width: 1000px) { .hw-steps-mini { display: grid; grid-template-columns: repeat(4, auto); gap: 22px; justify-content: center; } }
.cs-tpl-cover .thumb.book-thumb { width: 100%; height: 120px; max-height: none; background: transparent; }

/* ---- Library: "Welcome to your library" and the floating shelf ---- */
.rs { margin: 8px 0 34px; }
.rs-title { margin: 0 0 22px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(36px, 4vw, 50px); font-weight: 400; line-height: 1.05; color: var(--ink); }
.rs-shelf { position: relative; padding: 0 18px; }
.rs-books { display: flex; align-items: flex-end; gap: 3px; min-height: 120px; padding: 0 10px; overflow: hidden; }
.rs-books .spine { flex: none; transition: transform .2s; }
.rs-books .spine:hover, .rs-books .spine:focus-visible { transform: translateY(-8px); }
.rs-plank { height: 9px; border-radius: 5px; background: linear-gradient(180deg, #a07a54 0%, #84603f 60%, #6d4e33 100%); box-shadow: 0 10px 18px -6px rgba(80,55,30,.45), 0 2px 0 rgba(255,255,255,.25) inset; }
.rs-empty { margin: 0 0 14px; font-family: var(--book); font-size: 19px; color: var(--ink-2); }

/* Marketplace: one small line instead of the big header */
.mk-mini { display: flex; align-items: center; gap: 10px; margin: 2px 0 18px; font-family: 'Inter', var(--sans); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mk-mini b { font-weight: 500; color: var(--ink); }
/* The rotating "Write your ___ story" banner, now on the welcome page */
.hw-banner { max-width: 1120px; margin: 54px auto 10px; }
.hw-banner h2 { margin: 8px 0 8px; font-size: clamp(32px, 3.4vw, 50px); line-height: 1.08; font-weight: 400; letter-spacing: -0.01em; color: var(--ink); }

/* Calendar: the whole month fits on one screen */
.cal-head { margin: 0 0 12px; }
.cal-title { font-size: 40px; }
.cal-sub { margin-top: 6px; }
.cal-grid { gap: 6px; }
.cal-cell { aspect-ratio: auto; height: clamp(58px, calc((100vh - var(--header) - 230px) / 6), 118px); border-radius: 12px; }
.cal-cell.photo .cal-num { top: 5px; left: 5px; padding: 3px 7px; font-size: 12.5px; }
.cal-num { top: 7px; left: 8px; font-size: 13.5px; }
.cal-words { font-size: 13.5px; -webkit-line-clamp: 2; bottom: 6px; left: 8px; right: 8px; }
.cal-more { right: 5px; bottom: 5px; padding: 2px 7px; font-size: 11.5px; }
.cal-mic { top: 5px; right: 5px; width: 22px; height: 22px; }

/* Marketplace: just "Latest publications" and the search */
.mk-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 6px 0 24px; }
.mk-big { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(38px, 4.2vw, 56px); font-weight: 400; line-height: 1.05; color: var(--ink); }
.mk-search { flex: 0 1 420px; }

/* Profile: one column, bio under the name, publications */
.pf-one { max-width: 1120px; }
.pf-bio { margin: 10px 0 0; max-width: 620px; font-size: 16px; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.pf-pubs .work-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.profile-head .row .btn { gap: 6px; }

/* Create tabs: Today · Calendar · Templates · Group books */
.ct-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 0 14px; }
.ct-tab { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 99px; color: var(--ink-2); font-family: 'Inter', var(--sans); font-size: 15px; text-decoration: none; border: 1px solid transparent; }
.ct-tab:hover { background: #f4f3f0; color: var(--ink); }
.ct-tab.on { background: var(--accent-soft, var(--brand-soft, #E3F6FD)); color: var(--accent, var(--ink)); font-weight: 500; }
.td-page .ct-tabs { padding-top: 14px; }
@media (max-width: 560px) { .ct-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 10px 16px; } .ct-tab { flex: none; height: 38px; padding: 0 13px; font-size: 14px; } }

/* Phones: four icons along the bottom instead of the top icons */
@media (max-width: 860px) {
  .mobile-nav { display: flex !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 12px; font-family: 'Inter', var(--sans); font-size: 12px; color: var(--ink-2); text-decoration: none; }
  .mobile-nav a svg.i { width: 26px; height: 26px; }
  .mobile-nav a.active { color: var(--accent, var(--brand-ink)); background: var(--accent-soft, var(--brand-soft)); }
  .top-nav { display: none !important; }
  .main { padding-bottom: 96px; }
  .app-foot { padding-bottom: 96px; }
}

/* Calendar: squares shaped like a phone screen, whole month still on screen */
.cal-page { --ch: clamp(96px, calc((100vh - var(--header) - 250px) / 6), 190px); --cw: calc(var(--ch) * 0.56); }
.cal-grid { grid-template-columns: repeat(7, var(--cw)); justify-content: center; gap: 8px; }
.cal-cell { height: var(--ch); width: var(--cw); border-radius: 14px; }
.cal-week { text-align: center; }
.cal-words { -webkit-line-clamp: 4; font-size: 12.5px; }
@media (max-width: 760px) { .cal-page { --cw: calc((100vw - 60px) / 7); --ch: calc(var(--cw) * 1.78); } .cal-grid { gap: 4px; } }
.cal-page { --ch: clamp(100px, calc((100vh - var(--header) - 205px) / 6), 200px); --cw: calc(var(--ch) * 0.6); }
.cal-grid { justify-content: start; }
@media (max-width: 760px) { .cal-page { --cw: calc((100vw - 60px) / 7); --ch: calc(var(--cw) * 1.7); } }
.ct-tabs { scrollbar-width: none; }
.ct-tabs::-webkit-scrollbar { display: none; }


/* ---- Coffee shop palette + easier reading (Nov 13) ----
   Milky Cream #FCFCFB · Latte #B8E8F8 · Cocoa #252525 · Soft Black #252525
   Butter #F2D77B · Pistachio #A8BD76 · Dusty Blue #B8E8F8
   Fonts load only in their heavier weights (see index.html), so all text is bolder. */
:root {
  --accent: #252525; --accent-soft: #E3F6FD; --accent-wash: #FCFCFB;
  --butter: #F2D77B; --butter-soft: #FBF1CC; --pistachio: #A8BD76; --pistachio-soft: #EEF8FD; --dusty: #B8E8F8; --dusty-soft: #E7F0F4; --latte: #B8E8F8; --cocoa: #252525;
}
body { background: var(--bg); color: var(--ink); font-size: 15px; }
.app-header, .sidebar { background: #FCFCFB; }
.card, .td-add, .td-card, .td-entry, .cs-tpl, .tp-idea, .gb-mode, .gb-row, .hw-steps li, .vn-choice, .dash-card { border-color: #E5E5E2; }
/* Stronger, readable small text */
.muted, .small.muted, .tiny.muted, .hint { color: var(--muted) !important; }
.lx-kicker, .cs-kicker, .hw-hello, .td-kicker, .eyebrow, .kicker { letter-spacing: .16em; }
/* Buttons that pop */
.btn.primary, .side-new, .td-save, .cs-scratch-icon, .gb-make, .hw-btn.primary, .cal-make, .gb-btn:not(.ghost), .gb-mode-go, .tp-chip.on, .hw-mini-num, .hw .hw-step-num { background: var(--accent); color: #fff; border-color: transparent; }
.btn.primary:hover, .side-new:hover, .td-save:hover:not(:disabled), .cal-make:hover, .gb-make:hover:not(:disabled) { background: #111111; }
.btn { font-weight: 600; }
.nav-item.active, .top-nav-item.active, .ct-tab.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.nav-item, .ct-tab, .top-nav-item { color: var(--ink-2); }
/* Friendly accents */
.vn-big { background: linear-gradient(180deg, #94E3FB, #94E3FB); }
.td-verify { background: var(--butter-soft); color: #5a4512; }
.pf-sold, .tpl2-flag, .stp-fmt-flag { background: var(--butter); color: #4a3a0c; }
.cal-tag, .td-cat { background: var(--pistachio-soft); color: #14597A !important; }
.cal-cell.words { background: var(--dusty-soft); }
.rs-plank { background: linear-gradient(180deg, #3a3a3a 0%, #252525 60%, #111111 100%); }
@media (max-width: 860px) {
  .hw-inner { width: 100%; min-width: 0; }
  .hw-products-in { width: 100%; overflow: hidden; }
  .hw-products-in .log-start-head { flex-direction: column; align-items: center; gap: 2px; text-align: center; }
  .hw-products-in .log-start-head h2 { font-size: 28px; }
  .hw-products-in .log-products { margin: 0; padding: 4px 4px 14px; }
  .hw-products-in .log-product { flex: 0 0 46%; }
}


/* ---- Modern, tech look (Nov 13): white, soft black, bold sans-serif headings ----
   Books themselves (covers, spines, pages, the writing area) keep their serif. */
:root { --display: 'Nunito Sans', 'Avenir Next', 'Helvetica Neue', sans-serif; --accent-wash: #FCFCFB; }
.welcome-page, .welcome-hero, .stp, .modal.stp-modal, .dg-band, .dg-page, .home-page, .log-page, .dash-page, .td-page {
  --wl-display: var(--display); --dg-display: var(--display); --lx-display: var(--display); --hj-display: var(--display); --td-display: var(--display);
}
.rs-title, .cal-title, .tp-title, .tp-h2, .gb-title, .gb-prompt, .mk-big, .cs-title, .hw-tagline, .hw-title, .hw-how h2, .log-start-head h2,
.td-title, .td-recent-head h2, .td-card h2, .lx-title, .hj-mast h2, .hj-lead-text h3, .hj-section-head h3, .hj-story h4, .hj-card h4, .hj-modal-title,
.stp-m-title, .stp-name, .page-head h1, .panel-title, .dash-head h1, .lib-sec-head h2, .lib-hero h1, .wl-title, .wl-kicker, .cal-make-sum b,
.vn-time, .hw-banner h2, .serif, h1, h2 {
  font-family: var(--display) !important; font-weight: 800; letter-spacing: -0.02em;
}
.rs-title, .cal-title, .tp-title, .gb-title, .mk-big, .cs-title, .td-title, .hw-title, .lx-title { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.08; }
.tp-h2, .log-start-head h2, .td-recent-head h2, .td-card h2, .lib-sec-head h2, .panel-title { font-size: 24px !important; font-weight: 800; }
.hw-tagline { font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -0.01em; }
.hw-tagline b { font-style: normal; font-weight: 900; }
.gb-prompt { font-weight: 700; }
/* Keep book typography */
.bookcover, .bookcover *, .spine-title, .pv-page, .pv-page *, .wr-hint, .wr-ch-num, .pb-pg-num, .rte, .td-text, .td-entry-text, .cal-entry-text, .cal-words, .vn-words, .vn-text, .gb-text, .leaf, .leaf * { letter-spacing: normal; }
/* Labels: clean and bold, less spaced */
.lx-kicker, .cs-kicker, .hw-hello, .td-kicker, .eyebrow, .kicker, .tp-tpl-kind, .gb-row-meta { letter-spacing: .1em; font-weight: 700; }
/* Crisp surfaces */
body, .app-header, .sidebar { background: #FCFCFB; }
.app-header { border-bottom-color: #ECECE8; }
.card, .td-add, .td-card, .td-entry, .cs-tpl, .tp-idea, .gb-mode, .gb-row, .hw-steps li, .vn-choice, .dash-card, .cs-scratch { border-radius: 16px; }
.cs-scratch { border: 2px solid #252525; }
/* Highlights use dusty blue; buttons soft black */
.nav-item.active, .top-nav-item.active, .ct-tab.on, .mobile-nav a.active { background: #E3F6FD !important; color: #252525 !important; }
.btn.primary, .side-new, .td-save, .cal-make, .gb-make, .hw-btn.primary, .gb-btn:not(.ghost), .gb-mode-go, .tp-chip.on, .hw-mini-num, .cs-scratch-icon { background: #252525; }
.btn.primary:hover, .side-new:hover, .cal-make:hover, .gb-make:hover:not(:disabled), .td-save:hover:not(:disabled) { background: #000; }
/* Shelf: a sleek dark line */
.rs-plank { height: 6px; background: #252525; box-shadow: 0 8px 16px -6px rgba(0,0,0,.35); }
.rs-empty { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--muted); }


/* ---- Match the logo (Nov 13): sky blue #B8E8F8, white, rounded bold letters ---- */
:root { --display: 'Nunito', 'Nunito Sans', 'Avenir Next', sans-serif; --sky: #B8E8F8; --sky-soft: #E3F6FD; --sky-ink: #0F5F7A;
  --brand: #B8E8F8; --brand-soft: #E3F6FD; --brand-ink: #0F5F7A; --accent-soft: #E3F6FD; }
.wordmark { font-family: 'Nunito', 'Nunito Sans', sans-serif; font-weight: 800; letter-spacing: .02em; }
/* Selected items and soft highlights in the logo's sky blue */
.nav-item.active, .top-nav-item.active, .ct-tab.on, .mobile-nav a.active { background: #E3F6FD !important; color: #252525 !important; }
.nav-item.active svg, .ct-tab.on svg, .mobile-nav a.active svg { color: #0F5F7A; }
.tp-idea-icon, .gb-mode-icon, .hw-step-icon, .stp-m-icon, .cs-all svg.i, .vn-choice.on .vn-choice-icon { background: #E3F6FD !important; color: #0F5F7A !important; }
.cal-cell.today { border-color: #4FB8DC; }
.cal-cell.words { background: #E3F6FD; }
.vn-choice.on { border-color: #4FB8DC; background: #F2FBFE; }
.vn-choice.on .vn-radio { background: #252525; border-color: #252525; }
.vn-go { background: #252525; } .vn-go:hover:not(:disabled) { background: #000; }
.ct-tab:hover, .nav-item:hover { background: #F2FBFE; }
/* The big Record button looks like the logo: sky blue, white circle, bold dark letters */
.vn-big { background: linear-gradient(180deg, #C9EEFA, #A6DEF2); color: #252525; box-shadow: 0 2px 0 rgba(0,0,0,.04), 0 16px 34px rgba(79,184,220,.35); }
.vn-big-icon { background: #fff; color: #0F5F7A; }
.vn-big-text b { font-family: var(--display); font-weight: 900; }
.vn-big-text small { color: #2c3e45; opacity: 1; font-weight: 600; }
.vn-big:focus-visible { outline-color: #4FB8DC; }
.vn-orb { background: #E3F6FD; color: #0F5F7A; }
/* Links */
a.link, .link { color: #0F5F7A; }

/* ---- Splashes of color (Nov 13): pastel aqua→pink washes, coral pill buttons ----
   Inspired by modern bookshop sites. Sky blue comes from the logo; coral is the pop. */
:root {
  --coral: #EF5B6A; --coral-dark: #D9424F; --coral-soft: #FDE7EA;
  --wash: linear-gradient(115deg, #D6F2FB 0%, #EAF0FB 45%, #FBE2EC 100%);
  --accent: #EF5B6A; --accent-soft: #E3F6FD;
}
/* Coral pill buttons */
.btn.primary, .side-new, .td-save, .cal-make, .gb-make, .hw-btn.primary, .gb-btn:not(.ghost), .gb-mode-go, .vn-go, .hw-start {
  background: var(--coral) !important; color: #fff !important; border-color: transparent !important; border-radius: 999px !important;
  box-shadow: 0 8px 18px rgba(239,91,106,.28);
}
.btn.primary:hover, .side-new:hover, .td-save:hover:not(:disabled), .cal-make:hover, .gb-make:hover:not(:disabled), .vn-go:hover:not(:disabled), .hw-btn.primary:hover { background: var(--coral-dark) !important; }
.td-save:disabled, .gb-make:disabled, .vn-go:disabled { box-shadow: none; }
.cs-scratch-icon, .hw-mini-num, .hw .hw-step-num { background: var(--coral) !important; color: #fff; }
.tp-chip.on { background: var(--coral) !important; color: #fff; }
.cs-scratch { border-color: var(--coral); }
.cs-scratch:hover:not(:disabled) { background: #FFF6F7; }
/* Small coral touches */
.log-start-head h2 svg, .stp-fmt-flag, .tpl2-flag { color: var(--coral); }
.pf-sold, .stp-fmt-flag, .tpl2-flag { background: var(--coral) !important; color: #fff !important; }
.log-product:hover .log-product-go, .log-product:focus-visible .log-product-go { background: var(--coral) !important; color: #fff !important; }
.cal-cell.today { border-color: var(--coral); }
a.link, .link { color: #C23A49; }
/* Pastel washes behind page headers */
.rs, .mk-top, .tp-head, .gb-head, .cs-head, .cal-head, .dash-head {
  background: var(--wash); border-radius: 24px; padding: 28px 30px;
}
.rs { padding-bottom: 22px; }
.mk-top { padding: 30px; }
.cs-head { padding: 22px 26px; }
.cal-head { padding: 20px 24px; align-items: center; }
.gb-land { background: var(--wash); border-radius: 24px; padding: 32px 24px 28px; }
.hw-banner { background: var(--wash) !important; border: 0 !important; }
.hw-products-in { background: rgba(255,255,255,.9); }
@media (max-width: 560px) { .rs, .mk-top, .tp-head, .gb-head, .cs-head, .cal-head { padding: 20px 18px; border-radius: 18px; } }
.log-product-go { white-space: nowrap; }
@media (max-width: 560px) { .log-product-go { padding: 0 10px; font-size: 12px; gap: 3px; } }

/* "Add Storybank to your home screen" (phones) */
.ia-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--wash, #E3F6FD); }
.ia-icon { width: 44px; height: 44px; border-radius: 11px; flex: none; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.ia-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ia-text b { font-size: 15.5px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.ia-text small { font-size: 13px; color: var(--ink-2); }
.ia-go { flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 99px; background: var(--coral, #EF5B6A); color: #fff; font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.ia-x { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.7); color: var(--ink-2); cursor: pointer; }
.ia-lead { margin: 0 0 16px; font-size: 18px; line-height: 1.5; color: var(--ink); }
.ia-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ia-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.5; color: var(--ink); }
.ia-num { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--coral, #EF5B6A); color: #fff; font-weight: 800; }
.ia-share { display: inline-grid; place-items: center; vertical-align: middle; width: 30px; height: 30px; border-radius: 8px; background: #E3F6FD; color: #0F5F7A; margin: 0 2px; }
.ia-small { margin: 16px 0 0; font-size: 14.5px; color: var(--muted); }

/* ==== New look (Nov 14): bubbles and circles, no background photos ====
   Color and photography come from the book covers. Books float on white. */
:root { --r-bubble: 28px; }
/* No background photos */
.hw-bg { background: var(--wash) !important; animation: none !important; transform: none !important; }
.hw-wash { display: none; }
.td-hero { background: var(--wash) !important; height: auto; min-height: 210px; border-radius: 0 0 36px 36px; }
.td-hero:not(.th-words-light)::before { display: none; }
.td-hero:not(.th-words-light) .td-title { color: var(--ink); text-shadow: none; }
.td-hero:not(.th-words-light) .td-kicker { color: #C23A49; }
.td-hero:not(.th-words-light) .td-sub { color: var(--ink-2); }
.auth-books { background: var(--wash) !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; }
.auth-shelf { display: flex; align-items: flex-end; gap: 18px; padding: 0 30px; }
.auth-shelf img { width: 28%; max-width: 170px; filter: drop-shadow(0 18px 22px rgba(40,30,60,.18)); }
.auth-shelf img:nth-child(2) { width: 36%; max-width: 220px; }
.auth-books .quote { position: static; color: var(--ink); text-shadow: none; font-family: var(--display); font-weight: 800; font-size: 26px; text-align: center; padding: 0 30px; }
/* Bubbles everywhere: round, soft, few hard lines */
.card, .td-add, .td-card, .td-entry, .tp-idea, .gb-mode, .gb-row, .vn-choice, .dash-card, .cs-scratch, .hw-products-in, .gb-answer, .cal-cell, .lib-row, .mk-card, .work-card {
  border-radius: var(--r-bubble) !important;
}
.card, .td-add, .td-card, .td-entry, .gb-mode, .gb-row, .gb-answer, .work-card { border: 0 !important; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 14px 36px rgba(20,30,50,.07) !important; }
.btn, .td-pick, .td-camera, .pf-search, .cal-arrow, .cal-now, .ct-tab, .tp-chip, .gb-btn, .log-product-go, .vn-alt, .ia-go { border-radius: 999px !important; }
.td-photo, .td-photo.add { border-radius: 50% !important; }
.td-text, .vn-text, .gb-text, .gb-field input, .gb-field textarea { border-radius: 22px !important; }
.cal-cell { border-radius: 18px !important; }
.avatar, .big-avatar, .avatar-btn img { border-radius: 50% !important; }
/* Books float on white: no tiles behind covers */
.thumb.book-thumb { background: transparent !important; box-shadow: none; }
.log-product:hover, .log-product:focus-visible { background: transparent; }

/* The bookstore (welcome page, Market › Public) */
.bs-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 30px 22px; }
.bs-card { display: flex; flex-direction: column; gap: 6px; cursor: pointer; outline: none; }
.bs-cover { aspect-ratio: 4 / 5; display: grid; place-items: center; border-radius: 22px; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.bs-cover.skeleton { background: #F2F2EF; }
.bs-cover .thumb { width: 82%; height: auto; aspect-ratio: auto; background: transparent; filter: drop-shadow(0 14px 18px rgba(30,30,50,.18)); }
.bs-card:hover .bs-cover, .bs-card:focus-visible .bs-cover { transform: translateY(-6px); }
.bs-title { margin: 6px 0 0; font-family: var(--display); font-size: 16.5px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.bs-line { margin: 0; font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.bs-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.bs-price { padding: 5px 12px; border-radius: 99px; background: #F2F2EF; font-size: 14px; font-weight: 800; color: var(--ink); }
.bs-price.owned { background: #E3F6FD; color: #0F5F7A; }
.bs-cart { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid #E5E5E2; color: var(--ink); }
.bs-card:hover .bs-cart { background: var(--coral); border-color: transparent; color: #fff; }
.bs-more, .bs-empty { text-align: center; color: var(--muted); font-size: 15px; padding: 18px 0; }
@media (max-width: 1100px) { .bs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) { .bs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px; } }
@media (max-width: 520px) { .bs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Welcome page store section */
.hw-store { max-width: 1180px; margin: 50px auto 40px; padding: 0 20px; }
.hw-store-title { margin: 0; text-align: center; font-size: clamp(28px, 3vw, 40px); }
.hw-store-sub { margin: 8px 0 30px; text-align: center; font-size: 17px; color: var(--ink-2); }
.bs-cover .thumb.book-thumb { width: 100%; height: 100%; aspect-ratio: auto; background: transparent !important; box-shadow: none; border-radius: 0; place-items: center; overflow: visible; filter: none; }
.bs-cover .bookcover { filter: drop-shadow(0 16px 20px rgba(30,30,50,.2)); }
.pub-consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 20px; background: #FFF4F5; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.pub-consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--coral); }

/* ---- Market: Friends (one big post at a time) and Public (bookstore) ---- */
.mk2-page { max-width: 1180px; }
.mk2-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 26px; }
.mk2-switch { display: inline-flex; padding: 5px; border-radius: 999px; background: #F1F1EE; }
.mk2-switch button { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 15.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.mk2-switch button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(20,30,50,.1); }
.mk2-search { flex: 1 1 260px; max-width: 460px; }
.mk2-search .search, .mk2-search input { border-radius: 999px !important; }
.mk2-find { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 18px; border: 1.5px solid #E5E5E2; border-radius: 999px; background: #fff; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; margin-left: auto; }
.fp-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
.fp-post { background: #fff; border-radius: 32px; padding: 18px; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 18px 44px rgba(20,30,50,.08); }
.fp-head { display: flex; align-items: center; padding: 2px 4px 14px; }
.fp-who { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font: inherit; }
.fp-who b { display: block; font-family: var(--display); font-size: 17px; font-weight: 800; color: var(--ink); }
.fp-who small { display: block; font-size: 13.5px; color: var(--muted); }
.fp-stage { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 0.92; border: 0; border-radius: 26px; background: var(--wash); cursor: pointer; overflow: hidden; }
.fp-book { width: 58%; height: 82%; display: grid; place-items: center; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.fp-stage:hover .fp-book { transform: translateY(-6px) rotate(-1deg); }
.fp-book .thumb.book-thumb { width: 100%; height: 100%; background: transparent !important; box-shadow: none; overflow: visible; place-items: center; }
.fp-book .bookcover { filter: drop-shadow(0 22px 26px rgba(30,30,60,.25)); }
.fp-body { padding: 16px 6px 2px; }
.fp-title { margin: 0; font-size: 24px; line-height: 1.15; }
.fp-desc { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.fp-btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.fp-preview, .fp-buy { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.fp-preview { border: 0; background: var(--coral); color: #fff; box-shadow: 0 8px 18px rgba(239,91,106,.28); }
.fp-buy { border: 1.5px solid #E5E5E2; background: #fff; color: var(--ink); }
.fp-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #F0F0EC; }
.fp-act { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; padding: 6px; border-radius: 99px; }
.fp-all { border: 0; background: none; padding: 8px 0 0; font: inherit; font-size: 14.5px; color: var(--muted); cursor: pointer; }
.fp-empty { max-width: 560px; margin: 30px auto; text-align: center; padding: 40px 28px; border-radius: 32px; background: var(--wash); }
.fp-empty-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #0F5F7A; }
.fp-empty h2 { margin: 16px 0 8px; font-size: 24px; }
.fp-empty p { margin: 0 0 20px; font-size: 16px; color: var(--ink-2); }
.fp-empty-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 560px) { .fp-post { padding: 12px; border-radius: 26px; } .mk2-find { margin-left: 0; } .fp-preview, .fp-buy { flex: 1; justify-content: center; padding: 0 14px; } }

/* ---- Author profile ---- */
.au-page { max-width: 1180px; }
.au-head { display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; padding: 30px 34px; border-radius: 36px; background: var(--wash); margin: 4px 0 34px; }
.au-photo { width: 168px; height: 168px; border-radius: 50%; overflow: hidden; border: 6px solid #fff; box-shadow: 0 14px 30px rgba(30,40,70,.14); background: #E3F6FD; display: grid; place-items: center; }
.au-photo img { width: 100%; height: 100%; object-fit: cover; }
.au-photo span, .db-photo span { font-family: var(--display); font-size: 60px; font-weight: 900; color: #0F5F7A; }
.au-name { margin: 0; font-size: clamp(32px, 3.4vw, 44px) !important; }
.au-handle { margin: 2px 0 0; font-size: 15px; color: var(--muted); font-weight: 600; }
.au-bio { margin: 12px 0 0; max-width: 560px; font-size: 16.5px; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.au-stats { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.au-stats span { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.8); font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.au-stats b { font-family: var(--display); font-size: 17px; font-weight: 900; color: var(--ink); }
.au-btns { display: flex; flex-direction: column; gap: 10px; align-self: start; }
.au-books-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.au-books-title { margin: 0; font-size: 28px !important; }
.au-books-top .pf-search { margin-left: auto; }
.au-sort { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 14px; border: 1.5px solid #E5E5E2; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.au-sort select { border: 0; background: none; font: inherit; font-weight: 800; color: var(--ink); padding: 0 6px; cursor: pointer; }
@media (max-width: 860px) { .au-head { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 26px 20px; } .au-photo { width: 132px; height: 132px; } .au-stats { justify-content: center; } .au-btns { flex-direction: row; align-self: center; } .au-books-top .pf-search { margin-left: 0; flex: 1; } }

/* ---- Private Dashboard ---- */
.db-page { max-width: 1180px; }
.db-head { display: flex; align-items: center; gap: 24px; padding: 24px 28px; border-radius: 36px; background: var(--wash); }
.db-photo { position: relative; flex: none; width: 112px; height: 112px; border-radius: 50%; overflow: visible; border: 0; padding: 0; background: #E3F6FD; cursor: pointer; display: grid; place-items: center; }
.db-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 5px solid #fff; }
.db-photo i { position: absolute; right: -2px; bottom: 2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.db-who { flex: 1; min-width: 0; }
.db-who h1 { margin: 0; font-size: 32px !important; }
.db-bio { width: 100%; max-width: 620px; margin: 8px 0 6px; padding: 10px 14px; border: 1.5px solid transparent; border-radius: 18px; background: rgba(255,255,255,.75); font: inherit; font-size: 15.5px; line-height: 1.5; color: var(--ink); resize: vertical; }
.db-bio:focus { outline: none; border-color: #4FB8DC; background: #fff; }
.db-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 20px 0 26px; }
.db-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 10px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 12px 28px rgba(20,30,50,.06); }
.db-stat b { font-family: var(--display); font-size: 26px; font-weight: 900; color: var(--ink); }
.db-stat span { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.db-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 26px; align-items: start; }
.db-books-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.db-books-top h2, .db-friends h2 { margin: 0; font-size: 24px !important; }
.db-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 18px 12px 12px; margin-bottom: 10px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 10px 24px rgba(20,30,50,.05); }
.db-cover { width: 56px; height: 56px; display: grid; place-items: center; }
.db-cover .thumb.book-thumb { width: 100%; height: 100%; background: transparent !important; box-shadow: none; overflow: visible; }
.db-row-main b { display: block; font-size: 16px; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-row-main small { font-size: 13px; color: var(--muted); }
.db-vis { display: inline-flex; padding: 4px; border-radius: 999px; background: #F1F1EE; }
.db-vis button { height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.db-vis button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.db-price { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--ink); }
.db-price input { width: 72px; height: 38px; padding: 0 10px; border: 1.5px solid #E5E5E2; border-radius: 999px; font: inherit; font-weight: 700; text-align: center; }
.db-price small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.db-friends { padding: 22px; border-radius: 32px; background: #fff; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 12px 28px rgba(20,30,50,.06); }
.db-friend-bubbles { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.db-friend { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
@media (max-width: 960px) { .db-grid { grid-template-columns: 1fr; } .db-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .db-row { grid-template-columns: 48px minmax(0, 1fr); border-radius: 26px; } .db-vis, .db-price { grid-column: 2; } }

/* ---- Profile photo picker ---- */
.ap-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ap-rules { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 22px; background: #F2FBFE; }
.ap-rules p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.ap-rule-icon { flex: none; }
.ap-circle { position: relative; border-radius: 50%; overflow: hidden; background: #F2F2EF; cursor: grab; touch-action: none; box-shadow: 0 0 0 6px #fff, 0 0 0 8px #B8E8F8; }
.ap-circle img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; pointer-events: none; }
.ap-zoom { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.ap-zoom input { width: 200px; accent-color: var(--coral); }
.ap-hint { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.ap-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 14px; border-radius: 16px; background: #FFF4F5; color: #9A2B38; font-size: 14px; }
.ap-ok { display: flex; gap: 10px; align-items: center; font-size: 15.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.ap-ok input { width: 20px; height: 20px; accent-color: var(--coral); }
.ap-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ap-pick { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 26px; border: 2px dashed #C9C9C3; border-radius: 999px; background: #fff; font: inherit; font-size: 17px; font-weight: 800; color: var(--ink); cursor: pointer; }

/* ==== Business theme (Nov 14): no pink, no blue ====
   White and charcoal, one deep green accent, light gray surfaces. */
:root {
  --coral: #1A6E96; --coral-dark: #14597A; --coral-soft: #E3F6FD;
  --wash: #F4F4F1; --sky: #E3F6FD; --sky-soft: #E9F6FC; --sky-ink: #1A6E96;
  --accent: #1A6E96; --accent-soft: #E9F6FC; --brand: #E3F6FD; --brand-soft: #E9F6FC; --brand-ink: #1A6E96;
}
.btn.primary, .side-new, .td-save, .cal-make, .gb-make, .hw-btn.primary, .gb-btn:not(.ghost), .gb-mode-go, .vn-go, .hw-start, .fp-preview, .ia-go {
  background: #94E3FB !important; box-shadow: 0 6px 14px rgba(60,170,210,.22) !important;
}
.btn.primary:hover, .side-new:hover, .fp-preview:hover, .hw-btn.primary:hover { background: #7FD9F6 !important; }
.nav-item.active, .top-nav-item.active, .ct-tab.on, .mobile-nav a.active { background: #E9F6FC !important; color: #1F2328 !important; }
.nav-item.active svg, .ct-tab.on svg, .mobile-nav a.active svg { color: #1A6E96; }
.tp-idea-icon, .gb-mode-icon, .hw-step-icon, .stp-m-icon, .cs-all svg.i, .vn-choice.on .vn-choice-icon, .fp-empty-icon { background: #E9F6FC !important; color: #1A6E96 !important; }
a.link, .link { color: #1A6E96; }
.td-hero:not(.th-words-light) .td-kicker { color: #1A6E96; }
.cal-cell.today { border-color: #1A6E96; }
.cal-cell.words { background: #EEF8FD; }
.vn-big { background: #94E3FB !important; color: #0B3A52 !important; box-shadow: 0 10px 24px rgba(60,170,210,.22) !important; }
.vn-big-text small { color: rgba(255,255,255,.9) !important; }
.vn-big-icon { color: #1A6E96 !important; }
.vn-orb { background: #E9F6FC; color: #1A6E96; }
.vn-choice.on { border-color: #1A6E96; background: #F2FBFE; }
.pf-sold, .stp-fmt-flag, .tpl2-flag { background: #1F2328 !important; color: #fff !important; }
.bs-card:hover .bs-cart, .log-product:hover .log-product-go { background: #94E3FB !important; color: #0B3A52 !important; }
.bs-price.owned { background: #E9F6FC; color: #1A6E96; }
.pub-consent { background: #F4F4F1; }
.ap-rules { background: #F4F4F1; }
.ap-circle { box-shadow: 0 0 0 6px #fff, 0 0 0 8px #D9DED6; }
.ap-warn { background: #FFF6E0; color: #7A5410; }
.td-verify { background: #FFF6E0; color: #5a4512; }
.cs-scratch { border-color: #1F2328; }
.cs-scratch:hover:not(:disabled) { background: #F7F7F5; }
.cs-scratch-icon, .hw-mini-num, .hw .hw-step-num, .ia-num, .tp-chip.on { background: #1F2328 !important; }
.mk2-switch button.on { color: #1F2328; }
.ia-share { background: #E9F6FC; color: #1A6E96; }
.db-photo i { background: #1F2328; }
.ap-zoom input, .ap-ok input, .pub-consent input { accent-color: #1A6E96; }
.rs-plank { background: #1F2328; }

/* ---- Create: weekly day spots, daily logger, Start new project ---- */
.cr-page { max-width: 1120px; }
.wk { padding: 20px 22px 16px; border-radius: 32px; background: #F4F4F1; margin-top: 8px; }
.wk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.wk-kicker { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #1A6E96; }
.wk-title { margin: 2px 0 0; font-size: 22px !important; }
.wk-nav { display: flex; align-items: center; gap: 8px; }
.wk-arrow { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.wk-month, .wk-make { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: #fff; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ink); text-decoration: none; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.wk-make.on { background: #1F2328; color: #fff; }
.wk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.wk-day { position: relative; aspect-ratio: 9 / 16; max-height: 190px; border: 0; border-radius: 22px; background: #fff center / cover no-repeat; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 10px 6px; box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .15s; font: inherit; color: var(--ink); }
.wk-day:hover:not(:disabled) { transform: translateY(-3px); }
.wk-day.today { box-shadow: 0 0 0 3px #1A6E96; }
.wk-day.future { background: transparent; box-shadow: inset 0 0 0 1.5px #E2E2DD; cursor: default; color: #A8ADA6; }
.wk-day.photo { color: #fff; }
.wk-day.photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0) 40%); }
.wk-dow, .wk-num { position: relative; z-index: 1; line-height: 1.1; }
.wk-dow { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.wk-num { font-family: var(--display); font-size: 22px; font-weight: 900; }
.wk-words { position: absolute; left: 8px; right: 8px; bottom: 10px; font-family: var(--book); font-size: 12.5px; line-height: 1.3; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-align: left; }
.wk-add { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #F1F1EE; color: var(--ink-2); }
.wk-video { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); z-index: 1; }
.wk-check { position: absolute; top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); color: #fff; }
.wk-day.chosen .wk-check { background: #94E3FB; }
.wk-day.chosen { box-shadow: 0 0 0 3px #1A6E96; }
.wk-prompt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 2px 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.wk-prompt svg { color: #1A6E96; }
.wk-pickbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 10px 10px 10px 18px; border-radius: 999px; background: #fff; font-size: 15px; font-weight: 700; }
.cr-start { text-align: center; margin: 40px 0 34px; }
.cr-hello { margin: 0 0 18px; font-size: clamp(28px, 3vw, 38px) !important; }
.cr-new { display: inline-flex; align-items: center; gap: 14px; height: 72px; padding: 0 34px 0 14px; border: 0; border-radius: 999px; background: #1F2328; color: #fff; font: inherit; font-family: var(--display); font-size: 22px; font-weight: 800; cursor: pointer; box-shadow: 0 14px 30px rgba(20,25,30,.22); transition: transform .15s; }
.cr-new:hover { transform: translateY(-2px); }
.cr-new-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #94E3FB; }
.cr-keep-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.cr-keep-head h2 { margin: 0; font-size: 22px !important; }
.cr-keep-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cr-book { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--ink); text-align: center; }
.cr-book-cover { width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #F4F4F1; }
.cr-book-cover .thumb.book-thumb { width: 64%; height: 64%; background: transparent !important; box-shadow: none; overflow: visible; }
.cr-book b { font-size: 14px; font-weight: 800; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cr-book-bar { width: 70%; height: 5px; border-radius: 99px; background: #E6E6E1; overflow: hidden; }
.cr-book-bar i { display: block; height: 100%; background: #94E3FB; }
/* Daily logger */
.dl-prompt { display: flex; gap: 8px; align-items: center; margin: 0 0 16px; padding: 12px 16px; border-radius: 999px; background: #F4F4F1; font-size: 16px; font-weight: 700; color: var(--ink); }
.dl-prompt svg { color: #1A6E96; }
.dl-media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.dl-slot { position: relative; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; background: #F4F4F1; }
.dl-slot img, .dl-slot video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.dl-add { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed #D4D4CF; border-radius: 24px; background: transparent; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.dl-add svg.i { width: 30px; height: 30px; }
.dl-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(20,20,20,.7); color: #fff; cursor: pointer; }
.dl-text { width: 100%; padding: 14px 18px; border: 1.5px solid #E2E2DD; border-radius: 24px; font-family: var(--book); font-size: 19px; line-height: 1.5; color: var(--ink); resize: vertical; }
.dl-text:focus { outline: none; border-color: #1A6E96; }
.dl-foot { display: flex; justify-content: space-between; margin: 6px 4px 14px; font-size: 13px; color: var(--muted); }
/* Start new project */
.sf-modal { width: min(1100px, 100%); }
.sf-title { margin: 4px 0 18px; text-align: center; font-size: 28px !important; }
.sf-products { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.sf-product { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 0; border-radius: 26px; background: transparent; cursor: pointer; font: inherit; color: var(--ink); transition: background .15s; }
.sf-product:hover { background: #F7F7F5; }
.sf-product.on { background: #F4F4F1; box-shadow: inset 0 0 0 2px #1F2328; }
.sf-art { width: 100%; height: 110px; display: grid; place-items: center; }
.sf-art img { max-width: 86%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(30,30,40,.16)); }
.sf-name { font-size: 13.5px; font-weight: 800; text-align: center; line-height: 1.2; }
.sf-size { font-size: 12px; color: var(--muted); }
.sf-pick { text-align: center; color: var(--muted); margin: 26px 0 8px; font-size: 16px; }
.sf-choice { display: flex; flex-direction: column; align-items: center; margin-top: 22px; }
.sf-scratch { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(440px, 100%); padding: 30px 24px; border: 0; border-radius: 40px; background: #1F2328; color: #fff; cursor: pointer; font: inherit; box-shadow: 0 16px 34px rgba(20,25,30,.22); transition: transform .15s; }
.sf-scratch:hover:not(:disabled) { transform: translateY(-2px); }
.sf-scratch-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: #94E3FB; }
.sf-scratch-icon svg.i { width: 28px; height: 28px; }
.sf-scratch b { font-family: var(--display); font-size: 28px; font-weight: 900; }
.sf-scratch small { font-size: 15px; opacity: .85; }
.sf-see { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; height: 44px; padding: 0 20px; border: 1.5px solid #E2E2DD; border-radius: 999px; background: #fff; font: inherit; font-size: 15.5px; font-weight: 800; color: var(--ink); cursor: pointer; }
.sf-bubbles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 16px; width: 100%; margin-top: 22px; }
.sf-bubble { display: flex; flex-direction: column; align-items: center; gap: 10px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--ink); text-align: center; }
.sf-bubble-circle { width: 100%; aspect-ratio: 1; max-width: 170px; display: grid; place-items: center; padding: 18px; border-radius: 50%; background: #F4F4F1; transition: background .15s, transform .15s; }
.sf-bubble:hover .sf-bubble-circle { background: #E3F6FD; transform: translateY(-3px); }
.sf-bubble-circle b { font-family: var(--display); font-size: 17px; font-weight: 900; line-height: 1.2; }
.sf-bubble small { font-size: 13px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) {
  .wk { padding: 16px 12px 12px; border-radius: 26px; }
  .wk-days { gap: 5px; }
  .wk-day { border-radius: 14px; padding: 6px 2px; }
  .wk-num { font-size: 17px; } .wk-dow { font-size: 10px; } .wk-words { display: none; } .wk-add { width: 26px; height: 26px; bottom: 8px; }
  .cr-keep-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sf-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sf-bubbles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-media { grid-template-columns: 1fr; }
}

/* ---- Book editor: cover panel, Record buttons; extra-easy ---- */
.wr-cover.on { box-shadow: 0 0 0 3px #1A6E96; border-radius: 12px; }
.cp { padding: 18px; border-radius: 32px; background: #fff; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 14px 36px rgba(20,30,50,.07); }
.cp-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.cp-tabs button[role=tab] { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: #F1F1EE; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.cp-tabs button[role=tab].on { background: #1F2328; color: #fff; }
.cp-done { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 1.5px solid #E2E2DD; border-radius: 999px; background: #fff; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.cp-stage { display: grid; place-items: center; padding: 26px; border-radius: 26px; background: #F4F4F1; }
.cp-leaf { width: min(340px, 80%); }
.cp-leaf .closed-book { width: 100%; }
.cp-controls { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.cp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cp-sliders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; padding: 14px 16px; border-radius: 22px; background: #F7F7F5; }
.cp-sliders label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.cp-sliders input { width: 100%; accent-color: #1A6E96; }
@media (max-width: 760px) { .cp-sliders { grid-template-columns: 1fr; } }
.dc-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border: 0; border-radius: 999px; background: #E3F6FD; color: #1A6E96; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.dc-mic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #94E3FB; color: #0B3A52; }
.dc-btn:hover { background: #D7EFF9; }
.dc-btn.big { height: 62px; padding: 0 22px 0 8px; gap: 12px; background: #94E3FB; color: #0B3A52; text-align: left; box-shadow: 0 10px 22px rgba(60,170,210,.22); }
.dc-btn.big .dc-mic { width: 46px; height: 46px; background: #fff; color: #1A6E96; }
.dc-btn.big b { display: block; font-size: 17px; font-weight: 900; }
.dc-btn.big small { display: block; font-size: 13px; font-weight: 600; opacity: .9; }
.wr-dictate { margin-top: 12px; }
.pb-dictate { display: block; margin: 8px 0 4px; }
.senior-pick { padding: 12px 14px; border-radius: 18px; background: #EEF8FD; }
.sr-shout { max-width: 960px; margin: 10px auto 30px; display: flex; gap: 18px; align-items: center; padding: 22px 26px; border-radius: 32px; background: #EEF8FD; }
.sr-mic { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #94E3FB; color: #0B3A52; }
.sr-shout b { font-family: var(--display); font-size: 22px; font-weight: 900; color: var(--ink); }
.sr-shout p { margin: 4px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }

/* ---- Library v3: tabs, In progress, To do; Groups ---- */
.lib2-tabs { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 22px; }
.lib2-tabs .lib-tab-search { flex: 1 1 260px; max-width: 420px; margin-left: auto; }
.lib2 { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 26px; align-items: start; }
.lib2-main { min-width: 0; }
.ipm { margin-bottom: 26px; }
.ipm-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.ipm-head h2 { margin: 0; font-size: 22px !important; }
.ipm-all { display: inline-flex; align-items: center; gap: 2px; font-size: 14.5px; font-weight: 800; color: #1A6E96; text-decoration: none; }
.lib2 .cr-keep-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.td2 { position: sticky; top: calc(var(--header) + 16px); padding: 20px; border-radius: 30px; background: #fff; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 12px 28px rgba(20,30,50,.06); }
.td2 h2 { margin: 0 0 12px; font-size: 22px !important; }
.td2-add { display: flex; gap: 6px; padding: 5px 5px 5px 14px; border-radius: 999px; background: #F4F4F1; }
.td2-add input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 14.5px; outline: none; }
.td2-add button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #1F2328; color: #fff; cursor: pointer; }
.td2-sub { margin: 16px 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.td2-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.td2-list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px; border-radius: 14px; }
.td2-list li.done .td2-text { text-decoration: line-through; color: var(--muted); }
.td2-box { flex: none; width: 22px; height: 22px; display: grid; place-items: center; margin-top: 1px; border: 2px solid #C4C4BE; border-radius: 50%; background: #fff; color: #fff; cursor: pointer; padding: 0; }
li.done .td2-box, .fg-task.done .td2-box { background: #94E3FB; border-color: #94E3FB; }
.td2-text { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.td2-text b { font-weight: 800; }
.td2-text small { display: block; font-size: 12.5px; color: var(--ink-2); }
.td2-text .td2-from { color: var(--muted); }
.td2-del, .td2-go { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.td2-empty { margin: 14px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
@media (max-width: 1000px) { .lib2 { grid-template-columns: 1fr; } .td2 { position: static; } .lib2 .cr-keep-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* In progress: full list */
.pp-page { max-width: 900px; }
.pp-title { margin: 8px 0 18px; font-size: 34px !important; }
.pp-row { width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr) 180px 46px 20px; gap: 14px; align-items: center; padding: 10px 18px 10px 10px; margin-bottom: 10px; border: 0; border-radius: 999px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: var(--ink); box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 10px 24px rgba(20,30,50,.05); }
.pp-main b { display: block; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-bar { height: 8px; border-radius: 99px; background: #ECECE8; overflow: hidden; }
.pp-bar i { display: block; height: 100%; border-radius: 99px; background: #94E3FB; }
.pp-pct { font-size: 14px; font-weight: 800; color: var(--ink-2); text-align: right; }
@media (max-width: 640px) { .pp-row { grid-template-columns: 48px minmax(0, 1fr) 40px; border-radius: 24px; } .pp-row .pp-bar { grid-column: 2; } .pp-row > svg { display: none; } }
/* Groups tab */
.gt-invites { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.gt-invite { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px; border-radius: 999px; background: #EEF8FD; font-size: 15px; }
.gt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.gt-new, .gt-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px; border: 0; border-radius: 32px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); text-align: center; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 12px 28px rgba(20,30,50,.06); }
.gt-new { background: #F4F4F1; box-shadow: none; justify-content: center; }
.gt-new-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #1F2328; color: #fff; }
.gt-new b { font-size: 18px; font-weight: 900; } .gt-new small, .gt-card small { font-size: 13.5px; color: var(--muted); }
.gt-ring { position: relative; width: 170px; height: 170px; }
.gt-name { position: absolute; inset: 30px; display: grid; place-items: center; padding: 10px; border-radius: 50%; border: 2px solid #1F2328; font-family: var(--display); font-size: 17px; font-weight: 900; line-height: 1.15; }
.gt-face { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 3px #fff; }
/* Group page */
.fg-page { max-width: 1080px; }
.fg-top { display: grid; grid-template-columns: 1fr 240px; gap: 20px; align-items: start; margin: 10px 0 30px; }
.fg-ring { position: relative; width: min(420px, 90vw); aspect-ratio: 1; margin: 0 auto; }
.fg-center { position: absolute; inset: 27%; display: grid; place-items: center; padding: 14px; border-radius: 50%; border: 2.5px solid #1F2328; background: #fff; text-align: center; font-family: var(--display); font-size: clamp(22px, 2.6vw, 32px); font-weight: 900; line-height: 1.1; color: var(--ink); }
.fg-face { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.fg-face .avatar { box-shadow: 0 0 0 4px #fff, 0 6px 14px rgba(0,0,0,.12); }
.fg-side { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; }
.fg-admin { display: flex; align-items: center; gap: 10px; }
.fg-admin b { display: block; font-size: 15.5px; font-weight: 800; } .fg-admin small { font-size: 13px; color: var(--muted); }
.fg-add { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 42px; padding: 0 16px; border: 1.5px solid #E2E2DD; border-radius: 999px; background: #fff; font: inherit; font-size: 15px; font-weight: 800; color: var(--ink); cursor: pointer; }
.fg-pending { margin: 0; font-size: 13.5px; color: var(--muted); }
.fg-p-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fg-p-head h2, .fg-tasks h2 { margin: 0; font-size: 24px !important; }
.fg-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 200px 46px auto 40px; gap: 14px; align-items: center; padding: 12px 14px; margin-bottom: 12px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 10px 24px rgba(20,30,50,.05); }
.fg-row-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #E9F6FC; color: #1A6E96; }
.fg-row-main { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; color: var(--ink); min-width: 0; }
.fg-row-main b { display: block; font-size: 17px; font-weight: 800; } .fg-row-main small { font-size: 13.5px; color: var(--muted); }
.fg-assign { height: 36px; padding: 0 14px; border: 1.5px solid #E2E2DD; border-radius: 999px; background: #fff; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer; white-space: nowrap; }
.fg-go { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.fg-tasks { margin-top: 26px; }
.fg-task { display: flex; gap: 10px; align-items: flex-start; padding: 10px 6px; font-size: 15px; }
.fg-task small { display: block; color: var(--muted); font-size: 13px; }
.at-people { display: flex; gap: 12px; flex-wrap: wrap; }
.at-person { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 4px; border-radius: 16px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.at-person.on .avatar { box-shadow: 0 0 0 3px #1A6E96; }
.sf-or { margin: 20px 0 0; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gs-bubbles { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 680px; }
.gs-tpl { width: min(520px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 26px; background: #F4F4F1; }
.gs-tpl-name { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 800; }
@media (max-width: 860px) { .fg-top { grid-template-columns: 1fr; } .fg-row { grid-template-columns: 48px minmax(0, 1fr) 40px; border-radius: 26px; } .fg-row .pp-bar, .fg-row .fg-assign { grid-column: 2; } .fg-row .pp-pct { display: none; } .gs-bubbles { grid-template-columns: 1fr; } }
.wk-month, .wk-make { white-space: nowrap; }
@media (max-width: 560px) { .wk-nav { flex-wrap: wrap; } .wk-month, .wk-make { padding: 0 12px; font-size: 13.5px; } }

/* ---- Video editor ---- */
.ve-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; gap: 22px; align-items: start; margin-top: 18px; }
.ve-left { display: flex; flex-direction: column; gap: 10px; }
.ve-playall { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 18px 14px 14px; border: 0; border-radius: 999px; background: #1F2328; color: #fff; text-align: left; cursor: pointer; font: inherit; box-shadow: 0 10px 22px rgba(20,25,30,.2); }
.ve-playall:disabled { opacity: .45; cursor: default; }
.ve-playall span { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #94E3FB; }
.ve-playall b { font-size: 17px; font-weight: 900; } .ve-playall small { font-size: 12.5px; opacity: .8; }
.ve-h { margin: 12px 0 2px; font-size: 18px !important; }
.ve-tracks { display: flex; flex-direction: column; gap: 8px; }
.ve-track { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border: 0; border-radius: 999px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.ve-track.on { box-shadow: inset 0 0 0 2px #1A6E96; background: #F2FBFE; }
.ve-track-dot { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #F1F1EE; color: var(--ink-2); }
.ve-track.on .ve-track-dot { background: #94E3FB; color: #0B3A52; }
.ve-track b { display: block; font-size: 15px; font-weight: 800; } .ve-track small { font-size: 12.5px; color: var(--muted); }
.ve-note { margin: 6px 4px 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.ve-main { min-width: 0; }
.ve-stage { aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden; background: #F4F4F1; display: grid; }
.ve-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed #D4D4CF; border-radius: 28px; background: transparent; cursor: pointer; font: inherit; color: var(--ink); }
.ve-empty-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #1F2328; color: #fff; }
.ve-empty b { font-size: 20px; font-weight: 900; } .ve-empty small { font-size: 15px; color: var(--muted); }
.ve-player { position: relative; width: 100%; height: 100%; background: #000; cursor: pointer; }
.ve-player video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ve-cap { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: 86%; padding: 8px 18px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 17px; font-weight: 700; text-align: center; }
.ve-cap.big { font-size: 22px; bottom: 26px; }
.ve-bigplay { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.9); color: #1F2328; }
.ve-controls { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; padding: 16px 18px; border-radius: 28px; background: #fff; box-shadow: 0 2px 6px rgba(20,30,50,.04), 0 12px 28px rgba(20,30,50,.06); }
.ve-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ve-num { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #1A6E96; }
.ve-prompt { font-size: 15px; font-weight: 700; color: var(--ink); }
.ve-trim-top { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.ve-trim-bar { position: relative; height: 36px; border-radius: 999px; background: linear-gradient(90deg, #ECECE8 var(--a), #94E3FB var(--a), #94E3FB var(--b), #ECECE8 var(--b)); }
.ve-trim-bar input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.ve-trim-bar input::-webkit-slider-thumb { pointer-events: all; -webkit-appearance: none; width: 26px; height: 36px; border-radius: 13px; background: #fff; border: 3px solid #1F2328; cursor: ew-resize; }
.ve-trim-bar input::-moz-range-thumb { pointer-events: all; width: 22px; height: 32px; border-radius: 12px; background: #fff; border: 3px solid #1F2328; cursor: ew-resize; }
.ve-caption { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.ve-caption input { height: 46px; padding: 0 18px; border: 1.5px solid #E2E2DD; border-radius: 999px; font: inherit; font-size: 16px; color: var(--ink); }
.ve-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ve-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 999px; cursor: pointer; }
.ve-item:hover { background: #F7F7F5; }
.ve-item.on { background: #E9F6FC; }
.ve-thumb { flex: none; width: 64px; height: 40px; display: grid; place-items: center; border-radius: 12px; overflow: hidden; background: #F1F1EE; color: var(--muted); }
.ve-thumb video { width: 100%; height: 100%; object-fit: cover; }
.ve-item-text { flex: 1; min-width: 0; }
.ve-item-text b { display: block; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ve-item-text small { font-size: 12.5px; color: var(--muted); }
.ve-modal { width: min(1000px, 100%); }
.ve-theater { position: relative; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: #000; }
.ve-theater video { width: 100%; height: 100%; object-fit: cover; }
.ve-titlecard { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; background: #1F2328; color: #fff; font-family: var(--display); font-size: clamp(28px, 4vw, 48px); font-weight: 900; text-align: center; padding: 20px; }
.ve-canvas { width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: #1F2328; margin-bottom: 14px; }
.wk-pick-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1000px) { .ve-grid { grid-template-columns: 1fr; } .ve-left { order: 2; } .ve-side { order: 3; } }
/* Seven kinds of book now (Family Video added) */
.sf-products { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.log-products { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 860px) { .sf-products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }


/* ==== White, black and logo blue (Nov 14) ====
   Black buttons, logo-blue highlights, light gray where needed. No brown, no green.
   Fewer bubbles: circles for pictures and products only; plain shapes elsewhere. */
:root {
  --coral: #1F2328; --coral-dark: #000; --coral-soft: #E3F6FD;
  --accent: #1A6E96; --accent-soft: #E3F6FD; --sky: #B8E8F8; --sky-soft: #E3F6FD; --sky-ink: #1A6E96;
  --brand: #B8E8F8; --brand-soft: #E3F6FD; --brand-ink: #1A6E96; --wash: #F5F6F7;
  --r-bubble: 18px;
}
body, .app-header, .sidebar { background: #FFFFFF; }
.app-header { border-bottom-color: #EEEEEE; }
/* Buttons: black */
.btn.primary, .side-new, .td-save, .cal-make, .gb-make, .hw-btn.primary, .gb-btn:not(.ghost), .gb-mode-go, .vn-go, .hw-start, .fp-preview, .ia-go, .cr-new, .sf-scratch, .ve-playall, .mk2-find:hover {
  background: #1F2328 !important; color: #fff !important; box-shadow: 0 4px 12px rgba(0,0,0,.12) !important;
}
.btn.primary:hover, .side-new:hover, .fp-preview:hover, .hw-btn.primary:hover, .cr-new:hover { background: #000 !important; }
.cr-new-icon, .sf-scratch-icon, .ve-playall span, .gt-new-icon, .ve-empty-icon { background: #94E3FB !important; color: #0B3A52 !important; }
/* Selected things: light logo blue with a blue icon */
.nav-item.active, .top-nav-item.active, .ct-tab.on, .mobile-nav a.active { background: #E3F6FD !important; color: #1F2328 !important; }
.nav-item.active svg, .ct-tab.on svg, .mobile-nav a.active svg { color: #1A6E96 !important; }
.pp-bar i, .cr-book-bar i, .td-story-bar i, .td-progress span i { background: #94E3FB !important; }
a.link, .link, .ipm-all, .wk-kicker, .ve-num { color: #1A6E96 !important; }
.wk-day.today, .wk-day.chosen, .cal-cell.today { box-shadow: 0 0 0 3px #1A6E96; border-color: #1A6E96; }
.wk-day.chosen .wk-check, .ve-track.on .ve-track-dot, li.done .td2-box, .fg-task.done .td2-box { background: #94E3FB; border-color: #94E3FB; }
.ve-track.on { box-shadow: inset 0 0 0 2px #1A6E96; background: #F2FBFE; }
.ve-trim-bar { background: linear-gradient(90deg, #ECEDEF var(--a), #94E3FB var(--a), #94E3FB var(--b), #ECEDEF var(--b)) !important; }
/* Record button: logo blue (no green) */
.dc-mic { background: #94E3FB !important; }
.dc-btn { background: #E3F6FD !important; color: #1A6E96 !important; }
.dc-btn.big { background: #94E3FB !important; color: #0B3A52 !important; box-shadow: 0 8px 18px rgba(60,170,210,.22) !important; }
.dc-btn.big .dc-mic { background: #fff !important; color: #1A6E96 !important; }
.vn-big { background: #94E3FB !important; }
.sr-shout, .senior-pick { background: #EEF8FD !important; }
.sr-mic { background: #94E3FB !important; }
.rs-plank { background: #1F2328 !important; }
.wk, .cp-stage, .dl-prompt, .dl-slot, .sf-bubble-circle, .cr-book-cover, .gt-new, .ve-stage { background: #F5F6F7; }
.sf-bubble:hover .sf-bubble-circle { background: #E3F6FD !important; }

/* Fewer bubbles: plain, softly rounded boxes; no heavy shadows */
.card, .td-add, .td-card, .td-entry, .tp-idea, .gb-mode, .gb-row, .vn-choice, .dash-card, .cs-scratch, .gb-answer, .work-card, .mk-card, .cp, .ve-controls, .td2, .db-friends, .fp-post, .gt-card {
  border-radius: 18px !important; border: 1px solid #ECEDEF !important; box-shadow: none !important;
}
.db-row, .pp-row, .fg-row, .gb-row { border-radius: 16px !important; border: 1px solid #ECEDEF; box-shadow: none !important; }
.db-stat { border-radius: 16px; border: 1px solid #ECEDEF; box-shadow: none; }
.td-text, .vn-text, .gb-text, .gb-field input, .gb-field textarea, .dl-text, .db-bio { border-radius: 12px !important; }
.ve-caption input, .db-price input { border-radius: 10px; }
.ve-track, .ve-item { border-radius: 12px; }
.au-head, .db-head, .wk, .fp-empty { border-radius: 20px; background: #F5F6F7; }
.au-stats span { background: #fff; border: 1px solid #ECEDEF; }
.wk-day { border-radius: 16px; box-shadow: none; border: 1px solid #ECEDEF; }
.fp-stage { border-radius: 14px; background: #F5F6F7; }
.cal-cell { border-radius: 12px !important; }
.ia-banner { border-radius: 16px; background: #F5F6F7; }
.cp-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px; border-radius: 16px; transition: box-shadow .15s, background .15s; }
.cp-stage.over { background: #E3F6FD !important; box-shadow: inset 0 0 0 3px #1A6E96; }
.cp-leaf { width: min(340px, 80%); border: 0; padding: 0; background: none; cursor: pointer; transition: transform .15s; }
.cp-leaf:hover:not(:disabled) { transform: translateY(-3px); }
.cp-leaf:disabled { cursor: default; }
.cp-hint { margin: 0; font-size: 14px; color: var(--muted); }
.cp-progress { width: 200px; height: 6px; border-radius: 99px; background: #E5E7EA; overflow: hidden; }
.cp-progress i { display: block; height: 100%; background: #94E3FB; }
.pb-photo.over { box-shadow: inset 0 0 0 3px #1A6E96; background: #E3F6FD; }

/* Editors: empty photo spots are light gray with a white plus; green plus while dragging a photo over */
.cover-ph.add { position: absolute; inset: 0; display: grid; place-items: center; background: #EEF0F2; }
.leaf-cover-photo { position: relative; }
.ph-plus { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #9AA0A6; font-size: 30px; font-weight: 300; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.08); transition: background .15s, color .15s, transform .15s; }
.pb-photo.empty { background: #EEF0F2 !important; }
.pb-photo-note.ph-only { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #8A9096; }
.pb-photo-note.ph-only .ph-plus { width: 64px; height: 64px; font-size: 40px; }
.pb-photo-note.ph-only small { font-size: 14px; font-weight: 600; }
.pb-photo:hover .ph-plus, .cp-leaf:hover .ph-plus { transform: scale(1.06); }
.cp-stage.over .ph-plus, .pb-photo.over .ph-plus { background: #2E9E5B; color: #fff; transform: scale(1.12); }
.cp-stage.over { background: #EAF7EF !important; box-shadow: inset 0 0 0 3px #2E9E5B; }
.pb-photo.over { background: #EAF7EF !important; box-shadow: inset 0 0 0 3px #2E9E5B; }
.ve-empty, .dl-add { border: 0 !important; background: #EEF0F2 !important; color: #8A9096; }
.ve-empty-icon { background: #fff !important; color: #9AA0A6 !important; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.dl-add svg.i { padding: 10px; width: 46px !important; height: 46px !important; border-radius: 50%; background: #fff; color: #9AA0A6; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.pb-dictate { margin: 6px 0 2px; }
.pb-dictate .dc-btn.big { height: 40px; padding: 0 14px 0 4px; gap: 8px; box-shadow: none !important; }
.pb-dictate .dc-btn.big .dc-mic { width: 32px; height: 32px; }
.pb-dictate .dc-btn.big b { font-size: 14px; }
.pb-dictate .dc-btn.big small { display: none; }
.pb-dictate { display: inline-flex; margin: 0; }
.hw-rotate { margin: 10px 0 0; display: flex; justify-content: center; font-size: clamp(26px, 2.8vw, 40px); color: var(--ink); }
.hw-rotate .write-your { justify-content: center; }
/* Welcome page: everything flat on the page, no box behind the books */
/* Public front page (before logging in) */
.pub-home { background: #fff; min-height: 100vh; }
.pub-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; height: var(--header); padding: 0 28px; background: #fff; border-bottom: 1px solid #EEEEEE; }
.pub-home main { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.pub-home .hw { margin: 0; }
.hw-shout { margin: 26px auto 0; text-align: left; max-width: 760px; }
/* Welcome: the big white bubble is back, on a light gray page */
.hw-bg { background: #F4F5F7 !important; }
.hw-products-in { background: #FFFFFF !important; border-radius: 26px !important; box-shadow: 0 18px 40px rgba(20,30,50,.10) !important; padding: 18px 22px 8px !important; }
.hw-title { white-space: normal; }
.hw .hw-tagline { margin: 8px auto 0; }
.hw .hw-rotate { margin: 22px auto 0; text-align: center; }
/* Create page: a bit smaller overall; products under the calendar */
.cr-page { max-width: 1040px; margin: 0 auto; }
.cr-page .wk { padding: 18px 22px 14px; }
.cr-page .wk-title { font-size: 22px !important; }
.cr-page .wk-kicker { font-size: 12px; }
.cr-page .wk-arrow, .cr-page .wk-nav .btn { min-height: 40px; height: 40px; font-size: 15px; padding-top: 0; padding-bottom: 0; }
.cr-page .wk-arrow { width: 40px; padding: 0; }
.cr-page .wk-days { gap: 12px; }
.cr-page .wk-dow { font-size: 12px; }
.cr-page .wk-num { font-size: 22px; }
.cr-page .wk-add { width: 36px; height: 36px; }
.cr-page .wk-prompt { font-size: 15px; }
.cr-products { margin: 26px 0 8px; }
.log-start-plain .log-start-head { justify-content: flex-start; margin-bottom: 4px; }
.log-start-plain .log-start-head h2 { font-size: 20px !important; font-weight: 800; margin: 0; }
.log-product-count { font-size: 12px; color: #6B7280; font-weight: 600; white-space: nowrap; }
.cr-keep { margin-top: 18px; }
.cr-keep-head h2 { font-size: 20px !important; }
.cr-keep-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cr-book b { font-size: 13px; }
@media (max-width: 760px) { .cr-keep-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Create page product counts: two short lines, no overlap */
.log-product-count { display: flex; flex-direction: column; align-items: center; gap: 1px; white-space: normal; line-height: 1.25; }
/* Library shelf: about a quarter as tall, a brown wooden shelf, lighter title */
.rs { padding: 16px 26px 14px !important; margin: 4px 0 22px !important; }
.rs .rs-title { font-size: 22px !important; font-weight: 600 !important; letter-spacing: 0 !important; margin: 0 0 8px !important; }
.rs-books { min-height: 40px; gap: 2px; }
.rs-books .spine-title { font-size: 8px; }
.rs-books .spine:hover, .rs-books .spine:focus-visible { transform: translateY(-4px); }
.rs .rs-plank { height: 8px !important; border-radius: 3px !important; background: linear-gradient(180deg, #A9784A 0%, #8B5E36 55%, #6E4627 100%) !important; box-shadow: 0 6px 12px -5px rgba(80,50,25,.45), inset 0 1px 0 rgba(255,255,255,.25) !important; }
.rs-empty { font-size: 15px; margin-bottom: 8px; }
/* Library: finished books only, full width; a clean centered switcher */
.lib-page .lib2 { display: block; }
.lib-page .lib2-main { width: 100%; max-width: none; }
.lib2-tabs { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 6px 0 22px; }
.lib2-tabs .mk2-switch { display: flex; justify-content: center; gap: 34px; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; border-bottom: 1px solid #E5E7EB !important; }
.lib2-tabs .mk2-switch button { background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 8px 2px 10px !important; margin-bottom: -1px; font-size: 17px; font-weight: 600; color: #6B7280; border-bottom: 3px solid transparent !important; cursor: pointer; }
.lib2-tabs .mk2-switch button:hover { color: #111; }
.lib2-tabs .mk2-switch button.on { color: #111; border-bottom-color: #1A6E96 !important; }
.lib2-tabs .lib-tab-search { width: min(420px, 100%); }
.lib2-tabs .lib-tab-search { margin: 0 auto !important; }
.lib2-tabs .lib-tab-search { flex: none !important; }
/* Create page: the calendar's gray band runs edge to edge */
.cr-page .wk { border-radius: 0 !important; box-shadow: 0 0 0 100vmax #F4F5F7 !important; clip-path: inset(0 -100vmax); background: #F4F5F7 !important; }
.app-body > .sidebar { z-index: 30; }
/* Every page change fades in softly the same way (no hard jump) */
html { background: #FFFFFF; color-scheme: light; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.main > .page { animation: page-in .22s ease-out both; }
@media (prefers-reduced-motion: reduce) { .main > .page { animation: none; } }
/* Create page products: bigger books and words, same spacing; centered title */
.cr-products .log-start-plain .log-start-head { justify-content: center; text-align: center; }
.cr-products .log-start-plain .log-start-head h2 { font-size: 24px !important; }
.cr-products .log-products { gap: 4px; padding-bottom: 18px; }
.cr-products .log-product { padding: 8px 2px 10px; gap: 6px; }
.cr-products .log-product-art { aspect-ratio: 1 / 1.05; }
.cr-products .log-product-art > img { height: calc(min(100%, 118% * var(--h, .8))); bottom: 2%; }
.cr-products .log-product-size { font-size: 13px; }
.cr-products .log-product-name { font-size: 13.5px; letter-spacing: .12em; }
.cr-products .log-product-count { font-size: 14px; }
/* Library shelf: scrolls sideways as it fills; hold and drag a book to move it */
.rs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rs-hint { font-size: 13px; color: #6B7280; }
.rs-books { overflow-x: auto; overflow-y: hidden; padding: 18px 10px 0 !important; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #C9CDD3 transparent; }
.rs-books::-webkit-scrollbar { height: 6px; }
.rs-books::-webkit-scrollbar-thumb { background: #C9CDD3; border-radius: 99px; }
.rs-slot { flex: none; display: flex; align-items: flex-end; touch-action: pan-x; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.rs-slot .spine { transition: transform .18s ease, box-shadow .18s ease; }
.rs-slot.dragging { position: relative; z-index: 5; cursor: grabbing; }
.rs-slot.dragging .spine { transform: translateY(-12px) scale(1.06) !important; box-shadow: 0 14px 18px -8px rgba(40,30,20,.45); }
.rs-books:has(.dragging) { scroll-behavior: auto; cursor: grabbing; }
/* Profile: a big, clear Author Dashboard card (owner only) */
.au-dash { display: flex; align-items: center; gap: 18px; width: 100%; margin: 6px 0 28px; padding: 22px 26px; background: #E3F6FD; border: 1px solid #BFE6F6; border-radius: 18px; cursor: pointer; text-align: left; font: inherit; color: #0F3D55; transition: background .2s, transform .2s; }
.au-dash:hover { background: #D3F0FB; transform: translateY(-1px); }
.au-dash-icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #94E3FB; color: #0B3A52; }
.au-dash-icon .i { width: 26px; height: 26px; }
.au-dash-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.au-dash-text b { font-size: 22px; font-weight: 800; color: #0F3D55; }
.au-dash-text small { font-size: 16px; color: #2C5B73; }
.au-dash-go { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 12px 20px; border-radius: 999px; background: #94E3FB; color: #0B3A52; font-weight: 700; font-size: 16px; }
@media (max-width: 600px) { .au-dash { flex-wrap: wrap; padding: 18px; } .au-dash-go { width: 100%; justify-content: center; } }
/* Seller verification */
.seller-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 4px 10px; border-radius: 999px; background: #E3F6FD; color: #1A6E96; font-size: 13px; font-weight: 700; vertical-align: middle; letter-spacing: 0; }
.sv-box { margin: 0 0 16px; padding: 16px 18px; border-radius: 14px; background: #F4F5F7; border: 1px solid #E5E7EB; }
.sv-box.asked { background: #E3F6FD; border-color: #8CCBE6; }
.sv-box b { font-size: 17px; }
.sv-box p { margin: 8px 0; font-size: 15px; }
.sv-box ul { margin: 4px 0 8px; padding-left: 20px; font-size: 15px; line-height: 1.6; }
.sv-lock { display: flex; gap: 6px; align-items: flex-start; color: #4B5563; font-size: 13.5px !important; }
.sv-ok { display: flex; gap: 12px; align-items: center; margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: #E3F6FD; color: #0F3D55; }
.sv-ok > .i { flex: none; width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: #94E3FB; color: #0B3A52; }
.sv-ok div { display: flex; flex-direction: column; gap: 2px; }
/* Week calendar: arrows on each side of the days */
.wk-row { display: flex; align-items: center; gap: 12px; }
.wk-row .wk-days { flex: 1; min-width: 0; }
.wk-side { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #FFFFFF; color: #111827; cursor: pointer; box-shadow: 0 2px 8px rgba(17,24,39,.08); transition: background .15s, transform .15s; }
.wk-side:hover { background: #E3F6FD; color: #1A6E96; }
.wk-side:active { transform: scale(.94); }
@media (max-width: 600px) { .wk-row { gap: 4px; } .wk-side { width: 32px; height: 32px; } }
/* Create page: products spread wider with more room between them (calendar stays the same size) */
.cr-page { max-width: 1280px; }
.cr-page .wk { max-width: 1040px; margin-left: auto; margin-right: auto; }
.cr-page .cr-keep { max-width: 1040px; margin-left: auto; margin-right: auto; }
.cr-products .log-products { gap: 30px; }

/* ================= Phone-only layouts ================= */
.rs-hint-m { display: none; }
@media (max-width: 640px) {
  /* Create: the week fits on one line as compact day tiles */
  .cr-page .wk { padding: 14px 12px 12px !important; }
  .cr-page .wk-top { flex-wrap: wrap; gap: 8px; }
  .cr-page .wk-title { font-size: 19px !important; }
  .wk-row { gap: 4px; }
  .wk-side { width: 30px; height: 30px; box-shadow: none; }
  .wk-row .wk-days { gap: 4px !important; }
  .wk-row .wk-day { aspect-ratio: auto !important; min-height: 66px; height: 66px; padding: 7px 0 6px !important; border-radius: 12px !important; justify-content: flex-start; }
  .wk-row .wk-dow { font-size: 10px !important; letter-spacing: .02em; }
  .wk-row .wk-num { font-size: 18px !important; line-height: 1.1; }
  .wk-row .wk-add { width: 20px !important; height: 20px !important; margin-top: auto; }
  .wk-row .wk-add .i { width: 12px; height: 12px; }
  .wk-row .wk-words { display: none; }
  .cr-page .wk-prompt { font-size: 14px; flex-wrap: wrap; }

  /* Products: a clear two-column grid, no hidden side-scroll */
  .log-start .log-products, .cr-products .log-products { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px 12px !important; overflow: visible !important; margin: 0 !important; padding: 6px 0 14px !important; scroll-snap-type: none !important; }
  .log-start .log-product { flex: none !important; padding: 10px 4px !important; }
  .log-start .log-product:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 60%; justify-self: center; }
  .log-start .log-product-art { aspect-ratio: 1 / .82 !important; }
  .cr-products .log-product-name { font-size: 12px; }
  .cr-products .log-product-count { font-size: 12.5px; }

  /* Library shelf: make the side-scroll obvious */
  .rs-hint { display: none; }
  .rs-hint-m { display: inline; font-size: 13px; color: #1A6E96; font-weight: 600; }
  .rs-shelf { position: relative; }
  .rs-shelf::after { content: ""; position: absolute; top: 0; right: 0; bottom: 8px; width: 36px; pointer-events: none; background: linear-gradient(90deg, rgba(244,245,247,0), #F4F5F7); }
  .rs { padding: 14px 16px 12px !important; }

  /* Market posts: buttons stay on one line */
  .fp-btns { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
  .fp-btns button { white-space: nowrap; font-size: 15px !important; padding: 12px 8px !important; justify-content: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  /* Author dashboard: photo, name and bio stacked */
  .db-head { flex-direction: column !important; align-items: center !important; text-align: center; gap: 12px !important; padding: 20px 16px !important; }
  .db-who { width: 100%; align-items: center; }
  .db-who h1 { font-size: 26px !important; line-height: 1.15; }
  .db-bio { width: 100%; text-align: left; }
}
/* Side menu stays put while the page scrolls (even past the footer) */
@media (min-width: 861px) {
  .app-body > .sidebar { position: fixed !important; top: var(--header); left: 0; bottom: 0; height: auto !important; overflow-y: auto; }
  .app-body > .main { margin-left: var(--sidebar); }
  #app > div > .app-foot { padding-left: var(--sidebar); }
}
/* Phone calendar: arrows + Month beside the dates, thin phone-shaped days,
   big Log today and a Create button underneath */
.wk-arrow-m, .wk-mobile-actions { display: none; }
@media (max-width: 640px) {
  .cr-page .wk-top { flex-wrap: nowrap !important; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
  .cr-page .wk-kicker { margin-bottom: 2px; }
  .cr-page .wk-title { font-size: 18px !important; white-space: nowrap; margin: 0; }
  .cr-page .wk-nav { display: flex; align-items: center; gap: 6px; flex: none; }
  .wk-arrow-m { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #D1D5DB; background: #fff; color: #111827; cursor: pointer; padding: 0; }
  .cr-page .wk-month { min-height: 34px !important; height: 34px; padding: 0 12px !important; font-size: 14px !important; }
  .cr-page .wk-make { display: none !important; }
  .wk-row .wk-side { display: none !important; }
  .wk-row { gap: 0; }
  .wk-row .wk-days { gap: 6px !important; }
  .wk-row .wk-day { aspect-ratio: 9 / 17 !important; height: auto !important; min-height: 0; max-height: none; padding: 6px 0 5px !important; border-radius: 9px !important; border: 1.5px solid #9CA3AF !important; background-color: #fff; box-shadow: none !important; }
  .wk-row .wk-day.today { border: 2px solid #1A6E96 !important; }
  .wk-row .wk-day.future { border-color: #D1D5DB !important; }
  .wk-row .wk-day.photo { border-color: #111827 !important; }
  .wk-row .wk-dow { font-size: 9.5px !important; }
  .wk-row .wk-num { font-size: 16px !important; }
  .wk-row .wk-add { margin-top: auto; background: #F3F4F6; }
  .cr-page .wk-prompt { margin: 12px 0 0; justify-content: center; text-align: center; }
  .cr-page .wk-prompt .link { display: none; }
  .wk-mobile-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
  .wk-log-big { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border: 0; border-radius: 999px; background: #94E3FB; color: #0B3A52; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
  .wk-make-m { width: 100%; min-height: 46px; border: 1.5px solid #111827; border-radius: 999px; background: #fff; color: #111827; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
  .wk-make-m.on { border-color: #9CA3AF; color: #4B5563; }
}

/* ---- Nov 14: big blue "Log today" on every screen ---- */
.wk-mobile-actions { display: flex; justify-content: center; margin-top: 14px; }
.wk-mobile-actions .wk-make-m { display: none; }
.wk-log-big { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 380px; min-height: 56px; border: 0; border-radius: 999px; background: #94E3FB; color: #0B3A52; font: inherit; font-size: 19px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 18px rgba(60,170,210,.22); }
.wk-log-big:hover { filter: brightness(1.08); }
.wk-log-big:focus-visible { outline: 4px solid #B8E8F8; outline-offset: 3px; }
.cr-page .wk-prompt { justify-content: center; text-align: center; }
@media (max-width: 640px) {
  .wk-mobile-actions { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 10px; }
  .wk-mobile-actions .wk-make-m { display: block; }
  .wk-log-big { max-width: none; }
}

/* ---- Nov 14: the 55+ box, plain words and a picture of the record button ---- */
.easy-box { gap: 26px !important; }
.easy-text { flex: 1; min-width: 0; }
.easy-text > b { display: block; font-size: 23px; }
.easy-list { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.easy-list li { position: relative; padding-left: 26px; font-size: 17px; line-height: 1.45; color: var(--ink-2); }
.easy-list li::before { content: ''; position: absolute; left: 4px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: #94E3FB; }
.easy-list li b { font-family: inherit; font-size: inherit; font-weight: 800; color: var(--ink); }
.easy-pic { flex: none; }
.easy-btn { display: flex; align-items: center; gap: 14px; padding: 14px 22px 14px 14px; border-radius: 20px; background: #94E3FB; color: #0B3A52; box-shadow: 0 12px 26px rgba(60,170,210,.22); }
.easy-btn-icon { flex: none; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #1A6E96; }
.easy-btn-icon svg { width: 28px; height: 28px; }
.easy-btn-text { display: flex; flex-direction: column; gap: 2px; }
.easy-btn-text b { font-family: 'Inter', var(--sans); font-size: 22px; font-weight: 500; color: #fff; line-height: 1.1; }
.easy-btn-text small { font-size: 14px; opacity: .95; }
@media (max-width: 640px) {
  .easy-box { flex-direction: column; align-items: stretch !important; gap: 16px !important; padding: 20px !important; }
  .easy-pic { align-self: center; }
}

/* ---- Nov 14: phone week boxes bigger, lighter letters ---- */
@media (max-width: 640px) {
  .cr-page .wk-row { margin-left: -22px !important; margin-right: -22px !important; }
  .cr-page .wk-row .wk-days { gap: 3px !important; }
  .cr-page .wk-row .wk-day { aspect-ratio: 9 / 18 !important; padding: 5px 0 4px !important; border-radius: 8px !important; border-width: 1px !important; }
  .cr-page .wk-row .wk-day.today { border-width: 2px !important; }
  .cr-page .wk-row .wk-dow { font-size: 9px !important; font-weight: 500 !important; letter-spacing: .04em; }
  .cr-page .wk-row .wk-num { font-size: 14px !important; font-weight: 500 !important; }
  .cr-page .wk-row .wk-add { width: 22px; height: 22px; }
}
@media (max-width: 640px) { .cr-page .wk-row .wk-day.today .wk-num, .cr-page .wk-row .wk-day.today .wk-dow { font-weight: 600 !important; } }

/* ---- Nov 14: phone shelf is for looking; titles shrink to fit ---- */
@media (max-width: 640px) {
  .rs-books .spine-title { text-overflow: clip; letter-spacing: 0; }
  .rs-slot { touch-action: pan-x pan-y; }
}
@media (max-width: 640px) {
  .rs-books .spine { padding-top: 6px !important; padding-bottom: 5px !important; }
}

/* ---- Nov 14: In progress — plain outlined cards in a sideways row ---- */
.kw { max-width: 1040px; margin: 22px auto 0; }
.kw-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.kw-head h2 { margin: 0; font-size: 22px !important; display: flex; align-items: center; gap: 10px; }
.kw-count { font-size: 14px; font-weight: 600; color: #6B7280; }
.kw-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kw-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border: 1px solid #D1D5DB; border-radius: 10px; background: #fff; color: #6B7280; }
.kw-search input { border: 0; outline: none; font: inherit; font-size: 15px; width: 200px; background: transparent; color: var(--ink); }
.kw-search:focus-within { border-color: #1A6E96; }
.kw-sort { height: 42px; padding: 0 12px; border: 1px solid #D1D5DB; border-radius: 10px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.kw-wrap { position: relative; }
.kw-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 14px; scrollbar-width: thin; scrollbar-color: #C9CDD3 transparent; }
.kw-row::-webkit-scrollbar { height: 6px; }
.kw-row::-webkit-scrollbar-thumb { background: #C9CDD3; border-radius: 99px; }
.kw-card { flex: 0 0 200px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid #D1D5DB; border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); text-align: left; transition: border-color .15s; }
.kw-card:hover { border-color: #1A6E96; }
.kw-card:focus-visible { outline: 3px solid #B8E8F8; outline-offset: 2px; }
.kw-cover { height: 150px; display: grid; place-items: center; border-bottom: 1px solid #ECEDEF; padding-bottom: 10px; }
.kw-cover .thumb.book-thumb { height: 100%; width: 100%; aspect-ratio: auto; background: transparent !important; box-shadow: none; overflow: visible; }
.kw-title { font-size: 15px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.kw-bar { display: block; height: 6px; border-radius: 99px; background: #E5E7EB; overflow: hidden; }
.kw-bar i { display: block; height: 100%; background: #94E3FB; border-radius: 99px; }
.kw-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: #4B5563; }
.kw-meta b { color: var(--ink); }
.kw-arrow { position: absolute; top: 40%; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #D1D5DB; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.kw-arrow.prev { left: -19px; } .kw-arrow.next { right: -19px; }
.kw-none { color: #6B7280; font-size: 15px; }
@media (max-width: 640px) {
  .kw-tools { width: 100%; }
  .kw-search { flex: 1; min-width: 0; } .kw-search input { width: 100%; }
  .kw-card { flex-basis: 158px; padding: 12px; } .kw-cover { height: 118px; }
  .kw-arrow { display: none; }
}

/* ---- Nov 14: welcome page — gray and white bands reach the screen edges ---- */
.hw { overflow: visible !important; box-shadow: 0 0 0 100vmax #F4F5F7; clip-path: inset(0 -100vmax); }
.hw-bg, .hw-wash { display: none; }
.hw { background: #F4F5F7; }
.hw-products-in { width: 100% !important; max-width: none !important; border-radius: 0 !important; box-shadow: 0 0 0 100vmax #fff !important; clip-path: inset(0 -100vmax); padding: 28px 0 18px !important; margin-top: 34px !important; }
.hw-products-in .log-products { gap: 18px; }
.hw-products-in .log-product-art { aspect-ratio: 1 / 1.25; }
.hw-products-in .log-product-art > img { height: calc(min(100%, 125% * var(--h, .8))); }
.hw-products-in .log-product-name { font-size: 15px; }
.hw-products-in .log-product-size { font-size: 14px; }

/* ---- Nov 14: Library — one search and one sort, top left ---- */
.lib-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-start; margin: 4px 0 22px; }
.lib-tools .kw-search input { width: 240px; }
@media (max-width: 640px) { .lib-tools .kw-search { flex: 1; min-width: 0; } .lib-tools .kw-search input { width: 100%; } }
/* Products row uses the full screen width (up to 1700px) so the books show big */
.hw-products-in .log-start { width: min(1700px, calc(100vw - 80px)); position: relative; left: 50%; transform: translateX(-50%); }
.app-body .hw-products-in .log-start { width: min(1700px, calc(100vw - var(--sidebar) - 80px)); }
@media (max-width: 860px) { .hw-products-in .log-start, .app-body .hw-products-in .log-start { width: calc(100vw - 32px); } }
@media (max-width: 860px) { .hw-products-in .log-start, .app-body .hw-products-in .log-start { width: auto; left: 0; transform: none; } .hw-products-in { padding: 22px 4px 12px !important; } }

/* ---- Nov 14: a new book gets its own page (title, blue Start from scratch, templates) ---- */
.nb-page { max-width: 1180px; margin: 0 auto; padding-top: 10px; }
.nb-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.nb-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 0 16px; }
.nb-art { width: 74px; height: 74px; flex: none; display: grid; place-items: center; }
.nb-art img, .nb-art svg { max-width: 100%; max-height: 100%; object-fit: contain; }
.nb-title { margin: 0; font-size: 32px !important; line-height: 1.1; }
.nb-sub { margin: 4px 0 0; color: #6B7280; font-size: 15px; }
.nb-page .sf-choice { display: flex; flex-direction: column; align-items: center; gap: 0; }
.nb-page .sf-scratch { width: min(560px, 100%); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; text-align: left; padding: 16px 24px !important; min-height: 0 !important; border-radius: 16px !important; background: #94E3FB !important; color: #0B3A52 !important; border: 0 !important; box-shadow: 0 10px 22px rgba(60,170,210,.22) !important; }
.nb-page .sf-scratch:hover { filter: brightness(1.07); }
.nb-page .sf-scratch-icon { grid-row: 1 / 3; width: 48px !important; height: 48px !important; margin: 0 !important; background: #fff !important; color: #1A6E96 !important; border-radius: 50%; display: grid; place-items: center; }
.nb-page .sf-scratch b { font-size: 22px !important; margin: 0 !important; color: #fff; }
.nb-page .sf-scratch small { font-size: 14.5px !important; margin: 0 !important; color: rgba(255,255,255,.92) !important; }
.nb-page .sf-or { margin: 22px 0 12px !important; }
.nb-page .sf-bubbles { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px !important; width: 100%; }
@media (max-width: 1000px) { .nb-page .sf-bubbles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .nb-head { justify-content: flex-start; gap: 12px; } .nb-art { width: 56px; height: 56px; } .nb-title { font-size: 25px !important; }
  .nb-page .sf-scratch { padding: 14px 16px !important; } .nb-page .sf-scratch b { font-size: 19px !important; }
  .nb-page .sf-bubbles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; }
  .nb-page .sf-bubble { padding: 12px !important; }
}

/* ---- Nov 14: the group "new book" popup ---- */
.gs2-modal .modal-body { padding-top: 6px; }
.gs2-title { margin: 0 0 18px; text-align: center; font-size: 26px; }
.gs2-sec { margin-bottom: 22px; }
.gs2-sec:last-child { margin-bottom: 4px; }
.gs2-h { margin: 0; font-size: 18px; }
.gs2-p { margin: 4px 0 12px; color: #4B5563; font-size: 14.5px; }
.gs2-ideas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gs2-idea { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px 16px; border: 1px solid #D1D5DB; border-radius: 12px; background: #fff; cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.gs2-idea:hover { border-color: #1A6E96; background: #F2FBFE; }
.gs2-idea b { font-size: 16px; }
.gs2-idea small { font-size: 13.5px; color: #4B5563; }
.gs2-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.gs2-product { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 12px; border: 1px solid transparent; border-radius: 12px; background: none; cursor: pointer; font: inherit; color: var(--ink); }
.gs2-product:hover { border-color: #D1D5DB; }
.gs2-art { width: 100%; height: 110px; display: grid; place-items: center; }
.gs2-art img { max-height: 100%; max-width: 80%; object-fit: contain; }
.gs2-name { font-size: 14.5px; font-weight: 700; text-align: center; }
.gs2-size { font-size: 13px; color: #6B7280; }
@media (max-width: 640px) { .gs2-ideas, .gs2-products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nb-page .sf-bubbles { margin-top: 0 !important; }

/* ---- Nov 14: commission requests ---- */
.cl { max-width: 1040px; margin: 22px auto 0; }
.cl-h { margin: 0 0 10px; font-size: 20px !important; }
.cl-line { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid #A7D7B8; border-left: 5px solid #2E9E5B; border-radius: 10px; background: #F3FBF6; cursor: pointer; }
.cl-line:hover { background: #EAF7EF; }
.cl-line:focus-visible { outline: 3px solid #B8E8F8; outline-offset: 2px; }
.cl-price { flex: none; min-width: 74px; font-size: 18px; font-weight: 800; color: #1E7A44; }
.cl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-main b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-main small { font-size: 13px; color: #4B5563; }
.cl-status { flex: none; padding: 4px 10px; border-radius: 999px; background: #2E9E5B; color: #fff; font-size: 12.5px; font-weight: 700; }
.cl-btns { flex: none; display: flex; gap: 8px; }
.cl-accept { background: #2E9E5B !important; border-color: #2E9E5B !important; color: #fff !important; }
.cl-deny { background: #fff !important; }
.cl-d-row { margin: 0 0 6px; font-size: 15px; } .cl-d-row b { display: inline-block; min-width: 110px; }
.cl-d-body { margin: 12px 0 0; padding: 12px; border-radius: 10px; background: #F5F6F7; white-space: pre-wrap; font-size: 15px; line-height: 1.5; }
.ca-price { display: flex; align-items: center; gap: 6px; } .ca-price b { font-size: 18px; } .ca-price input { flex: 1; }
@media (max-width: 640px) {
  .cl-line { flex-wrap: wrap; gap: 8px 12px; }
  .cl-main { flex-basis: calc(100% - 100px); }
  .cl-status { order: 3; } .cl-btns { order: 4; margin-left: auto; }
}
.gs2-art img { max-height: 110px !important; width: auto !important; height: auto !important; max-width: 80% !important; position: static !important; } .nb-art img { max-height: 74px !important; width: auto !important; height: auto !important; position: static !important; }

/* ---- Nov 14: cleaner market cards with the author ---- */
.bs-grid { gap: 40px 28px !important; }
.bs-card { gap: 0 !important; }
.bs-cover { aspect-ratio: 1 / 1 !important; align-items: end !important; place-items: end center !important; border-radius: 0 !important; margin-bottom: 14px; }
.bs-cover .thumb.book-thumb { place-items: end center !important; }
.bs-title { margin: 0 !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1.3 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-author { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: #4B5563; cursor: pointer; text-align: left; max-width: 100%; }
.bs-author span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-author:hover span { color: var(--ink); text-decoration: underline; }
.bs-author .avatar { flex: none; }
.bs-foot { margin-top: 10px !important; padding-top: 10px; border-top: 1px solid #ECEDEF; }
.bs-price { padding: 0 !important; background: none !important; font-size: 15px !important; font-weight: 700 !important; color: var(--ink) !important; }
.bs-price.owned { color: #1A6E96 !important; font-weight: 600 !important; }
.bs-cart { width: 32px !important; height: 32px !important; border: 1px solid #D1D5DB !important; }

/* ---- Nov 14: book preview, laid out like the login page ---- */
.modal.pv-modal { width: min(1080px, 100%); padding: 0 !important; overflow: hidden; }
.modal.pv-modal .modal-body { padding: 0 !important; }
.pv { display: grid; grid-template-columns: 1fr 1fr; min-height: min(640px, calc(100vh - 80px)); }
.pv-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 32px; background: #F4F5F7; }
.pv-cover { display: grid; place-items: center; width: min(380px, 100%); aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .2s; }
.pv-cover:hover { transform: translateY(-4px); }
.pv-cover .thumb.book-thumb { width: 100%; height: 100%; background: transparent !important; box-shadow: none; overflow: visible; }
.pv-cover .bookcover { filter: drop-shadow(0 18px 24px rgba(30,30,50,.22)); }
.pv-look { min-width: 200px; justify-content: center; background: #fff; }
.pv-side { display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 44px clamp(26px, 4vw, 56px); background: #fff; overflow-y: auto; max-height: calc(100vh - 48px); }
.pv-author { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-bottom: 24px; }
.pv-author b { display: block; font-size: 16px; }
.pv-author small { display: block; font-size: 13.5px; color: #6B7280; }
.pv-author:hover b { text-decoration: underline; }
.pv-type { margin: 0 0 6px; font-size: 13px; color: #6B7280; }
.pv-title { margin: 0; font-size: clamp(28px, 3vw, 38px) !important; line-height: 1.1; }
.pv-desc { margin: 14px 0 0; font-size: 16px; line-height: 1.55; color: #374151; }
.pv-offer { margin-top: 24px; padding-top: 20px; border-top: 1px solid #ECEDEF; }
.pv-acts { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #ECEDEF; }
.pv-more { align-self: flex-start; margin-top: 14px; }
@media (max-width: 860px) {
  .modal.pv-modal { width: 100%; }
  .pv { grid-template-columns: 1fr; min-height: 0; }
  .pv-art { padding: 26px 20px 20px; gap: 14px; } .pv-cover { width: min(240px, 70%); }
  .pv-side { padding: 22px 20px 28px; max-height: none; justify-content: flex-start; }
  .pv-author { margin-bottom: 16px; }
}

/* ---- Nov 14: search is a rounded bubble, sort is small text; both on the right ---- */
.lib-tools { justify-content: flex-end !important; }
.kw-search { height: 40px !important; padding: 0 16px !important; border: 1px solid #E5E7EB !important; border-radius: 999px !important; background: #F4F5F7 !important; }
.kw-search:focus-within { background: #fff !important; border-color: #B8E8F8 !important; box-shadow: 0 0 0 3px #E3F6FD; }
.kw-search input { font-size: 14.5px !important; }
.lib-tools .kw-search input, .kw-tools .kw-search input { width: 220px; }
.kw-sort { height: auto !important; padding: 4px 22px 4px 4px !important; border: 0 !important; border-radius: 6px !important; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 4px center !important; -webkit-appearance: none; appearance: none; font-size: 14px !important; font-weight: 600; color: #374151 !important; }
.kw-sort:focus-visible { outline: 2px solid #B8E8F8; }
@media (max-width: 640px) { .lib-tools .kw-search input, .kw-tools .kw-search input { width: 100%; } }
.kw-sort-wrap { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: #6B7280; }
/* Fade pages in with opacity only: a moving (transform) animation would knock popups off-center */
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }
.main > .page { animation: page-fade .2s ease-out; }

/* ---- Nov 14: profile tabs, visibility marks, dashboard as a tab ---- */
.au-tabs { justify-content: center !important; margin: 26px 0 18px !important; }
.au-tools { align-items: center; margin-bottom: 26px !important; }
.au-tools .au-books-title { margin: 0 auto 0 0; }
.bs-vis { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; font-weight: 600; }
.bs-vis.public { color: #1A6E96; }
.bs-vis.friends { color: #6B7280; }
.db-embedded { padding: 0; }
.db-embedded .db-stats { margin-top: 4px; }

/* ---- Nov 14: In progress as rows. Commissions green, group books light blue ---- */
.kr-list { display: flex; flex-direction: column; gap: 8px; }
.kr-row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 10px 14px; border: 1px solid #E5E7EB; border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); text-align: left; transition: border-color .15s, background .15s; }
.kr-row:hover { border-color: #1A6E96; }
.kr-row:focus-visible { outline: 3px solid #B8E8F8; outline-offset: 2px; }
.kr-row.group { background: #EEF8FD; border-color: #CFE9F6; }
.kr-row.ask { background: #F1FAF4; border-color: #BFE3CC; }
.kr-row.ask:hover { border-color: #2E9E5B; }
.kr-thumb { flex: none; width: 52px; height: 52px; display: grid; place-items: center; }
.kr-thumb .thumb.book-thumb { width: 100%; height: 100%; background: transparent !important; box-shadow: none; overflow: visible; }
.kr-price { width: 72px; font-size: 16px; font-weight: 800; color: #1E7A44; }
.kr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kr-main b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kr-main small { font-size: 13.5px; color: #6B7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kr-prog { flex: none; width: 210px; display: flex; flex-direction: column; gap: 6px; }
.kr-prog small { font-size: 13px; color: #4B5563; } .kr-prog small b { color: var(--ink); }
.kr-pct { flex: none; width: 44px; text-align: right; font-size: 14px; font-weight: 600; color: #4B5563; }
.kr-go { flex: none; color: #9CA3AF; }
.kr-tag { flex: none; padding: 4px 10px; border-radius: 999px; background: #2E9E5B; color: #fff; font-size: 12.5px; font-weight: 700; }
.kr-btns { flex: none; display: flex; gap: 8px; }
.kr-accept { background: #2E9E5B !important; border-color: #2E9E5B !important; color: #fff !important; }
.kr-deny { background: #fff !important; }
.kr-more { display: block; margin: 12px auto 0; }
@media (max-width: 640px) {
  .kr-row { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
  .kr-thumb { width: 44px; height: 44px; }
  .kr-main { flex-basis: calc(100% - 100px); }
  .kr-prog { order: 5; width: 100%; padding-left: 56px; }
  .kr-pct { width: auto; } .kr-go { display: none; }
  .kr-row.ask .kr-tag { order: 4; margin-left: 56px; } .kr-row.ask .kr-btns { order: 6; margin-left: auto; }
}

/* Start a new project: thin size labels, the started count in blue */
.log-product-size { font-weight: 300 !important; color: #4B5563; }
.log-product-count > span:first-child { color: #1A6E96; font-weight: 600; }

/* Popups never taller than the screen: the inside scrolls instead */
.modal { max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.modal .modal-body { overflow-y: auto; min-height: 0; }
.dl-modal .dl-slot { aspect-ratio: 16 / 10; }
.dl-modal .dl-text { min-height: 0; }
.dl-modal .dl-text[rows] { height: 110px; }
@media (max-width: 640px) {
  .dl-modal .dl-media { grid-template-columns: 1fr 1fr !important; gap: 10px; margin-bottom: 10px; }
  .dl-modal .dl-slot { aspect-ratio: 1 / 1; border-radius: 14px; }
  .dl-modal .dl-add { font-size: 13.5px; gap: 6px; }
  .dl-modal .dl-prompt { margin-bottom: 12px; font-size: 15px; padding: 10px 14px; }
  .dl-modal .dl-text[rows] { height: 96px; font-size: 17px; }
  .dl-modal .dl-foot { margin: 4px 2px 10px; }
}
@media (max-width: 640px) {
  .kw-tools { flex-wrap: wrap; } .kw-tools .kw-search { flex: 1 1 100%; } .kw-tools .kw-sort-wrap { margin-left: auto; }
  .kr-price { width: 58px; font-size: 14px; }
  .kr-row.ask .kr-tag { margin-left: 70px; }
}
.more-on-scroll { min-height: 1px; display: flex; justify-content: center; padding: 10px 0; }

/* ---- Nov 14: spines look like the real book: white (or dark) like its cover, no coil lines, no blue tints ---- */
.spine.is-spiral { background: linear-gradient(90deg, rgba(0,0,0,.08) 0%, rgba(255,255,255,.55) 18%, rgba(255,255,255,0) 45%, rgba(0,0,0,.04) 82%, rgba(0,0,0,.12) 100%), var(--paper, #fff) !important; }
.spine.is-spiral .spine-title { background: none !important; padding: 0 !important; }
.spine.dark.is-spiral { background: linear-gradient(90deg, rgba(0,0,0,.4) 0%, rgba(255,255,255,.1) 18%, rgba(255,255,255,0) 45%, rgba(0,0,0,.25) 100%), var(--paper) !important; }
.rs-books .spine { box-shadow: inset 0 0 0 1px rgba(0,0,0,.10), 0 1px 0 rgba(0,0,0,.08); }
.mk2-search { margin-left: auto; }
@media (max-width: 640px) { .mk2-search { margin-left: 0; flex-basis: 100%; max-width: none; } }

/* ---- Nov 14: thin "friends published today" bar at the top of Create ---- */
.fb-bar { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 1040px; margin: 0 auto 12px; padding: 7px 14px; border: 1px solid #E5E7EB; border-radius: 999px; background: #fff; font: inherit; font-size: 14px; color: #4B5563; cursor: pointer; transition: border-color .15s, background .15s; }
.fb-bar:hover { border-color: #1A6E96; }
.fb-bar.has { background: #EEF8FD; border-color: #CFE9F6; color: var(--ink); }
.fb-bar b { color: #1A6E96; font-weight: 700; }
.fb-faces { display: inline-flex; } .fb-faces .avatar { border: 2px solid #fff; margin-left: -6px; } .fb-faces .avatar:first-child { margin-left: 0; }
.fb-go { display: inline-flex; align-items: center; gap: 2px; color: #1A6E96; font-weight: 600; }
.fb-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 640px) { .fb-bar { font-size: 13px; padding: 6px 12px; gap: 8px; } .fb-go { display: none; } }

/* ---- Nov 14: computer calendar, less tall and bulky ---- */
@media (min-width: 641px) {
  .cr-page .wk { padding-top: 14px !important; padding-bottom: 14px !important; }
  .cr-page .wk-row .wk-day { height: 104px !important; min-height: 0 !important; aspect-ratio: auto !important; padding: 8px 0 8px !important; border-radius: 12px !important; border: 1px solid #D1D5DB !important; box-shadow: none !important; background-color: #fff; }
  .cr-page .wk-row .wk-day.today { border: 2px solid #1A6E96 !important; box-shadow: none !important; }
  .cr-page .wk-row .wk-dow { font-size: 11px !important; font-weight: 500 !important; }
  .cr-page .wk-row .wk-num { font-size: 18px !important; font-weight: 500 !important; }
  .cr-page .wk-row .wk-add { width: 26px; height: 26px; margin-top: auto; }
  .cr-page .wk-row .wk-side { width: 38px; height: 38px; }
  .cr-page .wk-prompt { margin-top: 10px !important; font-size: 14px !important; }
  .cr-page .wk-mobile-actions { margin-top: 8px; }
  .cr-page .wk-log-big { min-height: 44px; max-width: 280px; font-size: 16px; font-weight: 700; box-shadow: none; }
}

/* ---- Nov 14: Join the team ---- */
.cj-page { max-width: 980px; margin: 0 auto; padding-block: 8px 40px; }
.pub-home .cj-page { padding-top: 34px; }
.cj-hero { text-align: center; max-width: 680px; margin: 0 auto 22px; }
.cj-kicker { margin: 0; font-family: 'Inter', var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #1A6E96; }
.cj-hero h1 { margin: 6px 0 10px; font-size: clamp(28px, 4vw, 40px) !important; line-height: 1.1; }
.cj-hero p { margin: 0; font-size: 16.5px; line-height: 1.55; color: #4B5563; }
.cj-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 18px; }
.cj-filter button { padding: 7px 14px; border: 1px solid #E5E7EB; border-radius: 999px; background: #fff; font: inherit; font-size: 14px; color: #374151; cursor: pointer; }
.cj-filter button.on { border-color: #1A6E96; background: #EEF8FD; color: #1A6E96; font-weight: 700; }
.cj-list { display: flex; flex-direction: column; gap: 12px; }
.cj-job { padding: 18px 20px; border: 1px solid #E5E7EB; border-radius: 14px; background: #fff; scroll-margin-top: 90px; }
.cj-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.cj-team { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6B7280; }
.cj-top h2 { margin: 2px 0 0; font-size: 22px !important; line-height: 1.2; }
.cj-apply { flex: none; }
.cj-chips { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 13.5px; color: #4B5563; }
.cj-chips span { display: inline-flex; align-items: center; gap: 6px; }
.cj-chips svg { color: #1A6E96; }
.cj-sum { margin: 12px 0 0; font-size: 15.5px; line-height: 1.55; color: #1F2937; max-width: 75ch; }
.cj-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #ECEDEF; }
.cj-more h3 { margin: 0 0 6px; font-size: 15px; }
.cj-more ul { margin: 0; padding-left: 18px; color: #374151; font-size: 14.5px; line-height: 1.5; }
.cj-more li { margin: 3px 0; } .cj-more li::marker { color: #1A6E96; }
.cj-toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; }
.cj-foot, .cj-none { text-align: center; color: #6B7280; font-size: 14.5px; margin-top: 22px; }
.cj-form { display: flex; flex-direction: column; gap: 12px; }
.cj-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cj-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cj-done { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.5; margin: 0; } .cj-done svg { color: #2E9E5B; flex: none; margin-top: 3px; }
.side-hiring { display: block; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: #1A6E96; text-decoration: none; text-align: center; }
.side-hiring:hover { text-decoration: underline; }
.ja-page { max-width: 1040px; margin: 0 auto; }
.ja-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ja-head h1 { margin: 0; font-size: 28px !important; }
.ja-sub { color: #6B7280; margin: 6px 0 18px; }
.ja-status { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #F3F4F6; color: #374151; }
.ja-status.s-new { background: #94E3FB; color: #0B3A52; } .ja-status.s-interview { background: #EEF8FD; color: #1A6E96; } .ja-status.s-hired { background: #2E9E5B; color: #fff; } .ja-status.s-not-now { color: #9CA3AF; }
.ja-h { margin: 14px 0 6px; font-size: 15px; }
.ja-sel { user-select: all; }
.ja-statuses { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (max-width: 640px) {
  .cj-top { flex-direction: column; } .cj-apply { width: 100%; justify-content: center; }
  .cj-row { grid-template-columns: 1fr; }
  .cj-job { padding: 16px; }
}

/* ---- Nov 14: the page itself never scrolls sideways (inner rows still can).
   "clip" (not "hidden") keeps the sticky header and fixed side menu working. ---- */
html, body { overflow-x: clip; max-width: 100%; }
@supports not (overflow-x: clip) { body { overflow-x: hidden; } }
.app-header { position: sticky; top: 0; z-index: 40; }

/* ---- Nov 14: story card back, new design (frame, short lines, spaced capitals) ---- */
.insert-card { container-type: inline-size; }
.insert-back.ib2 { position: absolute; inset: 4.3cqw; padding: 10cqw 7cqw; border: 1px solid currentColor; color: #1F1D1A; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4.8cqw; }
.insert-card.bg-charcoal .insert-back.ib2 { color: #f4f1ec; }
.insert-back.ib2[style*="left"] { align-items: flex-start; }
.ib2-rule { display: block; width: 24cqw; height: 0; border-top: 1px solid currentColor; flex: none; }
.insert-back.ib2 h5 { margin: 0; font-size: 6.9cqw; font-weight: 400; letter-spacing: .09em; text-transform: uppercase; line-height: 1.15; color: inherit; }
.insert-back.ib2 p { margin: 0; font-size: 4.5cqw; line-height: 1.55; white-space: pre-wrap; color: inherit; opacity: .9; }
.ib2-names { font-size: 4.4cqw; letter-spacing: .32em; text-transform: uppercase; line-height: 1.2; }

/* ---- Nov 15: paperback / hardcover choice ---- */
.binding-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.binding-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid #D1D5DB; border-radius: 10px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.binding-pick button b { font-size: 15px; font-weight: 700; }
.binding-pick button small { font-size: 13px; color: #4B5563; }
.binding-pick button.on { border-color: #1A6E96; background: #EEF8FD; box-shadow: inset 0 0 0 1px #1A6E96; }
.binding-pick button:focus-visible { outline: 3px solid #B8E8F8; outline-offset: 2px; }
.binding-pick.sm { margin-top: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 260px; }
.binding-pick.sm button { padding: 6px 10px; }
.binding-pick.sm button b { font-size: 13.5px; } .binding-pick.sm button small { font-size: 12px; }

/* ---- Nov 15: no trackpad "rubber band" bounce: the page, header and side menu stay put ---- */
html, body { overscroll-behavior: none; }

/* ---- Nov 15: header search centered between the logo and the icons (computers) ---- */
@media (min-width: 861px) {
  .app-header { display: grid !important; grid-template-columns: 1fr minmax(0, 520px) 1fr; align-items: center; column-gap: 24px; }
  .app-header > .wordmark { justify-self: start; }
  .app-header > .hsearch { grid-column: 2; justify-self: stretch; width: 100%; max-width: none; margin: 0; }
  .app-header > .header-actions { grid-column: 3; justify-self: end; margin-left: 0; }
}

/* ---- Nov 15: seasonal picks at the top of the Market ---- */
.ss2 { display: flex; align-items: center; gap: 22px; margin: 4px 0 22px; padding: 14px 18px; border: 1px solid #E5E7EB; border-radius: 14px; background: #fff; }
.ss2-head { flex: none; width: 170px; }
.ss2-kicker { margin: 0; font-family: 'Inter', var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #1A6E96; }
.ss2-line { margin: 4px 0 0; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.ss2-books { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ss2-book { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid transparent; border-radius: 12px; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; min-width: 0; }
.ss2-book:hover { border-color: #E5E7EB; background: #FAFBFC; }
.ss2-book:focus-visible { outline: 3px solid #B8E8F8; outline-offset: 2px; }
.ss2-cover { flex: none; width: 74px; height: 74px; display: grid; place-items: center; }
.ss2-cover .thumb.book-thumb { width: 100%; height: 100%; background: transparent !important; box-shadow: none; overflow: visible; }
.ss2-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ss2-text b { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.ss2-text small { font-size: 12.5px; color: #6B7280; line-height: 1.3; }
.ss2-go { display: inline-flex; align-items: center; gap: 2px; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: #1A6E96; }
@media (max-width: 1000px) { .ss2 { flex-direction: column; align-items: stretch; gap: 10px; } .ss2-head { width: auto; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .ss2-line { margin: 0; } }
@media (max-width: 640px) {
  .ss2 { padding: 12px; }
  .ss2-books { display: flex; overflow-x: auto; gap: 8px; scroll-snap-type: x mandatory; margin: 0 -4px; padding: 0 4px 4px; }
  .ss2-book { flex: 0 0 82%; scroll-snap-align: start; border-color: #ECEDEF; }
}

/* ---- Nov 15: spines like real books: no logo, small refined title, centered ---- */
.spine { justify-content: center !important; padding: 8% 0 !important; }
.spine-mark { display: none !important; }
.spine-title, .rs-books .spine-title { flex: 0 1 auto; font-size: calc(var(--sw, 30px) * 0.34) !important; font-weight: 500; letter-spacing: .06em; line-height: 1; text-overflow: clip !important; white-space: nowrap; }
.spine.is-photobook .spine-title, .spine.is-board .spine-title, .spine.is-spiral .spine-title, .spine.is-shortstory .spine-title { font-size: calc(var(--sw, 30px) * 0.36) !important; }

/* ---- Nov 15: the reader feels like holding the book ---- */
.reader { background: radial-gradient(ellipse at 50% 35%, #FFFFFF 0%, #F1F2F4 60%, #E7E9EC 100%) fixed; }
.reader-pages { max-width: 1240px; padding-top: 22px; }
.reader-view { cursor: pointer; animation: leaf-turn .32s ease-out; filter: drop-shadow(0 24px 34px rgba(25,32,40,.20)) drop-shadow(0 4px 8px rgba(25,32,40,.08)); }
@keyframes leaf-turn { from { opacity: 0; transform: translateX(10px) scale(.995); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reader-view { animation: none; } }
.reader-view.n2 .leaf-r { width: min(46vw, calc(100vh - 240px), 580px); }
.reader-view.n1 .leaf-r { width: min(92vw, calc(100vh - 240px), 580px); }
.reader.is-spiral .reader-view .leaf-r { width: min(44vw, calc((100vh - 240px) * 0.773), 470px); }
.reader-view.n2 .leaf-r:first-child::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: rgba(0,0,0,.08); }
.leaf-r.cover h1 { font-family: 'Cormorant Garamond', Georgia, serif !important; font-weight: 500 !important; letter-spacing: .01em; }
.reader-nav .icon-btn { width: 42px; height: 42px; border: 1px solid #D1D5DB; background: #fff; border-radius: 50%; }
.reader-nav .small { min-width: 110px; text-align: center; }
@media (max-width: 760px) { .reader-view.n1 .leaf-r { width: min(94vw, calc(100vh - 220px)); } }

/* ---- Nov 15: six products now (Social Story retired), so six even columns, centered ---- */
@media (min-width: 641px) { .log-products { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }

/* ---- Nov 15: week calendar: Log today at the top in the logo blue, phone-shaped days, a quote below ---- */
.wk-mobile-actions { margin: 4px 0 14px !important; }
.wk-log-big, .cr-page .wk-log-big { background: #94E3FB !important; color: #0B3A52 !important; box-shadow: none !important; }
.wk-log-big:hover { background: #7FD9F6 !important; filter: none; }
.wk-log-big svg { color: #0B3A52; }
@media (min-width: 641px) {
  .cr-page .wk-row .wk-days { max-width: 760px; margin: 0 auto; }
  .cr-page .wk-row .wk-day { height: auto !important; aspect-ratio: 9 / 16 !important; }
}
.wk-quote { margin: 14px auto 0; max-width: 620px; text-align: center; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 18px; line-height: 1.4; color: #374151; }
.wk-quote span { display: block; margin-top: 4px; font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6B7280; }
@media (max-width: 640px) { .wk-quote { font-size: 16px; margin-top: 10px; } }

/* ---- Nov 15: compact week log (computers): dates left, days centered at the top, Month/Create right ---- */
@media (min-width: 641px) {
  .cr-page .wk { display: grid !important; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) auto; grid-template-areas: "info days nav" "quote quote quote"; column-gap: 20px; row-gap: 8px; align-items: start; padding-top: 14px !important; padding-bottom: 12px !important; }
  .cr-page .wk-top { display: contents; }
  .cr-page .wk-top > div:first-child { grid-area: info; padding-top: 4px; }
  .cr-page .wk-title { font-size: 20px !important; line-height: 1.15; }
  .cr-page .wk-kicker { margin-bottom: 4px; }
  .cr-page .wk-nav { grid-area: nav; display: grid; grid-template-columns: auto auto; gap: 6px; justify-items: stretch; }
  .cr-page .wk-nav .wk-arrow-m { display: grid !important; place-items: center; width: 34px; height: 34px; border: 1px solid #D1D5DB; border-radius: 50%; background: #fff; cursor: pointer; justify-self: center; }
  .cr-page .wk-nav .wk-month, .cr-page .wk-nav .wk-make { grid-column: 1 / -1; justify-content: center; height: 36px; padding: 0 16px; font-size: 14px; }
  .cr-page   .cr-page .wk-row { grid-area: days; margin: 0 !important; }
  .cr-page .wk-row .wk-side { display: none !important; }
  .cr-page .wk-row .wk-days { max-width: 600px; margin: 0 auto; gap: 8px !important; }
  .cr-page .wk-row .wk-day { aspect-ratio: 9 / 16 !important; height: auto !important; max-height: 150px; padding: 6px 0 6px !important; border-radius: 10px !important; }
  .cr-page .wk-pickbar, .cr-page .wk-quote { grid-area: quote; }
}
/* Today: a light blue outline. Day names and numbers bold and black. */
.cr-page .wk-row .wk-day.today { border: 2px solid #7FD4F5 !important; box-shadow: none !important; }
.cr-page .wk-row .wk-num { color: #111827 !important; font-weight: 800 !important; }
.cr-page .wk-row .wk-dow { color: #111827 !important; font-weight: 700 !important; }
.cr-page .wk-row .wk-day.future { opacity: 1; }
/* The quote: small and plain. */
.cr-page .wk-quote { margin: 6px auto 0 !important; font-family: var(--sans) !important; font-style: normal !important; font-size: 12.5px !important; line-height: 1.4; color: #6B7280 !important; max-width: none; }
.cr-page .wk-quote span { display: inline; margin: 0 0 0 6px; font-size: 12px; letter-spacing: 0; text-transform: none; color: #9CA3AF; }
.cr-page .wk-quote span::before { content: '— '; }
@media (min-width: 641px) {
  .cr-page .wk { grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) auto !important; column-gap: 14px !important; padding-left: 12px !important; padding-right: 12px !important; }
  .cr-page .wk-row .wk-days { gap: 6px !important; }
  .cr-page .wk-row .wk-dow { font-size: 10px !important; }
  .cr-page .wk-row .wk-num { font-size: 16px !important; }
}
@media (min-width: 641px) and (max-width: 1100px) { .cr-page .wk-title { font-size: 17px !important; } }

/* ---- Nov 15 (later): week log polish ---- */
.wk-log-side { display: none; }
@media (min-width: 641px) {
  /* Left: "Daily logger", the dates and a blue Log today, all centered */
  .cr-page .wk-top > .wk-info { grid-area: info; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding-top: 6px; }
  .cr-page .wk-kicker { font-family: var(--sans) !important; font-size: 13px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; color: #1A6E96 !important; margin: 0 !important; }
  .cr-page .wk-title { font-family: var(--sans) !important; font-weight: 700 !important; }
  .wk-log-side { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: #94E3FB; color: #0B3A52; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
  .wk-log-side:hover { background: #7FD9F6; }
  .wk-log-side:focus-visible { outline: 3px solid #1A6E96; outline-offset: 2px; }
  /* Arrows beside the week */
  .cr-page .wk-row { display: flex !important; align-items: center; gap: 8px; }
  .cr-page .wk-row .wk-side { display: grid !important; place-items: center; flex: none; width: 34px; height: 34px; border: 1px solid #D1D5DB; border-radius: 50%; background: #fff; cursor: pointer; }
  .cr-page .wk-row .wk-days { flex: 1; min-width: 0; }
  /* Month and Create at the top right; no arrows there */
  .cr-page .wk-nav { align-self: start; grid-template-columns: 1fr !important; }
  .cr-page .wk-nav .wk-arrow-m { display: none !important; }
}
/* Today: a clear outline. Coming days: light gray, so it's clear they haven't happened yet. */
.cr-page .wk-row .wk-day.today { border: 2px solid #1A6E96 !important; }
.cr-page .wk-row .wk-day.future { background: #F3F4F6 !important; border-color: #E5E7EB !important; }
.cr-page .wk-row .wk-day.future .wk-num, .cr-page .wk-row .wk-day.future .wk-dow { color: #9CA3AF !important; }
/* Mid-size windows: Month and Create tuck under Log today so the week has room. */
@media (min-width: 641px) and (max-width: 1200px) {
  .cr-page .wk { grid-template-columns: 150px minmax(0, 1fr) !important; grid-template-areas: "info days" "nav days" "quote quote" !important; }
  .cr-page .wk-nav { display: flex !important; justify-content: center; gap: 6px; }
  .cr-page .wk-nav .wk-month, .cr-page .wk-nav .wk-make { height: 32px; padding: 0 12px; font-size: 13px; }
  .cr-page .wk-row .wk-side { width: 30px; height: 30px; }
  .cr-page .wk-row .wk-day .wk-add { width: 22px; height: 22px; }
}

/* ---- Nov 15: logging a day: one media box and one writing box, side by side ---- */
.modal.dl2-modal { width: min(760px, 100%); }
.dl2-line { margin: 0 0 14px; font-size: 16px; font-weight: 600; color: #374151; }
.dl2-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dl2-box { position: relative; aspect-ratio: 4 / 5; max-height: calc(100vh - 300px); min-height: 220px; border-radius: 16px; overflow: hidden; border: 1px solid #E5E7EB; background: #F5F6F7; }
.dl2-media img, .dl2-media video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.dl2-add { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; border: 0; background: transparent; font: inherit; color: #374151; cursor: pointer; text-align: center; }
.dl2-add:hover { background: #EEF0F2; }
.dl2-plus { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #1A6E96; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.dl2-plus svg.i { width: 30px; height: 30px; }
.dl2-add b { font-size: 16px; }
.dl2-add small { font-size: 13px; color: #6B7280; }
.dl2-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(17,17,17,.7); color: #fff; cursor: pointer; }
.dl2-swap { position: absolute; left: 10px; bottom: 10px; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.92); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.dl2-words { background: #fff; }
.dl2-words textarea { width: 100%; height: 100%; padding: 18px 18px 34px; border: 0; outline: none; resize: none; font-family: var(--book); font-size: 18px; line-height: 1.55; color: var(--ink); background: transparent; }
.dl2-words:focus-within { border-color: #1A6E96; box-shadow: 0 0 0 3px #E3F6FD; }
.dl2-count { position: absolute; right: 14px; bottom: 10px; font-size: 12px; color: #9CA3AF; }
.dl2-save { margin-top: 16px; }
@media (max-width: 640px) {
  .dl2-boxes { gap: 10px; }
  .dl2-box { aspect-ratio: 3 / 4; min-height: 0; }
  .dl2-plus { width: 50px; height: 50px; }
  .dl2-add b { font-size: 14px; } .dl2-add small { font-size: 12px; }
  .dl2-words textarea { font-size: 16px; padding: 12px 12px 30px; }
}

/* ---- Nov 15: "We're hiring" lives in the header, by notifications ---- */
.header-hiring { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; margin-right: 6px; border: 1px solid #CFE9F6; border-radius: 999px; background: #EEF8FD; color: #1A6E96; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-hiring:hover { background: #E3F6FD; }
@media (max-width: 640px) { .header-hiring { display: none; } }

/* ---- Nov 15: seasonal strip without the heading, books centered ---- */
.ss2 { justify-content: center; }
.ss2-books { flex: 0 1 900px; margin: 0 auto; }
.ss2-book { justify-content: center; }
@media (max-width: 1000px) { .ss2-books { flex: 1 1 auto; } }
/* "We're hiring" as plain blue words, no bubble */
.header-hiring { height: auto !important; padding: 0 !important; margin-right: 14px !important; border: 0 !important; background: none !important; font-size: 13px !important; font-weight: 600 !important; color: #1A6E96 !important; }
.header-hiring:hover { background: none !important; text-decoration: underline; }

/* ---- Nov 16: refunds and returns ---- */
.rf-help { margin: 32px 0 8px; padding: 22px; border: 1px solid #E5E7EB; border-radius: 14px; background: #fff; text-align: center; }
.rf-help p { margin: 0 0 14px; color: #374151; }
.rf-form { display: flex; flex-direction: column; gap: 12px; }
.rf-sent { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 16px; line-height: 1.5; } .rf-sent svg { color: #2E9E5B; flex: none; margin-top: 3px; }
.ai-topic { display: inline-block; align-self: flex-start; padding: 2px 8px; margin-bottom: 3px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 11.5px; font-weight: 700; }
.ai-refund-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: #FFFBEB; }
.ai-orders { border-bottom: 1px solid var(--line); }
.ai-orders-toggle { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 16px; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.ai-order-list { display: flex; flex-direction: column; gap: 6px; padding: 0 16px 12px; max-height: 260px; overflow-y: auto; }
.ai-order { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #E5E7EB; border-radius: 10px; font-size: 13.5px; }


/* ==== All blue fills use the logo blue (#94E3FB) with navy words ==== */
.vn-big,
.vn-choice.on .vn-radio,
.bs-card:hover .bs-cart,
.log-product:hover .log-product-go,
.wk-day.chosen .wk-check,
.cr-new-icon,
.sf-scratch-icon,
.dc-mic,
.dc-btn.big,
.sr-mic,
li.done .td2-box,
.fg-task.done .td2-box,
.ve-playall span,
.ve-track.on .ve-track-dot,
.ve-trim-bar,
.gt-new-icon,
.ve-empty-icon,
.au-dash-icon,
.au-dash-go,
.sv-ok > .i,
.wk-log-big,
.easy-btn,
.nb-page .sf-scratch,
.ja-status.s-new { color: #0B3A52 !important; }
.vn-big b, .vn-big small, .vn-big svg,
.vn-choice.on .vn-radio b, .vn-choice.on .vn-radio small, .vn-choice.on .vn-radio svg,
.bs-card:hover .bs-cart b, .bs-card:hover .bs-cart small, .bs-card:hover .bs-cart svg,
.log-product:hover .log-product-go b, .log-product:hover .log-product-go small, .log-product:hover .log-product-go svg,
.wk-day.chosen .wk-check b, .wk-day.chosen .wk-check small, .wk-day.chosen .wk-check svg,
.cr-new-icon b, .cr-new-icon small, .cr-new-icon svg,
.sf-scratch-icon b, .sf-scratch-icon small, .sf-scratch-icon svg,
.dc-mic b, .dc-mic small, .dc-mic svg,
.dc-btn.big b, .dc-btn.big small, .dc-btn.big svg,
.sr-mic b, .sr-mic small, .sr-mic svg,
li.done .td2-box b, li.done .td2-box small, li.done .td2-box svg,
.fg-task.done .td2-box b, .fg-task.done .td2-box small, .fg-task.done .td2-box svg,
.ve-playall span b, .ve-playall span small, .ve-playall span svg,
.ve-track.on .ve-track-dot b, .ve-track.on .ve-track-dot small, .ve-track.on .ve-track-dot svg,
.ve-trim-bar b, .ve-trim-bar small, .ve-trim-bar svg,
.gt-new-icon b, .gt-new-icon small, .gt-new-icon svg,
.ve-empty-icon b, .ve-empty-icon small, .ve-empty-icon svg,
.au-dash-icon b, .au-dash-icon small, .au-dash-icon svg,
.au-dash-go b, .au-dash-go small, .au-dash-go svg,
.sv-ok > .i b, .sv-ok > .i small, .sv-ok > .i svg,
.wk-log-big b, .wk-log-big small, .wk-log-big svg,
.easy-btn b, .easy-btn small, .easy-btn svg,
.nb-page .sf-scratch b, .nb-page .sf-scratch small, .nb-page .sf-scratch svg,
.ja-status.s-new b, .ja-status.s-new small, .ja-status.s-new svg { color: #0B3A52 !important; }
.nb-page .sf-scratch-icon { background: #fff !important; color: #0B3A52 !important; }

/* ==== Templates everywhere: the title sits in a circle, details below. The circle grows a little on hover. ==== */
.sf-bubbles, .tpl-bubbles { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 26px 18px !important; width: 100%; }
.sf-bubble, .tpl-bubble { display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; padding: 6px 4px !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; cursor: pointer; font: inherit; color: var(--ink); text-align: center; height: auto !important; min-height: 0 !important; }
.sf-bubble .sf-bubble-circle { all: unset; box-sizing: border-box; width: 100%; max-width: 150px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; border-radius: 50%; background: #E3F6FD; border: 2px solid #94E3FB; color: #0B3A52; transition: transform .2s ease, background .2s, box-shadow .2s; }
.sf-bubble .sf-bubble-circle b { font-family: var(--display); font-size: 16px; font-weight: 800; line-height: 1.2; color: #0B3A52; }
.sf-bubble .sf-bubble-circle svg { color: #0B3A52; }
.sf-bubble:hover:not(:disabled) .sf-bubble-circle, .sf-bubble:focus-visible .sf-bubble-circle { transform: scale(1.1); background: #94E3FB !important; box-shadow: 0 10px 22px rgba(60,170,210,.28); }
.sf-bubble:focus-visible { outline: none; }
.sf-bubble:focus-visible .sf-bubble-circle { outline: 3px solid #0B3A52; outline-offset: 3px; }
.sf-bubble small { max-width: 180px; font-size: 13.5px; font-weight: 400; line-height: 1.4; color: #4B5563; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sf-bubble .tp-tpl-kind { margin: 0; }
.sf-bubble.busy { opacity: .6; }
.tpl-bubble-skel { width: 100%; max-width: 150px; aspect-ratio: 1; border-radius: 50%; justify-self: center; }
.cs-tpls.tpl-bubbles .cs-all { align-self: center; justify-self: center; }
@media (prefers-reduced-motion: reduce) { .sf-bubble .sf-bubble-circle { transition: none; } .sf-bubble:hover .sf-bubble-circle { transform: none; } }
@media (max-width: 640px) {
  .sf-bubbles, .tpl-bubbles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px 12px !important; }
  .sf-bubble .sf-bubble-circle { max-width: 136px; padding: 12px; }
  .sf-bubble .sf-bubble-circle b { font-size: 15px; }
}

/* Size and cover type, side by side under the product name */
.nb-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.nb-spec { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; border: 1px solid #D1D5DB; background: #fff; font-size: 14px; font-weight: 400; color: var(--ink); }
.nb-spec.cover { background: #E3F6FD; border-color: #94E3FB; color: #0B3A52; }
.nb-for { font-size: 14px; color: #4B5563; }

/* ==== eBook: Send to Kindle steps ==== */
.kd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.kd-steps li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.kd-n { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #94E3FB; color: #0B3A52; font-weight: 800; font-size: 17px; }
.kd-steps b { font-size: 17px; }
.kd-steps p { margin: 4px 0 10px; color: #4B5563; font-size: 15px; line-height: 1.5; }
.kd-steps .btn { display: inline-flex; align-items: center; gap: 8px; }
.kd-note { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid #E5E7EB; color: #4B5563; font-size: 14px; }

/* ==== Side menu: a short line under Journal, Studio and Library ==== */
.sidebar .nav-item { align-items: center; }
.nav-words { display: flex; flex-direction: column; line-height: 1.15; }
.nav-sub { font-size: 12.5px; font-weight: 400; color: #6B7280; margin-top: 2px; }
.nav-item.active .nav-sub { color: #0B3A52; }

/* ==== Journal: private writing, PIN-locked ==== */
.jn-page { max-width: 880px; margin: 0 auto; }
.jn-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.jn-head > div:first-child { flex: 1; }
.jn-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #0B3A52; }
.jn-title { margin: 0; font-family: var(--display); font-size: 36px; font-weight: 800; }
.jn-sub { margin: 6px 0 0; max-width: 560px; font-size: 16px; line-height: 1.5; color: #4B5563; }
.jn-head-tools { display: flex; align-items: center; gap: 12px; flex: none; }
.jn-lockbtn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid #D1D5DB; border-radius: 999px; background: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.jn-lockbtn:hover { border-color: #94E3FB; background: #E3F6FD; }
.jn-new { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px 22px; border: 0; border-radius: 18px; background: #94E3FB; color: #0B3A52; font: inherit; text-align: left; cursor: pointer; }
.jn-new:hover { background: #7FD9F6; }
.jn-new-icon { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #0B3A52; }
.jn-new b { display: block; font-size: 21px; }
.jn-new small { display: block; margin-top: 2px; font-size: 15px; color: #0B3A52; }
.jn-sec { margin-top: 30px; }
.jn-sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.jn-h2 { margin: 0 0 6px; font-family: var(--display); font-size: 22px; font-weight: 800; }
.jn-p { margin: 0 0 12px; color: #4B5563; font-size: 15px; line-height: 1.5; }
.jn-pick { padding: 9px 16px; border: 1px solid #94E3FB; border-radius: 999px; background: #E3F6FD; color: #0B3A52; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.jn-pick:disabled { opacity: .5; cursor: default; }
.jn-pickbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 10px; padding: 12px 16px; border-radius: 12px; background: #E3F6FD; color: #0B3A52; font-size: 15px; }
.jn-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #E5E7EB; }
.jn-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 6px; border: 0; border-bottom: 1px solid #E5E7EB; background: none; font: inherit; text-align: left; cursor: pointer; }
.jn-row:hover, .jn-row.on { background: #F5FBFE; }
.jn-row-main { flex: 1; min-width: 0; }
.jn-row-main b { display: block; font-size: 17px; }
.jn-row-main small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 14.5px; line-height: 1.45; color: #4B5563; }
.jn-row-meta { flex: none; text-align: right; font-size: 13px; color: #6B7280; line-height: 1.5; }
.jn-check { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid #94E3FB; border-radius: 6px; background: #fff; color: #0B3A52; }
.jn-row.on .jn-check { background: #94E3FB; }
.jn-empty { padding: 30px 0; text-align: center; color: #6B7280; font-size: 16px; }
.jn-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: #94E3FB; color: #0B3A52; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.jn-go:hover:not(:disabled) { background: #7FD9F6; }
.jn-go:disabled { opacity: .5; cursor: default; }
.jn-go.sm { min-height: 42px; padding: 0 20px; font-size: 15px; }
/* Lock screen */
.jn-lock { max-width: 420px; margin: 40px auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.jn-lock-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: #E3F6FD; color: #0B3A52; }
.jn-lock-title { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 800; }
.jn-lock-sub { margin: 0; font-size: 16px; line-height: 1.5; color: #4B5563; }
.jn-lock-label { display: flex; flex-direction: column; gap: 6px; width: 100%; font-size: 15px; font-weight: 700; text-align: left; margin-bottom: 12px; }
.jn-pin { width: 100%; box-sizing: border-box; height: 60px; padding: 0 18px; border: 2px solid #D1D5DB; border-radius: 14px; font: inherit; font-size: 28px; letter-spacing: .4em; text-align: center; }
.jn-pin:focus { outline: none; border-color: #94E3FB; box-shadow: 0 0 0 4px #E3F6FD; }
.jn-lock .jn-go { width: 100%; }
/* Writing page */
.jn-write-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.jn-saved { font-size: 14px; color: #6B7280; }
.jn-date { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #0B3A52; }
.jn-title-in { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid #E5E7EB; padding: 6px 0 10px; font-family: var(--display); font-size: 28px; font-weight: 800; background: none; color: var(--ink); }
.jn-title-in:focus { outline: none; border-bottom-color: #94E3FB; }
.jn-tools { margin: 14px 0; }
.jn-body { width: 100%; box-sizing: border-box; min-height: 55vh; padding: 18px 20px; border: 1px solid #E5E7EB; border-radius: 14px; font-family: Georgia, serif; font-size: 19px; line-height: 1.75; color: var(--ink); resize: vertical; background: #fff; }
.jn-body:focus { outline: none; border-color: #94E3FB; box-shadow: 0 0 0 4px #E3F6FD; }
.jn-foot { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.jn-count { font-size: 14px; color: #6B7280; }
@media (max-width: 640px) {
  .jn-head { flex-direction: column; gap: 10px; }
  .jn-title { font-size: 30px; }
  .jn-new { padding: 16px; } .jn-new b { font-size: 19px; }
  .jn-sec-head .pf-search { order: 3; width: 100%; }
  .jn-body { min-height: 50vh; font-size: 18px; padding: 14px; }
  .jn-foot { flex-wrap: wrap; }
}

/* ==== Journal, simplified: lots of white space, one action, quiet extras ==== */
.jn-page { max-width: 720px; }
.jn-head { align-items: center; margin-bottom: 24px; }
.jn-title { font-size: 34px; }
.jn-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 15px; color: #6B7280; }
.jn-new { justify-content: center; gap: 10px; padding: 0; min-height: 60px; border-radius: 999px; font-size: 20px; font-weight: 800; }
.jn-new svg { color: #0B3A52; }
.jn-search { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; padding: 0 16px; height: 46px; border: 1px solid #E5E7EB; border-radius: 999px; color: #6B7280; }
.jn-search input { flex: 1; border: 0; outline: none; font: inherit; font-size: 16px; background: none; color: var(--ink); }
.jn-search:focus-within { border-color: #94E3FB; }
.jn-pickbar { margin: 18px 0 0; }
.jn-list { margin-top: 18px; border-top: 0; }
.jn-row { align-items: baseline; gap: 18px; padding: 18px 4px; border-bottom: 1px solid #F0F1F3; }
.jn-row:hover, .jn-row.on { background: none; }
.jn-row:hover .jn-row-main b { color: #0B3A52; text-decoration: underline; text-decoration-color: #94E3FB; text-underline-offset: 4px; }
.jn-row-date { flex: none; width: 96px; font-size: 14px; color: #6B7280; }
.jn-row-main b { font-size: 18px; font-weight: 700; }
.jn-row-main small { -webkit-line-clamp: 1; }
.jn-check { align-self: center; }
.jn-empty { padding: 50px 0; }
.jn-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 26px; color: #6B7280; }
.jn-quiet .link { color: #6B7280; }
.jn-quiet .link:hover { color: #0B3A52; }
/* Writing page: just the words */
.jn-write-bar { gap: 14px; margin-bottom: 26px; }
.jn-back { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: #4B5563; text-decoration: none; }
.jn-back:hover { color: #0B3A52; }
.jn-write .dc-btn { height: 40px; border-radius: 999px; }
.jn-date { color: #6B7280; font-weight: 400; }
.jn-title-in { border-bottom: 0; padding: 4px 0 8px; font-size: 32px; }
.jn-body { min-height: 60vh; padding: 6px 0; border: 0; border-radius: 0; font-size: 20px; line-height: 1.8; resize: none; }
.jn-body:focus { box-shadow: none; }
.jn-write .jn-quiet { padding-top: 14px; border-top: 1px solid #F0F1F3; }
@media (max-width: 640px) {
  .jn-row { flex-direction: column; gap: 2px; }
  .jn-row-date { width: auto; font-size: 13px; }
  .jn-title-in { font-size: 26px; }
  .jn-body { font-size: 18px; }
}

/* Earnings: tap to switch period */
.db-earned { position: relative; padding: 0 !important; }
.db-earned-btn { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: inherit; gap: inherit; padding: inherit; border: 0; border-radius: inherit; background: none; font: inherit; color: inherit; text-align: inherit; cursor: pointer; padding: 16px 18px; }
.db-earned-btn span { display: inline-flex; align-items: center; gap: 4px; }
.db-earned-btn:hover span { color: #0B3A52; }
.db-earned-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 220px; padding: 6px; border: 1px solid #E5E7EB; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.db-earned-menu button { width: 100%; display: flex; justify-content: space-between; gap: 16px; padding: 11px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.db-earned-menu button:hover { background: #F5FBFE; }
.db-earned-menu button.on { background: #E3F6FD; color: #0B3A52; font-weight: 700; }
@media (min-width: 641px) { .db-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { .jn-head { flex-direction: row !important; align-items: center !important; justify-content: space-between; } .jn-head > div:first-child { text-align: left; } .jn-sub { justify-content: flex-start; } }

/* Side menu: bigger main titles, set apart from the small line under them */
.sidebar .nav-item { padding-top: 12px; padding-bottom: 12px; }
.sidebar .nav-label { font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.sidebar .nav-sub { margin-top: 5px; font-size: 12.5px; font-weight: 400; color: #6B7280; }
.sidebar .nav-item svg { width: 22px; height: 22px; }

/* ==== Journal: daily moments on top, writing below, PIN to open ==== */
.jn-home { max-width: 960px; }
.jn-entries { max-width: 720px; margin: 0 auto; }
.jn-entries .jn-h2 { margin-bottom: 12px; }
.jn-locked { width: 100%; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 22px 24px; border: 1px solid #E5E7EB; border-radius: 20px; background: linear-gradient(180deg, #F7FCFE, #fff); font: inherit; text-align: left; cursor: pointer; }
.jn-locked:hover { border-color: #94E3FB; }
.jn-locked-icon { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #E3F6FD; color: #0B3A52; }
.jn-locked b { display: block; font-size: 19px; }
.jn-locked small { display: block; margin-top: 3px; font-size: 15px; color: #6B7280; }
.jn-locked > span:nth-child(2) { flex: 1; }
.jn-locked-go { flex: none; padding: 11px 20px; border-radius: 999px; background: #94E3FB; color: #0B3A52; font-weight: 800; font-size: 16px; }
.jn-lock.compact { margin: 4px auto 0; gap: 12px; }
.jn-lock.compact .jn-lock-sub { margin-bottom: 4px; }
/* A saved day while the journal is locked: soft blue, small lock, no content shown */
.wk-day.logged { background: #E3F6FD !important; border-color: #94E3FB !important; }
.wk-logged { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #0B3A52; box-shadow: 0 2px 6px rgba(11,58,82,.12); }
@media (max-width: 640px) {
  .jn-locked { padding: 18px; gap: 12px; flex-wrap: wrap; }
  .jn-locked-go { width: 100%; text-align: center; }
}

/* ==== Manager studio ==== */
.ms-page { max-width: 980px; margin: 0 auto; }
.ms-head { margin-bottom: 24px; }
.ms-title { margin: 0; font-family: var(--display); font-size: 34px; font-weight: 800; }
.ms-sub { margin: 4px 0 0; font-size: 16px; color: #6B7280; }
.ms-group { margin-bottom: 28px; }
.ms-h2 { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6B7280; }
.ms-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ms-card { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid #E5E7EB; border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ms-card:hover { border-color: #94E3FB; box-shadow: 0 8px 22px rgba(60,170,210,.14); transform: translateY(-2px); }
.ms-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #E3F6FD; color: #0B3A52; }
.ms-words b { display: block; font-size: 17px; }
.ms-words small { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: #6B7280; }
.ms-count { position: absolute; top: 14px; right: 14px; padding: 3px 10px; border-radius: 999px; background: #94E3FB; color: #0B3A52; font-size: 12.5px; font-weight: 800; }
.ms-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: #4B5563; text-decoration: none; font-size: 15px; }
.ms-back:hover { color: #0B3A52; }
.ms-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 26px; }
.ms-role { padding: 14px 16px; border-radius: 14px; background: #F5FBFE; border: 1px solid #E3F6FD; }
.ms-role b { display: block; font-size: 16px; color: #0B3A52; }
.ms-role small { display: block; margin-top: 3px; font-size: 14px; color: #4B5563; line-height: 1.45; }
.ms-add { margin-bottom: 28px; }
.ms-p { margin: 0 0 10px; color: #6B7280; font-size: 15px; }
.ms-add-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ms-add-row .input[type=email] { flex: 1 1 260px; }
.ms-add-row select { flex: 0 0 160px; }
.ms-go { min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px; background: #94E3FB; color: #0B3A52; font: inherit; font-weight: 800; cursor: pointer; }
.ms-go:disabled { opacity: .5; cursor: default; }
.ms-team { list-style: none; margin: 0; padding: 0; border-top: 1px solid #F0F1F3; }
.ms-team li { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid #F0F1F3; }
.ms-who { flex: 1; min-width: 0; }
.ms-who b { display: block; font-size: 16px; }
.ms-who small { display: block; color: #6B7280; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.ms-tag { font-size: 13.5px; color: #0B3A52; background: #E3F6FD; padding: 5px 12px; border-radius: 999px; }
.ms-role-pick { width: auto; min-width: 170px; }
.menu .menu-manage { font-weight: 800; color: #0B3A52; }
@media (max-width: 640px) { .ms-title { font-size: 28px; } .ms-team li { flex-wrap: wrap; } .ms-role-pick { width: 100%; } }
.ms-count { position: static; flex: none; margin-left: auto; white-space: nowrap; } .ms-words { flex: 1; min-width: 0; }

/* ==== Product start page: title and sizes | book | Start from scratch, then quick-start templates ==== */
.nb-page { max-width: 1180px; }
.nb-hero { display: grid; grid-template-columns: minmax(0, auto) auto minmax(0, 1fr); align-items: center; column-gap: 48px; row-gap: 0; padding: 18px 0 8px; }
.nb-hero .nb-head { display: contents; }
.nb-hero .sf-choice { display: contents; }
.nb-words { text-align: center; }
.nb-title { font-family: var(--display); font-size: 46px !important; font-weight: 900; letter-spacing: -.02em; line-height: 1.05; margin: 0; }
.nb-specs { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.nb-specs li { font-size: 20px; font-weight: 400; color: var(--ink); }
.nb-specs li.nb-for { font-size: 15px; color: #6B7280; }
.nb-hero .nb-art { width: 190px !important; height: 250px !important; }
.nb-hero .sf-scratch { width: 100% !important; max-width: 380px; justify-self: start; padding: 26px 28px !important; border-radius: 6px !important; box-shadow: 0 14px 26px rgba(60,170,210,.22) !important; }
.nb-hero .sf-scratch b { font-size: 26px !important; }
.nb-hero .sf-or { grid-column: 1 / -1; margin: 46px 0 22px !important; text-align: center; font-size: 22px !important; font-weight: 400 !important; letter-spacing: .01em !important; text-transform: none !important; color: var(--ink) !important; }
.nb-hero .sf-or::before, .nb-hero .sf-or::after { display: none !important; }
.nb-hero .sf-bubbles { grid-column: 1 / -1; }

/* Templates everywhere: a bold title with a short line under it. No boxes,
   no circles. It grows a little when you point at it. */
.sf-bubbles, .tpl-bubbles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 30px 26px !important; }
.sf-bubble .sf-bubble-circle { all: unset; display: block; text-align: center; }
.sf-bubble .sf-bubble-circle svg { display: none; }
.sf-bubble .sf-bubble-circle b { font-family: var(--display); font-size: 30px; font-weight: 900; letter-spacing: -.01em; line-height: 1.1; color: var(--ink); }
.sf-bubble small { max-width: 240px; margin: 2px auto 0; font-size: 15px; line-height: 1.5; letter-spacing: .02em; color: #374151; -webkit-line-clamp: 3; }
.sf-bubble { transition: transform .2s ease; padding: 10px 6px !important; }
.sf-bubble:hover:not(:disabled), .sf-bubble:focus-visible { transform: scale(1.06); }
.sf-bubble:hover:not(:disabled) .sf-bubble-circle, .sf-bubble:focus-visible .sf-bubble-circle { transform: none; background: none !important; box-shadow: none; }
.sf-bubble:hover:not(:disabled) .sf-bubble-circle b { color: #0B3A52; }
.sf-bubble:focus-visible { outline: 3px solid #94E3FB; outline-offset: 4px; border-radius: 8px !important; }
.sf-bubble:focus-visible .sf-bubble-circle { outline: none; }
.tpl-bubble-skel { max-width: 200px; height: 70px; aspect-ratio: auto; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .sf-bubble:hover { transform: none; } }
@media (max-width: 900px) {
  .nb-hero { grid-template-columns: 1fr auto; column-gap: 24px; row-gap: 22px; }
  .nb-hero .sf-scratch { grid-column: 1 / -1; max-width: none; justify-self: stretch; }
  .nb-hero .nb-art { width: 140px !important; height: 185px !important; }
}
@media (max-width: 640px) {
  .nb-title { font-size: 34px !important; }
  .nb-specs { margin-top: 12px; gap: 8px; } .nb-specs li { font-size: 17px; }
  .nb-hero .nb-art { width: 110px !important; height: 145px !important; }
  .nb-hero .sf-or { margin: 30px 0 14px !important; font-size: 19px !important; }
  .sf-bubbles, .tpl-bubbles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 22px 12px !important; }
  .sf-bubble .sf-bubble-circle b { font-size: 22px; }
  .sf-bubble small { font-size: 13.5px; }
}
.nb-hero .nb-art img, .nb-hero .nb-art svg { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.14)); }
.nb-hero { grid-template-columns: auto auto minmax(320px, 1fr); column-gap: 40px; }
.nb-hero .sf-scratch b { font-size: 24px !important; white-space: nowrap; }
@media (max-width: 1100px) and (min-width: 901px) { .nb-hero .nb-art { width: 150px !important; height: 200px !important; } .nb-title { font-size: 38px !important; } }
@media (max-width: 900px) {
  .nb-hero { grid-template-columns: minmax(0, 1fr) auto !important; column-gap: 16px; }
  .nb-hero .sf-scratch { grid-column: 1 / -1; width: 100% !important; max-width: none; min-width: 0; box-sizing: border-box; }
  .nb-hero .sf-scratch b { white-space: normal; }
  .nb-hero .sf-or, .nb-hero .sf-bubbles { min-width: 0; }
}
@media (max-width: 640px) { .nb-hero .sf-scratch { padding: 18px !important; } .nb-hero .sf-scratch b { font-size: 21px !important; } }

/* ==== Typography: Inter everywhere (crisp and professional). The logo keeps its own type. ==== */
:root, :root[data-theme] { --serif: 'Inter', 'Helvetica Neue', Arial, sans-serif; --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif; --display: 'Inter', 'Helvetica Neue', Arial, sans-serif; }
body, button, input, select, textarea { font-family: var(--sans); }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'cv11', 'ss01'; }
h1, h2, h3, .nb-title, .jn-title, .ms-title, .tp-title, .cs-title, .lx-title { letter-spacing: -.02em; }
h1 { font-weight: 700; }
.wordmark, .wordmark-text { font-family: 'Nunito', 'Nunito Sans', sans-serif; }
.nb-title, .jn-title, .ms-title { font-weight: 800; }
.sf-bubble .sf-bubble-circle b { font-weight: 700; letter-spacing: -.015em; }
.nav-label { font-weight: 700 !important; }

/* ==== Blue, used sparingly: circles and small accents only. No blue rounded-rectangle buttons. ==== */
/* Main actions: black, rounded ends (same as the rest of the site's main buttons). */
.wk-log-big, .wk-log-side, .jn-new, .jn-go, .ms-go, .jn-locked-go, .dl2-save {
  background: #1F2328 !important; color: #fff !important; border: 0 !important; box-shadow: none !important;
}
.wk-log-big svg, .wk-log-side svg, .jn-new svg, .jn-go svg, .ms-go svg { color: #fff !important; }
.wk-log-big:hover, .wk-log-side:hover, .jn-new:hover, .jn-go:hover:not(:disabled), .ms-go:hover:not(:disabled) { background: #000 !important; }
/* Quieter actions: outlined. */
.jn-pick { background: #fff !important; border: 1px solid #D1D5DB !important; color: var(--ink) !important; }
.jn-pick:hover:not(:disabled) { border-color: #1F2328 !important; }
/* Start from scratch: a white card with a blue circle, not a blue box. */
.nb-page .sf-scratch, .nb-hero .sf-scratch { background: #fff !important; color: var(--ink) !important; border: 1px solid #E5E7EB !important; border-radius: 18px !important; box-shadow: 0 10px 26px rgba(20,30,50,.07) !important; }
.nb-page .sf-scratch:hover { border-color: #94E3FB !important; filter: none; }
.nb-page .sf-scratch b, .nb-hero .sf-scratch b { color: var(--ink) !important; }
.nb-page .sf-scratch small, .nb-hero .sf-scratch small { color: #4B5563 !important; }
.nb-page .sf-scratch-icon { background: #94E3FB !important; color: #0B3A52 !important; border-radius: 50% !important; }
.nb-page .sf-scratch-icon svg { color: #0B3A52 !important; }
/* Menu: the active page gets a blue circle behind its icon, no blue box. */
.nav-item.active, .top-nav-item.active, .ct-tab.on, .mobile-nav a.active { background: transparent !important; }
.nav-item svg, .mobile-nav a svg { box-sizing: content-box; padding: 7px; border-radius: 50%; transition: background .15s; }
.nav-item.active svg, .mobile-nav a.active svg { background: #94E3FB !important; color: #0B3A52 !important; }
.nav-item.active .nav-label, .mobile-nav a.active { color: var(--ink) !important; }
.nav-item:hover:not(.active) svg { background: #F3F4F6; }
.ct-tab.on { font-weight: 700; box-shadow: inset 0 -2px 0 #1F2328 !important; border-radius: 0 !important; }
/* Small things: icons sit in circles; badges are plain text or round dots. */
.ms-icon { border-radius: 50% !important; }
.ms-count { background: none !important; padding: 0 !important; color: #0B3A52 !important; font-size: 13px !important; }
.ms-count::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #94E3FB; vertical-align: 1px; }
.ms-role { background: #fff !important; border: 1px solid #E5E7EB !important; }
.ms-tag { background: none !important; padding: 0 !important; color: #6B7280 !important; }
.jn-pickbar { background: #fff !important; border: 1px solid #E5E7EB; }
.jn-locked { background: #fff !important; }
.db-earned-menu button.on { background: none !important; font-weight: 800; }
.db-earned-menu button.on::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #94E3FB; align-self: center; margin-left: 8px; }
.nb-spec, .nb-spec.cover { background: none !important; border: 0 !important; padding: 0 !important; }
.wk-day.logged { background: #fff !important; border-color: #94E3FB !important; }

/* ==== Centered, with more white space ==== */
.main { padding: 44px 56px 110px !important; }
.page { margin-left: auto !important; margin-right: auto !important; }
.page > section, .page > div { margin-bottom: 40px; }
/* Page and section headings: centered */
.page h1, .page > header, .page > section > h2, .page .kw-head, .page .rs-head, .ms-head, .jn-head, .ms-h2, .jn-h2 { text-align: center; }
.kw-head, .rs-head { flex-direction: column; align-items: center !important; justify-content: center !important; gap: 14px !important; margin-bottom: 22px !important; }
.mk2-top { justify-content: center !important; gap: 18px !important; margin: 10px 0 36px !important; }
.lib2-tabs { display: flex; justify-content: center; margin-bottom: 26px; }
/* Book cards: title and details centered under the cover */
.mk-title, .mk-meta, .mk-card .mk-by, .mk-kind, .lib2 .mk-sub { text-align: center; justify-content: center; }
/* Journal and Manager studio headers: title centered, the small button underneath */
.jn-head, .ms-head { flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 12px !important; margin-bottom: 34px !important; }
.jn-sub { justify-content: center !important; }
.jn-head > div:first-child { text-align: center !important; }
.ms-sub { margin-left: auto; margin-right: auto; }
.ms-group { margin-bottom: 44px; }
.ms-cards { gap: 18px; }
.ms-card { padding: 22px; }
.jn-new { max-width: 420px; margin: 0 auto; }
.jn-quiet { justify-content: center; }
.nb-hero { padding-top: 30px; }
@media (max-width: 900px) { .main { padding: 28px 22px 110px !important; } }
@media (max-width: 640px) { .main { padding: 20px 16px 110px !important; } .page > section, .page > div { margin-bottom: 30px; } }
.lib-tools { justify-content: center !important; margin-bottom: 28px !important; }
.mk-body { text-align: center; }
.mk-body .type-label { justify-content: center; width: 100%; }
.mk-desc { text-align: center; }
.mk2-top { flex-direction: column; }
.mk2-top > .mk2-search { margin-left: 0 !important; flex: 0 1 auto !important; width: min(460px, 100%); }
.bs-card { text-align: center; }
.bs-title { text-align: center !important; }
.bs-card .bs-vis, .bs-card .bs-meta, .bs-card .bs-price { justify-content: center; }
.wk-mobile-actions { display: none !important; }

/* ==== Book grids: covers centered in their cards, and every row centered (even a short last row) ==== */
.mk-grid, .tile-grid, .tile-grid.five { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 40px 28px !important; }
.mk-grid > *, .tile-grid > * { flex: 0 1 200px; min-width: 0; }
.mk-thumb { justify-content: center !important; }
.mk-thumb .book-thumb, .book-thumb { justify-items: center; }
.mk-thumb .bookcover { margin-left: auto; margin-right: auto; }
.mk-card .mk-body { align-items: center; }
@media (max-width: 640px) {
  .mk-grid, .tile-grid, .tile-grid.five { gap: 28px 14px !important; }
  .mk-grid > *, .tile-grid > * { flex: 0 1 calc(50% - 7px); }
}

/* ==== Lighter type sitewide: less chunky ==== */
h1, .nb-title, .ms-title, .jn-title, .tp-title, .cs-title { font-weight: 600 !important; }
h2, h3 { font-weight: 600; }
b, strong { font-weight: 600; }
.btn, button { font-weight: 500; }
.nav-label { font-weight: 600 !important; }
.sf-bubble .sf-bubble-circle b { font-weight: 600 !important; }
.jn-new, .jn-go, .ms-go, .jn-locked-go, .wk-log-side, .wk-log-big { font-weight: 600 !important; }
.jn-locked b, .ms-words b, .jn-row-main b { font-weight: 600; }

/* ==== Templates: light grey rows, a round photo on the left, the name beside it ==== */
.sf-or { font-family: var(--sans); }
.nb-hero .sf-or, h2.sf-or { font-size: 28px !important; font-weight: 600 !important; letter-spacing: -.015em !important; color: var(--ink) !important; text-align: center; margin: 48px 0 26px !important; }
.sf-bubbles, .tpl-bubbles { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important; gap: 4px !important; }
.sf-bubble, .tpl-bubble { flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 18px !important; padding: 14px 18px !important; min-height: 92px; border-radius: 0 !important; background: #F6F6F5 !important; text-align: left !important; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .15s, background .15s !important; transform: none !important; }
.sf-bubble:hover:not(:disabled), .sf-bubble:focus-visible { transform: none !important; background: #F1F1EF !important; outline-color: #94E3FB; }
.tpl-photo { flex: none; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: #E9E9E6; color: #6B7280; border: 4px solid #fff; box-shadow: 0 6px 14px rgba(20,25,30,.14); }
.tpl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-bubble .sf-bubble-circle { text-align: left !important; min-width: 0; }
.sf-bubble .sf-bubble-circle b { font-family: var(--sans) !important; font-size: 19px !important; font-weight: 400 !important; letter-spacing: .05em !important; color: #3F3F46 !important; line-height: 1.25; }
.sf-bubble:hover:not(:disabled) .sf-bubble-circle b { color: var(--ink) !important; }
.sf-bubble small { display: none !important; }
.tpl-bubble-skel { width: 100%; max-width: none; height: 92px; border-radius: 0; }
@media (max-width: 640px) {
  .sf-bubbles, .tpl-bubbles { grid-template-columns: 1fr !important; }
  .sf-bubble, .tpl-bubble { min-height: 80px; padding: 12px 14px !important; }
  .tpl-photo { width: 52px; height: 52px; }
  .sf-bubble .sf-bubble-circle b { font-size: 17px !important; }
  .nb-hero .sf-or, h2.sf-or { font-size: 22px !important; margin: 34px 0 18px !important; }
}
.sf-bubbles, .tpl-bubbles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important; } @media (max-width: 640px) { .sf-bubbles, .tpl-bubbles { grid-template-columns: 1fr !important; } }
.jn-home { max-width: 1280px !important; } .jn-week { max-width: none; margin: 0 0 30px !important; }

/* ==== Product page: the title, book and Start from scratch sit together in the middle; template rows centered ==== */
@media (min-width: 901px) {
  .nb-hero { grid-template-columns: minmax(0, 1fr) auto auto minmax(280px, 380px) minmax(0, 1fr) !important; column-gap: 40px !important; }
  .nb-hero .nb-words { grid-column: 2; grid-row: 1; }
  .nb-hero .nb-art { grid-column: 3; grid-row: 1; }
  .nb-hero .sf-scratch { grid-column: 4; grid-row: 1; justify-self: stretch; }
  .nb-hero .sf-or, .nb-hero .sf-bubbles { grid-column: 1 / -1; }
}
.sf-bubbles, .tpl-bubbles { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 6px !important; }
.sf-bubbles > .sf-bubble, .tpl-bubbles > .sf-bubble, .tpl-bubbles > .tpl-bubble-skel { flex: 0 1 calc((100% - 12px) / 3); min-width: 260px; box-sizing: border-box; }
@media (max-width: 900px) { .sf-bubbles > .sf-bubble, .tpl-bubbles > .sf-bubble { flex-basis: calc((100% - 6px) / 2); } }
@media (max-width: 640px) { .sf-bubbles > .sf-bubble, .tpl-bubbles > .sf-bubble { flex-basis: 100%; min-width: 0; } }
@media (min-width: 901px) and (max-width: 1250px) {
  .nb-hero { grid-template-columns: minmax(0, 1fr) auto auto minmax(220px, 320px) minmax(0, 1fr) !important; column-gap: 24px !important; }
  .nb-hero .nb-art { width: 120px !important; height: 160px !important; }
  .nb-title { font-size: 34px !important; }
  .nb-hero .sf-scratch { padding: 20px !important; }
  .nb-hero .sf-scratch b { font-size: 20px !important; white-space: normal; }
}
.nb-hero > * { min-width: 0; }
.nb-page .sf-bubbles, .nb-hero .sf-bubbles, .page .sf-bubbles, .page .tpl-bubbles { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; }
.page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex: 0 1 calc((100% - 12px) / 3) !important; width: auto !important; max-width: none !important; min-width: 250px !important; }
@media (max-width: 900px) { .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex-basis: calc((100% - 6px) / 2) !important; } }
@media (max-width: 640px) { .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex-basis: 100% !important; min-width: 0 !important; } }
.nb-page .sf-bubbles, .nb-hero .sf-bubbles, .page .sf-bubbles, .page .tpl-bubbles { gap: 6px !important; }

/* ==== Product page, final design: book in the middle with its cover type and pages beside it,
   the name and size under it, Start from scratch, then Popular Templates four across ==== */
.nb-hero { display: flex !important; flex-direction: column !important; align-items: center !important; padding: 12px 0 0 !important; }
.nb-hero .nb-head { display: flex !important; flex-direction: column; align-items: center; text-align: center; margin: 0 !important; }
.nb-showcase { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 40px; width: min(720px, 100%); }
.nb-side { font-size: 22px; font-weight: 400; line-height: 1.3; color: var(--ink); }
.nb-side-left { justify-self: end; text-align: center; max-width: 170px; }
.nb-side-right { justify-self: start; text-align: center; max-width: 170px; }
.nb-hero .nb-art { width: 220px !important; height: 220px !important; }
.nb-hero .nb-title { margin: 18px 0 0 !important; font-size: 64px !important; font-weight: 700 !important; letter-spacing: -.03em; line-height: 1; }
.nb-size { margin: 16px 0 0; font-size: 22px; font-weight: 400; color: #374151; }
.nb-hero .sf-scratch { width: min(330px, 100%) !important; max-width: 330px !important; margin: 26px auto 0 !important; padding: 18px 20px !important; border-radius: 14px !important; display: grid !important; grid-template-columns: auto 1fr; column-gap: 14px; }
.nb-hero .sf-scratch b { font-size: 18px !important; white-space: nowrap; }
.nb-hero .sf-scratch small { font-size: 12.5px !important; }
.nb-hero .sf-scratch-icon { width: 40px !important; height: 40px !important; }
.sf-or-row { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 56px 0 18px; }
.sf-or-row .sf-or, .nb-hero .sf-or-row .sf-or { margin: 0 !important; font-size: 26px !important; font-weight: 700 !important; text-align: left !important; letter-spacing: -.015em !important; }
.sf-or-note { font-size: 19px; font-style: italic; color: var(--ink); }
.nb-hero .sf-bubbles { width: 100%; }
.nb-page .sf-bubbles > .sf-bubble { flex: 0 1 calc((100% - 18px) / 4) !important; min-width: 220px !important; }
.nb-page .sf-bubble .sf-bubble-circle b { font-size: 17px !important; }
.nb-page .tpl-photo { width: 50px; height: 50px; border-width: 3px; }
.nb-page .sf-bubble { min-height: 76px; gap: 14px !important; padding: 12px 14px !important; }
@media (max-width: 1250px) { .nb-page .sf-bubbles > .sf-bubble { flex-basis: calc((100% - 12px) / 3) !important; } }
@media (max-width: 900px) {
  .nb-page .sf-bubbles > .sf-bubble { flex-basis: calc((100% - 6px) / 2) !important; }
  .nb-hero .nb-title { font-size: 48px !important; }
  .nb-showcase { column-gap: 22px; }
  .nb-side { font-size: 18px; }
  .nb-hero .nb-art { width: 170px !important; height: 170px !important; }
}
@media (max-width: 640px) {
  .nb-page .sf-bubbles > .sf-bubble { flex-basis: 100% !important; min-width: 0 !important; }
  .nb-hero .nb-title { font-size: 40px !important; }
  .nb-size { font-size: 18px; }
  .nb-showcase { column-gap: 12px; }
  .nb-side { font-size: 14.5px; }
  .nb-hero .nb-art { width: 130px !important; height: 130px !important; }
  .sf-or-row { margin-top: 40px; flex-direction: column; align-items: center; gap: 4px; }
  .sf-or-row .sf-or { font-size: 22px !important; text-align: center !important; }
  .sf-or-note { font-size: 16px; }
}
.nb-showcase .nb-side-left { grid-column: 1 !important; grid-row: 1 !important; } .nb-showcase .nb-art { grid-column: 2 !important; grid-row: 1 !important; } .nb-showcase .nb-side-right { grid-column: 3 !important; grid-row: 1 !important; }

/* ==== Daily logger: bold dates, and Log today as a big logo-blue circle with the words under it ==== */
.wk-title { font-size: 30px !important; font-weight: 700 !important; letter-spacing: -.02em; color: var(--ink) !important; }
.wk-log-circle { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.wk-log-dot { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: #94E3FB; color: #1F2328; transition: transform .15s, background .15s; }
.wk-log-dot svg { width: 34px; height: 34px; stroke-width: 1.6; }
.wk-log-circle:hover .wk-log-dot { transform: scale(1.06); background: #7FD9F6; }
.wk-log-circle:focus-visible { outline: none; }
.wk-log-circle:focus-visible .wk-log-dot { outline: 3px solid #0B3A52; outline-offset: 3px; }
.wk-log-label { font-size: 17px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #94E3FB; }
@media (max-width: 640px) {
  .wk-title { font-size: 22px !important; }
  .wk-log-dot { width: 60px; height: 60px; } .wk-log-dot svg { width: 26px; height: 26px; }
  .wk-log-label { font-size: 14px; }
}
.wk-log-dot, .wk-log-dot svg { color: #1F2328 !important; stroke: currentColor; }

/* ==== Side menu: prominent titles; the open page gets a light grey background ==== */
.sidebar .nav-item { margin: 2px 10px; padding: 12px 14px !important; border-radius: 14px !important; gap: 14px; transition: background .15s; }
.sidebar .nav-item:hover:not(.active) { background: #F7F7F8 !important; }
.sidebar .nav-item.active { background: #EFEFF1 !important; }
.sidebar .nav-label { font-size: 19px !important; font-weight: 700 !important; letter-spacing: -.01em; color: var(--ink) !important; }
.sidebar .nav-sub { margin-top: 3px; font-size: 12.5px !important; font-weight: 400 !important; color: #8A8F98 !important; }
.sidebar .nav-item.active .nav-sub { color: #6B7280 !important; }
.sidebar .nav-item svg { padding: 0 !important; background: none !important; width: 22px; height: 22px; color: #4B5563 !important; }
.sidebar .nav-item.active svg { background: none !important; color: var(--ink) !important; }
.sidebar .nav-item:hover:not(.active) svg { background: none !important; }

/* ==== Templates: no grey boxes; round photo, title, and a one-line description under it ==== */
.sf-bubble, .tpl-bubble, .nb-page .sf-bubble { display: grid !important; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 16px !important; row-gap: 3px; background: none !important; outline: 0 !important; box-shadow: none !important; min-height: 0 !important; padding: 12px 8px !important; }
.sf-bubble:hover:not(:disabled), .sf-bubble:focus-visible { background: none !important; }
.sf-bubble .tpl-photo { grid-row: 1 / 3; grid-column: 1; transition: transform .2s ease; }
.sf-bubble:hover:not(:disabled) .tpl-photo { transform: scale(1.06); }
.sf-bubble .sf-bubble-circle { grid-row: 1; grid-column: 2; align-self: end; }
.sf-bubble small { display: block !important; grid-row: 2; grid-column: 2; align-self: start; max-width: none !important; margin: 0 !important; font-size: 14px !important; line-height: 1.4; letter-spacing: 0 !important; color: #6B7280 !important; text-align: left !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; }
.sf-bubble:focus-visible .tpl-photo { outline: 3px solid #94E3FB; outline-offset: 2px; }
.sf-bubble:hover:not(:disabled) .sf-bubble-circle b { color: var(--ink) !important; }
.nb-page .sf-bubbles, .page .sf-bubbles, .page .tpl-bubbles { gap: 10px 18px !important; }
.nb-page .sf-bubbles > .sf-bubble, .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex: 0 1 calc((100% - 36px) / 3) !important; min-width: 0 !important; }
@media (max-width: 900px) { .nb-page .sf-bubbles > .sf-bubble, .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex-basis: calc((100% - 18px) / 2) !important; } }
@media (max-width: 640px) { .nb-page .sf-bubbles > .sf-bubble, .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex-basis: 100% !important; } }

/* ==== Product page book picture: every book the same height, its own natural shape, never cropped ==== */
.nb-showcase .nb-art { width: auto !important; height: 250px !important; min-width: 0; display: flex !important; align-items: center; justify-content: center; overflow: visible !important; }
.nb-showcase .nb-art img, .nb-showcase .nb-art svg { height: 250px !important; width: auto !important; max-width: 320px !important; max-height: 250px !important; object-fit: contain !important; filter: drop-shadow(0 12px 20px rgba(0,0,0,.12)); }
.nb-hero .nb-title { margin-top: 26px !important; }
@media (max-width: 900px) { .nb-showcase .nb-art, .nb-showcase .nb-art img, .nb-showcase .nb-art svg { height: 200px !important; max-height: 200px !important; } .nb-showcase .nb-art img { max-width: 240px !important; } }
@media (max-width: 640px) { .nb-showcase .nb-art, .nb-showcase .nb-art img, .nb-showcase .nb-art svg { height: 150px !important; max-height: 150px !important; } .nb-showcase .nb-art img { max-width: 170px !important; } }

/* ==== Product page fits on one screen: the top scales with the window height; compact templates, more per row ==== */
.main:has(.nb-page) { padding-top: 14px !important; }
.nb-page .nb-back { margin-bottom: 0 !important; }
.nb-hero { padding-top: 0 !important; }
.nb-showcase { column-gap: clamp(16px, 3vw, 40px); }
.nb-showcase .nb-art, .nb-showcase .nb-art img, .nb-showcase .nb-art svg { height: clamp(96px, 20vh, 230px) !important; max-height: clamp(96px, 20vh, 230px) !important; }
.nb-side { font-size: clamp(14px, 2.2vh, 20px) !important; }
.nb-hero .nb-title { margin-top: clamp(6px, 1.6vh, 20px) !important; font-size: clamp(30px, 6.4vh, 60px) !important; }
.nb-size { margin-top: clamp(2px, .8vh, 10px) !important; font-size: clamp(14px, 2.2vh, 20px) !important; }
.nb-hero .sf-scratch { margin-top: clamp(8px, 1.8vh, 22px) !important; padding: clamp(8px, 1.4vh, 16px) 18px !important; }
.nb-hero .sf-scratch-icon { width: 34px !important; height: 34px !important; }
.nb-hero .sf-scratch b { font-size: 16px !important; }
.sf-or-row { margin: clamp(14px, 3vh, 40px) 0 clamp(6px, 1.2vh, 14px) !important; }
.sf-or-row .sf-or, .nb-hero .sf-or-row .sf-or { font-size: clamp(18px, 2.8vh, 24px) !important; }
.sf-or-note { font-size: clamp(14px, 2vh, 17px) !important; }
/* Compact template rows: four or five across */
.nb-page .sf-bubbles, .page .sf-bubbles, .page .tpl-bubbles { gap: 2px 14px !important; }
.nb-page .sf-bubbles > .sf-bubble, .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex-basis: calc((100% - 42px) / 4) !important; }
@media (min-width: 1400px) { .nb-page .sf-bubbles > .sf-bubble, .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex-basis: calc((100% - 56px) / 5) !important; } }
.sf-bubble, .nb-page .sf-bubble { padding: 6px 4px !important; column-gap: 10px !important; }
.sf-bubble .tpl-photo, .nb-page .tpl-photo { width: 40px !important; height: 40px !important; border-width: 2px !important; box-shadow: 0 3px 8px rgba(20,25,30,.12); }
.sf-bubble .sf-bubble-circle b, .nb-page .sf-bubble .sf-bubble-circle b { font-size: 15px !important; letter-spacing: .02em !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sf-bubble small { font-size: 12.5px !important; }
@media (max-width: 900px) { .nb-page .sf-bubbles > .sf-bubble, .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex-basis: calc((100% - 14px) / 2) !important; } }
@media (max-width: 640px) { .nb-page .sf-bubbles > .sf-bubble, .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex-basis: 100% !important; } }
.nb-page { position: relative; }
.nb-page .nb-back { position: absolute; top: 0; left: 0; z-index: 2; }
.nb-showcase .nb-art, .nb-showcase .nb-art img, .nb-showcase .nb-art svg { height: clamp(84px, 15vh, 220px) !important; max-height: clamp(84px, 15vh, 220px) !important; }
.nb-hero .nb-title { font-size: clamp(28px, 5.6vh, 56px) !important; }
.nb-hero .sf-scratch { grid-template-columns: auto auto !important; align-items: center; justify-content: center; padding: 8px 20px !important; width: auto !important; }
.nb-hero .sf-scratch small { display: none !important; }
.nb-hero .sf-scratch-icon { grid-row: 1 !important; width: 30px !important; height: 30px !important; }
.sf-or-row { margin-top: clamp(12px, 2.4vh, 36px) !important; }
@media (max-width: 1150px) and (min-width: 901px) { .nb-page .sf-bubbles > .sf-bubble, .page .sf-bubbles > .sf-bubble, .page .tpl-bubbles > .sf-bubble { flex-basis: calc((100% - 28px) / 3) !important; } }
@media (max-height: 600px) and (min-width: 641px) {
  .nb-page .sf-bubble small { display: none !important; }
  .nb-page .sf-bubble .sf-bubble-circle { grid-row: 1 / 3 !important; align-self: center !important; }
  .nb-page .tpl-photo { width: 34px !important; height: 34px !important; }
  .nb-page .sf-bubble { padding: 4px !important; }
  .nb-showcase .nb-art, .nb-showcase .nb-art img, .nb-showcase .nb-art svg { height: 76px !important; max-height: 76px !important; }
  .nb-hero .nb-title { font-size: 30px !important; margin-top: 4px !important; }
  .nb-size { margin-top: 0 !important; font-size: 14px !important; }
  .nb-hero .sf-scratch { margin-top: 6px !important; padding: 5px 16px !important; }
  .sf-or-row { margin: 10px 0 4px !important; }
}
.wk-log-label { color: #1F2328 !important; }

/* ==== Compile: the whole year, choose days for a film or a storybook ==== */
.cp-page { max-width: 1180px; padding-bottom: 90px; }
.cp-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.cp-back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; color: #4B5563; text-decoration: none; font-size: 15px; }
.cp-back:hover { color: var(--ink); }
.cp-year { display: flex; align-items: center; gap: 10px; }
.cp-title { margin: 0; font-size: 32px !important; font-weight: 700 !important; letter-spacing: -.02em; }
.cp-arrow { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #E5E7EB; border-radius: 50%; background: #fff; cursor: pointer; }
.cp-arrow:hover { border-color: #1F2328; }
.cp-switch { justify-self: end; display: inline-flex; padding: 4px; border-radius: 999px; background: #F3F4F6; }
.cp-switch button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: #4B5563; cursor: pointer; }
.cp-switch button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.cp-hint { margin: 10px 0 18px; text-align: center; color: #6B7280; font-size: 15px; }
.cp-year-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 26px; }
.cp-month-name { margin: 0 0 6px; font-size: 15px !important; font-weight: 700 !important; text-align: left !important; }
.cp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cp-dow { font-size: 10px; color: #9CA3AF; text-align: center; padding-bottom: 2px; }
.cp-day { position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 50%; background: #fff center / cover no-repeat; font: inherit; font-size: 11.5px; color: #374151; cursor: pointer; transition: transform .12s, opacity .15s; }
.cp-day.faded { opacity: .28; cursor: default; }
.cp-day.has.ok { background-color: #F3F4F6; font-weight: 600; }
.cp-day.has.ok[style] .cp-num { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cp-day.ok:hover { transform: scale(1.12); }
.cp-day.today { border-color: #D1D5DB; }
.cp-day.on { background: #94E3FB !important; color: #0B3A52; border-color: #0B3A52; }
.cp-day.on[style] { background-blend-mode: normal; box-shadow: 0 0 0 2px #0B3A52 inset; }
.cp-secs { font-size: 10.5px; font-weight: 800; letter-spacing: -.02em; }
.cp-dot { position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: #0B3A52; }
.cp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 16px; padding: 12px max(20px, calc((100vw - 1180px) / 2 + 20px)); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid #ECEDEF; }
@media (min-width: 901px) { .cp-bar { left: var(--sidebar-w, 248px); } }
.cp-meter { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.cp-meter-words { display: flex; align-items: baseline; gap: 10px; }
.cp-meter-words b { font-size: 16px; }
.cp-meter-words span { font-size: 14px; color: #6B7280; }
.cp-meter-track { height: 6px; border-radius: 99px; background: #ECEDEF; overflow: hidden; }
.cp-meter-track i { display: block; height: 100%; background: #94E3FB; border-radius: 99px; transition: width .25s; }
.cp-go { height: 46px; padding: 0 24px; border: 0; border-radius: 999px; background: #1F2328; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.cp-go:disabled { opacity: .4; cursor: default; }
@media (max-width: 1100px) { .cp-year-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cp-top { grid-template-columns: 1fr auto; }
  .cp-year { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .cp-year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .cp-bar { bottom: 64px; flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
  .cp-meter { min-width: 0; flex: 1 1 100%; }
  .cp-go { flex: 1; }
}
/* The whole year on one screen */
.cp-year-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 16px 18px !important; }
.cp-month-name { font-size: 13.5px !important; margin-bottom: 4px; }
.cp-days { gap: 2px; }
.cp-day { font-size: 10.5px; }
.cp-secs { font-size: 9.5px; }
.cp-hint { margin: 6px 0 12px; font-size: 14px; }
@media (max-width: 1200px) { .cp-year-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 900px) { .cp-year-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { .cp-year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* ==== My Journal: entries on the left, a clean writing card on the right ==== */
.jn2-title { margin: 6px 0 22px !important; text-align: center; font-size: 30px !important; font-weight: 400 !important; letter-spacing: .06em !important; text-transform: uppercase; color: var(--ink); }
.jn2 { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; align-items: start; max-width: 1080px; margin: 0 auto; }
.jn2-side { background: #F6F6F7; border-radius: 4px; padding: 18px 16px 22px; min-height: 420px; }
.jn2-side-head { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 12px; }
.jn2-side-head h2 { margin: 0 !important; font-size: 22px !important; font-weight: 400 !important; }
.jn2-new { position: absolute; right: 0; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #94E3FB; color: #1F2328; cursor: pointer; }
.jn2-new:hover { background: #7FD9F6; }
.jn2-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid #D1D5DB; border-radius: 10px; background: #fff; color: #6B7280; }
.jn2-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 14px; color: var(--ink); }
.jn2-month { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; margin: 16px 0 10px; }
.jn2-month select { appearance: none; -webkit-appearance: none; border: 0; background: none; font: inherit; font-size: 17px; font-weight: 700; color: var(--ink); text-align: center; cursor: pointer; padding-right: 2px; }
.jn2-month-label { margin: 16px 0 10px; text-align: center; font-weight: 700; }
.jn2-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.jn2-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 8px 8px; border: 0; border-radius: 10px; background: none; font: inherit; text-align: left; cursor: pointer; }
.jn2-item:hover { background: #EDEDEF; }
.jn2-item.on { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.jn2-day { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #94E3FB; color: #1F2328; font-weight: 700; font-size: 15px; }
.jn2-item.picked .jn2-day { background: #1F2328; color: #fff; }
.jn2-item-title { min-width: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.jn2-empty { margin: 18px 0; text-align: center; color: #6B7280; font-size: 14px; }
.jn2-card { border: 1px solid #9CA3AF; border-radius: 16px; background: #fff; min-height: 460px; padding: 22px 34px 30px; }
.jn2-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.jn2-saved { font-size: 13px; color: #9CA3AF; }
.jn2-tool { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: #1F2328; font: inherit; font-size: 15px; cursor: pointer; }
.jn2-tool:hover { background: #F3F4F6; }
.jn2-tool.on { background: #EDE9FE; color: #4C1D95; }
.jn2-color { position: relative; flex-direction: column; gap: 0; }
.jn2-color span { font-size: 15px; font-weight: 500; line-height: 1; }
.jn2-color i { display: block; width: 14px; height: 3px; margin-top: 2px; border-radius: 2px; background: linear-gradient(90deg, #E53935, #FBC02D, #43A047, #1E88E5, #8E24AA); }
.jn2-palette { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 6px; padding: 8px; border: 1px solid #E5E7EB; border-radius: 12px; background: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.jn2-palette button { width: 20px; height: 20px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #E5E7EB; cursor: pointer; }
.jn2-font select { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: #1F2328; cursor: pointer; padding: 6px 4px; }
.jn2-mic .dc-btn { width: 32px; height: 32px; padding: 0 !important; justify-content: center; border-radius: 50%; background: none !important; box-shadow: none !important; border: 0 !important; }
.jn2-mic .dc-mic { width: 26px; height: 26px; background: #94E3FB !important; color: #1F2328 !important; }
.jn2-mic .dc-mic svg { color: #1F2328 !important; }
.jn2-date { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 58px; margin-left: 14px; border: 1px solid #6B7280; border-radius: 8px; line-height: 1; }
.jn2-date small { font-size: 10px; letter-spacing: .08em; color: #9CA3AF; }
.jn2-date b { margin-top: 3px; font-size: 24px; font-weight: 300; color: #9CA3AF; }
.jn2-title-in { width: 100%; border: 0; outline: none; background: none; padding: 0; margin: 4px 0 14px; font: inherit; font-size: 30px; font-weight: 400; color: var(--ink); }
.jn2-body { min-height: 300px; outline: none; font-size: 17px; line-height: 1.7; color: var(--ink); }
.jn2-body:empty::before { content: attr(data-placeholder); color: #9CA3AF; }
.jn2-body ul { padding-left: 1.3em; }
.jn2-foot { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 22px auto 0; max-width: 1080px; padding-left: 284px; }
.jn2-book-link { border: 0; background: none; padding: 0; font: inherit; font-size: 22px; color: #1A6E96; text-decoration: underline; text-decoration-color: #B8D6E4; text-underline-offset: 6px; cursor: pointer; }
.jn2-book-link:hover { color: #0B3A52; }
.jn2-pick-note { color: #4B5563; }
.jn2-make { height: 42px; padding: 0 22px; border: 0; border-radius: 999px; background: #1F2328; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.jn2-make:disabled { opacity: .4; }
@media (max-width: 900px) {
  .jn2 { grid-template-columns: 1fr; gap: 16px; }
  .jn2-side { min-height: 0; }
  .jn2-list { max-height: 220px; overflow: auto; }
  .jn2-card { padding: 16px 16px 22px; min-height: 360px; }
  .jn2-foot { padding-left: 0; flex-wrap: wrap; }
  .jn2-tools { flex-wrap: wrap; }
  .jn2-title-in { font-size: 24px; }
  .jn2-book-link { font-size: 18px; }
}

/* ==== Search on the left edge, sort on the right edge (search keeps its rounded shape; sort is plain text) ==== */
.kw-tools, .lib-tools, .au-tools { width: 100%; display: flex !important; align-items: center; justify-content: space-between !important; gap: 16px; flex-wrap: nowrap; }
.kw-head .kw-tools { align-self: stretch; }
.lib-tools .kw-search, .kw-tools .kw-search, .au-tools .kw-search { flex: 0 1 360px; margin: 0 !important; }
.kw-sort-wrap { margin-left: auto; flex: none; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.kw-sort { background: none !important; border: 0 !important; box-shadow: none !important; }
.au-tools .au-books-title { margin: 0 auto 0 0; }
.mk2-top { flex-direction: row !important; justify-content: space-between !important; }
.mk2-top > .mk2-search { width: auto; flex: 0 1 360px !important; margin-left: auto !important; }
@media (max-width: 640px) { .lib-tools .kw-search, .kw-tools .kw-search, .au-tools .kw-search { flex: 1 1 auto; } }

/* ==== Groups tab: no boxes, just the circles ==== */
.gt-grid { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 36px 44px !important; }
.gt-new, .gt-card { flex: 0 0 200px; background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; padding: 8px !important; min-height: 0 !important; display: flex !important; flex-direction: column; align-items: center; gap: 12px; text-align: center; cursor: pointer; }
.gt-new:hover .gt-new-icon, .gt-card:hover .gt-ring { transform: scale(1.05); }
.gt-new-icon, .gt-ring { transition: transform .2s ease; }
.gt-new-icon { width: 150px !important; height: 150px !important; border-radius: 50% !important; background: #94E3FB !important; color: #1F2328 !important; display: grid; place-items: center; }
.gt-new-icon svg { width: 34px; height: 34px; color: #1F2328 !important; }
.gt-new b { font-size: 18px; font-weight: 600; }
.gt-new small, .gt-card small { font-size: 14px; color: #6B7280; }

/* ==== Profile header: compact, one tidy row ==== */
.au-head { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px !important; padding: 16px 22px !important; margin-bottom: 18px !important; border-radius: 16px !important; min-height: 0 !important; text-align: left !important; }
.au-photo { width: 76px !important; height: 76px !important; flex: none; border-width: 3px !important; box-shadow: 0 4px 12px rgba(0,0,0,.08) !important; }
.au-photo img { width: 100%; height: 100%; object-fit: cover; }
.au-info { text-align: left !important; align-items: flex-start !important; min-width: 0; }
.au-name { font-size: 24px !important; font-weight: 700 !important; margin: 0 !important; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-start !important; }
.au-name .seller-badge, .seller-badge { font-size: 12px !important; padding: 3px 9px !important; }
.au-handle { margin: 2px 0 0 !important; font-size: 13.5px !important; }
.au-bio { margin: 6px 0 0 !important; max-width: 640px; font-size: 14.5px !important; line-height: 1.5 !important; text-align: left !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.au-stats { margin-top: 8px !important; justify-content: flex-start !important; gap: 8px !important; }
.au-stats > * { padding: 4px 12px !important; font-size: 13px !important; min-height: 0 !important; }
.au-stats b, .au-stats strong { font-size: 14px !important; }
.au-btns { align-self: start; display: flex; gap: 8px; }
.au-btns .btn { height: 36px !important; padding: 0 14px !important; font-size: 14px !important; }
.au-tabs { margin: 0 0 14px !important; }
@media (max-width: 640px) {
  .au-head { grid-template-columns: auto minmax(0, 1fr); padding: 14px !important; }
  .au-btns { grid-column: 1 / -1; }
  .au-photo { width: 60px !important; height: 60px !important; }
  .au-name { font-size: 20px !important; }
}
.gt-ring { width: 150px !important; height: 150px !important; }

/* ==== Library, new design: a plain shelf on top (no title), tabs, search left / sort right, outlined book cards ==== */
.rs { padding: 26px 40px 0 !important; border-radius: 28px 28px 0 0 !important; background: #F3F4F6 !important; margin-bottom: 30px !important; }
.rs-shelf { padding-bottom: 0 !important; }
.lib2-tabs { margin-bottom: 18px !important; }
.lib-tools { margin-bottom: 22px !important; }
.mk-card.lib-tile { border: 1px solid #E5E7EB !important; border-radius: 18px !important; padding: 12px 10px 14px !important; background: #fff !important; box-shadow: none !important; }
.mk-card.lib-tile:hover { border-color: #D1D5DB !important; }

/* ==== Create: compact product row near the top, so In progress shows without scrolling ==== */
.cr-page .log-start { margin-top: 0 !important; padding-top: 0 !important; padding-bottom: 14px !important; margin-bottom: 18px !important; }
.cr-page .log-start-head { margin: 0 0 8px !important; }
.cr-page .log-start-head h2 { font-size: 15px !important; font-weight: 500 !important; letter-spacing: .16em !important; text-transform: uppercase; color: #374151 !important; }
.cr-page .log-products { gap: 4px !important; }
.cr-page .log-product { padding: 4px 6px 6px !important; gap: 4px !important; min-height: 0 !important; height: auto !important; }
.cr-page .log-product-size { font-size: 11px !important; letter-spacing: .06em; margin: 0 !important; }
.cr-page .log-product-art { height: clamp(64px, 12vh, 118px) !important; width: auto !important; margin: 2px 0 !important; display: flex !important; align-items: flex-end; justify-content: center; }
.cr-page .log-product-art img { height: 100% !important; width: auto !important; max-width: 140px; object-fit: contain; }
.cr-page .log-product-name { font-size: 11.5px !important; letter-spacing: .1em !important; line-height: 1.25 !important; margin-top: 4px !important; }
.cr-page .log-product-count { flex-direction: row !important; gap: 6px; font-size: 12px !important; line-height: 1.3 !important; }
.cr-page .log-product-count span { font-size: 12px !important; }
.cr-page .log-product-count span + span::before { content: '· '; color: #9CA3AF; }
.main:has(.cr-page) { padding-top: 22px !important; }
.cr-page .kw-head { margin-bottom: 12px !important; gap: 10px !important; }
/* In progress: search on the left, the title in the middle, sort on the right, all on one line */
.cr-page .kw-head { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center !important; flex-direction: row !important; }
.cr-page .kw-head .kw-tools { display: contents !important; }
.cr-page .kw-head h2 { grid-column: 2; grid-row: 1; margin: 0 !important; font-size: 20px !important; font-weight: 600 !important; }
.cr-page .kw-head .kw-search { grid-column: 1; grid-row: 1; justify-self: start; width: min(280px, 100%); }
.cr-page .kw-head .kw-sort-wrap { grid-column: 3; grid-row: 1; justify-self: end; }
.cr-page .log-product-count { white-space: nowrap; font-size: 11px !important; }
.cr-page .log-product-count span { font-size: 11px !important; }
.cr-page .log-start-head h2 { margin: 0 !important; }
@media (max-height: 700px) { .cr-page .log-start-head { margin-bottom: 2px !important; } .cr-page .log-start { padding-bottom: 6px !important; margin-bottom: 10px !important; } }
@media (max-width: 640px) {
  .cr-page .kw-head { grid-template-columns: 1fr auto; }
  .cr-page .kw-head h2 { grid-column: 1 / -1; grid-row: 1; }
  .cr-page .kw-head .kw-search { grid-column: 1; grid-row: 2; }
  .cr-page .kw-head .kw-sort-wrap { grid-column: 2; grid-row: 2; }
}
.cr-page .log-start .log-start-head h2#log-start-title, .page.cr-page h2#log-start-title { font-size: 15px !important; font-weight: 500 !important; letter-spacing: .16em !important; text-transform: uppercase; color: #4B5563 !important; line-height: 1.3 !important; }
.cr-page .log-product-count { flex-wrap: wrap; justify-content: center; white-space: normal !important; column-gap: 4px; row-gap: 0; }
.cr-page .log-product-count span { white-space: nowrap; }
@media (max-width: 1100px) { .cr-page .log-product-count span + span::before { content: ''; } .cr-page .log-product-count { flex-direction: column !important; } }


/* ==== One typeface everywhere: Inter (the logo too). Book cover pictures keep their printed-book serif. ==== */
:root, :root[data-theme] {
  --wl-label: 'Inter', sans-serif; --wl-display: 'Inter', sans-serif;
  --lx-label: 'Inter', sans-serif; --lx-display: 'Inter', sans-serif;
  --dg-label: 'Inter', sans-serif; --dg-display: 'Inter', sans-serif;
  --hj-label: 'Inter', sans-serif; --hj-display: 'Inter', sans-serif;
  --td-display: 'Inter', sans-serif;
}
.wordmark, .wordmark-text, .wordmark span { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important; font-weight: 600 !important; letter-spacing: -.01em !important; }
.hj-modal-title, .hj-modal-body p, .ed-title, .wr-title, .wr-hint, .wr-card .writing-empty h4, .wr-ch-num, .tpl2-title, .cs-t, .pv-title,
.legal h1, .legal h2, .lib-sec-head h2, .cal-title, .hw-how h2, .hw-step-num, .log-start-head h2, .hw-tagline, .cs-title, .tp-title, .tp-h2,
.gb-title, .gb-prompt, .rs-title, .mk-big, .wk-quote, .wk-quote span { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important; }
.wk-quote { font-style: italic; font-weight: 400; letter-spacing: 0; }

/* ==== Launch settings ==== */
.ls-list { display: flex; flex-direction: column; gap: 16px; max-width: 820px; margin: 0 auto; }
.ls-item { display: flex; align-items: flex-start; gap: 24px; padding: 22px 24px; border: 1px solid #E5E7EB; border-radius: 16px; background: #fff; }
.ls-words { flex: 1; }
.ls-words h2 { margin: 0 0 8px !important; font-size: 19px !important; font-weight: 600 !important; text-align: left !important; }
.ls-words p { margin: 0 0 8px; font-size: 15px; line-height: 1.55; color: #374151; }
.ls-note { font-size: 13.5px !important; color: #6B7280 !important; }
.ls-warn { color: #92400E !important; }
.ls-switch { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; }
.ls-switch i { position: relative; width: 52px; height: 30px; border-radius: 999px; background: #D1D5DB; transition: background .15s; }
.ls-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.ls-switch.on i { background: #1F2328; }
.ls-switch.on i::after { transform: translateX(22px); }
.ls-switch:disabled { opacity: .5; cursor: default; }
.soon-note { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid #94E3FB; border-radius: 12px; background: #F5FBFE; font-size: 14.5px; line-height: 1.5; color: #374151; }
.soon-note b { color: var(--ink); font-size: 15.5px; }
@media (max-width: 640px) { .ls-item { flex-direction: column; } }
.ls-prod-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 24px; }
.ls-prod-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #F0F1F3; font-size: 15px; }
.ls-prod-list .ls-switch i { width: 44px; height: 26px; }
.ls-prod-list .ls-switch i::after { width: 20px; height: 20px; }
.ls-prod-list .ls-switch.on i::after { transform: translateX(18px); }

/* Product descriptions */
.log-product-desc { display: block; max-width: 230px; margin: 4px auto 2px; font-size: 13px; line-height: 1.45; color: #4B5563; text-transform: none; letter-spacing: 0; }
.nb-desc { margin: 8px auto 0; max-width: 520px; font-size: clamp(14px, 2vh, 17px); line-height: 1.5; color: #4B5563; }
@media (max-height: 600px) { .nb-desc { display: none; } }
