/* Family wallpaper. Presentation only; served separately from pinned Sure. */
html:not([data-theme="dark"]) {
  --family-cream: #fffaf0;
  --family-line: #e9e5d4;
  --family-ink: #35463c;
}

html:not([data-theme="dark"]) [data-controller~="app-layout"],
html:not([data-theme="dark"]) body > .flex.flex-col > .min-h-full.bg-surface,
html:not([data-theme="dark"]) body > .bg-surface:has(#settings-nav-container),
html:not([data-theme="dark"]) body > .min-h-screen.bg-surface {
  background-color: var(--family-cream);
  background-image: linear-gradient(#fffaf01c, #fffaf01c), url('/family-theme/ducklings.png');
  background-size: auto, 720px 720px;
  background-position: center top;
}

/* One duck identity across login, navigation and auxiliary screens. */
img[src*="/family-brand/logomark"] {
  object-fit: contain;
  border-radius: 50%;
  background: #fffaf0;
}
nav img[src*="/family-brand/logomark"] { width: 44px; height: 44px; }
body:has(form[action="/sessions"]) img[src*="/family-brand/logomark"] {
  width: 104px;
  height: 104px;
  margin-bottom: 12px;
  box-shadow: 0 0 0 1px #eee7d3;
}
html:not([data-theme="dark"]) [data-app-layout-target="leftSidebar"] {
  background-image: linear-gradient(#f5f8eeaa, #f5f8eeaa), url('/family-theme/duck-icon.png?v=3');
  background-size: auto, 180px 180px;
  background-repeat: no-repeat;
  background-position: center bottom 20px;
}

/* Keep navigation and all overlays opaque enough to read. */
html:not([data-theme="dark"]) [data-controller~="app-layout"] > nav,
html:not([data-theme="dark"]) [data-controller~="app-layout"] > .border-r,
html:not([data-theme="dark"]) #main > .sticky.bg-surface,
html:not([data-theme="dark"]) [data-controller="settings-scroll"] > .sticky,
html:not([data-theme="dark"]) #settings-nav-container {
  background-color: #f5f8eef5;
  border-color: var(--family-line);
}

html:not([data-theme="dark"]) #main .bg-container {
  background-color: #fffefa;
}
html:not([data-theme="dark"]) #main .shadow-border-xs {
  box-shadow: 0 0 0 1px #e6e0cc, 0 3px 12px #82703d08;
}
html:not([data-theme="dark"]) #main h1,
html:not([data-theme="dark"]) #main h2 {
  color: var(--family-ink);
}
html:not([data-theme="dark"]) #main h1 {
  width: fit-content;
  background: #fffaf0ed;
  border-radius: 12px;
  padding: 5px 10px;
  margin-left: -10px;
}
html:not([data-theme="dark"]) #main h1 + p {
  width: fit-content;
  background: #fffaf0f5;
  border-radius: 8px;
  padding: 3px 8px;
  margin-left: -8px;
}

/* The sign-in form sits in a quiet cream card, with ducklings around it. */
html:not([data-theme="dark"]) body:has(form[action="/sessions"]) .grow.flex.flex-col.justify-center {
  flex-grow: 0;
  width: min(100%, 32rem);
  margin: auto;
  padding: 30px 32px;
  border: 1px solid #e7dfc8;
  border-radius: 28px;
  background: #fffefa;
  box-shadow: 0 12px 48px #7b74421c;
}
html:not([data-theme="dark"]) body:has(form[action="/sessions"]) footer {
  margin-top: 24px;
}

/* Dark mode retains its contrast with a much quieter wallpaper. */
html[data-theme="dark"] [data-controller~="app-layout"] {
  background-image: linear-gradient(#141c18ed, #141c18ed), url('/family-theme/ducklings.png');
  background-size: auto, 720px 720px;
}

@media (max-width: 640px) {
  html:not([data-theme="dark"]) [data-controller~="app-layout"],
  html:not([data-theme="dark"]) body > .flex.flex-col > .min-h-full.bg-surface {
    background-size: auto, 480px 480px;
    background-position: left top;
  }
  html:not([data-theme="dark"]) body:has(form[action="/sessions"]) .grow.flex.flex-col.justify-center {
    padding: 24px 20px;
    border-radius: 24px;
  }
}
@media print {
  html body [data-controller~="app-layout"] { background-image: none !important; }
}
