/* Nội thất & Không Gian Sống — "showroom sau giờ đóng cửa"
   Warm-black floor, lit photographs, brass used only as inlay. */

:root {
  --bg: #141311;
  --raised: #1d1b18;
  --raised-2: #26231f;
  --line: #3a352e;
  --text: #e9e2d4;
  --muted: #a89f90;
  --brass: #c9a96e;
  --brass-hi: #dcc08a;
  --danger: #e08f7a;

  --serif: "Noto Serif Display", "Times New Roman", serif;
  --sans: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --maxw: 1440px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --header-h: 4.5rem;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--brass); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--brass-hi); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0 0 var(--s4); }
::selection { background: #4a4236; color: var(--text); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
html { scrollbar-color: var(--line) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border: 2px solid var(--bg); }
input, textarea, select { caret-color: var(--brass); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s4); top: -3rem; z-index: 100; background: var(--text); color: var(--bg); padding: var(--s2) var(--s4); }
.skip-link:focus { top: var(--s4); }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(20, 19, 17, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-over-hero { position: absolute; inset: 0 0 auto 0; background: linear-gradient(rgba(10, 9, 8, .82), rgba(10, 9, 8, .35) 70%, rgba(10, 9, 8, 0)); border-bottom-color: transparent; backdrop-filter: none; }
.site-header.is-over-hero::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: linear-gradient(90deg, var(--brass), rgba(201, 169, 110, .15)); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: var(--s5); }
.wordmark { font-family: var(--serif); font-size: 1.3rem; line-height: 1; text-decoration: none; white-space: nowrap; letter-spacing: -.01em; }
.wordmark em { font-style: italic; color: var(--brass); }
.nav { margin-left: auto; display: flex; align-items: center; gap: var(--s5); }
.nav a, .nav button.linklike { font-size: .9rem; text-decoration: none; color: var(--text); padding-block: var(--s2); position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: .2rem; height: 1px; background: var(--brass); transition: right .5s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav a:hover { color: var(--text); }
.nav .nav-sep { width: 1px; height: 1.2rem; background: var(--line); }
.nav-user { color: var(--muted); font-size: .9rem; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; cursor: pointer; }
form.inline { display: inline; margin: 0; }
button.linklike { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--s3) var(--gutter) var(--s5);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a, .nav button.linklike, .nav-user { padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: 1rem; text-align: left; }
  .nav .nav-sep { display: none; }
  .nav a::after { display: none; }
}

/* ---------- buttons, chips, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 2.9rem; padding: 0 var(--s5); font: 500 .92rem/1 var(--sans); letter-spacing: .01em;
  border: 1px solid var(--line); background: transparent; color: var(--text); text-decoration: none; cursor: pointer;
  transition: border-color .4s var(--ease), background-color .4s var(--ease), color .4s var(--ease);
}
.btn:hover { border-color: var(--brass); color: var(--text); }
.btn-brass { border-color: var(--brass); color: var(--brass-hi); }
.btn-brass:hover { border-color: var(--brass-hi); color: var(--text); background: rgba(201, 169, 110, .08); }
.btn-solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-solid:hover { background: #f6f1e7; border-color: #f6f1e7; color: var(--bg); }
.btn-danger { border-color: rgba(224, 143, 122, .5); color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); background: rgba(224, 143, 122, .08); color: var(--danger); }
.btn-sm { min-height: 2.25rem; padding: 0 var(--s4); font-size: .85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn .icon { width: 1.05em; height: 1.05em; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 var(--s4);
  border: 1px solid var(--line); font-size: .86rem; text-decoration: none; color: var(--muted);
  transition: border-color .4s var(--ease), color .4s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.is-on { color: var(--bg); background: var(--text); border-color: var(--text); }

.field { display: grid; gap: var(--s2); margin-bottom: var(--s5); }
.field label, .label { font-size: .88rem; color: var(--muted); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=search], .field textarea, .field select {
  width: 100%; min-height: 3rem; padding: var(--s3) var(--s4); font: 400 1rem/1.4 var(--sans);
  background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: 0;
  transition: border-color .3s var(--ease);
}
.field textarea { min-height: 7rem; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brass); }
.input::placeholder, .field input::placeholder { color: #8b8274; }
.field-error, .validation-summary-errors, .field-validation-error { color: var(--danger); font-size: .88rem; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.input-validation-error { border-color: var(--danger) !important; }
.check { display: flex; align-items: center; gap: var(--s2); font-size: .92rem; }
.check input { accent-color: var(--brass); width: 1.1rem; height: 1.1rem; }

.notice { padding: var(--s4) var(--s5); border: 1px solid var(--line); background: var(--raised); margin-bottom: var(--s5); }
.notice-ok { border-color: rgba(201, 169, 110, .45); color: var(--text); }
.notice-err { border-color: rgba(224, 143, 122, .5); color: var(--danger); }
.validation-summary-valid { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(88vh, 900px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero-img.is-on { opacity: 1; }
.hero-img:first-of-type { animation: hero-in 2.4s var(--ease) both; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(10deg, rgba(14, 13, 11, .95) 10%, rgba(14, 13, 11, .7) 45%, rgba(14, 13, 11, .15) 80%); }
.hero-body { padding-block: calc(var(--header-h) + var(--s8)) clamp(2.5rem, 7vh, 5rem); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.5rem); font-weight: 300; line-height: 1.02; max-width: 13ch; letter-spacing: -.02em; }
.hero h1 em { color: var(--brass-hi); }
.hero-caption { margin-top: var(--s5); color: #c9c0b1; font-size: .95rem; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
.hero-caption a { color: var(--text); }
.hero-actions { margin-top: var(--s6); display: flex; flex-wrap: wrap; gap: var(--s3); }
@keyframes hero-in { from { transform: scale(1.06); filter: brightness(.55); } to { transform: none; filter: brightness(1); } }

/* ---------- sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s5); margin-bottom: var(--s6); padding-bottom: var(--s4); border-bottom: 1px solid rgba(201, 169, 110, .4); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 300; }
.section-head p { color: var(--muted); margin: var(--s2) 0 0; max-width: 52ch; }
@media (max-width: 620px) { .section-head { flex-direction: column; align-items: flex-start; } }
.more { white-space: nowrap; font-size: .9rem; display: inline-flex; gap: var(--s2); align-items: center; text-decoration: none; color: var(--brass-hi); }
.more:hover .icon { transform: translateX(3px); }
.more .icon { transition: transform .4s var(--ease); }

.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) var(--s6); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 4.25rem); font-weight: 300; }
.page-head p { color: var(--muted); max-width: 60ch; margin-top: var(--s4); font-size: 1.05rem; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: var(--s4); }
.crumbs a { color: var(--muted); }

/* ---------- styles row (rooms you can walk into) ---------- */
.styles-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.style-tile { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg); text-decoration: none; }
.style-tile img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) saturate(.9); transition: filter .9s var(--ease), transform 1.4s var(--ease); }
.style-tile:hover img, .style-tile:focus-visible img { filter: brightness(.95) saturate(1); transform: scale(1.04); }
.style-tile-body { position: absolute; inset: auto 0 0 0; padding: var(--s7) var(--s5) var(--s5); background: linear-gradient(transparent, rgba(14, 13, 11, .78) 35%, rgba(14, 13, 11, .94)); }
.style-tile h3 { font-size: clamp(1.5rem, 2.4vw, 2.2rem); font-weight: 300; }
.style-tile p { color: #d6cdbe; font-size: .9rem; margin: var(--s2) 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.styles-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .styles-row, .styles-row.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .styles-row, .styles-row.cols-3 { grid-template-columns: 1fr; } .style-tile { aspect-ratio: 4 / 3; } }

/* ---------- gallery wall + light switch ---------- */
.wall { columns: 3 300px; column-gap: var(--s4); }
.wall > * { break-inside: avoid; margin-bottom: var(--s4); }
.photo-tile { position: relative; }
.photo-card { position: relative; display: block; overflow: hidden; background: var(--raised); text-decoration: none; }
.photo-card img { width: 100%; height: auto; filter: brightness(.82) saturate(.9); transition: filter .8s var(--ease), transform 1.2s var(--ease); }
/* The wall stays scannable at rest: title and style · room are always shown; only the light switches on */
.photo-card-cap { position: absolute; inset: auto 0 0 0; display: grid; gap: var(--s1); padding: var(--s7) var(--s4) var(--s3); background: linear-gradient(transparent, rgba(14, 13, 11, .86)); }
.photo-card-title { font-size: .98rem; font-weight: 500; line-height: 1.35; }
.photo-card-meta { font-size: .84rem; color: #c9c0b1; }
.photo-card:hover img, .photo-card:focus-visible img { filter: brightness(1.04) saturate(1); transform: scale(1.025); }
.tile-save { position: absolute; top: var(--s2); right: var(--s2); width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(14, 13, 11, .72); color: var(--text); border: 1px solid var(--line); cursor: pointer; opacity: 0; transition: opacity .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease); }
.photo-tile:hover .tile-save, .tile-save:focus-visible, .photo-card:focus-visible + .tile-save { opacity: 1; }
.tile-save:hover { border-color: var(--brass); color: var(--brass-hi); }
@media (hover: none) { .photo-card img { filter: none; } .tile-save { opacity: 1; } }

/* ---------- article cards ---------- */
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s7) var(--s5); }
.articles.lead-first > :first-child { grid-column: span 2; grid-row: span 2; }
.articles.lead-first > :first-child .article-card-img { aspect-ratio: 4 / 3; }
.articles.lead-first > :first-child h3 { font-size: clamp(1.7rem, 2.8vw, 2.6rem); }
.article-card { display: grid; gap: var(--s3); align-content: start; text-decoration: none; }
.article-card-img { overflow: hidden; aspect-ratio: 3 / 2; background: var(--raised); }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: filter .8s var(--ease), transform 1.2s var(--ease); }
.article-card:hover .article-card-img img, .article-card:focus-visible .article-card-img img { filter: brightness(1.02); transform: scale(1.03); }
.article-card h3 { font-size: 1.45rem; font-weight: 400; line-height: 1.18; }
.article-card:hover h3 { color: var(--brass-hi); }
.article-card p { color: var(--muted); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); font-size: .84rem; color: var(--muted); }
.meta > * + *::before { content: ""; display: inline-block; width: 3px; height: 3px; background: var(--brass); vertical-align: middle; margin-right: var(--s3); }
@media (max-width: 960px) { .articles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .articles { grid-template-columns: 1fr; } .articles.lead-first > :first-child { grid-column: auto; grid-row: auto; } }

/* ---------- filter bar ---------- */
.filters { display: grid; gap: var(--s4); margin-bottom: var(--s6); padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
.filter-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s3); align-items: start; }
.filter-row > .label { padding-top: .45rem; }
.search { display: flex; gap: var(--s2); max-width: 34rem; }
.search .input { flex: 1; }
.result-count { color: var(--muted); font-size: .9rem; }
@media (max-width: 620px) { .filter-row { grid-template-columns: 1fr; } }

/* ---------- stars ---------- */
.stars { display: inline-flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.stars-avg { font-size: .9rem; color: var(--muted); }
.stars-avg strong { color: var(--text); font-weight: 500; }
.star-row { display: inline-flex; }
.star-row svg { width: 1.15rem; height: 1.15rem; }
.star-full { fill: var(--brass); stroke: var(--brass); }
.star-empty { fill: none; stroke: #6b6357; }
fieldset.rate { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; }
fieldset.rate legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
fieldset.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
fieldset.rate label { cursor: pointer; width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; color: #857c6f; }
fieldset.rate label svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.3; transition: fill .25s, color .25s; }
fieldset.rate input:checked ~ label, fieldset.rate label:hover, fieldset.rate label:hover ~ label { color: var(--brass); }
fieldset.rate input:checked ~ label svg, fieldset.rate label:hover svg, fieldset.rate label:hover ~ label svg { fill: var(--brass); }
fieldset.rate input:focus-visible + label { outline: 1px solid var(--brass); outline-offset: 1px; }
.rating { display: grid; gap: var(--s3); justify-items: start; }
.rate-hint { font-size: .84rem; color: var(--muted); }
a.rate-hint { color: var(--brass-hi); }

/* ---------- pager ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: var(--s2); margin-top: var(--s7); flex-wrap: wrap; }
.pager a, .pager span { min-width: 2.6rem; height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); text-decoration: none; font-size: .9rem; font-variant-numeric: tabular-nums; padding: 0 var(--s3); }
.pager a:hover { border-color: var(--brass); }
.pager [aria-current="page"] { border-color: var(--brass); color: var(--brass-hi); }
.pager .gap { border: 0; color: var(--muted); }

/* ---------- empty state ---------- */
.empty-state { text-align: center; padding: var(--s8) var(--s5); border: 1px solid var(--line); }
.empty-state h2 { font-size: 1.8rem; font-weight: 300; margin-bottom: var(--s3); }
.empty-state p { color: var(--muted); max-width: 46ch; margin: 0 auto var(--s5); }

/* ---------- detail pages ---------- */
.photo-stage { background: #0e0d0b; border-block: 1px solid var(--line); }
.photo-stage img { margin-inline: auto; max-height: 82vh; width: auto; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--s7); padding-block: var(--s7); }
.detail-grid h1 { font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 300; margin-bottom: var(--s4); }
.detail-grid .lead { color: var(--muted); font-size: 1.08rem; max-width: 62ch; }
.aside { display: grid; gap: var(--s5); align-content: start; padding-left: var(--s6); border-left: 1px solid var(--line); }
.aside dl { margin: 0; display: grid; gap: var(--s3); }
.aside dt { font-size: .84rem; color: var(--muted); }
.aside dd { margin: 0; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } .aside { padding-left: 0; border-left: 0; padding-top: var(--s5); border-top: 1px solid var(--line); } }

.article-hero { position: relative; }
.article-hero img { width: 100%; max-height: 72vh; object-fit: cover; }
.article-head { max-width: 50rem; margin-inline: auto; padding-block: var(--s7) var(--s5); }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 300; margin-block: var(--s3) var(--s4); }
.article-head .summary { font-size: 1.15rem; color: var(--muted); }
.prose { max-width: 42rem; margin-inline: auto; font-size: 1.08rem; line-height: 1.8; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 400; margin: var(--s7) 0 var(--s4); }
.prose h3 { font-size: 1.35rem; margin: var(--s6) 0 var(--s3); }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--s5); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--brass); }
.prose strong { font-weight: 600; color: #f3ede2; }
.prose em { font-family: var(--serif); font-style: italic; font-size: 1.05em; }
.prose a { color: var(--brass-hi); }
.prose blockquote { margin: var(--s6) 0; padding-left: var(--s5); border-left: 1px solid var(--brass); font-family: var(--serif); font-style: italic; font-size: 1.4rem; line-height: 1.4; }
.prose img { margin: var(--s6) 0; }
.article-foot { max-width: 42rem; margin: var(--s7) auto 0; padding-top: var(--s5); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: var(--s5); flex-wrap: wrap; }

/* ---------- auth ---------- */
.auth { max-width: 28rem; margin: clamp(2rem, 8vh, 5rem) auto; }
.auth h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 300; margin-bottom: var(--s3); }
.auth > p { color: var(--muted); margin-bottom: var(--s6); }
.auth .btn { width: 100%; }
.auth-alt { margin-top: var(--s5); color: var(--muted); font-size: .94rem; text-align: center; }

/* ---------- collections ---------- */
.collections { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--s6) var(--s5); }
.collection-card { text-decoration: none; display: grid; gap: var(--s3); }
.collection-mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; aspect-ratio: 4 / 3; background: var(--raised); overflow: hidden; }
.collection-mosaic img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: filter .8s var(--ease); }
.collection-mosaic img:first-child { grid-row: span 2; }
.collection-mosaic .ph { background: var(--raised-2); }
.collection-card:hover img { filter: brightness(1.02); }
.collection-card h3 { font-size: 1.4rem; }
.collection-card:hover h3 { color: var(--brass-hi); }
.new-collection { display: flex; gap: var(--s2); flex-wrap: wrap; max-width: 34rem; }
.new-collection .input { flex: 1 1 14rem; }
.board-tools { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; margin-bottom: var(--s6); }
.board-item { position: relative; }
.board-item form { position: absolute; left: var(--s2); bottom: var(--s2); }
.board-item .tile-save { display: none; }
.board-item .btn { background: rgba(14, 13, 11, .8); }

/* ---------- save dialog ---------- */
dialog.sheet { border: 1px solid var(--line); background: var(--raised); color: var(--text); padding: 0; width: min(28rem, calc(100vw - 2rem)); }
dialog.sheet::backdrop { background: rgba(8, 7, 6, .72); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 1.5rem; }
.sheet-body { padding: var(--s5); display: grid; gap: var(--s4); }
.sheet-list { display: grid; gap: var(--s2); max-height: 15rem; overflow: auto; }
.sheet-list button { justify-content: space-between; width: 100%; }
.sheet-list button[aria-pressed="true"] { border-color: var(--brass); color: var(--brass-hi); }
.icon-btn { background: none; border: 1px solid transparent; color: var(--muted); width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--line); }
.toast { position: fixed; left: 50%; bottom: calc(var(--s6) + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 1rem); background: var(--text); color: var(--bg); padding: var(--s3) var(--s5); font-size: .92rem; opacity: 0; pointer-events: none; transition: opacity .4s var(--ease), transform .4s var(--ease); z-index: 90; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.site-footer { margin-top: var(--s9); border-top: 1px solid var(--line); padding-block: var(--s7) var(--s6); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--s6); }
.site-footer .wordmark { color: var(--text); font-size: 1.6rem; display: inline-block; margin-bottom: var(--s3); }
.site-footer h2 { font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--text); margin-bottom: var(--s3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brass-hi); }
.footnote { grid-column: 1 / -1; padding-top: var(--s5); border-top: 1px solid var(--line); font-size: .84rem; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- error pages ---------- */
.error-page { text-align: center; padding-block: var(--s9); }
.error-page h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 300; margin-bottom: var(--s4); }
.error-page p { color: var(--muted); margin-bottom: var(--s6); }

/* ---------- hero slider & lede ---------- */
.hero-lede { margin-top: var(--s4); max-width: 46ch; font-size: 1.06rem; color: var(--text); text-shadow: 0 1px 16px rgba(10, 9, 8, .6); }
.hero h1 { text-shadow: 0 2px 28px rgba(10, 9, 8, .45); }
.hero-short { min-height: min(70vh, 720px); }
.hero-foot { margin-top: var(--s6); display: flex; justify-content: space-between; align-items: end; gap: var(--s5); flex-wrap: wrap; }
.hero-foot .hero-caption { margin-top: 0; }
.slider-controls { display: flex; align-items: center; gap: var(--s2); }
.slider-pause { width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; background: rgba(14, 13, 11, .55); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.slider-pause:hover { border-color: var(--brass); }
.slider-dots { display: flex; }
.slider-dots button { width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; padding: 0; }
.slider-dots span { width: 1.75rem; height: 2px; background: rgba(233, 226, 212, .4); transition: background .4s var(--ease); }
.slider-dots button:hover span { background: var(--text); }
.slider-dots button[aria-current="true"] span { background: var(--brass); }
.site-header.is-over-hero .wordmark, .site-header.is-over-hero .nav a, .site-header.is-over-hero .nav button.linklike { text-shadow: 0 1px 12px rgba(10, 9, 8, .75); }

/* ---------- photo detail ---------- */
.btn-block { width: 100%; }
.btn.is-saved { color: var(--text); }
.hint-line { margin: var(--s3) 0 0; font-size: .86rem; color: var(--muted); }
.photo-nav { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.icon.flip { transform: scaleX(-1); }
.article-foot .label { margin-bottom: var(--s2); }
.mb-7 { margin-bottom: var(--s7); }
.pt-5 { padding-top: var(--s5); }
details.rename { display: grid; gap: var(--s3); }
details.rename summary { list-style: none; }
details.rename summary::-webkit-details-marker { display: none; }
details.rename[open] summary { border-color: var(--brass); }

/* ---------- touch: 44px targets, swipeable rows ---------- */
@media (max-width: 860px) {
  .site-footer li a, .more, a.rate-hint { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .chip { min-height: 2.75rem; }
}
@media (max-width: 620px) {
  .filters .chips, .styles-row:not(.cols-3) {
    display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  }
  .filters .chips::-webkit-scrollbar, .styles-row:not(.cols-3)::-webkit-scrollbar { display: none; }
  .filters .chip { flex: none; scroll-snap-align: start; }
  .styles-row:not(.cols-3) { gap: var(--s3); background: none; border: 0; }
  .styles-row:not(.cols-3) .style-tile { flex: 0 0 78%; scroll-snap-align: start; aspect-ratio: 4 / 5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
