:root {
  color-scheme: dark;
  --ink: #f5f7fb;
  --muted: #9aa5b8;
  --muted-soft: #6f7994;
  --line: rgba(255, 255, 255, 0.1);
  --surface: #0a0e1a;
  --surface-raised: #101628;
  --surface-card: #141b32;
  --accent: #7c5cff;
  --accent-soft: #b9a6ff;
  --accent-glow: rgba(124, 92, 255, 0.32);
  --gold: #f7b23b;
  --green: #64d6aa;
  --red: #ff8a8a;
  --container: 1180px;
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI",
    "Yu Gothic", "Noto Sans JP", sans-serif;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

p,
h1,
h2,
ol,
ul,
dl,
dd {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--surface);
  background: #fff;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

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

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 26, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand img {
  overflow: hidden;
  border-radius: 12px;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.global-nav > a:not(.nav-download) {
  position: relative;
  padding-block: 12px;
  transition: color 0.2s ease;
}

.global-nav > a:not(.nav-download)::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--accent-soft);
  content: "";
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.global-nav > a:not(.nav-download):hover,
.global-nav > a:not(.nav-download):focus-visible,
.global-nav > a.active {
  color: var(--ink);
}

.global-nav > a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-download {
  padding: 12px 20px;
  border-radius: 99px;
  color: var(--surface);
  background: linear-gradient(135deg, var(--accent-soft), #fff);
  box-shadow: 0 10px 26px var(--accent-glow);
  transition: transform 0.2s ease;
}

.nav-download:hover,
.nav-download:focus-visible {
  transform: translateY(-2px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-raised);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 99px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-button[aria-expanded="true"] span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded="true"] span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.eyebrow > span {
  width: 26px;
  height: 2px;
  background: currentColor;
}

.library-hero {
  position: relative;
  overflow: hidden;
  min-height: 570px;
  padding: 188px 0 112px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--surface);
  background-size: 68px 68px;
}

.library-aurora,
.detail-aurora {
  position: absolute;
  z-index: 0;
  top: -430px;
  left: 50%;
  width: 1300px;
  height: 950px;
  background:
    radial-gradient(circle at 33% 45%, rgba(124, 92, 255, 0.35), transparent 42%),
    radial-gradient(circle at 70% 42%, rgba(247, 178, 59, 0.14), transparent 36%);
  transform: translateX(-50%);
  pointer-events: none;
}

.library-hero-inner {
  position: relative;
  z-index: 1;
}

.library-hero h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(46px, 6vw, 76px);
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: -0.055em;
}

.library-hero h1 span {
  background: linear-gradient(115deg, var(--accent-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.library-lead {
  max-width: 640px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-search-link {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(185, 166, 255, 0.5);
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.hero-search-link span {
  color: var(--accent-soft);
  transition: transform 0.2s ease;
}

.hero-search-link:hover span,
.hero-search-link:focus-visible span {
  transform: translateY(3px);
}

.exercise-library {
  padding: 108px 0 128px;
  background: var(--surface-raised);
}

.library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 44px;
}

.library-heading h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.045em;
}

.library-heading > p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
  color: var(--muted-soft);
}

.library-heading > p strong {
  color: var(--ink);
  font-size: 34px;
  letter-spacing: -0.04em;
}

.library-heading > p span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(20, 27, 50, 0.86);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.18);
}

.filter-panel label {
  min-width: 0;
}

.field-label {
  display: block;
  margin: 0 0 9px 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.search-input-wrap {
  position: relative;
  display: block;
}

.search-input-wrap svg {
  position: absolute;
  top: 50%;
  left: 17px;
  width: 19px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
  pointer-events: none;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background-color: #0d1324;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input {
  padding: 0 15px 0 48px;
}

.filter-panel input::placeholder {
  color: #657087;
}

.filter-panel select {
  padding: 0 36px 0 14px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 23px,
    calc(100% - 13px) 23px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  appearance: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}

.filter-reset {
  height: 52px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-reset:hover,
.filter-reset:focus-visible {
  border-color: var(--accent-soft);
  color: var(--ink);
  background: rgba(124, 92, 255, 0.08);
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.result-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.result-toolbar p:first-child {
  color: var(--ink);
  font-weight: 750;
}

.preview-hint {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-hint span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(100, 214, 170, 0.6);
}

.exercise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.exercise-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  content-visibility: auto;
  contain-intrinsic-size: 430px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.exercise-card:hover,
.exercise-card:focus-within {
  border-color: rgba(185, 166, 255, 0.45);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
  transform: translateY(-5px);
}

.exercise-card-link {
  display: block;
  height: 100%;
}

.exercise-card-link:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: -3px;
}

.exercise-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 50% 40%, rgba(124, 92, 255, 0.2), transparent 50%),
    #080c16;
}

.exercise-card-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease, filter 0.25s ease;
}

.exercise-card:hover .exercise-card-media video,
.exercise-card:focus-within .exercise-card-media video {
  transform: scale(1.025);
}

.exercise-card-media::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(7, 10, 19, 0.48));
  content: "";
  pointer-events: none;
}

.exercise-card-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.48);
  opacity: 0;
  transform: translate(-50%, -46%);
  backdrop-filter: blur(8px);
  place-items: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.exercise-card-play span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #fff;
}

.exercise-card:hover .exercise-card-play,
.exercise-card:focus-within .exercise-card-play {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.exercise-card-level,
.level-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
}

.exercise-card-level {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(10, 14, 26, 0.76);
  backdrop-filter: blur(8px);
}

.exercise-card-level::before,
.level-pill::before {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.level-intermediate::before {
  background: var(--gold);
}

.level-advanced::before {
  background: var(--red);
}

.exercise-card-body {
  padding: 23px 24px 24px;
}

.exercise-card-kicker {
  margin-bottom: 8px;
  color: var(--accent-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.exercise-card h2 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.025em;
}

.exercise-card-description {
  display: -webkit-box;
  min-height: 47px;
  margin-bottom: 18px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.exercise-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.exercise-card-meta span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.empty-state {
  padding: 80px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 18px;
  color: var(--accent-soft);
  background: rgba(124, 92, 255, 0.14);
  font-size: 28px;
  place-items: center;
}

.empty-state h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.empty-state p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state button,
.load-more {
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-card);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.load-more-wrap {
  margin-top: 44px;
  text-align: center;
}

.load-more {
  min-width: 180px;
  padding: 15px 24px;
  border-color: rgba(185, 166, 255, 0.4);
  background: rgba(124, 92, 255, 0.1);
  transition: background 0.2s ease, transform 0.2s ease;
}

.load-more:hover,
.load-more:focus-visible {
  background: rgba(124, 92, 255, 0.2);
  transform: translateY(-2px);
}

.load-more span {
  margin-left: 10px;
  color: var(--accent-soft);
}

.site-footer {
  padding: 46px 0;
  color: var(--muted-soft);
  background: #060911;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 32px;
}

.footer-brand {
  color: var(--ink);
  font-size: 17px;
}

.footer-brand img {
  border-radius: 10px;
}

.footer-inner > p {
  margin: 0;
  font-size: 11px;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 11px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
}

.footer-inner > small {
  font-size: 10px;
  white-space: nowrap;
}

/* Detail page */
.detail-page main {
  position: relative;
  overflow: hidden;
}

.detail-aurora {
  top: -300px;
  height: 850px;
  opacity: 0.72;
}

.exercise-detail {
  position: relative;
  z-index: 1;
  padding: 122px 0 110px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 36px;
  color: var(--muted-soft);
  font-size: 11px;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--accent-soft);
}

.breadcrumbs span:last-child {
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(42px, 6vw, 76px);
}

.detail-video-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #070b14;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.42);
  width: min(100%, 430px);
  justify-self: center;
}

.detail-video-wrap.video-landscape {
  width: min(100%, 690px);
}

.detail-video-wrap video {
  width: 100%;
  object-fit: contain;
}

.video-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  background: rgba(10, 14, 26, 0.65);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.detail-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
}

.detail-labels > a,
.body-part-list a {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.detail-labels > a:hover,
.detail-labels > a:focus-visible,
.body-part-list a:hover,
.body-part-list a:focus-visible {
  border-color: var(--accent-soft);
  color: var(--ink);
}

.level-pill {
  padding: 8px 12px;
  color: var(--ink);
  background: rgba(100, 214, 170, 0.13);
}

.level-pill.level-intermediate {
  background: rgba(247, 178, 59, 0.12);
}

.level-pill.level-advanced {
  background: rgba(255, 138, 138, 0.12);
}

.detail-intro h1 {
  margin-bottom: 20px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.25;
  letter-spacing: -0.055em;
}

.detail-description {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.95;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
  padding: 21px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-facts > div {
  min-width: 0;
  padding: 0 15px;
  border-right: 1px solid var(--line);
}

.detail-facts > div:first-child {
  padding-left: 0;
}

.detail-facts > div:last-child {
  padding-right: 0;
  border: 0;
}

.detail-facts dt {
  margin-bottom: 7px;
  color: var(--muted-soft);
  font-size: 9px;
  font-weight: 700;
}

.detail-facts dd {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.body-part-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opposite-video {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.opposite-video summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 18px 24px;
  list-style: none;
  cursor: pointer;
}

.opposite-video summary::-webkit-details-marker {
  display: none;
}

.opposite-video summary > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 750;
}

.opposite-video summary small {
  color: var(--accent-soft);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.details-plus {
  position: relative;
  width: 20px;
  height: 20px;
}

.details-plus::before,
.details-plus::after {
  position: absolute;
  top: 9px;
  right: 2px;
  left: 2px;
  height: 1px;
  background: var(--muted);
  content: "";
  transition: transform 0.2s ease;
}

.details-plus::after {
  transform: rotate(90deg);
}

.opposite-video[open] .details-plus::after {
  transform: rotate(0);
}

.opposite-video > div {
  padding: 0 24px 24px;
}

.opposite-video video {
  width: min(100%, 640px);
  margin-inline: auto;
  border-radius: 18px;
  background: #060911;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.72fr);
  gap: 28px;
  margin-top: 80px;
}

.guide-main,
.guide-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.guide-section {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: clamp(28px, 5vw, 50px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--surface-card), var(--surface-raised));
}

.section-number {
  margin: 1px 0 0;
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--accent-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.guide-section h2,
.guide-side h2 {
  margin-bottom: 18px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.guide-section > div > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tips-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
}

.tips-list li > span {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: var(--accent-soft);
  background: rgba(124, 92, 255, 0.14);
  font-size: 12px;
  font-weight: 800;
  place-items: center;
}

.tips-list p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.purpose-card,
.caution-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

.purpose-card ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.purpose-card li {
  position: relative;
  padding-left: 19px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.purpose-card li::before {
  position: absolute;
  top: 8px;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-soft);
  content: "";
}

.caution-card {
  border-color: rgba(247, 178, 59, 0.22);
  background: linear-gradient(150deg, rgba(247, 178, 59, 0.08), var(--surface-card));
}

.caution-card .section-kicker {
  color: var(--gold);
}

.caution-card > p:not(.section-kicker) {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.caution-card small {
  display: block;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-soft);
  font-size: 10px;
  line-height: 1.7;
}

.related-section {
  padding: 100px 0 120px;
  background: var(--surface-raised);
}

.related-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}

.related-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.related-heading > a {
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(185, 166, 255, 0.4);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.related-heading > a span {
  margin-left: 10px;
  color: var(--accent-soft);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.exercise-card-compact .exercise-card-body {
  padding: 18px;
}

.exercise-card-compact h2 {
  font-size: 16px;
}

.exercise-card-compact .exercise-card-media {
  aspect-ratio: 4 / 5;
}

.not-found {
  min-height: calc(100vh - 196px);
  padding-top: 210px;
  padding-bottom: 110px;
}

.not-found h1 {
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 70px);
  line-height: 1.25;
  letter-spacing: -0.05em;
}

.not-found > p:not(.eyebrow) {
  max-width: 540px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.back-button {
  display: inline-flex;
  padding: 15px 22px;
  border-radius: 13px;
  color: var(--surface);
  background: linear-gradient(135deg, #fff, var(--accent-soft));
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1050px) {
  .filter-panel {
    grid-template-columns: 2fr repeat(3, 1fr);
  }

  .filter-reset {
    grid-column: 1 / -1;
    width: max-content;
    height: auto;
    padding: 8px 2px;
    border: 0;
  }

  .detail-hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.8fr);
    gap: 38px;
  }

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

@media (max-width: 860px) {
  .menu-button {
    display: block;
  }

  .global-nav {
    position: fixed;
    top: 82px;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    border-bottom: 1px solid transparent;
    background: rgba(10, 14, 26, 0.98);
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
  }

  .global-nav.open {
    max-height: 330px;
    padding-top: 18px;
    padding-bottom: 24px;
    border-color: var(--line);
    opacity: 1;
    visibility: visible;
  }

  .global-nav > a:not(.nav-download) {
    padding: 13px 4px;
  }

  .global-nav > a:not(.nav-download)::after {
    display: none;
  }

  .nav-download {
    margin-top: 8px;
    text-align: center;
  }

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

  .filter-panel {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .detail-hero,
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .detail-intro {
    max-width: 680px;
  }

  .guide-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: auto 1fr auto;
  }

  .footer-inner > p {
    display: none;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .header-inner {
    height: 72px;
  }

  .brand {
    font-size: 18px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .global-nav {
    top: 72px;
  }

  .library-hero {
    min-height: 520px;
    padding: 155px 0 84px;
    background-size: 52px 52px;
  }

  .library-hero h1 {
    font-size: clamp(39px, 12vw, 54px);
  }

  .library-lead {
    font-size: 14px;
  }

  .exercise-library {
    padding: 78px 0 90px;
  }

  .library-heading {
    align-items: flex-start;
    margin-bottom: 30px;
  }

  .library-heading > p {
    display: none;
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
    gap: 13px 10px;
    padding: 16px;
  }

  .filter-panel label:nth-of-type(4) {
    grid-column: 1 / -1;
  }

  .filter-reset {
    grid-column: 1 / -1;
  }

  .result-toolbar {
    margin-bottom: 18px;
  }

  .preview-hint {
    display: none !important;
  }

  .exercise-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .exercise-card-body {
    padding: 20px;
  }

  .exercise-card h2 {
    font-size: 19px;
  }

  .exercise-card-description {
    min-height: auto;
  }

  .footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 22px;
  }

  .footer-links {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
  }

  .exercise-detail {
    padding: 101px 0 80px;
  }

  .breadcrumbs {
    margin-bottom: 24px;
    overflow: hidden;
    white-space: nowrap;
  }

  .breadcrumbs span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .detail-hero {
    gap: 32px;
  }

  .detail-video-wrap {
    border-radius: var(--radius-md);
  }

  .detail-intro h1 {
    font-size: 38px;
  }

  .detail-description {
    font-size: 14px;
  }

  .detail-facts {
    grid-template-columns: 1fr 1fr;
    gap: 18px 0;
  }

  .detail-facts > div:nth-child(2) {
    border: 0;
  }

  .detail-facts > div:last-child {
    grid-column: 1 / -1;
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
  }

  .guide-layout {
    margin-top: 52px;
  }

  .guide-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 27px 24px;
    border-radius: var(--radius-md);
  }

  .guide-side {
    display: flex;
  }

  .related-section {
    padding: 75px 0 90px;
  }

  .related-heading {
    align-items: flex-start;
  }

  .related-heading > a {
    display: none;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
