:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e3e6ec;
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  --radius: 12px;
}

[data-theme="dark"] {
  --bg: #0c1017;
  --surface: #141923;
  --surface-2: #1c2331;
  --border: #263042;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.16);
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.muted-text {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 15px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.82rem;
}

.btn-full {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.text-input, .select-input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.text-input {
  width: 100%;
}

.text-input:focus, .select-input:focus {
  border-color: var(--accent);
}

.full-width {
  width: 100%;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.form-group {
  margin-bottom: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.form-error {
  margin: 10px 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.85rem;
}

/* Login Screen */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 390px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card h1 {
  margin: 0;
  font-size: 1.45rem;
}

.login-subtitle {
  margin: 6px 0 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-form {
  text-align: left;
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.password-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

.password-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}

.password-wrap .icon-btn {
  position: absolute;
  right: 4px;
}

.login-footnote {
  margin: 20px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* App Shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 18px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.logo-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.nav-item:hover {
  background: var(--surface-2);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.nav-item.active .pill {
  background: var(--accent);
  color: #fff;
}

.folders-section {
  margin-top: 20px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.section-heading {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 10px 8px;
  font-weight: 600;
}

.folder-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.folder-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
  cursor: pointer;
  text-align: left;
}

.folder-btn:hover {
  background: var(--surface-2);
}

.folder-btn.active {
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 600;
}

.folder-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.storage-card {
  margin-bottom: 10px;
}

.storage-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Main Area */
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-left {
  flex: 1;
  max-width: 480px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.content-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px 24px 8px;
}

.content-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.content-header p {
  margin: 4px 0 0;
}

.content-area {
  padding: 12px 24px 48px;
}

/* Photo Grid */
.group-block {
  margin-bottom: 28px;
}

.group-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 12px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.photo-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.photo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}

.photo-caption {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.photo-name {
  font-size: 0.82rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-date {
  font-size: 0.74rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* Document List */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.doc-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.doc-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.doc-badge.pdf {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.doc-badge.sheet {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

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

.doc-name {
  font-weight: 600;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
}

.empty-state h3 {
  margin: 12px 0 6px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 14, 24, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  backdrop-filter: blur(4px);
}

.modal-card {
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-sm {
  max-width: 420px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.modal-body {
  padding: 20px;
}

.modal-footer, .modal-footer-inline {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.modal-footer-inline {
  margin-top: 18px;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.dropzone p {
  margin: 10px 0 4px;
}

.upload-queue {
  margin-top: 14px;
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.84rem;
}

.queue-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.queue-item:last-child {
  border-bottom: none;
}

/* Preview / Lightbox Modal */
.modal-wide {
  padding: 0;
  background: rgba(8, 10, 16, 0.92);
}

.preview-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(15, 20, 30, 0.92);
  color: #f9fafb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-topbar .btn-ghost {
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.2);
}

.preview-topbar .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.preview-topbar .preview-close {
  color: #fff;
}

.preview-title-wrap {
  min-width: 0;
}

.preview-name {
  font-weight: 600;
  font-size: 0.96rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-meta {
  font-size: 0.78rem;
  color: #9ca3af;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.preview-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px 64px;
}

.preview-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-content img,
.preview-content video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}

.video-tile {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #f8fafc;
}

.video-play-circle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  padding-left: 3px;
}

.video-size-tag {
  font-size: 0.74rem;
  color: #cbd5e1;
}

/* Favorites (Star) UI */
.content-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.folder-row .folder-btn {
  flex: 1;
  min-width: 0;
}

.folder-star-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.folder-row:hover .folder-star-btn,
.folder-star-btn.is-fav {
  opacity: 1;
}

.folder-star-btn:hover {
  background: var(--surface-2);
}

.folder-star-btn.is-fav {
  color: #f59e0b;
}

.card-star-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #e5e7eb;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, transform 0.15s;
}

.photo-card:hover .card-star-btn,
.card-star-btn.is-fav {
  opacity: 1;
}

.card-star-btn:hover {
  transform: scale(1.08);
  background: rgba(15, 23, 42, 0.85);
}

.card-star-btn.is-fav {
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
}

.btn-fav-active {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: #f59e0b !important;
  color: #d97706 !important;
}

[data-theme="dark"] .btn-fav-active {
  color: #fbbf24 !important;
}

.favorites-banner {
  margin: 4px 24px 10px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.favorites-banner-title {
  font-weight: 600;
  font-size: 0.94rem;
}

.favorites-banner-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.favorites-banner code {
  background: var(--surface);
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

.doc-card {
  position: relative;
}

.doc-star-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  cursor: pointer;
  flex-shrink: 0;
}

.doc-star-btn.is-fav {
  color: #f59e0b;
}

.subfolder-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.subfolder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
}

.subfolder-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.subfolder-chip-star {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.9rem;
}

.subfolder-chip-star.is-fav {
  color: #f59e0b;
}

/* Multi-select checkboxes & Floating Batch Action Bar */
.card-select-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: transparent;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}

.photo-card:hover .card-select-btn,
.select-mode .card-select-btn,
.card-select-btn.is-selected {
  opacity: 1;
}

.card-select-btn.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.photo-card.is-selected,
.doc-card.is-selected {
  outline: 2.5px solid var(--accent);
  outline-offset: -2px;
}

.doc-select-btn {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-select-btn.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.batch-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  width: min(92vw, 760px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.batch-bar-left,
.batch-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-select-active {
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.preview-content iframe {
  width: 100%;
  height: 100%;
  max-width: 1050px;
  border: none;
  border-radius: 10px;
  background: #fff;
}

.preview-text {
  width: 100%;
  max-width: 900px;
  max-height: 100%;
  overflow: auto;
  background: var(--surface);
  color: var(--text);
  padding: 24px;
  border-radius: 12px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
}

.preview-fallback {
  text-align: center;
  color: #f3f4f6;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 25, 36, 0.7);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.nav-arrow:hover {
  background: rgba(59, 130, 246, 0.85);
}

.nav-prev {
  left: 14px;
}

.nav-next {
  right: 14px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 80;
  padding: 11px 16px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
}

.mobile-only {
  display: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 30;
}

@media (max-width: 820px) {
  .mobile-only {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    z-index: 40;
    transition: left 0.2s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .topbar {
    padding: 10px 14px;
  }

  .content-header, .content-area {
    padding-left: 14px;
    padding-right: 14px;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 10px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .preview-stage {
    padding: 12px;
  }

  .preview-topbar {
    flex-wrap: wrap;
  }
}
