:root {
  color-scheme: light;
  --ink: #002b50;
  --ink-soft: #1f3a5f;
  --muted: #6b7c93;
  --line: #dde6f1;
  --line-soft: #eef3f9;
  --panel: #ffffff;
  --soft: #f3f7fc;
  --brand-50: #e6f7fe;
  --brand-100: #c0ebfc;
  --brand-300: #5fcef5;
  --brand: #12c3f4;
  --brand-500: #39a4dc;
  --brand-700: #0066ab;
  --brand-900: #003664;
  --accent: #ff4f7a;
  --accent-soft: #ffe6ec;
  --shadow-sm: 0 6px 18px rgba(0, 54, 100, .08);
  --shadow: 0 22px 60px rgba(0, 54, 100, .14);
  --shadow-brand: 0 10px 24px -6px rgba(0, 102, 171, .45);
  --radius: 14px;
  --radius-lg: 22px;
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at -10% -20%, rgba(18, 195, 244, .18), transparent 60%),
    radial-gradient(900px 500px at 110% 0%, rgba(0, 102, 171, .12), transparent 55%),
    radial-gradient(700px 400px at 50% 120%, rgba(57, 164, 220, .14), transparent 60%),
    var(--soft);
}

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font: inherit;
  font-family: inherit;
}

::selection { background: var(--brand-100); color: var(--brand-900); }

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, .85);
  border-bottom: 1px solid rgba(221, 230, 241, .8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: block;
  height: 38px;
  width: auto;
}

.brand-text {
  display: inline-flex;
  align-items: center;
  border-left: 2px solid var(--brand-100);
  padding-left: 12px;
}

.brand-text strong {
  font-weight: 800;
  font-size: 16px;
  color: var(--brand-900);
  letter-spacing: -.005em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: var(--line-soft);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.main-nav a {
  position: relative;
  min-width: 96px;
  padding: 9px 16px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}

.main-nav a:hover { color: var(--brand-700); }

.main-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-500) 60%, var(--brand-700) 100%);
  box-shadow: var(--shadow-brand);
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.view { display: none; }
.view.active { display: block; animation: viewIn .4s ease both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .92fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  min-height: clamp(500px, 58vh, 620px);
  padding: clamp(18px, 3vh, 34px) 0;
}

.hero-copy h1, .gallery-intro h1, .section-head h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 5.8vw, 72px);
  line-height: .98;
  letter-spacing: -.02em;
  font-weight: 800;
  color: var(--brand-900);
}

.section-head h1 { font-size: clamp(32px, 4.5vw, 50px); }

.grad {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-500) 50%, var(--brand-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy .lead, .gallery-intro .lead {
  max-width: 600px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.62;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 13px;
  color: var(--brand-900);
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #2fd37d;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(47, 211, 125, .16);
}

.quick-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.quick-flow span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(221, 230, 241, .92);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 12px;
  color: var(--brand-700);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 999px;
}

.hero-actions, .form-actions, .tool-group, .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions { margin-top: 28px; }

/* Buttons */
.button, .file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: .005em;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.button:hover, .file-button:hover, .folder-card:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }

.button.primary {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-500) 50%, var(--brand-700) 100%);
  background-clip: padding-box;
  box-shadow: var(--shadow-brand);
}

.button.primary:hover {
  box-shadow: 0 14px 30px -6px rgba(0, 102, 171, .55);
}

.button.ghost {
  color: var(--brand-700);
  background: rgba(255, 255, 255, .8);
  border-color: var(--brand-100);
}

.button.ghost:hover {
  background: #fff;
  border-color: var(--brand-300);
}

.button.subtle, .file-button {
  color: var(--brand-900);
  background: #fff;
  border-color: var(--line);
}

.button.subtle:hover, .file-button:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
}

/* Hero media */
.hero-media {
  position: relative;
  min-height: clamp(390px, 44vw, 500px);
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(0, 32, 60, .62), rgba(0, 102, 171, .24)),
    url("https://images.unsplash.com/photo-1520854221256-17451cc331bf?auto=format&fit=crop&w=1200&q=82") center/cover;
  box-shadow: 0 28px 70px rgba(0, 54, 100, .18);
  outline: 1px solid rgba(255, 255, 255, .72);
  outline-offset: -1px;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 45%, rgba(0, 32, 60, .18)),
    radial-gradient(circle at 24% 26%, rgba(255, 255, 255, .2), transparent 16%);
  pointer-events: none;
}

.photo-strip {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  z-index: 1;
}

.photo-strip span {
  display: block;
  aspect-ratio: 4 / 5;
  border: 3px solid rgba(255, 255, 255, .9);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, .18);
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 999px rgba(0, 43, 80, .14);
  backdrop-filter: blur(6px);
}

.photo-strip span:nth-child(1) {
  background-image: url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=360&q=78");
}

.photo-strip span:nth-child(2) {
  background-image: url("https://images.unsplash.com/photo-1520854221256-17451cc331bf?auto=format&fit=crop&w=360&q=78");
}

.photo-strip span:nth-child(3) {
  background-image: url("https://images.unsplash.com/photo-1511285560929-80b456fea0bc?auto=format&fit=crop&w=360&q=78");
}

.photo-strip span:nth-child(4) {
  background-image: url("https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=360&q=78");
}

.floating-panel {
  position: absolute;
  top: 22px;
  right: 22px;
  min-width: 160px;
  padding: 18px;
  color: #fff;
  background: rgba(0, 43, 80, .62);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  z-index: 1;
}

.floating-panel strong {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.floating-heart {
  position: absolute;
  top: clamp(54px, 13%, 72px);
  left: clamp(34px, 7%, 58px);
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 14px 40px rgba(255, 79, 122, .4);
  animation: floaty 3s ease-in-out infinite;
  z-index: 1;
}

.floating-heart svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-12px) rotate(6deg); }
}

/* Workspace + panels */
.workspace, .copy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 22px;
  margin-top: 12px;
}

/* Bước 1 và Bước 2 cao bằng nhau; content phân bố sát đỉnh + sát đáy */
.workspace, .copy-layout { align-items: stretch; }
.workspace .panel, .copy-layout .panel { display: flex; flex-direction: column; }
.workspace .form-simple { flex: 1; }
.workspace .form-simple > .form-row-bottom { margin-top: auto; }
.workspace .result-panel > .share-actions { margin-top: auto; }
/* Filter view: textarea tự kéo dài, filter-row sát đáy. Match-list cap chiều cao + scroll. */
.copy-layout .panel > .field.grow { flex: 1; min-height: 0; }
.copy-layout .panel > .field.grow > textarea { flex: 1; min-height: 180px; }
.copy-layout .panel > .filter-row { margin-top: auto; }
.copy-layout .match-list {
  flex: 1 1 0;
  min-height: 220px;
  max-height: 520px;
  overflow: auto;
}

.panel {
  padding: clamp(20px, 2.4vw, 28px);
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(221, 230, 241, .9);
  border-radius: 20px;
  box-shadow: 0 16px 44px rgba(0, 54, 100, .09);
  backdrop-filter: blur(16px);
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--brand-900);
  letter-spacing: -.015em;
}

/* Compact horizontal head: [Bước X] TIÊU ĐỀ UPPERCASE */
.section-head.row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-head.row .eyebrow { margin: 0; }

.section-head.row h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-900);
}

/* Bước 1 — form siêu gọn: 1 input drive + 1 row [khóa, submit] */
.form-simple {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.form-row-bottom .button {
  min-height: 48px;
  white-space: nowrap;
}

@media (max-width: 540px) {
  .form-row-bottom {
    grid-template-columns: 1fr;
  }
  .form-row-bottom .button { width: 100%; }
}

/* Form fields */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label, label.list-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-900);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}

.req {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.opt {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

.wide { grid-column: 1 / -1; }

input, textarea, select {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input::placeholder, textarea::placeholder {
  color: #a0adc2;
}

input, select { height: 48px; padding: 0 16px; }

textarea {
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.55;
  min-height: 110px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%230066ab' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

input:hover, textarea:hover, select:hover { border-color: var(--brand-300); }

input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(18, 195, 244, .18);
  background: #fff;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

/* Share box */
.share-box {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  margin: 6px 0 14px;
}

.share-box {
  margin-top: 4px;
}

.share-box input {
  font-size: 13.5px;
  color: var(--brand-700);
  background: var(--brand-50);
  border-color: var(--brand-100);
}

.share-box input::placeholder {
  color: #9eafc7;
  font-style: italic;
}

.icon-button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: .5;
  box-shadow: none;
  filter: saturate(.4);
}

.button:disabled:hover { transform: none; }

.share-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.share-actions .button { flex: 1; min-height: 44px; }

/* QR section — full width below workspace */
.qr-section {
  margin-top: 22px;
}

.qr-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
}

.qr-info { max-width: 460px; }
.qr-info .eyebrow { margin-bottom: 14px; }
.qr-info h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--brand-900);
}
.qr-info p { margin: 0 0 18px; }
#download-qr-btn { min-height: 44px; padding: 0 22px; }

.qr-canvas-wrap {
  display: grid;
  place-items: center;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.qr-canvas-wrap > div {
  width: 220px;
  height: 220px;
}

.qr-canvas-wrap canvas,
.qr-canvas-wrap img {
  display: block;
  width: 220px !important;
  height: 220px !important;
  max-width: 100%;
}

@media (max-width: 720px) {
  .qr-panel {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .qr-info { max-width: none; }
}

.icon-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  transition: transform .2s ease;
}

.icon-button:hover { transform: translateY(-2px); }

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats-grid div {
  min-height: 96px;
  padding: 18px;
  background: linear-gradient(150deg, var(--brand-50) 0%, #fff 100%);
  border: 1px solid var(--brand-100);
  border-radius: 14px;
}

.stats-grid strong {
  display: block;
  overflow: hidden;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brand-900);
  letter-spacing: -.01em;
}

.stats-grid span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

/* Gallery */
.gallery-shell {
  display: grid;
  gap: 22px;
}

.gallery-intro {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  min-height: 300px;
  padding: clamp(24px, 5vw, 48px);
  color: #fff;
  background:
    linear-gradient(95deg, rgba(0, 54, 100, .9) 0%, rgba(0, 102, 171, .55) 60%, rgba(18, 195, 244, .35) 100%),
    url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1600&q=82") center 42%/cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gallery-intro h1 { color: #fff; }
.gallery-intro .eyebrow {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.gallery-intro .lead { color: rgba(255, 255, 255, .88); }

/* Password gate card — hiện thay cho photo grid khi album bị khoá */
.access-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin: 8px auto 0;
  max-width: 480px;
  padding: 36px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.access-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  border-radius: 16px;
  box-shadow: 0 8px 20px -6px rgba(0, 102, 171, .55);
}

.access-icon svg { width: 26px; height: 26px; }

.access-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-900);
  letter-spacing: -.015em;
}

.access-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.access-form {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.access-form input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  font-size: 15px;
  letter-spacing: .04em;
  text-align: center;
}

.access-form .button {
  min-width: 120px;
  height: 48px;
  min-height: 48px;
}

@media (max-width: 540px) {
  .access-form { flex-direction: column; }
  .access-form .button { width: 100%; }
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.file-button input { display: none; }

.counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--brand-900);
  font-weight: 700;
  background: var(--accent-soft);
  border-radius: 999px;
  border: 1px solid #ffd5df;
}

.counter-heart {
  width: 16px;
  height: 16px;
  fill: var(--accent);
}

.counter strong {
  color: var(--accent);
  font-weight: 800;
}

.empty-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  padding: 36px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, .72);
  border: 1.5px dashed var(--brand-100);
  border-radius: var(--radius-lg);
}

.empty-state strong {
  color: var(--brand-900);
  font-size: 22px;
  font-weight: 800;
}

/* Photo grid + heart interactions */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.photo-sentinel {
  height: 1px;
  margin-top: 8px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #d9e2ee;
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(0, 54, 100, .22);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

.photo-card:hover img { transform: scale(1.06); }

.photo-card.image-error img { display: none; }
.photo-card.image-error {
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.photo-card.selected {
  box-shadow: 0 0 0 3px var(--accent), 0 18px 40px rgba(255, 79, 122, .25);
}

.photo-card.selected img { filter: saturate(1.05); }

.photo-card .caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 38px 14px 12px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  background: linear-gradient(transparent, rgba(0, 32, 60, .72));
  pointer-events: none;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
  padding: 28px;
  background: rgba(0, 18, 34, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-frame {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: 0;
  margin: 0;
}

.lightbox-frame img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 112px);
  object-fit: contain;
  background: rgba(255, 255, 255, .06);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
}

.lightbox-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(760px, 100%);
  padding: 6px 18px 6px 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .3);
}

.lightbox-frame figcaption {
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .005em;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 6px;
}

/* Common style: close / prev / next / heart — pill icon buttons với glass effect */
.lightbox-close,
.lightbox-nav,
.lightbox-heart {
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(15, 25, 42, .55);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: background .2s ease, border-color .2s ease, transform .15s ease, color .2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, .96);
  border-color: rgba(255, 255, 255, .96);
  color: var(--brand-900);
  transform: scale(1.06);
}

.lightbox-close:active,
.lightbox-nav:active,
.lightbox-heart:active { transform: scale(.96); }

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
}

.lightbox-close svg { width: 22px; height: 22px; }

.lightbox-nav {
  width: 56px;
  height: 56px;
  justify-self: center;
}

.lightbox-nav svg { width: 26px; height: 26px; }

/* Heart button trong caption pill */
.lightbox-heart {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .26);
  flex-shrink: 0;
}

.lightbox-heart svg {
  width: 20px;
  height: 20px;
  transition: fill .25s ease, stroke .25s ease;
}

.lightbox-heart:hover {
  background: rgba(255, 255, 255, .96);
  color: var(--accent);
  border-color: #fff;
  transform: scale(1.06);
}

.lightbox-heart.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 79, 122, .55);
}

.lightbox-heart.is-selected svg {
  fill: currentColor;
  stroke: currentColor;
  animation: heartPop .55s cubic-bezier(.18, .89, .32, 1.28);
}

/* Heart button */
.heart-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #fff;
  background: rgba(0, 32, 60, .35);
  border: 1.5px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  z-index: 2;
}

.heart-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill .25s ease, stroke .25s ease;
}

.heart-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, .92);
  color: var(--accent);
  border-color: #fff;
}

.photo-card.selected .heart-btn {
  background: #fff;
  color: var(--accent);
  border-color: #fff;
  box-shadow: 0 8px 24px rgba(255, 79, 122, .45);
}

.photo-card.selected .heart-btn svg {
  fill: var(--accent);
  stroke: var(--accent);
  animation: heartPop .55s cubic-bezier(.18, .89, .32, 1.28);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  60% { transform: scale(.85); }
  100% { transform: scale(1); }
}

/* Heart burst particles */
.heart-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 3;
}

.heart-burst span {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  color: var(--accent);
  animation: burst 700ms ease-out forwards;
  opacity: 0;
}

.heart-burst span svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  filter: drop-shadow(0 4px 8px rgba(255, 79, 122, .5));
}

.heart-burst span:nth-child(1) { --tx: -50px; --ty: -60px; --rot: -25deg; --s: 1; }
.heart-burst span:nth-child(2) { --tx: 50px;  --ty: -55px; --rot: 25deg;  --s: .85; animation-delay: 60ms; }
.heart-burst span:nth-child(3) { --tx: -65px; --ty: 10px;  --rot: -45deg; --s: .7;  animation-delay: 30ms; }
.heart-burst span:nth-child(4) { --tx: 70px;  --ty: 5px;   --rot: 40deg;  --s: .9;  animation-delay: 90ms; }
.heart-burst span:nth-child(5) { --tx: 0px;   --ty: -80px; --rot: 0deg;   --s: 1.1; animation-delay: 40ms; }
.heart-burst span:nth-child(6) { --tx: -25px; --ty: 60px;  --rot: -15deg; --s: .75; animation-delay: 110ms; }

@keyframes burst {
  0%   { opacity: 0; transform: translate(0, 0) scale(.2) rotate(0deg); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(var(--s)) rotate(var(--rot)); }
}

/* Ripple on tap */
.heart-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: rgba(255, 79, 122, .35);
  pointer-events: none;
  animation: ripple 700ms ease-out forwards;
  z-index: 1;
}

@keyframes ripple {
  to {
    transform: scale(14);
    opacity: 0;
  }
}

/* Copy view */
.copy-layout { margin-top: 14px; }

.copy-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 18px;
}

.folder-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 124px;
  padding: 18px 20px;
  text-align: left;
  background: linear-gradient(150deg, #fff 0%, var(--brand-50) 100%);
  border: 1.5px solid var(--brand-100);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.folder-card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
}

.folder-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  border-radius: 14px;
  box-shadow: 0 6px 16px -4px rgba(0, 102, 171, .45);
  flex-shrink: 0;
}

.folder-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.folder-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.folder-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: #fff;
  border-radius: 999px;
  border: 1px solid var(--brand-100);
}

.folder-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand-900);
}

.filter-row {
  margin-top: 18px;
  align-items: end;
}
.filter-row .field { min-width: 200px; flex: 1; }
.filter-row .button { height: 48px; min-height: 48px; }

.match-list {
  overflow: auto;
  max-height: 460px;
  margin-top: 16px;
  padding: 16px;
  color: var(--ink-soft);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.7;
  font-size: 14px;
}

.match-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.match-row strong {
  color: var(--brand-700);
  font-weight: 700;
}

.match-row:last-child { border-bottom: 0; }

/* Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  font-weight: 600;
  font-size: 14px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 920px) {
  .hero, .workspace, .copy-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 14px; }
  .hero-media { min-height: 400px; }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .main-nav, .toolbar, .gallery-intro { width: 100%; }
  .main-nav a { flex: 1; min-width: 0; }

  .gallery-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-group { justify-content: space-between; }
}

@media (max-width: 580px) {
  main {
    width: min(100% - 16px, 1180px);
    padding-top: 18px;
  }

  .hero-copy h1, .gallery-intro h1 { font-size: 38px; }

  .form-grid, .copy-steps { grid-template-columns: 1fr; }

  .wide { grid-column: auto; }

  .stats-grid { grid-template-columns: 1fr; }

  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  .heart-btn { width: 38px; height: 38px; }
  .heart-btn svg { width: 18px; height: 18px; }

  .lightbox {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 6px;
    padding: 16px 10px;
  }

  .lightbox-close { top: 14px; right: 14px; width: 40px; height: 40px; }
  .lightbox-close svg { width: 18px; height: 18px; }

  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-nav svg { width: 22px; height: 22px; }

  .lightbox-heart { width: 36px; height: 36px; }
  .lightbox-heart svg { width: 18px; height: 18px; }

  .lightbox-frame img {
    max-height: calc(100vh - 96px);
  }

}

/* ====================== Auth area / topbar ====================== */
.topbar {
  flex-wrap: wrap;
}

.auth-area {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.user-chip { position: relative; }

.user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.user-toggle:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
}

.user-toggle .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.user-meta strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-900);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta small {
  font-size: 11px;
  color: var(--muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 50;
}

.user-menu a, .user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.user-menu a:hover, .user-menu button:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

/* ====================== Login view ====================== */
.auth-layout {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 200px);
  padding: 30px 0;
}

.auth-card {
  width: min(440px, 100%);
  padding: 36px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 8px 0 8px;
  font-size: 32px;
  font-weight: 800;
  color: var(--brand-900);
  letter-spacing: -.02em;
}

.button.google {
  width: 100%;
  margin-top: 22px;
  gap: 12px;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  font-weight: 700;
}

.button.google:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
}

.auth-or {
  position: relative;
  margin: 26px 0 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.auth-or::before, .auth-or::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 30px);
  height: 1px;
  background: var(--line);
}
.auth-or::before { left: 0; }
.auth-or::after  { right: 0; }

.auth-details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--soft);
}

.auth-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand-700);
  font-size: 14px;
}

.auth-details[open] { padding-bottom: 18px; }
.auth-details form { margin-top: 14px; display: grid; gap: 14px; }

/* ====================== Dashboard ====================== */
.dashboard-stats { margin: 22px 0 26px; }
.dashboard-stats .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .dashboard-stats .stats-grid { grid-template-columns: 1fr; }
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.album-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0, 54, 100, .15);
}

.album-cover {
  height: 160px;
  background: linear-gradient(135deg, var(--brand-100) 0%, var(--brand-50) 100%);
  background-size: cover;
  background-position: center;
}

.album-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.album-body h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-900);
  letter-spacing: -.005em;
}

.album-body .muted { font-size: 12.5px; }

.album-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}

.album-stats strong {
  color: var(--brand-700);
  font-weight: 700;
}

.tag-lock {
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  border-radius: 999px;
}

.album-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.album-actions .button {
  flex: 1;
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

/* ====================== Admin ====================== */
.admin-stats { margin: 18px 0 26px; }
.admin-stats .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 920px) {
  .admin-grid { grid-template-columns: 1fr; }
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
}

.copy-row input {
  font-size: 13px;
  background: var(--soft);
  color: var(--brand-700);
}

#oauth-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.cover-preview {
  display: grid;
  place-items: center;
  height: 160px;
  margin: 16px 0;
  background: var(--soft);
  background-size: cover;
  background-position: center;
  border: 1.5px dashed var(--brand-100);
  border-radius: var(--radius);
}

.cover-preview.has-image {
  border-style: solid;
  border-color: var(--brand-100);
}

.admin-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media (max-width: 720px) {
  .admin-tables { grid-template-columns: 1fr; }
}

.admin-tables h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-900);
  letter-spacing: .01em;
  text-transform: uppercase;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.admin-row strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-900);
}

.admin-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.admin-row-stats {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.admin-row-stats .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-row .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}

@media (max-width: 720px) {
  .user-meta { display: none; }
  .user-toggle { padding: 4px; }
  .auth-area .button.ghost { min-height: 40px; padding: 0 14px; font-size: 13px; }
}

/* ====================== Modal (edit album) ====================== */
body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 18, 34, .58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 80px rgba(0, 18, 34, .35);
  animation: modalIn .22s ease-out both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}

.modal-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--brand-900);
}

.modal-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.modal-close svg { width: 18px; height: 18px; }

.modal-close:hover {
  background: var(--brand-50);
  border-color: var(--brand-300);
  color: var(--brand-700);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 24px 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.checkbox-row input { width: 18px; height: 18px; accent-color: var(--brand-700); }

/* Danger button — backup style nếu cần dùng inline */
.button.danger {
  color: #b91c1c;
  background: #fff;
  border: 1px solid #fecaca;
}

.button.danger:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
}

/* Album-actions: 2 nút primary (Mở / Copy link) chia đều */
.album-actions { gap: 8px; }
.album-actions .button {
  flex: 1 1 0;
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

/* Kebab menu trên cover */
.album-card .album-cover { position: relative; }

.album-menu-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: rgba(255, 255, 255, .7);
  border: 0;
  border-radius: 50%;
  color: rgba(0, 54, 100, .55);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
  opacity: .85;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.album-card:hover .album-menu-btn,
.album-menu-btn:focus-visible,
.album-menu-btn[aria-expanded="true"] {
  opacity: 1;
}

.album-menu-btn:hover {
  background: #fff;
  color: var(--brand-700);
}

.album-menu-btn[aria-expanded="true"] {
  background: var(--brand-700);
  color: #fff;
}

.album-menu-btn svg { width: 16px; height: 16px; }

.album-menu {
  position: absolute;
  top: 50px;
  right: 10px;
  z-index: 5;
  min-width: 180px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 42px rgba(0, 18, 34, .25);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: albumMenuIn .15s ease-out;
}

@keyframes albumMenuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.album-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: background .15s ease, color .15s ease;
}

.album-menu button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.album-menu button:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.album-menu button.danger { color: #b91c1c; }
.album-menu button.danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 540px) {
  .modal { padding: 12px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
}
