/* Shared colors, components, and desktop layout. Responsive rules live in responsive.css. */
:root {
  --ink:#edf2f3;
  --muted:#b2c1ca;
  --subtle:#91a5b2;
  --panel:rgba(13,27,38,.91);
  --input:rgba(5,17,26,.7);
  --line:rgba(202,222,231,.16);
  --accent:#c5dfdf;
  --accent-ink:#172d35;
  --danger:#ffc3b8;
  --radius:12px;
  color-scheme:dark;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:16px;
  line-height:1.65;
  color:var(--ink);
  background:#0c1823;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  min-height:100vh;
}

a {
  color:inherit;
  text-decoration:none;
}

a:hover {
  color:#fff;
}

button,input,textarea,select {
  font:inherit;
}

button,a,input,textarea,select {
  touch-action:manipulation;
}

button {
  cursor:pointer;
}

button:disabled {
  cursor:wait;
  opacity:.5;
}

img {
  max-width:100%;
  display:block;
}

h1,h2,h3,p {
  margin:0;
}

h1,h2,h3 {
  font-weight:500;
  line-height:1.4;
}

h2 {
  font-size:1.32rem;
  letter-spacing:.03em;
}

h3 {
  font-size:1.08rem;
}

p+p {
  margin-top:.8em;
}

small,.small {
  font-size:.875rem;
}

.muted {
  color:var(--muted);
}

.hidden,[hidden] {
  display:none!important;
}

.stack {
  display:flex;
  flex-direction:column;
  gap:18px;
}

.row {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.spread {
  justify-content:space-between;
}

.full {
  width:100%;
}

.text-right {
  text-align:right;
}

.nowrap {
  white-space:nowrap;
}

.landscape {
  position:fixed;
  inset:0;
  z-index:-3;
  background:url('images/aurora.jpg') center center/cover no-repeat;
}

.landscape-shade {
  position:fixed;
  inset:0;
  z-index:-2;
  background:linear-gradient(180deg,rgba(5,18,28,.43) 0%,rgba(7,21,32,.30) 25%,rgba(7,19,29,.82) 75%,#0c1823 100%);
}

.custom-landscape {
  position:fixed;
  inset:0;
  z-index:-3;
  width:100%;
  height:100%;
  max-width:none;
  object-fit:cover;
  object-position:center;
}

html[data-theme="snow"] .landscape {
  background-image:url('images/snow-mountains.jpg');
}

html[data-theme="snow"] .landscape-shade {
  background:linear-gradient(180deg,rgba(9,26,42,.56),rgba(8,25,42,.43) 35%,rgba(7,20,33,.88) 85%);
}

html[data-theme="stars"] .landscape {
  background-image:url('images/stars.jpg');
}

html[data-theme="stars"] {
  --accent:#ded3c3;
  --accent-ink:#292820;
}

.skip {
  position:fixed;
  top:-100px;
  left:20px;
  z-index:99;
  padding:10px;
  background:var(--accent);
  color:var(--accent-ink);
}

.skip:focus {
  top:12px;
}

:focus-visible {
  outline:2px solid #def8f6;
  outline-offset:4px;
}

.topbar {
  max-width:1320px;
  margin:auto;
  padding:28px 40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  border-bottom:1px solid var(--line);
}

.brand {
  font-family:"Songti SC","Noto Serif CJK SC",serif;
  font-size:1.55rem;
  letter-spacing:.13em;
  white-space:nowrap;
}

.brand span {
  font-family:inherit;
  display:block;
  font-size:.625rem;
  letter-spacing:.16em;
  color:#cfdddf;
  margin-top:1px;
}

.topbar nav {
  display:flex;
  gap:32px;
  align-items:center;
}

.topbar nav a {
  color:#cfdbdf;
  font-size:.94rem;
  padding:9px 2px;
  position:relative;
}

.topbar nav a[aria-current] {
  color:#fff;
}

.topbar nav a[aria-current]:after {
  position:absolute;
  content:"";
  bottom:0;
  left:calc(50% - 8px);
  width:16px;
  height:2px;
  background:#d4e7e8;
}

.top-actions {
  display:flex;
  align-items:center;
  gap:22px;
  font-size:.88rem;
}

.new-button {
  border:1px solid rgba(222,240,244,.35);
  border-radius:6px;
  padding:7px 15px;
  background:rgba(5,22,35,.15);
}

.settings-link {
  color:var(--muted);
}

.settings-link.selected {
  color:#fff;
}

.container {
  width:min(1160px,calc(100% - 80px));
  margin:0 auto;
  min-height:65vh;
}

.footer {
  width:min(1160px,calc(100% - 80px));
  margin:48px auto 0;
  padding:22px 0 28px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  color:#aec1cc;
  font-size:.75rem;
  border-top:1px solid var(--line);
}

.footer-dot {
  padding:0 8px;
}

.footer-right {
  display:flex;
  align-items:center;
  gap:22px;
  flex-wrap:wrap;
}

.theme-switch,.theme-switch form {
  display:flex;
  gap:4px;
}

.theme-switch button {
  padding:3px 10px;
  border:none;
  border-radius:4px;
  background:transparent;
  color:var(--muted);
  font-size:.8rem;
}

.theme-switch button[aria-pressed=true] {
  background:rgba(217,237,242,.12);
  color:#fff;
}

.eyebrow {
  font-size:.69rem;
  letter-spacing:.16em;
  color:#c0d4dd;
  display:flex;
  align-items:center;
  gap:14px;
}

.tiny-line {
  display:inline-block;
  height:1px;
  width:25px;
  background:rgba(219,239,242,.45);
}

.home-hero {
  padding:45px 0 39px;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:25px;
}

.day-count {
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(6.5rem, 10vw, 9rem);
  line-height:1.2;
  font-weight:400;
  letter-spacing:-.04em;
  text-shadow:0 3px 25px rgba(0,0,0,.15);
  margin:12px 0 7px;
}

.home-hero .eyebrow { font-size: 1rem; }

.day-count>span {
  font-family:-apple-system,"PingFang SC",sans-serif;
  font-size:1.5rem;
  letter-spacing:.1em;
  margin-left:16px;
}

.hero-caption {
  font-size:1.08rem;
  letter-spacing:.03em;
}

.ampersand {
  font-family:Georgia,serif;
  font-style:italic;
  margin:0 9px;
  color:#d4e2e8;
}

.since {
  font-size:.8rem;
  color:#c5d5df;
  margin-left:22px;
}

.hero-actions {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding-bottom:6px;
}

.hero-actions>.button {
  min-width:175px;
}

.button {
  display:inline-flex;
  gap:22px;
  align-items:center;
  justify-content:center;
  padding:11px 20px;
  min-height:44px;
  border-radius:7px;
  border:1px solid var(--line);
  font-size:.92rem;
  font-weight:500;
  transition:background .15s;
}

.primary {
  background:var(--accent);
  color:var(--accent-ink);
  border-color:var(--accent);
}

.primary:hover {
  background:#e3eeee;
  color:#182d35;
}

.secondary {
  background:rgba(180,209,224,.08);
  color:var(--ink);
}

.secondary:hover {
  background:rgba(180,209,224,.16);
}

.danger {
  color:var(--danger);
  background:transparent;
}

.quiet-link {
  color:#c4dce4;
  font-size:.875rem;
  text-decoration:underline;
  text-decoration-color:rgba(183,212,227,.35);
  text-underline-offset:5px;
}

.panel {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:26px;
  box-shadow:0 12px 40px rgba(3,12,21,.08);
}

.home-grid {
  display:grid;
  grid-template-columns:minmax(0,1.72fr) minmax(290px,1fr);
  gap:24px;
}

.home-aside {
  display:flex;
  flex-direction:column;
  gap:20px;
}

.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:24px;
}

.section-heading h2 {
  margin-top:7px;
}

.section-heading>a {
  font-size:.82rem;
  color:var(--muted);
  white-space:nowrap;
}

.recent-panel {
  align-self:start;
  min-height:410px;
}

.first-memory {
  padding:38px 0 46px;
  display:flex;
  gap:26px;
  align-items:center;
}

.empty-date {
  flex-shrink:0;
  border-right:1px solid var(--line);
  padding-right:25px;
  font-family:Georgia,serif;
  font-size:3.8rem;
  color:#dbe5e9;
  line-height:1.1;
}

.empty-date span {
  font-family:inherit;
  font-size:.7rem;
  display:block;
  letter-spacing:.08em;
  margin-top:9px;
}

.first-memory p {
  color:var(--muted);
  font-size:.88rem;
  margin:12px 0 22px;
  max-width:280px;
}

.wish-preview {
  display:block;
}

.wish-preview h3 {
  margin:10px 0;
}

.status {
  display:inline-block;
  border:1px solid var(--line);
  border-radius:4px;
  padding:2px 8px;
  font-size:.75rem;
  color:#c8dbe2;
  white-space:nowrap;
}

.status.done {
  color:#c5ddd0;
  border-color:rgba(169,203,182,.4);
}

.panel-tail {
  margin-top:25px;
  padding-top:15px;
  border-top:1px solid var(--line);
  font-size:.8rem;
  color:var(--muted);
}

.anniversary-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:11px 0;
  border-bottom:1px solid var(--line);
}

.anniversary-row:last-child {
  border:0;
  padding-bottom:0;
}

.anniversary-row>div>span {
  display:block;
  margin-top:1px;
}

.anniversary-row strong {
  font-family:Georgia,serif;
  font-size:1.75rem;
  font-weight:400;
}

.anniversary-row small {
  font-family:-apple-system,"PingFang SC",sans-serif;
  font-size:.75rem;
  color:var(--muted);
}

.note-preview+.note-preview {
  border-top:1px solid var(--line);
  margin-top:15px;
  padding-top:15px;
}

.note-preview p {
  font-size:.94rem;
  margin-bottom:9px;
  overflow-wrap:anywhere;
  white-space:pre-line;
}

.memory-card {
  display:flex;
  gap:24px;
  padding:24px 0;
  border-top:1px solid var(--line);
}

.memory-card:first-of-type {
  padding-top:4px;
  border-top:0;
}

.memory-date {
  flex-shrink:0;
  width:52px;
  padding-top:1px;
  text-align:center;
}

.memory-date>span {
  display:block;
  font:2rem/1.2 Georgia,serif;
}

.memory-date>small {
  font-size:.68rem;
  color:var(--muted);
}

.memory-card-content {
  min-width:0;
  flex:1;
}

.excerpt {
  color:#bdced7;
  font-size:.94rem;
  margin:10px 0;
  white-space:pre-line;
  overflow-wrap:anywhere;
}

.meta {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  font-size:.76rem;
  color:var(--muted);
  margin-top:13px;
}

.thumb-strip {
  display:flex;
  gap:8px;
  margin-top:16px;
}

.thumb-link {
  position:relative;
  flex:1;
  max-width:200px;
  min-width:0;
  aspect-ratio:1.25;
  overflow:hidden;
  border-radius:6px;
  background:#172b37;
}

.thumb-link img {
  width:100%;
  height:100%;
  object-fit:cover;
}

.video-badge {
  position:absolute;
  bottom:7px;
  right:7px;
  background:rgba(4,14,20,.78);
  font-size:.72rem;
  padding:2px 7px;
  border-radius:3px;
}

.auth-container {
  max-width:1140px;
  width:calc(100% - 80px);
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr 420px;
  gap:70px;
  min-height:calc(100vh - 120px);
  align-items:center;
  padding:55px 0;
}

.auth-intro h1 {
  font-family:"Songti SC",serif;
  font-size:4.4rem;
  letter-spacing:.22em;
  margin:22px 0 17px;
}

.auth-intro>p {
  font-family:"Songti SC",serif;
  font-size:1.45rem;
  letter-spacing:.13em;
}

.auth-intro .eyebrow {
  letter-spacing:.21em;
}

.intro-line {
  width:46px;
  height:1px;
  background:rgba(210,233,240,.6);
  margin:32px 0 22px;
}

.auth-panel {
  padding:32px;
  background:rgba(8,23,35,.89);
}

.auth-panel h2 {
  font-size:1.25rem;
  margin:12px 0 10px;
}

.auth-panel>.small {
  margin-bottom:22px;
}

.auth-panel form {
  margin-top:26px;
}

.auth-footnote {
  font-size:.76rem;
  color:var(--subtle);
  text-align:center;
  margin-top:25px;
}

.auth-footer {
  margin-top:0;
}

.field {
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}

.field label {
  font-size:.875rem;
  color:#d6e0e5;
}

.field input,.field select,.field textarea,input[type=search],input[type=month],.filter-select {
  width:100%;
  border:1px solid rgba(183,211,224,.25);
  background:var(--input);
  border-radius:6px;
  color:var(--ink);
  padding:10px 12px;
  min-width:0;
  font-size:1rem;
}

.field input[type=checkbox] {
  width:18px;
  height:18px;
  accent-color:var(--accent);
}

.field textarea {
  resize:vertical;
  min-height:115px;
  line-height:1.75;
}

.field input:focus,.field textarea:focus,.field select:focus {
  border-color:#afcfdc;
}

.help {
  font-size:.75rem;
  color:var(--muted);
}

.form-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.errorlist {
  color:var(--danger);
  font-size:.85rem;
  list-style:none;
  margin:2px 0;
  padding:0;
}

.form-error {
  color:var(--danger);
  font-size:.9rem;
}

.notifications {
  margin-top:20px;
}

.notice {
  border:1px solid rgba(191,220,226,.3);
  background:rgba(19,40,48,.97);
  border-radius:7px;
  padding:12px 18px;
  font-size:.9rem;
}

.notice.error {
  color:var(--danger);
}

.page-heading {
  padding:38px 0 28px;
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:20px;
}

.page-heading h1 {
  font-size:2rem;
  font-family:"Songti SC",serif;
  letter-spacing:.06em;
  margin:8px 0;
}

.page-heading p {
  color:var(--muted);
  font-size:.9rem;
}

.content-narrow {
  max-width:850px;
  margin:0 auto;
}

.filter-bar {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin:0 0 22px;
}

.filter-bar input[type=search] {
  flex:1;
  min-width:180px;
}

.filter-bar input[type=month],.filter-select {
  width:auto;
  max-width:180px;
}

.filter-bar .button {
  padding:8px 15px;
}

.view-tabs {
  display:flex;
  gap:6px;
}

.view-tabs a {
  padding:7px 14px;
  border-radius:5px;
  font-size:.85rem;
  color:var(--muted);
  border:1px solid transparent;
}

.view-tabs a.active {
  background:rgba(199,222,232,.13);
  border-color:var(--line);
  color:var(--ink);
}

.filters-panel {
  margin-bottom:25px;
}

.filters-panel .filter-bar {
  margin-bottom:14px;
}

.gallery-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
}

.gallery-item {
  overflow:hidden;
  border-radius:10px;
  background:var(--panel);
  border:1px solid var(--line);
}

.gallery-photo {
  position:relative;
  aspect-ratio:1.35;
  overflow:hidden;
}

.gallery-photo>img {
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .25s;
}

.gallery-item:hover img {
  transform:scale(1.025);
}

.gallery-caption {
  padding:14px 16px;
}

.gallery-caption strong {
  font-size:.95rem;
  font-weight:500;
}

.gallery-caption p {
  font-size:.76rem;
  color:var(--muted);
  margin-top:4px;
}

.empty {
  padding:50px 18px;
  text-align:center;
  color:var(--muted);
}

.empty h2 {
  color:var(--ink);
  margin-bottom:12px;
}

.empty>.button {
  margin-top:22px;
}

.pagination {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:25px;
  font-size:.9rem;
  margin:25px 0;
}

.pagination>a {
  padding:7px 15px;
  border:1px solid var(--line);
  border-radius:5px;
}

.pagination span {
  color:var(--muted);
}

details>summary {
  cursor:pointer;
  color:#d0dee5;
  font-size:.9rem;
  padding:8px 0;
}

details[open]>summary {
  margin-bottom:14px;
}

details.panel>summary {
  padding:0;
}

details.panel[open]>summary {
  margin-bottom:24px;
}

.compact-form {
  display:flex;
  align-items:end;
  gap:12px;
  flex-wrap:wrap;
}

.compact-form .field {
  flex:1;
  min-width:160px;
}

.check-group {
  display:flex;
  gap:15px;
  flex-wrap:wrap;
}

.check-group label {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:.9rem;
}

.check-group input {
  width:17px;
  accent-color:var(--accent);
}

.memory-title {
  font-family:"Songti SC",serif;
  font-size:2.25rem;
  margin-bottom:15px;
}

.memory-body {
  font-size:1.04rem;
  line-height:1.95;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  margin:28px 0;
}

.detail-media {
  display:flex;
  flex-direction:column;
  gap:22px;
  margin-top:22px;
}

.detail-media figure {
  margin:0;
}

.detail-media img,.detail-media video {
  width:100%;
  max-height:78vh;
  object-fit:contain;
  background:rgba(3,12,20,.4);
  border-radius:7px;
}

.detail-media figcaption {
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  font-size:.76rem;
  color:var(--muted);
  margin-top:8px;
}

.action-bar {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.action-bar form {
  margin:0;
}

.action-bar .button {
  padding:7px 14px;
  font-size:.85rem;
}

.tag {
  display:inline-block;
  padding:2px 8px;
  border:1px solid var(--line);
  font-size:.75rem;
  color:var(--muted);
  border-radius:3px;
  margin:4px 4px 0 0;
}

.upload-zone {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:1px dashed rgba(193,221,231,.38);
  border-radius:9px;
  background:rgba(158,195,215,.045);
  padding:28px 20px;
  text-align:center;
  cursor:pointer;
}

.upload-zone:hover {
  background:rgba(158,195,215,.09);
}

.upload-zone input {
  max-width:100%;
  font-size:.83rem;
}

.upload-zone small {
  color:var(--muted);
  font-size:.78rem;
}

.upload-list {
  display:flex;
  flex-direction:column;
  gap:12px;
}

.upload-item {
  display:grid;
  grid-template-columns:50px 1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:6px;
  padding:10px;
}

.upload-item img {
  width:50px;
  height:45px;
  border-radius:4px;
  object-fit:cover;
}

.upload-item .file-name {
  font-size:.8rem;
  overflow-wrap:anywhere;
}

.upload-item .upload-status {
  font-size:.73rem;
  color:var(--muted);
}

.upload-item progress {
  width:100%;
  height:4px;
  display:block;
  margin-top:6px;
  accent-color:var(--accent);
}

.upload-item button {
  background:transparent;
  border:1px solid var(--line);
  border-radius:4px;
  color:var(--ink);
  padding:5px 8px;
  font-size:.76rem;
}

.upload-item.failed .upload-status {
  color:var(--danger);
}

.upload-empty-icon {
  font-size:.68rem;
  color:var(--muted);
  text-align:center;
}

.existing-media {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.existing-media img {
  width:100px;
  height:85px;
  object-fit:cover;
  border-radius:6px;
}

.wish-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
}

.wish-card {
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:22px;
}

.wish-card h3 {
  font-size:1.12rem;
  line-height:1.7;
}

.wish-card .wish-description {
  font-size:.88rem;
  color:var(--muted);
  white-space:pre-line;
  overflow-wrap:anywhere;
}

.wish-card .action-bar {
  margin-top:auto;
  padding-top:12px;
  border-top:1px solid var(--line);
}

.wish-card .status {
  align-self:start;
}

.ideas-section {
  margin-top:35px;
}

.ideas-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 30px;
  margin-top:20px;
}

.idea {
  display:flex;
  gap:13px;
  align-items:center;
  padding:15px 0;
  border-bottom:1px solid var(--line);
}

.idea-number {
  font:1.2rem Georgia,serif;
  color:var(--subtle);
  min-width:26px;
}

.idea-copy {
  flex:1;
  min-width:0;
}

.idea-copy p {
  font-size:.89rem;
}

.idea-copy small {
  color:var(--muted);
  font-size:.7rem;
}

.idea form {
  flex-shrink:0;
}

.idea button {
  font-size:.78rem;
  padding:6px 10px;
  border-radius:5px;
  border:1px solid var(--line);
  color:var(--ink);
  background:transparent;
}

.idea .added {
  font-size:.74rem;
  color:var(--subtle);
  white-space:nowrap;
}

.idea.highlight {
  background:rgba(195,218,224,.1);
  outline:1px solid var(--line);
}

.notes-layout {
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(300px,1fr);
  gap:25px;
}

.note-card {
  margin-bottom:20px;
}

.note-head {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}

.avatar {
  display:flex;
  width:36px;
  height:36px;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(185,218,225,.35);
  border-radius:50%;
  font-family:"Songti SC",serif;
  color:#daeaec;
  background:rgba(205,227,231,.05);
}

.note-body {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  line-height:1.9;
  font-size:1rem;
}

.note-title {
  font-family:"Songti SC",serif;
  margin:0 0 12px;
  font-size:1.35rem;
}

.note-card>.action-bar {
  margin:22px 0 0;
  padding-top:15px;
  border-top:1px solid var(--line);
}

.note-compose {
  align-self:start;
}

.replies {
  margin-top:20px;
  border-left:1px solid var(--line);
  padding-left:18px;
}

.reply {
  padding:12px 0;
}

.reply>p {
  font-size:.9rem;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.reply .meta {
  margin-top:4px;
}

.reply-form {
  margin-top:20px;
}

.settings-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  align-items:start;
}

.settings-column {
  display:flex;
  flex-direction:column;
  gap:24px;
}

.settings-panel>h2 {
  margin-bottom:20px;
}

.settings-panel>p {
  color:var(--muted);
  font-size:.875rem;
  margin-bottom:20px;
}

.setting-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:15px 0;
  border-top:1px solid var(--line);
}

.setting-row>div {
  min-width:0;
}

.setting-row p {
  font-size:.9rem;
  overflow-wrap:anywhere;
}

.setting-row small {
  color:var(--muted);
  font-size:.76rem;
}

.setting-row button {
  padding:5px 10px;
  font-size:.8rem;
}

.quota-number {
  font-family:Georgia,serif;
  font-size:2rem;
  line-height:1.2;
}

.quota-number span {
  font-family:inherit;
  font-size:.95rem;
  color:var(--muted);
}

.settings-panel .help {
  display:block;
  margin-top:10px;
}

.settings-panel hr {
  border:0;
  border-top:1px solid var(--line);
  margin:24px 0;
}

.compact-details {
  font-size:.9rem;
}

.credits-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
}

.credit-photo {
  aspect-ratio:1.5;
  object-fit:cover;
  width:100%;
  border-radius:7px;
  margin-bottom:15px;
}

.credits-grid h2 {
  font-size:1rem;
  margin-bottom:8px;
}

.credits-grid p {
  font-size:.85rem;
  color:var(--muted);
}

.credits-grid a {
  display:inline-block;
  margin-top:12px;
  font-size:.85rem;
  text-decoration:underline;
}

.toast {
  position:fixed;
  left:50%;
  bottom:28px;
  transform:translateX(-50%);
  z-index:50;
  background:#1c3542;
  padding:12px 20px;
  border:1px solid #7997a5;
  border-radius:7px;
  font-size:.9rem;
  max-width:calc(100% - 32px);
}

.view-tabs {
  flex-wrap:wrap;
}

.text-button {
  color:var(--muted);
  border:0;
  background:transparent;
  font-size:.8rem;
  padding:6px 8px;
}

.text-button:hover {
  color:var(--ink);
}

.worker-alert {
  border-left:2px solid var(--danger);
  padding:10px 14px;
  margin-bottom:16px;
  color:var(--danger);
  font-size:.875rem;
}

.memory-title,.wish-card h3,h1 {
  overflow-wrap:anywhere;
}

/* Daily reading: typography directly over the landscape. */
.daily-quote-wrap { padding-top: 10px; min-height: 0; }
.daily-quote-wrap + .auth-container { min-height: calc(100svh - 350px); padding-top: 35px; }
.daily-quote {
  margin: 0;
  padding: 18px 2px 22px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-shadow: 0 2px 8px rgba(0, 8, 16, .7);
}
.daily-quote blockquote {
  margin: 10px 0 12px;
  font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  line-height: 1.65;
  font-weight: 600;
  color: #f9fcff;
  letter-spacing: .035em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.daily-quote figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; font-size: .875rem; color: #c8d5de; }
.daily-quote cite { font-style: normal; }
.background-builtins, .background-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.background-builtins [aria-pressed=true] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.background-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.background-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--input); }
.background-card > img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.background-card-body { padding: 12px; }
.background-card-body > p { font-size: .9375rem; overflow-wrap: anywhere; }
.background-current { color: var(--accent); font-size: .875rem; }
.background-current[hidden] { display: none; }
.background-actions { margin: 10px 0 0; }
.background-actions .button { padding: 7px 13px; min-height: 44px; }
.background-upload { margin-block: 12px; }
@media (max-width: 760px) {
  .daily-quote-wrap { padding-top: 8px; }
  .daily-quote-wrap + .auth-container { min-height: auto; padding-top: 28px; }
  .daily-quote { padding: 12px 2px 18px; }
  .daily-quote blockquote { font-size: clamp(1.35rem, 5.4vw, 1.8rem); line-height: 1.65; }
  .daily-quote figcaption { line-height: 1.65; }
}
@media (max-width: 380px) {
  .background-grid { grid-template-columns: minmax(0, 1fr); }
}
