:root {
  --paper: #f6f3ec;
  --ink: #1b302e;
  --muted: #5d716c;
  --line: #d8ded5;
  --card: #fffdf7;
  --strong: #124e46;
  --amber: #c97b4d;
  --shadow: 0 20px 48px #15352c18;
}
html { background: #f6f3ec; }
body { background: radial-gradient(circle at 92% 12%, #e4eecf 0, transparent 25%), #f6f3ec; }
h1, h2, h3, .brand { font-family: Georgia, 'Times New Roman', serif; letter-spacing: -.035em; }
.eyebrow { color: #9b5b36; }
.auth-intro {
  background: radial-gradient(circle at 18% 78%, #c4dfb6 0, transparent 31%),
    repeating-linear-gradient(120deg, transparent 0 42px, #16493608 42px 43px), #e6eddd;
  border-right: 1px solid #cedcc5;
}
.auth-intro em { color: #aa6238; }
.auth-card { border-radius: 4px 28px 4px 28px; }
.brand-mark { border-radius: 4px 12px 4px 12px; }
.sidebar { background: #153f38; border-right: 5px solid #bf7348; }
.sidebar nav button { border-radius: 4px 13px 4px 13px; }
.sidebar nav button.active { background: #e5efd6; color: #143e37; font-weight: 700; }
.topbar { background: #fffdf7d9; }
.topbar-status { display: flex; align-items: center; gap: .55rem; }
.storage-badge { background: #e5efdf; color: #154a3d; border: 1px solid #c9ddc8;
  border-radius: 99px; padding: .36rem .65rem; font-size: .75rem; font-weight: 700; }
.content { max-width: 1100px; }
.page-head { border-bottom: 1px solid #cfd9cb; padding-bottom: 1.2rem; }
.page-head h1 { font-size: clamp(2.5rem, 5vw, 4.1rem); }
.card { border-radius: 4px 18px 4px 18px; box-shadow: 5px 5px 0 #d9e3d1; }
.stat { background: #dce9d6; border-radius: 3px 16px 3px 16px; border-left: 4px solid #b87349; }
.stat strong { color: #124e46; }
.primary { border-radius: 4px 12px 4px 12px; }
.list-row { border-radius: 4px 12px 4px 12px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #bd754d; outline-offset: 2px;
}
.legal-links { margin-top: 1.2rem; font-size: .85rem; }
a { color: #155b4b; }
.storage-choice { display: flex; align-items: flex-start; gap: .8rem; padding: 1rem;
  margin: .7rem 0; border: 1px solid var(--line); border-radius: 12px; background: #f8faf3; }
.storage-choice input, .consent-check input { width: auto; margin-top: .15rem; accent-color: #155b4b; }
.storage-choice span { display: grid; gap: .35rem; }
.storage-choice small { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.consent-check { display: flex; align-items: flex-start; gap: .7rem; margin: 1rem 0; line-height: 1.45; }
#storage-dialog { width: min(620px, calc(100vw - 1rem)); }
#storage-dialog p { margin: 1rem 0; }
#storage-dialog .notice { font-size: .85rem; }
.legal-page { min-height: 100vh; padding: clamp(1rem, 5vw, 4rem); }
.legal-page main { max-width: 800px; margin: 0 auto; background: #fffdf7; border: 1px solid var(--line);
  border-radius: 4px 24px 4px 24px; padding: clamp(1.4rem, 5vw, 4rem); box-shadow: var(--shadow); }
.legal-page h1 { margin-bottom: 2rem; }
.legal-page h2 { margin-top: 2rem; }
.legal-page p { color: #384e49; }
.pricing-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.pricing-grid .card { padding: 1.2rem; }
.pricing-grid .price { font: 2rem Georgia, serif; color: var(--ink); }
.pricing-grid small { font: .85rem 'Trebuchet MS', sans-serif; }
@media (max-width: 760px) {
  .auth-intro { min-height: 0; padding: 1.1rem 1.25rem .9rem; }
  .auth-intro h1 { font-size: 2rem; line-height: 1.03; margin: .3rem 0; }
  .auth-intro p:not(.auth-note) { display: none; }
  .auth-note { margin-top: .7rem; padding: .4rem .65rem; font-size: .72rem; }
  .auth-card { width: 100%; margin: 0 auto; border: 0; border-radius: 0; box-shadow: none; padding: 1.4rem; }
  .auth-card h2 { margin-top: .8rem; }
  .auth-card form { margin-top: 1rem; gap: .75rem; }
  .sidebar { border-right: 0; border-bottom: 4px solid #bf7348; }
  .sidebar-bottom { display: flex; align-items: center; gap: .45rem; font-size: .7rem; }
  .sidebar-bottom span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-bottom button { width: auto; white-space: nowrap; padding: .4rem; }
  .topbar { gap: .4rem; padding: .5rem 1rem; }
  .topbar-status { flex-wrap: wrap; justify-content: flex-end; }
  .storage-badge, .plan-badge { font-size: .65rem; }
  dialog { max-height: calc(100dvh - env(safe-area-inset-bottom) - 1rem); padding: 1rem; }
  .dialog-actions { padding-bottom: env(safe-area-inset-bottom); }
  .list-row { flex-wrap: wrap; }
}
