/* Hallmark · macrostructure: Photographic · tone: soft · anchor hue: clear blue */
@import url("tokens.css?v=0.2.014-20261011");

:root {
  --ink: #102b4b;
  --muted: #65809a;
  --primary: #1f74d4;
  --primary-dark: #1459a8;
  --blue: #45a5ff;
  --aqua: #42d4e2;
  --cream: #eef8ff;
  --video-blue: #36aee7;
  --video-blue-soft: #dff7ff;
  --paper: #ffffff;
  --soft-paper: #f8fdff;
  --line: #d9eaf7;
  --video-matte: var(--video-blue);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  min-height: -webkit-fill-available;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: -webkit-fill-available;
  background: linear-gradient(180deg, #f9fdff 0%, var(--cream) 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  opacity: .7;
  cursor: wait;
  transform: none !important;
  box-shadow: none !important;
}

.app {
  --page-pad-x: 20px;
  --page-pad-top: 20px;
  --page-pad-bottom: 28px;
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100svh;
  min-height: 100dvh;
  margin: auto;
  padding: var(--page-pad-top) var(--page-pad-x) max(var(--page-pad-bottom), env(safe-area-inset-bottom));
  overflow-x: clip;
  overflow-y: visible;
}

.version-chip {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 3;
  max-width: calc(100% - 112px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
}

.version-chip span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changelog-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
}

.version-chip:focus-visible,
.home-team-link:focus-visible {
  outline: 2px solid rgba(31, 116, 212, .35);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

.home-team-link {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.home-page {
  min-height: calc(100dvh - var(--page-pad-top) - var(--page-pad-bottom));
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.home-center {
  position: relative;
  grid-row: 2;
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-areas:
    "hero"
    "media"
    "tip";
  grid-template-rows: auto auto auto;
  gap: clamp(14px, 2.2svh, 22px);
  justify-content: center;
  justify-items: center;
  align-content: center;
  padding: clamp(8px, 2svh, 20px) 0 clamp(14px, 3svh, 28px);
}

.hero {
  grid-area: hero;
  width: min(100%, 360px);
  padding: 0;
}

.brand-title {
  display: block;
  width: min(100%, 360px);
  margin: 0 auto 8px;
  line-height: 0;
}

.brand-title img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-subtitle {
  max-width: 330px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.headphone-tip {
  grid-area: tip;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.howto-image {
  grid-area: media;
  display: block;
  width: min(100%, 444px);
  height: auto;
  aspect-ratio: 768 / 414;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: #25b7d0;
  box-shadow: none;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(16, 43, 75, .08);
}

.home-card {
  grid-row: 3;
  width: 100%;
  align-self: end;
  margin-top: 0;
  padding: 0 0 2px;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.home-card .primary {
  margin-top: 0;
  margin-bottom: 0;
}

.primary,
.primary-button {
  width: 100%;
  margin-top: 10px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 3px 0 var(--primary-dark);
}

.primary:active,
.primary-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--primary-dark);
}

.share,
.secondary-button {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #304d68;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(16, 43, 75, .05);
}

.share:active,
.secondary-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(16, 43, 75, .05);
}

.home-card .secondary-button {
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  box-shadow: none;
}

.home-card .secondary-button:active {
  background: #eaf3fb;
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.studio-link {
  grid-row: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration-color: rgba(101, 128, 154, .48);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.studio-link-favicon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}

.studio-link-arrow {
  flex: 0 0 auto;
  line-height: 1;
}

.studio-link:active {
  color: var(--ink);
}

.back-link {
  display: block;
  width: fit-content;
  margin: 0 0 24px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.play-page {
  --page-pad-x: 0;
  --page-pad-top: 0;
  --page-pad-bottom: 0;
  display: grid;
  grid-template-rows: 52px auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: clamp(8px, 1.4svh, 14px);
  padding: max(18px, env(safe-area-inset-top)) 0 max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 45%, rgba(54, 174, 231, .74) 0%, rgba(101, 202, 242, .58) 34%, rgba(223, 247, 255, .84) 68%, rgba(248, 253, 255, 1) 100%),
    linear-gradient(180deg, #f8fdff 0%, var(--video-blue-soft) 22%, #78cdf1 49%, var(--video-blue-soft) 78%, #f8fdff 100%);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.play-page .version-chip,
.play-page .home-team-link {
  color: rgba(6, 58, 97, .78);
}

.play-page:focus {
  outline: none;
}

.instruction-panel {
  position: relative;
  grid-row: 2;
  z-index: 3;
  width: min(100% - 36px, 420px);
  min-height: clamp(58px, 10svh, 84px);
  margin: 0 auto;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 0 14px;
  transform: translateY(clamp(16px, 4svh, 30px));
  pointer-events: none;
}

.instruction-text {
  --caption-size: clamp(20px, min(6vw, 4.2svh), 32px);
  width: 100%;
  min-height: 2.2em;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: #063a61;
  font-size: var(--caption-size);
  font-weight: 900;
  line-height: 1.28;
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .36);
  overflow-wrap: anywhere;
}

.video-panel {
  position: relative;
  grid-row: 3;
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  align-self: stretch;
  padding: 0;
  transform: translateY(clamp(-42px, -5svh, -26px));
}

.video-panel::before {
  content: "";
  position: absolute;
  inset: 18% 7%;
  z-index: 0;
  background:
    radial-gradient(ellipse at center, rgba(54, 174, 231, .32), rgba(126, 219, 255, .12) 54%, rgba(248, 253, 255, 0) 76%);
  filter: blur(28px);
  opacity: .56;
  pointer-events: none;
}

.video-window {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 20px), 460px);
  aspect-ratio: 95 / 51;
  display: grid;
  place-items: center;
  overflow: visible;
  background: transparent;
  isolation: isolate;
}

.video-crop {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--video-matte);
  box-shadow: 0 12px 30px rgba(3, 75, 116, .12);
}

.training-video {
  display: block;
  width: 100%;
  height: 100%;
  transform: none;
  transform-origin: center;
  object-fit: cover;
}

.play-glyph {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(232, 247, 255, .92);
  box-shadow: 0 12px 28px rgba(16, 43, 75, .14);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.play-glyph::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid var(--ink);
}

.play-page[data-playing="true"] .play-glyph {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.92);
}

.control-row {
  grid-row: 4;
  width: min(100% - 36px, 360px);
  margin: 0 auto;
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.control-row .secondary-button {
  margin-top: 0;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 9px 10px;
  border: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(16, 43, 75, .08);
}

.control-row .play-control {
  background: #1f74d4;
  color: #fff;
  box-shadow: 0 3px 10px rgba(20, 89, 168, .2);
}

.control-row .home-control {
  background: #e8fbff;
  color: #0b7891;
  box-shadow: 0 3px 10px rgba(11, 120, 145, .12);
}

.control-row .replay-control {
  background: #fff6df;
  color: #8b5b00;
  box-shadow: 0 3px 10px rgba(139, 91, 0, .12);
}

.control-row .play-control:active,
.control-row .home-control:active,
.control-row .replay-control:active {
  transform: translateY(1px);
  box-shadow: 0 1px 5px rgba(16, 43, 75, .1);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 43, 75, .46);
}

.modal-card {
  position: relative;
  width: min(100%, 430px);
  max-height: min(78vh, 620px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 43, 75, .16);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid #e8f2fb;
}

.modal-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.modal-head b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 17px;
}

.modal-head button {
  width: 32px;
  height: 32px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.changelog-list {
  max-height: calc(min(78vh, 620px) - 70px);
  overflow: auto;
  padding: 4px 16px 16px;
}
.feedback-form { display:grid; gap:12px; padding:4px 16px 16px; }
.feedback-form textarea { width:100%; resize:vertical; padding:12px; border:1px solid #dbeaf6; border-radius:7px; color:var(--ink); font:inherit; line-height:1.55; }

.changelog-item {
  padding: 18px 0;
  border-bottom: 1px solid #e8f2fb;
}

.changelog-item:last-child {
  border-bottom: 0;
}

.changelog-version-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.changelog-version-head b {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.changelog-version-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px 8px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.changelog-status {
  color: #17658f;
  font-weight: 800;
}

.changelog-group + .changelog-group {
  margin-top: 14px;
}

.changelog-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.changelog-group-title small {
  min-width: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.changelog-entries {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.changelog-empty,
.changelog-source,
.changelog-loading,
.changelog-error {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.changelog-empty {
  color: #8799a9;
}

.changelog-source {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #dceaf4;
  font-size: 11px;
}

.changelog-loading,
.changelog-error {
  padding: 20px 0 8px;
  text-align: center;
}

.changelog-error {
  color: #9a3d4b;
}

.team-page {
  padding-top: 32px;
}

.team-panel {
  margin-top: 38px;
}

.team-panel h1 {
  margin: 10px 0 22px;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
}

.team-list {
  display: grid;
  gap: 12px;
}

.team-list div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 43, 75, .05);
}

.team-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.team-list b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

[hidden] {
  display: none !important;
}

button:focus-visible, a:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 380px) {
  .app {
    --page-pad-x: 16px;
  }

  .version-chip {
    left: 16px;
  }

  .home-team-link {
    right: 16px;
  }

  .home-center {
    gap: 12px;
    padding-bottom: 16px;
  }

  .brand-title {
    width: min(100%, 330px);
  }

  .howto-image {
    width: 100%;
  }

  .card {
    padding: 14px;
  }

  .primary,
  .primary-button {
    padding: 12px;
  }
}

@media (max-width: 520px) and (max-height: 760px) {
  .app {
    --page-pad-top: 16px;
    --page-pad-bottom: 24px;
  }

  .version-chip {
    top: 16px;
    left: 16px;
    gap: 6px;
    font-size: 12px;
  }

  .home-team-link {
    top: 16px;
    right: 16px;
    height: 28px;
    font-size: 12px;
  }

  .changelog-icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .home-center {
    gap: 10px;
    padding: 4px 0 12px;
  }

  .hero-subtitle {
    font-size: 13px;
    line-height: 1.36;
  }

  .howto-image {
    width: 100%;
  }

  .card {
    padding: 14px;
  }

  .primary,
  .primary-button {
    margin-top: 8px;
    padding: 12px;
  }

  .play-page {
    grid-template-rows: 46px auto minmax(0, 1fr) auto;
    gap: 8px;
  }

  .instruction-panel {
    min-height: clamp(48px, 9svh, 64px);
    padding: 0 12px;
  }

  .instruction-text {
    --caption-size: clamp(19px, min(5.8vw, 4svh), 30px);
    padding: 0 14px;
  }
}

@media (max-width: 520px) and (max-height: 660px) {
  .app {
    --page-pad-top: 12px;
    --page-pad-bottom: 18px;
  }

  .home-center {
    gap: 8px;
    padding: 2px 0 8px;
  }

  .hero-subtitle {
    font-size: 12px;
    line-height: 1.32;
  }

  .howto-image {
    width: 100%;
  }

  .card {
    padding: 12px;
  }

  .primary,
  .primary-button {
    padding: 11px;
    border-radius: 10px;
  }
}
