:root {
  --bg: #030403;
  --ink: #d8ffe6;
  --green: #00ff6a;
  --green-2: #7dffb0;
  --dim: #6f9a7c;
  --line: rgba(0, 255, 106, 0.22);
  --panel: #071109;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  min-height: 100%;
}

body { overflow: hidden; }

.scan {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.07;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.45) 2px 3px
  );
}

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 16px 12px;
  background: linear-gradient(180deg, rgba(3,4,3,.72), rgba(3,4,3,.58));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.aura {
  position: absolute;
  inset: -50% -8% -8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 100% at 50% 108%, rgba(232,176,64,.48), transparent 72%),
    radial-gradient(ellipse 38% 90% at 26% 86%, rgba(0,255,106,.24), transparent 68%),
    radial-gradient(ellipse 40% 90% at 74% 90%, rgba(201,148,42,.34), transparent 70%),
    radial-gradient(ellipse 72% 115% at 50% 122%, rgba(232,176,64,.2), transparent 75%);
  filter: blur(14px);
  animation: aura 14s ease-in-out infinite alternate;
  mix-blend-mode: screen;
  opacity: calc(0.22 + var(--glow, 0) * 0.78);
}
.aura::before,
.aura::after {
  content: "";
  position: absolute;
  inset: 2% 0;
  background: radial-gradient(circle at 50% 78%, rgba(255,213,110,.42), transparent 52%);
  filter: blur(18px);
  animation: aura2 9s ease-in-out infinite;
}
.aura::after {
  background: radial-gradient(circle at 38% 68%, rgba(0,255,106,.2), transparent 48%);
  animation-duration: 12s;
  animation-direction: reverse;
}
@keyframes aura {
  0% { transform: scale(1) translateX(0); }
  50% { transform: scale(1.08) translateX(3%); }
  100% { transform: scale(1.04) translateX(-3%); }
}
@keyframes aura2 {
  0% { transform: translate(-6%, 4%) scale(1); opacity: .55; }
  50% { transform: translate(7%, -2%) scale(1.15); opacity: .9; }
  100% { transform: translate(-4%, 6%) scale(1.05); opacity: .6; }
}
.top > *:not(.aura) { position: relative; z-index: 1; }

.who {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  min-width: 0;
  flex: 1 1 420px;
}

.photo-wrap {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
  border: 1px solid #00ff6a;
  animation: photoglow 2.4s ease-in-out infinite;
  cursor: zoom-in;
}
.photo {
  height: 148px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  object-position: top center;
  border: 0;
  filter: grayscale(1) contrast(1.15);
  background: #000;
  display: block;
}
@keyframes photoglow {
  0%, 100% { box-shadow: 0 0 6px #00ff6a; }
  50% { box-shadow: 0 0 14px #00ff6a; }
}
#mode-new {
  background: #e8b040;
  color: #1a1204;
  border-color: #e8b040;
  text-align: center;
  justify-content: center;
}
.photo-box {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.82);
  cursor: zoom-out;
}
.photo-box[hidden] { display: none !important; }
.photo-box img {
  max-width: min(520px, 88vw);
  max-height: 86vh;
  border: 1px solid var(--green);
  box-shadow: 0 0 24px rgba(0, 255, 106, 0.45);
}

.who-text { font-size: 13px; }
h1 {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 2.05em;
  line-height: 0.95;
  color: var(--green);
  letter-spacing: -0.03em;
}

.tags, .role, .lead {
  font-size: 0.92em;
  color: var(--dim);
  line-height: 1.3;
}

.folio-title {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  color: var(--green);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 13px;
}
.folio-sub {
  color: var(--dim);
  font-size: 11px;
  margin: 4px 0 8px;
}
.folio {
  width: min(460px, 100%);
  text-align: center;
  flex: 1 1 320px;
}
.folio-count {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  column-gap: 8px;
  margin: 0 0 8px;
  white-space: nowrap;
  color: var(--dim);
}
.folio-count .folio-title { margin: 0; }
.folio-count .folio-title {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  width: 100%;
  height: 54px;
  margin: 0;
  line-height: 1;
  text-align: right;
}
.folio-count .folio-meter { justify-self: center; }
.folio-count .folio-works,
.folio-count span[data-i18n="folioWorks"] {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  text-align: left;
}
.folio-meter {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
}
.folio-meter::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 calc(8px + var(--glow, 0) * 16px) rgba(232, 176, 64, calc(0.2 + var(--glow, 0) * 0.55));
}
.folio-ring {
  position: absolute;
  inset: 0;
  width: 54px;
  height: 54px;
  transform: rotate(-90deg);
}
.folio-ring-bg {
  fill: none;
  stroke: #2a2a2a;
  stroke-width: 2.2;
}
.folio-ring-fg {
  fill: none;
  stroke: #e8b040;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 97.4;
  stroke-dashoffset: 97.4;
  transition: stroke-dashoffset 0.35s ease;
  filter: none;
}
.folio-count .folio-meter b {
  position: relative;
  z-index: 1;
  font-size: 14px;
  animation: none;
  text-shadow: 0 0 8px rgba(232,176,64,.7);
}
.folio-meter.hit b { animation: popnum 0.28s ease; }
@keyframes popnum {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.thanks {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: var(--head, 148px);
  z-index: 28;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 16px;
}
.thanks[hidden] { display: none !important; }
.thanks-card {
  width: min(420px, 92vw);
  padding: 22px 20px;
  text-align: center;
  color: #f0d084;
  background: #071109;
  border: 1px solid #e8b040;
}
.thanks-card p { margin: 0 0 16px; font-size: 14px; line-height: 1.4; }
.thanks-card button {
  min-width: 88px;
  background: #e8b040;
  border-color: #f0d084;
  color: #1a1204;
}
.cv { display: grid; gap: 12px; margin-top: 8px; }
.cv b { color: var(--green); }
.cv i { color: var(--dim); font-style: normal; }
.cv-contacts { margin-top: 22px; }
.spark {
  position: fixed;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffd56e;
  box-shadow: 0 0 8px #e8b040, 0 0 16px rgba(232,176,64,.8);
  pointer-events: none;
  z-index: 80;
}
@media (max-width: 720px) {
  .spark {
    width: 13px;
    height: 13px;
    box-shadow: 0 0 14px #ffd56e, 0 0 28px rgba(232,176,64,.95);
  }
}
.tile .boot { display: none !important; }
.folio-count b {
  display: inline-block;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 26px;
  color: #f0d084;
  text-shadow: 0 0 8px rgba(232, 176, 64, 0.9), 0 0 24px rgba(201, 148, 42, 0.7);
  animation: goldpulse 2.4s ease-in-out infinite;
}
@keyframes goldpulse {
  0%, 100% { text-shadow: 0 0 8px rgba(232,176,64,.7), 0 0 18px rgba(201,148,42,.4); }
  50% { text-shadow: 0 0 16px rgba(255,214,110,1), 0 0 36px rgba(232,176,64,.9); }
}
.folio-works {
  color: var(--dim);
  font-size: 12px;
  margin: 0 0 10px;
}
.folio-hint {
  color: var(--green);
  font-size: 14px;
  margin: 8px 0 2px;
  letter-spacing: 0.04em;
}
.folio-arrows {
  color: var(--green);
  letter-spacing: 0.45em;
  margin: 2px 0 0;
  animation: bounce 1.1s var(--ease) infinite;
}
.refresh {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  position: relative;
  vertical-align: -1px;
}
.refresh::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -3px;
  border: 3px solid transparent;
  border-left-color: currentColor;
}
.folio-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.actions-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.actions-col .btn { width: 100%; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  flex: 1 1 260px;
  max-width: 100%;
  align-items: flex-end;
}
.top #lang { min-width: 48px; }
.lib-meta {
  margin: 4px 0 8px;
  text-align: center;
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.02em;
  white-space: normal;
}
.btn.on { background: var(--green); color: #031407; }

.text-link {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-2);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--green);
  padding: 4px 0;
  cursor: pointer;
}
.text-link:hover { color: var(--green); }

.role { color: var(--green-2); margin: 3px 0 4px; }
.lead {
  color: var(--ink);
  white-space: pre-line;
  max-width: 52ch;
}
.tags { margin-top: 4px; white-space: normal; }

.stats { display: flex; gap: 8px; }
.stat {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--line);
  min-width: 110px;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.stat b {
  display: block;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 22px;
  color: var(--green);
}
.stat span { color: var(--dim); font-size: 10px; }

.col {
  position: relative;
}
.col.paused { animation-play-state: paused !important; }
.col-nav {
  display: none !important;
}
.col:hover .col-nav { opacity: 1; }
.col-nav button {
  width: 28px;
  height: 28px;
  padding: 0;
  background: rgba(0,0,0,.55);
}

.btn, .player-ui button, .close {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green);
  padding: 8px 10px;
  text-decoration: none;
  cursor: pointer;
}

.top .btn,
.top a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  text-align: center;
  box-sizing: border-box;
}
.btn.solid { background: var(--green); color: #031407; }
.btn.gold {
  background: #e8b040;
  border-color: #f0d084;
  color: #1a1204;
}
.btn.gold:hover {
  background: #ffd56e;
  color: #1a1204;
}
.btn.ghost { border-color: var(--line); color: var(--green-2); }
.btn:hover, .player-ui button:hover { background: var(--green); color: #031407; }

.stage {
  position: fixed;
  inset: 0;
  top: var(--head, 148px);
  display: flex;
  gap: 0;
  overflow: hidden;
  --cols: 3;
}

.veil {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 20;
  pointer-events: none;
  height: 110px;
}
.veil.top {
  top: var(--head, 148px);
  background: linear-gradient(to bottom, #030403 0%, rgba(3,4,3,.75) 45%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(to bottom, #000 35%, transparent);
}
.veil.bottom {
  bottom: 0;
  height: 160px;
  background: linear-gradient(to top, #030403 0%, rgba(3,4,3,.82) 55%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(to top, #000 40%, transparent);
}

.folio-mark {
  position: fixed;
  left: 50%;
  top: calc(var(--head, 148px) + 28px);
  transform: translateX(-50%);
  z-index: 21;
  pointer-events: none;
  text-align: center;
  color: var(--green);
  mix-blend-mode: plus-lighter;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 12px;
}
.folio-mark b {
  display: block;
  margin-top: 6px;
  letter-spacing: 0.4em;
  animation: bounce 1.1s var(--ease) infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: .4; }
  50% { transform: translateY(7px); opacity: 1; }
}

.col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  will-change: transform;
}

.col.up, .col.down { animation: none; }

.stage.mosaic .tile {
  height: calc(100vw / var(--cols, 5));
  min-height: 140px;
}

.glitch {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--head, 148px);
  bottom: 0;
  z-index: 25;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,255,106,.18) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, #030403 0%, #00ff6a 48%, #030403 100%);
  mix-blend-mode: screen;
  animation: glitch 0.45s steps(6) both;
}
@keyframes glitch {
  0% { opacity: 1; transform: translate(0,0) skewX(0); }
  20% { opacity: .8; transform: translate(-12px, 4px) skewX(-8deg); }
  40% { opacity: 1; clip-path: inset(10% 0 40% 0); transform: translate(10px,-6px); }
  60% { opacity: .5; clip-path: inset(40% 0 10% 0); }
  100% { opacity: 0; }
}

.tile {
  position: relative;
  display: block;
  width: 100%;
  flex: 0 0 auto;
  height: calc((100vw / var(--cols, 3)) * 16 / 9);
  min-height: 420px;
  background: #050805;
  cursor: pointer;
  overflow: hidden;
  border: 0;
  padding: 0;
  border-right: 1px solid rgba(0, 255, 106, 0.1);
  border-bottom: 1px solid rgba(0, 255, 106, 0.1);
}

.tile .num {
  position: absolute;
  left: 10px;
  bottom: 10px;
  top: auto;
  z-index: 6;
  color: var(--green);
  font-size: 11px;
  letter-spacing: 0.08em;
  background: #000;
  border-radius: 999px;
  padding: 4px 9px;
  pointer-events: none;
}

.tile .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 1;
  background: #0a0a0a;
}
.tile .poster.broken { opacity: 0; }
.tile.has-art .poster { opacity: 1; }
.tile.is-on .poster { opacity: 1; }
.tile .fresh {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 10, 0, .8);
  color: #e8b040;
  font-family: "Unbounded", system-ui, sans-serif;
  font-size: clamp(11px, 2.2vw, 18px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  text-align: center;
  padding: 8px;
}
.tile .seen {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 10, 4, .84);
  color: var(--green);
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(11px, 2.2vw, 18px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  text-align: center;
  padding: 8px;
}
.tile .new-tag {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 7;
  color: #1a1204;
  background: #e8b040;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(232, 176, 64, 0.9);
}
.tile.is-new .num { top: auto; bottom: 10px; left: 10px; }
.mark {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border: 1px solid var(--dim);
  background: transparent;
  vertical-align: -1px;
}
#mode-new.on .mark {
  border-color: var(--green);
  box-shadow: 0 0 8px #00ff6a, inset 0 0 0 1px #00ff6a;
}
.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
  opacity: 1;
}
.tile video { pointer-events: none; }

@keyframes rise {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

@keyframes fall {
  from { transform: translateY(-50%); }
  to { transform: translateY(0); }
}

.hint {
  display: none;
  position: fixed;
  left: 14px;
  bottom: 10px;
  z-index: 31;
  color: var(--dim);
  font-size: 10px;
}

.panel, .player {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
}

.panel[hidden], .player[hidden] { display: none; }

.panel-card {
  width: min(880px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--green);
  padding: 28px 24px;
  position: relative;
}

.panel-card {
  padding: 36px 88px 28px 28px;
}
.panel-card .close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.panel-card .btn.gold {
  display: inline-flex;
  margin-top: 14px;
  margin-right: 0;
}
.panel-card h2 {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  color: var(--green);
  margin: 18px 0 10px;
  padding-right: 12px;
}
.gold-title { color: #e8b040 !important; }
.gold-num {
  color: #e8b040;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  padding: 0 4px;
}
.panel-card h2:first-child { margin-top: 0; }
.panel-card h3 { color: var(--green-2); margin-bottom: 6px; }
.panel-card p, .panel-card li { color: var(--ink); font-size: 13px; line-height: 1.55; }
.panel-card a { color: var(--green); }
.panel-card ul { padding-left: 18px; margin-top: 8px; }
.note { color: var(--dim); font-size: 12px; margin-top: 12px; }
.close { position: absolute; top: 12px; right: 12px; }

.flag {
  display: inline-block;
  border: 1px solid var(--green);
  color: var(--green) !important;
  padding: 4px 8px;
  margin-bottom: 14px !important;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 8px; }
.grid2 article { border: 1px solid var(--line); padding: 14px; }
.grid2 .want { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.grid2 .max-plan {
  border-color: #e8b040;
  box-shadow: inset 0 0 0 1px #e8b040;
  grid-column: 1 / -1;
}
.grid2 .max-plan h3 { color: #e8b040; }
.price { font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 28px; color: var(--green); }
.price span { font-size: 12px; color: var(--dim); }
.hero-line { font-size: 18px !important; color: var(--green) !important; margin-bottom: 8px; }
.dust { margin: 12px 0; }

.player-preview {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
  z-index: 2;
  display: none;
}
.player-preview.on { display: block; }
.player:not(.wait) .player-preview { display: none; }
.player.wait .player-ui { visibility: hidden; }
.player-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 8;
  width: 36px;
  height: 36px;
  border: 1px solid var(--green);
  background: #041208cc;
  color: var(--green);
  font-size: 28px;
  line-height: 30px;
  padding: 0;
  cursor: pointer;
}
.player.wait .player-x { visibility: visible; }
.player.wait .player-frame { border-color: transparent; }
.player-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(360px, 86vw);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--green);
}
.player-frame video {
  width: 100%;
  height: auto;
  max-height: min(70dvh, 720px);
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
  flex: 0 1 auto;
}
.player-ui { flex: 0 0 auto; }
.player.wait .player-frame video { opacity: 0; }
.player-load {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  aspect-ratio: 9 / 16;
  z-index: 4;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: var(--green);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}
.player.wait .player-load { display: flex; }
.player-ui {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.player-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#seek { width: 100%; accent-color: var(--green); }
#vol { flex: 1; min-width: 0; accent-color: var(--green); }
#time { color: var(--dim); font-size: 11px; margin: 0; }
.player-row-main,
.player-row-vol { flex-wrap: nowrap; }
#toggle-play { min-width: 72px; flex: 1 1 auto; }
.player-row-main [data-rate] { flex: 0 0 42px; }
#toggle-mute {
  min-width: 36px;
  width: 36px;
  padding: 6px 0;
  flex: 0 0 36px;
}
.player-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#player-close {
  align-self: auto;
  min-width: 64px;
  padding: 4px 8px;
}

@media (prefers-reduced-motion: reduce) {
  .col.up, .col.down { animation: none; }
}

@media (min-width: 1101px) {
  .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    justify-content: initial;
  }
  .who { justify-self: start; max-width: 100%; }
  .folio {
    justify-self: center;
    width: max-content;
    max-width: min(460px, 36vw);
    flex: none;
  }
  .actions {
    justify-self: end;
    flex: none;
    max-width: 100%;
  }
}
@media (max-width: 1100px) {
  .top { justify-content: flex-start; text-align: left; }
  .who {
    justify-content: flex-start;
    flex: 1 1 100%;
    text-align: left;
  }
  .who-text { text-align: left; }
  .lead { margin: 0; max-width: 42ch; text-align: left; }
  .actions { order: 2; justify-content: center; flex: 1 1 100%; align-items: center; }
  .actions-col { flex-direction: row; }
  .actions-col .btn { width: auto; }
  .folio { order: 3; flex: 1 1 100%; }
  .lib-meta { text-align: center; }
}

@media (max-width: 720px) {
  .top { padding: 8px 10px 8px; gap: 8px; }
  .who { gap: 10px; align-items: flex-start; }
  .photo { height: 86px; max-width: 64px; object-fit: cover; }
  .who-text { min-width: 0; }
  h1 { font-size: 1.7em; line-height: 1; }
  .role, .lead, .tags { font-size: 0.82em; line-height: 1.25; }
  .lead { max-width: none; }
  .tags { display: block; }
  .folio-title { font-size: 11px; }
  .folio-meter, .folio-ring { width: 44px; height: 44px; }
  .folio-count .folio-title,
  .folio-count .folio-works { height: 44px; }
  .folio-count .folio-meter b { font-size: 12px; }
  .folio-arrows { display: none; }
  .folio-count { margin: 2px 0 6px; gap: 2px; }
  .folio-ops {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    gap: 6px;
  }
  .folio-ops .btn { width: 100%; min-width: 0; }
  .actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .actions-col { display: contents; }
  .top .btn, .top a.btn {
    min-width: 0;
    width: 100%;
    flex: none;
    padding: 7px 4px;
    font-size: 9px;
  }
  .btn, .player-ui button, .close { padding: 7px 8px; font-size: 10px; }
  .grid2 { grid-template-columns: 1fr; }
  .player {
    align-items: stretch;
    padding: 0;
  }
  .player-frame {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    position: relative;
  }
  .player-frame video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
  }
  .player-ui {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    padding: 22px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, #000 0%, #000 70%, transparent 100%);
    gap: 5px;
  }
  #player-close { width: 100%; }
  .player-row { gap: 4px; }
  .player-row button { padding: 6px 6px; font-size: 10px; }
  #vol { width: auto; flex: 1; }
  .col-nav { opacity: 1; }
}

@media (min-width: 721px) and (max-width: 1100px) and (orientation: portrait) {
  .player {
    align-items: stretch;
    padding: 0;
  }
  .player-frame {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    position: relative;
    overflow: hidden;
  }
  .player-frame video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
  }
  .player-ui {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    padding: 22px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, #000 0%, #000 70%, transparent 100%);
  }
  #player-close { width: 100%; }
}

@media (orientation: landscape) and (min-width: 721px) {
  .photo { height: 92px; max-width: 70px; }
  .player {
    padding: 10px 16px;
    align-items: center;
  }
  .player-frame {
    flex-direction: row;
    width: auto;
    max-width: 96vw;
    max-height: calc(100dvh - 20px);
    align-items: center;
  }
  .player-frame video {
    width: auto;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    aspect-ratio: 9 / 16;
  }
  .player-ui {
    position: relative;
    width: 176px;
    flex: 0 0 176px;
    padding: 8px;
    gap: 6px;
    background: none;
  }
  .player-row-main { flex-wrap: wrap; }
  #toggle-play { flex: 1 1 100%; min-width: 0; }
  .player-row-main [data-rate] { flex: 1 1 28%; }
  #vol { width: auto; flex: 1; }
  #player-close { width: 100%; margin-top: 4px; }
}

