/* Cloud Photos — graphite surfaces, one safelight-amber accent. Design pass follows unslop (CC BY 4.0, @heydamir). */
:root {
  --bg-deep: #0f0f10;
  --bg: #141415;
  --card: #19191b;
  --raised: #232325;
  --line: rgba(237, 237, 237, 0.08);
  --line-strong: rgba(237, 237, 237, 0.14);
  --text: #ededed;
  --text-2: #a1a1a6;
  --text-3: #85858b;
  --accent: #e9a23b;        /* darkroom safelight */
  --accent-ink: #1a1206;
  --positive: #4cc38a;
  --negative: #e5484d;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/20px var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.secondary { color: var(--text-2); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }
svg.i.lg { width: 18px; height: 18px; }

/* ---------- buttons & inputs ---------- */
.btn {
  height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--raised); color: var(--text); display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; white-space: nowrap; font-weight: 500;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 120ms var(--ease), opacity 150ms var(--ease);
}
.btn:hover { background: #2a2a2d; border-color: var(--line-strong); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible, .icon-btn:focus-visible, .nav a:focus-visible, .tile:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn.primary { background: var(--text); color: #141415; border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
.btn.primary:hover { background: #ffffff; }
.btn.danger { color: #ff8a8d; }
.btn.danger:hover { background: rgba(229, 72, 77, 0.12); border-color: rgba(229, 72, 77, 0.3); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--raised); color: var(--text); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2);
  display: inline-grid; place-items: center; cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.icon-btn:hover { background: var(--raised); color: var(--text); }

.field { display: grid; gap: 8px; }
.field label { color: var(--text-2); font-size: 13px; }
.input {
  height: 40px; padding: 0 12px; border-radius: 8px; background: var(--bg-deep);
  border: 1px solid var(--line-strong); color: var(--text); width: 100%;
  transition: border-color 150ms var(--ease);
}
.input:hover { border-color: rgba(237,237,237,0.22); }
.input:focus { border-color: var(--accent); outline: none; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.error-text { color: #ff8a8d; font-size: 13px; min-height: 20px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-deep); border-right: 1px solid var(--line); padding: 16px 12px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; font-weight: 500; font-size: 16px; }
.brand svg { width: 20px; height: 20px; }
.nav { display: grid; gap: 2px; margin-top: 24px; }
.nav-label { color: var(--text-3); font-size: 12px; padding: 0 8px; margin: 24px 0 8px; }
.nav a {
  height: 34px; padding: 0 8px; border-radius: 8px; display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-2);
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.active { background: var(--raised); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.nav a .count { margin-left: auto; color: var(--text-3); }
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; }

/* signature: the drive meter */
.drive { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.drive-head { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.drive-bar { margin-top: 12px; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; display: flex; }
.drive-bar .mine { background: var(--accent); }
.drive-bar .others { background: #6b6b70; }
.drive-foot { margin-top: 8px; display: flex; justify-content: space-between; color: var(--text-3); }
.drive-legend { margin-top: 8px; display: flex; gap: 12px; color: var(--text-3); }
.drive-legend span { display: inline-flex; align-items: center; gap: 6px; }
.drive-legend i { width: 6px; height: 6px; border-radius: 3px; display: inline-block; }

.user-row { display: flex; align-items: center; gap: 10px; padding: 0 8px; height: 36px; }
.avatar {
  width: 24px; height: 24px; border-radius: 12px; background: var(--raised); color: var(--text-2);
  display: grid; place-items: center; font-size: 12px; font-weight: 500; flex: none;
}
.user-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; padding: 0 32px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 5; background: rgba(20,20,21,0.86);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 20px; line-height: 28px; font-weight: 500; margin: 0; }
.topbar .meta { color: var(--text-3); }
.topbar .spacer { flex: 1; }
.content { padding: 24px 32px 96px; max-width: 1600px; width: 100%; }

/* ---------- gallery ---------- */
.month { margin-bottom: 32px; }
.month-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; position: relative; }
.month-head h2 { font-size: 15px; line-height: 22px; font-weight: 500; margin: 0; }
.grid {
  display: grid; gap: 4px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.tile {
  position: relative; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: var(--card);
  cursor: pointer; border: 0; padding: 0; display: block; width: 100%;
}
.tile img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0;
  transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.tile img.ready { opacity: 1; }
.tile:hover img { transform: scale(1.015); }
.tile .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.tile .badge {
  position: absolute; z-index: 2; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 4px; background: rgba(15,15,16,0.72); color: var(--text);
}
.tile .badge svg { width: 10px; height: 10px; fill: currentColor; stroke: none; }
.tile .sel {
  position: absolute; z-index: 2; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 11px;
  border: 1.5px solid rgba(255,255,255,0.85); background: rgba(15,15,16,0.35);
  display: grid; place-items: center; opacity: 0; transition: opacity 150ms var(--ease), background-color 150ms var(--ease);
}
.tile .sel svg { width: 14px; height: 14px; stroke: var(--accent-ink); stroke-width: 2.5; opacity: 0; }
.selecting .tile .sel, .tile:hover .sel { opacity: 1; }
.tile.selected .sel { background: var(--accent); border-color: var(--accent); }
.tile.selected .sel svg { opacity: 1; }
.tile.selected img { transform: scale(0.92); border-radius: 4px; }
.tile.selected { background: var(--raised); }

.sentinel { height: 1px; }
.loading-more { color: var(--text-3); padding: 16px 0; }

.empty { max-width: 440px; margin: 96px auto; text-align: center; }
.empty .frame {
  width: 72px; height: 56px; margin: 0 auto 24px; border: 1.5px solid var(--line-strong); border-radius: 6px;
  display: grid; place-items: center; color: var(--text-3);
}
.empty h2 { font-size: 20px; line-height: 28px; font-weight: 500; margin: 0 0 8px; }
.empty p { color: var(--text-2); margin: 0 0 24px; }

/* selection bar */
.selbar {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 14px;
  background: var(--raised); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease); z-index: 20;
}
.selbar.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.selbar .n { margin-right: 8px; font-weight: 500; }

/* drop overlay */
.drop {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none;
  background: rgba(15,15,16,0.8); opacity: 0; transition: opacity 160ms var(--ease);
}
.drop.show { opacity: 1; }
.drop div { border: 1.5px dashed var(--accent); border-radius: 20px; padding: 48px 64px; text-align: center; color: var(--text-2); }
.drop strong { display: block; color: var(--text); font-size: 20px; line-height: 28px; font-weight: 500; margin-bottom: 4px; }

/* ---------- upload dock ---------- */
.dock {
  position: fixed; right: 24px; bottom: 24px; width: 384px; max-height: min(560px, calc(100vh - 48px));
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45); display: flex; flex-direction: column; z-index: 30;
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.dock.show { transform: none; opacity: 1; pointer-events: auto; }
.dock-head { padding: 16px 12px 12px 16px; display: grid; gap: 12px; }
.dock-title { display: flex; align-items: center; gap: 8px; }
.dock-title strong { font-weight: 500; flex: 1; }
.bar { height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 300ms var(--ease); }
.bar.done > i { background: var(--positive); }
.dock-sub { display: flex; justify-content: space-between; color: var(--text-3); }
.dock-list { overflow-y: auto; border-top: 1px solid var(--line); padding: 4px 0; }
.dock.min .dock-list, .dock.min .dock-actions { display: none; }
.urow { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 8px 16px; align-items: center; }
.urow .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.urow .state { color: var(--text-3); text-align: right; }
.urow .state.ok { color: var(--positive); }
.urow .state.err { color: #ff8a8d; }
.urow .bar { grid-column: 1 / -1; height: 2px; }
.urow .act { display: flex; gap: 4px; }
.urow .act .icon-btn { width: 24px; height: 24px; }
.dock-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.dock-actions .btn { height: 32px; padding: 0 12px; font-size: 13px; }

/* ---------- viewer ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 50; background: #0a0a0b; display: flex;
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease);
}
.viewer-main { flex: 1; min-width: 0; display: grid; grid-template-rows: 56px 1fr; }
.viewer.show { opacity: 1; pointer-events: auto; }
.viewer-bar { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; }
.v-actions { display: flex; gap: 4px; }
.icon-btn.on { color: var(--text); background: var(--raised); }
.icon-btn.on.heart { color: var(--accent); background: transparent; }
.icon-btn.on.heart svg { fill: currentColor; }
.viewer-bar .info { flex: 1; min-width: 0; display: grid; }
.viewer-bar .info .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px 24px; }
#v-media { display: grid; place-items: center; min-width: 0; max-width: 100%; }
.stage img, .stage video { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; border-radius: 4px; display: block; }
.stage .nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 20px;
  background: rgba(35,35,37,0.8); border: 1px solid var(--line); color: var(--text); display: grid; place-items: center; cursor: pointer;
  transition: background-color 150ms var(--ease);
}
.stage .nav-btn:hover { background: var(--raised); }
.stage .prev { left: 12px; } .stage .next { right: 12px; }

/* ---------- pages: people, account ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.panel + .panel { margin-top: 24px; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; line-height: 22px; font-weight: 500; margin: 0; flex: 1; }
.panel-body { padding: 24px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 400; color: var(--text-3); font-size: 13px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 24px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .person { display: flex; align-items: center; gap: 10px; }
.role { color: var(--text-3); }
.role.admin { color: var(--accent); }
.minibar { width: 96px; height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.minibar i { display: block; height: 100%; background: var(--text-2); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.form-grid { display: grid; gap: 16px; max-width: 400px; }

/* dialog */
dialog {
  background: var(--card); color: var(--text); border: 1px solid var(--line-strong); border-radius: 16px;
  padding: 0; width: min(420px, calc(100vw - 32px)); box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
dialog::backdrop { background: rgba(10,10,11,0.7); }
dialog form { display: grid; gap: 16px; padding: 24px; }
dialog h3 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 500; }
dialog p { margin: 0; color: var(--text-2); }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.toast {
  position: fixed; left: 50%; top: 16px; transform: translate(-50%, -8px); opacity: 0; z-index: 60;
  background: var(--raised); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 16px;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease); pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 480px) 1fr; }
.login-side { padding: 32px 48px; display: flex; flex-direction: column; background: var(--bg-deep); border-right: 1px solid var(--line); }
.login-form { margin: auto 0; display: grid; gap: 20px; max-width: 340px; width: 100%; }
.login-form h1 { font-size: 28px; line-height: 34px; font-weight: 500; margin: 0; }
.login-form .lede { color: var(--text-2); margin: -8px 0 8px; }
.login-form .btn { height: 44px; justify-content: center; }
.login-note { color: var(--text-3); font-size: 13px; }
.contact {
  position: relative; overflow: hidden; display: grid; padding: 48px;
  grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 8px; align-content: center;
}
.contact .print { border-radius: 4px; background: var(--card); position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.contact .print::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04); border-radius: 4px; }
.contact .print.lit { background: var(--accent); opacity: 0.9; }
.contact .label { position: absolute; left: 48px; bottom: 32px; color: var(--text-3); }

/* ---------- small screens ---------- */

/* ---------- topbar controls ---------- */
.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); margin-left: 12px; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--raised); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 10px; color: var(--text-3); pointer-events: none; }
.search input {
  height: 36px; width: 240px; padding: 0 12px 0 34px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); transition: border-color 150ms var(--ease), width 220ms var(--ease);
}
.search input:focus { outline: none; border-color: var(--accent); width: 300px; }
.search input::-webkit-search-cancel-button { filter: invert(0.6); }

/* ---------- timeline ---------- */
.month.placeholder .grid { display: block; border-radius: 4px; background: var(--card); opacity: 0.5; }
.tile .fav { position: absolute; z-index: 2; right: 8px; bottom: 8px; color: #fff; }
.tile .fav svg { width: 14px; height: 14px; fill: currentColor; stroke: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.tile .who { position: absolute; z-index: 2; right: 8px; top: 8px; }
.tile .who .avatar { width: 20px; height: 20px; font-size: 11px; background: rgba(15,15,16,0.72); color: var(--text); }

.scrubber { position: fixed; right: 0; top: 64px; bottom: 0; width: 64px; z-index: 6; cursor: row-resize; user-select: none; }
.scrubber .yr { position: absolute; right: 12px; transform: translateY(-50%); color: var(--text-3); font-family: var(--mono); font-size: 11px; line-height: 14px; }
.scrubber .dot { position: absolute; right: 16px; width: 3px; height: 3px; border-radius: 2px; background: var(--line-strong); transform: translateY(-50%); }
.scrub-now { position: absolute; right: 8px; width: 24px; height: 2px; border-radius: 1px; background: var(--accent); transform: translateY(-50%); }
.scrub-tip { position: absolute; right: 40px; transform: translateY(-50%); padding: 4px 8px; border-radius: 6px; background: var(--raised);
  border: 1px solid var(--line-strong); color: var(--text); white-space: nowrap; opacity: 0; transition: opacity 120ms var(--ease); }
.scrubber:hover .scrub-tip, .scrubber.drag .scrub-tip { opacity: 1; }
.has-scrubber .content { padding-right: 80px; }

/* memories */
.memories { margin: 0 0 32px; }
.memories-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.memories-row::-webkit-scrollbar { display: none; }
.memory {
  flex: none; width: 152px; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; position: relative; border: 0; padding: 0;
  cursor: pointer; background: var(--card); transition: transform 150ms var(--ease);
}
.memory:active { transform: scale(0.98); }
.memory img { width: 100%; height: 100%; object-fit: cover; display: block; }
.memory::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(10,10,11,0.75)); }
.memory span { position: absolute; left: 12px; bottom: 12px; z-index: 1; text-align: left; }
.memory b { display: block; font-weight: 500; color: #fff; }
.memory small { color: rgba(255,255,255,0.7); font-size: 12px; }

/* ---------- albums ---------- */
.albums { display: grid; gap: 24px 16px; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); }
.album { display: grid; gap: 10px; align-content: start; text-decoration: none; color: var(--text); }
.album .cover { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--card); display: grid; place-items: center; color: var(--text-3);
  border: 1px solid var(--line); transition: border-color 150ms var(--ease); }
.album:hover .cover { border-color: var(--line-strong); }
.album .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album .sub { color: var(--text-3); margin-top: -6px; }
.section-title { font-size: 15px; line-height: 22px; font-weight: 500; margin: 0 0 16px; }
.section-title + .albums { margin-bottom: 40px; }
.album-head { display: flex; align-items: flex-end; gap: 16px; margin: 8px 0 32px; flex-wrap: wrap; }
.album-head h2 { font-size: 32px; line-height: 38px; font-weight: 500; margin: 0 0 4px; letter-spacing: -0.01em; }
.album-head .grow { flex: 1; min-width: 240px; }
.album-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.faces { display: inline-flex; margin-right: 8px; vertical-align: middle; }
.faces .avatar { width: 22px; height: 22px; margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); font-size: 11px; }
.faces .avatar:first-child { margin-left: 0; }
.note { color: var(--text-2); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px;
  margin-bottom: 24px; display: flex; gap: 12px; align-items: center; }
.note .grow { flex: 1; }
.list-pick { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; margin: 0 -8px; }
.list-pick button, .list-pick label {
  display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%;
  transition: background-color 150ms var(--ease);
}
.list-pick button:hover, .list-pick label:hover { background: var(--raised); }
.list-pick .thumb { width: 40px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--raised); flex: none; display: grid; place-items: center; color: var(--text-3); }
.list-pick .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-pick .grow { flex: 1; min-width: 0; }
.list-pick select { height: 32px; border-radius: 8px; background: var(--bg-deep); border: 1px solid var(--line-strong); color: var(--text); padding: 0 8px; }

/* ---------- viewer info panel ---------- */
.v-panel { width: 360px; flex: none; background: var(--bg-deep); border-left: 1px solid var(--line); overflow-y: auto; padding: 16px 24px 32px; }
.v-panel h3 { font-size: 15px; line-height: 22px; font-weight: 500; margin: 4px 0 20px; display: flex; align-items: center; }
.v-panel h3 span { flex: 1; }
.facts { display: grid; gap: 20px; }
.fact { display: grid; grid-template-columns: 18px 1fr; gap: 12px; }
.fact > svg { color: var(--text-3); margin-top: 2px; }
.fact .k { color: var(--text); }
.fact .v { color: var(--text-3); }
.fact a { color: var(--text-2); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.fact a:hover { color: var(--text); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.chip { height: 26px; padding: 0 10px; border-radius: 6px; background: var(--raised); color: var(--text-2); display: inline-flex; align-items: center; text-decoration: none; font-size: 13px; }
.chip:hover { color: var(--text); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: auto 0 0 0; height: auto; top: auto; z-index: 25; flex-direction: row;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line);
  }
  .brand, .nav-label, .sidebar-foot, .nav a .count { display: none; }
  .nav { display: flex; margin: 0; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; height: 48px; gap: 2px; font-size: 11px; line-height: 14px; padding: 6px 12px; justify-content: center; }
  .nav a.active { background: transparent; box-shadow: none; color: var(--accent); }
  .topbar { padding: 0 16px; height: 56px; }
  .topbar .meta { display: none; }
  .content { padding: 16px 12px 120px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 2px; }
  .tile { border-radius: 2px; }
  .dock { left: 12px; right: 12px; width: auto; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .selbar { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .stage { padding: 0 0 16px; }
  .stage .nav-btn { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-side { border-right: 0; padding: 24px; }
  .contact { display: none; }
  .table .hide-sm { display: none; }
  .table th, .table td { padding: 12px 16px; }
  .panel-head, .panel-body { padding: 16px; }
  .mobile-drive { display: block !important; }
  .topbar .btn .label-sm-hide { display: none; }
  .topbar .btn.primary { padding: 0 10px; }
  .hide-sm { display: none !important; }
  .seg { display: none !important; }
  .topbar h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .search input { width: 120px; }
  .search input:focus { width: 180px; }
  .scrubber { display: none !important; }
  .has-scrubber .content { padding-right: 12px; }
  .memory { width: 120px; }
  .albums { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .album-head h2 { font-size: 24px; line-height: 30px; }
  .v-panel { position: fixed; inset: auto 0 0 0; width: auto; max-height: 60vh; border-left: 0; border-top: 1px solid var(--line-strong); border-radius: 16px 16px 0 0; z-index: 2; }
  .viewer-bar .info .mono { display: none; }
}
.mobile-drive { display: none; margin-bottom: 24px; }

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