:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #24282e;
  --muted: #858c96;
  --line: #e6e8ec;
  --primary: #3d72d9;
  --primary-dark: #2e5fba;
  --danger: #d64f4f;
  --page: min(1180px, calc(100% - 32px));
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { width: 100%; max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body { width: 100%; min-height: 100dvh; max-width: 100%; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
body.is-locked, body:has(dialog[open]) { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; border: 0; cursor: pointer; }
button, select { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
::selection { background: #dbe7fb; }
.svg-sprite, .page-grain { display: none; }

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(238, 241, 245, .98);
}
.gate-shell {
  width: min(560px, 100%);
  height: min(760px, calc(100dvh - 32px));
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #e1e5eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(33, 43, 56, .12);
}
.gate-notice-column { min-width: 0; min-height: 0; padding: 25px 25px 20px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.gate-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; }
.gate-brand .brand-name { display: flex; align-items: baseline; gap: 9px; }
.gate-brand .brand-name > span + span { display: inline; color: var(--muted); font-size: 9px; font-weight: 500; letter-spacing: .12em; }
.gate-notice-column > .eyebrow { margin: 0 0 8px; color: var(--primary); font-size: 10px; letter-spacing: .08em; }
.gate-notice-column > h1 { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; overflow-wrap: anywhere; }
.gate-intro { margin: 10px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.gate-announcement-label { margin: 0 0 9px; color: #666e78; font-size: 11px; font-weight: 500; }
.gate-announcement { max-height: none; padding: 18px; overflow: visible; border-color: #e8ebef; background: #f8f9fb; box-shadow: none; }
.gate-announcement .announcement-list { gap: 18px; margin-top: 20px; }
.gate-form { margin: 0; padding: 19px 25px calc(19px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -8px 25px rgba(30,39,51,.035); text-align: center; }
.gate-form .auth-lock { width: 38px; height: 38px; margin-bottom: 12px; }
.gate-form .field { margin: 14px 0 12px; text-align: left; }
.gate-form .field input { font-size: 16px; text-align: center; letter-spacing: .12em; }
.gate-form .field-error { margin: 0 0 13px; }
.gate-footer { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.logout-button { color: #727b86; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 58px;
  width: 100%;
  padding: 0 max(16px, calc((100% - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; padding: 0; background: none; }
.brand-mark { width: 30px; height: 30px; display: inline-grid; place-items: center; position: relative; flex: 0 0 auto; border-radius: 8px; background: var(--primary); }
.brand-mark::before { content: ""; width: 13px; height: 13px; border: 1.8px solid #fff; border-radius: 50%; }
.brand-mark::after { display: none; }
.brand-mark > span { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: .04em; }
.brand-name > span + span, .original-status { display: none; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border-radius: 8px; background: transparent; transition: background .18s, color .18s; }
.icon-button:hover { background: #eef0f3; }
.icon-button-light { color: #fff; }
.icon-button-light:hover { background: rgba(255,255,255,.13); }
.button { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; font-size: 12px; font-weight: 500; white-space: nowrap; transition: background .18s, border-color .18s; }
.button svg { width: 16px; height: 16px; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-dark { background: var(--primary); color: #fff; }
.button-dark:hover { background: var(--primary-dark); }
.button-accent { background: var(--primary); color: #fff; }
.button-accent:hover { background: var(--primary-dark); }
.button-outline { border-color: #d9dde3; background: var(--card); }
.button-outline:hover { background: #f0f2f5; }
.button-ghost { border-color: var(--line); background: #fff; }
.button-ghost:hover { background: #f4f5f7; }
.button-full { width: 100%; min-height: 42px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 3px 0; background: none; font-size: 12px; }
.text-button:hover { color: var(--primary); }
.text-button svg { width: 16px; height: 16px; }

main { width: 100%; }
.view { width: var(--page); max-width: 100%; margin: 0 auto; }
.announcement-entry { width: 100%; display: flex; align-items: center; gap: 11px; margin: 18px 0 22px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-align: left; transition: border-color .18s, background .18s; }
.announcement-entry:hover { border-color: #b9c4da; background: #fafbfe; }
.announcement-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #edf1fb; color: var(--primary); }
.announcement-icon svg { width: 17px; height: 17px; }
.announcement-entry-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.announcement-entry-copy strong { font-size: 13px; font-weight: 600; }
.announcement-entry-copy > span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.announcement-arrow { width: 15px; height: 15px; color: #9aa2ae; }
.announcement-view { max-width: 760px; }
.announcement-heading { padding: 27px 0 20px; }
.announcement-heading h1 { margin: 0 0 7px; font-size: 26px; font-weight: 600; }
.announcement-heading > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.announcement-card { padding: 22px 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.announcement-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 15px; border-bottom: 1px solid #edf0f3; color: var(--muted); font-size: 10px; }
.announcement-meta > span { color: var(--primary); font-weight: 500; }
.announcement-card > h2 { margin: 22px 0 9px; font-size: 19px; font-weight: 600; }
.announcement-lead { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.announcement-list { display: grid; gap: 23px; margin: 25px 0 2px; padding: 0; list-style: none; }
.announcement-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.announcement-list li > span { padding-top: 2px; color: #9aa7c1; font-family: "Consolas", monospace; font-size: 11px; }
.announcement-list h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.announcement-list p { margin: 0; color: #646b75; font-size: 11px; line-height: 1.9; }
.collection-section { padding-bottom: 35px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
.album-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
.album-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.album-cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #eceff2; }
.album-cover .album-open { display: block; width: 100%; height: 100%; padding: 0; background: none; text-align: left; }
.album-open > img, .album-open > video { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.album-open > video, .photo-open > video { pointer-events: none; }
.album-card:hover .album-open > img, .album-card:hover .album-open > video { transform: scale(1.025); }
.media-play-badge { position: absolute; left: 50%; top: 50%; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(20,24,28,.56); color: #fff; pointer-events: none; }
.media-play-badge svg { width: 16px; height: 16px; margin-left: 2px; fill: currentColor; }
.album-overlay, .album-number, .album-enter { display: none; }
.album-count { position: absolute; left: 7px; bottom: 7px; padding: 2px 6px; border-radius: 4px; background: rgba(20,24,28,.58); color: #fff; font-size: 9px; line-height: 1.6; pointer-events: none; }
.album-info { padding: 9px 10px 10px; display: flex; align-items: center; justify-content: center; text-align: center; }
.album-info h3 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.album-info p { display: none; }
.album-blank-cover { width: 100%; height: 100%; display: grid; place-items: center; position: relative; background: #e7ecf2; color: #728196; }
.cover-spring { background: #e3ece6; color: #75927e; }
.cover-city { background: #f0e7e2; color: #a47b68; }
.cover-coast { background: #e3ebef; color: #6f8e9c; }
.cover-orbit, .cover-kicker, .cover-name, .cover-edition { display: none; }
.cover-monogram { font-size: 46px; font-weight: 500; opacity: .58; }
.empty-state { padding: 55px 20px; text-align: center; border: 1px dashed #cfd4db; border-radius: 12px; background: #fff; }
.empty-monogram, .empty-state .eyebrow { display: none; }
.empty-state h3 { margin: 0 0 9px; font-size: 17px; font-weight: 500; }
.empty-state > p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); font-size: 12px; }

/* 相册详情 */
.album-view { padding-bottom: 35px; }
.album-breadcrumb { height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.album-breadcrumb > span { display: none; }
.album-masthead { padding: 16px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.album-masthead > div:first-child { min-width: 0; }
.album-masthead .eyebrow, .detail-subtitle { display: none; }
.album-masthead h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 21px; font-weight: 600; }
.album-title-row { min-width: 0; display: flex; align-items: center; gap: 5px; }
.album-title-row h1 { min-width: 0; }
.album-title-row .icon-button { width: 29px; height: 29px; flex: 0 0 auto; color: #7b838d; }
.album-title-row .icon-button svg { width: 14px; height: 14px; }
.album-actions { display: flex; flex-shrink: 0; gap: 6px; }
.album-actions .button { padding: 0 11px; }
.album-content { display: block; }
.profile-card { position: static; margin-bottom: 19px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: none; }
.profile-heading { display: flex; align-items: center; justify-content: space-between; }
.profile-heading > span { display: none; }
.profile-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
.profile-heading .icon-button { width: 30px; height: 30px; color: #66707b; background: #f3f4f6; }
.profile-heading .icon-button svg { width: 14px; height: 14px; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 20px; margin: 14px 0 0; padding: 0; }
.profile-field-wide { grid-column: auto; }
.profile-fields dt { margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.profile-fields dt span { display: none; }
.profile-fields dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.profile-note { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile-note > span { color: var(--muted); font-size: 10px; }
.profile-note p { margin: 5px 0 0; color: #646b74; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-footer { display: none; }
.photos-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.photos-heading .section-number { display: none; }
.photos-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
.photos-heading h2 sup { margin-left: 4px; color: var(--muted); font-size: 10px; font-weight: 400; vertical-align: baseline; }
.quality-tag { color: var(--muted); font-size: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.photo-card { min-width: 0; margin: 0; }
.photo-frame { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 5px; background: #e8eaed; }
.photo-open { display: block; width: 100%; height: 100%; padding: 0; background: none; }
.photo-open img, .photo-open video { width: 100%; height: 100%; object-fit: cover; transition: filter .18s; }
.photo-card:hover .photo-open img, .photo-card:hover .photo-open video { filter: brightness(.88); }
.photo-expand, .photo-caption { display: none; }
.photo-tools { position: absolute; top: 7px; right: 7px; display: flex; gap: 5px; opacity: 0; transition: opacity .18s; }
.photo-card:hover .photo-tools, .photo-tools:focus-within { opacity: 1; }
.photo-tools button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 7px; background: rgba(255,255,255,.94); color: #4e555e; }
.photo-tools button:hover { color: var(--primary); }
.photo-tools button[data-delete-photo]:hover { color: var(--danger); }
.photo-tools svg { width: 14px; height: 14px; }
.photo-empty { padding: 48px 20px; text-align: center; border: 1px dashed #cfd4db; border-radius: 10px; background: #fff; }
.photo-empty > svg { width: 34px; height: 34px; color: #a7afb9; }
.photo-empty h3 { margin: 14px 0 8px; font-size: 16px; font-weight: 500; }
.photo-empty p { margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }

/* 弹窗与表单 */
.modal { width: 460px; max-width: calc(100vw - 28px); max-height: calc(100dvh - 28px); margin: auto; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--text); overflow: visible; }
.modal::backdrop { background: rgba(22,27,33,.48); }
.modal[open] { animation: modal-in .18s ease-out both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.modal-panel { position: relative; max-height: calc(100dvh - 28px); padding: 27px; overflow-y: auto; border-radius: 12px; background: #fff; box-shadow: 0 15px 50px rgba(0,0,0,.15); }
.modal-panel::before, .modal-panel > .eyebrow { display: none; }
.modal-close { position: absolute; top: 13px; right: 13px; width: 31px; height: 31px; }
.modal-close svg { width: 17px; height: 17px; }
.modal-panel > h2 { margin: 0; font-size: 20px; font-weight: 600; }
.modal-intro { margin: 8px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
#profile-dialog { width: 610px; }
.field { display: block; position: relative; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 7px; color: #666e78; font-size: 11px; }
.field b { color: var(--danger); font-weight: 400; }
.field input, .field textarea, .field select { width: 100%; padding: 10px 12px; border: 1px solid #dcdfe4; border-radius: 7px; outline: none; background: #fff; color: var(--text); transition: border-color .18s, box-shadow .18s; }
.field input { height: 42px; }
.field textarea { min-height: 100px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(61,114,217,.1); }
.field input::placeholder, .field textarea::placeholder { color: #acb1b8; }
.field small { position: absolute; right: 9px; bottom: 7px; color: var(--muted); font-size: 9px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 23px; }
.modal-actions .button { min-height: 40px; }
.profile-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.field-full { grid-column: 1 / -1; }
.drop-zone { min-height: 140px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #c8cdd5; border-radius: 8px; background: #fafbfc; text-align: center; cursor: pointer; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--primary); background: #f4f7fd; }
.drop-icon { width: 37px; height: 37px; display: grid; place-items: center; margin-bottom: 11px; border-radius: 50%; background: #eaf0fb; color: var(--primary); }
.drop-icon svg { width: 17px; height: 17px; }
.drop-zone strong { font-size: 12px; font-weight: 500; }
.drop-zone strong u { color: var(--primary); text-decoration: none; }
.drop-zone > span:last-child { margin-top: 7px; color: var(--muted); font-size: 10px; }
.upload-selection { margin-top: 14px; }
.selection-heading { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 11px; }
.selection-heading .text-button { color: var(--primary); font-size: 10px; }
.upload-selection ul { max-height: 108px; margin: 0; padding: 0; overflow-y: auto; border-top: 1px solid var(--line); list-style: none; }
.upload-selection li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.upload-selection li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-selection li span:last-child { flex-shrink: 0; color: var(--muted); }
.original-notice { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding: 10px 11px; border-radius: 7px; background: #f0f5fd; color: #5c6f8c; font-size: 10px; line-height: 1.6; }
.original-notice svg { flex: 0 0 auto; width: 15px; height: 15px; }
.original-notice strong { margin-right: 4px; font-weight: 600; }
.upload-progress { margin-top: 15px; }
.upload-progress > div { height: 3px; overflow: hidden; border-radius: 3px; background: var(--line); }
.upload-progress > div > span { display: block; width: 0; height: 100%; background: var(--primary); transition: width .2s; }
.upload-progress p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.auth-modal { width: 410px; }
.auth-modal .modal-panel { text-align: center; }
.auth-lock { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 50%; background: #edf2fb; color: var(--primary); }
.auth-lock svg { width: 19px; height: 19px; }
.auth-modal .field { margin-top: 20px; text-align: left; }
.auth-modal .field input { text-align: center; letter-spacing: .15em; }
.rename-hint { margin: -5px 0 8px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.field-error { margin: -5px 0 13px; color: var(--danger); font-size: 11px; }
.auth-modal.is-shaking .modal-panel { animation: shake .25s; }
@keyframes shake { 25%, 75% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }

/* 原图预览 */
.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #151719; color: #fff; overflow: hidden; }
.lightbox::backdrop { background: #151719; }
.lightbox-shell { height: 100%; display: grid; grid-template-columns: 60px 1fr 60px; grid-template-rows: 56px minmax(0, 1fr) 66px; }
.lightbox-header { grid-column: 1 / -1; grid-row: 1; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); }
.lightbox-header > div:first-child { display: flex; align-items: center; gap: 16px; }
.lightbox-brand { font-size: 14px; font-weight: 500; }
#lightbox-counter { color: #9da2a9; font-size: 10px; }
.lightbox-figure { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; margin: 0; padding: 10px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox-figure img, .lightbox-figure video { width: auto; height: auto; max-width: 100%; max-height: calc(100% - 32px); object-fit: contain; }
.lightbox-figure video { width: 100%; }
.lightbox-figure figcaption { width: 100%; padding-top: 9px; display: flex; justify-content: center; gap: 14px; color: #8f959d; font-size: 10px; }
.lightbox-nav { width: 36px; height: 36px; display: grid; place-items: center; align-self: center; justify-self: center; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.lightbox-nav:hover { background: rgba(255,255,255,.18); }
.lightbox-prev { grid-column: 1; grid-row: 2; }
.lightbox-next { grid-column: 3; grid-row: 2; }
.lightbox-next svg { transform: rotate(180deg); }
.lightbox-nav:disabled { opacity: .2; cursor: default; }
.lightbox-toolbar { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; border-top: 1px solid rgba(255,255,255,.08); background: #1b1e21; }
.lightbox-toolbar button { min-width: 120px; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; background: #2b3035; color: #fff; font-size: 12px; }
.lightbox-toolbar button:hover { background: #383f46; }
.lightbox-toolbar .toolbar-danger { color: #ff9696; }
.lightbox-toolbar svg { width: 16px; height: 16px; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 7px; pointer-events: none; }
.toast { min-width: 230px; max-width: 360px; padding: 11px 14px; display: flex; align-items: center; gap: 8px; border-radius: 8px; background: #30343a; color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.16); font-size: 11px; line-height: 1.5; animation: modal-in .18s both; }
.toast svg { flex: 0 0 auto; width: 15px; height: 15px; }
.toast.is-error { background: #a74646; }
.toast.is-leaving { opacity: 0; transition: opacity .2s; }
body:has(#lightbox[open]) .toast-region { bottom: 78px; }
.boot-screen { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; transition: opacity .2s, visibility .2s; }
.boot-screen p { margin: 15px 0 5px; font-size: 20px; font-weight: 600; }
.boot-screen small { color: var(--muted); font-size: 10px; }
.boot-screen.is-ready { opacity: 0; visibility: hidden; }

@media (min-width: 700px) {
  .site-header { height: 62px; }
  .announcement-entry { margin: 24px 0 27px; padding: 15px 17px; }
  .announcement-heading h1 { font-size: 30px; }
  .announcement-card { padding: 30px 32px; }
  .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; }
  .album-info h3 { font-size: 14px; }
  .profile-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
}

@media (min-width: 1100px) {
  .album-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
}

@media (max-width: 600px) {
  :root { --page: calc(100% - 24px); }
  .access-gate { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .gate-shell { width: 100%; height: 100%; max-height: 760px; border-radius: 16px; }
  .gate-notice-column { padding: 20px 18px 16px; }
  .gate-brand { margin-bottom: 16px; }
  .gate-notice-column > h1 { font-size: 24px; }
  .gate-intro { margin-bottom: 16px; }
  .gate-announcement { max-height: none; padding: 16px 14px; }
  .gate-form { padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); }
  .field input, .field textarea, .field select { font-size: 16px; }
  .site-header { padding: 0 12px; }
  .logout-button { display: inline-grid; }
  .modal { width: 100%; max-width: 100%; max-height: 88dvh; margin: auto auto 0; border-radius: 15px 15px 0 0; }
  .modal-panel { max-height: 88dvh; padding: 25px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 15px 15px 0 0; }
  .modal-panel > h2 { font-size: 19px; }
  .modal-actions .button { flex: 1; }
  .profile-form-grid { grid-template-columns: 1fr; gap: 0; }
  .photo-tools { display: none; }
  .lightbox-shell { grid-template-columns: 42px 1fr 42px; grid-template-rows: 52px minmax(0, 1fr) calc(68px + env(safe-area-inset-bottom)); }
  .lightbox-header { padding: 0 12px; }
  .lightbox-brand { font-size: 13px; }
  .lightbox-figure { padding: 5px 0; }
  .lightbox-figure figcaption { display: block; padding: 8px 5px 0; text-align: center; line-height: 1.6; }
  .lightbox-figure figcaption span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lightbox-nav { width: 31px; height: 31px; }
  .lightbox-nav svg { width: 16px; height: 16px; }
  .lightbox-toolbar { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .lightbox-toolbar button { flex: 1; min-width: 0; max-width: 190px; height: 42px; }
  .toast-region { left: 12px; right: 12px; bottom: 12px; }
  .toast { width: 100%; min-width: 0; max-width: none; }
  body:has(#lightbox[open]) .toast-region { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .brand-name { font-size: 15px; }
  .gate-brand .brand-name > span + span { display: none; }
  .gate-notice-column > h1 { font-size: 22px; }
  .gate-form { padding-left: 14px; padding-right: 14px; }
  .header-actions { gap: 4px; }
  .album-actions .button { padding: 0 9px; }
  .quality-tag { display: none; }
}

@media (max-height: 520px) {
  .gate-notice-column { padding-top: 14px; }
  .gate-brand { margin-bottom: 12px; }
  .gate-notice-column > .eyebrow, .gate-intro, .gate-announcement-label { display: none; }
  .gate-notice-column > h1 { margin-bottom: 12px; font-size: 20px; }
  .gate-form { padding-top: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .gate-form .auth-lock, .gate-footer { display: none; }
  .gate-form .field { margin: 0 0 10px; }
}

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

.library-search { display: flex; align-items: center; gap: 9px; margin: -10px 0 20px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); transition: border-color .18s, box-shadow .18s; }
.library-search:focus-within { border-color: #b9c4da; box-shadow: 0 0 0 3px rgba(61, 114, 217, .08); }
.library-search svg { flex: 0 0 auto; width: 17px; height: 17px; color: #9aa2ae; }
.library-search input { flex: 1; min-width: 0; padding: 11px 0; border: 0; background: transparent; color: var(--text); font-family: var(--sans); font-size: 16px; font-weight: 600; outline: none; -webkit-appearance: none; appearance: none; }
.library-search input::placeholder { color: var(--muted); }
.library-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.album-search-empty { margin: 18px 0; color: var(--muted); font-size: 13px; text-align: center; }
@media (min-width: 720px) { .library-search { margin: -14px 0 24px; } }
