:root {
  color-scheme: light;
  --ink: #10273e;
  --sub: #435a70;
  --paper: #f4f7f9;
  --line: #d7e1e8;
  --accent: #146759;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 system-ui, sans-serif; }
a { color: var(--accent); text-underline-offset: .16em; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid #188e79; outline-offset: 3px; }
button {
  margin: 0;
  border: 1px solid #a5bac3;
  border-radius: 7px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  font: 650 14px/1.35 system-ui, sans-serif;
  cursor: pointer;
}
button[aria-pressed="true"] { background: #0e584d; border-color: #0e584d; color: #fff; }
[role="group"] { display: flex; gap: 7px; flex-wrap: wrap; }

.hero {
  color: #f4f8fb;
  background: #081a33;
  background-image: linear-gradient(100deg, #081a33 26%, #081a33ad), url("../wave-study.png");
  background-position: center, 85% 50%;
  background-size: cover, auto 100%;
  background-repeat: no-repeat;
  border-bottom: 3px solid #69dfb9;
}
.hero-inner, main { width: min(1120px, 100% - 36px); margin-inline: auto; }
.hero-inner { padding: 22px 0 42px; }
.hero-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.hero-bar span { color: #91ead0; font-size: 13px; font-weight: 750; letter-spacing: .15em; }
.hero-bar div, footer { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.hero-bar a { color: inherit; font-size: 14px; }
h1 { margin: 34px 0 12px; font-size: clamp(33px, 5.4vw, 64px); line-height: 1.08; letter-spacing: -.04em; }
.hero p { max-width: 550px; margin: 0; color: #d8e5ec; }

.links { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.links a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.nav { margin-top: 20px; }
section { margin: 22px 0 0; padding: clamp(16px, 3vw, 30px); border: 1px solid var(--line); border-radius: 12px; background: #fff; scroll-margin-top: 12px; }
h2 { margin: 0 0 10px; font-size: clamp(23px, 3.4vw, 34px); line-height: 1.14; letter-spacing: -.03em; text-wrap: balance; }
p { margin: 0 0 12px; max-width: 80ch; }
.note, figcaption { color: var(--sub); font-size: 14px; }
.note { margin-top: 10px; }
.api { display: inline-block; max-width: 100%; padding: 3px 7px; border-radius: 5px; background: #eef4f7; color: #345875; font-size: 13px; overflow-wrap: anywhere; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 14px; }
figure { min-width: 0; margin: 0; }
figcaption { margin: 7px 0; }
.preview { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.word-original, .word-stage { height: clamp(330px, 36vw, 420px); }
.word-original { object-fit: contain; object-position: center top; background: #f4f7f9; }
.word-stage { display: grid; justify-items: center; background: #edf4f4; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.word-stage iframe { width: 100%; height: 100%; border: 0; background: white; }
.word-stage[data-narrow="true"] iframe { width: min(255px, 92%); }
.switch { margin: 14px 0 8px; }

.media-grid { display: grid; grid-template-columns: 135px minmax(0, 1fr); align-items: center; gap: 15px; padding: 12px; border-radius: 8px; background: #eef4f7; }
.qr { display: block; width: 128px; height: auto; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; image-rendering: pixelated; }
audio, video { display: block; width: 100%; }
audio { max-width: 440px; }
video { height: auto; aspect-ratio: 16 / 9; max-width: 750px; border-radius: 7px; background: #071524; }
footer { padding: 22px 0 36px; font-size: 14px; }

@media (max-width: 720px) {
  .pair, .media-grid { grid-template-columns: minmax(0, 1fr); }
  .word-original { height: auto; max-height: 400px; }
  .media-grid figure { display: flex; align-items: center; gap: 12px; }
  .qr { width: 79px; }
}
