:root {
  --green-950: #071c16;
  --green-900: #0d3328;
  --green-800: #184838;
  --green-700: #28634b;
  --cream: #f4edda;
  --cream-2: #ebe0c5;
  --paper: #fcf8ee;
  --ink: #10271f;
  --muted: #5d6e63;
  --brass: #c69a4b;
  --brass-light: #e4c276;
  --line: rgba(24, 72, 56, 0.22);
  --shadow: 0 24px 70px rgba(7, 28, 22, 0.16);
  --serif: Georgia, 'Times New Roman', 'Hiragino Mincho ProN', serif;
  --sans: Inter, 'Avenir Next', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(13, 51, 40, 0.04) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.85rem;
  color: var(--cream);
  background: var(--green-950);
  transform: translateY(-160%);
}

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

.site-header {
  position: relative;
  z-index: 3;
  color: var(--cream);
  background: var(--green-900);
}

.header-inner,
.section,
.site-footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--cream);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  color: var(--green-950);
  background: var(--brass);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.96rem;
  letter-spacing: -0.1em;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  color: rgba(244, 237, 218, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--brass-light);
}

.hero {
  position: relative;
  display: grid;
  width: 100%;
  min-height: min(690px, calc(100vh - 74px));
  grid-template-columns: minmax(320px, 0.9fr) minmax(500px, 1.1fr);
  color: var(--cream);
  background: var(--green-900);
  overflow: hidden;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--brass);
  content: '';
  opacity: 0.65;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(630px, 100%);
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 8vw, 8rem) clamp(24px, 7vw, 110px);
  padding-right: clamp(24px, 4vw, 72px);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--brass);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
}

.eyebrow-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.55rem;
  background: var(--brass);
  border-radius: 50%;
  vertical-align: 0.03em;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 570px;
  margin-bottom: 1.55rem;
  font-size: clamp(3.25rem, 7vw, 6.55rem);
  line-height: 0.99;
}

h1 em {
  color: var(--brass-light);
  font-style: normal;
}

.hero-lead {
  max-width: 450px;
  margin-bottom: 1.6rem;
  color: rgba(244, 237, 218, 0.77);
  font-size: 0.98rem;
  line-height: 2;
}

.hero-example {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 0.68rem 0.9rem;
  border: 1px solid rgba(198, 154, 75, 0.45);
  border-left: 3px solid var(--brass);
  color: var(--cream);
  background: rgba(7, 28, 22, 0.25);
}

.example-label {
  color: var(--brass-light);
  font-size: 0.67rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-example strong {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 400;
}

.example-arrow {
  color: var(--brass);
}

.hero-example code,
.morse-large,
.output-footer code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  letter-spacing: 0.12em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.45rem;
  margin-top: 2.1rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover:not(:disabled),
.button:focus-visible:not(:disabled) {
  transform: translateY(-2px);
}

.button:disabled,
.transport-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.button-primary {
  color: var(--green-950);
  background: var(--brass);
}

.button-primary:hover:not(:disabled),
.button-primary:focus-visible:not(:disabled) {
  background: var(--brass-light);
}

.button-brass {
  color: var(--green-950);
  background: var(--brass);
}

.button-brass:hover:not(:disabled),
.button-brass:focus-visible:not(:disabled) {
  background: var(--brass-light);
}

.button-quiet {
  color: var(--green-800);
  background: transparent;
  border-color: var(--line);
}

.button-quiet:hover:not(:disabled),
.button-quiet:focus-visible:not(:disabled) {
  color: var(--green-950);
  border-color: var(--brass);
}

.text-link {
  color: var(--cream-2);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--brass-light);
}

.hero-art {
  position: relative;
  min-height: 550px;
  isolation: isolate;
  overflow: hidden;
}

.hero-art::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, var(--green-900) 0%, rgba(13, 51, 40, 0.18) 28%, transparent 65%), linear-gradient(0deg, rgba(13, 51, 40, 0.3), transparent 46%);
  content: '';
  pointer-events: none;
}

.hero-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 60% center;
}

.hero-art-note {
  position: absolute;
  z-index: 2;
  right: clamp(18px, 4vw, 62px);
  bottom: clamp(20px, 6vw, 78px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(244, 237, 218, 0.82);
  font-size: 0.67rem;
  letter-spacing: 0.13em;
  line-height: 1.65;
  text-transform: uppercase;
}

.hero-art-note span:first-child {
  color: var(--brass-light);
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: 0;
}

.hero-art-wave {
  position: absolute;
  z-index: 2;
  top: 20%;
  right: -3%;
  left: 4%;
  display: flex;
  height: 4.2rem;
  align-items: center;
  gap: 1.3rem;
  opacity: 0.75;
  transform: rotate(-2deg);
}

.hero-art-wave::before,
.hero-art-wave::after {
  display: block;
  width: 22%;
  height: 1px;
  background: var(--brass-light);
  box-shadow: 0 0 14px var(--brass-light);
  content: '';
}

.hero-art-wave i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brass-light);
  box-shadow: 0 0 12px var(--brass-light);
}

.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
}

.heading-with-rule {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.35rem;
}

.heading-with-rule h2 {
  margin: 0;
  color: var(--green-900);
  font-size: clamp(2.35rem, 4.5vw, 4.4rem);
  line-height: 1;
}

.heading-with-rule > p {
  max-width: 355px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.85;
}

.settings-panel {
  display: grid;
  margin-top: 2rem;
  grid-template-columns: 1.2fr repeat(3, minmax(125px, 0.75fr)) 1.15fr auto;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.setting-block {
  min-width: 0;
  min-height: 130px;
  padding: 1.2rem;
  background: var(--paper);
}

.setting-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--green-800);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

output {
  color: var(--brass);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.segmented-control,
.mode-control {
  display: flex;
  min-height: 44px;
  align-items: stretch;
}

.segmented-control label,
.mode-control label {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.75rem;
  text-align: center;
}

.segmented-control label + label,
.mode-control label + label {
  border-left: 0;
}

.segmented-control input,
.mode-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-control label:has(input:checked),
.mode-control label:has(input:checked) {
  color: var(--cream);
  background: var(--green-800);
  border-color: var(--green-800);
}

.segmented-control label:has(input:focus-visible),
.mode-control label:has(input:focus-visible) {
  outline: 2px solid var(--brass);
  outline-offset: -2px;
}

input[type='range'] {
  width: 100%;
  min-height: 44px;
  accent-color: var(--brass);
  cursor: pointer;
}

.range-hint {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.63rem;
}

.field-note {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.setting-submit {
  align-self: stretch;
  min-width: 132px;
  margin: 0.75rem;
}

.practice-layout {
  display: grid;
  margin-top: 3.4rem;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.72fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: start;
}

.practice-card {
  position: relative;
  min-width: 0;
  background: var(--green-900);
  box-shadow: var(--shadow);
  color: var(--cream);
}

.practice-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: var(--brass);
  content: '';
}

.card-topline {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1.35rem;
  border-bottom: 1px solid rgba(244, 237, 218, 0.16);
  color: rgba(244, 237, 218, 0.7);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.status-marker {
  width: 0.52rem;
  height: 0.52rem;
  flex: 0 0 auto;
  background: var(--brass);
  border-radius: 50%;
}

.challenge-number {
  margin-left: auto;
  color: var(--brass-light);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.65rem;
}

.challenge-stage {
  min-height: 312px;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.35rem, 5vw, 4.5rem) 2rem;
  background:
    linear-gradient(90deg, rgba(244, 237, 218, 0.06) 1px, transparent 1px) 0 0 / 35px 100%,
    linear-gradient(rgba(244, 237, 218, 0.045) 1px, transparent 1px) 0 0 / 100% 35px;
}

.stage-label {
  margin-bottom: 1.2rem;
  color: var(--brass-light);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
}

.challenge-stage h3 {
  max-width: 520px;
  margin-bottom: 0.8rem;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.05;
}

.stage-instruction {
  max-width: 400px;
  margin-bottom: 1.55rem;
  color: rgba(244, 237, 218, 0.66);
  font-size: 0.86rem;
}

.timeline {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 0.42rem;
  overflow-x: auto;
  scrollbar-color: var(--brass) transparent;
}

.timeline-placeholder {
  color: rgba(244, 237, 218, 0.42);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
}

.timeline-tone,
.timeline-gap {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 9px;
  align-items: center;
  justify-content: center;
}

.timeline-tone {
  height: 34px;
  background: var(--brass-light);
  box-shadow: 0 0 16px rgba(228, 194, 118, 0.22);
}

.timeline-tone[data-kind='dot'] {
  width: 15px;
  border-radius: 50%;
}

.timeline-tone[data-kind='dash'] {
  width: 42px;
  border-radius: 3px;
}

.timeline-gap {
  height: 2px;
  background: rgba(244, 237, 218, 0.48);
}

.timeline-gap[data-gap='element'] {
  width: 12px;
}

.timeline-gap[data-gap='letter'] {
  width: 28px;
  margin-inline: 0.2rem;
  background: var(--brass);
}

.timeline-gap[data-gap='word'] {
  width: 55px;
  margin-inline: 0.35rem;
  background: rgba(244, 237, 218, 0.3);
}

.transport-controls {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.35rem;
  border-top: 1px solid rgba(244, 237, 218, 0.16);
}

.transport-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(244, 237, 218, 0.3);
  border-radius: 0;
  color: var(--cream);
  background: transparent;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
}

.transport-play {
  min-width: 132px;
  color: var(--green-950);
  background: var(--brass);
  border-color: var(--brass);
}

.transport-button:hover:not(:disabled),
.transport-button:focus-visible:not(:disabled) {
  border-color: var(--brass-light);
}

.transport-icon {
  color: var(--brass-light);
  font-size: 0.7rem;
}

.transport-play .transport-icon {
  color: var(--green-950);
}

.answer-area {
  padding: 1.25rem 1.35rem 1.5rem;
  border-top: 1px solid rgba(244, 237, 218, 0.16);
}

.answer-area > label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--cream-2);
  font-size: 0.73rem;
  font-weight: 700;
}

.answer-row {
  display: flex;
  gap: 0.6rem;
}

.answer-row input,
.converter-input-wrap textarea {
  min-height: 48px;
  border: 1px solid rgba(244, 237, 218, 0.38);
  border-radius: 0;
  color: var(--cream);
  background: rgba(7, 28, 22, 0.34);
  outline: 0;
  font-size: 1rem;
}

.answer-row input {
  min-width: 0;
  flex: 1;
  padding: 0.55rem 0.75rem;
}

.answer-row input:focus,
.converter-input-wrap textarea:focus {
  border-color: var(--brass-light);
  box-shadow: 0 0 0 2px rgba(228, 194, 118, 0.2);
}

.answer-row input::placeholder,
.converter-input-wrap textarea::placeholder {
  color: rgba(244, 237, 218, 0.4);
}

.field-message {
  min-height: 1.4em;
  margin: 0.45rem 0 0;
  color: var(--brass-light);
  font-size: 0.73rem;
}

.result-panel {
  padding: 1.35rem;
  border-top: 1px solid rgba(244, 237, 218, 0.16);
  background: rgba(7, 28, 22, 0.28);
}

.result-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.result-heading .eyebrow {
  margin: 0;
}

.result-heading h3 {
  margin: 0;
  color: var(--brass-light);
  font-size: 1.8rem;
}

.comparison-list {
  display: grid;
  margin: 1rem 0 1.3rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.comparison-list div {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid rgba(244, 237, 218, 0.17);
}

.comparison-list dt {
  color: rgba(244, 237, 218, 0.56);
  font-size: 0.63rem;
  letter-spacing: 0.08em;
}

.comparison-list dd {
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.comparison-list .morse-large {
  color: var(--brass-light);
  font-size: 0.82rem;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.practice-aside {
  min-width: 0;
}

.aside-note {
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--line);
}

.aside-note h3 {
  margin-bottom: 0.85rem;
  color: var(--green-900);
  font-size: clamp(2.3rem, 4vw, 3.7rem);
  line-height: 1;
}

.aside-note p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.85;
}

.timing-key {
  display: grid;
  margin-block: 1.4rem 2.2rem;
  gap: 0.85rem;
}

.timing-row {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.timing-row b {
  color: var(--green-900);
  font-family: 'SFMono-Regular', Consolas, monospace;
}

.timing-symbol {
  display: inline-block;
  width: 42px;
  flex: 0 0 auto;
  background: var(--green-800);
}

.timing-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.timing-dash {
  height: 13px;
  border-radius: 3px;
}

.timing-gap {
  height: 2px;
  background: var(--brass);
}

.timing-gap-letter {
  width: 27px;
}

.timing-gap-word {
  width: 42px;
  background: var(--muted);
}

.weak-list-box {
  padding: 1.05rem 1rem;
  border: 1px solid var(--line);
  background: rgba(235, 224, 197, 0.36);
}

.weak-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--green-900);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.weak-list-heading strong {
  display: inline-grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  color: var(--cream);
  background: var(--green-800);
  border-radius: 50%;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.7rem;
}

.weak-list-empty,
.weak-list-values {
  min-height: 1.5em;
  margin: 0.8rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.weak-list-values {
  color: var(--green-900);
  font-family: 'SFMono-Regular', Consolas, monospace;
  letter-spacing: 0.18em;
}

.text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.35rem 0;
  border: 0;
  color: var(--green-700);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--green-950);
}

.storage-notice {
  margin: 0.8rem 0 0;
  color: #8b5a1e;
  font-size: 0.73rem;
  line-height: 1.5;
}

.converter-section {
  color: var(--cream);
  background: var(--green-800);
}

.converter-section .heading-with-rule {
  border-color: rgba(244, 237, 218, 0.23);
}

.converter-section .heading-with-rule h2 {
  color: var(--cream);
}

.converter-section .heading-with-rule > p {
  color: rgba(244, 237, 218, 0.68);
}

.converter-grid {
  display: grid;
  margin-top: 2.8rem;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(1.6rem, 5vw, 5rem);
}

.converter-input-wrap label {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--cream-2);
  font-size: 0.77rem;
  font-weight: 700;
}

.converter-input-wrap textarea {
  display: block;
  width: 100%;
  min-height: 150px;
  padding: 1rem;
  resize: vertical;
  line-height: 1.7;
}

.input-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.input-meta .field-message {
  color: var(--brass-light);
}

#converter-count {
  padding-top: 0.45rem;
  color: rgba(244, 237, 218, 0.55);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.68rem;
  white-space: nowrap;
}

.converter-output {
  min-width: 0;
  padding: 1.2rem 1.25rem;
  color: var(--cream);
  background: var(--green-950);
}

.output-label,
.output-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.output-label {
  color: var(--brass-light);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

#converter-time {
  color: rgba(244, 237, 218, 0.55);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.64rem;
  letter-spacing: 0;
}

.timeline-converter {
  min-height: 150px;
  margin-block: 1.1rem;
  padding: 1rem;
  align-content: center;
  flex-wrap: wrap;
  border: 1px solid rgba(244, 237, 218, 0.2);
}

.output-footer {
  min-height: 52px;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(244, 237, 218, 0.17);
}

.output-footer code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--brass-light);
  font-size: 0.82rem;
  line-height: 1.7;
}

.guide-section {
  padding-bottom: clamp(4.5rem, 9vw, 7rem);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 2.3rem;
  background: var(--line);
}

.guide-item {
  min-height: 190px;
  padding: 1.4rem;
  background: var(--paper);
}

.guide-number {
  display: block;
  margin-bottom: 1.5rem;
  color: var(--brass);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.72rem;
}

.guide-item h3 {
  margin-bottom: 0.45rem;
  color: var(--green-900);
  font-size: 1.55rem;
}

.guide-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.75;
}

.promise-band {
  display: grid;
  margin-top: 2.3rem;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.promise-band > div {
  padding: 1.25rem;
}

.promise-band > div + div {
  border-left: 1px solid var(--line);
}

.promise-band strong,
.promise-band span {
  display: block;
}

.promise-band strong {
  margin-bottom: 0.45rem;
  color: var(--green-900);
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 400;
}

.promise-band span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.7;
}

.promise-band a {
  color: var(--green-700);
  text-underline-offset: 3px;
}

.site-footer {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(244, 237, 218, 0.66);
  background: var(--green-900);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.site-footer::before {
  position: absolute;
  right: 0;
  left: 0;
  height: 110px;
  z-index: -1;
  background: var(--green-900);
  content: '';
}

.site-footer p {
  margin: 0;
}

.site-footer .brand-mark {
  width: 1.55rem;
  height: 1.55rem;
  margin-right: 0.5rem;
  font-size: 0.7rem;
  vertical-align: -0.55em;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(320px, 0.95fr) minmax(400px, 1.05fr);
  }

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

  .setting-kind {
    grid-column: span 2;
  }

  .setting-mode {
    grid-column: span 2;
  }

  .setting-submit {
    grid-column: span 1;
  }
}

@media (max-width: 800px) {
  .header-inner,
  .section,
  .site-footer {
    width: min(100% - 32px, 680px);
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    width: min(100%, 680px);
    padding: 4.5rem 16px 3rem;
    margin-inline: auto;
  }

  .hero-art {
    min-height: 340px;
    max-height: 55vw;
  }

  .hero-art img {
    object-position: 62% 56%;
  }

  .practice-layout,
  .converter-grid {
    grid-template-columns: 1fr;
  }

  .practice-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .aside-note {
    grid-row: span 2;
    border-bottom: 0;
  }

  .timing-key {
    margin: 0;
  }

  .weak-list-box {
    align-self: start;
  }

  .storage-notice {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .header-inner {
    min-height: 64px;
  }

  .site-nav {
    gap: 0.7rem;
    font-size: 0.67rem;
  }

  .site-nav a:nth-child(2) {
    display: none;
  }

  .hero-copy {
    padding-top: 3.8rem;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.5rem);
  }

  .hero-art {
    min-height: 270px;
    max-height: none;
  }

  .hero-art-note {
    bottom: 18px;
  }

  .section {
    padding-block: 4.2rem;
  }

  .heading-with-rule {
    display: block;
  }

  .heading-with-rule > p {
    margin-top: 1rem;
  }

  .settings-panel {
    display: block;
    background: var(--line);
  }

  .setting-block {
    min-height: auto;
    border-bottom: 1px solid var(--line);
  }

  .setting-submit {
    width: calc(100% - 1.5rem);
    margin: 0.75rem;
  }

  .practice-layout {
    margin-top: 2.6rem;
  }

  .challenge-stage {
    min-height: 290px;
    padding: 2.3rem 1.15rem 1.4rem;
  }

  .transport-controls,
  .answer-area,
  .result-panel {
    padding-inline: 1.15rem;
  }

  .answer-row {
    display: grid;
  }

  .answer-row .button {
    width: 100%;
  }

  .comparison-list {
    grid-template-columns: 1fr;
  }

  .practice-aside {
    display: block;
  }

  .aside-note {
    padding-bottom: 1.8rem;
    border-bottom: 1px solid var(--line);
  }

  .timing-key {
    margin-block: 1.4rem 2rem;
  }

  .guide-grid,
  .promise-band {
    grid-template-columns: 1fr;
  }

  .guide-item {
    min-height: auto;
  }

  .promise-band > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .site-footer {
    display: block;
    min-height: 100px;
    padding-block: 1.5rem;
  }

  .site-footer p + p {
    margin-top: 0.65rem;
  }
}

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

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

@media print {
  .site-header,
  .hero,
  .settings-panel,
  .transport-controls,
  .answer-area,
  .practice-aside,
  .converter-section,
  .guide-section,
  .site-footer,
  .result-actions {
    display: none !important;
  }

  .section,
  .practice-layout,
  .practice-card {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .practice-card {
    color: #000;
    background: #fff;
  }

  .card-topline,
  .result-panel {
    border-color: #aaa;
  }
}
