@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope.woff") format("woff");
  font-style: normal; font-weight: 200 800; font-display: swap;
}
@font-face {
  font-family: Rubik;
  src: url("/fonts/rubik-latin.woff2") format("woff2");
  font-style: normal; font-weight: 300 900; font-display: swap;
}
@font-face {
  font-family: Rubik;
  src: url("/fonts/rubik-cyrillic.woff2") format("woff2");
  font-style: normal; font-weight: 300 900; font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: dark;
  --canvas: #101010;
  --surface: #1a1a1a;
  --raised: #252525;
  --hover: #303030;
  --ink: #f5f5f1;
  --muted: #b9b9b3;
  --line: #373737;
  --control: #73736e;
  --accent: #f9d94c;
  --accent-hover: #ffe477;
  --accent-active: #e8c639;
  --accent-wash: #332c16;
  --on-accent: #1b170b;
  --error: #ffc0c7;
  --error-wash: #412736;
  --error-hover: #4f2e40;
  --on-photo: #fff;
  --overlay: #0a0a0a;
  --scrim: color-mix(in srgb, var(--overlay) 76%, transparent);
  --shadow: 0 16px 44px rgb(0 0 0 / .44);
  --s1: .25rem;
  --s2: .5rem;
  --s3: .75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --r-control: .625rem;
  --r-photo: .875rem;
  --r-panel: 1.25rem;
  --r-full: 999px;
  --font-ui: Manrope, system-ui, sans-serif;
  --font-rubik: Rubik, var(--font-ui);
  --weight-base: 400;
  --weight-medium: 500;
  --weight-semi: 600;
  --weight-bold: 700;
  --leading-normal: 1.55;
  --leading-title: 1.16;
  --text-caption: .75rem;
  --text-small: .8125rem;
  --text-label: .875rem;
  --text-body: 1rem;
  --text-heading: 1.125rem;
  --text-title: 1.25rem;
  --text-display: 1.75rem;
  --text-number: clamp(2rem, 5vw, 2.75rem);
  --target: 2.75rem;
  --rail-space: 0px;
  --header-height: calc(58px + env(safe-area-inset-top));
  --gutter: 1rem;
  --mobile-nav-space: calc(5.25rem + env(safe-area-inset-bottom));
  font: var(--weight-base) var(--text-body)/var(--leading-normal) var(--font-ui);
  font-synthesis: none;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
h1, h2, p, figure { margin: 0; }
:is(h1, h2, h3, strong, b) { font-weight: var(--weight-bold); }
a { color: inherit; text-decoration: none; }
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .54; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
svg { width: 1.125rem; height: 1.125rem; flex: none; stroke-width: 1.7; }

.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus {
  position: fixed; z-index: 5; inset: var(--s3) auto auto var(--s3);
  padding: var(--s2) var(--s4); color: var(--on-accent); background: var(--accent); border-radius: var(--r-control);
}
body:not([data-route="catalog"]) .masthead,
body[data-route="preview"] .nav, body[data-route="studio"] .nav { display: none; }
.masthead {
  position: sticky; top: 0; z-index: 5; padding-top: env(safe-area-inset-top);
  margin-inline-start: var(--rail-space); padding-inline: var(--gutter); background: var(--canvas);
}
.masthead-inner { min-height: calc(var(--header-height) - env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.brand, .sheet-brand {
  display: inline-flex; align-items: center; gap: .38em; white-space: nowrap; color: var(--ink);
  font-size: var(--text-title); font-weight: 800; letter-spacing: -.045em; line-height: 1;
}
.brand { min-height: var(--target); }
.brand-logo {
  display: block; width: clamp(9.75rem, 19vw, 11.5rem); height: auto;
}
:is(.sheet-brand, .auth-heading) .brand-logo { width: 10.25rem; }
.header-actions { display: flex; align-items: center; gap: var(--s2); }
.header-actions .header-account { padding-inline: var(--s3); white-space: nowrap; }
.header-account[aria-haspopup="dialog"] { color: var(--accent); }
.header-account:not(:disabled):active { background: var(--surface); }
.header-account svg { width: 1rem; height: 1rem; }
.header-bonus { position: relative; background: var(--surface); }
.header-bonus[data-unread]::after {
  content: ''; position: absolute; inset: var(--s2) var(--s2) auto auto;
  width: .4375rem; height: .4375rem; border-radius: 50%; background: var(--accent);
}
.nav {
  position: fixed; z-index: 6; inset: auto 0 0; isolation: isolate;
  display: grid; grid-template-columns: repeat(5, minmax(0, 120px)); justify-content: center;
  gap: var(--s1); padding: var(--s2) var(--s1) calc(var(--s2) + env(safe-area-inset-bottom));
  background: var(--surface); touch-action: manipulation;
}
.nav a, .nav-account {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1);
  min-width: 0; min-height: 56px; padding: var(--s1) 0; border: 0; border-radius: var(--r-control);
  font-size: var(--text-caption); font-weight: var(--weight-semi); line-height: 1.2;
  white-space: nowrap; color: var(--muted); background: transparent;
}
.nav svg { width: 1.4rem; height: 1.4rem; }
.nav a:hover, .nav-account:hover { color: var(--ink); background: var(--hover); }
.nav a[aria-current], .nav-account[aria-current] { color: var(--accent); }
main { margin-inline-start: var(--rail-space); padding: 0 var(--gutter) var(--mobile-nav-space); }
.display {
  font-size: var(--text-display); font-weight: var(--weight-bold); letter-spacing: -.025em;
  line-height: var(--leading-title); overflow-wrap: anywhere; text-wrap: balance;
}

.outline, .primary, .secondary, .subtle-button, .back-link, .icon-button, .danger {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--target); padding: var(--s2) var(--s4);
  border: 1px solid transparent; border-radius: var(--r-control);
  background: transparent; font-size: var(--text-label); font-weight: var(--weight-bold); line-height: 1.3;
}
.outline { border-color: var(--control); }
.outline:not(:disabled):hover, .icon-button:not(:disabled):hover { color: var(--ink); background: var(--hover); }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:not(:disabled):hover { background: var(--accent-hover); }
.primary:not(:disabled):active { background: var(--accent-active); }
.secondary { background: var(--raised); color: var(--ink); }
.secondary:not(:disabled):hover { background: var(--hover); }
.danger { background: var(--error-wash); color: var(--error); border-color: var(--error); }
.danger:not(:disabled):hover, .danger:not(:disabled):active { background: var(--error-hover); }
.subtle-button, .back-link { color: var(--muted); }
.subtle-button:not(:disabled):hover, .back-link:hover { color: var(--ink); background: var(--hover); }
.back-link { padding-inline: var(--s2) var(--s3); margin-inline-start: calc(-1 * var(--s2)); }
.icon-button { width: var(--target); padding: 0; flex: none; }
.action-large {
  min-height: var(--s7); padding-inline: var(--s5);
  border-radius: 1.125rem; font-size: var(--text-body);
}
.catalog-intro { display: grid; gap: var(--s2); padding-block: var(--s4) var(--s5); }
.catalog-intro p { color: var(--muted); font-size: var(--text-label); }
.catalog-intro h1 {
  font: 800 clamp(1.625rem, 3.6vw, 2.75rem)/1.08 var(--font-rubik);
  letter-spacing: -.035em; text-wrap: balance; width: fit-content;
}
.catalog-bar { position: sticky; top: var(--header-height); z-index: 4; background: var(--canvas); padding: var(--s2) 0; }
.photo-reel { position: relative; padding-block: var(--s1); }
.photo-reel-row {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(8.25rem, 44%, 11.5rem); gap: var(--s2);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
}
.reel-photo {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5;
  padding: 0; border: 0; border-radius: var(--r-photo);
  overflow: hidden; scroll-snap-align: start; background: var(--raised);
}
.reel-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; }
.reel-photo:hover img { opacity: .9; }
.reel-photo:focus-visible { outline-offset: -3px; }
.photo-reel .shelf-controls {
  position: absolute; inset: 0 var(--s2); align-items: center; justify-content: space-between; pointer-events: none;
}
.photo-reel .shelf-control { pointer-events: auto; color: #fff; background: var(--scrim); }
.photo-reel .shelf-control:disabled { visibility: hidden; }
.chips {
  display: flex; align-items: center; gap: var(--s2); overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--s1)); padding: 3px var(--s1);
}
[data-chip-row] { position: relative; isolation: isolate; }
.chip-marker {
  position: absolute; z-index: 1; top: 3px; left: 0; width: 0; height: var(--target);
  border-radius: var(--r-photo); background: var(--accent);
  pointer-events: none; transform-origin: left center;
}
.chip {
  display: inline-flex; flex: none; align-items: center; white-space: nowrap; min-height: var(--target);
  padding: 0 var(--s4); border: 1px solid transparent; border-radius: var(--r-photo);
  background: var(--surface); color: var(--muted); font-size: var(--text-label); font-weight: var(--weight-semi);
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.chip:hover:not([aria-pressed="true"]) { background: var(--raised); color: var(--ink); }
.chip-label { position: relative; z-index: 2; }
.chip[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); }
.chip:focus-visible { outline-offset: 1px; }
.chip-marker-ready .chip[aria-pressed="true"] { background: transparent; }
.catalog-status:not(:empty) { margin-block: var(--s2) var(--s4); color: var(--muted); font-size: var(--text-label); }

.wall { --columns: 2; --wall-gap: var(--s2); display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: var(--wall-gap); }
.wall.masonry { position: relative; display: block; }
.card { min-width: 0; position: relative; }
.masonry > .card {
  position: absolute; top: var(--top, 0); inset-inline-start: calc(var(--column, 0) * (100% + var(--wall-gap)) / var(--columns));
  width: calc((100% - (var(--columns) - 1) * var(--wall-gap)) / var(--columns));
}
.card-open {
  display: block; position: relative; overflow: hidden; width: 100%;
  padding: 0; border: 0; border-radius: var(--r-photo);
  background: transparent; text-align: left;
}
.card-open:focus-visible { outline-offset: -3px; }
.card-image {
  display: block; position: relative; overflow: hidden; width: 100%;
  aspect-ratio: var(--photo-ratio, 3 / 4); border-radius: var(--r-photo); background: var(--raised);
}
.card-image img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.card-open:hover .card-image img { opacity: .9; }
.card-text {
  position: absolute; inset: auto 0 0; display: grid; pointer-events: none;
  padding: 1.25rem var(--s3) var(--s3); color: #fff;
  background: linear-gradient(to bottom, transparent, rgb(0 0 0 / .78) 1.25rem, rgb(0 0 0 / .88));
}
.card-text strong {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow-wrap: anywhere; line-height: 1.35; font-weight: var(--weight-semi); font-size: var(--text-label);
}
.card-text small { color: var(--ink); font-weight: var(--weight-medium); font-size: var(--text-small); }
.favorite, .favorite:hover {
  position: absolute; inset: 2px 2px auto auto;
  color: #fff; background: transparent; border-color: transparent;
}
.favorite svg {
  width: 1.375rem; height: 1.375rem; filter: drop-shadow(0 0 2px #000) drop-shadow(0 1px 2px #000);
  stroke-width: 2;
}

.favorite[aria-pressed="true"] { color: var(--accent); }
.favorite[aria-pressed="true"] svg { fill: currentColor; }
.more { display: flex; margin: var(--s6) auto 0; }

#search-panel {
  position: sticky; top: 0; z-index: 4; padding: env(safe-area-inset-top) 0 var(--s2); background: var(--canvas);
}
.search-heading {
  display: grid; grid-template-columns: minmax(44px, 1fr) auto minmax(44px, 1fr); gap: var(--s2);
  align-items: center; min-height: calc(var(--header-height) - env(safe-area-inset-top)); margin-bottom: var(--s4);
}
.search-heading .display { font-size: var(--text-heading); line-height: var(--leading-title); text-align: center; }
.search-heading .back-link { justify-self: start; margin: 0; color: var(--ink); background: var(--surface); }
.search-heading .back-link:hover { background: var(--raised); }
.page-back { justify-self: start; border-radius: var(--r-photo); background: var(--surface); color: var(--ink); }
.header-mark { display: grid; justify-self: end; place-items: center; width: var(--target); height: var(--target); }
.header-mark img { width: 2rem; height: 2rem; }
.page-heading { padding-top: env(safe-area-inset-top); }
.search-tools { position: relative; width: min(100%, 40rem); }
.search {
  display: flex; align-items: center; gap: var(--s1); padding-inline: var(--s3) var(--s1);
  border: 1px solid var(--control); border-radius: var(--r-photo); background: var(--surface);
}
.search:focus-within { border-color: var(--accent); }
.search-icon { display: inline-flex; color: var(--muted); pointer-events: none; }
.search input {
  flex: 1; width: 0; min-height: var(--s7); padding-inline: var(--s1);
  border: 0; background: transparent; outline: none; font-size: var(--text-body);
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.search-suggestions button {
  min-height: var(--target); padding: var(--s2);
  border: 0; border-radius: var(--r-control); background: transparent;
  color: var(--muted); font-size: var(--text-label); font-weight: var(--weight-semi);
}
.search-clear { color: var(--muted); }
.search-submit { padding-inline: var(--s2); color: var(--accent); }
.search-suggestions button:hover { color: var(--ink); background: var(--hover); }
.search-suggestions {
  position: absolute; z-index: 2; inset: calc(100% + var(--s2)) 0 auto;
  padding: var(--s3); max-height: 45dvh; overflow: auto;
  border-radius: var(--r-photo); background: var(--raised); box-shadow: var(--shadow);
}
.search-suggestions p { color: var(--muted); font-size: var(--text-small); font-weight: var(--weight-semi); }
.search-examples, .history-heading { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.search-examples { margin-top: var(--s2); }
.search-examples button { padding-inline: var(--s3); color: var(--ink); background: var(--surface); }
.history-heading { justify-content: space-between; margin-top: var(--s2); }
.search-history { margin: 0; padding: 0; list-style: none; }
.search-history button { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: start; }
.search-history span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topic-shelves { display: grid; gap: var(--s6); padding-top: var(--s2); }
.topic-shelf { min-width: 0; }
.topic-shelf header { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.topic-shelf h2 { font-size: var(--text-title); line-height: 1.25; }
.topic-shelf h2 a, .shelf-all { display: inline-flex; align-items: center; min-height: var(--target); }
.shelf-actions, .shelf-controls { display: flex; align-items: center; gap: var(--s1); }
.shelf-all { gap: var(--s1); padding-inline: var(--s2); color: var(--accent); font-size: var(--text-label); font-weight: var(--weight-semi); }
.shelf-all:hover { color: var(--ink); }
.shelf-control:not(:disabled):hover { background: var(--hover); border-color: transparent; }
.shelf-control:disabled { opacity: .3; }
.topic-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * var(--s2)) / 5.15);
  gap: var(--s2); overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory; padding-block: var(--s1);
}
.topic-row .card { scroll-snap-align: start; }
.topic-row .card-image { aspect-ratio: 3 / 4; }

.style-detail, .studio-backdrop {
  position: fixed; z-index: 10; inset: 0; overflow: hidden; isolation: isolate; background: var(--overlay);
}
.preview-ambient {
  position: absolute; z-index: -1; inset: -38px; width: calc(100% + 76px); height: calc(100% + 76px);
  object-fit: cover; filter: blur(30px) brightness(.45);
}
.preview-stage { position: absolute; inset: 0; overflow: hidden; }
.preview-stage > img { width: 100%; height: 100%; object-fit: cover; object-position: center 39%; }
.style-detail::after {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; content: "";
  background: linear-gradient(180deg, rgb(0 0 0 / .36), transparent 19%, transparent 52%, rgb(0 0 0 / .85));
}
.preview-back, .preview-tool {
  z-index: 2; color: var(--on-photo); background: var(--scrim); border-color: transparent;
}
.preview-back {
  position: absolute; inset: calc(env(safe-area-inset-top) + 12px) auto auto 12px;
  background: var(--surface);
}
.preview-tools { position: absolute; z-index: 2; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 11.875rem); display: grid; gap: var(--s3); }
.preview-tool { width: 48px; height: 48px; }
.preview-tool svg { width: 1.375rem; height: 1.375rem; }
.preview-tool[aria-pressed="true"] { color: var(--accent); }
.preview-tool[aria-pressed="true"] svg { fill: currentColor; }
.preview-info {
  position: absolute; z-index: 2; inset: auto var(--s4) calc(env(safe-area-inset-bottom) + 22px);
  display: grid; gap: var(--s3); color: var(--on-photo);
}
.preview-info h1 { font-size: clamp(1.25rem, 5vw, 2rem); line-height: var(--leading-title); overflow-wrap: anywhere; }
.preview-info .primary { width: 100%; max-width: 420px; min-height: 56px; font-size: var(--text-body); }
body:is([data-route="preview"], [data-route="studio"]) { overflow: hidden; }
body:is([data-route="preview"], [data-route="studio"]) main { margin-inline-start: 0; }

.studio-layer {
  position: fixed; z-index: 11; inset: 0; display: grid; place-items: center;
  padding: max(var(--s4), env(safe-area-inset-top)) var(--s4) max(var(--s4), env(safe-area-inset-bottom));
  background: var(--scrim);
}
.studio-page {
  width: min(100%, 560px); height: min(840px, 100%); min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; padding: var(--s2) var(--s4) var(--s5);
  border-radius: var(--r-panel); background: var(--canvas);
}
.studio-header {
  flex: none; display: grid; grid-template-columns: var(--target) minmax(0, 1fr) var(--target);
  align-items: center; gap: var(--s2); margin: 0 -6px var(--s2);
}
.studio-header .icon-button { color: var(--muted); }
.studio-header .icon-button:hover { color: var(--ink); background: var(--raised); }
.studio-header [data-close-studio] { grid-column: 3; }
.studio-header .sheet-brand { grid-column: 2; justify-self: center; font-size: var(--text-body); }
.photo-flow { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: var(--s4); }
.flow-heading { flex: none; display: grid; gap: var(--s2); font-size: var(--text-label); line-height: 1.4; }
.flow-heading h1 { font-size: inherit; font-weight: 800; overflow-wrap: anywhere; }
.flow-heading h1:focus { outline: none; }
.flow-step { color: var(--muted); font-weight: var(--weight-base); }
.flow-progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s1); }
.flow-progress > span { height: .375rem; border-radius: var(--r-full); background: var(--control); }
.flow-progress > .current { background: color-mix(in srgb, var(--accent) 64%, var(--canvas)); }
.flow-progress > .complete { background: var(--accent); }
.flow-body {
  display: flex; flex-direction: column; gap: var(--s4); flex: 1; min-height: 0;
  padding: 3px; margin-inline: -3px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.flow-frame {
  position: relative; flex: 1 0 clamp(130px, 26dvh, 220px); max-height: 420px;
  overflow: hidden; background: var(--overlay); border-radius: var(--r-photo);
}
.flow-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.flow-frame.is-selected img { object-fit: contain; object-position: center; }
.flow-frame figcaption {
  position: absolute; inset: auto 0 0; padding: var(--s3) var(--s4);
  color: var(--on-photo); background: linear-gradient(transparent, var(--scrim));
  font-size: var(--text-caption); font-weight: var(--weight-bold);
}
.flow-tips { flex: none; display: grid; gap: var(--s2); list-style: none; margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-photo); background: var(--surface); }
.flow-tips li { display: flex; align-items: start; gap: var(--s2); color: var(--muted); font-size: var(--text-label); line-height: 1.45; }
.flow-tips svg { width: 1rem; height: 1rem; margin-top: .125rem; color: var(--accent); }
.flow-panel { display: grid; flex: none; gap: var(--s2); min-width: 0; }
.flow-panel .notice { text-align: center; font-size: var(--text-small); }
.flow-draft-note { text-wrap: balance; }
.flow-panel > .outline { min-height: 48px; }
.flow-panel > .primary, .pick-file { min-height: 56px; font-size: var(--text-body); }
.flow-panel > .primary { border-radius: var(--r-panel); font-weight: 800; }
.saved-source {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3);
  min-height: 56px; padding: var(--s1) var(--s3) var(--s1) var(--s1); border-radius: var(--r-control);
  background: var(--raised); text-align: start; font-size: var(--text-label); font-weight: var(--weight-semi);
}
.saved-source:hover { background: var(--hover); }
.saved-source img { width: 2.5rem; height: 3rem; object-fit: cover; border-radius: var(--r-control); }
.saved-source svg { color: var(--muted); }
.pick-file {
  display: flex; align-items: center; justify-content: center; padding: var(--s2) var(--s4);
  border-radius: var(--r-control); font-weight: var(--weight-bold); cursor: pointer;
}
.pick-file:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.pick-file:has(input[aria-invalid="true"]) { outline: 2px solid var(--error); outline-offset: 2px; }
.pick-file:has(input:disabled) { opacity: .54; cursor: default; }
.review-photos { display: grid; gap: var(--s2); padding: 0; margin: 0; list-style: none; }
.review-photo {
  display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto auto; align-items: center; gap: var(--s2);
  padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface);
}
.review-photo img { width: 2.75rem; height: 2.75rem; object-fit: cover; border-radius: var(--s2); }
.review-photo strong { overflow-wrap: anywhere; font-size: var(--text-label); }
.review-photo button { padding-inline: var(--s2); }
.field { display: grid; align-content: start; gap: var(--s2); font-size: var(--text-label); font-weight: var(--weight-semi); }
.field input:not([type="file"]) {
  width: 100%; min-height: var(--target); padding: var(--s2) var(--s3);
  border: 1px solid var(--control); border-radius: var(--r-control); background: var(--canvas);
  font-size: var(--text-body); font-weight: var(--weight-base);
}
.field input[aria-invalid="true"] { border-color: var(--error); }
.field small { color: var(--muted); font-weight: var(--weight-base); }
.quiet { color: var(--muted); }
.notice, .error { font-size: var(--text-label); color: var(--muted); }
.provider-status, .error { padding: var(--s3); border-radius: var(--r-control); }
.provider-status { background: var(--raised); }
.error { color: var(--error); background: var(--error-wash); }
.empty { max-width: 41rem; padding-block: var(--s4) var(--s6); }
.empty h2 { font-size: var(--text-title); line-height: 1.3; }
.empty p { color: var(--muted); max-width: 54ch; margin-top: var(--s2); }
.empty .primary, .empty .outline { margin-top: var(--s4); }
.favorites-empty, .gallery-guest {
  display: grid; justify-items: center; gap: var(--s4);
  width: min(100%, 34rem); margin-inline: auto; padding-block: var(--s5);
  text-align: center;
}
.favorites-empty h2, .gallery-guest h2 {
  font-size: var(--text-title); font-weight: 800; line-height: 1.2; text-wrap: balance;
}
.favorites-preview { width: 100%; }
.photo-sticker {
  position: absolute; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  padding: var(--s1) var(--s2); border: 2px solid var(--overlay); border-radius: var(--r-control);
  background: var(--accent); color: var(--on-accent); box-shadow: 2px 3px 0 var(--overlay), 2px 3px 0 2px var(--ink);
  font-family: var(--font-rubik); font-size: var(--text-small); font-weight: 800; line-height: 1.2;
  pointer-events: none;
}
.search-empty { display: grid; justify-items: start; gap: var(--s3); padding-block: var(--s2); }
.gallery-guest { max-width: 24rem; }
.gallery-guest-photos {
  position: relative; display: flex; justify-content: center; align-items: center; width: min(100%, 16rem); padding-block: var(--s3);
}
.gallery-guest-photos img {
  width: 46%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border: 2px solid var(--ink);
  border-radius: var(--r-photo); background: var(--raised);
}
.gallery-guest-photos img:first-child { rotate: -9deg; }
.gallery-guest-photos img:nth-child(2) { margin-inline-start: -8%; rotate: 8deg; }
.gallery-guest-photos .photo-sticker { inset: auto var(--s2) var(--s1) auto; padding: var(--s2); rotate: -9deg; }
.gallery-guest .primary { min-width: 12.5rem; }
.favorites-examples {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  width: 100%; gap: var(--s2); text-align: start;
}
.favorite-example {
  display: block; min-width: 0; aspect-ratio: 4 / 5; padding: 0; overflow: hidden;
  border: 0; border-radius: var(--r-photo); background: var(--raised);
}
.favorite-example img { width: 100%; height: 100%; object-fit: cover; object-position: center 36%; }
.favorite-example:hover img { opacity: .9; }
@media (min-width: 700px) {
  .favorites-examples { gap: var(--s3); }
}
.job-row, .account-row {
  display: grid;
  align-items: center; justify-items: start; gap: var(--s3); min-height: var(--target);
  padding: var(--s3); text-align: start; overflow-wrap: anywhere;
  border: 0; border-radius: var(--r-control); background: transparent;
  font-size: var(--text-label); font-weight: var(--weight-semi);
}
.job-row:hover, :is(a, button).account-row:hover { background: var(--raised); }
.job-row small, .job-row svg, .account-row svg, .account-row small { color: var(--muted); }
.account-row { grid-template-columns: var(--s6) minmax(0, 1fr) auto auto; }
.account-row img { width: var(--s6); height: var(--s6); border-radius: var(--r-control); object-fit: cover; }
.account-row > :first-child { justify-self: center; }
.account-row > svg:last-child { grid-column: 4; }
.account-row-text, .job-row > span { display: grid; gap: var(--s1); line-height: 1.3; }
.account-row-text strong, .job-row > span strong { font-weight: var(--weight-semi); }
.account-row small, .job-row small { font-size: var(--text-small); font-weight: var(--weight-base); }
.account-provider-status { grid-column: 3 / -1; text-align: end; }
.personal-page { width: min(100%, 42rem); margin-inline: auto; }
.wallet-page { max-width: 32rem; }
.wallet { display: grid; gap: var(--s3); }
.wallet-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); padding: var(--s1);
  border-radius: var(--r-photo); background: var(--surface); margin-bottom: var(--s1);
}
.wallet-tabs button {
  min-height: var(--target); padding: var(--s1) var(--s2); border: 0; border-radius: var(--r-control);
  background: transparent; color: var(--muted); font-size: var(--text-label); font-weight: var(--weight-semi);
}
.wallet-tabs button:hover { color: var(--ink); background: var(--hover); }
.wallet-tabs button[aria-pressed="true"] { color: var(--ink); background: var(--raised); }
.wallet-options { display: grid; gap: var(--s2); }
.wallet-offer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name price" "count price";
  align-items: center; gap: var(--s1) var(--s3); padding: var(--s3) var(--s4);
  border: 1px solid var(--line); border-radius: var(--r-photo); background: var(--surface);
  text-align: start; font-variant-numeric: tabular-nums;
}
.wallet-offer-pack { grid-template-areas: "count price"; min-height: 3.75rem; }
.wallet-offer:hover { background: var(--raised); }
.wallet-offer[aria-pressed="true"] { border-color: var(--accent); }
.wallet-offer[aria-pressed="true"] .wallet-count { color: var(--accent); }
.wallet-offer:focus-visible { outline-color: var(--ink); outline-offset: -1px; }
.wallet-offer-name { grid-area: name; color: var(--muted); font-size: var(--text-label); font-weight: var(--weight-semi); }
.wallet-count {
  grid-area: count; font-family: var(--font-rubik); font-size: clamp(1.25rem, 5vw, 1.625rem);
  font-weight: var(--weight-medium); line-height: var(--leading-title); letter-spacing: -.025em;
}
.wallet-price { grid-area: price; text-align: end; font-size: var(--text-body); font-weight: var(--weight-bold); }
.wallet-continue { min-height: var(--s7); }
@media (min-width: 700px) {
  .wallet-page { max-width: 38rem; }
  .wallet-options { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--s3); }
  .wallet-offer { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "count" "price"; gap: var(--s2); padding: var(--s4); }
  .wallet-offer-pack { grid-template-areas: "count" "price"; }
  .wallet-price { text-align: start; }
  .wallet-continue { min-width: 11rem; justify-self: end; }
}
.wallet-current-heading {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
}
.wallet-action {
  display: block; width: 100%; min-height: var(--target); padding: var(--s2) var(--s3);
  border: 0; border-radius: var(--r-control); background: var(--accent); color: var(--on-accent);
  font-size: var(--text-label); font-weight: var(--weight-bold);
}
.wallet-action:hover { background: var(--accent-hover); }
.wallet-full { width: 100%; }
.wallet-currency { display: flex; align-items: center; justify-content: end; gap: var(--s2); color: var(--muted); font-size: var(--text-label); }
.wallet-current {
  display: grid; gap: var(--s3); padding: var(--s4);
  border: 1px solid var(--line); border-radius: var(--r-photo); background: var(--surface);
}
.wallet-current.is-selected { border-color: var(--accent); }
.wallet-current-heading h2 { font-size: var(--text-title); }
.wallet-current-heading span {
  padding: var(--s1) var(--s2); border-radius: var(--r-full); background: var(--raised);
  font-size: var(--text-small); font-weight: var(--weight-semi); text-align: center;
}
.wallet-quota { margin-top: var(--s2); }
.wallet-quota strong { font-size: var(--text-number); line-height: 1; }
.wallet-quota-date, .wallet-example { color: var(--muted); font-size: var(--text-small); }
.wallet-current progress { width: 100%; height: var(--s2); border: 0; border-radius: var(--r-full); background: var(--hover); overflow: hidden; }
.wallet-current progress::-webkit-progress-bar { background: transparent; }
.wallet-current progress::-webkit-progress-value { background: var(--accent); border-radius: var(--r-full); }
.wallet-current progress::-moz-progress-bar { background: var(--accent); }
.wallet-renewal, .wallet-summary { display: grid; gap: var(--s2); margin: 0; }
.wallet-renewal div, .wallet-summary div { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--text-label); }
.wallet-renewal dd, .wallet-summary dd { margin: 0; font-weight: var(--weight-semi); text-align: end; }
.wallet-renewal { padding-top: var(--s2); border-top: 1px solid currentColor; }
.wallet-sheet { display: grid; gap: var(--s3); }
.wallet-sheet .quiet { margin-top: 0; font-size: var(--text-label); }
.wallet-summary { padding: var(--s3); border-radius: var(--r-photo); background: var(--raised); }
.wallet-summary dt { color: var(--muted); }
dialog:has(.wallet-sheet) { width: min(calc(100% - var(--s6)), 30rem); }
dialog:has(.bonus-sheet, .auth-content) {
  --sheet-inset: var(--s5);
  width: min(calc(100% - var(--s6)), 27rem); padding: var(--sheet-inset);
}
dialog:has(.bonus-sheet, .auth-content) > .close { top: var(--sheet-inset); right: var(--sheet-inset); }
dialog:has(.bonus-sheet, .auth-content)::backdrop { background: color-mix(in srgb, var(--overlay) 66%, transparent); }
@media (max-width: 560px) {
  dialog:has(.wallet-sheet, .bonus-sheet) {
    inset: auto 0 0; width: 100%; max-width: none; margin: 0;
    padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom));
    border-radius: var(--r-panel) var(--r-panel) 0 0;
  }
  dialog:has(.bonus-sheet, .auth-content) { --sheet-inset: var(--s4); }
}
.subscription-grid { display: grid; gap: var(--s3); margin-top: var(--s4); }
.subscription-card { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
.subscription-card h2 { font-size: var(--text-title); line-height: var(--leading-title); }
.subscription-card h3 { margin: 0; font-size: var(--text-body); }
.subscription-card button { margin-top: var(--s3); }
.wallet-currency select, .payment-method select { min-height: var(--target); padding: var(--s2) var(--s3); border: 1px solid var(--control); border-radius: var(--r-control); background: var(--surface); }
.payment-section summary {
  width: fit-content; min-height: var(--target); padding-block: var(--s2); cursor: pointer;
  color: var(--muted); font-size: var(--text-label);
}
.payment-history { list-style: none; display: grid; gap: var(--s2); margin: var(--s3) 0 0; padding: 0; }
.payment-history li { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); padding: var(--s3); border-radius: var(--r-control); background: var(--surface); }
.payment-history .quiet { font-size: var(--text-small); }
.payment-actions { display: flex; flex-wrap: wrap; gap: var(--s1); }
.subscription-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s1) var(--s2); margin-block: var(--s3); }
.subscription-price strong { color: var(--accent); font-size: var(--text-display); line-height: 1.15; }
.subscription-price span, .subscription-card .quiet { color: var(--muted); font-size: var(--text-small); }
.subscription-card .quiet { margin-top: var(--s1); }
@media (min-width: 640px) { .subscription-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.personal-page .search-heading { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.personal-page .search-heading h1 { max-width: 15ch; }
.personal-page .back-link svg { width: 1rem; }
.section-state {
  display: grid; justify-items: center; gap: var(--s2); width: min(100%, 30rem); margin-inline: auto;
  padding: clamp(2rem, 8vh, 4.5rem) var(--s4); text-align: center;
}
.section-state h2 { font-size: var(--text-title); line-height: 1.2; font-weight: var(--weight-bold); text-wrap: balance; }
.section-state p, .section-description { color: var(--muted); font-size: var(--text-label); }
.section-state p { max-width: 36ch; }
.section-state :is(.primary, .outline) { margin-top: var(--s2); }
.page-loading { display: flex; align-items: center; gap: var(--s2); color: var(--muted); padding: var(--s4) 0; font-size: var(--text-label); }
.page-loading > span { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }
.activity-error { display: grid; justify-items: start; gap: var(--s2); color: var(--muted); font-size: var(--text-label); }
.gallery-page { width: min(100%, 68rem); }
.gallery-starter {
  display: grid; align-items: center; gap: var(--s5); padding: clamp(1rem, 3vw, 2rem);
  border-radius: var(--r-panel); background: var(--surface);
}
.gallery-starter:not(.has-examples) { max-width: 32rem; margin-inline: auto; }
.gallery-intro { min-width: 0; }
.gallery-intro h2 { max-width: 17ch; font-size: var(--text-display); line-height: var(--leading-title); letter-spacing: -.025em; }
.gallery-intro p { max-width: 32ch; color: var(--muted); margin-top: var(--s3); }
.gallery-intro .primary { margin-top: var(--s4); }
.gallery-examples { min-width: 0; }
.gallery-examples > p { margin-bottom: var(--s2); font-size: var(--text-small); color: var(--muted); }
.gallery-example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.gallery-example {
  display: grid; grid-template-rows: auto 1fr; gap: var(--s2); align-items: start; min-width: 0;
  padding: 0 0 var(--s1); text-align: start; border: 0; background: transparent; border-radius: var(--r-control);
}
.gallery-example img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-control); background: var(--raised); }
.gallery-example span { font-size: var(--text-small); line-height: 1.3; overflow-wrap: anywhere; }
.gallery-example:hover span { text-decoration: underline; text-underline-offset: .18em; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s4); }
.section-heading h2, .gallery-jobs h2 { font-size: var(--text-title); line-height: 1.25; font-weight: var(--weight-semi); }
.section-heading .outline { flex: none; }
.gallery-jobs { margin-bottom: var(--s5); }
.gallery-jobs h2 { margin-bottom: var(--s2); }
.job-activity { display: grid; gap: var(--s1); max-width: 39rem; padding: var(--s2); background: var(--surface); border-radius: var(--r-photo); }
.job-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.gallery-load-error { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s4); color: var(--muted); }
.profile-page {
  --profile-button-radius: 1.125rem;
  width: min(100%, 38rem); margin-inline: auto;
  padding-top: calc(env(safe-area-inset-top) + .875rem);
  display: grid; align-items: start; gap: var(--s5);
}
.profile-heading {
  display: grid; grid-template-columns: minmax(var(--target), 1fr) auto minmax(max-content, 1fr);
  align-items: center; gap: var(--s3);
}
.profile-heading .header-mark { justify-self: start; }
.profile-heading h1 { font-size: var(--text-heading); text-align: center; line-height: 1.1; letter-spacing: -.03em; }
.profile-heading-actions { display: flex; align-items: center; gap: var(--s2); justify-self: end; }
.profile-notifications { position: relative; border-radius: var(--r-full); background: var(--surface); }
.profile-notifications .notice-count {
  position: absolute; inset: -2px -2px auto auto; min-width: 1.25rem; min-height: 1.25rem; padding-inline: var(--s1);
  display: grid; place-items: center; border: 2px solid var(--canvas); border-radius: var(--r-full);
  background: var(--accent); color: var(--on-accent); font-size: var(--text-caption); font-weight: var(--weight-bold); line-height: 1;
}
.profile-avatar {
  position: relative; display: grid; place-items: center;
  width: 3.25rem; height: 3.25rem; padding: 0; border: 0; border-radius: var(--r-full); background: var(--raised);
}
.profile-avatar:hover { background: var(--hover); }
.avatar-art {
  display: block; width: 100%; height: 100%; border-radius: inherit; overflow: hidden;
}
.avatar-edit, .avatar-check {
  position: absolute; display: grid; place-items: center; border-radius: var(--r-full);
  background: var(--accent); color: var(--on-accent); pointer-events: none;
}
.avatar-edit { inset: auto -2px -2px auto; width: 1.25rem; height: 1.25rem; border: 2px solid var(--canvas); }
.avatar-edit svg, .avatar-check svg { width: .75rem; height: .75rem; }
.profile-overview { min-width: 0; display: grid; gap: var(--s4); }
.photo-allowance {
  display: grid; gap: var(--s3); padding: clamp(var(--s4), 4vw, var(--s5));
  border-radius: var(--r-panel); background: var(--surface);
}
.profile-balance-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); }
.photo-allowance h2 { color: var(--muted); font-size: var(--text-label); font-weight: var(--weight-semi); }
.profile-balance { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); }
.profile-balance:hover strong { color: var(--accent); }
.profile-balance strong {
  color: var(--accent); font-size: clamp(2.75rem, 9vw, 3.5rem); line-height: 1;
  letter-spacing: -.045em; font-variant-numeric: tabular-nums;
}
.profile-balance span { font-size: var(--text-heading); font-weight: var(--weight-semi); }
.profile-topup { flex: none; margin-inline-start: auto; white-space: nowrap; }
.allowance-summary {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s4);
  margin: 0; padding: var(--s3) 0 var(--s1); border-top: 1px solid var(--line); font-size: var(--text-small);
}
.allowance-summary dt { color: var(--muted); }
.allowance-summary dd { margin: var(--s1) 0 0; font-size: var(--text-body); font-variant-numeric: tabular-nums; font-weight: var(--weight-bold); }
.profile-invitations { display: grid; gap: var(--s3); }
.profile-invite {
  --invite-reward-width: 7rem;
  position: relative; display: grid; grid-template-columns: var(--invite-reward-width) minmax(0, 1fr);
  border-radius: var(--r-panel); background: var(--surface); overflow: hidden;
}
.profile-invite::before, .profile-invite::after {
  content: ''; position: absolute; inset-inline-start: calc(var(--invite-reward-width) - var(--s2));
  width: var(--s4); height: var(--s4); border-radius: 50%; background: var(--canvas); pointer-events: none;
}
.profile-invite::before { top: calc(-1 * var(--s2)); }
.profile-invite::after { bottom: calc(-1 * var(--s2)); }
.invite-reward {
  display: grid; place-content: center; gap: var(--s1); padding: var(--s4) var(--s2);
  background: var(--accent); color: var(--on-accent); border-inline-end: 2px dashed currentColor; text-align: center;
}
.invite-reward strong { font-size: 2.375rem; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.invite-reward span { font-size: var(--text-caption); font-weight: var(--weight-semi); }
.invite-body { display: grid; align-content: center; gap: var(--s3); padding: var(--s4); min-width: 0; }
.invite-body h2 { font-size: var(--text-body); line-height: 1.2; text-wrap: balance; }
.invite-actions { display: flex; gap: var(--s2); }
.invite-copy, .invite-share {
  display: flex; align-items: center; justify-content: center; gap: var(--s1); min-height: var(--target);
  padding: var(--s1) var(--s2); border: 0; font-size: var(--text-label); font-weight: var(--weight-bold);
}
.invite-copy {
  flex: 1; min-width: 0;
  border-radius: var(--r-control); background: var(--raised);
}
.invite-copy:not(:disabled):hover { background: var(--hover); }
.invite-share { flex: 0 0 var(--target); padding: 0; border-radius: var(--r-control); background: var(--raised); }
.invite-share:not(:disabled):hover { background: var(--hover); }
.profile-invitations input { min-width: 0; }
.invite-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: 0; }
.invite-stats div { padding: var(--s3) var(--s4); border-radius: var(--r-photo); background: var(--surface); }
.invite-stats dt, .invite-body .quiet { color: var(--muted); font-size: var(--text-small); }
.invite-stats dd { margin: var(--s1) 0 0; font-size: var(--text-title); font-weight: var(--weight-bold); }
@media (max-width: 380px) {
  .profile-invite { --invite-reward-width: 5.75rem; }
  .invite-reward strong { font-size: 2rem; }
  .invite-body { padding: var(--s3); }
}
.profile-settings { display: grid; gap: var(--s2); min-width: 0; }
.profile-socials { display: grid; gap: var(--s2); }
.profile-socials h2 { font-size: var(--text-label); font-weight: var(--weight-semi); }
.profile-socials ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); padding: 0; margin: 0; list-style: none; }
.profile-socials li > * {
  display: grid; place-items: center; gap: var(--s1); min-height: var(--target); padding: var(--s2) var(--s1);
  border-radius: var(--r-control); background: var(--surface); font-size: var(--text-small); font-weight: var(--weight-semi);
}
.profile-socials a:hover { background: var(--hover); }
.profile-socials a svg { color: var(--accent); }
.profile-socials .social-unavailable, .profile-socials p { color: var(--muted); }
.profile-socials p { font-size: var(--text-small); }
.profile-settings h2 { padding-inline: var(--s1); color: var(--muted); font-size: var(--text-small); }
.profile-menu { display: grid; gap: var(--s2); }
.profile-menu .account-row {
  grid-template-columns: var(--s5) minmax(0, 1fr) auto auto; gap: var(--s3); min-height: var(--s7);
  padding: var(--s2) var(--s4); background: var(--raised); border-radius: var(--profile-button-radius);
  font-size: var(--text-body); font-weight: var(--weight-bold);
}
.profile-menu .account-row:hover { background: var(--hover); }
.profile-menu .account-row > svg:first-child { width: 1.375rem; height: 1.375rem; color: currentColor; }
.personal-menu, .notification-list { background: var(--surface); border-radius: var(--r-photo); }
.account-section h2, .account-identity h2 { font-size: var(--text-body); font-weight: var(--weight-semi); }
.personal-menu { display: grid; gap: var(--s1); padding: var(--s2); }
.personal-menu .account-row { min-height: var(--s7); }
.account-identity, .account-section { margin-bottom: var(--s5); }
.account-identity p { margin-top: var(--s1); color: var(--muted); overflow-wrap: anywhere; }
.account-section h2 { margin-bottom: var(--s2); }
.account-section :is(.error, .section-description) { margin-top: var(--s2); }
.bonus-sheet { display: grid; gap: var(--s2); }
.bonus-sheet > h2 { display: flex; align-items: center; min-height: var(--target); padding-top: 0; }
.bonus-content, .bonus-guest { display: grid; gap: var(--s4); }
.bonus-reward { display: grid; justify-items: start; gap: var(--s1); }
.bonus-today { color: var(--muted); font-size: var(--text-label); }
.bonus-amount { display: flex; align-items: baseline; gap: var(--s2); }
.bonus-amount strong {
  color: var(--accent); font-size: clamp(2.5rem, 10vw, 3.25rem); line-height: 1;
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.bonus-amount span { font-size: var(--text-heading); font-weight: var(--weight-semi); }
.bonus-progress { border-top: 1px solid var(--line); padding-top: var(--s3); }
.bonus-progress-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s2); }
.bonus-progress-heading h3 { margin: 0; font-size: var(--text-label); font-weight: var(--weight-bold); }
.bonus-progress-heading p { color: var(--muted); font-size: var(--text-small); }
.bonus-progress-heading strong { margin-inline-start: var(--s1); color: var(--accent); }
.bonus-progress > p { margin-top: var(--s2); color: var(--muted); font-size: var(--text-small); }
.bonus-days {
  position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none; padding: 0; margin: var(--s3) 0 0;
}
.bonus-days::before { content: ''; position: absolute; z-index: -1; inset: 50% calc(100% / 14) auto; height: 1px; background: var(--line); }
.bonus-day { display: grid; place-items: center; }
.bonus-step {
  display: grid; place-items: center; width: min(var(--s6), 100%); aspect-ratio: 1;
  border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface);
  color: var(--muted); font-size: var(--text-small); font-weight: var(--weight-semi); font-variant-numeric: tabular-nums;
}
.bonus-step svg { width: .875rem; height: .875rem; }
.bonus-day:last-child .bonus-step, .bonus-day[data-earned] .bonus-step { background: var(--accent-wash); color: var(--accent); }
.bonus-day[aria-current="step"] .bonus-step { border-color: var(--accent); color: var(--accent); font-weight: var(--weight-bold); }
.bonus-footer { display: grid; gap: var(--s2); }
.bonus-footer .primary { min-height: var(--s7); }
.bonus-footer .error { margin-top: 0; }
.bonus-next p { font-weight: var(--weight-semi); font-size: var(--text-label); }
.bonus-next small { display: block; margin-top: var(--s1); color: var(--muted); font-size: var(--text-small); }
.notification-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.notification-tools p { font-size: var(--text-small); color: var(--muted); }
.notification-tools .subtle-button { color: var(--accent); }
.notification-group { margin-bottom: var(--s4); }
.notification-group h2 { font-size: var(--text-label); font-weight: var(--weight-semi); margin-bottom: var(--s2); }
.notification-list { list-style: none; padding: var(--s2); margin: 0; display: grid; gap: var(--s1); }
.notification-row {
  display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: var(--s7);
  text-align: start; padding: var(--s3); border: 0; border-radius: var(--r-control); background: transparent;
}
button.notification-row:hover { background: var(--raised); }
.notification-row > svg, .notification-content > span { color: var(--muted); }
.notification-row[data-unread] > svg:first-child { color: var(--accent); }
.notification-content { display: grid; flex: 1; min-width: 0; font-size: var(--text-label); overflow-wrap: anywhere; }
.notification-row time { color: var(--muted); font-size: var(--text-small); white-space: nowrap; }
.unread-dot { flex: none; width: .4375rem; height: .4375rem; border-radius: 50%; background: var(--accent); }
.result-status { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); font-weight: var(--weight-medium); }
.result-status svg { color: var(--accent); }
.auth-content { display: grid; gap: var(--s4); }
.auth-heading { display: grid; justify-items: center; gap: var(--s2); text-align: center; }
dialog .auth-heading h2 {
  min-height: 0; padding: 0; font-family: var(--font-rubik); font-weight: var(--weight-medium);
  line-height: var(--leading-title); text-wrap: balance;
}
.auth-heading h2:focus { outline: none; }
.auth-heading .brand { min-height: var(--s6); margin-inline: var(--target); font-size: var(--text-body); }
.auth-content > .notice { text-align: center; }
dialog .auth-content :is(.notice, .error) { margin-top: 0; }
.auth-content .primary { min-height: var(--s7); border-radius: var(--r-panel); font-size: var(--text-body); }
.auth-privacy {
  color: var(--muted); font-size: var(--text-small); line-height: 1.45; text-align: center; text-wrap: balance;
}
.auth-content form { margin-top: 0; gap: var(--s3); }
.auth-heading .notice strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.auth-stub-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1) var(--s4); }
[data-oauth] svg:first-child { width: 1.375rem; height: 1.375rem; }
dialog {
  width: min(calc(100% - var(--s6)), 35rem); max-height: calc(100dvh - var(--s6)); overflow: auto;
  padding: var(--s4) var(--s4) var(--s5); border: 0; border-radius: var(--r-panel);
  color: var(--ink); background: var(--surface); box-shadow: var(--shadow);
}
dialog::backdrop { background: var(--scrim); }
dialog.result-dialog {
  width: min(calc(100% - var(--s4)), 54rem);
  max-height: calc(100dvh - var(--s4));
  padding: var(--s3);
  background: var(--canvas);
}
dialog.result-dialog[open] { display: flex; flex-direction: column; gap: var(--s3); }
.result-header { display: flex; align-items: center; justify-content: space-between; padding-right: var(--target); }
dialog .result-header h2 { min-height: 0; padding: 0 var(--s2) 0 0; font-size: var(--text-body); font-weight: var(--weight-semi); }
.result-delete { flex: none; color: var(--muted); }
.result-image { display: grid; place-items: center; min-height: 0; background: var(--overlay); border-radius: var(--r-photo); overflow: hidden; }
.result-image img { width: 100%; max-height: min(72dvh, 60rem); object-fit: contain; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.result-actions > :is(.primary, .outline) { min-width: 0; }
.result-actions > .primary { flex: 1 1 auto; max-width: 18rem; }
.result-share { background: var(--raised); }
dialog.result-dialog .error { margin-top: 0; }
@media (max-width: 560px) {
  dialog.result-dialog {
    inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0;
    padding-bottom: max(var(--s3), env(safe-area-inset-bottom));
  }
  .result-image { flex: 1; background: transparent; grid-template-rows: minmax(0, 1fr); }
  .result-image img { height: 100%; max-height: none; }
  .result-actions > :is(.primary, .outline) { padding-inline: var(--s2); }
}
dialog .close { position: absolute; right: var(--s3); top: var(--s3); z-index: 1; }
dialog h2 { min-height: var(--target); padding: var(--s2) var(--s7) 0 0; font-size: var(--text-title); line-height: 1.25; overflow-wrap: anywhere; }
dialog form { display: grid; gap: var(--s4); margin-top: var(--s4); }
dialog .quiet, dialog .error, dialog .notice { margin-top: var(--s2); }
dialog:has(#avatar-form) { width: min(calc(100% - var(--s6)), 27.5rem); }
dialog[open]:has(#avatar-form) { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
#avatar-form { grid-template-rows: minmax(0, 1fr) auto; min-height: 0; gap: var(--s3); margin-top: var(--s2); }
.avatar-body {
  display: grid; align-content: start; gap: var(--s3); min-height: 0; overflow: auto; scrollbar-width: thin;
  padding: var(--s1); margin: 0 calc(-1 * var(--s1));
}
.avatar-preview { display: flex; align-items: center; gap: var(--s3); font-weight: var(--weight-bold); }
.avatar-preview-art {
  display: grid; place-items: center; flex: none; width: 4rem; height: 4rem;
  border-radius: var(--r-control); background: var(--raised);
}
.avatar-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2);
  min-width: 0; margin: 0; padding: 0; border: 0;
}
.avatar-grid:disabled { opacity: .6; }
.avatar-option { position: relative; min-width: 0; }
.avatar-radio { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.avatar-radio:disabled { cursor: default; }
.avatar-tile {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; min-height: var(--target);
  border: 2px solid transparent; border-radius: var(--r-control); background: var(--raised); pointer-events: none;
}
.avatar-radio:checked + .avatar-tile { border-color: var(--accent); }
.avatar-radio:focus-visible + .avatar-tile { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar-check { display: none; inset: auto 2px 2px auto; width: 1rem; height: 1rem; }
.avatar-radio:checked + .avatar-tile .avatar-check { display: grid; }
.avatar-random, .avatar-save { width: 100%; }
@media (hover: hover) { .avatar-radio:hover:not(:disabled) + .avatar-tile { background: var(--hover); } }
@media (min-width: 600px) and (max-height: 500px) {
  dialog:has(#avatar-form) { width: min(calc(100% - var(--s6)), 40rem); }
  .avatar-body { grid-template-columns: 6rem minmax(0, 1fr); }
  .avatar-preview { grid-row: span 2; align-self: start; flex-direction: column; align-items: flex-start; }
  .avatar-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .avatar-body .error { grid-column: 2; }
}
dialog > .subtle-button { margin-top: var(--s3); }
.dialog-image { width: 100%; max-height: 56vh; object-fit: contain; background: var(--overlay); margin: var(--s3) 0; border-radius: var(--r-photo); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.toast {
  position: fixed; right: var(--s4); bottom: var(--mobile-nav-space); z-index: 4; max-width: min(25rem, 90vw); padding: var(--s3) var(--s4);
  color: var(--ink); background: var(--raised); border: 1px solid var(--control); border-radius: var(--r-control); box-shadow: var(--shadow);
}

@media (min-width: 700px) {
  .wall { --columns: 3; }
  .topic-row { grid-auto-columns: calc((100% - 3 * var(--s2)) / 3.15); }
  .gallery-starter.has-examples { grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); }
}
@media (min-width: 1024px) {
  :root { --rail-space: 112px; --gutter: 32px; --header-height: 76px; --text-heading: 1.25rem; --mobile-nav-space: 40px; }
  .masthead { padding-top: 0; }
  .masthead-inner, .search-heading { min-height: var(--header-height); }
  .nav {
    inset: 50% auto auto 16px; translate: 0 -50%; width: 96px;
    grid-template-columns: 1fr; gap: var(--s2); padding: var(--s2);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel);
  }
  .nav a, .nav-account { min-height: 68px; }
  body[data-route="profile"] main { padding-inline-start: var(--s5); }
  .profile-page:has(.profile-overview) { width: min(100%, 72.5rem); grid-template-columns: 22.5rem minmax(0, 1fr); gap: var(--s6); }
  .profile-page { padding-top: 2.5rem; }
  .profile-overview { position: sticky; top: 2.5rem; }
  .profile-settings { margin-top: var(--s6); }
  .photo-reel-row { grid-auto-columns: clamp(10rem, 15%, 13.5rem); gap: var(--s3); }
  .topic-row { grid-auto-columns: calc((100% - 4 * var(--s3)) / 4.18); gap: var(--s3); }
  .wall { --wall-gap: var(--s3); }
  .style-detail, .studio-backdrop {
    --picture-width: min(42vw, calc((100dvh - 48px) * (var(--image-ratio, 3 / 4))));
  }
  .preview-stage {
    inset: 50% auto auto 50%; translate: -50% -50%;
    width: var(--picture-width); aspect-ratio: var(--image-ratio, 3 / 4);
    max-height: calc(100dvh - 48px); border-radius: var(--r-panel);
  }
  .style-detail::after { display: none; }
  .preview-tools { inset: 50% auto auto calc(50% - var(--picture-width) / 2 - 64px); translate: 0 -50%; }
  .preview-info {
    inset: 50% auto auto calc(50% + var(--picture-width) / 2 + 24px);
    width: min(320px, 50vw - var(--picture-width) / 2 - 36px); translate: 0 -50%;
  }
  .wide-preview { --picture-width: min(70vw, calc((100dvh - 148px) * (var(--image-ratio, 4 / 3)))); }
  .wide-preview .preview-stage { top: calc(50% - 45px); max-height: calc(100dvh - 148px); }
  .wide-preview .preview-tools { left: calc(50% + var(--picture-width) / 2 + 12px); }
  .wide-preview .preview-info {
    inset: auto auto 22px calc(50% - var(--picture-width) / 2); width: min(320px, var(--picture-width)); translate: none;
  }
}
@media (min-width: 1100px) { .wall { --columns: 4; } }
@media (min-width: 1360px) {
  .wall { --columns: 5; }
  .topic-row { grid-auto-columns: calc((100% - 5 * var(--s3)) / 5.18); }
}
@media (min-width: 1720px) { .wall { --columns: 6; } }
@media (min-width: 1024px) { .gallery-wall { --columns: 4; } }
@media (max-width: 1023px) { .shelf-controls { display: none; } }
@media (max-width: 699px) {
  .topic-row { grid-auto-columns: calc((100% - 2 * var(--s2)) / 2.15); }
  .card-text { padding-inline: var(--s2); }
  .studio-page { padding-bottom: var(--s4); }
  .search-heading .back-link { padding-inline: var(--s2); }
  .personal-page .back-link { width: var(--target); }
  .personal-page .back-link span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .dialog-actions > :is(.primary, .danger) { flex: 1 1 100%; }
}
@media (max-width: 390px) {
  .header-actions .header-bonus:not([hidden]) + .header-account { width: var(--target); padding-inline: 0; }
  .header-bonus:not([hidden]) + .header-account span { display: none; }
}
@media (max-width: 360px) {
  .nav, .nav-account { gap: 2px; }
  .nav a, .nav-account { font-size: .6875rem; }
  .job-row { gap: var(--s2); }
  .job-row > svg:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.photo-feedback { display: grid; gap: var(--s2); justify-items: start; padding-top: var(--s3); border-top: 1px solid var(--line); }
.photo-feedback fieldset { display: flex; flex-wrap: wrap; gap: var(--s3); border: 0; padding: 0; }
.photo-feedback legend { padding: 0 0 var(--s2); font-weight: var(--weight-semi); }
.photo-feedback input[type="radio"] { accent-color: var(--accent); }
.photo-feedback .field { width: 100%; }
.photo-feedback [role="status"]:empty { display: none; }

.reel-featured {
  position: absolute; inset: auto var(--s2) var(--s2); justify-self: start;
  padding: var(--s1) var(--s2); border-radius: var(--r-control); color: var(--on-photo);
  background: var(--scrim); font-size: var(--text-small); font-weight: var(--weight-semi);
}
.support-area, .support-form { display: grid; gap: var(--s3); align-content: start; justify-items: start; }
.support-form { width: min(100%, 38rem); }
.support-area > section, .support-form .field { width: 100%; }
.support-form textarea {
  width: 100%; padding: var(--s2) var(--s3); color: var(--ink); background: var(--surface);
  border: 1px solid var(--control); border-radius: var(--r-control); font: inherit; resize: vertical;
}
.support-list, .support-messages { width: min(100%, 48rem); list-style: none; margin: 0; padding: 0; }
.support-list a, .support-messages li { display: grid; gap: var(--s1); padding-block: var(--s3); border-top: 1px solid var(--line); }
.support-list small, .support-messages time { color: var(--muted); font-size: var(--text-small); }
.support-messages header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); }
.support-messages p { white-space: pre-wrap; overflow-wrap: anywhere; }
.support-messages a { width: fit-content; color: var(--accent); }

.privacy-footer { display: flex; padding-block: var(--s4) var(--s5); }
.privacy-footer .subtle-button { padding-inline: var(--s2); }
.privacy-banner {
  position: fixed; z-index: 8; inset-inline-end: var(--gutter); bottom: calc(var(--mobile-nav-space) + var(--s2));
  width: min(28rem, calc(100% - 2 * var(--gutter)));
  display: grid; gap: var(--s2); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-photo);
  background: var(--surface); box-shadow: var(--shadow);
}
.privacy-banner h2, .privacy-page h2 { font-size: var(--text-heading); }
.privacy-banner p { color: var(--muted); font-size: var(--text-label); }
.privacy-banner a, .privacy-page section a, .auth-privacy a { text-decoration: underline; text-underline-offset: .15em; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: var(--s2); padding-top: var(--s1); }
.privacy-page section { display: grid; gap: var(--s2); max-width: 62ch; padding-block: var(--s3); }
