/* ═══════════════════════════════════════════════════════════════
   NUOTTIA — Concert Hall Program Design System
   Cormorant Garamond × Instrument Sans
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Palette — warm cream × deep forest × instrument gold */
  --bg:             #f0e9d9;
  --bg-strong:      #e4d9c4;
  --card:           rgba(253, 249, 241, 0.97);
  --card-solid:     #fdf9f1;
  --card-muted:     rgba(232, 221, 197, 0.72);
  --line:           rgba(11, 29, 19, 0.11);
  --line-strong:    rgba(11, 29, 19, 0.22);

  --ink:            #111a14;
  --ink-soft:       #3e5247;
  --ink-faint:      rgba(17, 26, 20, 0.42);

  /* Forest greens — sidebar, accents */
  --forest-deep:    #0b1d13;   /* sidebar bg */
  --forest-dark:    #132e1c;   /* sidebar hover */
  --forest-mid:     #1c4433;   /* accent */
  --forest-soft:    #2d6350;

  /* Gold — highlights, active states */
  --gold:           #c4912a;
  --gold-warm:      #d4a43a;
  --gold-soft:      rgba(196, 145, 42, 0.16);
  --gold-faint:     rgba(196, 145, 42, 0.09);

  --danger:         #8a2c2e;
  --danger-soft:    rgba(138, 44, 46, 0.12);
  --success:        #1c4433;

  /* Backwards compat — keep old var names pointing to new values */
  --accent:         var(--forest-mid);
  --accent-soft:    var(--forest-soft);
  --highlight:      var(--gold);
  --highlight-soft: var(--gold-soft);

  /* Elevation */
  --shadow-sm:  0 2px 8px rgba(11, 29, 19, 0.07);
  --shadow:     0 12px 40px rgba(11, 29, 19, 0.13);
  --shadow-lg:  0 24px 64px rgba(11, 29, 19, 0.20);

  /* Shape */
  --radius-lg:   26px;
  --radius-md:   16px;
  --radius-sm:   10px;
  --radius-pill: 999px;

  /* Typography */
  --font-display: "Cormorant Garamond", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-ui:      "Instrument Sans", "Trebuchet MS", system-ui, sans-serif;

  /* Legacy aliases */
  --sans:  var(--font-ui);
  --serif: var(--font-display);

  /* Layout */
  --max-width:  1560px;
  --sidebar-w:  308px;
}

/* ── Tumma teema — P1-A ────────────────────────────────────────── */
/* Aktivoituu joko OS-asetuksesta tai manuaalisesta [data-theme="dark"] */

@media (prefers-color-scheme: dark) {
  :root { --theme-is-dark: 1; }
}

:root[data-theme="dark"]  { --theme-is-dark: 1; }
:root[data-theme="light"] { --theme-is-dark: 0; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0a1610;
    --bg-strong:   #060e09;
    --card:        rgba(14, 24, 17, 0.98);
    --card-solid:  #0e1811;
    --card-muted:  rgba(22, 36, 26, 0.72);
    --line:        rgba(130, 190, 145, 0.10);
    --line-strong: rgba(130, 190, 145, 0.20);

    --ink:       #d8d0b8;
    --ink-soft:  #728c7a;
    --ink-faint: rgba(216, 208, 184, 0.38);

    --forest-deep: #04090600;
    --forest-dark: #071008;
    --forest-mid:  #3d7a5c;
    --forest-soft: #5a9e7a;

    --gold-soft:  rgba(196, 145, 42, 0.22);
    --gold-faint: rgba(196, 145, 42, 0.11);

    --danger:      #c04a4d;
    --danger-soft: rgba(192, 74, 77, 0.16);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.45);
    --shadow:    0 12px 40px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.65);
  }
}

/* Manuaalinen tumma teema ohittaa OS-asetuksen */
:root[data-theme="dark"] {
  --bg:          #0a1610;
  --bg-strong:   #060e09;
  --card:        rgba(14, 24, 17, 0.98);
  --card-solid:  #0e1811;
  --card-muted:  rgba(22, 36, 26, 0.72);
  --line:        rgba(130, 190, 145, 0.10);
  --line-strong: rgba(130, 190, 145, 0.20);

  --ink:       #d8d0b8;
  --ink-soft:  #728c7a;
  --ink-faint: rgba(216, 208, 184, 0.38);

  --forest-deep: #040906;
  --forest-dark: #071008;
  --forest-mid:  #3d7a5c;
  --forest-soft: #5a9e7a;

  --gold-soft:  rgba(196, 145, 42, 0.22);
  --gold-faint: rgba(196, 145, 42, 0.11);

  --danger:      #c04a4d;
  --danger-soft: rgba(192, 74, 77, 0.16);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.45);
  --shadow:    0 12px 40px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.65);
}

/* Tausta tumman teeman mukaan */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background-image:
      radial-gradient(ellipse 80% 60% at 10% 0%, rgba(196, 145, 42, 0.05), transparent),
      radial-gradient(ellipse 60% 50% at 90% 100%, rgba(11, 29, 19, 0.4), transparent),
      linear-gradient(170deg, #0d1e12 0%, #080f0a 100%);
  }

  :root:not([data-theme="light"]) body::before {
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 28px,
      rgba(130, 190, 145, 0.025) 28px,
      rgba(130, 190, 145, 0.025) 29px
    );
  }
}

:root[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(196, 145, 42, 0.05), transparent),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(11, 29, 19, 0.4), transparent),
    linear-gradient(170deg, #0d1e12 0%, #080f0a 100%);
}

:root[data-theme="dark"] body::before {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 28px,
    rgba(130, 190, 145, 0.025) 28px,
    rgba(130, 190, 145, 0.025) 029px
  );
}

/* Annotointidokki tumman teeman mukaan */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sheet-dock-v4 {
    background: rgba(16, 28, 20, 0.98);
    border-color: rgba(130, 190, 145, 0.12);
  }
}

:root[data-theme="dark"] .sheet-dock-v4 {
  background: rgba(16, 28, 20, 0.98);
  border-color: rgba(130, 190, 145, 0.12);
}

/* Form-elementit tummassa teemassa */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-grid input,
  :root:not([data-theme="light"]) .form-grid select,
  :root:not([data-theme="light"]) .form-grid textarea,
  :root:not([data-theme="light"]) .search-input {
    background: rgba(14, 24, 17, 0.98);
    color: var(--ink);
    border-color: var(--line);
  }
}

:root[data-theme="dark"] .form-grid input,
:root[data-theme="dark"] .form-grid select,
:root[data-theme="dark"] .form-grid textarea,
:root[data-theme="dark"] .search-input {
  background: rgba(14, 24, 17, 0.98);
  color: var(--ink);
  border-color: var(--line);
}

/* Teemavaihtimen nappi */
.theme-toggle-btn {
  position: fixed;
  bottom: max(env(safe-area-inset-bottom, 0px), 12px);
  right: 12px;
  z-index: 30;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0.75;
  transition: opacity 160ms ease, box-shadow 160ms ease;
}

.theme-toggle-btn:hover {
  opacity: 1;
  box-shadow: var(--shadow);
  transform: none;
}

/* ── Reset & Base ──────────────────────────────────────────────── */

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

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--ink);
  background-color: var(--bg);
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

/* Warm parchment background with subtle staff-line texture */
body {
  background-image:
    radial-gradient(ellipse 80% 60% at 10% 0%,  rgba(196, 145, 42, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(11, 29, 19, 0.10), transparent),
    linear-gradient(170deg, #f5edd9 0%, #e8ddc6 100%);
}

/* Ghost staff lines — very faint, like real music paper */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 28px,
      rgba(11, 29, 19, 0.028) 28px,
      rgba(11, 29, 19, 0.028) 29px
    );
  opacity: 0.9;
}

/* ── Page entrance animation ───────────────────────────────────── */

@keyframes nuottia-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes nuottia-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#app {
  position: relative;
  z-index: 1;
  animation: nuottia-fade 280ms ease both;
}

/* ── Typography ────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

/* ── Form elements ─────────────────────────────────────────────── */

button, input, select, textarea { font: inherit; }

/* ── Buttons ───────────────────────────────────────────────────── */

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--forest-mid);
  color: #f5edd9;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  /* Only compositor props — no background/color transitions */
  transition: transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 29, 19, 0.18);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
  transition-duration: 60ms;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
  box-shadow: none;
}

button.ghost,
.button-ghost {
  background: rgba(11, 29, 19, 0.07);
  color: var(--forest-mid);
}

button.ghost:hover {
  background: rgba(11, 29, 19, 0.12);
}

button.secondary,
.button-secondary {
  background: var(--gold);
  color: #1c130a;
}

button.secondary:hover {
  background: var(--gold-warm);
  box-shadow: 0 8px 24px rgba(196, 145, 42, 0.28);
}

button.danger,
.button-danger {
  background: var(--danger);
  color: #fff0ee;
}

button.danger:hover {
  box-shadow: 0 8px 24px rgba(138, 44, 46, 0.28);
}

a { color: inherit; text-decoration: none; }

/* Anchor elements styled as buttons — avoids invalid <a><button></a> nesting */
a.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--forest-mid);
  color: #f5edd9;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

a.button-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 29, 19, 0.18);
}

a.button-link.secondary { background: var(--gold); color: #1c130a; }
a.button-link.ghost     { background: rgba(11, 29, 19, 0.07); color: var(--forest-mid); }

.hidden { display: none !important; }

/* ── App shell ─────────────────────────────────────────────────── */

.app-shell {
  width: min(var(--max-width), calc(100vw - 20px));
  margin: 10px auto;
  min-height: calc(100vh - 20px);
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 14px;
}

/* ── Sidebar ───────────────────────────────────────────────────── */

.sidebar {
  background: var(--forest-deep);
  /* Gold shimmer at crown — like a concert hall curtain rail */
  background-image:
    linear-gradient(180deg,
      rgba(196, 145, 42, 0.14) 0%,
      rgba(196, 145, 42, 0.04) 8%,
      transparent 20%
    );
  color: #e8dfc8;
  border-radius: 30px;
  padding: 22px 20px;
  /* safe-area-inset for notch devices */
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 10px;
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar { display: none; }

/* ── Brand mark ────────────────────────────────────────────────── */

.brand-mark {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 2px;
}

.brand-mark img {
  width: 46px;
  height: 46px;
  opacity: 0.95;
}

.brand-mark h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f0e4c4;
  line-height: 1;
}

.brand-mark p {
  margin: 5px 0 0;
  color: rgba(232, 223, 200, 0.62);
  font-size: 0.8rem;
  line-height: 1.3;
}

/* ── Sidebar panels ────────────────────────────────────────────── */

.sidebar-panel {
  background: rgba(255, 248, 228, 0.055);
  border: 1px solid rgba(255, 248, 228, 0.09);
  border-radius: 20px;
  padding: 16px;
}

.sidebar h2,
.panel-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #e8dfc8;
  letter-spacing: 0.015em;
}

.label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 223, 200, 0.56);
}

/* Sidebar form inputs */
.sidebar select,
.sidebar input,
.sidebar textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 248, 228, 0.14);
  background: rgba(255, 251, 236, 0.09);
  color: #e8dfc8;
  padding: 12px 14px;
  min-height: 46px;
  transition: border-color 160ms ease, background 160ms ease;
}

.sidebar select:focus,
.sidebar input:focus,
.sidebar textarea:focus {
  outline: none;
  border-color: rgba(196, 145, 42, 0.5);
  background: rgba(255, 251, 236, 0.13);
}

/* Main content form inputs */
.form-grid input,
.form-grid select,
.form-grid textarea,
.search-input,
.sheet-toolbar select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(253, 249, 241, 0.96);
  color: var(--ink);
  padding: 12px 16px;
  min-height: 46px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.search-input:focus {
  outline: none;
  border-color: rgba(28, 68, 51, 0.35);
  box-shadow: 0 0 0 3px rgba(28, 68, 51, 0.1);
}

.sidebar textarea,
.form-grid textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Navigation tabs ───────────────────────────────────────────── */

.nav-tabs {
  display: grid;
  gap: 6px;
}

.tab-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 248, 228, 0.055);
  color: rgba(232, 223, 200, 0.84);
  font-size: 0.9rem;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.tab-button:hover {
  background: rgba(255, 248, 228, 0.10);
  color: #f0e4c4;
  transform: none;
  box-shadow: none;
}

.tab-button.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-warm) 100%);
  color: #1c130a;
  font-weight: 600;
}

.tab-button.active:hover {
  background: linear-gradient(135deg, var(--gold-warm) 0%, #e0b84c 100%);
}

/* Workspace switch */
.workspace-switch .tab-button {
  font-size: 0.85rem;
  min-height: 44px;
}

/* ── Badges & pills ────────────────────────────────────────────── */

.count-pill,
.badge,
.metric-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--gold-soft);
  color: #4a3410;
  border: 1px solid rgba(196, 145, 42, 0.22);
  letter-spacing: 0.01em;
}

.count-pill.inverse {
  background: rgba(255, 248, 228, 0.11);
  color: rgba(232, 223, 200, 0.88);
  border-color: rgba(255, 248, 228, 0.14);
}

/* ── Main stage ────────────────────────────────────────────────── */

.main-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Hero ──────────────────────────────────────────────────────── */

.hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 20px;
  align-items: center;
  animation: nuottia-fade-up 360ms ease both;
}

.hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.hero p {
  margin: 10px 0 0;
  max-width: 60ch;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.92rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ── Cards (base) ──────────────────────────────────────────────── */

.metric-card,
.surface-card,
.auth-card,
.sheet-panel,
.empty-state,
.member-card,
.invite-card,
.library-card,
.event-card,
.detail-card,
.offline-card,
.info-banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.metric-card {
  padding: 18px;
  text-align: center;
}

.metric-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--forest-mid);
  font-variant-numeric: tabular-nums;
}

.metric-card span {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Layout grids ──────────────────────────────────────────────── */

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 14px;
}

.stack,
.panel-stack {
  display: grid;
  gap: 14px;
}

.surface-card,
.auth-card,
.detail-card,
.offline-card {
  padding: 22px;
}

/* ── Section header ────────────────────────────────────────────── */

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.section-title,
.sheet-panel h2,
.auth-panel h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.section-header p,
.muted,
.empty-state p,
.library-meta,
.event-meta,
.member-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  text-wrap: pretty;
}

/* ── Forms ─────────────────────────────────────────────────────── */

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-actions,
.toolbar-row,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.search-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.search-input { flex: 1; min-width: 200px; }

/* ── Card grids ────────────────────────────────────────────────── */

.card-grid,
.event-grid,
.member-grid,
.offline-grid {
  display: grid;
  gap: 12px;
}

.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ── Library card ──────────────────────────────────────────────── */

.library-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.library-thumb {
  min-height: 200px;
  background: linear-gradient(170deg, #f5edd9, #e5d8b8);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}

.library-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.library-content {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.library-card h3,
.event-card h3,
.detail-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

/* Library list rows (remote's compact list style) */
.library-gallery-card,
.library-list-row {
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.library-gallery-card:hover,
.library-list-row:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.library-gallery-card.selected,
.library-list-row.selected {
  border-color: rgba(196, 145, 42, 0.45);
  box-shadow: 0 0 0 2px rgba(196, 145, 42, 0.18), var(--shadow-sm);
}

/* ── Tags ──────────────────────────────────────────────────────── */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Event cards ───────────────────────────────────────────────── */

.event-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.event-card {
  padding: 18px;
  cursor: pointer;
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

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

.event-card.selected {
  border-color: rgba(196, 145, 42, 0.5);
  box-shadow: 0 0 0 2px rgba(196, 145, 42, 0.18), var(--shadow);
}

/* ── Event detail grid ─────────────────────────────────────────── */

.event-detail-grid { display: grid; gap: 14px; }

/* ── Queue / setlist ───────────────────────────────────────────── */

.queue-list {
  display: grid;
  gap: 5px;
  position: relative;
}

.queue-list.compact-scroll-area { max-height: none; overflow: visible; }

/* Yksirivinen ohjelmarivi: [≡] [num title note] [s.X] [Tee merkintöjä] [×] */
.queue-row-v6 {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto 32px;
  gap: 8px;
  align-items: center;
  padding: 9px 10px 9px 12px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: box-shadow 140ms ease, border-color 140ms ease;
}

.queue-row-v6:hover {
  border-color: rgba(196, 145, 42, 0.3);
  box-shadow: 0 2px 10px rgba(11, 29, 19, 0.07);
}

/* Raahattava käsittelijä — CSS-pisteet */
.queue-handle-v6 {
  width: 30px;
  height: 36px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background:
    radial-gradient(circle, rgba(11, 29, 19, 0.25) 1.5px, transparent 1.5px)
    center / 6px 6px repeat;
  border-radius: 8px;
  opacity: 0.6;
}

/* Sisältö: numero + otsikko + muistiinpano */
.queue-body-v6 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.queue-num-v6 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.queue-title-block-v6 {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.queue-title-v6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-note-v6 {
  font-size: 0.75rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sivunumero-input — aina näkyvissä, tallentuu heti */
.queue-page-v6 {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(240, 233, 217, 0.7);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 7px;
  height: 34px;
  cursor: text;
  flex-shrink: 0;
}

.queue-page-prefix-v6 {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.queue-page-input-v6 {
  width: 32px;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  padding: 0;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}

.queue-page-input-v6:focus { outline: none; }

/* Pää-CTA: avaa nuotti merkinnöille */
.queue-open-v6 {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 0 14px;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

/* Poista × */
.qact-remove {
  width: 32px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0;
  font-size: 1rem;
  border-radius: 50%;
  background: rgba(138, 44, 46, 0.08);
  color: var(--danger);
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  transition: background 140ms ease, transform 140ms ease;
}

.qact-remove:hover {
  background: var(--danger);
  color: #fff;
  transform: scale(1.1);
  box-shadow: none;
}

/* Raahauksen tilat */
.queue-row-v6.dragging           { opacity: 0.45; }
.queue-row-v6.drag-target-before { box-shadow: inset 0 3px 0 var(--gold); }
.queue-row-v6.drag-target-after  { box-shadow: inset 0 -3px 0 var(--gold); }

.member-card p, .invite-card p { margin: 4px 0 0; }

/* ── Library mini list ─────────────────────────────────────────── */

.detail-card .library-list-mini { display: grid; gap: 8px; }

.library-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(240, 233, 217, 0.55);
  border: 1px solid var(--line);
  transition: background 160ms ease;
}

.library-mini-item:hover { background: rgba(240, 233, 217, 0.82); }

/* ── Member / invite cards ─────────────────────────────────────── */

.member-grid,
.offline-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.member-card,
.invite-card  { padding: 16px; }

.offline-grid .offline-card { padding: 16px; }

/* Group message cards */
.group-message-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.group-message-body { margin: 8px 0 0; line-height: 1.6; font-size: 0.92rem; }

/* ── Info banners ──────────────────────────────────────────────── */

.info-banner {
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.info-banner.warning {
  border-color: rgba(138, 44, 46, 0.15);
  background: rgba(251, 237, 232, 0.9);
}

/* ── Empty state ───────────────────────────────────────────────── */

.empty-state {
  padding: 32px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink-soft);
}

/* ── Auth views ────────────────────────────────────────────────── */

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.auth-frame {
  width: min(1140px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
}

.auth-panel {
  background: var(--forest-deep);
  background-image: linear-gradient(
    160deg,
    rgba(196, 145, 42, 0.12) 0%,
    transparent 35%
  );
  color: #e8dfc8;
  border-radius: 30px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.auth-panel h1, .auth-panel h2 {
  color: #f0e4c4;
}

.auth-panel p { color: rgba(232, 223, 200, 0.72); }

.auth-card { padding: 24px; }

.auth-inline-note { margin: 12px 0 0; }

.text-link {
  color: var(--forest-mid);
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

/* ── Flash notifications ───────────────────────────────────────── */

.flash {
  position: sticky;
  top: 10px;
  z-index: 10;
  margin-bottom: 6px;
  padding: 13px 18px;
  border-radius: 16px;
  background: var(--forest-deep);
  color: #e8dfc8;
  box-shadow: var(--shadow);
  font-weight: 500;
  animation: nuottia-fade-up 220ms ease both;
}

.flash.error { background: var(--danger); color: #fff0ee; }

/* ── Modal — shared overlay + card ─────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 14, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
  animation: nuottia-fade-up 180ms ease both;
}

.modal-card {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 16px;
}

.install-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--ink);
}

.install-steps li {
  line-height: 1.45;
  padding-left: 4px;
}

.install-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--forest-mid);
  color: #fff;
  font-size: 0.75rem;
  vertical-align: middle;
  margin: 0 2px;
}

/* ── Install prompt — floating nudge card ──────────────────────── */

.install-prompt {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-solid);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 12px 14px 12px 16px;
  max-width: min(440px, calc(100vw - 32px));
  width: max-content;
  z-index: 50;
  animation: install-prompt-rise 300ms cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

@keyframes install-prompt-rise {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.install-prompt-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}

.install-prompt-body {
  flex: 1;
  min-width: 0;
}

.install-prompt-body strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.install-prompt-body p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.3;
}

.install-prompt-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.install-prompt-actions .secondary {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.85rem;
}

.install-prompt-close {
  min-height: 38px;
  padding: 0 10px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink-faint);
}

/* ── Staff rule decorative divider (CSS only music staff) ──────── */

.staff-rule {
  height: 40px;
  position: relative;
  overflow: hidden;
  margin: 4px 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 6px,
    rgba(11, 29, 19, 0.10) 6px,
    rgba(11, 29, 19, 0.10) 7px
  );
  background-size: 100% 35px;
  background-position: center;
}

/* ── Sheet viewer ──────────────────────────────────────────────── */

.sheet-screen,
.performance-screen {
  height: 100dvh;
  overflow: hidden;
  padding: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.sheet-layout,
.performance-layout {
  width: min(var(--max-width), calc(100vw - 20px));
  margin: 0 auto;
  display: grid;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sheet-layout { grid-template-columns: minmax(0, 1fr) 310px; }

.sheet-panel { padding: 16px; }

/* Main panel stretches to fill grid height and lays out as a column */
.sheet-panel-main-v2 {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.sheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.sheet-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.95fr);
  gap: 12px;
  align-items: start;
}

.sheet-top-main,
.sheet-top-side { display: grid; gap: 0; }
.sheet-top-side { align-content: start; }
.sheet-page-toolbar { justify-content: flex-start; }

.tool-button { padding: 10px 16px; min-height: 46px; }

.tool-button.active {
  background: var(--gold);
  color: #1c130a;
}

.annotation-control-strip  { justify-content: space-between; }
.annotation-range-control  { flex: 1 1 240px; display: grid; gap: 8px; }
.annotation-range-control input[type="range"] { width: 100%; accent-color: var(--forest-mid); }
.annotation-hint { flex: 1 1 200px; }

/* Viewer host */
.viewer-host,
.performance-host {
  border-radius: 24px;
  background: rgba(252, 248, 240, 0.75);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  padding: 0;
}

/* Sheet stage — fills host, clips overflow */
.sheet-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* panZoomLayer receives translate+scale; wrappers live inside it */
.sheet-pan-zoom {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  /* Overflow visible so wrapper can extend beyond layer bounds; stage clips */
  overflow: visible;
}

.stage-wrapper {
  position: relative;
  display: block;
  flex: 0 0 auto;
  box-shadow: 0 20px 50px rgba(11, 29, 19, 0.18);
  border-radius: 16px;
  overflow: hidden;
  background: #fdfaf3;
  transform-origin: center center;
  /* compositor-only: no filter/box-shadow on this large surface */
  transition: transform 220ms ease, opacity 220ms ease;
}

.stage-wrapper.is-entering          { opacity: 0; }
.stage-wrapper.is-entering.page-forward  { transform: translateX(40px) scale(0.985); }
.stage-wrapper.is-entering.page-backward { transform: translateX(-40px) scale(0.985); }
.stage-wrapper.is-entering.page-static   { transform: scale(0.993); }
/* will-change promoted during active transitions only, removed on .is-active */
.stage-wrapper.is-entering,
.stage-wrapper.is-exiting { will-change: transform, opacity; }

.stage-wrapper.is-active            { opacity: 1; transform: translateX(0) scale(1); will-change: auto; }
.stage-wrapper.is-exiting           { pointer-events: none; }
/* filter: blur() removed — animating blur on a full-page surface triggers paint every frame */
.stage-wrapper.is-exiting.page-forward  { opacity: 0; transform: translateX(-48px) scale(0.985); }
.stage-wrapper.is-exiting.page-backward { opacity: 0; transform: translateX(48px) scale(0.985); }
.stage-wrapper.is-exiting.page-static,
.stage-wrapper.is-inactive          { opacity: 0; }

.stage-wrapper img,
.stage-wrapper canvas { display: block; width: 100%; height: 100%; }

.annotation-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.annotation-layer text { font-family: var(--font-ui); }

.document-editor-stage {
  cursor: crosshair;
}

.document-editor-page {
  background: #fffdf7;
}

.document-editor-annotations {
  pointer-events: none;
}

.annotation-text-editor {
  position: absolute;
  z-index: 8;
  min-height: 42px;
  padding: 7px 9px;
  border: 2px solid #123629;
  border-radius: 8px;
  background: rgba(255, 251, 241, 0.96);
  color: #8f2125;
  font: 650 20px var(--font-ui);
  line-height: 1.18;
  resize: both;
  box-shadow: 0 12px 30px rgba(11, 29, 19, 0.22);
  transform-origin: 0 0;
}

.editor-save-status {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 7;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(14, 36, 23, 0.82);
  color: #fff7e4;
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 8px 22px rgba(8, 18, 12, 0.22);
}

.editor-save-status[data-mode="saving"] {
  background: rgba(196, 145, 42, 0.92);
  color: #11251b;
}

.editor-save-status[data-mode="error"] {
  background: rgba(138, 44, 46, 0.92);
}

.viewer-loading,
.viewer-error { padding: 20px; color: var(--ink-soft); }

/* ── Performance mode ──────────────────────────────────────────── */

.performance-layout { grid-template-columns: 1fr; }

/* Performance chrome fills the screen height as a flex column */
.performance-layout > .performance-chrome {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.performance-chrome {
  background: rgba(6, 16, 11, 0.96);
  color: #ede4cc;
  border-radius: 28px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
}

.performance-topbar,
.performance-bottombar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.performance-jumpbar-v2 {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 2px 0 6px;
}
.performance-jumpbar-v2::-webkit-scrollbar { display: none; }
.performance-jumpbar-v2 .jump-chip { flex-shrink: 0; scroll-snap-align: center; }

.performance-title-block { display: grid; gap: 4px; }
.performance-title-block h2 { margin: 0; font-family: var(--font-display); }
.performance-subtitle { margin: 0; color: rgba(237, 228, 204, 0.68); }

.performance-statusbar { gap: 8px; align-items: center; justify-content: flex-end; }

.performance-pill {
  min-height: 34px;
  padding: 0 13px;
  /* backdrop-filter removed — always-on blur taxes the GPU during performance mode */
  background: rgba(40, 65, 50, 0.80);
  color: #f0e4c4;
  border-color: rgba(255, 247, 228, 0.22);
}

.performance-pill-highlight {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-warm) 100%);
  color: #1c130a;
  border-color: rgba(196, 145, 42, 0.4);
}

button.ghost.performance-exit-button,
.performance-exit-button {
  min-height: 40px;
  padding: 0 16px;
  background: rgba(255, 247, 228, 0.14);
  color: #f0e4c4;
  border: 1px solid rgba(255, 247, 228, 0.2);
  box-shadow: none;
}

button.ghost.performance-exit-button:hover,
.performance-exit-button:hover {
  background: rgba(255, 247, 228, 0.22);
  color: #fdfaf3;
  transform: none;
}

.performance-host {
  position: relative;
  background: rgba(8, 20, 14, 0.96);
  min-height: 300px;
  flex: 1;
}

.performance-touch-zone {
  position: absolute;
  inset: 0 auto 0 0;
  width: 36%;
  z-index: 5;
}

/* P2-E: Hienovarainen kalteva sävy kertoo käyttäjälle missä swaip-alue on */
.performance-touch-zone.left {
  background: linear-gradient(to right, rgba(196, 145, 42, 0.06) 0%, transparent 80%);
}

.performance-touch-zone.right { inset: 0 0 0 auto; }

.performance-touch-zone.right {
  background: linear-gradient(to left, rgba(196, 145, 42, 0.06) 0%, transparent 80%);
}

.performance-touch-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 70px;
  height: 70px;
  border-radius: var(--radius-pill);
  /* backdrop-filter removed — always-on blur is GPU-expensive during tablet performance */
  background: rgba(30, 50, 38, 0.55);
  font-size: 1.8rem;
}

.performance-touch-zone.left .performance-touch-button  { left: 14px; }
.performance-touch-zone.right .performance-touch-button { right: 14px; }

.kbd-hint { font-size: 0.84rem; color: rgba(237, 228, 204, 0.65); }

/* ── Misc components ───────────────────────────────────────────── */

/* Logout — intentionally small and de-emphasized to avoid accidental tap */
.logout-btn {
  font-size: 0.8rem;
  min-height: 36px;
  padding: 0 12px;
  opacity: 0.65;
  color: var(--ink-soft);
  background: transparent;
}

.logout-btn:hover {
  opacity: 1;
  color: var(--danger);
  background: var(--danger-soft);
  box-shadow: none;
  transform: none;
}

.file-chip {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  background: rgba(11, 29, 19, 0.07);
  color: var(--forest-mid);
  font-size: 0.82rem;
  font-weight: 500;
}

.cue-card {
  background: var(--gold-faint);
  border: 1px solid rgba(196, 145, 42, 0.22);
  border-radius: 14px;
  padding: 12px 16px;
}

.cue-card strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

/* Pagination */
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.pagination-pages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.pagination-page-button,
.pagination-nav-button {
  min-height: 36px;
  min-width: 36px;
  padding: 0 10px;
  font-size: 0.85rem;
}

.pagination-ellipsis {
  color: var(--ink-faint);
  padding: 0 4px;
  font-size: 0.88rem;
}

/* Compact header variant */
.compact-header { margin-bottom: 10px; }

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .app-shell,
  .sheet-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
    border-radius: 24px;
  }

  .hero,
  .auth-frame,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sheet-top-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(230px, 0.9fr);
  }
}

@media (max-width: 1024px) {
  .sheet-screen { padding: 8px; }
  .sheet-panel  { padding: 13px; }

  .sheet-panel > .section-header { align-items: flex-start; }
  .sheet-panel > .section-header .inline-actions { width: 100%; }

  .sheet-toolbar { gap: 6px; margin-bottom: 8px; }

  .sheet-top-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(210px, 0.95fr);
    gap: 10px;
  }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 100%; }

  .app-shell {
    grid-template-columns: 1fr;
    margin: 8px;
    width: calc(100vw - 16px);
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .auth-frame {
    grid-template-columns: 1fr;
  }

  .sheet-top-grid {
    grid-template-columns: 1fr;
  }

  .sheet-layout {
    grid-template-columns: 1fr;
  }

  /* Tablet-sized touch targets */
  button { min-height: 52px; padding: 0 20px; }
  .tab-button  { min-height: 54px; }
  .tool-button { min-height: 52px; }
}

@media (max-width: 480px) {
  .form-grid.two-col { grid-template-columns: 1fr; }
  .queue-row-v6 { grid-template-columns: 30px minmax(0, 1fr) auto 32px; }
  .queue-open-v6 { display: none; }
}

/* ── Focus styles (accessibility) ──────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ── Tablet tap targets — critical for choir performance use ────── */
/* All interactive elements must be reachable with a gloved or moving finger */

.tab-button,
.queue-open-v6,
.tool-button,
.performance-touch-button,
.jump-chip,
.pagination-page-button,
.pagination-nav-button {
  min-height: 48px;
}

/* ── z-index scale (fixed, no arbitrary values) ─────────────────── */
/* 1  = cards/elevated content                                        */
/* 5  = touch zones (performance mode overlay)                        */
/* 10 = flash notifications (sticky, above content)                  */
/* 100 = modals/dialogs (if added)                                   */

/* ── prefers-reduced-motion — respect user OS setting ──────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    /* Reset any will-change that was set for animation */
    will-change: auto !important;
  }

  /* Page transitions — instant state change, no motion */
  .stage-wrapper,
  .stage-wrapper.is-entering,
  .stage-wrapper.is-exiting {
    transition: none !important;
    will-change: auto !important;
  }

  /* Card hover — no lift or shadow change */
  .event-card,
  .library-gallery-card,
  .library-list-row,
  .metric-card,
  .surface-card,
  .detail-card {
    transition: none !important;
    transform: none !important;
  }

  /* Entrance animations — show instantly */
  #app,
  .hero,
  .flash,
  .install-prompt {
    animation: none !important;
    opacity: 1 !important;
    transform: translateX(-50%) !important;
  }
}
