/* ==========================================================================
   光影集 · Photo Album — UI stylesheet
   ========================================================================== */

:root {
  --bg: #f7f4ef;
  --bg-soft: #eee8df;
  --surface: #ffffff;
  --surface-2: #fbf9f6;
  --surface-3: #f3eee7;
  --ink: #22242a;
  --ink-soft: #4a4e58;
  --muted: #8b8e97;
  --line: #e7e1d8;
  --line-strong: #d8d1c6;
  --accent: #ff6b4a;
  --accent-2: #ff3d81;
  --accent-soft: #fff0eb;
  --accent-ink: #c2410c;
  --success: #19a463;
  --danger: #e5484d;
  --shadow: 0 16px 44px rgba(34, 36, 42, 0.1);
  --shadow-sm: 0 3px 14px rgba(34, 36, 42, 0.07);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --sidebar-w: 250px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #14151a;
  --bg-soft: #1c1e25;
  --surface: #202229;
  --surface-2: #262932;
  --surface-3: #2e323d;
  --ink: #f2f3f7;
  --ink-soft: #c7cad4;
  --muted: #8e939f;
  --line: #33363f;
  --line-strong: #434752;
  --accent: #ff7d5c;
  --accent-2: #ff5b96;
  --accent-soft: #34262a;
  --accent-ink: #ffb4a2;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[v-cloak] {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 9px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
}
.boot-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px rgba(255, 77, 120, 0.32);
  animation: bootPulse 1.4s ease-in-out infinite;
}
@keyframes bootPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.82; }
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  background: var(--surface-3);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 17px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:hover {
  background: var(--line);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 77, 120, 0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: brightness(1.04);
  box-shadow: 0 10px 28px rgba(255, 77, 120, 0.36);
}
.btn-soft {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.btn-soft:hover {
  background: var(--accent-soft);
  filter: brightness(0.97);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}
.btn-danger {
  background: transparent;
  border-color: rgba(229, 72, 77, 0.32);
  color: var(--danger);
}
.btn-danger:hover {
  background: rgba(229, 72, 77, 0.1);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
}
.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.icon-btn:hover {
  background: var(--surface-3);
  color: var(--ink);
}
.icon-btn:active {
  transform: scale(0.94);
}


.icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.icon svg {
  width: 100%;
  height: 100%;
}
.icon-lg {
  width: 22px;
  height: 22px;
}

/* floating upload action: only rendered on small screens */
.fab {
  display: none;
}

/* -------------------------------------------------------------------- forms */

.field {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field::placeholder {
  color: var(--muted);
}
.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.14);
}
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px 2px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}
textarea.field {
  resize: vertical;
  min-height: 74px;
}
select.field {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.switch {
  position: relative;
  width: 44px;
  height: 25px;
  border-radius: 999px;
  background: var(--line-strong);
  border: none;
  padding: 0;
  transition: background 0.18s ease;
  flex: 0 0 auto;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease;
}
.switch.on {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.switch.on::after {
  transform: translateX(19px);
}

/* ------------------------------------------------------------------- login */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg);
}
.login-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #1f2233 0%, #3a2540 46%, #7a2f35 100%);
  color: #fff;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-hero::before,
.login-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0.7;
}
.login-hero::before {
  width: 460px;
  height: 460px;
  right: -160px;
  top: -120px;
  background: radial-gradient(circle, rgba(255, 122, 89, 0.75), transparent 66%);
}
.login-hero::after {
  width: 380px;
  height: 380px;
  left: -120px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(255, 61, 129, 0.6), transparent 68%);
}
.hero-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
}
.hero-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(255, 77, 120, 0.4);
}
.hero-copy {
  position: relative;
  max-width: 430px;
}
.hero-copy h1 {
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.16;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15.5px;
  line-height: 1.75;
}
.hero-points {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-point {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.86);
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}
.login-card {
  width: min(400px, 100%);
  background: var(--surface);
  border-radius: 24px;
  padding: 34px 32px 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.login-card h2 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.login-card .sub {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 24px;
}
.login-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-3);
  border-radius: 999px;
  margin-bottom: 22px;
}
.login-tab {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.login-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.error-text {
  color: var(--danger);
  font-size: 13px;
  margin: 0 0 12px;
  background: rgba(229, 72, 77, 0.08);
  border-radius: 8px;
  padding: 8px 11px;
}
.login-footnote {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ----------------------------------------------------------------- app shell */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  overflow-y: auto;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(255, 77, 120, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.brand-mark .icon {
  width: 20px;
  height: 20px;
}
.brand-text {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
}
.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.side-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s ease;
}
.side-new:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.side-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 0 8px;
}
.side-empty {
  font-size: 12.5px;
  color: var(--muted);
  padding: 6px 10px;
}
.side-album {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 10px;
  border: none;
  background: transparent;
  text-align: left;
  transition: background 0.15s ease;
  min-width: 0;
}
.side-album:hover {
  background: var(--surface-3);
}
.side-album.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.side-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex: 0 0 auto;
}
.side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-meta {
  min-width: 0;
  flex: 1;
}
.side-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-count {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}
.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.storage-card {
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 11px 12px;
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.storage-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(25, 164, 99, 0.16);
}
.dot.warn {
  background: #e6a700;
  box-shadow: 0 0 0 3px rgba(230, 167, 0, 0.16);
}
.storage-sub {
  color: var(--muted);
  font-size: 11.5px;
  word-break: break-all;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 11px;
}
.user-main {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.user-main:hover {
  background: var(--surface-3);
}
.user-row .icon-btn {
  width: 32px;
  height: 32px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #6d5efc, #ff3d81);
  flex: 0 0 auto;
}
.user-name {
  min-width: 0;
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 34px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  border-bottom-color: var(--line);
}
.topbar-title {
  flex: 1;
  min-width: 0;
}
.topbar-title h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.menu-btn {
  display: none;
}

.content {
  padding: 6px 34px 80px;
  flex: 1;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- album grid */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 2px 14px;
}
.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.section-head span {
  font-size: 12.5px;
  color: var(--muted);
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 34px;
}
.album-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.album-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.album-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, var(--surface-3), var(--bg-soft));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.album-card:hover .album-cover img {
  transform: scale(1.045);
}
.album-cover .icon {
  color: var(--muted);
  width: 34px;
  height: 34px;
  opacity: 0.55;
}
.album-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.55);
  color: #fff;
  backdrop-filter: blur(8px);
}
.album-info {
  padding: 13px 15px 15px;
}
.album-name {
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.album-sub .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.6;
}
.new-card {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 210px;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.18s ease;
}
.new-card:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.new-card .plus-wrap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.new-card:hover .plus-wrap {
  background: #fff;
}

/* ------------------------------------------------------------- album toolbar */

.album-hero {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin: 4px 0 20px;
}
.album-hero-text {
  flex: 1;
  min-width: 0;
}
.album-hero-text .eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.album-hero-text h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
}
.album-desc {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0;
  white-space: pre-wrap;
}
.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hero-actions .btn {
  padding: 8px 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 170px;
  padding: 0 12px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--muted);
}
.search-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  color: var(--ink);
  font-size: 13.5px;
}
.filters {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-3);
}
.filter-chip {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s ease;
}
.filter-chip.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.toolbar select.field {
  width: auto;
  padding: 7px 34px 7px 12px;
  font-size: 13px;
  border-radius: 10px;
  background-color: var(--surface-3);
  border-color: transparent;
}

/* ------------------------------------------------------------------- assets */

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.asset-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
  display: block;
}
.asset-cell:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.asset-cell.selected {
  outline: 3px solid var(--accent);
  outline-offset: -2px;
}
.asset-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.asset-media.loaded {
  opacity: 1;
}
.asset-file-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: linear-gradient(140deg, var(--surface-3), var(--bg-soft));
  padding: 14px;
}
.asset-file-face .icon {
  width: 30px;
  height: 30px;
  opacity: 0.7;
}
.asset-file-name {
  font-size: 11.5px;
  color: var(--ink-soft);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}
.asset-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 18, 24, 0.42), transparent 34%, transparent 55%, rgba(16, 18, 24, 0.62));
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 9px;
  pointer-events: none;
}
.asset-cell:hover .asset-overlay,
.asset-cell.selected .asset-overlay {
  opacity: 1;
}
.asset-topline {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.checkbox {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  background: rgba(20, 22, 28, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: auto;
  padding: 0;
}
.checkbox.on {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox .icon {
  width: 12px;
  height: 12px;
}
.asset-footline {
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-kind-pill {
  position: absolute;
  top: 9px;
  left: 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.5);
  color: #fff;
  backdrop-filter: blur(6px);
  text-transform: uppercase;
  pointer-events: none;
}
.load-more {
  display: flex;
  justify-content: center;
  margin: 26px 0 8px;
}

/* batch bar */
.batch-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: riseIn 0.24s ease;
}
@keyframes riseIn {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.batch-count {
  font-size: 13px;
  font-weight: 700;
  padding-right: 4px;
  white-space: nowrap;
}
.batch-count em {
  color: var(--accent);
  font-style: normal;
}

/* -------------------------------------------------------------- drag & drop */

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 22, 28, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}
.drop-inner {
  width: min(560px, 92vw);
  border-radius: 24px;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  padding: 46px 30px;
  text-align: center;
  color: #fff;
}
.drop-inner .icon {
  width: 46px;
  height: 46px;
  opacity: 0.85;
}
.drop-inner h3 {
  margin: 12px 0 4px;
  font-size: 20px;
}
.drop-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- upload dock */

.upload-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: min(390px, calc(100vw - 32px));
  z-index: 60;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: riseIn 0.25s ease;
}
.upload-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.upload-head h4 {
  margin: 0;
  font-size: 13.5px;
  flex: 1;
}
.upload-head .sub {
  font-size: 11.5px;
  color: var(--muted);
}
.upload-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.upload-item {
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--surface-2);
}
.upload-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.upload-file-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex: 0 0 auto;
}
.upload-file-icon .icon {
  width: 14px;
  height: 14px;
}
.upload-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-state {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.upload-state.done { color: var(--success); }
.upload-state.error { color: var(--danger); }
.progress-track {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}
.upload-actions {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.mini-actions {
  display: flex;
  gap: 4px;
}
.mini-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 6px;
}
.mini-btn:hover {
  background: var(--surface-3);
  color: var(--ink);
}

/* upload queue tabs & states */
.upload-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 10px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.upload-tabs::-webkit-scrollbar {
  display: none;
}
.upload-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  padding: 7px 10px 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
}
.upload-tab.active {
  color: var(--ink);
  background: var(--surface-2);
}
.upload-tab .count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.upload-tab.active .count {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.upload-tab .count.danger {
  background: rgba(229, 72, 77, 0.12);
  color: var(--danger);
}
.upload-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.upload-head .sub .fail {
  color: var(--danger);
  font-weight: 600;
}
.upload-head .icon-btn {
  width: 30px;
  height: 30px;
}
.upload-state.error {
  color: var(--danger);
}
.upload-state.paused {
  color: #b7791f;
}
.upload-error {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--danger);
  word-break: break-all;
  line-height: 1.45;
}
.upload-meta {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}
.upload-check {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: #fff;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.upload-check.on {
  background: var(--accent);
  border-color: var(--accent);
}
.upload-check .icon {
  width: 11px;
  height: 11px;
}
.upload-item.selected {
  box-shadow: inset 0 0 0 1px rgba(255, 107, 74, 0.45);
}
.upload-batch-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.mini-btn.danger {
  color: var(--danger);
}
.mini-btn.retry {
  color: var(--accent-ink);
  font-weight: 700;
}
.progress-fill.error {
  background: var(--danger);
}
.progress-fill.paused {
  background: #e6a700;
}

.upload-pill {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 11px 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  animation: riseIn 0.2s ease;
}
.upload-pill.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.upload-pill.error {
  background: var(--danger);
}
.upload-pill.paused {
  background: #c98a12;
}
.upload-pill.done {
  background: var(--ink);
}
.upload-pill .icon {
  width: 16px;
  height: 16px;
}
.upload-pill-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ----------------------------------------------------------------- modals */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 20, 26, 0.48);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  width: min(480px, 100%);
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  animation: popIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 6px;
}
.modal-head h3 {
  margin: 0;
  font-size: 17px;
  flex: 1;
}
.modal-body {
  padding: 12px 20px 18px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 20px 20px;
}
.modal-wide {
  width: min(620px, 100%);
}


.share-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.share-toggle-row .text {
  flex: 1;
}
.share-toggle-row strong {
  display: block;
  font-size: 13.5px;
}
.share-toggle-row small {
  color: var(--muted);
  font-size: 12px;
}
.share-link-row {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
}
.share-link-row .field {
  font-size: 12px;
  padding: 9px 12px;
}
.share-perm {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-top: 1px solid var(--line);
}
.share-perm .text {
  flex: 1;
  font-size: 13px;
  color: var(--ink-soft);
}
.member-search {
  display: flex;
  gap: 7px;
  margin-bottom: 8px;
}
.member-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 6px;
}
.member-row .avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
}
.member-info {
  flex: 1;
  min-width: 0;
}
.member-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-name small {
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
}
.member-perm-label {
  font-size: 11.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.empty-mini {
  font-size: 12.5px;
  color: var(--muted);
  padding: 10px 2px;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}

.setting-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 18px;
}
.setting-block h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

/* ---------------------------------------------------------------- lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(12, 13, 17, 0.94);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.16s ease;
}
.lb-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 14px;
  background: linear-gradient(180deg, rgba(8, 9, 12, 0.9), rgba(8, 9, 12, 0.55) 68%, rgba(8, 9, 12, 0));
  color: rgba(255, 255, 255, 0.92);
}
.lb-title {
  min-width: 0;
  flex: 1;
}
.lb-title strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-title small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
}
.lb-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease;
}
.lb-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.lb-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px 60px;
}
.lb-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  transition: transform 0.22s ease;
  user-select: none;
  cursor: zoom-in;
}
.lb-image.zoomed {
  transform: scale(1.7);
  cursor: zoom-out;
}
.lb-media {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
}
.lb-frame {
  width: min(900px, 92%);
  height: 88%;
  border: none;
  border-radius: 8px;
  background: #fff;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  z-index: 2;
}
.lb-nav:hover {
  background: rgba(255, 255, 255, 0.18);
}
.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }
.lb-nav:disabled { opacity: 0.25; cursor: default; }
.lb-file {
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}
.lb-file .icon {
  width: 54px;
  height: 54px;
  opacity: 0.7;
  margin-bottom: 10px;
}
.lb-file h4 {
  color: #fff;
  margin: 0 0 4px;
  font-size: 16px;
  word-break: break-all;
}
.lb-file p {
  margin: 0 0 16px;
  font-size: 12.5px;
}

/* -------------------------------------------------------------------- toast */

.toast-stack {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(24, 26, 32, 0.9);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: toastIn 0.22s ease;
  max-width: min(88vw, 480px);
}
.toast.error {
  background: rgba(190, 40, 47, 0.94);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------- empty / misc */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--muted);
}
.empty-icon .icon {
  width: 34px;
  height: 34px;
  opacity: 0.6;
}
.empty-state h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
}
.empty-state p {
  margin: 0 0 18px;
  font-size: 13px;
  max-width: 360px;
}
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.skeleton {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, var(--surface-3) 30%, var(--surface) 50%, var(--surface-3) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.spinner.dark {
  border-color: var(--line-strong);
  border-top-color: var(--accent);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.center-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.mobile-backdrop {
  display: none;
}

/* -------------------------------------------------------------- public share */

.share-page {
  min-height: 100vh;
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(255, 107, 74, 0.09), transparent),
    var(--bg);
}
.share-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 30px 70px;
}
.share-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.share-head .avatar.big {
  width: 46px;
  height: 46px;
  font-size: 16px;
  border-radius: 14px;
}
.share-head-copy {
  flex: 1;
  min-width: 0;
}
.share-head-copy .eyebrow {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.share-head-copy h1 {
  margin: 4px 0 6px;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.02em;
  word-break: break-word;
}
.share-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
}
.share-foot {
  margin-top: 50px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.share-foot strong {
  color: var(--ink-soft);
}
.share-banner {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-top: 30px;
}

.share-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.share-login-link {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.share-login-link:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  .content {
    padding: 6px 22px 70px;
  }
  .topbar {
    padding: 15px 22px;
  }
  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
  }
  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 9px;
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    transform: translateX(-102%);
    transition: transform 0.26s cubic-bezier(0.3, 0.8, 0.3, 1);
    box-shadow: var(--shadow);
    z-index: 80;
  }
  .sidebar.open {
    transform: none;
  }
  .mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(16, 18, 24, 0.42);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
  }
  .menu-btn {
    display: inline-flex;
  }
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-hero {
    padding: 34px 26px 30px;
    min-height: 250px;
    gap: 30px;
  }
  .hero-points { display: none; }
  .hero-copy h1 { font-size: 28px; }
  .login-panel {
    padding: 22px 18px 40px;
    margin-top: -34px;
  }
  .login-card {
    padding: 26px 22px;
    box-shadow: var(--shadow);
  }
  .album-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }
  .hero-actions {
    justify-content: flex-start;
    gap: 8px;
  }
  .hero-actions .btn {
    height: 42px;
    padding: 0 16px;
    font-size: 14px;
  }
  .hero-actions .btn-primary {
    flex: 1 1 100%;
  }
  .hero-actions .btn-ghost {
    flex: 1 1 0;
  }
  .hero-actions .icon-btn {
    width: 42px;
    height: 42px;
    background: var(--surface-3);
  }
  .topbar {
    padding: 12px 16px;
    gap: 8px;
  }
  .content {
    padding: 2px 16px calc(96px + env(safe-area-inset-bottom));
  }
  .toolbar {
    padding: 9px;
    gap: 8px;
    align-items: stretch;
  }
  .search-wrap {
    flex: 1 1 100%;
    height: 40px;
  }
  .filters {
    flex: 1 1 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar {
    display: none;
  }
  .filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 7px 13px;
  }
  .toolbar select.field {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .toolbar .btn-sm {
    padding: 8px 16px;
  }
  .field,
  .search-wrap input {
    font-size: 16px;
  }
  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(31vw, 1fr));
    gap: 7px;
  }
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .album-cover { aspect-ratio: 1 / 1; }
  .upload-dock {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .upload-pill {
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .batch-bar {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    transform: none;
    justify-content: flex-start;
    flex-wrap: wrap;
    border-radius: 16px;
    gap: 8px;
    padding: 10px 12px;
  }
  .batch-count { flex: 1 1 100%; }
  .fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 12px 30px rgba(255, 77, 120, 0.4);
    z-index: 55;
    transition: transform 0.16s ease;
  }
  .fab:active {
    transform: scale(0.94);
  }
  .modal-mask {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
    animation: sheetUp 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
  }
  @keyframes sheetUp {
    from { opacity: 0.5; transform: translateY(36px); }
    to { opacity: 1; transform: none; }
  }

  .lightbox {
    height: 100dvh;
  }
  .lightbox .lb-stage {
    padding: 4px;
  }
  .lb-top {
    gap: 8px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  }
  .lb-nav {
    width: 40px;
    height: 40px;
  }
  .lb-actions .lb-btn > span:not(.icon) { display: none; }
  .lb-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
  }
  .lb-btn:active {
    background: rgba(255, 255, 255, 0.32);
  }
  .lb-title strong { font-size: 13px; }
  .share-shell {
    padding: 20px 16px 60px;
  }
  .share-head {
    flex-wrap: wrap;
  }
  .share-head-actions {
    width: 100%;
  }
  .share-head-actions .btn {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .album-hero-text h2 {
    font-size: 26px;
  }
  .hero-actions .btn {
    height: 44px;
  }
  .hero-actions .btn-ghost {
    flex: 1 1 auto;
    padding: 0 12px;
  }
  .hero-actions .btn-ghost span {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* selection mode tweaks */
.asset-grid.selecting .asset-overlay { opacity: 1; }
.asset-grid.selecting .asset-cell { cursor: pointer; }

body {
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 861px) {
  .topbar { display: none; }
  .content { padding-top: 22px; }
}
