/* The cart (cart.html) and the dashboards (dashboard.html). Loaded only by those two pages,
   after styles.css, account.css and books/shop.css. Colours are the site's own: night, gold,
   parchment, burgundy and the deep teal; the layouts borrow from analytics, invoice, CRM and
   reading-app dashboards. */

/* =====================================================================
   The cart
   ===================================================================== */
.shop-cart .acct-title { margin-bottom: 0; }
.cart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px 32px; margin-bottom: 34px; }
.cart-steps { list-style: none; display: flex; gap: 4px; margin: 0; padding: 5px; border-radius: 999px; background: rgba(14,11,13,.6); border: 1px solid var(--line); }
.cart-steps li { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; color: var(--text-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.cart-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: 12px; letter-spacing: 0; }
.cart-steps li.is-done span { background: var(--gold); border-color: transparent; color: #2a1a06; }
.cart-steps li[aria-current] { background: linear-gradient(180deg, #f6dc94, #c49a45); color: #2a1a06; }
.cart-steps li[aria-current] span { border-color: rgba(42,26,6,.35); }

.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.cart-main { min-width: 0; }
.cart-loading { color: var(--text-muted); font-size: 18px; padding: 20px 0; }
.cart-main [hidden], .cart-summary[hidden], .cart-summary [hidden] { display: none !important; }

.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cart-line {
  --ppi: 12.5px; /* the covers at their real size: a 6 × 9 in book 75px wide (books/shape.js; cart.js sets --cart-w, the widest) */
  display: grid; grid-template-columns: calc(var(--cart-w, 6) * var(--ppi)) minmax(0, 1fr) auto; gap: 8px 22px; align-items: center;
  padding: 14px 20px 14px 14px; border-radius: 18px; color: var(--text-dark);
  background: linear-gradient(180deg, var(--paper), #f1e5c9); box-shadow: 0 22px 34px -26px #000;
}
.cart-line > a:first-child { justify-self: center; }
.cart-cover { display: block; width: calc(var(--book-w, 6) * var(--ppi)); max-width: 100%; height: auto; aspect-ratio: var(--book-ar, 2 / 3); object-fit: cover; border-radius: 2px 4px 4px 2px; background: #3b0f18; box-shadow: 0 12px 18px -12px rgba(0,0,0,.7); }
.cart-line h3 { font-size: 25px; line-height: 1.08; }
.cart-line h3 a { display: inline-block; min-width: 44px; color: inherit; text-decoration: none; } /* a short title is still a 44px target */
.cart-line h3 a:hover { text-decoration: underline; text-decoration-color: rgba(110,31,44,.4); }
.cart-meta { margin-top: 4px; font-size: 13.5px; color: var(--text-dark-muted); }
.cart-each { margin-top: 6px; font-size: 14px; font-weight: 500; }
.cart-each.is-tbc, .cart-line-total.is-tbc { color: #8a5a1c; font-family: var(--serif); font-style: italic; font-weight: 600; }
.cart-line-end { display: grid; justify-items: end; gap: 10px; }
.cart-line-total { font: 700 24px/1 var(--serif); color: var(--burgundy); white-space: nowrap; }
.cart-line-total.is-tbc { font-size: 16px; }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid rgba(90,64,30,.35); border-radius: 999px; background: rgba(255,255,255,.55); }
.cart-qty button { width: 38px; height: 38px; border: 0; background: none; color: var(--burgundy); font-size: 19px; line-height: 1; cursor: pointer; border-radius: 50%; }
.cart-qty button:hover:not([disabled]) { background: rgba(110,31,44,.08); }
.cart-qty button[disabled] { opacity: .35; cursor: default; }
.cart-qty output { min-width: 26px; text-align: center; font-weight: 600; font-size: 15px; }
.cart-line .link-btn { font-size: 13px; }

.cart-empty { padding: clamp(26px, 4vw, 40px); }
.cart-empty h2, .cart-h { font-size: clamp(28px, 3.4vw, 36px); color: var(--burgundy); margin-bottom: 10px; }
.cart-empty p { color: var(--text-dark-muted); margin-bottom: 22px; max-width: 34em; }
.cart-sub { color: var(--text-dark-muted); margin: 0 0 24px; }
.cart-form, .cart-review, .cart-done { padding: clamp(22px, 4vw, 40px); }
.field-row--3 { grid-template-columns: 1.3fr 1fr .8fr; }
.cart-form .small-print { margin: -4px 0 6px; }
.cart-shipping { min-inline-size: 0; margin: 0; padding: 0; border: 0; }

.cart-review-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; margin-top: 18px; }
.cart-review h3 { font: 600 12px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-lo); margin-bottom: 10px; }
.cart-review ul { list-style: none; margin: 0; padding: 0; }
.cart-review li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed rgba(90,64,30,.25); font-size: 15px; }
.cart-review li span:last-child { white-space: nowrap; font-weight: 600; }
.cart-review li small { display: block; color: var(--text-dark-muted); }
.cart-review [data-review-address] { white-space: pre-line; margin-bottom: 6px; }
.cart-pay { margin-top: 26px; padding-top: 20px; border-top: 1px dashed rgba(90,64,30,.3); }
.cart-pay-note { padding: 12px 16px; border-radius: 12px; background: rgba(201,162,74,.14); border: 1px solid rgba(201,162,74,.45); font-size: 14.5px; margin-bottom: 14px; }
.cart-done { text-align: center; }
.cart-done p { max-width: 34em; margin: 0 auto; }
.cart-done .acct-actions { justify-content: center; }
.cart-done-seal { font-size: 44px; color: var(--gold); line-height: 1; margin-bottom: 10px; }

/* The summary: a dark ledger beside the books */
.cart-summary {
  position: sticky; top: 100px; padding: 26px 24px; border-radius: 24px; color: var(--text);
  background: linear-gradient(180deg, #1a1517, #120e10); border: 1px solid var(--line); box-shadow: 0 30px 50px -30px #000;
}
.cart-summary h2 { font-size: 30px; color: var(--gold-hi); margin-bottom: 12px; }
.cart-sums { margin: 0; }
.cart-sums div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(201,162,74,.22); font-size: 15px; }
.cart-sums dt { color: var(--text-muted); }
.cart-sums dd { margin: 0; font-weight: 600; text-align: right; }
.cart-sums .cart-total { border-bottom: 0; padding-top: 14px; }
.cart-total dt, .cart-total dd { font: 700 26px/1.1 var(--serif); color: var(--gold-hi); }
.cart-tbc, .cart-open { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--text-muted); }
.cart-go { width: 100%; margin-top: 18px; }
.cart-go[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.cart-login { display: grid; gap: 10px; margin-top: 16px; }
.cart-login p { font-size: 14px; color: var(--text-muted); }
.cart-login .btn { width: 100%; min-height: 46px; padding: 10px 16px; font-size: 13px; }
.cart-secure { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--text-muted); }
.cart-secure svg { width: 16px; height: 16px; flex: none; }

@media (max-width: 960px) {
  .cart-grid { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 640px) {
  .cart-steps li { padding: 6px 10px 6px 6px; font-size: 11px; letter-spacing: .08em; }
  .cart-line { --ppi: 10.5px; grid-template-columns: calc(var(--cart-w, 6) * var(--ppi)) minmax(0, 1fr); padding: 12px; gap: 8px 14px; }
  .cart-line h3 { font-size: 21px; }
  .cart-line-end { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; }
  .field-row--3, .cart-review-grid { grid-template-columns: 1fr; gap: 0; }
  .cart-review-grid > div + div { margin-top: 18px; }
}

/* =====================================================================
   Dashboards: the frame (one per kind of login, set by a class on .dash-app)
   ===================================================================== */
.dash-page { min-height: 100vh; }
.dash-container { max-width: 1340px; }
.dash-loading { color: var(--text-muted); font-size: 18px; padding: 40px 0; }

.dash-app {
  /* The publisher's look: deep teal frame, paper panel (default) */
  --frame: linear-gradient(160deg, #1d3d3b, #102423);
  --rail: #e9dcc0;
  --tab-on: #fbf5e6; --tab-on-ink: var(--burgundy);
  --panel: #f8f1e1; --card: #fffbf2; --ink: #23190f; --muted: #6a5a43;
  --edge: rgba(90,64,30,.13); --edge-strong: rgba(90,64,30,.28);
  --accent: var(--burgundy); --kicker: var(--gold-lo);
  position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr);
  padding: 14px; border-radius: 34px; background: var(--frame);
  box-shadow: 0 50px 90px -40px #000, inset 0 0 0 1px rgba(201,162,74,.28);
}
.dash-app[hidden] { display: none; }
.dash-rail { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 16px 4px; color: var(--rail); }
.dash-mark img { border-radius: 10px; }
.dash-rail ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; justify-items: center; }
.dash-tab {
  display: grid; justify-items: center; gap: 6px; width: 82px; padding: 4px 2px; border: 0; background: none; cursor: pointer;
  color: inherit; text-decoration: none; text-align: center; font-size: 10px; font-weight: 600; letter-spacing: .13em; line-height: 1.25; text-transform: uppercase; opacity: .75;
}
.dash-tab i { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; transition: background-color .3s, color .3s, box-shadow .3s; }
.dash-tab svg { width: 21px; height: 21px; }
.dash-tab:hover { opacity: 1; }
.dash-tab:hover i { background: rgba(255,255,255,.08); }
.dash-tab[aria-current="page"] { opacity: 1; }
.dash-tab[aria-current="page"] i { background: var(--tab-on); color: var(--tab-on-ink); box-shadow: 0 12px 22px -12px #000; }
.dash-me { margin-top: auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font: 700 16px/1 var(--sans); color: #2a1a06; background: linear-gradient(160deg, #f6dc94, #b8893a); }

.dash-main { min-width: 0; min-height: 72vh; padding: clamp(18px, 2.6vw, 34px); border-radius: 26px; background: var(--panel); color: var(--ink); }
.dash-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px 24px; margin-bottom: 26px; }
.dash-kicker { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--kicker); }
.dash-title { margin-top: 6px; font-size: clamp(34px, 4.4vw, 54px); line-height: 1; color: var(--ink); }
.dash-title em { color: var(--accent); }
.dash-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dash-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--edge-strong); background: transparent; color: var(--ink); font-size: 13.5px; font-weight: 500; text-decoration: none; cursor: pointer;
}
.dash-pill:hover { background: rgba(201,162,74,.16); }
.dash-pill--dark { background: #241d17; border-color: #241d17; color: #f7f0e0; }
.dash-pill--dark:hover { background: #3a2f25; }
.dash-pill--gold { background: linear-gradient(180deg, #f6dc94, #c49a45); border-color: #c49a45; color: #2a1a06; font-weight: 600; }
.dash-pill--gold:hover { filter: brightness(1.05); background: linear-gradient(180deg, #f6dc94, #c49a45); }
.dash-as { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.dash-as[hidden] { display: none; }
.dash-as select {
  min-height: 40px; padding: 0 34px 0 14px; border-radius: 999px; border: 1px solid var(--edge-strong); background-color: var(--card); color: var(--ink);
  font: 500 13.5px var(--sans); appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a6a2a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.dash-preview {
  margin: -6px 0 22px; padding: 11px 16px; border-radius: 14px; font-size: 14px; color: var(--ink);
  border: 1px dashed rgba(138,106,42,.7); background: repeating-linear-gradient(135deg, rgba(201,162,74,.18) 0 10px, rgba(201,162,74,.07) 10px 20px);
}
.dash-preview[hidden] { display: none; }
.dash-status { margin: 0 0 16px; color: #8f1d1d; }
.dash-status:empty { display: none; }
.dash-view { min-width: 0; }
.dash-app :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* The dashboard fills the whole window: dashboard.html has no site header or footer.
   The frame is the page; the rail stays put while the panel scrolls. */
.dash-body { background: #070606; }
.dash-body .dash-page { display: block; min-height: 100vh; }
.dash-body .dash-loading { padding: 40px clamp(16px, 4vw, 40px); }
.dash-body .dash-app { min-height: 100vh; padding: 12px 12px 12px 0; border-radius: 0; box-shadow: none; grid-template-columns: 104px minmax(0, 1fr); }
.dash-body .dash-rail { position: sticky; top: 12px; align-self: start; height: calc(100vh - 24px); padding-top: 10px; overflow-y: auto; scrollbar-width: thin; }
.dash-body .dash-main { min-height: calc(100vh - 24px); padding: clamp(18px, 2.4vw, 40px) clamp(18px, 3vw, 48px); }
.dash-body :is(.dash-top, .dash-preview, .dash-status, .dash-view) { max-width: 1500px; margin-left: auto; margin-right: auto; }
.dash-mark { display: block; border-radius: 12px; }
.dash-mark:hover img { transform: rotate(-6deg); }
.dash-mark img { transition: transform .4s var(--ease); }
.dash-site { margin-top: auto; }
.dash-site + .dash-me { margin-top: 0; }

/* ---------- Shared pieces ---------- */
.dash-grid { display: grid; gap: 18px; }
.dash-grid + .dash-grid { margin-top: 18px; }
.g-hero { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dc { position: relative; min-width: 0; padding: 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--edge); }
.dc-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; margin-bottom: 14px; font: 600 15.5px/1.3 var(--sans); color: var(--ink); }
.dc-h small, .dc-h a { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.dc-h a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 2px; text-decoration: underline; text-decoration-color: var(--edge-strong); text-underline-offset: 3px; }
.dash-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 34px 0 14px; font-size: clamp(26px, 2.6vw, 32px); color: var(--ink); }
.dash-h small { font: 500 13px var(--sans); color: var(--muted); }
.dc-big { font: 600 clamp(48px, 5.4vw, 74px)/.92 var(--serif); }
.dc-label { font-size: 13px; color: var(--muted); }
.dc-text { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.dc-text strong { color: var(--ink); font-weight: 600; }
.dc-empty {
  padding: 18px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; color: var(--muted);
  border: 1px dashed var(--edge-strong); background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(138,106,42,.05) 12px 24px);
}
.dc-empty strong { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 600; }
.dc-empty a { color: var(--accent); }
.dc-sample { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font: 600 10.5px/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #6a4a0c; background: #f3e2b0; vertical-align: middle; }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--edge); }
.dash-list > li:last-child { border-bottom: 0; }
.dash-list b { display: block; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list img { width: 38px; height: calc(38px / var(--book-ar, .6786)); object-fit: cover; border-radius: 2px 3px 3px 2px; box-shadow: 0 6px 10px -6px rgba(0,0,0,.6); }
.score { min-width: 42px; padding: 6px 9px; border-radius: 10px; text-align: center; font-size: 13px; font-weight: 600; color: #8a5a1c; background: #f6e7c8; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 600 14px/1 var(--sans); color: #fff8ea; background: hsl(var(--hue, 30) 34% 38%); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: #5a4a30; background: #efe4cc; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag--request, .tag--draft { color: #6a4a0c; background: #f5e3b3; }
.tag--awaiting_payment, .tag--proof { color: #4b2a6a; background: #e7dcf0; }
.tag--paid, .tag--published, .tag--active, .tag--answered { color: #25502a; background: #d6ead2; }
.tag--sent { color: #1e4a5a; background: #d3e5eb; }
.tag--cancelled { color: #7a3b32; background: #f0e0da; }
.tag--admin { color: #6a4a0c; background: #f5e3b3; }
.tag--author { color: #6e1f2c; background: #f3dcdc; }
.tag--editor { color: #13302f; background: #d4e6e2; }
.tag--reviewer { color: #4b2a6a; background: #e7dcf0; }
.tag--invited { color: #6a5a43; background: #ece4d4; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--edge-strong); background: transparent; color: var(--ink); font-size: 13.5px; font-weight: 500;
}
.chip b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 11.5px; background: rgba(128,108,80,.16); }
.chip[aria-pressed="true"] { background: linear-gradient(180deg, #f6dc94, #c49a45); border-color: #c49a45; color: #2a1a06; font-weight: 600; }
.chip[aria-pressed="true"] b { background: rgba(42,26,6,.14); }

/* =====================================================================
   The publisher (admin): overview, orders desk, people
   ===================================================================== */
.pub-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); min-height: 290px; overflow: hidden; border: 0; color: #fff8ea;
  background: linear-gradient(115deg, #17403e 0%, #3a6b67 42%, #b99372 76%, #ecc9a6 100%);
}
.pub-hero .dc-label { color: rgba(255,248,234,.85); font-size: 15px; }
.pub-hero .dc-big { margin-top: 10px; font-size: clamp(76px, 9vw, 122px); color: #fff8ea; }
.pub-mini { display: grid; gap: 12px; margin-top: 18px; }
.pub-mini div { display: flex; align-items: center; gap: 12px; }
.pub-mini i { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.17); }
.pub-mini svg { width: 18px; height: 18px; }
.pub-mini span { display: block; font-size: 12px; opacity: .85; }
.pub-mini b { display: block; font: 600 25px/1 var(--serif); }
.pub-hero-art { position: relative; min-height: 200px; }
.pub-hero-art img { position: absolute; right: -12px; bottom: -8px; width: min(330px, 112%); filter: drop-shadow(0 24px 30px rgba(10,20,20,.45)); }
.pub-hero-cta {
  position: absolute; right: 0; bottom: 0; display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px;
  border-radius: 24px 0 24px 0; background: #13302f; color: #fff8ea; text-decoration: none; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.pub-hero-cta:hover { background: #0d2322; }
.pub-gauge { border: 0; background: linear-gradient(165deg, #f9e6d2, #f0cba7); }
.pub-gauge-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pub-gauge .dc-big sup { font: 600 13px var(--sans); padding: 3px 7px; border-radius: 999px; background: #fffaf2; vertical-align: super; margin-left: 4px; }
.pub-gauge svg { width: 124px; flex: none; }
.pub-gauge .dc-text { margin-top: 12px; color: #5a4632; }
.pub-note { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 12px 12px 16px; border-radius: 18px; background: #fffaf2; color: var(--ink); font-size: 13px; line-height: 1.4; text-decoration: none; }
.pub-note .go { width: 34px; height: 34px; flex: none; margin-left: auto; border-radius: 50%; display: grid; place-items: center; color: #fff8ea; background: linear-gradient(180deg, #ffb25a, #d9822b); }
.pub-note .go svg { width: 12px; height: 12px; }
.pub-money { display: flex; align-items: center; gap: 12px; }
.pub-money i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff8ea; background: #17403e; font-style: normal; font-weight: 600; }
.pub-money b { display: block; font: 600 26px/1 var(--serif); }
.bars { display: flex; align-items: stretch; justify-content: space-between; gap: 8px; height: 150px; margin-top: 18px; }
.bar { flex: 1; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 8px; }
.bar span { position: relative; width: 12px; height: 100%; border-radius: 999px; overflow: hidden; background: #efe4cd; }
.bar span i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h, 0%); border-radius: 999px; background: linear-gradient(180deg, #5c9893, #17403e); }
.bar small { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bars.is-empty span { background: repeating-linear-gradient(180deg, transparent 0 5px, rgba(90,64,30,.13) 5px 7px); }
.mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.mini-stats div { padding: 12px 14px; border-radius: 16px; background: rgba(201,162,74,.1); }
.mini-stats b { display: block; font: 600 30px/1 var(--serif); }
.mini-stats span { font-size: 12.5px; color: var(--muted); }
.faces { display: flex; margin-top: 14px; }
.faces .avatar { width: 34px; height: 34px; font-size: 12px; margin-right: -8px; box-shadow: 0 0 0 3px var(--card); }

/* Orders desk */
.od-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; }
.od-sums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 22px; border-radius: 24px; background: #efe5cf; }
.od-sums small { display: block; font-size: 13px; color: var(--muted); }
.od-sums b { display: block; margin-top: 4px; font: 600 clamp(28px, 2.8vw, 38px)/1.05 var(--serif); }
.od-sums em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.od-meter { height: 12px; margin-top: 14px; border-radius: 999px; overflow: hidden; background: #e3d6b9; }
.od-meter i { display: block; height: 100%; width: var(--w, 0%); min-width: 0; border-radius: 999px; background: repeating-linear-gradient(135deg, #c9a24a 0 6px, #e8c976 6px 12px); }
.od-shop { padding: 22px; border-radius: 24px; background: #1b1719; color: var(--text); }
.od-shop small { display: block; font-size: 13px; color: var(--text-muted); }
.od-shop b { display: block; margin: 4px 0 10px; font: 600 30px/1.05 var(--serif); color: var(--gold-hi); }
.od-shop p { font-size: 13.5px; line-height: 1.5; color: var(--text-muted); }
.od-shop code { font-size: .92em; color: var(--gold-hi); }
.od-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0 14px; }
.od-search {
  margin-left: auto; width: min(260px, 100%); min-height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--edge-strong); background: var(--card); color: var(--ink); font: 400 14px var(--sans);
}
.od-desk { display: grid; grid-template-columns: minmax(250px, .85fr) minmax(0, 1.6fr); gap: 14px; padding: 14px; border-radius: 28px; background: #1a1618; color: var(--text); }
.od-desk-h { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 0; font-size: 15px; font-weight: 600; }
.od-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; max-height: 600px; overflow: auto; }
.od-row {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 12px;
  border: 0; border-radius: 20px; background: #262123; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.od-row:hover { background: #302a2c; }
.od-row[aria-current="true"] { background: #3d5957; box-shadow: inset 0 0 0 1px rgba(240,211,140,.55); }
.od-row b { display: block; font-size: 14.5px; font-weight: 600; }
.od-row small { display: block; font-size: 12.5px; color: #b9ab8f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-row .amt { display: grid; justify-items: end; gap: 4px; font-size: 14.5px; font-weight: 600; }
.od-row .tag { font-size: 11px; padding: 2px 8px; }
.od-detail { min-width: 0; padding: 22px; border-radius: 22px; color: #f4ecda; background: linear-gradient(160deg, #426563, #2b4544); }
.od-detail-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr); gap: 14px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.14); }
.od-detail small { display: block; font-size: 12px; opacity: .75; margin-bottom: 4px; }
.od-ref { margin-bottom: 6px; font: 600 clamp(22px, 2.2vw, 28px)/1.1 var(--serif); overflow-wrap: anywhere; }
.od-who b { display: block; font-size: 15px; }
.od-who a { color: var(--gold-hi); font-size: 13px; word-break: break-all; }
.od-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.od-item { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.09); }
.od-item b { display: block; font: 600 22px/1.05 var(--serif); }
.od-item span { display: block; margin-top: 6px; font-size: 13px; opacity: .85; }
.od-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.09); }
.od-totals b { font: 600 22px/1.1 var(--serif); }
.od-address { margin-top: 14px; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.od-quote { margin-top: 10px; padding: 10px 14px; border-left: 2px solid var(--gold-hi); font-size: 14px; font-style: italic; opacity: .9; }
.od-upi { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 14px; line-height: 1.5; background: rgba(201, 162, 74, .1); }
.od-upi.is-check { box-shadow: inset 3px 0 0 var(--gold-hi); }
.od-upi small { display: block; margin-bottom: 2px; }
.od-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.od-btn { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(240,211,140,.45); background: transparent; color: #f4ecda; font: 600 13.5px var(--sans); cursor: pointer; }
.od-btn:hover { background: rgba(240,211,140,.12); }
.od-btn.is-main { border-color: transparent; color: #2a1a06; background: linear-gradient(180deg, #f6dc94, #c49a45); }
.od-btn[disabled] { opacity: .45; cursor: default; }
.od-note { margin-top: 16px; }
.od-note label { display: block; font-size: 12px; opacity: .75; margin-bottom: 6px; }
.od-note textarea { width: 100%; min-height: 72px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.18); color: inherit; font: 400 14px/1.5 var(--sans); resize: vertical; }
.od-detail .form-status { margin-top: 10px; font-size: 13.5px; color: var(--gold-hi); }
.od-empty { grid-column: 1 / -1; padding: 30px; border-radius: 20px; border: 1px dashed rgba(240,211,140,.35); color: var(--text-muted); }
.od-empty strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* People */
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.team-card { display: grid; gap: 12px; align-content: start; padding: 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--edge); }
.team-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.team-top b { display: block; font-size: 15px; }
.team-top small { display: block; font-size: 12.5px; color: var(--muted); word-break: break-all; }
.team-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.team-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.team-actions .link-btn { font-size: 13px; }
.people-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.invite-card .field { margin-bottom: 16px; }
.invite-card .field input, .invite-card .field select { background-color: transparent; }
.copy-row { display: flex; gap: 8px; margin-top: 10px; }
.copy-row input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--edge-strong); background: #fff; font: 400 13px var(--sans); color: var(--ink); }
.invite-result { margin-top: 16px; padding: 14px; border-radius: 16px; background: rgba(201,162,74,.12); font-size: 14px; }
.invite-result[hidden] { display: none; }

/* =====================================================================
   The editor: a black desk with gold (after the CRM "workspace")
   ===================================================================== */
.dash-app.is-editor {
  --frame: #050505; --rail: #d8d0c2; --tab-on: linear-gradient(180deg, #f6dc94, #c49a45); --tab-on-ink: #1b140e;
  --panel: #0d0c0c; --card: #1c1a1a; --ink: #f4efe6; --muted: #a59e92;
  --edge: rgba(255,255,255,.08); --edge-strong: rgba(255,255,255,.2); --accent: var(--gold-hi); --kicker: var(--gold);
  box-shadow: 0 50px 90px -40px #000, inset 0 0 0 1px rgba(201,162,74,.22);
}
.is-editor .dash-as select { background-color: #1c1a1a; }
.is-editor .dash-pill:hover, .is-editor .chip:hover { background: rgba(240,211,140,.1); }
.is-editor .dc-empty { background: rgba(255,255,255,.02); }
.is-editor .dash-preview { background: rgba(240,211,140,.1); border-color: rgba(240,211,140,.45); }
.is-editor .tag { filter: saturate(.9); }
.ed-strip {
  display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 20px; border-radius: 999px; overflow-x: auto;
  background: #f6f0e4; color: #1b140e; scrollbar-width: none;
}
.ed-strip::-webkit-scrollbar { display: none; }
.ed-strip > b { flex: none; font-size: 15px; font-weight: 600; }
.ed-strip > span { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(27,20,14,.2); font-size: 13px; }
.ed-days { display: flex; gap: 4px; flex: 1; }
.ed-day { flex: 1; min-width: 42px; display: grid; justify-items: center; gap: 1px; padding: 6px 2px; border-radius: 16px; font-size: 10.5px; color: #6a5a43; }
.ed-day b { font: 600 15px/1.1 var(--sans); color: #1b140e; }
.ed-day.has { background: linear-gradient(180deg, #f6dc94, #d1aa52); color: #2a1a06; }
.ed-day.is-today { box-shadow: inset 0 0 0 2px #1b140e; }
.ed-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 48px; margin: 30px 0 8px; }
.ed-title { font: 600 clamp(44px, 6.4vw, 84px)/.88 var(--serif); letter-spacing: .03em; text-transform: uppercase; color: var(--ink); }
.ed-title span { color: var(--gold-hi); }
.ed-stat { display: flex; align-items: baseline; gap: 8px; }
.ed-stat b { font: 500 clamp(40px, 4vw, 52px)/1 var(--sans); }
.ed-stat span { font-size: 14px; color: var(--muted); }
.ed-stat sup { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: #f6dc94; color: #2a1a06; }
.ed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 22px; align-items: start; }
.ed-layout > div { min-width: 0; }
.ed-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr)); gap: 14px; }
.ed-cards .dc-empty { grid-column: 1 / -1; }
.ed-card {
  position: relative; display: grid; align-content: start; gap: 9px; min-height: 158px; padding: 16px; border-radius: 18px;
  border: 1px solid var(--edge); background: var(--card); color: var(--ink); text-align: left; font: inherit; cursor: pointer;
}
.ed-card:hover { border-color: var(--accent); }
.ed-card[aria-pressed="true"] { background: linear-gradient(160deg, #f6dc94, #c9a24a); color: #1b140e; border-color: transparent; }
.ed-card[aria-pressed="true"] small, .ed-card[aria-pressed="true"] .ed-src { color: #4a3510; }
.ed-card .go { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; opacity: .7; }
.ed-card .go svg { width: 12px; height: 12px; }
.ed-card b { display: block; padding-right: 44px; font: 500 21px/1.15 var(--sans); }
.ed-card small { display: block; font-size: 12.5px; color: var(--muted); }
.ed-src { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); }
.ed-src span { padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; }
.ed-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ed-task { display: grid; gap: 12px; align-content: start; padding: 18px; border-radius: 26px; background: #4a4646; color: var(--ink); }
.ed-task:first-child { background: linear-gradient(160deg, #f6dc94, #c9a24a); color: #1b140e; }
.ed-task:first-child small { color: #4a3510; }
.ed-task b { font: 500 22px/1.15 var(--sans); }
.ed-task small { font-size: 12.5px; color: #d6cfc2; }
.ed-task .ed-state { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 8px 14px; border-radius: 999px; border: 1px solid currentColor; font-size: 13px; }
.ed-side { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; padding: 20px; border: 1px solid #d9cdb7; border-radius: 28px; background: #f6f0e4; color: #1b140e; }
.ed-side h3 { font: 600 26px/1.1 var(--serif); margin-bottom: 4px; }
.ed-side .dc-label { color: #6a5a43; }
.ed-side dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 14px 0; font-size: 13.5px; }
.ed-side dt { color: #6a5a43; }
.ed-side dd { margin: 0; word-break: break-word; }
.ed-side pre { margin: 0; max-height: 340px; overflow: auto; padding: 14px; border-radius: 18px; background: #fffaf0; white-space: pre-wrap; word-break: break-word; font: 400 13.5px/1.55 var(--sans); }
.ed-files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.ed-files a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: #ece3d0; color: #1b140e; font-size: 13.5px; text-decoration: none; }
.ed-files a:hover { background: #e3d6bb; }
.ed-side .dc-empty { color: #6a5a43; border-color: rgba(27,20,14,.25); }
.ed-side .dc-empty strong { color: #1b140e; }

/* =====================================================================
   Authors, reviewers and readers: a cream reading room (after the reading apps)
   ===================================================================== */
.dash-app.is-reading {
  --frame: linear-gradient(160deg, #e7dcc4, #d8cbae); --rail: #3a2f25; --tab-on: var(--burgundy); --tab-on-ink: #fbf5e6;
  --panel: #f8f3e7; --card: #fffcf5; --ink: #1f1a14; --muted: #6d604d;
  --edge: rgba(70,52,30,.12); --edge-strong: rgba(70,52,30,.26); --accent: var(--burgundy); --kicker: #8a6a2a;
  box-shadow: 0 50px 90px -40px #000, inset 0 0 0 1px rgba(255,255,255,.4);
}
.is-reading .dash-main { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset; }
.rd-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.rd-hero h2 { font: 500 clamp(40px, 5vw, 64px)/1.02 var(--serif); }
.rd-hero p { max-width: 30em; margin-top: 14px; color: var(--muted); }
.rd-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 22px; padding: 0 22px; border-radius: 999px; background: #241f1c; color: #f7f2e6; font-size: 14px; text-decoration: none; }
.rd-btn:hover { background: #3a322c; }
.rd-btn svg { width: 11px; height: 11px; }
.rd-fan { position: relative; height: 260px; }
.rd-fan img { position: absolute; bottom: 25px; left: 50%; width: 150px; height: auto; aspect-ratio: var(--book-ar, 2 / 3); object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: 0 30px 40px -22px rgba(0,0,0,.6); transform-origin: 50% 110%; }
.rd-fan img:nth-child(1) { transform: translateX(-118%) rotate(-12deg); }
.rd-fan img:nth-child(2) { transform: translateX(-50%) translateY(-8px); z-index: 1; }
.rd-fan img:nth-child(3) { transform: translateX(18%) rotate(12deg); }
.rd-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 26px; margin-top: 10px; }
.rd-cols > div { min-width: 0; }
.rd-side { padding: 22px; border-radius: 26px; background: #fffcf5; border: 1px solid var(--edge); align-self: start; }
.rd-side + .rd-side { margin-top: 18px; }
/* Books at their real size, side by side (books/shape.js): one scale per shelf (--ppi, pixels per inch), each book as wide
   as its print size; --shelf-h (the tallest book, dashboard.js) puts every cover's foot on one line. Rows wrap. */
.rd-shelf { --ppi: clamp(13px, calc((100vw - 50px) / 16), 24px); display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; }
.rd-shelf > * { flex: 0 0 auto; min-width: 0; width: calc(var(--book-w, 6) * var(--ppi)); max-width: 100%; }
.rd-shelf > * :is(b, small) { overflow-wrap: anywhere; }
.lib-shelf .au-cloth { margin-top: calc((var(--shelf-h, 9) - var(--book-h, 9)) * var(--ppi)); }
.rd-book { color: inherit; text-decoration: none; }
/* each cover in its print size (books/shape.js), its foot on the shelf's line (the tallest book's, --shelf-h);
   height: auto, or the img's height attribute would fix its height and the shape would be ignored */
.rd-book img { display: block; width: 100%; height: auto; aspect-ratio: var(--book-ar, 2 / 3); margin-top: calc((var(--shelf-h, 9) - var(--book-h, 9)) * var(--ppi)); object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: 0 18px 24px -16px rgba(0,0,0,.55); transition: transform .4s var(--ease); }
.rd-book:hover img { transform: translateY(-4px); }
.rd-book b { display: block; margin-top: 10px; font-size: 14px; font-weight: 500; line-height: 1.3; }
.rd-book small { display: block; font-size: 12.5px; font-style: italic; color: var(--muted); }
.rd-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.rd-week div { padding: 8px 0; border-radius: 999px; font-size: 12.5px; color: var(--muted); }
.rd-week b { display: block; font: 600 18px/1.3 var(--sans); color: var(--ink); }
.rd-week .is-sun, .rd-week .is-sun b { color: var(--burgundy); }
.rd-week .is-today { background: #ece2cc; }
.rd-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rd-order { padding: 16px 18px; border-radius: 20px; background: #fffcf5; border: 1px solid var(--edge); }
.rd-order-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; }
.rd-order-top b { font: 600 20px/1.1 var(--serif); }
.rd-order p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.rd-cart { display: flex; align-items: center; gap: 14px; }
.rd-cart b { font: 600 44px/1 var(--serif); }

/* The reviewer's proofreading list and the reader's library */
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rv-book { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; padding: 16px; border-radius: 22px; background: #fffcf5; border: 1px solid var(--edge); }
.rv-book b { display: block; font: 600 24px/1.1 var(--serif); }
.rv-book small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.rv-book .dc-text { margin-top: 8px; }
.rv-book .rd-btn { margin-top: 12px; }
.rv-cover img, .rv-cover .au-cloth, .lib-shelf .au-cloth { width: 100%; height: auto; aspect-ratio: var(--book-ar, 2 / 3); object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: 0 16px 22px -14px rgba(0,0,0,.55); }
.rv-cover .au-cloth, .lib-shelf .au-cloth { padding: 10px; font-size: 15px; }
.ed-open { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; font-weight: 600; color: inherit; text-decoration: none; }
.ed-open svg { width: 11px; height: 11px; }
.ed-open:hover { text-decoration: underline; }

/* Our books inside the dashboard (#books, #books/<slug>) */
.bk-shelf { gap: 22px 18px; }
.bk-shelf .au-cloth { width: 100%; aspect-ratio: var(--book-ar, 2 / 3); margin-top: calc((var(--shelf-h, 9) - var(--book-h, 9)) * var(--ppi)); padding: 10px; font-size: 15px; border-radius: 2px 4px 4px 2px; box-shadow: 0 18px 24px -16px rgba(0,0,0,.55); }
.dash-back { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: 14px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--edge-strong); color: var(--ink); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.dash-back:hover { background: rgba(201,162,74,.16); }
.bk-page .dash-kicker { margin-bottom: 6px; }
.bk-sub { margin-top: 6px; font: italic 500 22px/1.2 var(--serif); color: var(--muted); }
.bk-buy { display: grid; gap: 12px; margin: 22px 0 6px; padding: 18px 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--edge); }
.bk-buy small { display: block; font-size: 12.5px; color: var(--muted); }
.bk-buy label { display: block; font-size: 13px; color: var(--muted); }
.bk-buy select { margin: 5px 0; padding: 8px; border: 1px solid var(--edge); border-radius: 8px; color: var(--accent); background: var(--card); font: inherit; }
.bk-buy b { display: block; margin-top: 2px; font: 600 32px/1.1 var(--serif); color: var(--accent); }
.bk-buy b.is-tbc { font-size: 22px; font-style: italic; color: var(--muted); }
.bk-buy .rd-btn[disabled] { opacity: .5; cursor: default; }
.bk-buy .dash-pill svg { width: 11px; height: 11px; }
.bk-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 18px; margin: 18px 0 0; }
.bk-specs div { padding: 10px 0; border-bottom: 1px solid var(--edge); }
.bk-specs dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.bk-specs dd { margin: 2px 0 0; font-size: 14.5px; }
.is-editor .bk-buy b.is-tbc { color: var(--muted); }

/* The author's book */
.au-book { display: grid; grid-template-columns: minmax(170px, 270px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.au-cover img, .au-cloth { width: 100%; height: auto; aspect-ratio: var(--book-ar, 2 / 3); object-fit: cover; border-radius: 2px 5px 5px 2px; box-shadow: 0 36px 50px -26px rgba(0,0,0,.6), var(--pageblock); }
.au-cloth { display: grid; place-items: center; padding: 22px; text-align: center; color: var(--gold-hi); font: 600 26px/1.15 var(--serif); background: var(--cloth), linear-gradient(160deg, #7a2433, #3b0f18); }
.au-title { font: 500 clamp(36px, 4.6vw, 60px)/1.02 var(--serif); }
.au-by { margin-top: 12px; font-weight: 600; }
.au-blurb { margin-top: 12px; max-width: 34em; font-style: italic; color: var(--muted); }
.au-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 22px 0 6px; }
.au-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.au-steps li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 12.5px; color: var(--muted); }
.au-steps li::before { content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 2px; background: var(--edge-strong); }
.au-steps li:first-child::before { display: none; }
.au-steps i { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--edge-strong); background: var(--panel); }
.au-steps .is-done i { border-color: var(--gold); background: var(--gold); }
.au-steps .is-done::before, .au-steps .is-now::before { background: var(--gold); }
.au-steps .is-now i { border-color: var(--burgundy); box-shadow: 0 0 0 4px rgba(110,31,44,.15); }
.au-steps .is-now { color: var(--ink); font-weight: 600; }
.au-more { margin-top: 30px; }

/* =====================================================================
   The studio (studio.html): the flipbooks, in the dashboard's frame
   ===================================================================== */
.st-who { margin-top: 10px; font-size: 14px; color: var(--muted); }
.st-sums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.st-sum { padding: 18px 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--edge); }
.st-sum small { display: block; font-size: 13px; color: var(--muted); }
.st-sum b { display: block; margin-top: 6px; font: 600 clamp(36px, 3.6vw, 48px)/1 var(--serif); }
.st-sum em { display: block; margin-top: 6px; font-style: normal; font-size: 12.5px; color: var(--muted); }
.st-sum--hero { border: 0; color: #fff8ea; background: linear-gradient(115deg, #17403e 0%, #3a6b67 55%, #b99372 100%); }
.st-sum--hero small, .st-sum--hero em { color: rgba(255,248,234,.82); }
.is-editor .st-sum--hero { color: #1b140e; background: linear-gradient(160deg, #f6dc94, #c9a24a); }
.is-editor .st-sum--hero small, .is-editor .st-sum--hero em { color: #4a3510; }
.is-reading .st-sum--hero { background: linear-gradient(140deg, #7a2433, #43101a); }
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.st-grid.is-solo { grid-template-columns: minmax(0, 1fr); }
.st-main { min-width: 0; }
.st-new[hidden], .st-side[hidden] { display: none; }
.st-new .dc-text { margin: -6px 0 18px; }
.st-new .acct-foot { margin-top: 4px; }
.st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 28px 0 14px; }
.st-bar .dash-h { margin: 0 auto 0 0; }
.st-bar .od-search { margin-left: 0; }
.st-books { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.st-book { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 22px; padding: 20px; border-radius: 26px; background: var(--card); border: 1px solid var(--edge); }
.st-book > .form-status { grid-column: 2; margin: 0; font-size: 14px; }
.st-book > .form-status:empty { display: none; }
.st-cover img, .st-cover .au-cloth { width: 100%; height: auto; aspect-ratio: var(--book-ar, 2 / 3); object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: 0 16px 22px -14px rgba(0,0,0,.55); }
.st-cover .au-cloth { padding: 10px; font-size: 15px; }
.st-body { min-width: 0; }
.st-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 14px; }
.st-head h3 { font: 600 clamp(24px, 2.3vw, 30px)/1.08 var(--serif); color: var(--ink); }
.tag--sold { color: #1e4a5a; background: #d3e5eb; }
.st-meta { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.st-actions .dash-pill svg { width: 11px; height: 11px; }
.dash-pill--danger { color: #8f1d1d; border-color: rgba(143,29,29,.4); }
.dash-pill--danger:hover { background: rgba(143,29,29,.08); }
.dash-pill[disabled] { opacity: .5; cursor: progress; }
.st-share { margin: 18px 0 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--edge); min-width: 0; }
.st-share legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; font: 600 11.5px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--kicker); }
.st-share .seg { clear: both; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.st-share .seg-opt span { min-height: 36px; padding: 6px 15px; border-radius: 999px; border: 1px solid var(--edge-strong); background: transparent; color: var(--ink); font-size: 13.5px; }
.st-share .seg-opt input:checked + span { border-color: #c49a45; color: #2a1a06; font-weight: 600; background: linear-gradient(180deg, #f6dc94, #c49a45); }
.st-hint { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.st-share .studio-copy input { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--edge-strong); background: var(--panel); color: var(--ink); font: 400 13px var(--sans); }
.st-proofs { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--edge-strong); display: grid; gap: 10px; }
.st-proofs li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.st-proofs .avatar { width: 34px; height: 34px; font-size: 12px; }
.st-proofs b { display: block; font-size: 14.5px; font-weight: 600; }
.st-proofs small { display: block; font-size: 12.5px; color: var(--muted); }
.st-proof-btns { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.st-proof-btns .link-btn { font-size: 13px; }
.st-more { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--edge-strong); }
.st-more summary { display: flex; align-items: center; min-height: 34px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); }
.st-more[open] summary { margin-bottom: 14px; }
.st-more .field { margin-bottom: 16px; }
.st-more .st-actions { margin-top: 4px; }
.st-side .dc-text { margin-bottom: 16px; }
.st-side .field { margin-bottom: 16px; }
.st-authors { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.st-author { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding-top: 12px; border-top: 1px dashed var(--edge-strong); }
.st-author b { display: block; font-size: 14.5px; }
.st-author small { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.st-author .team-actions { margin-top: 6px; }
.st-author .team-actions .link-btn { font-size: 13px; }

/* The upload card: dark glass with a gold glow, whatever the login's colours */
.up {
  position: relative; isolation: isolate; overflow: hidden; margin-bottom: 8px; padding: clamp(20px, 3vw, 30px); border-radius: 30px; color: #f3ede2;
  background: radial-gradient(120% 90% at 50% -10%, #2b2421 0%, #151213 55%, #0c0a0b 100%);
  border: 1px solid rgba(240,211,140,.16); box-shadow: 0 34px 60px -36px #000, inset 0 1px 0 rgba(255,255,255,.06);
}
.up[hidden] { display: none; }
.up::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px); background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(90% 70% at 50% 0%, #000, transparent 75%); }
.up::after { content: ""; position: absolute; left: -2px; top: 18%; bottom: 18%; width: 3px; z-index: -1; border-radius: 3px;
  background: linear-gradient(180deg, transparent, rgba(240,211,140,.75), transparent); box-shadow: 0 0 26px 6px rgba(240,211,140,.22); }
.up-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 18px; padding: 0; }
.up-steps li { width: 38px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.14); transition: background .3s, box-shadow .3s; }
.up-steps li.is-done { background: rgba(240,211,140,.5); }
.up-steps li.is-on { background: linear-gradient(90deg, #f6dc94, #c9a24a); box-shadow: 0 0 12px rgba(240,211,140,.55); }
.up-title { font: 600 clamp(32px, 3.8vw, 48px)/1 var(--serif); color: rgba(243,237,226,.5); }
.up-title em { display: block; font-style: normal; color: #f3ede2; }
.up-drop {
  display: grid; justify-items: center; gap: 6px; margin-top: 22px; padding: 30px 20px; border-radius: 26px; text-align: center;
  background: radial-gradient(80% 120% at 50% 0%, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 0 40px rgba(240,211,140,.06), 0 0 0 1px rgba(0,0,0,.35), 0 18px 40px -24px rgba(240,211,140,.25);
  transition: border-color .25s, box-shadow .25s;
}
.up-drop.is-over { border-color: rgba(240,211,140,.75); box-shadow: inset 0 0 60px rgba(240,211,140,.16), 0 0 34px rgba(240,211,140,.3); }
.up-icon { width: 50px; height: 50px; margin-bottom: 6px; border-radius: 50%; display: grid; place-items: center; color: #f6dc94; background: #1c1818; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 0 22px rgba(240,211,140,.25); }
.up-icon svg { width: 22px; height: 22px; }
.up-drop b { font-size: 17px; font-weight: 600; }
.up-drop small { font-size: 13px; color: rgba(243,237,226,.6); }
.up-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.up-pick { margin-top: 10px; min-height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.05); color: #f3ede2; font: 500 14px var(--sans); cursor: pointer; }
.up-pick:hover, .up-link:hover { color: #f6dc94; }
.up-files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.up-files:empty { display: none; }
.up-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 14px 16px; border-radius: 20px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); }
.up-file.is-bad { border-color: rgba(240,138,128,.35); }
.up-file-icon { color: rgba(243,237,226,.6); }
.up-file-icon svg { width: 20px; height: 20px; }
.up-file b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 500; }
.up-file small { font-size: 12.5px; color: rgba(243,237,226,.55); }
.up-state { display: flex; align-items: center; gap: 10px; }
.up-ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #9ed99e; background: rgba(120,200,120,.16); border: 1px solid rgba(120,200,120,.35); }
.up-bad { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #f39a90; background: rgba(220,80,70,.14); border: 1px solid rgba(220,80,70,.3); }
.up-pct { font-size: 13px; font-weight: 600; color: #f6dc94; }
.up-retry { min-height: 30px; padding: 0 6px; border: 0; background: none; color: rgba(243,237,226,.65); font: 500 13px var(--sans); cursor: pointer; }
.up-retry:hover { color: #f3ede2; }
.up-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.1); }
.up-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, #c9a24a, #f6dc94); transition: width .2s; }
.up [data-up-step="details"] { margin-top: 20px; }
.up .field { margin-bottom: 16px; }
.up :is(.field input, .field select) { color: #f3ede2; background-color: transparent; border-bottom-color: rgba(255,255,255,.28); }
.up .field select option { color: #1b140e; }
.up :is(.field label) { color: #e3c477; }
.up .field .opt { color: rgba(243,237,226,.55); }
.up-opts { display: grid; gap: 10px; margin-top: 4px; }
.up-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.up-opt-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #f6dc94; background: #1c1818; border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 -10px 18px rgba(240,211,140,.08); }
.up-opt-icon svg { width: 20px; height: 20px; }
.up-opt b { display: block; font-size: 15px; font-weight: 500; }
.up-opt small { display: block; font-size: 12.5px; color: rgba(243,237,226,.55); }
.up-switch { appearance: none; -webkit-appearance: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: rgba(255,255,255,.2); cursor: pointer; transition: background .25s; }
.up-switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .25s var(--ease); }
.up-switch:checked { background: linear-gradient(180deg, #f6dc94, #c49a45); }
.up-switch:checked::before { transform: translateX(20px); }
.up-switch:focus-visible { outline: 2px solid #f6dc94; outline-offset: 3px; }
.up-note { margin-top: 14px; font-size: 13.5px; color: rgba(243,237,226,.7); }
.up-note[hidden] { display: none; }
.up-foot { display: flex; gap: 10px; margin-top: 20px; }
.up-btn { min-height: 50px; padding: 0 24px; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #f3ede2; font: 500 15px var(--sans); cursor: pointer; transition: background .2s, filter .2s; }
.up-btn:hover { background: rgba(255,255,255,.09); }
.up-btn[hidden] { display: none; }
.up-btn--main { flex: 1; border-color: transparent; color: #2a1a06; font-weight: 600; background: linear-gradient(180deg, #f6dc94, #c49a45); box-shadow: 0 12px 28px -14px rgba(240,190,90,.7); }
.up-btn--main:hover { background: linear-gradient(180deg, #f6dc94, #c49a45); filter: brightness(1.06); }
.up-btn[disabled] { opacity: .4; cursor: not-allowed; filter: none; }
.up > .form-status { margin-top: 12px; color: #f39a90; }
.up > .form-status.is-ok { color: #b9d8b0; }
.up > .form-status:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .up-switch::before, .up-bar i, .up-steps li { transition: none; } }

/* Forms on the editor's black desk: light text, gold labels */
.is-editor:not(.force-light) :is(.field input, .field select, .field textarea) { color: var(--ink); background-color: transparent; border-bottom-color: rgba(255,255,255,.28); }
.is-editor:not(.force-light) .field select option { color: #1b140e; }
.is-editor:not(.force-light) :is(.field label, .checks legend) { color: var(--gold); }
.is-editor:not(.force-light) :is(.check, .field-hint, .field .opt) { color: var(--muted); }
.is-editor:not(.force-light) .link-btn { color: var(--gold-hi); text-decoration-color: rgba(240,211,140,.4); }
.is-editor:not(.force-light) .link-btn--danger, .is-editor:not(.force-light) .dash-pill--danger { color: #f0a6a0; border-color: rgba(240,166,160,.4); }
.is-editor:not(.force-light) .form-status { color: #f0a6a0; }
.is-editor:not(.force-light) .form-status.is-ok { color: #b9d8b0; }
.is-editor:not(.force-light) .dash-pill--dark { background: linear-gradient(180deg, #f6dc94, #c49a45); border-color: #c49a45; color: #1b140e; font-weight: 600; }
.is-editor:not(.force-light) .studio-progress { background: rgba(255,255,255,.12); }
.is-editor:not(.force-light) input[type="file"] { color: var(--muted); }


/* =====================================================================
   Profile, the bell, switches, reviews, reader extras, light and dark
   ===================================================================== */
/* Top bar: the bell and your chip */
.dash-bell { position: relative; }
.dash-icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--edge-strong); background: transparent; color: var(--ink); cursor: pointer; }
.dash-icon-btn:hover { background: rgba(201,162,74,.16); }
.dash-icon-btn svg { width: 20px; height: 20px; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font: 700 11px/1 var(--sans); color: #fff; background: #c0392b; box-shadow: 0 0 0 2px var(--panel); }
.bell-count[hidden] { display: none; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: min(380px, 86vw); max-height: 70vh; overflow: auto; padding: 14px; border-radius: 22px; background: var(--card); color: var(--ink); border: 1px solid var(--edge-strong); box-shadow: 0 26px 50px -20px rgba(0,0,0,.45); }
.bell-panel[hidden] { display: none; }
.bell-h { margin: 2px 6px 10px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--kicker); }
.bell-empty { padding: 8px 6px 4px; font-size: 14px; color: var(--muted); }
.bell-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bell-panel a { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 8px; border-radius: 14px; color: inherit; text-decoration: none; font-size: 14px; line-height: 1.35; }
.bell-panel a:hover { background: rgba(201,162,74,.12); }
.bell-panel i { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: rgba(201,162,74,.14); color: var(--accent); }
.bell-panel i svg { width: 16px; height: 16px; }
.bell-panel small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.bell-panel .is-new a { font-weight: 600; }
.bell-panel .is-new i { box-shadow: inset 0 0 0 2px var(--gold); }
.dash-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 3px 14px 3px 3px; border-radius: 999px; border: 1px solid var(--edge-strong); color: var(--ink); text-decoration: none; }
.dash-chip:hover { background: rgba(201,162,74,.12); }
.chip-face { width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font: 700 13px var(--sans); color: #2a1a06; background: linear-gradient(160deg, #f6dc94, #b8893a); }
.chip-face img, .dash-me img, .pf-face img { width: 100%; height: 100%; object-fit: cover; }
.dash-chip b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.dash-chip small { display: block; font-size: 11.5px; color: var(--muted); }
.dash-me { overflow: hidden; text-decoration: none; }
.dash-me:hover { box-shadow: 0 0 0 2px var(--gold-hi); }

/* Profile */
.pf-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 22px; align-items: start; }
.pf-card { position: sticky; top: 24px; display: grid; gap: 16px; padding: 24px; border-radius: 28px; background: var(--card); border: 1px solid var(--edge); box-shadow: 0 24px 50px -36px rgba(0,0,0,.5); }
.pf-who { display: flex; gap: 16px; align-items: center; }
.pf-face { width: 76px; height: 76px; flex: none; border-radius: 22px; overflow: hidden; display: grid; place-items: center; font: 700 26px var(--sans); color: #2a1a06; background: linear-gradient(160deg, #f6dc94, #b8893a); box-shadow: 0 14px 24px -14px rgba(0,0,0,.6); }
.pf-who h2 { font-size: 28px; line-height: 1.05; color: var(--ink); }
.pf-who p { font-size: 13px; color: var(--muted); }
.pf-photo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-facts { margin: 0; display: grid; gap: 8px; }
.pf-facts div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--edge); font-size: 13.5px; }
.pf-facts dt { color: var(--muted); }
.pf-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.pf-stats { display: grid; gap: 14px; padding: 18px; border-radius: 22px; background: var(--panel); }
.pf-stats div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: end; }
.pf-stats span { font-size: 12.5px; color: var(--muted); }
.pf-stats b { font: 600 26px/1 var(--sans); }
.pf-stats i { grid-column: 1 / -1; position: relative; height: 4px; border-radius: 4px; background: var(--edge-strong); overflow: hidden; }
.pf-stats i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); min-width: 4px; border-radius: 4px; background: var(--c); }
.pf-main { display: grid; gap: 16px; min-width: 0; }
.pf-form .field { margin-bottom: 14px; }
.pf-form .st-actions { margin-top: 4px; }
.pf-form > .form-status { margin-top: 10px; font-size: 14px; }
.pf-leave .dc-text { margin-bottom: 10px; }

/* Rows with an icon and a switch or a choice (notifications, appearance, the shop) */
.opt-list { display: grid; gap: 10px; }
.opt-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--edge); cursor: pointer; }
.opt-row:has(input:checked) { border-color: var(--gold); }
.opt-row:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.opt-row b { display: block; font-size: 15px; font-weight: 500; }
.opt-row small { display: block; font-size: 12.5px; color: var(--muted); }
.opt-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: var(--accent); background: var(--card); border: 1px solid var(--edge); }
.opt-icon svg { width: 19px; height: 19px; }
.opt-row input[type="radio"] { width: 22px; height: 22px; margin: 0; accent-color: var(--gold-lo); }
.sw { appearance: none; -webkit-appearance: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: var(--edge-strong); cursor: pointer; transition: background .25s; }
.sw::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .25s var(--ease); }
.sw:checked { background: linear-gradient(180deg, #4cc26b, #2f9c4d); }
.sw:checked::before { transform: translateX(20px); }
.sw:focus-visible, .opt-row input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* The shop settings on the dark orders card */
.od-shop { display: grid; gap: 10px; }
.od-shop > small { margin-bottom: 2px; }
.od-shop .opt-row { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: var(--text); }
.od-shop .opt-row small { color: var(--text-muted); }
.od-shop .opt-icon { background: #262123; border-color: rgba(255,255,255,.12); color: var(--gold-hi); }
.od-shop .field { margin: 4px 0 2px; }
.od-shop .field label { color: var(--gold); }
.od-shop .field .opt { color: var(--text-muted); }
.od-shop .field input { color: var(--text); background: transparent; border-bottom-color: rgba(255,255,255,.3); }
.od-shop .od-btn { justify-self: start; }
.od-shop .form-status { font-size: 13.5px; color: #f0a6a0; }
.od-shop .form-status.is-ok { color: #b9d8b0; }

/* The editor's workflow on a submission */
.wf { margin-top: 18px; padding-top: 14px; border-top: 1px dashed rgba(27,20,14,.25); }
.wf h4 { margin: 16px 0 8px; font: 600 12px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #8a6a2a; }
.wf h4:first-child { margin-top: 0; }
.wf h4 small { margin-left: 6px; letter-spacing: 0; }
.wf .chip { min-height: 34px; padding: 0 12px; font-size: 13px; color: #1b140e; border-color: rgba(27,20,14,.22); }
.wf-label { display: block; margin: 12px 0 6px; font-size: 12.5px; color: #6a5a43; }
.wf textarea { width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(27,20,14,.2); background: #fffaf0; font: 400 14px/1.5 var(--sans); color: #1b140e; resize: vertical; margin-bottom: 8px; }
.wf .dash-pill { color: #1b140e; border-color: rgba(27,20,14,.25); }
.wf .dash-pill--dark { color: #f7f0e0; }
.wf-now { font-size: 13.5px; color: #6a5a43; margin-bottom: 8px; }
.wf-assign { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-assign select, .wf-assign input { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(27,20,14,.22); background: #fffaf0; color: #1b140e; font: 400 13.5px var(--sans); }
.wf-reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wf-reviews li { padding: 12px 14px; border-radius: 16px; background: #fffaf0; font-size: 13.5px; }
.wf-reviews li div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wf-reviews p { margin-top: 6px; white-space: pre-wrap; }
.wf-reviews small { display: block; margin-top: 4px; color: #6a5a43; font-size: 12px; }
.wf .form-status { color: #8f1d1d; }
.wf .form-status.is-ok { color: #2f5d34; }
.stars { color: #b47708; letter-spacing: 1px; }
.stars span { color: rgba(128,108,80,.3); }

/* The reviewer's manuscript and Write Review */
.ms-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.ms-read { min-width: 0; }
.ms-text { margin: 16px 0 0; max-height: 60vh; overflow: auto; padding: 18px; border-radius: 18px; background: var(--panel); white-space: pre-wrap; word-break: break-word; font: 400 15px/1.7 var(--serif); color: var(--ink); }
.ms-review { position: sticky; top: 24px; }
.rv-recs, .rv-stars { margin: 0 0 16px; padding: 0; border: 0; }
.rv-recs legend, .rv-stars legend { margin-bottom: 8px; padding: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--kicker); }
.rv-recs { display: grid; gap: 8px; }
.rv-recs .opt-row { grid-template-columns: minmax(0, 1fr) auto; }
.rv-star-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rv-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-stars label { font-size: 30px; line-height: 1; color: rgba(128,108,80,.3); cursor: pointer; transition: color .15s; }
.rv-stars input:checked ~ label, .rv-stars label:hover, .rv-stars label:hover ~ label { color: #b47708; }
.rv-stars input:focus-visible + label { outline: 2px solid var(--gold); border-radius: 4px; }
.write-review { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; font: 600 14.5px var(--sans); color: #fff; background: linear-gradient(180deg, #2bc0cc, #1596a3); box-shadow: 0 14px 26px -14px rgba(21,150,163,.8); }
.write-review svg { width: 16px; height: 16px; fill: currentColor; }
.write-review:hover { filter: brightness(1.06); }
.write-review[disabled] { opacity: .5; cursor: not-allowed; }
.rv-ms .au-cloth { font-size: 13px; }
.rv-ms .write-review { margin-top: 12px; }

/* Readers: the month strip, saved books, an order's page, the welcome */
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.months div { display: grid; justify-items: center; gap: 4px; padding: 10px 2px; border-radius: 14px; background: var(--card); border: 1px solid var(--edge); }
.months small { font-size: 10.5px; color: var(--muted); }
.months b { font: 600 15px/1 var(--sans); color: var(--muted); }
.months .has b { color: #1596a3; }
.months .is-now { border-color: #2bc0cc; box-shadow: 0 0 0 3px rgba(43,192,204,.15); }
.bk-item { position: relative; min-width: 0; }
.heart { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--edge-strong); background: var(--card); color: var(--accent); cursor: pointer; }
.heart svg { width: 18px; height: 18px; }
.heart.is-on svg { fill: currentColor; }
.bk-item .heart { position: absolute; top: 8px; right: 8px; margin-top: calc((var(--shelf-h, 9) - var(--book-h, 9)) * var(--ppi)); width: 34px; height: 34px; box-shadow: 0 6px 14px -6px rgba(0,0,0,.5); }
.rd-order-link { display: inline-flex; align-items: baseline; gap: 8px; color: inherit; text-decoration: none; }
.rd-order-link small { font-size: 12.5px; color: var(--accent); }
.rd-order-link:hover b { text-decoration: underline; }
.od-page .au-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.welcome { display: grid; gap: 10px; margin: 0 0 8px; padding: 24px; border-radius: 28px; color: #f3ede2; background: radial-gradient(120% 90% at 50% -10%, #2b2421, #151213 60%, #0c0a0b); border: 1px solid rgba(240,211,140,.16); }
.welcome .up-steps { margin-bottom: 6px; }
.welcome h2 { font: 600 30px/1.1 var(--serif); }
.welcome > p { font-size: 14px; color: rgba(243,237,226,.65); margin-bottom: 6px; }
.wl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: inherit; text-decoration: none; }
.wl-row:hover { border-color: rgba(240,211,140,.5); }
.wl-row b { display: block; font-size: 15.5px; font-weight: 600; }
.wl-row small { display: block; font-size: 12.5px; color: rgba(243,237,226,.6); }
.wl-row .opt-icon { background: rgba(76,194,107,.14); border-color: rgba(76,194,107,.3); color: #6fdc8c; }
.wl-row .go { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); }
.wl-row .go svg { width: 14px; height: 14px; }
.wl-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.welcome .dash-pill { color: #f3ede2; border-color: rgba(255,255,255,.2); }

/* ---------- Dark (chosen in Profile → Appearance) ---------- */
.dash-app.force-dark {
  --panel: #141213; --card: #1d1a1b; --ink: #f2ece1; --muted: #b0a58f;
  --edge: rgba(255,255,255,.08); --edge-strong: rgba(255,255,255,.18); --accent: var(--gold-hi); --kicker: var(--gold);
}
.dash-app.is-reading.force-dark { --frame: linear-gradient(160deg, #2a221b, #15110e); --rail: #e6d9bf; --tab-on: var(--gold-hi); --tab-on-ink: #1b140e; }
.dash-app.force-dark :is(.od-sums, .rd-side, .rd-order, .rv-book, .pub-note) { background: var(--card); color: var(--ink); }
.dash-app.force-dark .od-sums { background: rgba(255,255,255,.04); border: 1px solid var(--edge); }
.dash-app.force-dark .bar span { background: rgba(255,255,255,.1); }
.dash-app.force-dark .score { background: rgba(240,211,140,.14); color: var(--gold-hi); }
.dash-app.force-dark .rd-week .is-today { background: rgba(255,255,255,.1); }
.dash-app.dark-ui .rd-week :is(.is-sun, .is-sun b) { color: #f0a6a0; }
.dash-app.force-dark .pub-gauge .dc-text, .dash-app.force-dark .pub-gauge .dc-h, .dash-app.force-dark .pub-gauge .dc-big { color: #2a1d10; }
.dash-app.force-dark .rd-btn { background: var(--gold-hi); color: #1b140e; }
.dash-app.dark-ui :is(.field input, .field select, .field textarea) { color: var(--ink); background-color: transparent; border-bottom-color: rgba(255,255,255,.28); }
.dash-app.dark-ui .field select option { color: #1b140e; }
.dash-app.dark-ui :is(.field label, .checks legend) { color: var(--gold); }
.dash-app.dark-ui :is(.check, .field-hint, .field .opt) { color: var(--muted); }
.dash-app.dark-ui .link-btn { color: var(--gold-hi); text-decoration-color: rgba(240,211,140,.4); }
.dash-app.dark-ui :is(.link-btn--danger, .dash-pill--danger) { color: #f0a6a0; border-color: rgba(240,166,160,.4); }
.dash-app.dark-ui .form-status { color: #f0a6a0; }
.dash-app.dark-ui .form-status.is-ok { color: #b9d8b0; }
.dash-app.dark-ui .dash-pill--dark { background: linear-gradient(180deg, #f6dc94, #c49a45); border-color: #c49a45; color: #1b140e; font-weight: 600; }
.dash-app.dark-ui .field textarea.plain { background-image: none; }
.dash-app.dark-ui .stars { color: #e9a92a; }
.dash-app.dark-ui .stars span, .dash-app.dark-ui .rv-stars label { color: rgba(255,255,255,.2); }
.dash-app.dark-ui .rv-stars input:checked ~ label, .dash-app.dark-ui .rv-stars label:hover, .dash-app.dark-ui .rv-stars label:hover ~ label { color: #e9a92a; }
/* The editor's desk in light (Profile → Appearance → Light) */
.dash-app.is-editor.force-light {
  --frame: linear-gradient(160deg, #2c2925, #161412); --rail: #e9dcc0; --tab-on: #fbf5e6; --tab-on-ink: var(--burgundy);
  --panel: #f8f1e1; --card: #fffbf2; --ink: #23190f; --muted: #6a5a43;
  --edge: rgba(90,64,30,.13); --edge-strong: rgba(90,64,30,.28); --accent: var(--burgundy); --kicker: var(--gold-lo);
}
.dash-app.is-editor.force-light .ed-task:not(:first-child) { background: #efe5cf; color: var(--ink); }
.dash-app.is-editor.force-light .ed-task:not(:first-child) small { color: var(--muted); }
.dash-app.is-editor.force-light .ed-title { color: var(--ink); }
.dash-app.is-editor.force-light .ed-title span { color: var(--gold-lo); }
.dash-app.is-editor.force-light .dash-preview { background: repeating-linear-gradient(135deg, rgba(201,162,74,.18) 0 10px, rgba(201,162,74,.07) 10px 20px); }

@media (max-width: 1100px) {
  .pf-grid, .ms-grid { grid-template-columns: 1fr; }
  .pf-card, .ms-review { position: static; }
}
@media (max-width: 640px) {
  .dash-chip b, .dash-chip small { display: none; }
  .dash-chip { padding: 3px; }
  .months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bell-panel { position: fixed; left: 12px; right: 12px; top: 70px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .sw::before, .rv-stars label { transition: none; } }

/* =====================================================================
   Phones and narrow windows
   ===================================================================== */
@media (max-width: 1180px) {
  .st-grid { grid-template-columns: 1fr; }
  .st-sums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-layout { grid-template-columns: 1fr; }
  .ed-side { position: static; max-height: none; }
  .people-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1020px) {
  .g-hero, .g-3, .od-top { grid-template-columns: 1fr; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .od-desk { grid-template-columns: 1fr; }
  .od-list { max-height: 340px; }
}
@media (max-width: 860px) {
  .dash-app, .dash-body .dash-app { grid-template-columns: 1fr; padding: 8px; border-radius: 26px; }
  .dash-body .dash-app { min-height: 100vh; border-radius: 0; }
  .dash-rail, .dash-body .dash-rail { position: static; height: auto; flex-direction: row; gap: 0; padding: 4px 4px 10px; overflow-x: auto; scrollbar-width: none; }
  .dash-site { margin-top: 0; }
  .dash-body .dash-main { min-height: 0; padding: 18px 16px; }
  .dash-rail::-webkit-scrollbar { display: none; }
  .dash-mark, .dash-me { display: none; }
  .dash-rail ul { display: flex; gap: 2px; margin: 0; }
  .dash-tab { width: 74px; }
  .dash-tab i { width: 42px; height: 42px; }
  .dash-main { border-radius: 20px; }
  .rd-hero, .rd-cols, .au-book, .g-2 { grid-template-columns: minmax(0, 1fr); }
  .au-actions .tag { white-space: normal; }
  .rd-fan { height: 220px; order: -1; overflow-x: clip; }
  .rd-fan img { width: 112px; bottom: 42px; }
  .rd-fan img:nth-child(1) { transform: translateX(-105%) rotate(-9deg); }
  .rd-fan img:nth-child(3) { transform: translateX(5%) rotate(9deg); }
  .au-cover { max-width: 220px; }
}
@media (max-width: 640px) {
  .dash-top { align-items: flex-start; }
  .dash-tools { width: 100%; }
  .dash-as { flex: 1 1 100%; }
  .dash-as select { flex: 1; }
  .g-3, .od-sums, .mini-stats { grid-template-columns: 1fr; }
  .od-sums { gap: 12px; }
  .pub-hero { grid-template-columns: 1fr; }
  .pub-hero-art { min-height: 170px; }
  .pub-hero-art img { width: 210px; }
  .od-detail-head, .od-totals { grid-template-columns: 1fr 1fr; }
  .od-search { margin-left: 0; width: 100%; }
  .rd-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .au-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); font-size: 11px; }
  .au-steps li { font-size: 11px; }
  .ed-strip { flex-wrap: wrap; gap: 8px; padding: 12px; border-radius: 24px; }
  .st-book { grid-template-columns: 64px minmax(0, 1fr); gap: 6px 14px; padding: 14px; }
  .st-book > .form-status { grid-column: 1 / -1; }
  .st-book :is(.st-share, .st-proofs, .st-more) { margin-left: -78px; } /* only in a flipbook's card (Profile has an .st-more too) */
  .st-proofs li { grid-template-columns: auto minmax(0, 1fr); }
  .st-proof-btns { grid-column: 2; }
  .st-bar .od-search { width: 100%; }
  .ed-strip > span { display: none; }
  .ed-days { flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rd-book img, .dash-tab i { transition: none; }
}

/* The proofreading steps in a narrow side panel: one under another. */
.dash-app .proof-steps strong { color: var(--ink); }
.dash-app.dark-ui .proof-steps strong { color: var(--gold-hi); }
.rd-side .proof-steps { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.dash-inline-link { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.inbox-search, .inbox-pages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 0 14px;
}
.inbox-search .od-search { flex: 1 1 175px; min-width: 0; }
.inbox-search select {
  min-height: 39px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  color: var(--ink);
  background: var(--card);
  font: inherit;
}
.inbox-pages { margin-block: 14px 0; color: var(--muted); font-size: .84rem; }
.inbox-pages span { margin-inline-end: auto; }
.inbox-pages button:disabled { opacity: .48; cursor: default; }

/* =====================================================================
   Phones: the dashboard as an app (860px and narrower, where the side rail used to become a row of
   icons at the top). After the Shopify admin, Gmail and Amazon Seller apps: a bottom tab bar with
   4 sections and More; More opens a sheet with the other sections, "See the dashboard of", the
   website and Log out; a slim top bar with the section's name and the messages, bell and profile
   buttons; the greeting only on each login's first section. dash-rail.js adds More, the sheet and
   the section's name. Wider windows keep the side rail exactly as before.
   ===================================================================== */
.rail-more-li, .dash-page-title { display: none; }
.dash-more-btn { font-family: inherit; }
.tab-label { min-width: 0; }

/* More's sheet (a <dialog>; it only opens on phones) */
.dash-sheet {
  position: fixed; inset: auto 0 0; width: 100%; max-width: 100%; max-height: 85vh; max-height: 85dvh; margin: 0; padding: 0;
  border: 0; border-radius: 24px 24px 0 0; background: var(--panel); color: var(--ink);
  box-shadow: 0 -24px 60px -24px rgba(0,0,0,.7); overflow-y: auto; overscroll-behavior: contain;
}
.dash-sheet::backdrop { background: rgba(10,7,5,.55); }
.dash-sheet[open] { animation: dash-sheet-up .3s var(--ease) both; }
@keyframes dash-sheet-up { from { transform: translateY(100%); } }
.dash-sheet-in { padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }
.dash-sheet-in::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 4px; border-radius: 2px; background: var(--edge-strong); }
.dash-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding-left: 8px; }
.dash-sheet-head h2 { margin: 0; font: 600 22px/1.2 var(--serif); color: var(--ink); }
.dash-sheet-x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 2px solid transparent; border-radius: 50%; background: rgba(201,162,74,.14); background-clip: padding-box; color: var(--ink); cursor: pointer; } /* 40px drawn, 44px to tap */
.dash-sheet-x svg { width: 20px; height: 20px; }
.dash-sheet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dash-sheet-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 4px 8px; border: 0; border-radius: 12px;
  background: none; color: var(--ink); font: 500 15px/1.3 var(--sans); text-align: left; text-decoration: none; cursor: pointer;
}
.dash-sheet-row:hover { background: rgba(201,162,74,.12); }
.dash-sheet-row i { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(201,162,74,.16); color: var(--accent); }
.dash-sheet-row svg { width: 18px; height: 18px; }
.dash-sheet-row[aria-current="page"] { background: rgba(201,162,74,.22); font-weight: 600; }
.dash-sheet-as { display: grid; gap: 8px; margin: 8px 0 0; padding: 12px 8px 4px; border-top: 1px solid var(--edge); font-size: 13px; font-weight: 600; color: var(--muted); }
.dash-sheet-as select {
  width: 100%; min-height: 48px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid var(--edge-strong); background-color: var(--card); color: var(--ink);
  font: 500 16px var(--sans); appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a6a2a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.dash-sheet-out { margin-top: 8px; border-top: 1px solid var(--edge); border-radius: 0 0 12px 12px; }
.dash-sheet-out i { color: #8f1d1d; background: rgba(143,29,29,.1); }
.dark-ui .dash-sheet-out i { color: #f0a6a0; background: rgba(240,166,160,.12); }
.dash-sheet :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.dash-sheet-in:focus { outline: none; } /* the sheet takes the focus when it opens */
html.dash-sheet-open { overflow: hidden; }

/* Phones and the 768px tablet (860px and narrower): the dashboard as an app, on the site's one phone scale.
   Buttons 44px tall, 14px, weight 600, padding 0 18px (pills, as everywhere in the dashboard); chips 36px drawn
   in a 44px hit area; round icon buttons 40px drawn in 44px; fields 48px, 16px, 12px corners; cards 16px padding,
   12px gap, 12px corners; rows 48px; text 15 / 13 / 12px; h1 28, h2 22, h3 18, big numbers 28; spacing 4-32.
   The bigger hit areas are transparent borders (background-clip: padding-box, the outline drawn as an inset shadow),
   so nothing is drawn bigger than the scale. */
@media (max-width: 860px) {
  /* ---------- The frame: the panel fills the screen; only the bottom bar keeps the frame's colours ---------- */
  .dash-body .dash-app { padding: 0; border-radius: 0; grid-template-rows: minmax(0, 1fr); }
  .dash-body .dash-main {
    min-height: 100vh; min-height: 100dvh; border-radius: 0; font-size: 15px; line-height: 1.5;
    padding: 4px max(16px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  /* ---------- The bottom tab bar ---------- */
  .dash-body .dash-rail {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40; height: auto; overflow: visible;
    flex-direction: row; align-items: stretch; gap: 0;
    padding: 4px max(4px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    background: var(--frame); border-top: 1px solid rgba(201,162,74,.3); box-shadow: 0 -12px 24px -16px rgba(0,0,0,.55);
  }
  .dash-body .dash-rail ul { flex: 1; display: flex; gap: 0; margin: 0; }
  .dash-body .dash-rail li { flex: 1 1 0; min-width: 0; display: flex; }
  .dash-body .dash-rail li.rail-more { display: none; }
  .dash-body .dash-rail .rail-more-li { display: flex; }
  .dash-body .dash-rail :is(.dash-mark, .dash-me, .dash-site) { display: none; }
  .dash-body .dash-rail .dash-tab {
    flex: 1; width: auto; min-width: 0; min-height: 56px; align-content: center; gap: 4px; padding: 4px 1px;
    font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1.2; text-transform: none; opacity: .82;
  }
  .dash-body .dash-rail .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dash-body .dash-rail .dash-tab i { width: 56px; max-width: 100%; height: 32px; border-radius: 999px; }
  .dash-body .dash-rail .dash-tab svg { width: 22px; height: 22px; }
  .dash-body .dash-rail :is(.dash-tab[aria-current="page"], .dash-more-btn.is-on) { opacity: 1; font-weight: 600; }
  .dash-body .dash-rail .dash-more-btn.is-on i { background: var(--tab-on); color: var(--tab-on-ink); }
  .dash-body .dash-rail .dash-tab[aria-current="page"] i { box-shadow: none; }
  .dash-body .dash-rail .dash-tab:hover i { background: transparent; }
  .dash-body .dash-rail :is(.dash-tab[aria-current="page"], .dash-more-btn.is-on):hover i { background: var(--tab-on); }
  .dash-body .rail-count { top: -4px; right: 4px; }

  /* ---------- The top bar: the section's name, or on the first section the kicker over the greeting ---------- */
  .dash-body .dash-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; min-height: 56px; margin: 0 0 16px; }
  .dash-body .dash-top > div:not(.dash-tools) { display: contents; }
  .dash-body .dash-top .dash-kicker { grid-area: 1 / 1; min-width: 0; letter-spacing: .1em; }
  .dash-body .dash-top .dash-title { grid-column: 1 / -1; margin-top: 4px; font-size: 28px; line-height: 1.15; }
  .dash-body .dash-top .st-who { grid-column: 1 / -1; margin-top: 4px; font-size: 13px; }
  .dash-body .dash-page-title { grid-area: 1 / 1; min-width: 0; margin: 0; font: 600 22px/1.2 var(--serif); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dash-body .dash-top:not(.is-sub) .dash-page-title { display: none; }
  .dash-body .dash-top.is-sub .dash-page-title { display: block; }
  .dash-body .dash-top.is-sub :is(.dash-kicker, .dash-title) { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .dash-body .dash-tools { grid-area: 1 / 2; flex-wrap: nowrap; width: auto; gap: 4px; }
  .dash-body .dash-tools :is(.dash-as, [data-logout]) { display: none; }
  /* Round icon buttons: 40px drawn, 44px to tap */
  .dash-body .dash-icon-btn { width: 44px; height: 44px; border: 2px solid transparent; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--edge-strong); }
  .dash-body .dash-icon-btn .bell-count { top: -2px; right: -2px; }
  .dash-body .dash-chip { width: 44px; height: 44px; min-height: 0; padding: 2px; border: 0; justify-content: center; }
  .dash-body .dash-chip :is(b, small) { display: none; }
  .dash-body .chip-face { width: 40px; height: 40px; }
  .dash-body .bell-panel { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; max-height: calc(100vh - 168px); max-height: calc(100dvh - 168px); border-radius: 12px; }
  .dash-body .bell-panel a { min-height: 48px; font-size: 15px; }

  /* ---------- One scale inside the panel ("M" = .dash-body .dash-main) ---------- */
  /* Headings */
  .dash-body .dash-main :is(.dash-h, .ed-title, .au-title, .rd-hero h2, .up-title, .pp-hero-name, .welcome h2, .pf-who h2, .od-ref, .gws-h) { font-size: 22px !important; line-height: 1.2; }
  .dash-body .dash-main :is(.st-head h3, .ed-side h3, .ed-task b, .ed-card b, .rv-book b, .od-item b, .od-totals b, .rd-order-top b, .gws-card h3) { font-size: 18px; line-height: 1.25; }
  .dash-body .dash-main .dash-h { margin: 24px 0 12px; }
  .dash-body .dash-main .dc-h { font-size: 15px; margin-bottom: 12px; }
  .dash-body .dash-main .ed-head { gap: 8px 24px; margin: 24px 0 8px; }
  /* Big numbers */
  .dash-body .dash-main :is(.dc-big, .pub-hero .dc-big, .ed-stat b, .st-sum b, .od-sums b, .mini-stats b, .od-shop b, .rd-cart b, .bk-buy b, .pf-stats b, .pc-tile b, .pub-money b, .pub-mini b) { font-size: 28px; line-height: 1.1; }
  .dash-body .dash-main .opt-row b { font-size: 15px; line-height: 1.3; } /* an option's name in the shop card, not a number */
  /* Kickers, labels, captions: 12px, at most .1em apart; secondary text 13px */
  .dash-body .dash-main :is(.dash-kicker, .pp-sub, .st-share legend, .pc-tile small, .dc-sample, .bar small, .pub-hero-cta, .book-share legend) { font-size: 12px; letter-spacing: .08em; }
  .dash-body .dash-main :is(.tag, .od-row .tag, .ed-day, .months small, .au-steps li, .pp-thread-end, .pc-steps small, .pp-as, .pp-meta, .pp-seen, .pp-day, .pp-meet-host, .gws-card-k, .pc-sale small) { font-size: 12px; }
  .dash-body .dash-main :is(.dash-list small, .dc-h small, .dc-h a, .dc-label, .team-top small, .team-meta, .pp-card-top small, .od-row small, .mini-stats span, .pp-chat-who small, .pp-hint, .pp-snip, .pc-tile span, .pc-steps li, .pc-steps b, .rd-order-link small, .od-sums small, .od-sums em, .dash-h small, .pub-mini span) { font-size: 13px; }
  .dash-body .dash-main :is(.dc-text, .dash-list b, .od-row b, .dc-empty, .pp-thread-body b, .pp-notice-list span) { font-size: 15px; }

  /* Cards: 16px padding, 12px corners, 12px apart */
  .dash-body .dash-main :is(.dc, .od-sums, .od-shop, .od-desk, .od-detail, .team-card, .ed-card, .ed-task, .ed-side, .rd-side, .rd-order, .rv-book, .bk-buy, .st-sum, .st-book, .up, .up-drop, .pf-card, .pf-stats, .welcome, .pp-threads, .pp-chat, .pp-card, .pc-tile, .dc-empty, .od-empty, .invite-result, .ms-text, .gws-card) { padding: 16px; border-radius: 12px; }
  .dash-body .dash-main .ed-strip { border-radius: 12px; }
  .dash-body .dash-main .au-cover { max-width: 180px; }
  .dash-body .dash-main :is(.mini-stats div, .od-item, .od-totals, .od-row, .pub-note, .opt-row, .wl-row, .up-file, .up-opt, .wf-reviews li, .pp-thread, .pp-notice-list a, .months div, .ed-files a, .ed-side pre, .pp-access, .pp-context, .pp-report-form, .dash-preview) { border-radius: 12px; }
  .dash-body .dash-main .od-desk { padding: 8px; }
  .dash-body .dash-main :is(.pp-threads, .pp-chat) { padding: 0; }
  .dash-body .dash-main .pp-threads { padding: 4px; }
  .dash-body .dash-main :is(.dash-grid, .team, .pp-grid, .st-books, .od-list, .od-items, .pc-tiles, .mini-stats, .rd-shelf) { gap: 12px; }
  .dash-body .dash-main .dash-grid + .dash-grid { margin-top: 12px; }
  .dash-body .dash-main .dash-preview { margin: 0 0 16px; padding: 12px 16px; }
  .dash-body .dash-main .pub-hero-cta { border-radius: 12px 0 12px 0; }

  /* Rows and list items: 48px, 15px */
  .dash-body .dash-main :is(.dash-list > li, .od-row, .pp-thread, .pp-notice-list a, .wl-row, .opt-row) { min-height: 48px; }

  /* Buttons: one size (44px, 14px, 600, padding 0 18px) */
  .dash-body .dash-main :is(.dash-pill, .od-btn, .rd-btn, .dash-back, .up-btn, .up-pick, .pub-hero-cta, .gws-btn, .team-actions .link-btn, .btn) {
    min-height: 44px; padding: 0 18px; font-size: 14px; font-weight: 600; line-height: 1.2;
  }
  .dash-body .dash-main .btn { letter-spacing: .08em; }
  .dash-body .dash-main :is(.dash-pill, .od-btn, .rd-btn, .dash-back, .up-btn, .up-pick, .gws-btn, .team-actions .link-btn) { border-radius: 999px; }
  .dash-body .dash-main .team-actions { gap: 8px; }
  .dash-body .dash-main .team-actions .link-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: 1 1 auto; border: 1px solid var(--edge-strong); color: var(--ink); text-decoration: none;
  }
  .dash-body .dash-main .team-actions .link-btn--danger { color: #8f1d1d; border-color: rgba(143,29,29,.35); }
  .dash-app.dark-ui .dash-main .team-actions .link-btn--danger { color: #f0a6a0; border-color: rgba(240,166,160,.4); }

  /* Chips and the inbox's tabs: 36px drawn in a 44px hit area, in one row that scrolls sideways */
  .dash-body .dash-main .chips { flex-wrap: nowrap; gap: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .dash-body .dash-main .chips::-webkit-scrollbar { display: none; }
  .dash-body .dash-main .chip {
    flex: none; min-height: 44px; padding: 0 14px; border: 4px solid transparent; background-clip: padding-box;
    box-shadow: inset 0 0 0 1px var(--edge-strong); font-size: 14px; white-space: nowrap;
  }
  .dash-body .dash-main .chip[aria-pressed="true"] { border-color: transparent; box-shadow: inset 0 0 0 1px #c49a45; }
  .dash-body .dash-main .chip b { font-size: 12px; }
  .dash-body .dash-main .pp-tabs { padding: 0; gap: 0; border-radius: 999px; }
  .dash-body .dash-main .pp-tab { min-height: 44px; padding: 0 14px; border: 4px solid transparent; background-clip: padding-box; font-size: 14px; }
  .dash-body .dash-main .st-share .seg-opt span { min-height: 44px; padding: 0 14px; border: 4px solid transparent; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--edge-strong); }
  .dash-body .dash-main .st-share .seg-opt input:checked + span { border-color: transparent; box-shadow: inset 0 0 0 1px #c49a45; }
  .dash-body .dash-main .st-share .seg { gap: 0; }

  /* Small round buttons on covers: 36px drawn, 44px to tap */
  .dash-body .dash-main .bk-item .heart { top: 4px; right: 4px; width: 44px; height: 44px; border: 4px solid transparent; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--edge-strong); filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }

  /* Text links that stand alone: a 44px hit area that doesn't move anything */
  .dash-body .dash-main :is(.dc-h a, .dash-h small a, .team-top b a, .dash-inline-link, .od-who a, .ed-open, .pp-crumb .link-btn, .pc-book-actions .link-btn, .pc-line a, .pp-contact a, .st-proof-btns .link-btn, .st-actions .link-btn, .rd-order-link, .up-link, .gws-link, .pp-older .link-btn, .pp-report-actions .link-btn, label a.opt, .pp-act) {
    display: inline-flex; align-items: center; min-height: 0; padding: 12px 4px; margin: -12px -4px;
  }
  .dash-body .dash-main .pp-name { display: block; padding: 10px 0; margin: -10px 0; } /* keeps the … on long names */
  .dash-body .dash-main :is(.pc-book-actions, .pp-crumb, .st-proof-btns) { gap: 8px 20px; }
  .dash-body .dash-main :is(.st-more summary, .acct-more summary) { min-height: 44px; }
  .dash-body .dash-main label.check { min-height: 44px; align-items: center; }

  /* Fields: 48px, 16px (no zoom on iPhones), boxed, 12px corners */
  .dash-body .dash-main :is(.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .od-search, .inbox-search select, .pp-search input, .copy-row input, .studio-copy input, .pp-report-form input) {
    min-height: 48px; padding: 0 14px; border: 1px solid var(--edge-strong); border-radius: 12px; background-color: var(--card); color: var(--ink); font-size: 16px;
  }
  .dash-body .dash-main .field select { padding-right: 36px; background-position: right 14px center; }
  .dash-body .dash-main :is(.field textarea, .od-note textarea, .wf textarea) { padding: 12px 14px; border: 1px solid var(--edge-strong); border-radius: 12px; background: var(--card); color: var(--ink); font-size: 16px; line-height: 1.5; }
  .dash-body .dash-main :is(.od-search, .pp-search input) { width: 100%; max-width: none; margin-left: 0; }
  .dash-body .dash-main .od-detail .od-note textarea { background: rgba(0,0,0,.18); color: inherit; border-color: rgba(255,255,255,.2); }
  .dash-body .dash-main .field { margin-bottom: 16px; }
  .dash-body .dash-main .field label { font-size: 12px; letter-spacing: .08em; }

  /* ---------- Pieces that didn't fit a phone ---------- */
  /* Overview, "Books on our list": the picture under the numbers, not over them */
  .dash-body .dash-main .pub-hero { min-height: 0; }
  .dash-body .dash-main .pub-hero-art { min-height: 188px; }
  .dash-body .dash-main .pub-hero-art img { width: 176px; height: auto; right: -8px; bottom: -8px; }
}
@media (prefers-reduced-motion: reduce) { .dash-sheet[open] { animation: none; } }
