*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
  color-scheme: dark;
  --accent:        #7b4fff;
  --online:        #34d399;
  --offline:       #f87171;
  --warn:          #fbbf24;
  --text-hi:       rgba(240,238,255,0.45);
  --text-mid:      rgba(220,215,255,0.65);
  --text-muted:    rgba(200,190,255,0.4);
  --text-dim:      rgba(200,190,255,0.25);
  --portal-max:    720px;
  --player-offset: 50px;  /* vertical padding shift when player is open */
  --bg-subtle:     rgba(255,255,255,0.03);
  --bg-hover:      rgba(255,255,255,0.06);
  --border:        rgba(255,255,255,0.08);
  --icon-fill:     rgba(255,255,255,0.75);
  --icon-hover:    rgba(255,255,255,0.95);
}

html { background: #0a0a0f; }
body { min-height: 100vh; overflow-x: hidden; overflow-y: auto; background: #0a0a0f; font-family: 'DM Mono', monospace; position: relative; }
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg-image { position: absolute; inset: -10%; background: url('background.jpg') center/cover no-repeat; filter: blur(7px) brightness(0.35); animation: camshake 8s ease-in-out infinite; transition: opacity 1.2s ease; }
.bg-image-sbr { position: absolute; inset: -10%; background: url('backgroundbgm.jpg') center/cover no-repeat; filter: blur(4px) brightness(0.35); animation: camshake 8s ease-in-out infinite; opacity: 0; transition: opacity 1.2s ease; }
/* camshake: for background images — includes scale() to hide edge gaps during translate */
@keyframes camshake {
  0%   { transform: scale(1.12) translate(0px, 0px); }
  15%  { transform: scale(1.12) translate(-3px, -2px); }
  30%  { transform: scale(1.13) translate(2px, -3px); }
  45%  { transform: scale(1.12) translate(-2px, 2px); }
  60%  { transform: scale(1.13) translate(3px, 1px); }
  75%  { transform: scale(1.12) translate(-1px, 3px); }
  90%  { transform: scale(1.12) translate(2px, -1px); }
  100% { transform: scale(1.12) translate(0px, 0px); }
}
/* overlay-shake: for fixed overlay elements (dust, rays, light) — translate-only,
   no scale needed since they cover the full viewport with no edge to reveal */
@keyframes overlay-shake {
  0%   { transform: translate(0px,  0px); }
  15%  { transform: translate(-3px, -2px); }
  30%  { transform: translate(2px,  -3px); }
  45%  { transform: translate(-2px,  2px); }
  60%  { transform: translate(3px,   1px); }
  75%  { transform: translate(-1px,  3px); }
  90%  { transform: translate(2px,  -1px); }
  100% { transform: translate(0px,  0px); }
}
/* hidden JS animation targets — manipulated by openPlayer/closePlayer */
.system-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.system-dot.all-good  { background: #7b4fff; }
.system-dot.minor     { background: #fbbf24; }
.system-dot.outage    { background: #f87171; }
#fade-logo, #fade-status { display: none; }

/* ── Fixed top bar ── */
.top-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; display: flex; align-items: center; padding: max(1rem, env(safe-area-inset-top, 1rem)) 1.5rem 0.75rem; pointer-events: none; }
/* iOS-style progressive blur behind the fixed top bar — keeps the top-bar text
   legible over any background (home, SBR, preservation) on every platform. Two
   stacked layers create a graduated (progressive) blur: a gentle, taller layer
   with a faint legibility gradient, plus a stronger, shorter layer concentrated
   at the very top. Both fade out downward via a mask so the page below stays sharp. */
.top-bar::before,
.top-bar::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  pointer-events: none;
  z-index: -1;
}
.top-bar::before {
  height: calc(env(safe-area-inset-top, 0px) + 100px);
  -webkit-backdrop-filter: blur(7px);
          backdrop-filter: blur(7px);
  background: linear-gradient(to bottom, rgba(8,8,12,0.50) 0%, rgba(8,8,12,0.16) 50%, rgba(8,8,12,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.top-bar::after {
  height: calc(env(safe-area-inset-top, 0px) + 72px);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 32%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 32%, transparent 100%);
}
#top-title { display: inline-flex; align-items: center; font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(240,238,255,0.5); user-select: none; pointer-events: none; white-space: nowrap; }
#top-home { display: inline-flex; align-items: center; }
.top-title-sbr #top-home { pointer-events: auto; cursor: pointer; }
#top-brand { color: inherit; transition: color 0.25s; }
/* back arrow — collapses to zero width on home, expands (white) in SBR */
#top-back { display: inline-flex; align-items: center; overflow: hidden; max-width: 0; opacity: 0; color: rgba(255,255,255,0.92); transition: max-width 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease, margin-right 0.4s cubic-bezier(0.4,0,0.2,1); }
#top-back svg { display: block; }
.top-title-sbr #top-back { max-width: 1.4em; opacity: 1; margin-right: 0.45em; }
.top-title-sbr #top-home:hover #top-back,
.top-title-sbr #top-home:hover #top-brand { color: #fff; }
/* divider — fades in first */
#top-sep { opacity: 0; max-width: 0; overflow: hidden; color: rgba(255,255,255,0.35); transition: opacity 0.3s ease, max-width 0.3s ease, margin 0.3s ease; }
.top-title-sbr #top-sep { opacity: 1; max-width: 1em; margin: 0 0.5em; }
/* Serenity Box label — slides out from the right of the divider */
#top-sbr-label { display: inline-block; overflow: hidden; max-width: 0; opacity: 0; transform: translateX(-8px); color: rgba(200,190,255,0.78); white-space: nowrap; transition: max-width 0.45s cubic-bezier(0.4,0,0.2,1) 0.15s, opacity 0.35s ease 0.2s, transform 0.45s cubic-bezier(0.4,0,0.2,1) 0.15s; }
.top-title-sbr #top-sbr-label { max-width: 14em; opacity: 1; transform: translateX(0); }
#top-preservation-label { display: inline-block; overflow: hidden; max-width: 0; opacity: 0; transform: translateX(-8px); color: rgba(200,190,255,0.78); white-space: nowrap; transition: max-width 0.45s cubic-bezier(0.4,0,0.2,1) 0.15s, opacity 0.35s ease 0.2s, transform 0.45s cubic-bezier(0.4,0,0.2,1) 0.15s; }
.top-title-pres #top-preservation-label { max-width: 14em; opacity: 1; transform: translateX(0); }
.top-title-pres #top-home { pointer-events: auto; cursor: pointer; }
.top-title-pres #top-back { max-width: 1.4em; opacity: 1; margin-right: 0.45em; }
.top-title-pres #top-home:hover #top-back,
.top-title-pres #top-home:hover #top-brand { color: #fff; }
.top-title-pres #top-sep { opacity: 1; max-width: 1em; margin: 0 0.5em; }
#preservation-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; pointer-events: none; opacity: 0; transition: opacity 0.35s ease; z-index: 5; }
#preservation-wrap.pres-open { opacity: 1; pointer-events: auto; }
.pres-glass { background: rgba(6,4,2,0.62); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 0.5px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 2.8rem 3rem 2.6rem; width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; transition: opacity 0.35s ease, transform 0.35s ease; }
.pres-glass.gone { opacity: 0; transform: scale(0.97); pointer-events: none; }
.pres-app-icon { margin-bottom: 1.4rem; opacity: 0.88; }
.pres-app-title { font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(200,190,255,0.6); margin-bottom: 1.8rem; }
/* Auth-check status row */
.pres-status-area { display: flex; align-items: flex-start; gap: 0.6rem; opacity: 0; min-height: 1.2rem; transition: opacity 0.25s ease; width: 100%; max-width: 340px; }
.pres-status-area.visible { opacity: 1; }
.pres-sicon { flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; }
.pres-sicon.error svg { color: rgba(255,110,90,0.85); }
.pres-sicon.ok svg    { color: rgba(100,210,130,0.9); }
.pres-stext { font-size: 0.72rem; line-height: 1.6; color: rgba(200,190,255,0.7); letter-spacing: 0.02em; }
.pres-cursor { display: inline-block; width: 1px; height: 0.85em; background: rgba(200,190,255,0.7); margin-left: 1px; vertical-align: text-bottom; animation: pres-blink 0.65s step-end infinite; }
@keyframes pres-blink { 0%,100% { opacity:1; } 50% { opacity:0; } }
/* Sign-in form inside preservation panel */
.pres-signin { display: none; flex-direction: column; gap: 0.5rem; width: 100%; max-width: 320px; margin-top: 1.2rem; }
.pres-signin.visible { display: flex; }
.pres-signin-label { font-size: 0.62rem; letter-spacing: 0.06em; color: rgba(200,190,255,0.4); }
.pres-signin-row { display: flex; gap: 0.4rem; align-items: center; }
.pres-signin input { flex: 1; background: rgba(255,255,255,0.05); border: 0.5px solid rgba(255,255,255,0.1); border-radius: 6px; color: rgba(200,190,255,0.9); font-family: 'DM Mono', monospace; font-size: 0.68rem; padding: 5px 8px; outline: none; transition: border-color 0.15s; }
.pres-signin input:focus { border-color: rgba(200,190,255,0.3); }
.pres-signin-btn { background: rgba(255,255,255,0.07); border: 0.5px solid rgba(255,255,255,0.12); border-radius: 6px; color: rgba(200,190,255,0.7); font-family: 'DM Mono', monospace; font-size: 0.65rem; padding: 5px 10px; cursor: pointer; transition: background 0.15s; white-space: nowrap; }
.pres-signin-btn:hover { background: rgba(255,255,255,0.12); color: rgba(200,190,255,0.9); }
.pres-signin-error { font-size: 0.62rem; color: rgba(255,110,90,0.75); min-height: 0.9rem; }
/* App content layer (revealed after auth passes) */
#pres-app-content { display: none; flex-direction: column; align-items: center; gap: 0.5rem; opacity: 0; transition: opacity 0.4s ease; }
#pres-app-content.visible { display: flex; }
#pres-app-content.fade-in { opacity: 1; }
.pres-app-sub { font-size: 0.68rem; color: rgba(200,190,255,0.3); letter-spacing: 0.06em; }
.datetime { font-size: 0.7rem; color: rgba(200,190,255,0.4); letter-spacing: 0.12em; text-transform: uppercase; pointer-events: none; }

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
.portal { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 3rem; padding-left: 1.5rem; padding-right: 1.5rem; padding-bottom: 2rem; gap: 1.2rem; transition: padding-top 0.7s cubic-bezier(0.4,0,0.2,1); }
.services-primary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; width: 100%; max-width: var(--portal-max); padding-top: 8px; margin-top: -8px; }
.services-secondary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; width: 100%; max-width: var(--portal-max); padding-top: 8px; margin-top: -8px; }
.card { position: relative; background: rgba(255,255,255,0.03); border: 0.5px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1.5rem 1.25rem; text-decoration: none; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; transition: background 0.2s, border-color 0.2s, transform 0.15s; cursor: pointer; overflow: hidden; }
.card::before { content: ''; position: absolute; inset: 0; border-radius: 16px; opacity: 0; transition: opacity 0.25s; }
.card:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); transform: translateY(-2px); }
.card:hover::before { opacity: 1; }
.card-photos::before  { background: radial-gradient(circle at top left, rgba(34,211,238,0.07), transparent 60%); }
.card-tv::before      { background: radial-gradient(circle at top left, rgba(229,160,13,0.08), transparent 60%); }
.card-drive::before   { background: radial-gradient(circle at top left, rgba(59,130,246,0.07), transparent 60%); }
.card-qbit::before    { background: radial-gradient(circle at top left, rgba(52,211,153,0.07), transparent 60%); }
.card-seerr::before   { background: radial-gradient(circle at top left, rgba(239,68,68,0.07), transparent 60%); }
.card-prowlarr::before  { background: radial-gradient(circle at top left, rgba(251,191,36,0.07), transparent 60%); }
.card-secretbea::before { background: radial-gradient(circle at top left, rgba(192,132,252,0.09), transparent 60%); }
.card-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); }
.card-icon svg { width: 18px; height: 18px; stroke: rgba(255,255,255,0.75); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card-sm .card-icon-sm { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.card-sm .card-icon-sm svg { width: 14px; height: 14px; stroke: rgba(255,255,255,0.65); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card-name { font-family: 'DM Mono', monospace; font-size: 0.95rem; font-weight: 700; color: #e8e4ff; }
.card-arrow { font-size: 0.75rem; color: rgba(255,255,255,0.15); transition: color 0.2s; }
.card:hover .card-arrow { color: rgba(255,255,255,0.4); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online  { background: #34d399; box-shadow: 0 0 5px #34d399; }
.status-dot.offline { background: #f87171; box-shadow: 0 0 5px #f87171; }
.status-dot.checking { background: rgba(255,255,255,0.2); }
.card-sm { padding: 0.75rem 0.75rem; border-radius: 12px; gap: 5px; }
.card-sm::before { border-radius: 12px; }
.card-sm .card-icon-sm { font-size: 14px; margin-bottom: 2px; }
.card-sm .card-name { font-size: 0.72rem; color: rgba(220,215,255,0.7); font-weight: 700; }
.card-sm .card-arrow { font-size: 0.6rem; margin-top: 0; }
.sm-name-row { display: flex; align-items: center; justify-content: center; gap: 5px; }
.sm-name-row .status-dot { width: 4px; height: 4px; }
.fade-out {
  max-height: 800px;
  overflow: hidden;
  transition: opacity 0.7s ease, max-height 0.45s ease;
}
.fade-out.hidden {
  opacity: 0 !important;
  pointer-events: none;
}
.fade-out.gone {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.search-wrap { width: 100%; max-width: 720px; display: flex; align-items: center; gap: 10px; border-bottom: 0.5px solid transparent; padding-bottom: 0; transition: border-bottom-color 0.8s ease, padding-bottom 0.4s ease; position: relative; }
/* Web-search bar removed — this pill now only renders as the SBR player's seek line. */
.search-icon, .search-box { display: none; }
.search-wrap:has(.player-bar:not(.hidden-el)) { min-height: 2.5rem; border-bottom-color: rgba(255,255,255,0.15); padding-bottom: 0; }

.player-controls-inline { position: relative; display: flex; align-items: center; flex-shrink: 0; gap: 0; height: 1.2rem; }
.ctrl-prev, .ctrl-next { display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; color: rgba(200,190,255,0.3); cursor: pointer; transition: color 0.2s; padding: 0 8px; flex-shrink: 0; height: 1.2rem; line-height: 1; }
.ctrl-prev:hover, .ctrl-next:hover { color: rgba(200,190,255,0.75); }
.ctrl-pause { display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1.2rem; color: rgba(200,190,255,0.4); transition: color 0.2s; cursor: pointer; flex-shrink: 0; line-height: 1; font-size: 0.85rem; }
.ctrl-pause:hover { color: rgba(200,190,255,0.75); }
.mc-wrap { width: 100%; max-width: 720px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.6rem; }
.mc-card { position: relative; background: rgba(255,255,255,0.03); border: 0.5px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1rem 1.25rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.5rem; grid-column: span 3; max-width: none; transition: background 0.2s, border-color 0.2s, transform 0.15s; overflow: hidden; cursor: default; }
.mc-card::before { content: ''; position: absolute; inset: 0; border-radius: 16px; background: radial-gradient(circle at top left, rgba(134,197,63,0.06), transparent 60%); opacity: 0; transition: opacity 0.25s; }
.mc-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); transform: translateY(-1px); }
.mc-card:hover::before { opacity: 1; }
.sbr-card { position: relative; background: rgba(255,255,255,0.03); border: 0.5px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1rem 1.25rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.5rem; grid-column: span 3; max-width: none; transition: background 0.2s, border-color 0.2s, transform 0.15s, opacity 0.5s ease; overflow: hidden; cursor: pointer; }
.app-desc { font-size: 0.72rem; color: rgba(255,255,255,0.82); line-height: 1.55; display: block; }
.sbr-card::before { content: ''; position: absolute; inset: 0; border-radius: 16px; background: radial-gradient(circle at top left, rgba(139,92,246,0.08), transparent 60%); opacity: 0; transition: opacity 0.25s; }
.sbr-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); transform: translateY(-1px); }
.sbr-card:hover::before { opacity: 1; }
/* Preservation card — same base shape as sbr-card, amber/warm accent */
.preservation-card { position: relative; background: rgba(255,255,255,0.03); border: 0.5px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1rem 1.25rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.5rem; grid-column: span 3; max-width: none; transition: background 0.2s, border-color 0.2s, transform 0.15s; overflow: hidden; cursor: pointer; }
.preservation-card::before { content: ''; position: absolute; inset: 0; border-radius: 16px; background: radial-gradient(circle at top left, rgba(232,160,48,0.09), transparent 60%); opacity: 0; transition: opacity 0.25s; }
.preservation-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); transform: translateY(-1px); }
.preservation-card:hover::before { opacity: 1; }
/* 3-card mode: each card spans 2 of 6 columns */
.mc-wrap.has-preservation .mc-card,
.mc-wrap.has-preservation .sbr-card,
.mc-wrap.has-preservation .preservation-card { grid-column: span 2; }
.beanode-card { position: relative; background: rgba(255,255,255,0.03); border: 0.5px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1rem 1.25rem; display: flex; flex-direction: column; align-items: stretch; gap: 0; grid-column: span 2; margin-top: 1.4rem; transition: background 0.2s, border-color 0.2s, transform 0.15s; overflow: hidden; }
.beanode-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.beanode-name-col { display: flex; flex-direction: column; gap: 2px; }
.beanode-row { display: flex; flex-direction: column; gap: 0.75rem; grid-column: span 6; margin-top: 1.4rem; }
.beanode-pair { display: flex; gap: 0.75rem; align-items: stretch; }
.beanode-pair > .beanode-card { flex: 1 1 0; min-width: 0; grid-column: unset; margin-top: 0; }
.beanode-row > .beadns-card { grid-column: unset; margin-top: 0; }
.beanode-card::before { content: ''; position: absolute; inset: 0; border-radius: 16px; background: radial-gradient(circle at top left, rgba(52,211,153,0.07), transparent 60%); opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.beanode-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); transform: translateY(-1px); }
.beanode-card:hover::before { opacity: 1; }
.pihole-card { flex-direction: column; align-items: center; text-align: center; gap: 0.55rem; cursor: pointer; }
.pihole-card::before { background: radial-gradient(circle at top center, rgba(239,68,68,0.08), transparent 65%); }
.pihole-header { display: flex; flex-direction: row; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.pihole-title { font-family: 'DM Mono', monospace; font-size: 0.8rem; font-weight: 700; color: #e8e4ff; }.pihole-stats { width: 100%; display: flex; flex-direction: column; gap: 0.3rem; }
.pihole-stat { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pihole-stat-label { display: flex; align-items: center; gap: 3px; font-family: 'DM Mono', monospace; font-size: 0.62rem; color: rgba(255,255,255,0.35); }
.pihole-count { font-family: 'DM Mono', monospace; font-size: 0.95rem; letter-spacing: 0.02em; }
.pihole-queries { background: linear-gradient(135deg, #c084fc, #67e8f9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.pihole-blocked-count { background: linear-gradient(135deg, #fb923c, #fde047); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.pihole-cpu-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pihole-cpu-val { font-family: 'DM Mono', monospace; font-size: 0.85rem; color: rgba(255,255,255,0.65); background: rgba(255,255,255,0.08); border-radius: 4px; padding: 1px 6px; }
.pihole-cpu-sep { font-size: 0.7rem; color: rgba(255,255,255,0.18); }
.pihole-temp-val { font-family: 'DM Mono', monospace; font-size: 0.85rem; color: rgba(255,255,255,0.45); transition: color 0.5s ease; }
.pihole-ram-used, .beanode-ram-used { font-family: 'DM Mono', monospace; font-size: 0.65rem; font-weight: 400; background: linear-gradient(135deg, #a855f7, #60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; flex-shrink: 0; }
.pihole-ram-used { font-size: 0.8rem; }
.pihole-temp-cool { color: rgba(103,232,249,0.75); }
.pihole-temp-warm { color: #34d399; }
.pihole-temp-hot  { color: #fb923c; }
.pihole-rate-wrap { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 0.1rem; }
.pihole-rate-header { display: flex; align-items: center; gap: 4px; justify-content: center; }
.pihole-rate-pct { font-family: 'DM Mono', monospace; font-size: 0.75rem; color: rgba(255,255,255,0.65); }
.pihole-block-icon { width: 10px; height: 10px; color: rgba(255,255,255,0.25); flex-shrink: 0; }
.pihole-rate-label { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: rgba(255,255,255,0.35); }
.pihole-rate-bar { width: 72%; margin: 0 auto; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.06); transition: background 0.8s ease; }
/* ── BeaDNS two-unit card (full-width row) ── */
.beadns-card { grid-column: unset; margin-top: 0; width: 100%; gap: 0.7rem; cursor: default; }
.beadns-card::before { background: radial-gradient(circle at top center, rgba(239,68,68,0.08), transparent 65%); }
.beadns-card .pihole-header { margin-bottom: 0; justify-content: center; }
/* BeaDNS brand (icon/title/uptime + HA badge) sits as a column beside the two DNS nodes */
.beadns-brand { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 8px; }
.beadns-brand-row { display: flex; flex-direction: row; align-items: center; gap: 0.5rem; }
/* High-availability / redundancy status badge, centered below the title + icon */
.beadns-ha { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-family: 'DM Mono', monospace; font-size: 0.52rem; font-weight: 700; letter-spacing: 0.07em; white-space: nowrap; }
.beadns-ha-icon { width: 9px; height: 9px; flex-shrink: 0; }
.beadns-ha-x, .beadns-ha-bang { display: none; }
.beadns-ha.ha-ok { color: #34d399; }
.beadns-ha.ha-degraded { color: #fbbf24; }
.beadns-ha.ha-down { color: #f87171; }
.beadns-ha.ha-degraded .beadns-ha-check { display: none; }
.beadns-ha.ha-degraded .beadns-ha-bang { display: inline-block; }
.beadns-ha.ha-down .beadns-ha-check { display: none; }
.beadns-ha.ha-down .beadns-ha-x { display: inline-block; }
.beadns-units { display: flex; align-items: center; gap: 0; }
.beadns-unit { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.2rem 0.6rem; cursor: pointer; border-radius: 10px; transition: background 0.2s; }
.beadns-unit:hover { background: rgba(255,255,255,0.04); }
.beadns-unit-head { display: flex; align-items: center; gap: 5px; font-family: 'DM Mono', monospace; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
.beadns-metric { display: flex; align-items: center; justify-content: center; gap: 7px; }
.beadns-metric-label { display: inline-flex; align-items: center; gap: 4px; font-family: 'DM Mono', monospace; font-size: 0.62rem; color: rgba(255,255,255,0.35); min-width: 46px; }
.beadns-sep { padding: 0 2px; }
.beadns-totals { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.1rem; padding-top: 0.6rem; border-top: 0.5px solid rgba(255,255,255,0.06); }
.beadns-total-cell { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.beadns-rate-cell { gap: 5px; }
.beadns-rate-cell .pihole-rate-bar { width: 90%; }
.beanode-uptime { font-size: 0.65rem; color: rgba(255,255,255,0.28); font-family: 'DM Mono', monospace; }
.beanode-stats-block { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.6rem; }
.beanode-stat-row { display: flex; align-items: center; gap: 6px; }
.beanode-stat-label { font-family: 'DM Mono', monospace; font-size: 0.68rem; color: rgba(255,255,255,0.35); min-width: 42px; text-align: right; display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.beanode-stat-icon { width: 11px; height: 11px; flex-shrink: 0; color: rgba(255,255,255,0.3); }
.beanode-stat-val { font-family: 'DM Mono', monospace; font-size: 0.68rem; color: rgba(255,255,255,0.55); min-width: 30px; text-align: right; }
.beanode-stat-row .beanode-stat-val { background: rgba(255,255,255,0.08); border-radius: 4px; padding: 1px 5px; text-align: center; min-width: 28px; }
.beanode-disks { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 4px; }
.beanode-disks:empty { display: none; margin-top: 0; }
.beanode-disk-row { display: flex; align-items: center; gap: 6px; }
.beanode-disk-label { font-size: 0.68rem; color: rgba(255,255,255,0.35); font-family: 'DM Mono', monospace; min-width: 32px; text-align: right; }
.beanode-bar-track { flex: 1; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.beanode-cpu-temp { font-family: 'DM Mono', monospace; font-size: 0.65rem; min-width: 30px; text-align: right; flex-shrink: 0; color: rgba(255,255,255,0.38); }
.beanode-cpu-temp.pihole-temp-cool { color: rgba(103,232,249,0.75); }
.beanode-cpu-temp.pihole-temp-warm { color: #34d399; }
.beanode-cpu-temp.pihole-temp-hot  { color: #fb923c; }
.beanode-bar-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.beanode-bar-cpu { background: linear-gradient(90deg, #34d399, #60a5fa); }
.beanode-bar-ram { background: linear-gradient(90deg, #a78bfa, #60a5fa); }
.beanode-bar-disk { background: linear-gradient(90deg, #3b82f6, #34d399); }
.beanode-net-row { display: flex; align-items: stretch; margin-top: 0.6rem; }
.beanode-net-half { flex: 1; display: flex; align-items: center; justify-content: center; }
.beanode-net-col { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.beanode-net-col .beanode-stat-val { background: rgba(255,255,255,0.08); border-radius: 4px; padding: 1px 5px; text-align: center; min-width: 28px; }
.beanode-net-sep { font-size: 0.75rem; color: rgba(255,255,255,0.15); padding: 0 5px; display: flex; align-items: center; flex-shrink: 0; }
.beanode-net-icon { width: 9px; height: 9px; flex-shrink: 0; color: currentColor; }
.beanode-net-half .beanode-stat-label { min-width: unset; text-align: center; justify-content: center; }
.beanode-card:not(.is-offline) .beanode-net-half:first-child .beanode-stat-label { color: #c084fc; background: linear-gradient(135deg, #a855f7, #e879f9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.beanode-card:not(.is-offline) .beanode-net-half:last-child .beanode-stat-label { color: #67e8f9; background: linear-gradient(135deg, #67e8f9, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
/* DOWN | UP relocated into the header's empty right side */
.beanode-net-row.in-header { margin-top: 0; margin-left: auto; flex: 0 0 auto; align-items: center; }
.beanode-net-row.in-header .beanode-net-half { flex: 0 0 auto; }
.beanode-net-row.in-header .beanode-net-sep { padding: 0 7px; }
.beanode-bar-disk.warn { background: linear-gradient(90deg, #f97316, #ef4444); }
.beanode-bar-disk.crit { background: linear-gradient(90deg, #ef4444, #a855f7); }
.beanode-disk-pct { font-size: 0.68rem; color: rgba(255,255,255,0.35); font-family: 'DM Mono', monospace; min-width: 30px; text-align: right; }.beanode-offline-msg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; flex: 1; margin-top: 0.5rem; }
.beanode-caution-icon { width: 14px; height: 14px; flex-shrink: 0; color: rgba(251,191,36,0.4); }
.beanode-offline-msg span { font-family: 'DM Mono', monospace; font-size: 0.7rem; color: rgba(255,255,255,0.22); font-style: italic; transition: opacity 0.38s ease; }
.beanode-ssh-wrap { margin-bottom: 0.5rem; position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; width: 100%; }
.beanode-access-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: rgba(255,255,255,0.04); border: 0.5px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 5px 12px 5px 9px; font-family: 'DM Mono', monospace; font-size: 0.72rem; color: rgba(255,255,255,0.45); cursor: pointer; text-decoration: none; user-select: none; transition: background 0.2s, border-color 0.2s, color 0.2s; flex: 1; }
.beanode-access-btn:hover { background: rgba(96,165,250,0.1); border-color: rgba(96,165,250,0.3); color: #60a5fa; }
.beanode-access-icon { width: 13px; height: 13px; flex-shrink: 0; }
.beanode-ssh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: rgba(255,255,255,0.04); border: 0.5px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 5px 12px 5px 9px; font-family: 'DM Mono', monospace; font-size: 0.72rem; color: rgba(255,255,255,0.45); cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; user-select: none; flex: 1; }
.beanode-ssh-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: rgba(255,255,255,0.7); }
.beanode-ssh-btn.active { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.3); color: #34d399; }
.beanode-ssh-btn.active:hover { background: rgba(52,211,153,0.16); border-color: rgba(52,211,153,0.45); }
.beanode-ssh-btn.error { border-color: rgba(248,113,113,0.45); color: #f87171; }
.beanode-ssh-btn.jiggle { animation: beanode-jiggle 0.38s ease; }
@keyframes beanode-jiggle {
  0%,100% { transform: translateX(0); }
  12%     { transform: translateX(-6px); }
  28%     { transform: translateX(5px); }
  44%     { transform: translateX(-4px); }
  60%     { transform: translateX(3px); }
  76%     { transform: translateX(-2px); }
  90%     { transform: translateX(1px); }
}
.beanode-ssh-input.shake { color: #f87171; }
.beanode-ssh-icon { width: 13px; height: 13px; flex-shrink: 0; }
.beanode-ssh-expand { display: flex; align-items: center; gap: 5px; max-width: 0; overflow: hidden; opacity: 0; transition: max-width 0.25s ease, opacity 0.2s ease; }
.beanode-ssh-btn.open .beanode-ssh-expand { max-width: 120px; opacity: 1; }
.beanode-ssh-sep { color: rgba(255,255,255,0.18); flex-shrink: 0; }
.beanode-ssh-input { background: transparent; border: none; outline: none; font-family: 'DM Mono', monospace; font-size: 0.72rem; color: rgba(255,255,255,0.75); width: 75px; transition: color 0.25s ease; }
.beanode-ssh-msg { font-family: 'DM Mono', monospace; font-size: 0.65rem; color: #f87171; }
.mc-icon { flex-shrink: 0; width: 38px; height: 38px; min-width: 38px; min-height: 38px; border-radius: 8px; overflow: hidden; image-rendering: pixelated; display: block; }
.mc-icon svg, svg.mc-icon { width: 38px; height: 38px; min-width: 38px; min-height: 38px; display: block; }
/* App-card header: icon + stacked title/players */
.mc-header { display: flex; align-items: flex-start; gap: 1rem; }
.mc-header > svg { flex-shrink: 0; }
/* SBR & Preservation have a single-line title (no players row), so centre
   the title vertically against the icon — no empty space below */
.sbr-card .mc-header, .preservation-card .mc-header { align-items: center; }
.mc-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-title-row { display: flex; align-items: center; gap: 8px; }
.mc-title { font-family: 'DM Mono', monospace; font-size: 0.95rem; font-weight: 700; color: #e8e4ff; }
.mc-players { font-size: 0.7rem; color: rgba(200,190,255,0.45); letter-spacing: 0.04em; font-family: 'DM Mono', monospace; }
.mc-players.online { color: rgba(134,197,63,0.7); }
.mc-address { font-size: 0.65rem; color: rgba(200,190,255,0.25); letter-spacing: 0.06em; }
/* Description fills the full card width below the header and grows to fill
   the remaining vertical space in the box */
.app-desc { flex: 1; }
.mc-version { font-size: 0.63rem; color: rgba(200,190,255,0.28); letter-spacing: 0.06em; display: block; font-family: 'DM Mono', monospace; }
.mc-status-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; background: rgba(255,255,255,0.15); }
.mc-status-dot.online  { background: #34d399; box-shadow: 0 0 5px #34d399; }
.mc-status-dot.offline { background: #f87171; box-shadow: 0 0 5px #f87171; }
.vol-wrap { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; margin-left: -4px; }
.vol-icon { cursor: pointer; opacity: 0.35; transition: opacity 0.2s; flex-shrink: 0; }
.vol-icon:hover { opacity: 0.7; }
.vol-slider-wrap {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.3s ease, opacity 0.3s ease;
  display: flex;
  align-items: center;
  padding: 6px 0;
}
.vol-wrap:hover .vol-slider-wrap,
.vol-slider-wrap:hover {
  max-width: 90px;
  opacity: 1;
}
.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 75px;
  height: 3px;
  border-radius: 2px;
  outline: none;
  border: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(220,210,255,0.85);
  cursor: pointer;
  box-shadow: 0 0 4px rgba(200,190,255,0.5);
  transition: background 0.2s, transform 0.15s;
}
.vol-slider::-webkit-slider-thumb:hover {
  background: rgba(255,255,255,0.95);
  transform: scale(1.25);
}
.vol-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(220,210,255,0.85);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 4px rgba(200,190,255,0.5);
}
.vol-slider::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(200,190,255,0.15);
}
.vol-slider::-moz-range-progress {
  height: 3px;
  border-radius: 2px;
  background: rgba(200,190,255,0.55);
}
#queue-viewport {
  width: 100%;
  height: 238px;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
  position: relative;
  perspective: 520px;
  perspective-origin: 50% 50%;
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}
#queue-viewport::-webkit-scrollbar { display: none; }
#queue-scroller {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 100px 0;
}
.queue-item {
  flex-shrink: 0;
  padding: 0.45rem 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  user-select: none;
  width: 100%;
  transform-origin: center center;
}
.queue-item:hover .queue-track { color: rgba(255,255,255,0.9); }
.queue-item.is-current .queue-author,
.queue-item.is-current .queue-track { color: rgba(255,255,255,0.9); }
@keyframes queue-shimmer {
  0%, 100% { text-shadow: 0 0 6px rgba(255,255,255,0.5), 0 0 18px rgba(200,190,255,0.3); }
  50%       { text-shadow: 0 0 14px rgba(255,255,255,0.95), 0 0 32px rgba(220,210,255,0.6); }
}
@keyframes queue-shimmer-track {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(255,255,255,0.3)); }
  50%       { filter: drop-shadow(0 0 5px rgba(255,255,255,0.7)) drop-shadow(0 0 10px rgba(220,210,255,0.4)); }
}
.queue-item.is-current { position: relative; isolation: isolate; }
.queue-item.is-current .queue-author { animation: queue-shimmer 2.8s ease-in-out infinite; }
.queue-item.is-current .queue-track  { animation: queue-shimmer-track 2.8s ease-in-out infinite; }
@keyframes mote-spread {
  0%   { transform: translateX(-50%) scaleX(0.04); opacity: 0; }
  8%   { opacity: 0.9; }
  55%  { transform: translateX(-50%) scaleX(0.80); opacity: 0.5; }
  100% { transform: translateX(-50%) scaleX(1.00); opacity: 0; }
}
.queue-item.is-current::before,
.queue-item.is-current::after {
  content: '';
  position: absolute;
  top: calc(50% - 1px);
  left: 50%;
  transform: translateX(-50%) scaleX(0.04);
  transform-origin: center;
  height: 2px;
  width: 100%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.95) 0%, rgba(220,210,255,0.5) 40%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  animation: mote-spread 2.8s ease-out infinite;
}
.queue-item.is-current::after {
  animation-delay: 1.4s;
  animation-fill-mode: backwards;
}
.queue-author {
  font-family: 'Cormorant Garamond', serif;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(220,210,255,0.75);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.queue-track {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  color: rgba(200,190,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-dot {
  font-size: 0.55rem;
  color: rgba(200,190,255,0.25);
  flex-shrink: 0;
  align-self: center;
}
#sbr-effects {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s ease;
  animation: overlay-shake 8s ease-in-out infinite;
  animation-play-state: paused;
  background:
    radial-gradient(ellipse 75% 60% at 103% -3%,
      rgba(255,220,130,0.38) 0%,
      rgba(255,180,80,0.18)  30%,
      rgba(220,130,50,0.08)  55%,
      transparent 72%
    ),
    radial-gradient(ellipse 50% 55% at 50% 38%,
      rgba(255,210,120,0.16) 0%,
      rgba(255,185,85,0.08)  45%,
      rgba(220,140,50,0.03)  68%,
      transparent 82%
    ),
    radial-gradient(ellipse 55% 65% at 62% 50%,
      rgba(255,195,90,0.08) 0%,
      rgba(220,150,60,0.03) 50%,
      transparent 70%
    );
}
#sbr-rays {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.5s ease;
  mix-blend-mode: screen;
  filter: blur(6px);
  animation: overlay-shake 8s ease-in-out infinite;
  animation-play-state: paused;
}
#sbr-rays svg {
  width: 100%;
  height: 100%;
  animation: rays-breathe 7s ease-in-out infinite;
}
#ray-group {
  transform-origin: 100% 0%;
  animation: rays-sweep 18s ease-in-out infinite;
}
@keyframes rays-sweep {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-10deg); }
  55%  { transform: rotate(6deg); }
  80%  { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}
#ray-group polygon:nth-child(1) { animation: ray-osc-1 9s  ease-in-out infinite; transform-origin: 100% 0%; }
#ray-group polygon:nth-child(2) { animation: ray-osc-2 11s ease-in-out infinite; transform-origin: 100% 0%; }
#ray-group polygon:nth-child(3) { animation: ray-osc-3 13s ease-in-out infinite; transform-origin: 100% 0%; }
#ray-group polygon:nth-child(4) { animation: ray-osc-4 8s  ease-in-out infinite; transform-origin: 100% 0%; }
@keyframes ray-osc-1 { 0%,100%{transform:rotate(0deg);opacity:0.9}  45%{transform:rotate(-5deg);opacity:0.5}  75%{transform:rotate(3deg);opacity:0.8} }
@keyframes ray-osc-2 { 0%,100%{transform:rotate(0deg);opacity:0.7}  35%{transform:rotate(6deg);opacity:0.35} 65%{transform:rotate(-4deg);opacity:0.6} }
@keyframes ray-osc-3 { 0%,100%{transform:rotate(0deg);opacity:0.8}  50%{transform:rotate(-7deg);opacity:0.4}  80%{transform:rotate(4deg);opacity:0.7} }
@keyframes ray-osc-4 { 0%,100%{transform:rotate(0deg);opacity:0.6}  30%{transform:rotate(5deg);opacity:0.85} 70%{transform:rotate(-3deg);opacity:0.3} }
@keyframes rays-breathe {
  0%, 100% { opacity: 0.9; }
  40%       { opacity: 0.5; }
  70%       { opacity: 0.75; }
}

@keyframes sink-down {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}
@keyframes rise-up {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-12px); }
}
@keyframes fade-in-down {
  0%   { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-up {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.anim-sink    { animation: sink-down 0.35s ease forwards; }
.anim-rise    { animation: rise-up 0.35s ease forwards; }
.anim-in-down { animation: fade-in-down 0.45s ease forwards; }
.anim-in-up   { animation: fade-in-up 0.45s ease forwards; }

#seek-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: rgba(255,255,255,0.55);
  pointer-events: none;
  z-index: 1;
  transform: translateY(50%);
}
#seek-fill.seek-active {
  box-shadow: 0 0 6px 2px rgba(255,255,255,0.35), 0 0 14px 4px rgba(255,255,255,0.12);
}
@keyframes seek-glow {
  0%   { background: rgba(255,255,255,0.55); box-shadow: none; }
  30%  { background: rgba(255,255,255,1);    box-shadow: 0 0 6px 2px rgba(255,255,255,0.8); }
  100% { background: rgba(255,255,255,1);    box-shadow: 0 0 10px 3px rgba(255,255,255,0.95); }
}
@keyframes seek-drain {
  0%   { width: 100%; background: rgba(255,255,255,0.9); box-shadow: 0 0 8px 2px rgba(255,255,255,0.7); }
  100% { width: 0%;   background: rgba(255,255,255,0.55); box-shadow: none; }
}
.seek-glowing { animation: seek-glow 0.4s ease forwards; }
.seek-draining { animation: seek-drain 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

@keyframes shimmer-in {
  0%   { opacity: 0; transform: translateX(-18px); filter: brightness(2.5) saturate(0); }
  40%  { opacity: 1; transform: translateX(2px);   filter: brightness(1.8) saturate(0.3); }
  70%  { transform: translateX(0);                 filter: brightness(1.3) saturate(0.7); }
  100% { opacity: 1; transform: translateX(0);     filter: brightness(1)   saturate(1); }
}
.song-shimmer { animation: shimmer-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@property --gleam-pos {
  syntax: '<percentage>';
  inherits: false;
  initial-value: -20%;
}
@keyframes author-shimmer {
  0%   { --gleam-pos: -20%; }
  100% { --gleam-pos: 120%; }
}
.player-author.shimmer-pass {
  background-image: linear-gradient(90deg,
    rgba(220,215,255,0.5) calc(var(--gleam-pos) - 18%),
    rgba(255,255,255,1)   var(--gleam-pos),
    rgba(220,215,255,0.5) calc(var(--gleam-pos) + 18%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: author-shimmer 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes player-marquee {
  0%, 15%  { transform: translateX(0); }
  70%, 85% { transform: translateX(var(--marquee-dist, 0px)); }
  100%     { transform: translateX(0); }
}
.player-track-marquee {
  animation: player-marquee 14s ease-in-out infinite;
  will-change: transform;
}
#ambient-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  width: 100%;
  padding-top: 16px;
}
.amb-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  opacity: 0.28;
  color: #fff;
  transition: opacity 0.35s ease, filter 0.35s ease;
  line-height: 0;
}
.amb-btn svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.amb-btn:hover { opacity: 0.52; }
.amb-btn.is-active {
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.72));
}

#sbr-chevron-btn {
  background: none; border: none; cursor: pointer;
  padding: 10px 60px;
  display: flex; align-items: center; justify-content: center;
}
#sbr-chevron-btn svg {
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), stroke 0.2s;
  transform: rotate(180deg);
}
#sbr-chevron-btn:hover svg { stroke: rgba(200,190,255,0.55) !important; }
#sbr-chevron-btn.collapsed svg { transform: rotate(0deg); }

/* ─────────────────────────────────────────────────────────────────────────
   Utility classes
───────────────────────────────────────────────────────────────────────── */

/* General-purpose visibility toggle used by JS (replaces inline style.opacity) */
.hidden-el { opacity: 0 !important; pointer-events: none !important; }

/* Collapses width to zero; used to hide search icon/box after player opens */
.zero-width { width: 0 !important; overflow: hidden !important; }

/* Applied to SBR overlay elements when player is active */
.bg-image-sbr.sbr-active  { opacity: 1; }
#sbr-effects.sbr-active   { opacity: 1; animation-play-state: running; }
#sbr-rays.sbr-active      { opacity: 1; animation-play-state: running; }

/* ─────────────────────────────────────────────────────────────────────────
   Elements whose inline styles have been moved here from HTML / JS
───────────────────────────────────────────────────────────────────────── */

/* Player layout wrapper */
#sbr-player-wrap { width: 100%; max-width: var(--portal-max); display: flex; flex-direction: column; gap: 0; }

/* Ambient soundscape bar — hidden by default (.hidden-el on element); transition
   remains so JS classList toggle produces a smooth opacity fade */
#ambient-bar { transition: opacity 0.8s ease; }

/* Player bar — hidden by default via .hidden-el on the HTML element */
.player-bar {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.8s ease;
}

/* Player controls flex layout (was inline style="display:flex;...") */
#player-controls { display: flex; align-items: center; flex-shrink: 0; }

/* Song label and time counter in the player bar */
.player-song-el {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 0.85rem;
  color: rgba(220,215,255,0.5);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.player-time-el {
  font-size: 0.65rem;
  color: rgba(200,190,255,0.3);
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Queue panel — initial state (JS manipulates max-height/opacity/transition dynamically) */
#sbr-player-panel {
  width: 100%;
  max-width: var(--portal-max);
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  transition: opacity 0.6s ease, max-height 0.5s ease;
}

/* Chevron toggle bar — initial state */
#sbr-chevron-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

/* Particle canvas (track-switch burst effect) */
#particle-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 999; }

/* ─────────────────────────────────────────────────────────────────────────
   Extracted inline styles — identifiers / typography
───────────────────────────────────────────────────────────────────────── */

/* "V1.1" superscript badge on the BeaNet logo */
.v-badge {
  position: absolute;
  top: -0.2em;
  right: -1.6em;
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  font-size: 0.28em;
  letter-spacing: 0.18em;
  color: rgba(240,238,255,0.3);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

/* System status row below the datetime */
.status-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; }
.status-sep  { color: rgba(200,190,255,0.2); font-size: 0.65rem; letter-spacing: 0.12em; }

/* SBR card icon svg wrapper */
.sbr-icon { flex-shrink: 0; border-radius: 8px; display: block; }

/* Serenity Box card title (slightly smaller than the standard .mc-title) */
.sbr-card-title { font-size: 0.88rem; }

/* Cast to TV button — fixed top-right, only visible during player */
#cast-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  pointer-events: none;
  transition: color 0.2s ease, opacity 0.3s ease;
  opacity: 0;
}
#cast-btn.cast-btn-visible { opacity: 1; pointer-events: auto; }
#cast-btn:hover { color: rgba(255, 255, 255, 0.6); }
#cast-btn.casting { color: #7b4fff; }
#cast-btn.casting:hover { color: #a07fff; }

/* Pause motion & VFX button — mirrors cast-btn visibility pattern */
#motion-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  pointer-events: none;
  transition: color 0.2s ease, opacity 0.3s ease;
  opacity: 0;
}
#motion-btn.motion-btn-visible { opacity: 1; pointer-events: auto; }
#motion-btn:hover { color: rgba(255, 255, 255, 0.6); }
#motion-btn.motion-paused { color: #ffb347; }
#motion-btn.motion-paused:hover { color: #ffd080; }

/* SBR Settings button — mirrors cast-btn / motion-btn pattern */
#sbr-settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  pointer-events: none;
  transition: color 0.2s ease, opacity 0.3s ease;
  opacity: 0;
}
#sbr-settings-btn.sbr-settings-btn-visible { opacity: 1; pointer-events: auto; }
#sbr-settings-btn:hover { color: rgba(255, 255, 255, 0.6); }
#sbr-settings-btn.sbr-settings-active { color: rgba(200, 190, 255, 0.85); }

/* SBR Player Settings panel — same glass styling as #settings-panel */
#sbr-settings-panel {
  position: fixed;
  top: 3.2rem;
  right: 1.5rem;
  width: 240px;
  background: rgba(8,8,18,0.97);
  border: 0.5px solid rgba(200,190,255,0.13);
  border-radius: 10px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1.1rem 1.2rem;
  z-index: 302;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
}

/* Centered title for SBR settings panel */
#sbr-settings-panel .sp-title { text-align: center; width: 100%; }

/* Normalization row */
.sbr-sp-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0;
}
.sbr-sp-row > svg { flex-shrink: 0; color: rgba(200,190,255,0.35); }
.sbr-sp-label {
  flex: 1;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: rgba(200,190,255,0.5);
}
.sbr-sp-info {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: rgba(200,190,255,0.28);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.sbr-sp-info:hover { color: rgba(200,190,255,0.7); }

/* Floating tooltip shown below the settings panel via JS */
#sbr-sp-tooltip {
  display: none;
  position: fixed;
  width: 210px;
  background: rgba(10,10,22,0.97);
  border: 0.5px solid rgba(200,190,255,0.15);
  border-radius: 7px;
  padding: 7px 10px;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: rgba(200,190,255,0.6);
  line-height: 1.5;
  pointer-events: none;
  z-index: 400;
  white-space: normal;
}

/* iOS-style toggle */
.sbr-toggle {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 17px;
  flex-shrink: 0;
}
.sbr-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.sbr-toggle-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(200,190,255,0.12);
  border-radius: 9px;
  border: 0.5px solid rgba(200,190,255,0.18);
  transition: background 0.22s ease, border-color 0.22s ease;
}
.sbr-toggle-track::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(200,190,255,0.38);
  transition: transform 0.22s ease, background 0.22s ease;
}
.sbr-toggle input:checked + .sbr-toggle-track {
  background: rgba(123,79,255,0.55);
  border-color: rgba(160,130,255,0.4);
}
.sbr-toggle input:checked + .sbr-toggle-track::before {
  transform: translateX(13px);
  background: rgba(235,230,255,0.92);
}

/* Section label inside SBR settings */
.sbr-sp-section {
  display: block;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240,238,255,0.35);
  margin-bottom: 0.55rem;
}

/* Background thumbnail grid */
.sbr-bg-grid {
  display: flex;
  gap: 0.55rem;
}
.sbr-bg-thumb {
  flex: 1;
  background: none;
  border: 1.5px solid rgba(200,190,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.sbr-bg-thumb:hover { border-color: rgba(200,190,255,0.32); transform: translateY(-1px); }
.sbr-bg-thumb.active { border-color: rgba(123,79,255,0.7); }
.sbr-bg-thumb-img {
  width: 100%;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
}

/* Rain background layer */
.bg-image-rain {
  position: absolute;
  inset: -10%;
  background: url('backgroundrain.jpg') center/cover no-repeat;
  filter: blur(4px) brightness(0.28);
  animation: camshake 8s ease-in-out infinite;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.bg-image-rain.rain-active { opacity: 1; }

/* Rain canvas */
#rain-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 1.5s ease;
}
#rain-canvas.rain-active { opacity: 1; }

/* Amber lantern halo */
#sbr-lantern-halo {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse 70% 80% at 100% 52%,
    rgba(255,155,35,0.55) 0%,
    rgba(255,125,20,0.28) 28%,
    rgba(230,100,10,0.10) 55%,
    transparent 72%);
  opacity: 0;
  transition: opacity 1.5s ease;
}
#sbr-lantern-halo.rain-active { opacity: 1; }

/* Cache row */
.sbr-cache-size {
  font-size: 0.60rem;
  color: rgba(200,190,255,0.35);
  flex: 1;
  text-align: right;
  margin-right: 6px;
  white-space: nowrap;
}
.sbr-cache-clear {
  background: rgba(200,190,255,0.07);
  border: 0.5px solid rgba(200,190,255,0.18);
  border-radius: 4px;
  color: rgba(200,190,255,0.45);
  font-size: 0.60rem;
  font-family: 'DM Mono', monospace;
  padding: 2px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.sbr-cache-clear:hover { background: rgba(200,190,255,0.15); color: rgba(200,190,255,0.85); }

/* no-motion: pause all VFX animations when the button is active */
body.no-motion .bg-image,
body.no-motion .bg-image-sbr,
body.no-motion .bg-image-rain { animation-play-state: paused !important; }
body.no-motion #sbr-effects { animation-play-state: paused !important; }
body.no-motion #sbr-rays,
body.no-motion #sbr-rays svg,
body.no-motion #ray-group,
body.no-motion #ray-group polygon { animation-play-state: paused !important; }
body.no-motion #dust-canvas { display: none !important; }
body.no-motion #rain-canvas { display: none !important; }
body.no-motion .queue-item.is-current .queue-author,
body.no-motion .queue-item.is-current .queue-track { animation: none !important; }
body.no-motion .queue-item.is-current::before,
body.no-motion .queue-item.is-current::after { display: none !important; }

/* tab-hidden: pause all CSS animations when the tab is not visible.
   Canvas rAF loops are paused via JS; audio continues uninterrupted. */
body.tab-hidden .bg-image,
body.tab-hidden .bg-image-sbr,
body.tab-hidden .bg-image-rain { animation-play-state: paused !important; }
body.tab-hidden #sbr-effects { animation-play-state: paused !important; }
body.tab-hidden #sbr-rays,
body.tab-hidden #sbr-rays svg,
body.tab-hidden #ray-group,
body.tab-hidden #ray-group polygon { animation-play-state: paused !important; }
body.tab-hidden .queue-item.is-current .queue-author,
body.tab-hidden .queue-item.is-current .queue-track { animation-play-state: paused !important; }
body.tab-hidden .queue-item.is-current::before,
body.tab-hidden .queue-item.is-current::after { animation-play-state: paused !important; }

/* Connection error / retry UI in player bar */
.sbr-conn-error { opacity: 0.5; }
.sbr-conn-retry {
  margin-left: 10px;
  font-style: normal;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(200,190,255,0.6);
  cursor: pointer;
  opacity: 0.8;
}

/* ── Sign-in widget ── */
.top-bar-right {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  overflow: hidden;
  /* Items squeezed toward the left edge fade out gracefully */
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 2.5rem);
  mask-image: linear-gradient(to right, transparent 0, black 2.5rem);
}
.top-bar-right .datetime { transition: opacity 0.25s ease; }

#signin-widget {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Three mutually-exclusive panels; collapsed = max-width:0 + opacity:0 */
#signin-trigger,
#signin-flow,
#signin-loggedin {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, max-width 0.3s ease;
}

/* s0: show trigger */
#signin-widget[data-state="s0"] #signin-trigger {
  max-width: 120px;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240,238,255,0.5);
  transition: opacity 0.25s ease, max-width 0.3s ease, color 0.2s ease;
}
#signin-widget[data-state="s0"] #signin-trigger:hover { color: rgba(240,238,255,0.85); }
/* User icon in the top bar is always full white (the label text keeps its own colour) */
#signin-trigger > svg,
#signin-loggedin > svg { stroke: #fff; }

/* s1 / s2: show flow */
#signin-widget[data-state="s1"] #signin-flow,
#signin-widget[data-state="s2"] #signin-flow {
  max-width: 440px;
  opacity: 1;
  pointer-events: auto;
}

/* s3: show logged-in chip */
#signin-widget[data-state="s3"] #signin-loggedin {
  max-width: 200px;
  opacity: 1;
  pointer-events: auto;
}

/* Flow typography — unified with #top-title / #signin-trigger sizing */
#signin-flow { color: rgba(200,190,255,0.5); gap: 0; }
#signin-back,
#signin-back-sep,
#signin-uname-hint,
#signin-uname-static,
#signin-pwd-hint {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200,190,255,0.45);
}
#signin-back-sep { color: rgba(200,190,255,0.2); }
#signin-uname-static { color: rgba(220,215,255,0.7); }
#signin-loggedin {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(220,215,255,0.7);
  gap: 0.4rem;
}

/* Spacing: all flow children get right margin; collapsed items get 0 */
#signin-flow > * { margin-right: 0.45rem; }
#signin-flow > *:last-child { margin-right: 0; }

/* Flow: elements collapsed by default — zero width AND zero margin */
#signin-back,
#signin-back-sep,
#signin-uname-static,
#signin-lock-svg,
#signin-pwd-hint,
#signin-pwd-input {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  margin-right: 0;
  transition: opacity 0.2s ease, max-width 0.25s ease, margin-right 0.25s ease;
}

/* Flow: elements visible by default in s1 */
#signin-uname-hint  { max-width: 80px;  opacity: 1; transition: opacity 0.2s ease, max-width 0.25s ease, margin-right 0.25s ease; }
#signin-uname-input { max-width: 110px; opacity: 1; pointer-events: auto; transition: opacity 0.2s ease, max-width 0.25s ease, margin-right 0.25s ease; }

/* s1: back visible (no separator) */
#signin-widget[data-state="s1"] #signin-back { max-width: 60px; opacity: 1; pointer-events: auto; cursor: pointer; margin-right: 0.45rem; }

/* s2: hide username entry (zero width + zero margin = no phantom gap) */
#signin-widget[data-state="s2"] #signin-uname-hint  { max-width: 0; opacity: 0; pointer-events: none; margin-right: 0; }
#signin-widget[data-state="s2"] #signin-uname-input { max-width: 0; opacity: 0; pointer-events: none; margin-right: 0; }
/* s2: reveal password section */
#signin-widget[data-state="s2"] #signin-back        { max-width: 60px;  opacity: 1; pointer-events: auto; cursor: pointer; margin-right: 0.45rem; }
#signin-widget[data-state="s2"] #signin-back-sep    { max-width: 16px;  opacity: 1; margin-right: 0.45rem; }
#signin-widget[data-state="s2"] #signin-uname-static { max-width: 120px; opacity: 1; margin-right: 0.45rem; }
#signin-widget[data-state="s2"] #signin-lock-svg    { max-width: 18px;  opacity: 1; margin-right: 0.45rem; }
#signin-widget[data-state="s2"] #signin-pwd-hint    { max-width: 80px;  opacity: 1; margin-right: 0.45rem; }
#signin-widget[data-state="s2"] #signin-pwd-input   { max-width: 110px; opacity: 1; pointer-events: auto; margin-right: 0.45rem; }

/* Input fields */
#signin-uname-input,
#signin-pwd-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(200,190,255,0.2);
  outline: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: rgba(220,215,255,0.8);
  width: 90px;
  padding: 0 0 2px;
  caret-color: rgba(200,190,255,0.8);
  -webkit-appearance: none;
  appearance: none;
}
#signin-uname-input:focus,
#signin-pwd-input:focus { border-bottom-color: rgba(200,190,255,0.55); }

/* Submit button */
#signin-submit {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(200,190,255,0.5);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}
#signin-submit:hover { color: rgba(220,210,255,0.85); }
#signin-back { display: flex; align-items: center; gap: 0.3rem; }

/* SVG icons inside widget */
/* translateY nudge: the glyph ink sits low in its viewBox, so optically
   centre it with the adjacent all-caps text on the top bar */
#signin-user-svg, #signin-lock-svg,
#signin-loggedin svg { flex-shrink: 0; color: rgba(200,190,255,0.5); transform: translateY(-1.5px); }
/* trigger icon: inherits trigger text colour (white-ish) */
#signin-trigger svg { flex-shrink: 0; transform: translateY(-1.5px); }
/* signed-in user icon: white to match the back arrow */
#signin-loggedin svg { color: rgba(255,255,255,0.9); }

/* Shake on bad password */
@keyframes signin-shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}
.signin-shake { animation: signin-shake 0.35s ease; }

/* ── Settings panel ── */
#settings-panel {
  display: none;
  position: fixed;
  top: 3.2rem;
  right: 1.5rem;
  width: 240px;
  background: rgba(8,8,18,0.97);
  border: 0.5px solid rgba(200,190,255,0.13);
  border-radius: 10px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1.1rem 1.2rem;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#settings-panel > div { display: none; }
#settings-panel[data-view="main"]      #sp-main      { display: block; }
#settings-panel[data-view="users"]     #sp-users     { display: block; }
#settings-panel[data-view="perms"]     #sp-perms     { display: block; }
#settings-panel[data-view="adduser"]   #sp-adduser   { display: block; }
#settings-panel[data-view="changepwd"] #sp-changepwd { display: block; }

.sp-title {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240,238,255,0.55);
  display: block;
}
.sp-header-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sp-header-row svg { color: rgba(200,190,255,0.4); flex-shrink: 0; }
.sp-divider {
  height: 0.5px;
  background: rgba(200,190,255,0.1);
  margin: 0.75rem 0;
}
.sp-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  background: none;
  border: none;
  padding: 0.32rem 0;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: rgba(200,190,255,0.5);
  text-align: left;
  transition: color 0.18s ease;
}
.sp-row:hover { color: rgba(220,210,255,0.85); }
.sp-row svg   { flex-shrink: 0; color: rgba(200,190,255,0.35); transition: color 0.18s ease; }
.sp-row:hover svg { color: rgba(200,190,255,0.7); }
.sp-footer-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.sp-back-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(200,190,255,0.4);
  margin-right: auto;
  transition: color 0.18s ease;
  padding: 0;
}
.sp-back-btn:hover { color: rgba(200,190,255,0.75); }
.sp-action-btn {
  background: none;
  border: 0.5px solid rgba(200,190,255,0.2);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(200,190,255,0.45);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.sp-action-btn:hover { color: rgba(220,210,255,0.8); border-color: rgba(200,190,255,0.45); }
.sp-action-btn.sp-save { border-color: rgba(200,190,255,0.35); color: rgba(220,215,255,0.65); }
.sp-action-btn.sp-save:hover { color: rgba(230,225,255,0.9); border-color: rgba(200,190,255,0.6); }
.sp-signout-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(200,190,255,0.35);
  padding: 0;
  transition: color 0.18s ease;
}
.sp-signout-btn:hover { color: rgba(248,113,113,0.75); }

/* Inputs */
.sp-input {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(200,190,255,0.18);
  outline: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: rgba(220,215,255,0.8);
  padding: 0 0 3px;
  margin-bottom: 0.6rem;
  caret-color: rgba(200,190,255,0.8);
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.sp-input:focus { border-bottom-color: rgba(200,190,255,0.5); }
.sp-input::placeholder { color: rgba(200,190,255,0.25); }

/* Checkboxes */
.sp-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(200,190,255,0.5);
}
.sp-checkbox-row input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(200,190,255,0.3);
  border-radius: 2px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sp-checkbox-row input[type="checkbox"]:checked {
  background: rgba(200,190,255,0.35);
  border-color: rgba(200,190,255,0.55);
}
.sp-checkbox-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 2px; top: 0px;
  width: 5px; height: 8px;
  border: 1.5px solid rgba(240,238,255,0.9);
  border-top: none; border-left: none;
  transform: rotate(40deg);
}

/* Error text */
.sp-error {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: rgba(248,113,113,0.8);
  min-height: 1em;
  margin: 0.3rem 0 0;
}

/* User list rows */
.sp-user-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: rgba(200,190,255,0.6);
}
.sp-user-name { flex: 1; }
.sp-user-cog, .sp-user-del {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: rgba(200,190,255,0.3);
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}
.sp-user-cog:hover { color: rgba(200,190,255,0.75); }
.sp-user-del:hover  { color: rgba(248,113,113,0.7); }
.sp-user-del-confirm {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.63rem;
  color: rgba(248,113,113,0.75);
  letter-spacing: 0.06em;
}
.sp-user-del-yes, .sp-user-del-no {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 1px 3px;
  color: rgba(200,190,255,0.4);
  transition: color 0.15s ease;
}
.sp-user-del-yes:hover { color: rgba(248,113,113,0.85); }
.sp-user-del-no:hover  { color: rgba(200,190,255,0.8); }

.sp-no-users {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: rgba(200,190,255,0.25);
  font-style: italic;
  padding: 0.25rem 0;
}

/* Logged-in chip is clickable */
#signin-loggedin { cursor: pointer; }
#signin-loggedin:hover span { color: rgba(240,238,255,0.9); }

/* Mobile: full responsiveness + iOS safe areas */
@media (max-width: 600px) {
  body { overflow-y: auto; }

  /* Respect iOS notch / Dynamic Island / home indicator */
  .portal {
    padding-top: 4rem;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }
  .top-bar {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  /* fade-out max-height: 800px clips stacked mobile content — raise the ceiling */
  .fade-out { max-height: 5000px; }

  /* BeaCraft + SBR + Preservation: each card full width, stacked */
  .mc-wrap { grid-template-columns: 1fr; }
  .mc-card, .sbr-card, .preservation-card { grid-column: span 1; }
  .mc-wrap.has-preservation .mc-card,
  .mc-wrap.has-preservation .sbr-card,
  .mc-wrap.has-preservation .preservation-card { grid-column: span 1; }
  /* beanode-row has span 6 which forces 6 implicit tracks — reset to full row */
  .beanode-row { grid-column: 1 / -1; }

  /* BeaNode / BeaDNS row: stack vertically, size by content not flex math */
  .beanode-pair { flex-direction: column; }
  .beanode-pair > .beanode-card { flex: none; width: 100%; }
  .beadns-units { flex-direction: column; gap: 0.5rem; }
  .beadns-sep { display: none; }
  .beadns-totals { flex-direction: column; gap: 0.5rem; align-items: stretch; }

  /* Primary cards: 2-column so they don't tower at full width */
  .services-primary { grid-template-columns: repeat(2, 1fr); }

  /* Small cards: 2 per row on narrow screens */
  .services-secondary { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════════════════════════════
   Preservation App
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Top bar action strip ─────────────────────────────────────────────────── */
#pres-top-actions { display: none; align-items: center; gap: 1.2rem; pointer-events: auto; flex: 1; padding-left: 1.6rem; }
#top-title.top-title-pres ~ #pres-top-actions { display: flex; }
.pres-action { font-family: 'DM Mono', monospace; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(200,190,255,0.45); cursor: pointer; transition: color 0.15s; white-space: nowrap; padding: 2px 0; border: none; background: none; }
.pres-action:hover { color: rgba(200,190,255,0.85); }
.pres-action.pres-action-close { color: rgba(255,255,255,0.82); text-shadow: 0 0 8px rgba(255,255,255,0.45); }
.pres-action.pres-action-close:hover { color: rgba(255,255,255,1); text-shadow: 0 0 12px rgba(255,255,255,0.7); }
.pres-action.pres-action-danger:hover { color: rgba(255,100,80,0.85); }

/* ── Full app container ───────────────────────────────────────────────────── */
#pres-app-content { display: none; flex-direction: column; opacity: 0; transition: opacity 0.4s ease; position: fixed; inset: 0; padding-top: 42px; z-index: 5; background: transparent; }
#pres-app-content.visible { display: flex; }
#pres-app-content.fade-in { opacity: 1; }

/* ── Console filter bar ───────────────────────────────────────────────────── */
#pres-console-bar { flex-shrink: 0; display: flex; align-items: center; gap: 0; padding: 0.55rem 1.5rem; border-bottom: 0.5px solid rgba(255,255,255,0.06); background: transparent; overflow-x: auto; }
.pres-company-group { display: flex; align-items: center; gap: 0.55rem; }
.pres-company-group + .pres-company-group { margin-left: 2rem; }
.pres-company-label { font-family: 'DM Mono', monospace; font-size: 0.52rem; letter-spacing: 0.14em; color: rgba(200,190,255,0.3); text-transform: uppercase; margin-right: 0.2rem; }
.pres-console-tab { font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(200,190,255,0.38); cursor: pointer; padding: 0.2rem 0.45rem; border-radius: 4px; transition: color 0.15s, background 0.15s; white-space: nowrap; }
.pres-console-tab:hover { color: rgba(200,190,255,0.72); }
.pres-console-tab.active { color: rgba(200,190,255,0.95); background: rgba(200,190,255,0.08); }

/* ── Three-panel layout ───────────────────────────────────────────────────── */
#pres-main { flex: 1; display: flex; overflow: hidden; }
#pres-alpha { flex-shrink: 0; width: 2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem 0; gap: 0.1rem; border-right: 0.5px solid rgba(255,255,255,0.06); overflow-y: auto; }
.pres-alpha-letter { font-family: 'DM Mono', monospace; font-size: 0.6rem; color: rgba(200,190,255,0.28); cursor: pointer; padding: 1px 4px; border-radius: 3px; transition: color 0.12s, background 0.12s; }
.pres-alpha-letter:hover { color: rgba(200,190,255,0.7); }
.pres-alpha-letter.active { color: rgba(200,190,255,0.95); background: rgba(200,190,255,0.08); }

#pres-list { width: 300px; flex-shrink: 0; border-right: 0.5px solid rgba(255,255,255,0.06); overflow-y: auto; padding: 0.5rem 0; }
.pres-rom-item { padding: 0.55rem 1rem; font-family: 'DM Mono', monospace; font-size: 0.68rem; color: rgba(200,190,255,0.55); cursor: pointer; transition: background 0.12s, color 0.12s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pres-rom-item:hover { background: rgba(255,255,255,0.04); color: rgba(200,190,255,0.8); }
.pres-rom-item.active { color: rgba(200,190,255,0.95); font-weight: 700; background: rgba(200,190,255,0.06); }
.pres-rom-console-tag { color: rgba(200,190,255,0.3); }

#pres-detail { flex: 1; overflow-y: auto; padding: 1.5rem 2rem; display: flex; flex-direction: column; gap: 1.2rem; }
.pres-empty-msg { flex: 1; display: flex; align-items: center; justify-content: center; font-family: 'DM Mono', monospace; font-size: 0.7rem; color: rgba(200,190,255,0.25); letter-spacing: 0.06em; }

/* ── ROM detail header ────────────────────────────────────────────────────── */
.pres-detail-header { display: flex; align-items: flex-start; gap: 1.5rem; }
.pres-boxart-col { flex-shrink: 0; display: flex; flex-direction: column; gap: 0.75rem; width: 195px; }
.pres-boxart-img { width: 100%; border-radius: 4px; object-fit: cover; display: block; }
.pres-boxart-placeholder { width: 100%; height: 240px; border-radius: 4px; background: rgba(255,255,255,0.04); border: 0.5px solid rgba(255,255,255,0.08); }
.pres-boxart-upload-zone { display: flex; align-items: center; justify-content: center; cursor: pointer; border-style: dashed !important; border-color: rgba(200,190,255,0.2) !important; transition: border-color 0.2s, background 0.2s; }
.pres-boxart-upload-zone:hover { border-color: rgba(200,190,255,0.45) !important; background: rgba(200,190,255,0.07); }
.pres-boxart-upload-hint { font-family: 'DM Mono', monospace; font-size: 0.6rem; letter-spacing: 0.08em; color: rgba(200,190,255,0.35); pointer-events: none; }
.pres-header-right { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; padding-top: 0.2rem; }
.pres-description-text { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 0.82rem; line-height: 1.7; color: rgba(200,190,255,0.65); margin-top: 0.5rem; overflow-wrap: break-word; word-break: break-word; max-width: 55ch; }
.pres-description-text.editable { border: 0.5px solid rgba(200,190,255,0.2); border-radius: 6px; padding: 0.5rem 0.7rem; background: rgba(255,255,255,0.03); outline: none; resize: vertical; min-height: 80px; width: 100%; box-sizing: border-box; font-family: inherit; font-size: inherit; font-style: inherit; color: rgba(200,190,255,0.85); }
.pres-console-badge { font-family: 'DM Mono', monospace; font-size: 0.62rem; letter-spacing: 0.1em; color: rgba(200,190,255,0.35); text-transform: uppercase; margin-bottom: 0.2rem; }
.pres-rom-title { font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 1.6rem; letter-spacing: 0.04em; color: rgba(240,238,255,0.92); text-transform: uppercase; line-height: 1.1; }
.pres-download-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(200,190,255,0.08); border: 0.5px solid rgba(200,190,255,0.16); border-radius: 20px; padding: 0.45rem 1.1rem; font-family: 'DM Mono', monospace; font-size: 0.68rem; letter-spacing: 0.08em; color: rgba(200,190,255,0.75); cursor: pointer; transition: background 0.15s, color 0.15s; text-decoration: none; }
.pres-download-btn:hover { background: rgba(200,190,255,0.14); color: rgba(200,190,255,0.95); }

/* ── ROM metadata ─────────────────────────────────────────────────────────── */
.pres-metadata-grid { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; align-items: baseline; }
.pres-meta-label { font-family: 'DM Mono', monospace; font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(200,190,255,0.3); white-space: nowrap; }
.pres-meta-value { font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 0.65rem; letter-spacing: 0.03em; color: rgba(200,190,255,0.75); text-transform: uppercase; }
.pres-meta-value.editable { background: rgba(255,255,255,0.03); border: 0.5px solid rgba(200,190,255,0.2); border-radius: 5px; padding: 2px 8px; font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; color: rgba(200,190,255,0.85); outline: none; text-transform: uppercase; width: 100%; }

/* ── Save data section ────────────────────────────────────────────────────── */
.pres-saves-section { border-top: 0.5px solid rgba(255,255,255,0.07); padding-top: 1rem; }
.pres-save-tabs { display: flex; gap: 1.2rem; margin-bottom: 0.9rem; border-bottom: 0.5px solid rgba(255,255,255,0.06); padding-bottom: 0.55rem; }
.pres-save-tab { font-family: 'DM Mono', monospace; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(200,190,255,0.35); cursor: pointer; transition: color 0.15s; }
.pres-save-tab:hover { color: rgba(200,190,255,0.7); }
.pres-save-tab.active { color: rgba(200,190,255,0.92); }
.pres-save-item { padding: 0.6rem 0; border-bottom: 0.5px solid rgba(255,255,255,0.05); }
.pres-save-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.2rem; }
.pres-save-date { background: rgba(200,190,255,0.1); border-radius: 10px; padding: 1px 8px; font-family: 'DM Mono', monospace; font-size: 0.6rem; color: rgba(200,190,255,0.6); white-space: nowrap; }
.pres-save-who { font-family: 'DM Mono', monospace; font-size: 0.65rem; color: rgba(200,190,255,0.5); }
.pres-save-name { font-family: 'DM Mono', monospace; font-size: 0.65rem; color: rgba(200,190,255,0.75); }
.pres-save-desc-text { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: rgba(200,190,255,0.4); margin: 0.15rem 0 0.4rem; line-height: 1.45; }
.pres-save-actions { display: flex; align-items: center; gap: 0.6rem; justify-content: flex-end; }
.pres-save-dl-btn { display: flex; align-items: center; gap: 0.35rem; font-family: 'DM Mono', monospace; font-size: 0.6rem; letter-spacing: 0.08em; color: rgba(200,190,255,0.5); cursor: pointer; padding: 3px 8px; border-radius: 4px; border: 0.5px solid rgba(200,190,255,0.15); transition: all 0.15s; }
.pres-save-dl-btn:hover { color: rgba(200,190,255,0.9); border-color: rgba(200,190,255,0.3); background: rgba(200,190,255,0.06); }
.pres-save-dl-btn.private { color: rgba(255,100,80,0.55); border-color: rgba(255,100,80,0.2); cursor: not-allowed; }
.pres-save-del-btn { font-family: 'DM Mono', monospace; font-size: 0.6rem; color: rgba(200,190,255,0.22); cursor: pointer; padding: 3px 6px; border-radius: 4px; transition: all 0.15s; border: none; background: none; }
.pres-save-del-btn:hover { color: rgba(255,100,80,0.8); background: rgba(255,100,80,0.06); }
.pres-no-saves { font-family: 'DM Mono', monospace; font-size: 0.65rem; color: rgba(200,190,255,0.25); padding: 0.6rem 0; }

/* ── Preservation modals ──────────────────────────────────────────────────── */
#pres-modal-overlay { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); align-items: center; justify-content: center; }
#pres-modal-overlay.open { display: flex; }
.pres-modal { background: rgba(6,4,2,0.85); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); border: 0.5px solid rgba(255,255,255,0.1); border-radius: 18px; padding: 2rem 2.2rem; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 0.9rem; max-height: 90vh; overflow-y: auto; }
.pres-modal-title { font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(200,190,255,0.75); margin-bottom: 0.3rem; }
.pres-modal-field { display: flex; flex-direction: column; gap: 0.35rem; }
.pres-modal-label { font-family: 'DM Mono', monospace; font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(200,190,255,0.35); }
.pres-modal-input, .pres-modal-select, .pres-modal-textarea { background: rgba(255,255,255,0.05); border: 0.5px solid rgba(255,255,255,0.1); border-radius: 7px; color: rgba(200,190,255,0.9); font-family: 'DM Mono', monospace; font-size: 0.7rem; padding: 7px 10px; outline: none; transition: border-color 0.15s; width: 100%; box-sizing: border-box; }
.pres-modal-input:focus, .pres-modal-select:focus, .pres-modal-textarea:focus { border-color: rgba(200,190,255,0.3); }
.pres-modal-input::placeholder, .pres-modal-textarea::placeholder { color: rgba(200,190,255,0.18); }
.pres-modal-input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.6) sepia(1) hue-rotate(220deg); cursor: pointer; }
.pres-modal-select option { background: #0a0a0f; }
.pres-modal-textarea { resize: vertical; min-height: 72px; }
.pres-modal-checkbox-row { display: flex; align-items: center; gap: 0.55rem; font-family: 'DM Mono', monospace; font-size: 0.65rem; color: rgba(200,190,255,0.55); cursor: pointer; }
.pres-modal-checkbox-row input { accent-color: rgba(200,190,255,0.6); }
.pres-modal-char-count { font-family: 'DM Mono', monospace; font-size: 0.55rem; color: rgba(200,190,255,0.25); text-align: right; }
.pres-modal-error { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: rgba(255,100,80,0.75); min-height: 0.9rem; }
.pres-modal-footer { display: flex; justify-content: flex-end; gap: 0.6rem; padding-top: 0.3rem; border-top: 0.5px solid rgba(255,255,255,0.07); margin-top: 0.3rem; }
.pres-modal-btn { font-family: 'DM Mono', monospace; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 14px; border-radius: 7px; cursor: pointer; border: 0.5px solid rgba(255,255,255,0.12); transition: all 0.15s; }
.pres-modal-btn.cancel { background: rgba(255,255,255,0.04); color: rgba(200,190,255,0.5); }
.pres-modal-btn.cancel:hover { background: rgba(255,255,255,0.08); color: rgba(200,190,255,0.8); }
.pres-modal-btn.primary { background: rgba(200,190,255,0.1); color: rgba(200,190,255,0.85); border-color: rgba(200,190,255,0.2); }
.pres-modal-btn.primary:hover { background: rgba(200,190,255,0.18); color: rgba(200,190,255,1); }
.pres-modal-btn.danger { background: rgba(255,80,60,0.1); color: rgba(255,100,80,0.8); border-color: rgba(255,100,80,0.25); }
.pres-modal-btn.danger:hover { background: rgba(255,80,60,0.2); color: rgba(255,100,80,1); }
.pres-file-pick { display: flex; gap: 0.5rem; align-items: center; }
.pres-file-pick-btn { font-family: 'DM Mono', monospace; font-size: 0.62rem; padding: 5px 10px; border-radius: 6px; background: rgba(255,255,255,0.06); border: 0.5px solid rgba(255,255,255,0.12); color: rgba(200,190,255,0.65); cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.pres-file-pick-btn:hover { background: rgba(255,255,255,0.1); }
.pres-file-name { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: rgba(200,190,255,0.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.pres-modal-success { font-family: 'DM Mono', monospace; font-size: 0.7rem; color: rgba(100,210,130,0.85); display: flex; align-items: center; gap: 0.5rem; }

/* ── Preservation responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  #pres-list { width: 200px; }
  #pres-detail { padding: 1.2rem 1.4rem; }
  .pres-detail-header { gap: 1rem; }
}
@media (max-width: 620px) {
  #pres-alpha { display: none; }
  #pres-list { width: 140px; }
  .pres-rom-item { font-size: 0.6rem; padding: 0.5rem 0.7rem; }
  #pres-detail { padding: 1rem; }
  .pres-boxart-col { width: 130px; }
  .pres-boxart-img { width: 100%; }
  .pres-boxart-placeholder { width: 100%; }
  .pres-rom-title { font-size: 1.1rem; }
  .pres-console-bar { padding: 0.4rem 0.8rem; }
}
