@font-face {
  font-family: Inter;
  src: url(/assets/inter-cyrillic-400-normal.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0400-052F, U+2116;
}
@font-face {
  font-family: Inter;
  src: url(/assets/inter-latin-400-normal.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-024F, U+2000-206F;
}
@font-face {
  font-family: Inter;
  src: url(/assets/inter-cyrillic-600-normal.woff2) format("woff2");
  font-weight: 600 800;
  font-display: swap;
  unicode-range: U+0400-052F, U+2116;
}
@font-face {
  font-family: Inter;
  src: url(/assets/inter-latin-600-normal.woff2) format("woff2");
  font-weight: 600 800;
  font-display: swap;
  unicode-range: U+0000-024F, U+2000-206F;
}
@font-face {
  font-family: Spectral;
  src: url(/assets/spectral-cyrillic-400-normal.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0400-052F, U+2116;
}
@font-face {
  font-family: Spectral;
  src: url(/assets/spectral-latin-400-normal.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-024F, U+2000-206F;
}
:root {
  --bg: #f7f6f0;
  --paper: #fdfcf7;
  --ink: #222c25;
  --muted: #586158;
  --line: #d5d9cb;
  --accent: #335841;
  --accent-on: #fff;
  --soft: #e8eddf;
  --rail: #eeefe6;
  --rust: #94533e;
  --serif: Spectral, Georgia, serif;
  --sans: Inter, system-ui, sans-serif;
  --gap: 24px;
  color-scheme: light;
}
:root[data-preset="clay"] {
  --bg: #f8f3eb;
  --paper: #fffaf3;
  --rail: #f1e9df;
  --soft: #f2e4d8;
  --accent: #784836;
  --rust: #7e4939;
  --line: #ddd3c6;
}
:root[data-preset="ink"] {
  --bg: #f0f3f4;
  --paper: #f9fbfb;
  --rail: #e4e9ea;
  --soft: #dfe9e9;
  --accent: #39566b;
  --line: #cbd6da;
}
:root[data-mode="dark"] {
  color-scheme: dark;
  --bg: #191e1a;
  --paper: #222923;
  --ink: #eff1e6;
  --muted: #bdc6b9;
  --line: #454f45;
  --accent: #b6d1ac;
  --accent-on: #18291c;
  --soft: #313f32;
  --rail: #202720;
  --rust: #e2a286;
}
:root[data-mode="dark"][data-preset="clay"] {
  --bg: #211d19;
  --paper: #2a251f;
  --rail: #28221d;
  --soft: #44342a;
  --line: #59463b;
  --accent: #ebbe9d;
}
:root[data-mode="dark"][data-preset="ink"] {
  --bg: #181d21;
  --paper: #232b31;
  --rail: #20272c;
  --soft: #2d3e48;
  --accent: #aecddf;
}
:root[data-type="sans"] {
  --serif: var(--sans);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  scroll-padding-block: 20px;
}
body {
  font: 400 1rem/1.5 var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: anywhere;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button,
select,
input,
textarea {
  border-radius: 9px;
}
button {
  border: 0;
  background: none;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.04;
}
h1 {
  font-size: clamp(2.8rem, 5.5vw, 5.1rem);
}
h2 {
  font-size: clamp(1.75rem, 3.15vw, 2.5rem);
}
h3 {
  font-size: 1.05rem;
  line-height: 1.34;
}
svg {
  flex: none;
}
img,
video {
  max-width: 100%;
}
small {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
}
.skip {
  position: absolute;
  transform: translateY(-160%);
  padding: 12px;
  z-index: 100;
  background: var(--paper);
}
.skip:focus {
  transform: none;
}
.loading {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  min-height: 100dvh;
}
.loading img {
  border-radius: 12px;
}
.layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
}
.sidebar {
  background: var(--rail);
  border-right: 1px solid var(--line);
  padding: 34px 18px 22px;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  min-width: 0;
}
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.brand-name {
  font: 400 2.15rem/0.98 var(--serif);
  letter-spacing: -0.09em;
}
.sidebar .brand {
  padding: 0 12px;
}
.space-name {
  padding: 12px 13px 0;
  color: var(--muted);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-nav {
  display: grid;
  gap: 5px;
  margin: 46px 0;
}
.navitem,
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
}
.navitem.active {
  background: var(--paper);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--line);
}
.navitem:hover,
.side-link:hover {
  background: var(--soft);
  color: var(--ink);
}
.side-foot {
  margin-top: auto;
  display: grid;
  gap: 3px;
}
.side-account {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.875rem;
}
.avatar {
  background: var(--soft);
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.1rem;
  font-family: var(--serif);
  flex: none;
}
.side-account strong {
  display: block;
}
.side-account small {
  display: block;
}
.shell-body {
  min-width: 0;
}
.topline {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1190px;
  margin: auto;
  padding: 0 clamp(22px, 4.35vw, 72px);
  gap: 16px;
}
.topline .top-date {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--muted);
}
.topline .top-date::first-letter {
  text-transform: uppercase;
}
.top-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.875rem;
}
.top-tool:hover,
.icon-btn:hover {
  background: var(--soft);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 44px;
  min-height: 44px;
  color: var(--ink);
  padding: 8px;
}
.mobile-brand,
.mobile-nav {
  display: none;
}
main {
  min-width: 0;
  width: 100%;
  margin: auto;
  max-width: 1190px;
  padding: 10px clamp(22px, 4.35vw, 72px) 74px;
}
main:focus {
  outline: 0;
}
.screen-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin: 18px 0 28px;
}
.screen-title p {
  margin-top: 8px;
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  padding: 10px 16px;
  font-size: 0.91rem;
  line-height: 1.25;
  font-weight: 600;
  text-decoration: none;
  border-radius: 9px;
}
.btn:hover {
  border-color: var(--accent);
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-on);
  border-color: var(--accent);
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
}
.btn.subtle {
  background: var(--soft);
  border: 0;
  color: var(--accent);
}
.btn.danger {
  color: var(--rust);
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.text-link {
  min-height: 44px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.87rem;
  padding: 5px 0;
}
.empty {
  padding: 26px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.empty p {
  color: var(--muted);
  font-size: 0.93rem;
}
.empty-icon,
.row-symbol {
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: var(--soft);
  flex: none;
}
.empty-icon {
  height: 46px;
  width: 46px;
  margin-bottom: 4px;
}
.row-symbol {
  height: 40px;
  width: 40px;
}
.entry-row {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  padding: 10px 3px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.entry-row:hover {
  background: var(--soft);
}
.row-words {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 1px;
}
.row-words strong {
  font-weight: 600;
}
.entry-row > svg:last-child {
  color: var(--muted);
}
.home-hero {
  position: relative;
  height: clamp(208px, 21vw, 270px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #b4b19b;
  border-radius: 17px;
  background: #f0dfbf;
  display: flex;
  align-items: center;
  padding: clamp(22px, 4vw, 62px);
  color: #263e32;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--custom-bg-image, url(/assets/coast.webp)) center 27% / cover
    no-repeat;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    #f2e7d1 0%,
    rgba(242, 231, 209, 0.92) 21%,
    rgba(242, 231, 209, 0.58) 38%,
    transparent 66%
  );
}
.hero-text {
  display: grid;
  justify-items: start;
  gap: 14px;
}
.hero-text h1 {
  font-family: var(--serif);
  font-size: clamp(3.65rem, 6.7vw, 6.8rem);
  letter-spacing: -0.075em;
  line-height: 0.97;
}
.hero-kicker {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 0.825rem;
  font-weight: 600;
}
.hero-kicker:before {
  content: "";
  width: 27px;
  height: 1px;
  background: currentColor;
}
.hero-new {
  background: #284633;
  color: #fff3dc;
  border: 0;
  min-height: 44px;
  padding: 10px 17px;
}
.hero-new:hover {
  background: #365d44;
}
.quick-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 18px 0 5px;
}
.quick-strip .btn {
  font-size: 0.875rem;
  min-height: 43px;
  font-weight: 400;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 15px;
}
.home-widgets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 22px;
  margin: 34px 0;
}
.widget {
  grid-column: span 2;
  min-width: 0;
}
.widget.small {
  grid-column: span 1;
}
.widget .empty {
  min-height: 100px;
}
.plan-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 99px;
  padding: 12px 3px;
}
.calendar-stamp {
  width: 61px;
  height: 66px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  color: var(--rust);
  border: 1px solid var(--line);
  border-top: 3px solid var(--rust);
  border-radius: 4px;
  background: var(--paper);
  flex: none;
}
.calendar-stamp b {
  font: 400 1.85rem/1 var(--serif);
}
.calendar-stamp span {
  font-size: 0.68rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.plan-preview .summary {
  flex: 1;
}
.plan-preview .summary p {
  font-size: 0.875rem;
  margin-top: 3px;
  color: var(--muted);
}
.shelf-empty {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 19px 20px;
  background: var(--rail);
  border-radius: 13px;
}
.shelf-empty p {
  color: var(--muted);
  font-size: 0.875rem;
}
.shelf-empty > div:nth-child(2) {
  flex: 1;
}
.books {
  display: flex;
  gap: 3px;
  height: 40px;
  align-items: end;
  width: 60px;
  flex: none;
  justify-content: center;
}
.books i {
  width: 11px;
  height: 39px;
  border-radius: 2px;
  background: #60745a;
  border: 1px solid #486044;
  box-shadow:
    inset 0 6px 0 -4px #d5d1b8,
    inset 0 -7px 0 -5px #d5d1b8;
}
.books i:nth-child(2) {
  height: 33px;
  background: #bb805a;
}
.books i:nth-child(3) {
  height: 35px;
  transform: rotate(-14deg);
  transform-origin: bottom;
  background: #86927b;
}
.widget-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
}
.widget-note {
  white-space: pre-wrap;
  padding: 18px;
  background: var(--rail);
  border-radius: 12px;
}
.home-customize {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  text-align: right;
}
.compact-row,
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row strong {
  font-weight: 600;
}
.setting-row small {
  display: block;
}
.setting-row > label {
  flex: 1;
}
.settings-list {
  display: grid;
  gap: 26px;
}
.preference-block {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.preference-block h2 {
  font-size: 1.75rem;
  margin-bottom: 10px;
}
.preference-block p {
  color: var(--muted);
  font-size: 0.91rem;
}
.preference-block > .actions {
  margin-top: 12px;
}
.setting-row:last-child {
  border: 0;
}
.form-stack,
.stack {
  display: grid;
  gap: 16px;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
}
.field small,
.hint {
  font-size: 0.81rem;
  font-weight: 400;
  color: var(--muted);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 1rem;
}
input[type="color"] {
  width: 58px;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--paper);
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
textarea {
  resize: vertical;
  min-height: 90px;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hint-panel {
  padding: 12px 14px;
  background: var(--soft);
  border-radius: 9px;
  color: var(--ink);
  font-size: 0.875rem;
}
.field-error,
.dialog-feedback {
  color: var(--rust);
  font-size: 0.875rem;
}
.dialog-feedback:not(:empty) {
  padding-top: 14px;
}
.field-error:empty {
  display: none;
}
.sheet {
  width: min(520px, calc(100vw - 28px));
  max-height: 85dvh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--bg);
  color: var(--ink);
  padding: 22px 25px 24px;
  box-shadow: 0 18px 86px #0e251d33;
}
.sheet::backdrop {
  background: #101a16a3;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.sheet-head h2 {
  font-size: 2rem;
}
.sheet-head .icon-btn {
  margin-right: -7px;
}
.sheet .form-stack > .btn.primary {
  justify-self: stretch;
}
.secret {
  display: block;
  background: var(--soft);
  border-radius: 8px;
  padding: 14px;
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  user-select: all;
}
.toast {
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 8px 25px #0002;
  font-size: 0.9rem;
}
#toasts {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.status-banner {
  display: block;
  padding: 8px 18px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.875rem;
  text-align: center;
}
.status-banner:empty {
  display: none;
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
}
.auth-art {
  position: relative;
  background: #e7d6b5 url(/assets/coast.webp) 64% center/cover;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(25px, 4.5vw, 78px);
  color: #233d30;
}
.auth-art .brand {
  color: #243d30;
}
.auth-art .brand img {
  width: 46px;
  height: 46px;
}
.auth-art h1 {
  font-size: clamp(3.4rem, 5.35vw, 5.8rem);
  line-height: 0.98;
  max-width: 8em;
  letter-spacing: -0.065em;
}
.auth-art .auth-heading {
  position: absolute;
  top: 20%;
  left: clamp(25px, 4.5vw, 78px);
  right: 20px;
}
.auth-main {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 35px 24px;
}
.auth-card {
  width: min(100%, 382px);
}
.auth-card h2 {
  font-size: 2.65rem;
  margin-bottom: 9px;
}
.auth-card > p {
  color: var(--muted);
  margin-bottom: 24px;
}
.auth-card .btn.primary {
  width: 100%;
  margin-top: 2px;
}
.auth-card .text-link {
  justify-content: center;
  width: 100%;
}
.blank-page {
  margin-top: 20px;
}
.results {
  max-height: 50dvh;
  overflow: auto;
}
.account-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.toggle-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}
.tool-drawer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 11px;
  min-height: 58px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
  font-weight: 600;
}
.quick-card svg {
  color: var(--accent);
}
.quick-card:hover {
  border-color: var(--accent);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1480px) {
  .layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .sidebar {
    padding: 44px 25px;
  }
}
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 177px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 10px;
  }
  .home-hero {
    height: 210px;
  }
  .quick-strip {
    gap: 6px;
  }
  .quick-strip .btn {
    padding: 9px 12px;
  }
  .widget.small {
    grid-column: span 2;
  }
}
@media (max-width: 740px) {
  html {
    scroll-padding-top: 15px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .mobile-brand {
    display: flex;
    min-height: 44px;
    gap: 9px;
  }
  .mobile-brand img {
    width: 33px;
    height: 33px;
    border-radius: 9px;
  }
  .mobile-brand .brand-name {
    font-size: 1.83rem;
  }
  .mobile-name {
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 400;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 125px;
  }
  .topline {
    padding: calc(8px + env(safe-area-inset-top)) 18px 8px;
    height: auto;
    min-height: 58px;
    gap: 5px;
  }
  .topline .top-date,
  .tool-label {
    display: none;
  }
  .top-tools {
    gap: 1px;
  }
  .top-tool {
    width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 7px;
  }
  .mobile-nav {
    background: var(--paper);
    border-top: 1px solid var(--line);
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 6;
    justify-content: space-evenly;
    padding: 4px max(7px, env(safe-area-inset-right))
      calc(5px + env(safe-area-inset-bottom))
      max(7px, env(safe-area-inset-left));
  }
  .mobile-nav a,
  .mobile-nav button {
    display: flex;
    flex: 1;
    max-width: 95px;
    min-width: 0;
    min-height: 48px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 3px;
    color: var(--muted);
    text-decoration: none;
    font: 400 0.72rem/1.2 var(--sans);
  }
  .mobile-nav .active {
    color: var(--accent);
    font-weight: 600;
  }
  .mobile-nav .add-tab span {
    width: 37px;
    height: 29px;
    border-radius: 9px;
    background: var(--accent);
    color: var(--accent-on);
    display: grid;
    place-items: center;
  }
  .screen-title {
    align-items: center;
    margin: 14px 0 20px;
  }
  .screen-title .btn {
    padding: 9px 11px;
  }
  main {
    padding: 7px 18px calc(94px + env(safe-area-inset-bottom));
  }
  .home-hero {
    height: 195px;
    padding: 24px;
    border-radius: 13px;
  }
  .hero-text {
    gap: 12px;
  }
  .hero-text h1 {
    font-size: clamp(3.45rem, 10vw, 4.4rem);
  }
  .home-hero::before {
    background-position: 62% center;
  }
  .home-hero::after {
    background: linear-gradient(
      90deg,
      rgba(242, 231, 209, 0.98),
      rgba(242, 231, 209, 0.85) 24%,
      rgba(242, 231, 209, 0.34) 57%,
      transparent 83%
    );
  }
  .hero-kicker {
    font-size: 0.74rem;
  }
  .quick-strip {
    padding-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .quick-strip .btn {
    justify-content: flex-start;
    min-height: 42px;
  }
  .quick-strip svg {
    width: 16px;
  }
  .home-widgets {
    margin: 26px 0;
    gap: 24px;
  }
  .section-title {
    margin-bottom: 10px;
  }
  .plan-preview {
    gap: 12px;
    min-height: 90px;
  }
  .calendar-stamp {
    width: 50px;
    height: 58px;
  }
  .shelf-empty {
    padding: 14px 12px;
    gap: 10px;
  }
  .books {
    width: 43px;
  }
  .empty {
    padding: 19px;
  }
  .sheet {
    width: 100%;
    max-width: 600px;
    max-height: 88dvh;
    margin: auto auto 0;
    border-radius: 19px 19px 0 0;
    padding: 17px 20px calc(20px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
  .sheet-head h2 {
    font-size: 1.83rem;
  }
  .preference-block {
    padding: 16px;
  }
  .auth-shell {
    display: block;
  }
  .auth-art {
    height: clamp(170px, 26dvh, 270px);
    padding: 20px 24px;
    background-position: center 52%;
  }
  .auth-art .brand img {
    width: 34px;
    height: 34px;
  }
  .auth-art .auth-heading {
    position: static;
    margin: auto 0 0;
  }
  .auth-art h1 {
    font-size: clamp(2.5rem, 8vw, 3.3rem);
    line-height: 0.98;
    color: #fff4d8;
    text-shadow: 0 1px 8px #17382e;
  }
  .auth-main {
    padding: 25px 22px;
  }
  .auth-card h2 {
    font-size: 2.1rem;
  }
  .auth-card > p {
    margin-bottom: 18px;
  }
  #toasts {
    bottom: calc(74px + env(safe-area-inset-bottom));
    width: max-content;
  }
  .setting-row {
    gap: 8px;
  }
  .topline .brand {
    min-width: 0;
  }
}
@media (max-width: 380px) {
  main {
    padding-inline: 13px;
  }
  .topline {
    padding-inline: 12px;
  }
  .shelf-empty .books {
    display: none;
  }
  .sheet {
    padding-inline: 15px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}
:root[data-density="compact"] .entry-row {
  min-height: 52px;
}
:root[data-density="compact"] .home-widgets {
  gap: 18px;
}
:root[data-density="compact"] .preference-block {
  padding: 14px;
}
button,
a {
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
:root[data-motion="reduced"] * {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}
