:root {
  color-scheme: dark;
  --ink: #142528;
  --muted: #557070;
  --paper: #f4fbf9;
  --panel: #ffffff;
  --panel-soft: #e9f6f4;
  --deep: #073e4b;
  --deep-2: #0c5c66;
  --aqua: #20aeb8;
  --sea: #87d8cf;
  --coral: #f27d67;
  --plum: #6d3b72;
  --sun: #f7c86b;
  --line: rgba(20, 37, 40, 0.16);
  --shadow: 0 18px 60px rgba(6, 47, 57, 0.16);
  --focus: #f7c86b;
  --radius: 8px;
  --display-font: "Arial Narrow", Impact, Haettenschweiler, "Franklin Gothic Heavy", system-ui, sans-serif;
  --body-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text-scale: 1;
  --motion-speed: 180ms;
  --prototype-toolbar-height: 58px;
  --portrait-aspect-ratio: 0.563;
  --portrait-stage-height: min(
    calc(100vh - var(--prototype-toolbar-height)),
    1022px,
    calc(100vw / var(--portrait-aspect-ratio))
  );
  --portrait-stage-width: calc(var(--portrait-stage-height) * var(--portrait-aspect-ratio));
  font-family: var(--body-font);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #000;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: #000;
  color: var(--ink);
  font-size: calc(18px * var(--text-scale));
  line-height: 1.4;
  font-family: var(--body-font);
}

body.high-contrast {
  --ink: #061114;
  --muted: #20383a;
  --paper: #ffffff;
  --panel: #ffffff;
  --panel-soft: #e3fbff;
  --deep: #001b20;
  --deep-2: #004e59;
  --aqua: #007c89;
  --sea: #49c6d2;
  --coral: #be3e1f;
  --plum: #4a1957;
  --sun: #ffb000;
  --line: rgba(0, 0, 0, 0.38);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  --focus: #ffb000;
}

body.reduced-motion,
body.reduced-motion * {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  transform: translateY(-150%);
  background: var(--deep);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.prototype-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  height: var(--prototype-toolbar-height);
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: 0.55rem;
  padding-inline: max(0.75rem, calc((100vw - var(--portrait-stage-width)) / 2 + 0.75rem));
  background: #050607;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 24px rgba(5, 25, 29, 0.18);
}

.prototype-toolbar.is-hidden {
  display: none;
}

.prototype-toolbar label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
}

.toolbar-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-right: 0;
  min-width: auto;
}

.toolbar-meta span {
  color: rgba(255, 255, 255, 0.72);
}

.toolbar-reveal {
  position: fixed;
  right: max(1rem, calc((100vw - var(--portrait-stage-width)) / 2 + 1rem));
  top: 1rem;
  z-index: 29;
  display: none;
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius);
  color: #fff;
  background: #162629;
  box-shadow: var(--shadow);
}

.toolbar-reveal.is-visible {
  display: inline-flex;
}

.app-shell {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  width: var(--portrait-stage-width);
  height: var(--portrait-stage-height);
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(244, 251, 249, 0.94), rgba(232, 247, 244, 0.9)),
    var(--paper);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 90px rgba(0, 0, 0, 0.86);
}

.prototype-toolbar.is-hidden ~ .app-shell {
  --portrait-stage-height: min(100vh, 1080px, calc(100vw / var(--portrait-aspect-ratio)));
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 3.5rem);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 58px;
  padding: 0.25rem;
  color: var(--deep);
  background: transparent;
  border-radius: var(--radius);
  text-align: left;
}

.brand-mark strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  line-height: 1.1;
}

.brand-mark small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fff;
  background: var(--deep);
  border: 3px solid var(--sea);
  border-radius: 50%;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.nav-item,
.ghost,
.primary,
.secondary,
.quiet,
.chip,
.icon-button,
.card-button,
.tab-button {
  min-height: 52px;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    transform var(--motion-speed) ease,
    border-color var(--motion-speed) ease,
    background var(--motion-speed) ease,
    color var(--motion-speed) ease,
    box-shadow var(--motion-speed) ease;
}

.nav-item {
  padding: 0.75rem 1rem;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  font-weight: 700;
}

.nav-item.is-active {
  color: #fff;
  background: var(--deep);
  border-color: var(--deep);
}

.screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 clamp(1rem, 3vw, 3.5rem) 3rem;
  outline: 0;
}

.screen.fullscreen {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.welcome-screen {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(18rem, 1.1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: stretch;
  padding-top: clamp(1rem, 3vh, 3rem);
}

.welcome-panel {
  align-self: center;
  max-width: 40rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--deep-2);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 7vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.42;
}

.field-stack {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 1rem;
}

.field-stack label {
  color: var(--deep);
  font-weight: 800;
}

.input-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

input,
select {
  min-height: 58px;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0.85rem 1rem;
}

select {
  min-width: 11rem;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 9.5rem;
  padding: 0.85rem 1.15rem;
  color: #fff;
  background: var(--deep);
  border: 2px solid var(--deep);
  font-weight: 800;
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 9.5rem;
  padding: 0.85rem 1.15rem;
  color: var(--deep);
  background: #fff;
  border: 2px solid var(--line);
  font-weight: 800;
}

.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  color: var(--deep);
  background: transparent;
  border: 2px solid transparent;
  font-weight: 800;
}

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.55rem 0.8rem;
  color: inherit;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

.ghost.small {
  min-height: 40px;
  font-size: 0.84rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.media-frame {
  position: relative;
  overflow: hidden;
  min-height: 36rem;
  border-radius: var(--radius);
  background: #d8f3f4;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame.contain img {
  object-fit: contain;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(0deg, rgba(3, 30, 36, 0.6), transparent);
  pointer-events: none;
  z-index: 1;
}

.welcome-image {
  min-height: 44rem;
}

.image-caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  color: #fff;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--deep);
  font-size: 0.86rem;
  font-weight: 800;
}

.pill.dark {
  color: #fff;
  background: rgba(7, 62, 75, 0.86);
}

.page-stack {
  display: grid;
  gap: 1.35rem;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
}

.page-heading p {
  max-width: 52rem;
  margin-bottom: 0;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(20rem, 1.15fr) minmax(17rem, 0.85fr);
  gap: 1rem;
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(16rem, 0.95fr) minmax(18rem, 1.05fr);
  min-height: 34rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--deep);
  color: #fff;
  box-shadow: var(--shadow);
}

.feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 3rem);
}

.feature-copy .eyebrow,
.feature-copy .lead {
  color: rgba(255, 255, 255, 0.78);
}

.feature-copy h1,
.feature-copy h2,
.feature-copy h3 {
  color: #fff;
}

.feature-media {
  min-height: 34rem;
  border-radius: 0;
  box-shadow: none;
}

.home-photo-title {
  position: absolute;
  left: clamp(0.9rem, 3cqw, 1.4rem);
  right: clamp(0.9rem, 3cqw, 1.4rem);
  top: clamp(0.9rem, 3cqw, 1.4rem);
  z-index: 3;
  text-shadow: 0 0.25rem 1.1rem rgba(0, 0, 0, 0.7);
}

.home-photo-title h2,
.home-photo-title .eyebrow {
  margin-bottom: 0;
}

.feature-media img {
  object-position: center center;
}

body.mode-portrait .feature-media img {
  transform: scale(1.75);
  transform-origin: center center;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.stat {
  min-height: 6.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}

.feature-copy .stat {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.stat strong {
  display: block;
  color: inherit;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 0.35rem;
  color: currentColor;
  opacity: 0.72;
  font-weight: 700;
}

.side-stack {
  display: grid;
  gap: 1rem;
}

.info-panel,
.filter-panel,
.settings-panel,
.help-panel {
  padding: clamp(1rem, 2vw, 1.4rem);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(8, 53, 60, 0.08);
}

.info-panel.dark {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
}

.info-panel.dark p,
.info-panel.dark .meta-list span {
  color: rgba(255, 255, 255, 0.76);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.2rem 0 0.7rem;
}

.section-title h2,
.section-title h3 {
  margin: 0;
}

.routine-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.routine-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-button {
  display: grid;
  align-content: stretch;
  min-height: 21rem;
  overflow: hidden;
  padding: 0;
  text-align: left;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid transparent;
  box-shadow: 0 8px 30px rgba(6, 47, 57, 0.1);
}

.card-button.is-selected,
.card-button[aria-pressed="true"] {
  border-color: var(--deep);
  box-shadow: 0 0 0 4px rgba(247, 200, 107, 0.58), var(--shadow);
}

.routine-image {
  aspect-ratio: 16 / 10;
  width: 100%;
  background: var(--panel-soft);
  overflow: hidden;
}

.routine-image.portrait {
  aspect-ratio: 4 / 5;
}

.routine-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.routine-image.portrait img {
  object-fit: contain;
  background: #cdecef;
}

.routine-copy {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
}

.routine-copy h3 {
  margin-bottom: 0;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta-list li,
.meta-list span {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.category-card {
  min-height: 15rem;
  padding: 1.1rem;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid transparent;
  text-align: left;
  box-shadow: 0 8px 30px rgba(6, 47, 57, 0.1);
}

.category-card strong {
  display: block;
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.08;
}

.category-card span {
  display: block;
  margin-top: 0.7rem;
  color: var(--muted);
}

.category-card small {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--deep);
  font-weight: 900;
}

.filters {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) repeat(4, minmax(10rem, 0.65fr));
  gap: 0.75rem;
  align-items: end;
}

.filters label,
.setting-control label {
  display: grid;
  gap: 0.35rem;
  color: var(--deep);
  font-size: 0.88rem;
  font-weight: 800;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  color: var(--deep);
  background: #fff;
  border: 2px solid var(--line);
  font-weight: 800;
}

.chip.is-active {
  color: #fff;
  background: var(--deep);
  border-color: var(--deep);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(20rem, 1.1fr);
  gap: 1rem;
  align-items: start;
}

.detail-media {
  min-height: min(72vh, 48rem);
  background: #d2eef0;
}

.detail-media img {
  object-fit: contain;
  object-position: center center;
}

.detail-body {
  display: grid;
  gap: 1rem;
}

.segment-list,
.history-list,
.help-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.segment-list li,
.history-list li,
.help-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.segment-list li:last-child,
.history-list li:last-child,
.help-list li:last-child {
  border-bottom: 0;
}

.safety-note {
  padding: 1rem;
  border-left: 6px solid var(--coral);
  border-radius: var(--radius);
  background: #fff5ef;
}

.cinematic-screen {
  --neon: #16b8ff;
  --neon-deep: #006dff;
  --night: #020b1b;
  position: relative;
  min-height: var(--portrait-stage-height);
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
  color: #fff;
  font-size: clamp(9px, 1.7cqw, 16px);
  font-family:
    "Arial Narrow", Impact, Haettenschweiler, "Franklin Gothic Heavy",
    system-ui, sans-serif;
  text-transform: uppercase;
}

.cinematic-screen::before,
.cinematic-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cinematic-screen::before {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(1, 9, 26, 0.94) 0%, rgba(1, 14, 34, 0.48) 24%, rgba(1, 18, 39, 0.06) 55%, rgba(1, 12, 28, 0.88) 100%),
    linear-gradient(90deg, rgba(0, 11, 27, 0.82), rgba(0, 11, 27, 0.03) 45%, rgba(0, 11, 27, 0.54));
}

.cinematic-screen::after {
  z-index: 2;
  box-shadow:
    inset 0 0 4.8rem rgba(0, 0, 0, 0.62),
    inset 0 -10rem 8rem rgba(0, 11, 28, 0.88);
}

.cinematic-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.18) contrast(1.08) brightness(0.92);
}

.poster-art {
  filter: saturate(1.16) contrast(1.04) brightness(1.08);
  transform: scale(1.25);
  object-position: center 45%;
}

.poster-screen::before {
  background:
    linear-gradient(180deg, rgba(1, 9, 26, 0.84) 0%, rgba(1, 14, 34, 0.28) 24%, rgba(1, 18, 39, 0.02) 56%, rgba(1, 12, 28, 0.72) 100%),
    linear-gradient(90deg, rgba(0, 11, 27, 0.58), rgba(0, 11, 27, 0.02) 45%, rgba(0, 11, 27, 0.34));
}

.poster-screen::after {
  box-shadow:
    inset 0 0 2.8rem rgba(0, 0, 0, 0.34),
    inset 0 -7rem 6rem rgba(0, 11, 28, 0.68);
}

.player-art {
  filter: saturate(1.16) contrast(1.04) brightness(1.08);
  transform: scale(1.8);
  object-position: center 48%;
}

.player-art.wide-player-art {
  transform: scale(1.28);
  object-position: center center;
}

.poster-art.wide {
  transform: scale(1.05);
  object-position: center center;
}

.portrait-player-screen::before {
  background:
    linear-gradient(180deg, rgba(1, 9, 26, 0.84) 0%, rgba(1, 14, 34, 0.28) 24%, rgba(1, 18, 39, 0.02) 56%, rgba(1, 12, 28, 0.72) 100%),
    linear-gradient(90deg, rgba(0, 11, 27, 0.58), rgba(0, 11, 27, 0.02) 45%, rgba(0, 11, 27, 0.34));
}

.portrait-player-screen::after {
  box-shadow:
    inset 0 0 2.8rem rgba(0, 0, 0, 0.34),
    inset 0 -7rem 6rem rgba(0, 11, 28, 0.68);
}

.cinematic-brand {
  position: absolute;
  left: 2.2rem;
  right: 2.2rem;
  top: 1.6rem;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.35rem;
  color: var(--neon);
  font-size: 1.35rem;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 0 1.1rem rgba(22, 184, 255, 0.72);
}

.cinematic-brand span {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 1rem rgba(22, 184, 255, 0.9);
}

.poster-copy,
.portrait-player-copy,
.cinematic-circle,
.poster-bottom,
.poster-secondary-actions,
.portrait-player-bottom,
.cinematic-caption {
  position: absolute;
  z-index: 4;
}

.poster-copy {
  top: 5rem;
  left: 2.2rem;
  right: 14rem;
}

.poster-kicker {
  display: none;
}

.poster-copy h1,
.portrait-player-copy h1 {
  margin: 0;
  color: #fff;
  font-size: 5.15rem;
  line-height: 0.9;
  font-weight: 900;
  text-shadow: 0 0.2rem 1.2rem rgba(0, 0, 0, 0.68);
}

.portrait-player-copy h1 {
  font-size: 2.58rem;
}

.poster-copy p {
  margin: 0.75rem 0 0;
  color: var(--neon);
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 0 1.1rem rgba(22, 184, 255, 0.62);
}

.cinematic-circle {
  display: grid;
  place-items: center;
  width: 11.8rem;
  height: 11.8rem;
  border-radius: 50%;
  text-align: center;
}

.poster-duration {
  top: 3rem;
  right: 2.2rem;
  border: 0.48rem solid var(--neon);
  box-shadow:
    0 0 2rem rgba(22, 184, 255, 0.48),
    inset 0 0 1.6rem rgba(0, 109, 255, 0.24);
}

.poster-duration strong,
.countdown-ring strong {
  display: block;
  color: #fff;
  font-size: 5rem;
  line-height: 0.82;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.poster-duration span,
.countdown-ring span {
  display: block;
  margin-top: 0.45rem;
  color: var(--neon);
  font-size: 1.45rem;
  line-height: 0.95;
  font-weight: 900;
}

.poster-secondary-actions {
  top: 15.1rem;
  right: 2.2rem;
  display: grid;
  gap: 0.55rem;
  width: 11.8rem;
}

.glass-button {
  min-height: 2.8rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius);
  color: #fff;
  background: rgba(0, 23, 50, 0.58);
  border: 2px solid rgba(22, 184, 255, 0.42);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 0 1rem rgba(22, 184, 255, 0.14);
  backdrop-filter: blur(10px);
}

.glass-button.primary-glass {
  color: #001a32;
  background: var(--neon);
  border-color: var(--neon);
}

.poster-bottom {
  left: 2.2rem;
  right: 2.2rem;
  bottom: 1.15rem;
  display: grid;
  gap: 0.85rem;
}

.poster-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 1rem;
}

.poster-stat {
  display: grid;
  grid-template-columns: 3.55rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.8rem;
  align-items: center;
  min-height: 4.65rem;
  padding-inline: 0.4rem;
  border-right: 1px solid rgba(255, 255, 255, 0.32);
}

.poster-stat:last-child {
  border-right: 0;
}

.stat-ring {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 3.45rem;
  height: 3.45rem;
  border: 0.22rem solid var(--neon);
  border-radius: 50%;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  box-shadow: 0 0 1.2rem rgba(22, 184, 255, 0.4);
}

.poster-stat strong {
  color: #fff;
  font-size: 2.2rem;
  line-height: 0.9;
  font-weight: 900;
}

.poster-stat small {
  color: var(--neon);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 900;
}

.start-class-button {
  min-height: 5.9rem;
  width: 100%;
  border-radius: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, var(--neon), var(--neon-deep));
  border: 2px solid rgba(255, 255, 255, 0.22);
  font-family: inherit;
  font-size: 3.25rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow:
    0 1.2rem 3rem rgba(0, 83, 214, 0.38),
    inset 0 0.1rem 0 rgba(255, 255, 255, 0.4);
}

.poster-equipment {
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  text-transform: none;
}

.poster-equipment strong {
  color: var(--neon);
}

.poster-support-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.portrait-player-copy {
  top: 2rem;
  left: 2rem;
  right: 14.6rem;
}

.wave-kicker {
  margin: 0 0 1.4rem;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 0.2rem 1.1rem rgba(0, 0, 0, 0.66);
}

.wave-kicker span {
  color: var(--neon);
}

.portrait-player-copy h1 span,
.portrait-player-copy h1 strong {
  display: block;
}

.portrait-player-copy h1 strong {
  margin-top: 0.4rem;
  color: var(--neon);
  text-shadow: 0 0 1.1rem rgba(22, 184, 255, 0.58);
}

.countdown-ring {
  top: 2.15rem;
  right: 1.65rem;
  width: 7.38rem;
  height: 7.38rem;
  padding: 0.53rem;
  background:
    radial-gradient(circle at center, rgba(1, 12, 30, 0.96) 0 58%, transparent 59%),
    conic-gradient(var(--neon) var(--ring-progress), rgba(22, 184, 255, 0.18) 0);
  box-shadow:
    0 0 2rem rgba(22, 184, 255, 0.4),
    inset 0 0 1.4rem rgba(0, 109, 255, 0.2);
}

.countdown-ring span {
  font-size: 0.66rem;
}

.countdown-ring strong {
  font-size: 2.48rem;
}

.cinematic-caption {
  left: 2rem;
  right: 2rem;
  bottom: 11.8rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  background: rgba(0, 8, 18, 0.72);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  text-transform: none;
}

.portrait-player-bottom {
  left: 2rem;
  right: 2rem;
  bottom: 1.05rem;
  display: grid;
  gap: 0.75rem;
}

.mock-progress-track {
  width: 100%;
  height: 0.95rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.64);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mock-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--neon), #f4fbff);
}

.portrait-player-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
  align-items: end;
}

.portrait-player-metrics div {
  display: grid;
  gap: 0.25rem;
}

.portrait-player-metrics div:nth-child(2) {
  justify-items: center;
  text-align: center;
}

.portrait-player-metrics div:nth-child(3) {
  justify-items: end;
  text-align: right;
}

.portrait-player-metrics strong {
  color: #fff;
  font-size: 3.2rem;
  line-height: 0.9;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0.25rem 1.1rem rgba(0, 0, 0, 0.6);
}

.portrait-player-metrics strong small {
  font-size: 1.45rem;
}

.portrait-player-metrics span {
  color: var(--neon);
  font-size: 1.18rem;
  line-height: 1;
  font-weight: 900;
}

.portrait-control-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.portrait-control-dock .glass-button {
  min-height: 2.55rem;
  font-size: 0.78rem;
}

.player-screen {
  position: relative;
  min-height: var(--portrait-stage-height);
  background: #071f25;
  color: #fff;
  overflow: hidden;
}

.player-layout {
  display: grid;
  min-height: var(--portrait-stage-height);
}

body.mode-landscape .player-layout {
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 34vw);
}

body.mode-portrait .player-layout {
  grid-template-rows: minmax(0, 1fr) auto;
}

.player-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 68vh;
  background: #041a1e;
  overflow: hidden;
}

body.mode-portrait .player-media {
  min-height: calc(100vh - 17rem);
}

.player-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.mode-landscape .player-media img {
  object-fit: contain;
}

.player-top {
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.player-top > * {
  pointer-events: auto;
}

.timer-panel {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: rgba(7, 31, 37, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.timer-panel strong {
  font-size: clamp(2rem, 6vw, 5rem);
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
}

.timer-panel span {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

.player-side {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1rem, 2.5vw, 2rem);
  background: rgba(8, 45, 51, 0.94);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

body.mode-portrait .player-side {
  align-content: start;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.exercise-title {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5vw, 5.5rem);
  line-height: 0.94;
}

body.mode-portrait .exercise-title {
  font-size: clamp(1.6rem, 4vw, 3.8rem);
}

.player-side p,
.player-side .meta-list span {
  color: rgba(255, 255, 255, 0.78);
}

.player-side .meta-list span {
  background: rgba(255, 255, 255, 0.12);
}

.progress-track {
  position: relative;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--sun);
  border-radius: inherit;
  transition: width var(--motion-speed) ease;
}

.player-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(5rem, 1fr));
  gap: 0.6rem;
}

body.mode-portrait .player-controls {
  grid-template-columns: repeat(6, minmax(4.8rem, 1fr));
  align-self: end;
}

.icon-button {
  min-height: 64px;
  padding: 0.65rem 0.8rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

.icon-button.primary-control {
  color: var(--deep);
  background: var(--sun);
  border-color: var(--sun);
}

.caption-line {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  z-index: 2;
  transform: translateX(-50%);
  width: min(76rem, calc(100% - 2rem));
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  color: #fff;
  background: rgba(0, 0, 0, 0.66);
  text-align: center;
  font-size: clamp(1rem, 1.8vw, 1.45rem);
  font-weight: 800;
}

.paused-screen {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
}

.pause-panel {
  width: min(58rem, 100%);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--deep);
  color: #fff;
  box-shadow: var(--shadow);
}

.pause-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.completion-layout {
  display: grid;
  grid-template-columns: minmax(20rem, 0.8fr) minmax(20rem, 1.2fr);
  gap: 1rem;
  align-items: stretch;
}

.progress-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.bar-card {
  display: grid;
  align-items: end;
  min-height: 16rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

.bar {
  display: block;
  width: 100%;
  min-height: 2rem;
  border-radius: var(--radius);
  background: var(--aqua);
}

.bar.coral {
  background: var(--coral);
}

.bar.plum {
  background: var(--plum);
}

.settings-grid,
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.setting-control {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.setting-control:last-child {
  border-bottom: 0;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.value-readout {
  font-weight: 900;
  color: var(--deep);
}

.empty-state {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: center;
}

.focusable-control:focus,
.focusable-control:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(7, 62, 75, 0.32);
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

body.mode-portrait .app-header {
  align-items: flex-start;
  flex-direction: column;
}

body.mode-portrait .primary-nav {
  width: 100%;
  justify-content: flex-start;
}

body.mode-portrait .welcome-screen,
body.mode-portrait .home-grid,
body.mode-portrait .feature-panel,
body.mode-portrait .detail-layout,
body.mode-portrait .completion-layout,
body.mode-portrait .settings-grid,
body.mode-portrait .help-grid {
  grid-template-columns: 1fr;
}

body.mode-portrait .welcome-image {
  min-height: 50vh;
}

body.mode-portrait .feature-panel {
  min-height: 0;
}

body.mode-portrait .feature-media {
  min-height: 44vh;
}

body.mode-portrait .routine-grid,
body.mode-portrait .routine-grid.compact,
body.mode-portrait .category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mode-portrait .filters {
  grid-template-columns: 1fr 1fr;
}

@media (orientation: portrait), (max-width: 900px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .welcome-screen,
  .home-grid,
  .feature-panel,
  .detail-layout,
  .completion-layout,
  .settings-grid,
  .help-grid {
    grid-template-columns: 1fr;
  }

  .welcome-image {
    min-height: 50vh;
  }

  .feature-panel {
    min-height: 0;
  }

  .feature-media {
    min-height: 44vh;
  }

  .routine-grid,
  .routine-grid.compact,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  body.mode-portrait .player-side,
  body.mode-portrait .player-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  body {
    font-size: calc(16px * var(--text-scale));
  }

  .screen {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .screen.fullscreen {
    padding: 0;
  }

  .input-row,
  .page-heading,
  .segment-list li,
  .history-list li,
  .help-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .routine-grid,
  .routine-grid.compact,
  .category-grid,
  .filters,
  .stat-strip,
  .progress-visual {
    grid-template-columns: 1fr;
  }

  .card-button {
    min-height: 0;
  }

  .player-top {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .cinematic-screen {
    min-height: var(--portrait-stage-height);
  }

  .cinematic-brand {
    left: 1.1rem;
    right: 1.1rem;
    top: 1rem;
    gap: 0.75rem;
    font-size: 1rem;
  }

  .poster-copy {
    top: 4rem;
    left: 1.2rem;
    right: 10.5rem;
  }

  .poster-copy h1,
  .portrait-player-copy h1 {
    font-size: 3.65rem;
  }

  .portrait-player-copy h1 {
    font-size: 1.83rem;
  }

  .poster-copy p {
    font-size: 1.35rem;
  }

  .cinematic-circle {
    width: 8.9rem;
    height: 8.9rem;
  }

  .poster-duration {
    top: 2.8rem;
    right: 1rem;
    border-width: 0.38rem;
  }

  .poster-duration strong {
    font-size: 3.45rem;
  }

  .countdown-ring strong {
    font-size: 2.16rem;
  }

  .poster-duration span {
    font-size: 1.05rem;
  }

  .countdown-ring span {
    font-size: 0.66rem;
  }

  .poster-secondary-actions {
    top: 12.4rem;
    right: 1rem;
    width: 8.9rem;
  }

  .poster-bottom,
  .portrait-player-bottom {
    left: 1.1rem;
    right: 1.1rem;
    bottom: 0.8rem;
  }

  .poster-stats {
    gap: 0.35rem;
  }

  .poster-stat {
    grid-template-columns: 3.1rem minmax(0, 1fr);
    min-height: 4.7rem;
    padding-inline: 0.2rem;
    column-gap: 0.45rem;
  }

  .stat-ring {
    width: 3rem;
    height: 3rem;
    font-size: 0.78rem;
  }

  .poster-stat strong {
    font-size: 1.8rem;
  }

  .poster-stat small {
    font-size: 0.95rem;
  }

  .start-class-button {
    min-height: 5.4rem;
    border-radius: 1.2rem;
    font-size: 2.5rem;
  }

  .poster-equipment {
    font-size: 1rem;
  }

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

  .portrait-player-copy {
    top: 1.6rem;
    left: 1.1rem;
    right: 10rem;
  }

  .wave-kicker {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
  }

  .countdown-ring {
    top: 1.5rem;
    right: 0.9rem;
    width: 5.56rem;
    height: 5.56rem;
  }

  .cinematic-caption {
    left: 1rem;
    right: 1rem;
    bottom: 13rem;
    font-size: 0.9rem;
  }

  .portrait-player-metrics strong {
    font-size: 2.65rem;
  }

  .portrait-player-metrics strong small {
    font-size: 1.25rem;
  }

  .portrait-player-metrics span {
    font-size: 1rem;
  }

  .portrait-control-dock {
    grid-template-columns: repeat(4, 1fr);
  }
}

.detail-poster-screen .poster-copy h1 {
  font-size: 2.58rem;
}

.detail-poster-screen .poster-art {
  transform: scale(1.88);
}

.detail-poster-screen .poster-duration {
  width: 4.43rem;
  height: 4.43rem;
  border-width: 0.18rem;
  box-shadow:
    0 0 0.8rem rgba(22, 184, 255, 0.34),
    inset 0 0 0.6rem rgba(0, 109, 255, 0.18);
}

.detail-poster-screen .poster-duration strong {
  font-size: 1.88rem;
}

.detail-poster-screen .poster-duration span {
  margin-top: 0.22rem;
  font-size: 0.55rem;
}

body.mode-portrait .app-shell {
  background:
    radial-gradient(circle at 50% 0%, rgba(22, 184, 255, 0.22), transparent 36%),
    linear-gradient(180deg, #061528 0%, #031225 56%, #020914 100%);
  color: #fff;
}

body.mode-portrait .app-header {
  gap: 0.55rem;
  padding: 0.65rem clamp(0.85rem, 3cqw, 1.35rem);
  background: rgba(2, 10, 24, 0.96);
  border-bottom: 1px solid rgba(22, 184, 255, 0.2);
}

body.mode-portrait .brand-mark {
  min-height: 42px;
  color: #fff;
}

body.mode-portrait .brand-mark strong {
  color: #fff;
  font-family: var(--display-font);
  font-size: clamp(1.1rem, 4.2cqw, 1.45rem);
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
}

body.mode-portrait .brand-mark small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.7rem;
}

body.mode-portrait .brand-symbol {
  width: 42px;
  height: 42px;
  background: #031426;
  border-color: #16b8ff;
  box-shadow: 0 0 1.1rem rgba(22, 184, 255, 0.38);
}

body.mode-portrait .primary-nav {
  gap: 0.35rem;
}

body.mode-portrait .nav-item {
  min-height: 38px;
  padding: 0.42rem 0.58rem;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(22, 184, 255, 0.2);
  font-size: clamp(0.7rem, 2.2cqw, 0.82rem);
  font-weight: 900;
  text-transform: uppercase;
}

body.mode-portrait .nav-item.is-active {
  color: #001427;
  background: #16b8ff;
  border-color: #16b8ff;
}

body.mode-portrait .screen:not(.fullscreen) {
  padding: clamp(0.75rem, 2.4cqw, 1.15rem) clamp(0.9rem, 3.2cqw, 1.45rem) 1.2rem;
  color: #fff;
  scrollbar-color: rgba(22, 184, 255, 0.7) rgba(255, 255, 255, 0.08);
}

body.mode-portrait .screen-welcome {
  padding: 0;
  overflow: hidden;
}

body.mode-portrait .page-stack {
  gap: clamp(0.7rem, 2.4cqw, 1rem);
}

body.mode-portrait .page-heading {
  align-items: flex-start;
  margin-bottom: 0;
}

body.mode-portrait h1,
body.mode-portrait h2,
body.mode-portrait h3,
body.mode-portrait .primary,
body.mode-portrait .secondary,
body.mode-portrait .quiet,
body.mode-portrait .chip,
body.mode-portrait .card-button,
body.mode-portrait .category-card,
body.mode-portrait .stat strong,
body.mode-portrait .bar-card h3 {
  font-family: var(--display-font);
  font-weight: 900;
  letter-spacing: 0;
}

body.mode-portrait h1 {
  font-size: clamp(3rem, 11cqw, 4.5rem);
  line-height: 0.9;
}

body.mode-portrait h2 {
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: clamp(2.1rem, 8cqw, 3.15rem);
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.5);
}

body.mode-portrait h3 {
  color: #fff;
  font-size: clamp(1.25rem, 4.4cqw, 1.75rem);
  line-height: 1;
  text-transform: uppercase;
}

body.mode-portrait p,
body.mode-portrait .routine-copy > span:not(.eyebrow):not(.meta-list),
body.mode-portrait .category-card span {
  color: rgba(255, 255, 255, 0.75);
}

body.mode-portrait .lead {
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.98rem, 2.8cqw, 1.18rem);
  line-height: 1.35;
}

body.mode-portrait .eyebrow {
  color: #16b8ff;
  font-size: clamp(0.72rem, 2.2cqw, 0.88rem);
  font-weight: 900;
  text-shadow: 0 0 0.9rem rgba(22, 184, 255, 0.45);
}

body.mode-portrait .welcome-screen {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 100%;
  align-items: stretch;
  padding: clamp(1rem, 3cqw, 1.45rem);
  overflow: hidden;
  isolation: isolate;
}

body.mode-portrait .welcome-panel {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  width: 100%;
  min-height: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.mode-portrait .welcome-copy {
  max-width: 92%;
  padding-top: clamp(0.35rem, 1.4cqw, 0.7rem);
  text-shadow: 0 0.25rem 1.2rem rgba(0, 0, 0, 0.78);
}

body.mode-portrait .welcome-copy h1 {
  margin-bottom: 0.6rem;
  color: #fff;
  font-family: var(--display-font);
  font-size: clamp(3.4rem, 12cqw, 4.8rem);
  line-height: 0.88;
  text-transform: uppercase;
}

body.mode-portrait .welcome-copy .lead {
  max-width: 26rem;
  color: rgba(255, 255, 255, 0.86);
}

body.mode-portrait .welcome-access {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0.2rem 0.9rem rgba(0, 0, 0, 0.76);
  backdrop-filter: none;
}

body.mode-portrait .welcome-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.mode-portrait .welcome-image img {
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.12) contrast(1.04) brightness(1.02);
  transform: scale(1.875);
  transform-origin: center center;
}

body.mode-portrait .welcome-image .image-caption {
  display: none;
}

body.mode-portrait .media-frame {
  min-height: 18rem;
  background: #061528;
  border: 1px solid rgba(22, 184, 255, 0.22);
  box-shadow: 0 1rem 2.8rem rgba(0, 0, 0, 0.34);
}

body.mode-portrait .media-frame.welcome-image {
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: #020914;
  box-shadow: none;
}

body.mode-portrait .media-frame.contain img {
  object-fit: cover;
}

body.mode-portrait .media-frame::after {
  background: linear-gradient(0deg, rgba(1, 10, 24, 0.72), transparent);
}

body.mode-portrait .welcome-image::after {
  inset: 0;
  height: auto;
  background:
    linear-gradient(180deg, rgba(0, 8, 22, 0.52) 0%, rgba(0, 8, 22, 0.08) 42%, rgba(0, 8, 22, 0.88) 100%),
    linear-gradient(90deg, rgba(0, 8, 22, 0.7), rgba(0, 8, 22, 0.08) 46%, rgba(0, 8, 22, 0.28));
}

body.mode-portrait input,
body.mode-portrait select {
  min-height: 48px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(22, 184, 255, 0.28);
}

body.mode-portrait input::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

body.mode-portrait .field-stack {
  gap: 0.55rem;
  margin: 1.1rem 0 0.8rem;
}

body.mode-portrait .field-stack label,
body.mode-portrait .filters label,
body.mode-portrait .setting-control label,
body.mode-portrait .value-readout {
  color: #16b8ff;
  font-weight: 900;
}

body.mode-portrait .primary,
body.mode-portrait .secondary,
body.mode-portrait .quiet,
body.mode-portrait .chip {
  min-height: 46px;
  border-radius: var(--radius);
  font-size: clamp(0.86rem, 2.5cqw, 1rem);
  text-transform: uppercase;
}

body.mode-portrait .primary,
body.mode-portrait .chip.is-active {
  color: #001427;
  background: linear-gradient(135deg, #16b8ff, #006dff);
  border-color: #16b8ff;
}

body.mode-portrait .secondary,
body.mode-portrait .chip,
body.mode-portrait .quiet {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(22, 184, 255, 0.32);
}

body.mode-portrait .feature-panel,
body.mode-portrait .info-panel,
body.mode-portrait .filter-panel,
body.mode-portrait .settings-panel,
body.mode-portrait .help-panel,
body.mode-portrait .card-button,
body.mode-portrait .category-card,
body.mode-portrait .bar-card,
body.mode-portrait .pause-panel {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(8, 44, 74, 0.82), rgba(3, 16, 36, 0.9));
  border: 1px solid rgba(22, 184, 255, 0.22);
  box-shadow: 0 0.9rem 2.4rem rgba(0, 0, 0, 0.28);
}

body.mode-portrait .feature-panel {
  min-height: 0;
}

body.mode-portrait .feature-media {
  order: -1;
  min-height: 22rem;
}

body.mode-portrait .feature-copy {
  gap: 0.7rem;
  padding: clamp(0.9rem, 3cqw, 1.25rem);
}

body.mode-portrait .feature-copy p,
body.mode-portrait .info-panel p,
body.mode-portrait .help-panel p,
body.mode-portrait .pause-panel p {
  color: rgba(255, 255, 255, 0.74);
}

body.mode-portrait .side-stack,
body.mode-portrait .settings-grid,
body.mode-portrait .help-grid {
  gap: 0.75rem;
}

body.mode-portrait .routine-grid,
body.mode-portrait .routine-grid.compact,
body.mode-portrait .category-grid {
  gap: 0.7rem;
}

body.mode-portrait .card-button {
  min-height: 0;
}

body.mode-portrait .card-button.is-selected,
body.mode-portrait .card-button[aria-pressed="true"] {
  border-color: #16b8ff;
  box-shadow:
    0 0 0 3px rgba(22, 184, 255, 0.45),
    0 0.9rem 2.4rem rgba(0, 0, 0, 0.28);
}

body.mode-portrait .routine-image {
  aspect-ratio: 4 / 3;
  background: #041225;
}

body.mode-portrait .routine-image.portrait {
  aspect-ratio: 4 / 4.6;
}

body.mode-portrait .routine-image.portrait img {
  object-fit: cover;
  background: #041225;
}

body.mode-portrait .routine-image img {
  transform: scale(1.14);
  transform-origin: center center;
}

body.mode-portrait .routine-image.portrait img {
  transform: scale(1.2);
}

body.mode-portrait .routine-copy {
  gap: 0.4rem;
  padding: 0.75rem;
}

body.mode-portrait .routine-copy h3,
body.mode-portrait .category-card strong {
  color: #fff;
  font-size: clamp(1.05rem, 3.6cqw, 1.35rem);
  line-height: 1;
  text-transform: uppercase;
}

body.mode-portrait .category-card {
  min-height: 11rem;
  padding: 0.9rem;
}

body.mode-portrait .category-card small {
  color: #16b8ff;
}

body.mode-portrait .meta-list li,
body.mode-portrait .meta-list span,
body.mode-portrait .pill {
  color: #fff;
  background: rgba(22, 184, 255, 0.16);
  border: 1px solid rgba(22, 184, 255, 0.24);
  font-size: 0.72rem;
}

body.mode-portrait .pill.dark {
  background: rgba(2, 13, 30, 0.74);
}

body.mode-portrait .filters {
  gap: 0.55rem;
}

body.mode-portrait .filter-panel {
  padding: 0.85rem;
}

body.mode-portrait .chip-row {
  gap: 0.4rem;
}

body.mode-portrait .stat {
  min-height: 4.8rem;
  padding: 0.8rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(22, 184, 255, 0.2);
}

body.mode-portrait .stat strong {
  font-size: clamp(1.7rem, 6cqw, 2.35rem);
}

body.mode-portrait .stat span {
  color: rgba(255, 255, 255, 0.68);
}

body.mode-portrait .progress-visual {
  gap: 0.65rem;
}

body.mode-portrait .bar-card {
  min-height: 10rem;
}

body.mode-portrait .bar {
  background: #16b8ff;
}

body.mode-portrait .bar.coral {
  background: #f27d67;
}

body.mode-portrait .bar.plum {
  background: #8b7cff;
}

body.mode-portrait .segment-list li,
body.mode-portrait .history-list li,
body.mode-portrait .help-list li {
  border-color: rgba(22, 184, 255, 0.16);
}

body.mode-portrait .segment-list strong,
body.mode-portrait .history-list strong,
body.mode-portrait .help-list strong {
  color: #fff;
}

body.mode-portrait .safety-note {
  color: #fff;
  background: rgba(242, 125, 103, 0.14);
  border-left-color: #f27d67;
}

body.mode-portrait .paused-screen {
  min-height: 100%;
  padding: 1rem;
}

body.mode-portrait .pause-panel {
  width: 100%;
}

body.mode-portrait .empty-state {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(22, 184, 255, 0.2);
}

body.mode-portrait .app-header {
  align-items: center;
}

body.mode-portrait .primary-nav {
  justify-content: center;
  width: 100%;
}

/* Keep all instructor photos visually matched to the preferred player figure size. */
.player-art.asset-portrait,
.poster-art.asset-portrait,
.today-poster-screen .poster-art.asset-portrait,
.detail-poster-screen .poster-art.asset-portrait {
  transform: scale(1.8);
  object-position: center 48%;
}

.player-art.asset-pose1,
.poster-art.asset-pose1,
.today-poster-screen .poster-art.asset-pose1,
.detail-poster-screen .poster-art.asset-pose1 {
  transform: scale(1.3);
  object-position: center 50%;
}

.player-art.asset-pose2,
.poster-art.asset-pose2,
.today-poster-screen .poster-art.asset-pose2,
.detail-poster-screen .poster-art.asset-pose2 {
  transform: scale(1.24);
  object-position: center 50%;
}

.player-art.asset-pose4,
.poster-art.asset-pose4,
.today-poster-screen .poster-art.asset-pose4,
.detail-poster-screen .poster-art.asset-pose4 {
  transform: scale(0.86);
  object-position: center 50%;
}

.player-art.asset-pose5,
.poster-art.asset-pose5,
.today-poster-screen .poster-art.asset-pose5,
.detail-poster-screen .poster-art.asset-pose5 {
  transform: scale(0.88);
  object-position: center center;
}

body.mode-portrait .welcome-image img.asset-pose1 {
  transform: scale(1.3);
  transform-origin: center center;
  object-position: center center;
}

body.mode-portrait .feature-media img.asset-portrait {
  transform: scale(1.1);
  object-position: center 48%;
}

body.mode-portrait .feature-media img.asset-pose1 {
  transform: scale(1.06);
  object-position: center 50%;
}

body.mode-portrait .feature-media img.asset-pose2 {
  transform: scale(1.02);
  object-position: center 50%;
}

body.mode-portrait .feature-media img.asset-pose4,
body.mode-portrait .feature-media img.asset-pose5 {
  transform: scale(1);
  object-position: center center;
}

body.mode-portrait .routine-image.asset-portrait img {
  transform: scale(1.3);
}

body.mode-portrait .routine-image.asset-pose1 img {
  transform: scale(1.26);
}

body.mode-portrait .routine-image.asset-pose2 img {
  transform: scale(1.2);
}

body.mode-portrait .routine-image.asset-pose4 img,
body.mode-portrait .routine-image.asset-pose5 img {
  transform: scale(1);
}
