/* Visual proposal only. Existing renderers, actions and fullscreen code are retained. */
:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --panel: #fcfbf8;
  --surface: #edeae3;
  --surface-2: #e8e4dc;
  --text: #252823;
  --muted: #777970;
  --line: #dcded3;
  --accent: #a2472e;
  --on-accent: #fffaf3;
  --header: #f5f3eef2;
  --gutter: clamp(20px, 2.7vw, 64px);
  --gap: clamp(16px, 1.65vw, 32px);
  --image-radius: 10px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
html[data-proposal-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1d1a;
  --panel: #232621;
  --surface: #262923;
  --surface-2: #30342c;
  --text: #e8e8dd;
  --muted: #a5aa9b;
  --line: #383d33;
  --accent: #d3a486;
  --on-accent: #24231e;
  --header: #1b1d1af2;
}
html { background: var(--bg); scrollbar-gutter: stable; }
body {
  background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 38%, transparent), transparent 55%), var(--bg);
  color: var(--text);
  font-family: Geist, Manrope, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.015em;
}
body::before { display: none; }
button, select, input { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
body > header {
  height: 86px;
  padding: 0 var(--gutter);
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  z-index: 8;
}
body > header h1 {
  font: 400 34px/1 'Instrument Serif', Georgia, serif;
  letter-spacing: -.055em;
}
body > header h1 span { font-size: 1em; color: var(--accent); }
.editorial-wordmark-note {
  display: inline-block;
  margin-left: 24px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font: 10px/1.5 Geist, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body > header > a { display: flex; align-items: center; }
.editorial-header-tools { display: flex; align-items: center; gap: 24px; }
.editorial-view { color: var(--muted); font-size: 12px; }
.editorial-view::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 9px 2px 0;
  border-radius: 50%;
  background: var(--accent);
}
#settings, #close-settings {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
}
#settings .icon { font-size: 21px; }
.tool {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
  border-radius: 5px;
  transition: background .2s ease, border-color .2s ease;
}
.tool:hover { background: var(--surface); border-color: var(--muted); transform: none; }
.wrap { width: 100%; max-width: none; padding: 38px var(--gutter) 90px; margin: 0; }
.intro {
  display: block;
  max-width: none;
  margin: 0 0 30px;
  padding: 0 0 32px;
  border-bottom: 1px solid var(--line);
}
.intro > #mode, .intro > #description { display: none; }
.intro #title {
  max-width: none;
  margin: 0;
  font: 400 clamp(42px, 4.25vw, 72px)/1.03 'Instrument Serif', Georgia, serif;
  letter-spacing: -.035em;
}
.intro #description {
  max-width: 250px;
  margin: 0 0 3px;
  color: var(--muted);
  font: 400 13px/1.65 Geist, Manrope, sans-serif;
  letter-spacing: 0;
  text-wrap: balance;
}
/* Compact administrative controls; no action is removed. */
#content:has(> .folders) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
}
#content:has(> .folders) > .ol-bar {
  grid-column: 2;
  grid-row: 1;
  padding: 0;
  margin: 0 0 24px;
  border: 0;
  border-radius: 0;
  background: none;
}
#content:has(> .folders) > .ol-bar small { display: none; }
.album-browser-controls { grid-column: 1; grid-row: 1; margin: 0 0 24px; gap: 14px; }
.album-view-switch { padding: 3px; gap: 2px; border-radius: 6px; background: none; border-color: var(--line); }
.album-view-switch .tool { padding: 7px 10px; border-radius: 3px; font-size: 11px; gap: 7px; }
.album-view-switch .tool .icon { font-size: 18px; }
.album-view-switch .tool[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.album-date-sort { font-size: 11px; }
.album-date-sort select { background: transparent; border-radius: 5px; padding: 10px 28px 10px 10px; color: var(--text); }
.album-date-sort option, .drawer option { background: var(--panel); color: var(--text); }
.ol-button { background: var(--panel); color: var(--text); border-color: var(--line); border-radius: 5px; padding: 9px 12px; font-size: 11px; }
.ol-button:hover { background: var(--surface); }
.ol-button.primary { background: var(--text); color: var(--bg); }
.album-list-head { grid-column: 1 / -1; padding: 0 10px 12px; font: 10px Geist, sans-serif; letter-spacing: .09em; }
/* Cover-first cards use shared row tracks: a long title never displaces a cover. */
#content .folders:not(.album-list-mode) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(var(--portfolio-columns, 4), minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 32px var(--gap);
  align-items: stretch;
}
#content .folders:not(.album-list-mode) .folder,
#content .folders:not(.album-list-mode) .folder:nth-child(n) {
  display: grid;
  grid-column: auto;
  grid-row: span 3;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: subgrid;
  gap: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  transform: none;
  transition: none;
  animation: editorial-enter .65s var(--ease) both;
}
#content .folders:not(.album-list-mode) .folder > .folder-cover {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  aspect-ratio: 1.13;
  align-self: start;
  border-radius: var(--image-radius);
  overflow: hidden;
  background: var(--surface);
  isolation: isolate;
}
.folder-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .85s var(--ease); }
.folder:hover .folder-cover img { transform: scale(1.025); filter: none; }
.folder-cover::after { display: none; }
#content .folders:not(.album-list-mode) .folder > :is(h2, h3) {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  min-width: 0;
  padding: 14px 26px 0 0;
  margin: 0;
  color: var(--text);
  font: 500 clamp(13px, .94vw, 17px)/1.4 Geist, Manrope, sans-serif;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  position: relative;
}
#content .folders:not(.album-list-mode) .folder > :is(h2, h3)::after {
  content: 'arrow_outward';
  position: absolute;
  top: 15px;
  right: 0;
  color: var(--muted);
  font: 17px/1 'Material Symbols Outlined';
  transition: transform .4s var(--ease), color .4s;
}
#content .folders:not(.album-list-mode) .folder:hover > :is(h2, h3)::after { color: var(--accent); transform: translate(2px, -2px); }
#content .folders:not(.album-list-mode) .folder > :is(small, p) {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  margin: 6px 0 0;
  padding: 0;
  font: 11px/1.6 Geist, Manrope, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}
.folder-cover .album-curated,
#content .folders.album-list-mode .folder .album-curated {
  inset: 10px auto auto 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #c9f3c4;
  font-size: 0;
  line-height: 0;
  text-shadow: 0 1px 6px #132213;
}
.folder-cover .album-curated .icon { font-size: 0; }
.folder-cover .album-curated .icon::before { content: 'check'; font: 24px/1 'Material Symbols Outlined'; }
/* Details remains a real list with its original folder paths and sorting. */
.folders.album-list-mode { grid-column: 1 / -1; }
.folders.album-list-mode .folder,
.folders.album-list-mode .folder:nth-child(n) { padding: 18px 10px; }
.folders.album-list-mode .folder-cover { border-radius: var(--image-radius); overflow: hidden; }
.folders.album-list-mode .folder h2 { font-size: 15px; }
.folders.album-list-mode .album-source-folders { font-size: 11px; color: var(--muted); }
/* Photo masonry is retained; widen the canvas without altering fullscreen sizing. */
#content > .back { font: 12px Geist, sans-serif; padding: 9px 12px; margin: 0 0 20px; }
#content > h2 { margin: 0 0 26px; font: 400 clamp(27px, 3vw, 46px)/1.2 'Instrument Serif', Georgia, serif; letter-spacing: -.025em; }
.gallery { column-gap: var(--gap); }
.gallery .photo, .gallery .photo:nth-child(n) { border-radius: var(--image-radius); overflow: hidden; margin-bottom: var(--gap); }
.gallery .photo img { border-radius: inherit; }
.gallery .photo:hover img { filter: none; }
.gallery .photo figcaption { font: 10px Geist, sans-serif; }
.ol-bar { background: none; border-color: var(--line); border-radius: 5px; }
/* Same preferences, with a quiet theme selector for this local proposal. */
.drawer { z-index: 31; height: 100dvh; overflow-y: auto; background: var(--panel); color: var(--text); border-color: var(--line); box-shadow: -15px 0 60px #0002; }
.veil { z-index: 30; background: #15181366; backdrop-filter: blur(3px); }
.drawer h2 { font: 400 46px/1.1 'Instrument Serif', Georgia, serif; margin: 30px 0; }
.drawer label { font: 11px Geist, sans-serif; letter-spacing: .05em; color: var(--muted); }
.drawer select, .drawer input { background: var(--bg); color: var(--text); border-color: var(--line); border-radius: 5px; padding: 12px; font: 13px Geist, sans-serif; }
.drawer .tool { padding: 11px 13px; font-size: 12px; }
.drawer #close-settings { padding: 0; margin-left: auto; }
.editorial-preview-note { color: var(--muted); font: 11px/1.65 Geist, sans-serif; }
.editorial-footer { margin: 48px var(--gutter) 0; padding: 22px 0 26px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); font: 10px/1.5 Geist, sans-serif; color: var(--muted); letter-spacing: .02em; }
.editorial-footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* Local display preference only: no photo dimensions or fullscreen rules change. */
.editorial-size {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 9;
  width: min(268px, calc(100vw - 40px));
  padding: 14px 17px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--header);
  color: var(--text);
  box-shadow: 0 5px 25px #00000012;
  backdrop-filter: blur(16px);
  font: 11px/1.4 Geist, Manrope, sans-serif;
}
.editorial-size[hidden], body:has(dialog[open]) .editorial-size, body:has(.drawer.open) .editorial-size { display: none; }
.editorial-size-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.editorial-size label { font-weight: 500; }
.editorial-size output { color: var(--muted); font-variant-numeric: tabular-nums; }
.editorial-size input { display: block; width: 100%; height: 22px; margin: 0; cursor: ew-resize; accent-color: var(--accent); }
.editorial-size-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
#content .gallery { column-count: var(--portfolio-columns, 4); }
@keyframes editorial-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@supports not (grid-template-rows: subgrid) {
  #content .folders:not(.album-list-mode) .folder { grid-row: auto; grid-template-rows: auto minmax(3.2em, auto) auto; }
}
@media (min-width: 1650px) {
  #content .folders:not(.album-list-mode) { grid-template-columns: repeat(var(--portfolio-columns, 5), minmax(0, 1fr)); }
  .gallery { columns: 5; }
}
@media (min-width: 1101px) and (max-width: 1649px) { .gallery { columns: 4; } }
@media (max-width: 1100px) {
  #content .folders:not(.album-list-mode) { grid-template-columns: repeat(var(--portfolio-columns, 3), minmax(0, 1fr)); }
  .editorial-wordmark-note { display: none; }
  .album-date-sort > span { display: none; }
  .intro #description { max-width: 220px; }
}
@media (max-width: 760px) {
  body > header { height: 70px; }
  body > header h1 { font-size: 29px; }
  .editorial-header-tools { gap: 12px; }
  .editorial-view { font-size: 10px; }
  .wrap { padding-top: 30px; }
  .intro { display: block; margin-bottom: 24px; padding-bottom: 23px; }
  .intro #title { font-size: 44px; }
  .intro #description { max-width: none; font-size: 12px; margin: 14px 0 0; text-wrap: initial; }
  #content .folders:not(.album-list-mode) { grid-template-columns: repeat(var(--portfolio-columns, 2), minmax(0, 1fr)); gap: 26px 14px; }
  #content .folders:not(.album-list-mode) .folder > .folder-cover { aspect-ratio: .88; }
  #content .folders:not(.album-list-mode) .folder > :is(h2, h3) { font-size: 12px; padding-top: 11px; padding-right: 18px; }
  #content .folders:not(.album-list-mode) .folder > :is(h2, h3)::after { top: 12px; font-size: 14px; }
  #content .folders:not(.album-list-mode) .folder > :is(small, p) { font-size: 10px; }
  #content:has(> .folders) { display: flex; flex-direction: column; }
  #content:has(> .folders) > .ol-bar { order: 4; align-items: flex-start; margin-top: 22px; }
  .album-browser-controls { gap: 12px; align-items: center; margin-bottom: 22px; }
  .album-view-switch { width: fit-content; }
  .album-view-switch .tool { padding: 7px 8px; font-size: 10px; gap: 5px; }
  .album-date-sort { width: auto; }
  .album-date-sort select { max-width: 100%; padding: 10px 4px 10px 8px; font-size: 10px; }
  .editorial-footer { margin-top: 15px; flex-direction: column; gap: 7px; }
}
@media (max-width: 390px) { .editorial-view { display: none; } .album-date-sort { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #content .folders .folder { animation: none !important; }
  .folder-cover img, .tool, .folder h2::after { transition: none !important; }
}
