:root {
  color-scheme: light;
  --paper: #faf8f3;
  --surface: #ffffff;
  --surface-soft: #f5f5f4;
  --surface-warm: #fffbeb;
  --ink: #292524;
  --text: #44403c;
  --muted: #78716c;
  --faint: #a8a29e;
  --line: #e7e5e4;
  --line-soft: #f5f5f4;
  --red: #991b1b;
  --red-dark: #7f1d1d;
  --red-hover: #b91c1c;
  --gold: #fbbf24;
  --gold-soft: #fef3c7;
  --header: rgba(255, 255, 255, .92);
  --shadow: 0 2px 8px rgba(68, 64, 60, .06);
  --shadow-lg: 0 20px 50px rgba(28, 25, 23, .24);
}

html.dark {
  color-scheme: dark;
  --paper: #09090b;
  --surface: #18181b;
  --surface-soft: #27272a;
  --surface-warm: #2a2115;
  --ink: #fafaf9;
  --text: #d6d3d1;
  --muted: #a8a29e;
  --faint: #78716c;
  --line: #3f3f46;
  --line-soft: #27272a;
  --gold-soft: #422006;
  --header: rgba(24, 24, 27, .92);
  --shadow: 0 2px 8px rgba(0, 0, 0, .18);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}
button, input, textarea, select { font: inherit; }
button, select, label[for] { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.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: 3px solid rgba(234, 179, 8, .75); outline-offset: 3px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 65px;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(68, 64, 60, .04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header-inner {
  max-width: 1152px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-seal {
  display: grid;
  place-items: center;
  padding: 6px 11px;
  border: 1px solid rgba(251, 191, 36, .45);
  border-radius: 9px;
  background: var(--red-dark);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, .15);
  color: #fcd34d;
  font-family: "Noto Serif TC", serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .12em;
  white-space: nowrap;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong {
  color: var(--ink);
  font-family: "Noto Serif TC", serif;
  font-size: 18px;
  line-height: 1.45;
  white-space: nowrap;
}
.brand-copy small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.button, .icon-button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 12px;
  min-height: 36px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color .18s, color .18s, transform .18s, box-shadow .18s;
  user-select: none;
}
.button:active, .icon-button:active { transform: scale(.97); }
.button-amber { background: var(--gold-soft); color: #92400e; border: 1px solid rgba(217, 119, 6, .16); font-weight: 700; }
.dark .button-amber { color: #fcd34d; }
.button-amber:hover { background: #fef08a; }
.dark .button-amber:hover { background: #713f12; }
.button-muted { background: var(--surface-soft); color: var(--text); cursor: pointer; }
.button-muted:hover { background: var(--line); }
.icon-button { background: transparent; color: var(--muted); padding: 8px; }
.icon-button:hover { color: var(--ink); background: var(--surface-soft); }
.button-login { background: transparent; color: var(--red); border: 1px solid rgba(153, 27, 27, .22); font-weight: 700; }
.dark .button-login { color: #fca5a5; border-color: rgba(248, 113, 113, .25); }
.button-login:hover { background: rgba(153, 27, 27, .07); }
.button-login.is-owner { background: var(--surface-warm); color: var(--red); }
.dark .button-login.is-owner { color: #fcd34d; }

.main-content { max-width: 1152px; margin: 0 auto; padding: 28px 24px 100px; }
.profile-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
  padding: 27px;
  border: 1px solid rgba(245, 158, 11, .2);
  border-radius: 24px;
  background: linear-gradient(110deg, #7f1d1d 0%, #881337 55%, #451a03 115%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(69, 26, 3, .15);
}
.profile-banner::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -100px;
  top: -170px;
  border: 1px solid rgba(251, 191, 36, .11);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(251, 191, 36, .025), 0 0 0 80px rgba(251, 191, 36, .02);
  pointer-events: none;
}
.profile-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 17px; min-width: 0; }
.avatar {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid rgba(252, 211, 77, .6);
  border-radius: 18px;
  background: rgba(254, 243, 199, .12);
  color: #fde68a;
  font-family: "Noto Serif TC", serif;
  font-size: 30px;
  font-weight: 900;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .12);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .48);
  color: white;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transition: opacity .2s;
}
.avatar.can-edit:hover .avatar-edit, .avatar.can-edit:focus-visible .avatar-edit { opacity: 1; }
.profile-copy { min-width: 0; }
.profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.profile-name-row h1 {
  margin: 0;
  color: #fde68a;
  font-family: "Noto Serif TC", serif;
  font-size: 25px;
  line-height: 1.5;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}
.profile-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid rgba(252, 211, 77, .2);
  border-radius: 9px;
  background: rgba(0, 0, 0, .18);
  color: rgba(252, 211, 77, .88);
  font-size: 11px;
  transition: background-color .2s, color .2s;
}
.profile-edit:hover { background: rgba(0, 0, 0, .3); color: #fff; }
.profile-copy p { margin: 5px 0 0; max-width: 590px; color: #e7e5e4; font-size: 13px; line-height: 1.8; }
.profile-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid rgba(252, 211, 77, .2);
  border-radius: 16px;
  background: rgba(0, 0, 0, .25);
  color: #e7e5e4;
  font-size: 12px;
  white-space: nowrap;
}
.profile-stats .icon { color: #fbbf24; font-size: 17px; }
.profile-stats strong { margin: 0 2px; color: #fff; font-size: 15px; }

.album-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 2px 20px; }
.album-kicker { display: block; margin-bottom: 3px; color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.album-heading h2 { margin: 0; color: var(--ink); font-family: "Noto Serif TC", serif; font-size: 19px; font-weight: 700; }
.album-controls { display: flex; align-items: center; gap: 8px; }
.album-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}
.album-select-wrap select {
  max-width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.button-new-album { min-height: 37px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.button-new-album:hover { background: var(--surface-soft); }
.preview-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 9px 12px;
  border: 1px solid rgba(217, 119, 6, .16);
  border-radius: 12px;
  background: rgba(255, 251, 235, .72);
  color: #92400e;
  font-size: 11px;
  line-height: 1.6;
}
.dark .preview-notice { background: rgba(66, 32, 6, .38); color: #fcd34d; }
.preview-notice > .icon { align-self: flex-start; margin-top: 2px; }
.preview-notice button { margin-left: auto; padding: 2px; border: 0; background: transparent; color: inherit; opacity: .6; }
.preview-notice button:hover { opacity: 1; }

.masonry-grid { column-count: 3; column-gap: 20px; }
.photo-card {
  break-inside: avoid;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.photo-card:hover { box-shadow: 0 8px 20px rgba(68, 64, 60, .12); }
.photo-open {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface-soft);
  cursor: zoom-in;
}
.photo-open img { display: block; width: 100%; height: auto; transition: transform .35s; }
.photo-open:hover img { transform: scale(1.018); }
.photo-body { padding: 15px 17px 12px; }
.photo-description { margin: 0; color: var(--text); font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.photo-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line-soft); }
.photo-date { color: var(--faint); font-size: 10px; }
.photo-actions { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
}
.card-action:hover { background: var(--surface-soft); color: var(--text); }
.card-action.delete:hover { background: rgba(153, 27, 27, .07); color: #dc2626; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 18px; background: var(--line); color: var(--faint); }
.empty-icon .icon { width: 30px; height: 30px; }
.empty-state h3 { margin: 0; color: var(--text); font-size: 14px; }
.empty-state p { margin: 6px 0 0; color: var(--faint); font-size: 12px; }
.upload-fab {
  position: fixed;
  right: 22px;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 21px;
  border: 2px solid rgba(252, 211, 77, .42);
  border-radius: 999px;
  background: var(--red-dark);
  color: #fef3c7;
  box-shadow: 0 9px 25px rgba(69, 26, 3, .3);
  font-family: "Noto Serif TC", serif;
  font-size: 15px;
  font-weight: 700;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
.upload-fab .icon { color: #fcd34d; font-size: 20px; }
.upload-fab:hover { background: #991b1b; box-shadow: 0 12px 28px rgba(69, 26, 3, .36); transform: translateY(-2px); }
.upload-fab:active { transform: scale(.96); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade-in .18s ease-out;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease-out;
}
.modal-card-small { max-width: 410px; }
.modal-close { position: absolute; top: 17px; right: 17px; padding: 6px; border: 0; border-radius: 9px; background: transparent; color: var(--faint); }
.modal-close:hover { background: var(--surface-soft); color: var(--ink); }
.modal-close .icon { width: 20px; height: 20px; }
.modal-title { margin: 0 30px 3px 0; color: var(--ink); font-family: "Noto Serif TC", serif; font-size: 19px; line-height: 1.55; }
.modal-subtitle { margin: 0 0 19px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.field { margin-bottom: 17px; }
.field-label { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 700; }
.field-label span { color: #dc2626; }
.field input, .field textarea, .share-link-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.7;
  outline: 0;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .share-link-box input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(153, 27, 27, .1); }
.dark .field input:focus, .dark .field textarea:focus { border-color: #d97706; box-shadow: 0 0 0 3px rgba(217, 119, 6, .13); }
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  padding: 17px;
  border: 2px dashed #fecaca;
  border-radius: 17px;
  background: rgba(254, 242, 242, .4);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.dark .drop-zone { border-color: #52525b; background: rgba(39, 39, 42, .45); }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--red); background: rgba(254, 226, 226, .35); }
.dark .drop-zone:hover, .dark .drop-zone.is-dragging { border-color: #fbbf24; }
.drop-zone > .icon { width: 29px; height: 29px; margin-bottom: 7px; color: #b91c1c; }
.dark .drop-zone > .icon { color: #fbbf24; }
.drop-zone strong { color: var(--text); font-size: 13px; }
.drop-zone small { margin-top: 4px; color: var(--faint); font-size: 11px; }
.image-preview { position: relative; overflow: hidden; max-height: 240px; margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); text-align: center; }
.image-preview img { display: block; width: 100%; max-height: 240px; object-fit: contain; }
.image-preview button { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; padding: 5px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .72); color: white; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.button-cancel { background: transparent; color: var(--muted); }
.button-cancel:hover { background: var(--surface-soft); }
.button-primary { background: var(--red-dark); color: #fef3c7; font-weight: 700; box-shadow: 0 3px 8px rgba(127, 29, 29, .16); }
.button-primary:hover { background: var(--red); }
.button-danger { background: #b91c1c; color: white; font-weight: 700; }
.button-danger:hover { background: #991b1b; }
.full-width { width: 100%; min-height: 42px; }

.lightbox { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; padding: 12px 20px 18px; background: rgba(0, 0, 0, .96); color: white; }
.lightbox-header { width: 100%; max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.lightbox-header span { padding: 5px 12px; border: 1px solid #27272a; border-radius: 999px; background: #18181b; color: #a8a29e; font-family: monospace; font-size: 12px; }
.lightbox-header button { padding: 8px; border: 0; border-radius: 50%; background: transparent; color: #a8a29e; }
.lightbox-header button:hover { color: white; }
.lightbox-header .icon { width: 25px; height: 25px; }
.lightbox-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.lightbox-stage img { max-width: min(100%, 950px); max-height: 68vh; object-fit: contain; border-radius: 12px; box-shadow: 0 20px 55px rgba(0, 0, 0, .45); }
.lightbox-arrow { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); display: grid; place-items: center; padding: 10px; border: 1px solid #3f3f46; border-radius: 50%; background: rgba(24, 24, 27, .8); color: white; }
.lightbox-arrow:hover { background: #27272a; }
.lightbox-arrow.left { left: 4px; }
.lightbox-arrow.right { right: 4px; }
.lightbox-arrow .icon { width: 25px; height: 25px; }
.lightbox-caption { width: 100%; max-width: 680px; max-height: 105px; overflow-y: auto; margin: 12px auto 0; padding: 15px 18px; border: 1px solid #27272a; border-radius: 17px; background: rgba(24, 24, 27, .92); color: #e7e5e4; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }

.modal-heading-icon { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.modal-heading-icon > span { display: grid; place-items: center; padding: 9px; border-radius: 12px; background: var(--gold-soft); color: var(--red); }
.modal-heading-icon .modal-title { margin: 0; font-size: 17px; }
.share-link-box { margin-bottom: 16px; padding: 15px; border: 1px solid rgba(217, 119, 6, .18); border-radius: 16px; background: var(--surface-warm); }
.share-link-box > label { display: block; margin-bottom: 7px; color: var(--text); font-size: 11px; font-weight: 700; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-width: 0; background: var(--surface); font-size: 11px; }
.copy-row .button { flex: 0 0 auto; }
.share-permission { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 17px; padding: 13px; border-radius: 14px; background: var(--surface-soft); color: var(--muted); }
.share-permission > .icon { margin-top: 3px; color: var(--red); }
.dark .share-permission > .icon { color: #fbbf24; }
.share-permission p { margin: 0; font-size: 11px; line-height: 1.8; }
.share-permission strong { color: var(--text); font-size: 12px; }
.avatar-upload { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border: 1px dashed var(--faint); border-radius: 13px; color: var(--muted); font-size: 12px; cursor: pointer; }
.avatar-upload:hover { background: var(--surface-soft); }
.login-mark { width: 43px; height: 43px; margin-bottom: 12px; display: grid; place-items: center; border-radius: 14px; background: var(--gold-soft); color: var(--red); }
.dark .login-mark { color: #fbbf24; }
.login-mark .icon { width: 22px; height: 22px; }
.demo-credentials { display: flex; align-items: center; gap: 7px; margin: -2px 0 15px; padding: 9px 11px; border-radius: 10px; background: var(--surface-warm); color: var(--muted); font-size: 11px; }
.demo-credentials strong { margin-right: auto; color: var(--text); }
.demo-credentials span { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-family: monospace; }
.form-error { margin: -3px 0 13px; color: #dc2626; font-size: 12px; }
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 11px 16px;
  border: 1px solid #3f3f46;
  border-radius: 15px;
  background: #1c1917;
  color: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .22);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity .25s, transform .25s;
}
.toast .icon { color: #34d399; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 900px) {
  .header-inner { padding: 0 18px; gap: 10px; }
  .header-actions { gap: 5px; }
  .button { padding: 8px 10px; }
  .brand-copy strong { font-size: 16px; }
  .main-content { padding: 24px 18px 95px; }
  .masonry-grid { column-count: 2; }
  .profile-banner { padding: 23px; }
  .profile-stats { align-self: flex-start; }
}

@media (max-width: 640px) {
  .site-header { height: 61px; }
  .header-inner { padding: 0 13px; }
  .brand { gap: 8px; }
  .brand-seal { padding: 5px 8px; font-size: 12px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { font-size: 9px; }
  .header-actions { gap: 3px; }
  .header-actions .button { min-height: 33px; padding: 7px 8px; }
  .header-actions .button span { display: none; }
  .header-actions .button-amber span, .header-actions .button-login span { display: inline; }
  .header-actions .button-login { font-size: 10px; }
  .header-actions .icon-button { padding: 7px; }
  .main-content { padding: 18px 13px 92px; }
  .profile-banner { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 20px; padding: 20px; border-radius: 21px; }
  .avatar { width: 62px; height: 62px; border-radius: 15px; font-size: 25px; }
  .profile-main { gap: 13px; }
  .profile-name-row h1 { font-size: 20px; }
  .profile-copy p { font-size: 11px; line-height: 1.75; }
  .profile-edit { padding: 4px 7px; font-size: 10px; }
  .profile-stats { padding: 7px 11px; font-size: 11px; }
  .album-toolbar { align-items: center; margin-bottom: 16px; }
  .album-heading h2 { max-width: 150px; font-size: 16px; }
  .album-select-wrap { max-width: 155px; }
  .album-select-wrap select { max-width: 110px; }
  .button-new-album span { display: none; }
  .preview-notice { font-size: 10px; }
  .masonry-grid { column-count: 1; column-gap: 0; }
  .photo-card { margin-bottom: 17px; border-radius: 16px; }
  .photo-description { font-size: 13px; }
  .upload-fab { right: 15px; bottom: max(17px, env(safe-area-inset-bottom)); padding: 13px 17px; font-size: 14px; }
  .modal { padding: 12px; }
  .modal-card { max-height: calc(100vh - 24px); padding: 22px 19px; border-radius: 21px; }
  .lightbox { padding: 9px 9px 14px; }
  .lightbox-stage img { max-height: 66vh; }
  .lightbox-arrow { padding: 8px; }
  .lightbox-caption { font-size: 12px; }
  .toast { top: 72px; right: 13px; }
}

@media (max-width: 390px) {
  .brand-copy small { display: none; }
  .brand-copy strong { max-width: 105px; overflow: hidden; text-overflow: ellipsis; }
  .header-actions .optional-action { display: none; }
  .profile-name-row { gap: 4px; }
  .album-kicker { display: none; }
  .copy-row { flex-direction: column; }
}

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