:root {
  --ink: #183a37;
  --muted: #657975;
  --paper: #f5f6f1;
  --green: #24634c;
  --line: #d8e1d8;
  --orange: #d88051;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
header,
main,
footer {
  max-width: 1440px;
  margin: auto;
  padding-left: 5%;
  padding-right: 5%;
}
header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
a {
  color: inherit;
  text-decoration: none;
}
.brand {
  display: flex;
  align-items: center;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -1px;
}
.mark {
  background: var(--green);
  color: white;
  border-radius: 50%;
  width: 39px;
  height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  font-size: 20px;
  margin-right: 11px;
}
.dot {
  color: var(--orange);
}
nav {
  display: flex;
  gap: 32px;
  font-size: 13px;
}
.badge {
  font-size: 10px;
  letter-spacing: 1.5px;
  border: 1px solid #bfd0bd;
  border-radius: 20px;
  padding: 5px 12px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 55px 0 36px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.5px;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 20px;
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 1.07;
  letter-spacing: -2px;
  font-weight: 400;
  margin: 0;
}
.lede {
  color: var(--muted);
  margin: 22px 0 0;
  font-size: 14px;
}
.intro-note {
  border-left: 1px solid var(--line);
  padding-left: 24px;
  margin-bottom: 4px;
}
.intro-note span {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--green);
}
.intro-note p {
  font-size: 13px;
  color: var(--muted);
}
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  scroll-margin-top: 20px;
}
.scene-column {
  background: #c8d9e7;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.scene-heading {
  padding: 20px 24px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  font-size: 11px;
  color: #47695c;
}
.scene-heading i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 7px;
}
#saved {
  font-size: 10px;
}
#viewport {
  width: 100%;
  height: 470px;
  position: relative;
  touch-action: none;
}
#viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
}
#loading {
  padding: 30px;
  text-align: center;
}
.scene-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-top: auto;
  font-size: 10px;
  color: #5e776e;
}
.views {
  display: flex;
  gap: 4px;
}
button {
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
}
button:hover {
  background: #edf2e9;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button[aria-pressed="true"] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
#viewport:focus-visible {
  outline: 3px solid #df9d39;
  outline-offset: 3px;
}
aside {
  padding: 22px;
  border-left: 1px solid var(--line);
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: 20px;
}
.text-button {
  border: 0;
  padding: 0;
  font-size: 10px;
  letter-spacing: 0;
  text-decoration: underline;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 6px 0 14px;
}
label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-top: 12px;
}
output {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--green);
  height: 15px;
  margin: 8px 0;
}
input[type="checkbox"] {
  accent-color: var(--green);
}
.divider {
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.chinese {
  color: var(--muted);
  font-size: 11px;
  margin-left: 8px;
}
.point-buttons {
  display: flex;
  gap: 5px;
}
.point-buttons button {
  flex: 1;
  padding: 8px 4px;
  font-size: 10px;
}
.options {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}
.options label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
}
.primary,
.record {
  width: 100%;
  margin: 5px 0;
}
.primary {
  background: var(--green);
  color: white;
  border: 0;
  padding: 12px;
}
.primary:hover {
  background: #194c39;
}
.record {
  background: transparent;
}
.about {
  padding: 50px 0;
}
.about h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 32px;
  margin-bottom: 20px;
}
.about > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1000px;
}
.about p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
footer {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  padding-bottom: 26px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .intro-note {
    display: none;
  }
  .studio {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  aside {
    padding: 18px;
  }
  #viewport {
    height: 430px;
  }
}
@media (max-width: 680px) {
  header {
    height: 78px;
  }
  .brand {
    font-size: 22px;
  }
  nav {
    display: none;
  }
  .badge {
    font-size: 8px;
  }
  .intro {
    padding: 35px 0 28px;
  }
  h1 {
    letter-spacing: -1px;
  }
  .lede {
    font-size: 13px;
  }
  .studio {
    grid-template-columns: 1fr;
  }
  aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px;
  }
  #viewport {
    height: 330px;
  }
  .scene-heading {
    padding: 16px;
    font-size: 10px;
    flex-wrap: wrap;
  }
  .scene-footer {
    padding: 14px;
  }
  .about > div {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  footer {
    gap: 20px;
    align-items: start;
  }
  footer span:last-child {
    max-width: 180px;
    text-align: right;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Native-language links stay available at every screen size. */
.languages {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 1440px;
  margin: auto;
  padding: 10px 5%;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.languages a {
  padding: 6px 10px;
  border-radius: 6px;
}
.languages a:hover {
  background: #e7eee5;
}
.languages a[aria-current="page"] {
  background: var(--green);
  color: white;
}
h1 {
  max-width: 820px;
  text-wrap: balance;
}
.intro {
  gap: 32px;
}
.intro-note {
  min-width: 180px;
  border-left: 0;
  border-inline-start: 1px solid var(--line);
  padding-left: 0;
  padding-inline-start: 24px;
}
header {
  gap: 20px;
  height: auto;
  min-height: 100px;
  padding-block: 20px;
  flex-wrap: wrap;
}
header nav {
  flex-wrap: wrap;
  gap: 12px 24px;
}
.brand {
  flex-shrink: 0;
}
.badge {
  text-align: center;
}
.panel-title {
  gap: 12px;
  letter-spacing: 0.5px;
}
.text-button {
  flex-shrink: 0;
}
.point-buttons {
  flex-wrap: wrap;
}
.point-buttons button {
  min-width: 60px;
  overflow-wrap: anywhere;
}
.options {
  flex-wrap: wrap;
  gap: 8px;
}
aside {
  min-width: 0;
  border-left: 0;
  border-inline-start: 1px solid var(--line);
}
output {
  direction: ltr;
  unicode-bidi: isolate;
}
input[type="range"] {
  direction: ltr;
}
[dir="rtl"] h1 {
  letter-spacing: 0;
  line-height: 1.35;
}
[dir="rtl"] .eyebrow,
[dir="rtl"] .badge,
[dir="rtl"] .intro-note span {
  letter-spacing: 0;
}
select:focus-visible {
  outline: 3px solid #df9d39;
  outline-offset: 3px;
}
@media (max-width: 680px) {
  .languages {
    display: flex;
    justify-content: start;
    font-size: 11px;
    gap: 3px;
  }
  .languages a {
    padding: 6px 8px;
  }
  header {
    min-height: 78px;
    padding-block: 16px;
    gap: 12px;
  }
  .badge {
    max-width: 130px;
    letter-spacing: 0.5px;
  }
  aside {
    border-inline-start: 0;
  }
  footer {
    flex-wrap: wrap;
  }
  footer span:last-child {
    text-align: start;
    max-width: 100%;
  }
}
