/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f5f0eb;
  --white:    #ffffff;
  --card-bg:  #ffffff;
  --text:     #1a1209;
  --muted:    #8a7d70;
  --soft:     #c4b5a8;
  --rose:     #d4626a;
  --rose-d:   #b84f57;
  --rose-l:   #fdf0f1;
  --amber:    #d4906a;
  --border:   #ede0d4;
  --radius:   20px;
  --radius-sm:12px;
  --shadow:   0 2px 16px rgba(26,18,9,0.07);
  --shadow-md:0 8px 40px rgba(26,18,9,0.13);
  --shadow-lg:0 20px 60px rgba(26,18,9,0.18);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Lora', Georgia, serif; }
.hidden { display: none !important; }

/* ── Login ────────────────────────────────────────────────────────────────── */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(145deg, #fdf0e0 0%, #f5ddd5 50%, #ede4f0 100%);
  padding: 24px;
}

.login-box {
  background: var(--white);
  border-radius: 28px;
  padding: 52px 44px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo {
  font-size: 52px;
  margin-bottom: 14px;
  line-height: 1;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.login-box h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--rose-d);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.6;
}

#login-form, #email-form { display: flex; flex-direction: column; gap: 12px; }

#login-form input, #email-form input {
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 17px;
  text-align: center;
  letter-spacing: 1px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
#login-form input:focus, #email-form input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(212,98,106,0.12);
}

#login-form button, #email-form button[type="submit"] {
  padding: 14px;
  background: linear-gradient(135deg, var(--rose), var(--rose-d));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  font-family: inherit;
}
#login-form button:hover, #email-form button[type="submit"]:hover { opacity: 0.9; }
#login-form button:active, #email-form button[type="submit"]:active { transform: scale(0.98); }

.btn-link {
  background: none; border: none;
  color: var(--muted); font-size: 14px;
  cursor: pointer; margin-top: 12px;
  text-decoration: underline; font-family: inherit;
}
.btn-link:hover { color: var(--rose-d); }

.error {
  color: #c0392b; font-size: 13px;
  margin-top: 6px; padding: 8px 12px;
  background: #fdf0ef; border-radius: 8px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(237,224,212,0.6);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 12px rgba(26,18,9,0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { font-size: 24px; line-height: 1; }

header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--rose-d);
  letter-spacing: -0.3px;
}

.header-actions { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--rose), var(--rose-d));
  color: white; border: none;
  border-radius: 99px;
  padding: 9px 20px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
  box-shadow: 0 2px 12px rgba(212,98,106,0.3);
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 9px 18px;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.btn-ghost:hover { background: var(--rose-l); color: var(--rose-d); border-color: var(--rose); }

.btn-danger {
  background: transparent; color: #c0392b;
  border: 1.5px solid #f5c6c3;
  border-radius: 8px;
  padding: 7px 13px; font-size: 13px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.btn-danger:hover { background: #fdf0ef; }

.btn-warn {
  background: transparent; color: var(--amber);
  border: 1.5px solid #f5dcc6;
  border-radius: 8px;
  padding: 7px 13px; font-size: 13px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.btn-warn:hover { background: #fdf6ef; }

.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 8px; }

/* ── Upload Panel ─────────────────────────────────────────────────────────── */
.upload-panel {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 28px 28px 24px;
  box-shadow: 0 4px 20px rgba(26,18,9,0.06);
}

.upload-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.drop-zone:hover, .drop-zone.drag-over {
  background: var(--rose-l);
  border-color: var(--rose);
}

.drop-icon { font-size: 40px; margin-bottom: 12px; }
.drop-zone p { color: var(--muted); font-size: 15px; line-height: 2; }
.drop-zone span { font-size: 13px; }

.file-label {
  display: inline-block; margin-top: 10px;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--rose), var(--rose-d));
  color: white; border-radius: 99px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s;
  box-shadow: 0 2px 12px rgba(212,98,106,0.25);
}
.file-label:hover { opacity: 0.9; }
.file-label input { display: none; }

.upload-previews { display: flex; flex-wrap: wrap; gap: 10px; }

.preview-thumb {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--border);
}

.upload-actions { display: flex; flex-direction: column; gap: 10px; }
.upload-actions input {
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; outline: none;
  background: var(--bg);
  font-family: inherit; color: var(--text);
  transition: border-color 0.2s;
}
.upload-actions input:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(212,98,106,0.1); }
.upload-actions input::placeholder { color: var(--soft); }

.upload-btns { display: flex; gap: 10px; }

.upload-progress {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 14px;
}

.spinner {
  width: 20px; height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Main content ─────────────────────────────────────────────────────────── */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 28px 60px;
}

/* ── Month sections ───────────────────────────────────────────────────────── */
.month-section { margin-bottom: 52px; }

.month-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.month-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.month-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--soft);
  font-family: 'Inter', sans-serif;
}

/* ── Photo Grid ───────────────────────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ── Photo Card ───────────────────────────────────────────────────────────── */
.photo-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}
.photo-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-md);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.photo-card .caption {
  padding: 10px 14px 5px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card .card-meta {
  padding: 4px 14px 12px;
  display: flex; align-items: center;
  justify-content: space-between;
}

.card-date { font-size: 11px; color: var(--soft); }

.card-likes-badge {
  font-size: 12px; font-weight: 600;
  color: var(--rose);
  display: flex; align-items: center; gap: 3px;
}

/* ── Gallery Card ─────────────────────────────────────────────────────────── */
.gallery-card { position: relative; }

.gallery-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

/* Stacked pages effect */
.gallery-card::before,
.gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  z-index: -1;
}
.gallery-card::before {
  transform: rotate(-2.5deg) translateY(3px);
}
.gallery-card::after {
  transform: rotate(1.5deg) translateY(5px);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,5,2,0.75) 0%, rgba(10,5,2,0.1) 55%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  border-radius: var(--radius);
}

.gallery-info { display: flex; flex-direction: column; gap: 2px; }

.gallery-name {
  color: white;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Lora', serif;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.gallery-count-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  font-family: 'Inter', sans-serif;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 100px 20px 60px;
  color: var(--muted);
}
.empty-icon { font-size: 56px; margin-bottom: 16px; line-height: 1; }
.empty-state p { font-size: 18px; font-family: 'Lora', serif; font-style: italic; }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 8, 4, 0.94);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lb-close {
  position: fixed; top: 18px; right: 18px;
  background: rgba(255,255,255,0.1);
  border: none; color: white;
  font-size: 18px; width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 10;
}
.lb-close:hover { background: rgba(255,255,255,0.2); }

.lb-prev, .lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.08); border: none; color: white;
  font-size: 36px; width: 52px; height: 52px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 10;
}
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.18); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

.lb-layout {
  display: flex;
  width: 100%; max-width: 1100px; max-height: 90vh;
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,0.5);
}

.lb-image-pane {
  flex: 1 1 auto;
  background: #0b0604;
  display: flex; align-items: center; justify-content: center;
  min-width: 0; padding: 20px;
}

#lb-img {
  max-width: 100%; max-height: 86vh;
  border-radius: 10px;
  object-fit: contain; display: block;
}

.lb-sidebar {
  width: 310px; flex-shrink: 0;
  background: #130a06;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,0.06);
}

.lb-meta {
  padding: 20px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.lb-gallery-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}

.lb-caption-text {
  color: rgba(255,255,255,0.8);
  font-size: 15px; line-height: 1.6;
  font-family: 'Lora', serif;
  font-style: italic; min-height: 20px;
}

.lb-admin-controls {
  display: flex; gap: 8px;
  margin-top: 12px; flex-wrap: wrap;
}
.lb-admin-controls .btn-ghost {
  color: rgba(255,255,255,0.5);
  border-color: rgba(255,255,255,0.12);
  font-size: 12px; padding: 5px 12px;
}
.lb-admin-controls .btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: white; border-color: rgba(255,255,255,0.25);
}
.lb-admin-controls .btn-danger {
  border-color: rgba(200,80,80,0.3); color: #f87171;
  font-size: 12px; padding: 5px 12px;
}
.lb-admin-controls .btn-danger:hover { background: rgba(200,80,80,0.1); }

/* ── Likes ────────────────────────────────────────────────────────────────── */
.lb-likes-bar {
  padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.like-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 8px;
  transition: background 0.15s;
}
.like-btn:hover { background: rgba(255,255,255,0.07); }
.like-btn:disabled { cursor: default; opacity: 0.4; }

.heart-icon {
  font-size: 22px; line-height: 1;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}
.like-btn.liked .heart-icon { color: #f87171; }

@keyframes heart-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.like-btn.pop .heart-icon { animation: heart-pop 0.28s ease-out; }

#lb-like-count {
  font-size: 15px; font-weight: 600;
  color: rgba(255,255,255,0.7);
}

.liked-by-text {
  font-size: 12px; color: rgba(255,255,255,0.28);
  flex: 1; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

/* ── Comments ─────────────────────────────────────────────────────────────── */
.lb-comments {
  flex: 1; display: flex;
  flex-direction: column; overflow: hidden;
}

.comments-list {
  flex: 1; overflow-y: auto;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.comments-loading, .comments-empty {
  font-size: 13px; color: rgba(255,255,255,0.28);
  padding: 8px 0; text-align: center;
}

.comment-item { display: flex; flex-direction: column; gap: 4px; }

.comment-header {
  display: flex; align-items: baseline;
  justify-content: space-between; gap: 8px;
}

.comment-author {
  font-size: 12px; font-weight: 600;
  color: var(--amber); letter-spacing: 0.2px;
}

.comment-time {
  font-size: 11px; color: rgba(255,255,255,0.22); white-space: nowrap;
}

.comment-text {
  font-size: 14px; color: rgba(255,255,255,0.8);
  line-height: 1.55; word-break: break-word;
}

.comment-delete {
  background: none; border: none;
  color: rgba(255,255,255,0.18); cursor: pointer;
  font-size: 13px; padding: 0 2px;
  transition: color 0.15s; font-family: inherit;
  align-self: flex-start; margin-top: 2px;
}
.comment-delete:hover { color: #f87171; }

.comment-form {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 10px 12px; gap: 0;
}

#lb-comment-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-right: none; border-radius: 8px 0 0 8px;
  color: white; padding: 9px 13px;
  font-size: 14px; outline: none; font-family: inherit;
  transition: border-color 0.2s;
}
#lb-comment-input::placeholder { color: rgba(255,255,255,0.25); }
#lb-comment-input:focus { border-color: rgba(212,98,106,0.5); }

.comment-submit {
  background: var(--rose); color: white;
  border: none; border-radius: 0 8px 8px 0;
  padding: 9px 16px; font-size: 14px;
  font-weight: 600; cursor: pointer;
  transition: background 0.15s; font-family: inherit;
}
.comment-submit:hover { background: var(--rose-d); }

.comments-guest {
  padding: 12px 16px; font-size: 13px;
  color: rgba(255,255,255,0.3); text-align: center;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.comments-guest a { color: var(--rose); text-decoration: none; }
.comments-guest a:hover { text-decoration: underline; }

/* ── Admin Panel ──────────────────────────────────────────────────────────── */
.admin-panel {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(26,18,9,0.06);
}

.admin-inner {
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 36px;
}

.admin-section h2 {
  font-size: 18px; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}

.admin-desc {
  font-size: 14px; color: var(--muted);
  margin-bottom: 16px; line-height: 1.65;
}

.count-badge {
  background: var(--rose-l); color: var(--rose-d);
  font-size: 12px; font-weight: 700;
  padding: 2px 9px; border-radius: 99px;
  font-family: 'Inter', sans-serif;
}

.join-code-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.join-code {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 22px; font-family: 'Courier New', monospace;
  letter-spacing: 3px; color: var(--rose-d); font-weight: 700;
}

.change-code-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; flex-wrap: wrap;
}

.change-code-row input {
  padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px;
  outline: none; flex: 1; min-width: 160px;
  font-family: inherit; background: var(--bg); color: var(--text);
}
.change-code-row input:focus { border-color: var(--rose); }

.members-list { display: flex; flex-direction: column; gap: 8px; }
.members-loading { color: var(--muted); font-size: 14px; padding: 8px 0; }

.member-row {
  display: flex; align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px; gap: 12px;
  transition: border-color 0.2s;
}
.member-row:hover { border-color: var(--rose); }
.member-row.is-admin { border-color: var(--amber); background: #fdf8f2; }

.member-info { flex: 1; min-width: 0; }

.member-email {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.member-date { font-size: 12px; color: var(--muted); margin-top: 2px; }

.member-actions { display: flex; gap: 6px; flex-shrink: 0; }

.role-admin-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--amber), #c07840);
  color: white; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  letter-spacing: 0.5px; text-transform: uppercase;
  vertical-align: middle; margin-left: 6px;
  font-family: 'Inter', sans-serif;
}

.members-empty { color: var(--muted); font-size: 14px; padding: 12px 0; }

/* ── TOTP Login Step ──────────────────────────────────────────────────────── */
.totp-login-icon {
  font-size: 48px; margin-bottom: 12px; line-height: 1;
}

#totp-input {
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 28px;
  text-align: center;
  letter-spacing: 8px;
  outline: none;
  width: 100%;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
#totp-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(212,98,106,0.12);
}

/* ── TOTP Admin Setup ─────────────────────────────────────────────────────── */
.totp-setup-flow {
  display: flex; flex-direction: column;
  gap: 10px; margin-top: 4px;
}

.totp-step-label {
  font-size: 14px; font-weight: 600;
  color: var(--text);
}

.totp-qr {
  background: white;
  display: inline-flex;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  align-self: flex-start;
}

.totp-manual-label {
  font-size: 13px; color: var(--muted); margin-top: 4px;
}

.totp-secret {
  display: inline-block;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  color: var(--text);
  word-break: break-all;
}

.totp-confirm-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}

.totp-confirm-row input {
  width: 130px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 18px;
  letter-spacing: 4px;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}
.totp-confirm-row input:focus { border-color: var(--rose); }

.totp-active-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px; font-weight: 600;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .lb-layout { flex-direction: column; max-height: 100vh; border-radius: 0; }
  .lb-image-pane { max-height: 46vh; padding: 12px; }
  #lb-img { max-height: 44vh; }
  .lb-sidebar { width: 100%; border-left: none; border-top: 1px solid rgba(255,255,255,0.07); max-height: 54vh; }
  .lightbox { padding: 0; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .month-title { font-size: 22px; }
  main { padding: 24px 16px 48px; }
  .header-inner { padding: 12px 16px; }
}

@media (max-width: 580px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  header h1 { font-size: 18px; }
  .login-box { padding: 40px 24px; }
  .upload-panel, .admin-panel { padding: 20px 16px; }
}
