:root {
  --paper: #f7f5ef;
  --paper-deep: #efebe2;
  --card: #fffefa;
  --ink: #233129;
  --muted: #69746d;
  --line: #dedfd8;
  --sage: #315c4b;
  --sage-dark: #24483a;
  --sage-soft: #dfe9e2;
  --clay: #a45e4d;
  --gold: #b58a42;
  --blue: #607b8b;
  --danger: #9e433a;
  --shadow-sm: 0 8px 24px rgba(35, 49, 41, .07);
  --shadow-lg: 0 28px 70px rgba(25, 38, 31, .18);
  --radius: 18px;
  --radius-lg: 28px;
  --shell: 1180px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); }
body, button, input, textarea, select { font: inherit; }
button, input, textarea, select { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.035em; }
h1 { font-size: clamp(2.35rem, 6vw, 4.6rem); line-height: .98; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.08; }
h3 { font-size: 1.1rem; }
p { color: var(--muted); line-height: 1.65; }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.main-content { padding-block: 52px 100px; }
.main-wide { padding-bottom: 100px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 999; padding: 10px 14px; background: #fff; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 40; background: rgba(247,245,239,.88); border-bottom: 1px solid rgba(80,91,84,.1); backdrop-filter: blur(18px); }
.header-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand, .auth-brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -.03em; font-size: 1.15rem; }
.logo-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: white; flex: none; }
.logo-mark svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.desktop-nav { display: flex; align-items: center; gap: 8px; }
.desktop-nav > a:not(.profile-chip) { min-height: 42px; display: flex; gap: 8px; align-items: center; padding: 0 14px; color: var(--muted); border-radius: 999px; font-size: .92rem; font-weight: 650; }
.desktop-nav > a.active, .desktop-nav > a:not(.profile-chip):hover { background: var(--sage-soft); color: var(--sage-dark); }
.profile-chip { display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; margin-left: 6px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.6); font-size: .9rem; font-weight: 650; }
.avatar, .large-avatar { display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: #fff; font-weight: 750; object-fit: cover; }
.avatar { width: 32px; height: 32px; font-size: .74rem; }
.large-avatar { width: 52px; height: 52px; font-size: 1rem; flex: none; }
.large-avatar.small { width: 43px; height: 43px; font-size: .82rem; }
.mobile-menu-button, .mobile-bottom-nav, .mobile-drawer { display: none; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 0; border-radius: 999px; font-weight: 720; font-size: .92rem; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--sage); box-shadow: 0 8px 20px rgba(49,92,75,.18); }
.button.primary:hover { background: var(--sage-dark); }
.button.secondary { color: var(--sage-dark); background: var(--sage-soft); }
.button.light { color: var(--ink); background: white; }
.button.glass { color: white; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); }
.button.quiet { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.button.large { min-height: 52px; padding-inline: 24px; }
.button.text-danger { color: var(--danger); background: transparent; }
.small-button { min-height: 36px; padding-inline: 13px; font-size: .82rem; }
.icon-button { width: 42px; height: 42px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; }
.icon-button.mobile-menu-button { display: none; }
.icon-button:hover { background: rgba(45,64,53,.08); }
.icon-button.bordered { border: 1px solid var(--line); background: #fff; }
.icon-button.danger { color: var(--danger); }
.eyebrow, .mini-label { display: block; color: var(--sage); text-transform: uppercase; letter-spacing: .13em; font-size: .72rem; font-weight: 800; margin-bottom: 12px; }
.eyebrow.light { color: rgba(255,255,255,.72); }
.quiet-count { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.text-link, .back-link { color: var(--sage); font-weight: 700; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; margin-bottom: 34px; }
.back-link:hover { text-decoration: underline; }

.flash { width: min(calc(100% - 40px), 720px); position: fixed; top: 88px; left: 50%; z-index: 100; transform: translateX(-50%); display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--line); font-size: .92rem; }
.flash.success > svg { color: var(--sage); }
.flash.error > svg { color: var(--danger); }
.flash span { flex: 1; }
.flash button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; }

.welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 10px 0 44px; }
.welcome > div { max-width: 760px; }
.welcome .eyebrow { margin-bottom: 0; font-size: .78rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.section-heading h2 { margin-bottom: 0; }
.photo-section-tools { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.photo-sort-form { display: flex; align-items: end; gap: 8px; }
.photo-sort-form label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; font-weight: 720; white-space: nowrap; }
.photo-sort-form select { width: auto; min-width: 205px; min-height: 40px; padding: 0 36px 0 12px; font-size: .84rem; }
.photo-sort-form .button { min-height: 40px; }
.section-heading p { margin: 10px 0 0; }
.compact-heading { margin-bottom: 18px; }
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.gallery-card { position: relative; grid-column: span 6; min-height: 385px; overflow: hidden; isolation: isolate; border-radius: var(--radius-lg); background-color: var(--tone); background-image: var(--cover); background-size: cover; background-position: center; box-shadow: var(--shadow-sm); }
.gallery-card:nth-child(3n+1):last-child { grid-column: span 12; min-height: 340px; }
.gallery-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(145deg, rgba(255,255,255,.08), transparent 45%), var(--tone); transform: scale(1.01); transition: transform .5s ease; }
.gallery-card[style*="--cover"]::before { background-image: var(--cover); background-size: cover; background-position: center; }
.gallery-card:hover::before { transform: scale(1.045); }
.gallery-card-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(18,28,23,.88), rgba(18,28,23,.02) 72%); }
.gallery-card-content { position: absolute; inset: auto 0 0; display: grid; padding: 34px; color: #fff; }
.gallery-kicker { color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .12em; font-size: .69rem; font-weight: 800; margin-bottom: 9px; }
.gallery-card strong { max-width: 80%; font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.035em; line-height: 1; }
.gallery-description { max-width: 70%; margin-top: 10px; color: rgba(255,255,255,.78); font-size: .9rem; line-height: 1.45; }
.round-arrow { position: absolute; right: 30px; bottom: 30px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); transition: transform .2s; }
.gallery-card:hover .round-arrow { transform: translateX(3px); }
.recent-section { margin-top: 72px; }
.photo-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 14px; overflow-x: auto; padding: 2px 2px 18px; scrollbar-width: thin; }
.strip-photo { width: 240px; height: 280px; }

.gallery-hero { position: relative; min-height: 470px; display: flex; align-items: end; color: #fff; background: var(--hero-tone); background-image: var(--hero-image); background-size: cover; background-position: center; }
.gallery-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,19,15,.18), rgba(15,25,20,.8)); }
.gallery-hero-content { position: relative; padding-block: 88px 54px; }
.breadcrumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: rgba(255,255,255,.72); font-size: .82rem; margin-bottom: 56px; }
.breadcrumbs a:hover { color: #fff; }
.gallery-title-row { display: flex; align-items: end; justify-content: space-between; gap: 34px; }
.gallery-title-row h1 { margin-bottom: 16px; }
.gallery-title-row p { max-width: 650px; color: rgba(255,255,255,.78); margin: 0; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.gallery-body { padding-block: 48px 20px; }
.gallery-body section + section { margin-top: 62px; }
.subgallery-grid .gallery-card { min-height: 300px; }
.notice, .gentle-note { display: flex; align-items: flex-start; gap: 11px; padding: 15px 17px; border-radius: 14px; background: var(--sage-soft); color: var(--sage-dark); font-size: .9rem; line-height: 1.5; }
.notice { margin-bottom: 38px; }
.notice svg, .gentle-note svg { flex: none; margin-top: 1px; }
.photo-grid { columns: 4 220px; column-gap: 14px; }
.photo-tile { position: relative; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: #e8e7e1; break-inside: avoid; margin: 0 0 14px; }
.photo-tile img { width: 100%; height: auto; transition: transform .35s; }
.photo-uploader-badge { position: absolute; top: 10px; right: 10px; z-index: 3; width: 37px; height: 37px; display: grid; place-items: center; padding: 3px; border-radius: 50%; background: rgba(255,255,255,.93); box-shadow: 0 4px 13px rgba(20,30,25,.2); }
.uploader-avatar { width: 31px; height: 31px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; object-fit: cover; color: #fff; background: var(--sage); font-size: .64rem; font-weight: 800; }
.photo-hover { position: absolute; inset: 0; display: flex; align-items: end; gap: 7px; padding: 18px; color: #fff; font-weight: 700; font-size: .83rem; opacity: 0; background: linear-gradient(to top, rgba(16,25,20,.62), transparent 60%); transition: opacity .2s; }
.photo-tile:hover .photo-hover, .photo-tile:focus-visible .photo-hover { opacity: 1; }
.photo-tile:hover img { transform: scale(1.025); }

.empty-state { display: grid; justify-items: center; text-align: center; padding: 86px 20px; border: 1px dashed #cfd3cc; border-radius: var(--radius-lg); background: rgba(255,255,255,.38); }
.empty-state.compact { padding-block: 58px; }
.empty-state h1, .empty-state h2 { max-width: 560px; margin: 15px 0 10px; }
.empty-state p { max-width: 490px; margin-bottom: 24px; }
.empty-icon, .success-mark, .panel-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--sage-soft); color: var(--sage); }
.success-mark { width: 62px; height: 62px; margin: 12px 0 24px; }
.panel-icon.small { width: 42px; height: 42px; }

.modal { width: min(calc(100% - 24px), 620px); padding: 0; border: 0; border-radius: 25px; background: var(--card); box-shadow: var(--shadow-lg); }
.modal::backdrop, .lightbox::backdrop { background: rgba(18,28,23,.72); backdrop-filter: blur(5px); }
.modal-head { display: flex; align-items: start; justify-content: space-between; padding: 28px 30px 0; }
.modal-head h2 { margin: 0; }
.upload-form { padding: 24px 30px 30px; }
.upload-drop { min-height: 215px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px !important; padding: 24px; border: 1.5px dashed #bcc7c0; border-radius: 18px; background: #f6f8f5; cursor: pointer; }
.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-drop > span:not(.upload-circle) { color: var(--muted); font-weight: 500; font-size: .82rem; }
.upload-circle { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: #fff !important; margin-bottom: 6px; }
.file-selection { color: var(--sage) !important; font-weight: 750 !important; margin-top: 5px; }
.lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(13,19,16,.97); color: white; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox-image-wrap { min-height: 0; display: grid; place-items: center; padding: 66px 30px 20px; }
.lightbox-image-wrap img { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; border-radius: 8px; }
.lightbox-close { position: fixed; top: 18px; right: 18px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; color: white; background: rgba(255,255,255,.12); }
.lightbox-caption { min-height: 88px; display: grid; justify-items: center; gap: 5px; padding: 12px 24px 28px; text-align: center; }
.lightbox-caption strong:empty { display: none; }
.lightbox-caption span { color: rgba(255,255,255,.6); font-size: .85rem; }

.auth-body { background: #e7ece6; }
.auth-body .main-content { width: 100%; max-width: none; padding: 0; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: radial-gradient(circle at 16% 15%, rgba(255,255,255,.88), transparent 28%), radial-gradient(circle at 85% 88%, rgba(184,151,101,.2), transparent 32%), #e7ece6; }
.auth-card { width: min(100%, 500px); padding: clamp(28px, 6vw, 48px); border-radius: 30px; background: var(--card); box-shadow: var(--shadow-lg); }
.auth-brand { margin-bottom: 48px; }
.auth-card h1 { font-size: clamp(2.3rem, 7vw, 3.35rem); margin-bottom: 18px; }
.auth-card > p { margin-bottom: 28px; }
.login-card h1 { margin-bottom: 32px; }
.auth-link { display: block; text-align: center; margin-top: 20px; }
.auth-note { margin: 34px 0 0 !important; padding-top: 24px; border-top: 1px solid var(--line); text-align: center; font-size: .82rem; }
.setup-command { overflow-x: auto; padding: 16px; border-radius: 12px; background: #26342d; color: #ecf3ee; font-size: .78rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.stack-form { display: grid; gap: 19px; }
.stack-form label { display: grid; gap: 8px; font-size: .86rem; font-weight: 720; }
input, textarea, select { width: 100%; border: 1px solid #cfd3cc; border-radius: 12px; background: #fff; outline: none; transition: border .15s, box-shadow .15s; }
input, select { min-height: 50px; padding: 0 14px; }
textarea { padding: 13px 14px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(49,92,75,.12); }
input:disabled { color: #7a827c; background: #f2f1ed; }
.field-hint, .help-text { color: var(--muted); font-size: .78rem; line-height: 1.5; font-weight: 500; }
.optional { color: var(--muted); font-weight: 500; }
.form-error { padding: 13px 15px; margin-bottom: 20px; border-radius: 12px; color: #74342e; background: #f4ded9; font-size: .88rem; line-height: 1.5; }

.page-intro, .admin-heading { margin: 8px 0 48px; }
.page-intro { max-width: 720px; }
.page-intro h1, .admin-heading h1 { font-size: clamp(2.35rem, 5vw, 4rem); margin-bottom: 16px; }
.page-intro p, .admin-heading p { max-width: 650px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.panel { padding: 28px; border: 1px solid rgba(90,102,94,.14); border-radius: var(--radius); background: var(--card); box-shadow: 0 5px 16px rgba(35,49,41,.035); }
.panel + .panel { margin-top: 20px; }
.settings-grid .panel + .panel { margin-top: 0; }
.panel > h3 { margin-bottom: 20px; }
.panel-heading { display: flex; gap: 15px; align-items: center; margin-bottom: 26px; }
.panel-heading h2 { margin: 0 0 5px; font-size: 1.3rem; }
.panel-heading p { margin: 0; font-size: .84rem; }
.signout-row { display: flex; justify-content: center; margin-top: 34px; }
.profile-avatar-field input[type="file"] { min-height: auto; padding: 11px; background: #f8f8f4; }
.profile-avatar-field input[type="file"]::file-selector-button { margin-right: 12px; padding: 9px 13px; border: 0; border-radius: 999px; color: var(--sage-dark); background: var(--sage-soft); font-weight: 750; cursor: pointer; }

.installer-body { min-height: 100vh; overflow-x: hidden; background: var(--paper); }
.installer-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(330px, 38%) 1fr; }
.installer-aside { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; padding: clamp(34px, 5vw, 72px); color: #fff; background: radial-gradient(circle at 15% 12%, rgba(255,255,255,.12), transparent 28%), radial-gradient(circle at 85% 80%, rgba(191,151,86,.2), transparent 31%), #203d32; }
.installer-aside::after { content: ""; position: absolute; width: 420px; height: 420px; right: -240px; bottom: -180px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 55px rgba(255,255,255,.025), 0 0 0 110px rgba(255,255,255,.018); }
.installer-brand, .installer-mobile-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font-size: 1.16rem; }
.installer-brand .logo-mark { color: var(--sage-dark); background: #fff; }
.installer-aside-copy { position: relative; z-index: 1; max-width: 520px; margin-block: auto; padding-block: 60px; }
.installer-aside-copy h1 { max-width: 520px; margin-bottom: 24px; font-size: clamp(2.8rem, 5vw, 5.2rem); }
.installer-aside-copy p { max-width: 480px; margin: 0; color: rgba(255,255,255,.7); font-size: 1rem; }
.installer-steps { position: relative; z-index: 1; display: grid; gap: 18px; margin: 0 0 44px; padding: 0; list-style: none; }
.installer-steps li { display: flex; align-items: center; gap: 13px; }
.installer-steps li > span { width: 31px; height: 31px; display: grid; place-items: center; flex: none; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: rgba(255,255,255,.82); font-size: .72rem; font-weight: 800; }
.installer-steps strong, .installer-steps small { display: block; }
.installer-steps strong { font-size: .86rem; }
.installer-steps small { margin-top: 3px; color: rgba(255,255,255,.52); font-size: .72rem; }
.installer-private-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0; color: rgba(255,255,255,.58); font-size: .74rem; }
.installer-form-side { min-width: 0; padding: clamp(34px, 6vw, 84px); }
.installer-form-wrap { width: min(100%, 830px); margin-inline: auto; }
.installer-mobile-brand { display: none; margin-bottom: 36px; }
.installer-preview-note { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; padding: 14px 16px; border-radius: 13px; color: #725f2e; background: #f3e9ca; font-size: .84rem; line-height: 1.5; }
.installer-preview-note svg { flex: none; }
.installer-form { display: grid; gap: 28px; }
.installer-section { padding: clamp(22px, 4vw, 34px); border: 1px solid rgba(73,91,80,.14); border-radius: 22px; background: var(--card); box-shadow: 0 8px 24px rgba(35,49,41,.035); }
.installer-section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 26px; }
.installer-section-heading > span { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 50%; color: var(--sage); background: var(--sage-soft); font-size: .69rem; font-weight: 850; }
.installer-section-heading h2 { margin: 1px 0 6px; font-size: 1.38rem; }
.installer-section-heading p { margin: 0; font-size: .83rem; }
.installer-section > label, .field-grid label { display: grid; gap: 8px; color: var(--ink); font-size: .82rem; font-weight: 720; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.field-grid.thirds { grid-template-columns: 1fr 1fr 150px; }
.field-grid .span-two { grid-column: span 2; }
.avatar-setup { display: grid; grid-template-columns: minmax(240px, .9fr) 1.1fr; align-items: center; gap: 22px; margin-bottom: 26px; }
.avatar-setup > p { margin: 0; font-size: .82rem; }
.avatar-drop { display: flex !important; align-items: center; gap: 14px !important; padding: 13px; border: 1px dashed #b9c4bc; border-radius: 16px; background: #f6f8f5; cursor: pointer; }
.avatar-drop:hover, .avatar-drop.has-file { border-color: var(--sage); background: #f0f5f1; }
.avatar-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.avatar-preview { width: 66px; height: 66px; display: grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%; color: var(--sage); background-color: var(--sage-soft); background-size: cover; background-position: center; }
.avatar-preview.has-image { color: transparent; }
.avatar-drop strong, .avatar-drop small { display: block; }
.avatar-drop strong { font-size: .86rem; }
.avatar-drop small { margin-top: 5px; color: var(--muted); font-size: .7rem; font-weight: 500; }
.installer-finish { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 10px 4px 0; }
.installer-finish > div { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .78rem; }
.installer-finish > div svg { flex: none; color: var(--sage); }
.installer-finish button:disabled { cursor: not-allowed; opacity: .48; transform: none; }

.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.admin-heading > div { max-width: 760px; }
.admin-tabs { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 34px; padding: 5px; border-radius: 15px; background: var(--paper-deep); scrollbar-width: none; }
.admin-tabs a { min-width: max-content; flex: 1; display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 11px; color: var(--muted); font-size: .86rem; font-weight: 720; }
.admin-tabs a.active { color: var(--sage-dark); background: #fff; box-shadow: 0 3px 10px rgba(35,49,41,.06); }
.admin-tabs b { min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; color: #fff; background: var(--clay); font-size: .68rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { min-height: 125px; display: flex; align-items: center; gap: 13px; padding: 20px; border: 1px solid rgba(90,102,94,.14); border-radius: var(--radius); background: var(--card); }
.stat-card > span:nth-child(2) { flex: 1; }
.stat-card strong { display: block; font-size: 1.75rem; letter-spacing: -.04em; }
.stat-card small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.stat-card > svg { color: #9aa19c; }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; }
.stat-icon.sage { color: var(--sage); background: var(--sage-soft); }
.stat-icon.blue { color: #516e80; background: #e0e9ed; }
.stat-icon.clay { color: var(--clay); background: #f2e3df; }
.stat-icon.gold { color: #9a742f; background: #f3ead4; }
.activity-list, .member-list, .management-list { display: grid; }
.activity-row, .member-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid #e8e8e2; }
.activity-row:first-child, .member-row:first-child { border-top: 0; }
.activity-row img { width: 58px; height: 58px; object-fit: cover; border-radius: 11px; }
.activity-row > div, .member-main, .management-main { min-width: 0; flex: 1; }
.activity-row strong, .member-main strong { display: block; font-size: .9rem; }
.invite-row { align-items: center; }
.invite-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; flex: none; }
.invite-actions form { margin: 0; }
.invite-actions .button { white-space: nowrap; }
.share-link-panel { display: grid; gap: 20px; margin-top: 20px; }
.share-link-panel h2 { margin-bottom: 7px; }
.share-link-panel p { margin-bottom: 0; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; }
.copy-field .button { flex: none; }
.mail-warning { margin: 20px 0; }
.mail-warning div { display: grid; gap: 3px; }
.mail-warning strong, .mail-warning span { display: block; }
.mail-details { display: grid; gap: 0; margin: 4px 0 20px; }
.mail-details > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.mail-details dt { color: var(--muted); }
.mail-details dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.mail-test-form { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.mail-test-form .button { justify-self: start; }
.activity-row span, .member-main span { display: block; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.status, .role-badge { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; font-size: .69rem; font-weight: 780; }
.status.approved { color: #2f684e; background: #dfece3; }
.status.pending { color: #84611e; background: #f4e9cc; }
.status.rejected { color: #894139; background: #f2dfdb; }
.role-badge { color: #5d6670; background: #eef0f1; }
.management-list { gap: 10px; }
.management-row { display: flex; align-items: center; gap: 16px; padding: 13px; border: 1px solid rgba(90,102,94,.14); border-radius: 16px; background: var(--card); }
.management-cover { width: 92px; height: 72px; flex: none; border-radius: 11px; background-size: cover !important; background-position: center !important; }
.management-main .mini-label { margin-bottom: 4px; font-size: .62rem; }
.management-main h3 { margin: 0 0 5px; }
.management-main p { margin: 0; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.management-actions { display: flex; align-items: center; gap: 7px; }
.editor-heading { max-width: 750px; margin-bottom: 30px; }
.editor-heading h2 { margin-bottom: 12px; }
.editor-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
.editor-layout .panel:nth-child(4) { grid-column: 2; }
.color-field { display: flex; align-items: center; gap: 13px; min-height: 54px; padding: 7px; border: 1px solid #cfd3cc; border-radius: 12px; background: #fff; }
.color-field input { width: 54px; min-height: 40px; padding: 0; border: 0; }
.color-field span { color: var(--muted); font-size: .8rem; font-weight: 500; }
.toggle-row { position: relative; display: flex !important; align-items: center; gap: 18px !important; min-height: 70px; padding: 12px 0; }
.toggle-row span { flex: 1; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row small { color: var(--muted); font-weight: 500; line-height: 1.4; margin-top: 4px; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row i { position: relative; width: 48px; height: 28px; flex: none; border-radius: 999px; background: #c8ccc8; transition: background .2s; }
.toggle-row i::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .2s; }
.toggle-row input:checked + i { background: var(--sage); }
.toggle-row input:checked + i::after { transform: translateX(20px); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.photo-picker { margin: 0; padding: 0; border: 0; }
.photo-picker legend { font-size: .86rem; font-weight: 720; margin-bottom: 5px; }
.photo-radio-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.photo-radio-grid label { position: relative; display: block; aspect-ratio: 1; cursor: pointer; }
.photo-radio-grid input { position: absolute; opacity: 0; }
.photo-radio-grid img, .none-choice span { width: 100%; height: 100%; object-fit: cover; border: 3px solid transparent; border-radius: 10px; }
.none-choice span { display: grid; place-items: center; background: var(--paper-deep); font-size: .66rem; text-align: center; }
.photo-radio-grid input:checked + img, .photo-radio-grid input:checked + span { border-color: var(--sage); box-shadow: 0 0 0 2px #fff inset; }
.narrow-panel { max-width: 700px; }
.table-panel { padding-block: 10px; }
.mail-info { margin-top: 20px; }
.mail-info p:last-child { margin-bottom: 0; }
.approval-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.approval-card { overflow: hidden; border: 1px solid rgba(90,102,94,.14); border-radius: var(--radius); background: var(--card); }
.approval-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.approval-details { padding: 20px; }
.approval-details .mini-label { margin-bottom: 7px; }
.approval-details h3 { margin: 0 0 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.approval-details p { margin: 0 0 18px; font-size: .78rem; }
.approval-actions { display: flex; gap: 7px; align-items: center; }
.approval-actions form:last-child { margin-left: auto; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid, .editor-layout { grid-template-columns: 1fr; }
  .editor-layout .panel:nth-child(4) { grid-column: auto; }
  .approval-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-card { min-height: 330px; }
  .installer-shell { grid-template-columns: 300px 1fr; }
  .installer-aside { padding: 38px 30px; }
  .installer-aside-copy h1 { font-size: 3rem; }
  .installer-form-side { padding: 42px 28px; }
  .field-grid.thirds { grid-template-columns: 1fr 115px; }
  .field-grid .span-two { grid-column: auto; }
  .avatar-setup { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  :root { --radius-lg: 22px; }
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .main-content { padding-block: 34px 96px; }
  .site-header { position: relative; }
  .header-inner { height: 68px; }
  .desktop-nav { display: none; }
  .icon-button.mobile-menu-button { display: grid; }
  .mobile-drawer { display: block; position: fixed; inset: 0; z-index: 200; }
  .mobile-drawer[hidden] { display: none; }
  .drawer-scrim { position: absolute; inset: 0; background: rgba(20,29,24,.48); }
  .drawer-panel { position: absolute; top: 0; right: 0; width: min(86vw, 360px); height: 100%; padding: 20px; background: var(--card); box-shadow: var(--shadow-lg); }
  .drawer-heading { display: flex; align-items: center; justify-content: space-between; padding: 3px 2px 18px; font-weight: 750; }
  .drawer-panel > a, .drawer-panel form button { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 0; border-top: 1px solid #ecece7; background: transparent; text-align: left; font-weight: 680; }
  .mobile-bottom-nav { position: fixed; inset: auto 10px max(10px, env(safe-area-inset-bottom)); z-index: 35; display: flex; justify-content: center; padding: 6px; border: 1px solid rgba(255,255,255,.4); border-radius: 18px; background: rgba(36,55,45,.94); box-shadow: 0 14px 32px rgba(21,32,26,.28); backdrop-filter: blur(16px); }
  .mobile-bottom-nav a { flex: 1; max-width: 140px; min-height: 51px; display: grid; place-items: center; gap: 1px; color: rgba(255,255,255,.72); font-size: .64rem; font-weight: 700; }
  .mobile-bottom-nav svg { color: #fff; }
  h1 { font-size: clamp(2.35rem, 12vw, 3.4rem); }
  .welcome { align-items: start; flex-direction: column; margin: 10px 0 45px; }
  .welcome .button { width: 100%; }
  .section-heading { align-items: start; }
  .section-heading .button { min-width: max-content; }
  .photo-section-heading { flex-direction: column; }
  .photo-section-tools { width: 100%; align-items: stretch; flex-direction: column; gap: 10px; }
  .photo-sort-form { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .photo-sort-form label { min-width: 0; display: grid; gap: 6px; }
  .photo-sort-form select { width: 100%; min-width: 0; }
  .gallery-grid { grid-template-columns: 1fr; gap: 14px; }
  .gallery-card, .gallery-card:nth-child(3n+1):last-child { grid-column: auto; min-height: 300px; }
  .gallery-card-content { padding: 24px; }
  .gallery-card strong { max-width: 78%; }
  .gallery-description { max-width: 76%; }
  .round-arrow { right: 22px; bottom: 22px; }
  .recent-section { margin-top: 54px; }
  .photo-strip { margin-right: -14px; grid-auto-columns: 195px; }
  .strip-photo { width: 195px; height: 245px; }
  .gallery-hero { min-height: 500px; }
  .gallery-hero-content { padding-block: 50px 35px; }
  .breadcrumbs { margin-bottom: 55px; }
  .gallery-title-row { align-items: start; flex-direction: column; }
  .gallery-title-row h1 { font-size: 3.25rem; }
  .hero-actions { width: 100%; }
  .hero-actions .button:first-child { flex: 1; }
  .gallery-body { padding-block: 34px 20px; }
  .photo-grid { columns: 2; column-gap: 8px; }
  .photo-tile { border-radius: 10px; margin-bottom: 8px; }
  .photo-hover { display: none; }
  .modal { margin-bottom: 0; border-radius: 24px 24px 0 0; }
  .modal[open] { position: fixed; top: auto; bottom: 0; }
  .modal-head { padding: 23px 21px 0; }
  .upload-form { padding: 20px 21px max(22px, env(safe-area-inset-bottom)); max-height: 72vh; overflow-y: auto; }
  .upload-drop { min-height: 165px; }
  .lightbox-image-wrap { padding-inline: 12px; }
  .auth-shell { padding: 14px; }
  .auth-card { padding: 28px 22px; border-radius: 24px; }
  .auth-brand { margin-bottom: 36px; }
  .page-intro, .admin-heading { margin-bottom: 34px; }
  .admin-heading { align-items: stretch; flex-direction: column; }
  .admin-heading .button { width: 100%; }
  .admin-tabs { margin-inline: -14px; padding-inline: 12px; border-radius: 0; }
  .admin-tabs a { flex: none; }
  .panel { padding: 22px 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 115px; display: grid; grid-template-columns: auto 1fr; padding: 16px; }
  .stat-card > svg { display: none; }
  .activity-row .status { display: none; }
  .management-row { align-items: center; }
  .management-cover { width: 65px; height: 65px; }
  .management-main p { max-width: 170px; }
  .management-actions .button { display: none; }
  .approval-grid { grid-template-columns: 1fr; }
  .approval-card { display: grid; grid-template-columns: 120px 1fr; }
  .approval-card > img { height: 100%; aspect-ratio: auto; }
  .approval-details { padding: 15px; }
  .approval-actions { flex-wrap: wrap; }
  .member-row { flex-wrap: wrap; }
  .member-main { flex-basis: calc(100% - 60px); }
  .member-row form { margin-left: auto; }
  .invite-actions { width: 100%; justify-content: stretch; }
  .member-row .invite-actions form { flex: 1 1 125px; margin: 0; }
  .invite-actions .button { width: 100%; }
  .mail-test-form .button { width: 100%; }
  .copy-field { flex-direction: column; }
  .copy-field .button { width: 100%; }
  .form-actions .button { flex: 1; }
  .installer-shell { display: block; }
  .installer-aside { display: none; }
  .installer-form-side { padding: 28px 14px 56px; }
  .installer-mobile-brand { display: flex; }
  .installer-section { padding: 22px 18px; border-radius: 18px; }
  .field-grid, .field-grid.thirds { grid-template-columns: 1fr; gap: 18px; }
  .field-grid .span-two { grid-column: auto; }
  .installer-finish { align-items: stretch; flex-direction: column; }
  .installer-finish .button { width: 100%; }
}

@media (max-width: 430px) {
  .section-heading .quiet-count { display: none; }
  .gallery-card { min-height: 280px; }
  .gallery-description { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 88px; grid-template-columns: auto 1fr; }
  .approval-card { display: block; }
  .approval-card > img { width: 100%; height: auto; aspect-ratio: 4/3; }
  .role-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

