:root {
  font-family: system-ui, sans-serif;
  color: #263c34;
  background: #f3f0e9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 36px 28px;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
header h1 {
  font:
    400 clamp(2.3rem, 5vw, 4.2rem)/1.08 Georgia,
    serif;
  letter-spacing: -0.04em;
  margin: 9px 0 15px;
}
header p {
  max-width: 680px;
  color: #5d6d64;
  line-height: 1.6;
  margin: 0;
}
.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
button,
select {
  font: inherit;
  color: inherit;
}
button {
  background: #fffdf8;
  border: 1px solid #c8c7bb;
  border-radius: 14px;
  padding: 11px 15px;
  min-height: 44px;
  cursor: pointer;
}
button:disabled,
select:disabled {
  cursor: default;
  opacity: 0.5;
}
button:hover:enabled {
  background: #e6ece1;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #36715a;
  outline-offset: 3px;
}
#language {
  align-self: flex-start;
  border-radius: 99px;
  min-width: 54px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}
.stage {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #eae6df;
  min-height: 620px;
  height: min(76vh, 850px);
  border: 1px solid #ddd5c7;
}
#viewport {
  position: absolute;
  inset: 0;
  touch-action: none;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.camera-controls {
  position: absolute;
  bottom: 20px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}
.camera-controls button {
  font-size: 0.82rem;
  background: #fffdf8ed;
}
#empty {
  position: absolute;
  top: 40%;
  left: 10%;
  right: 10%;
  text-align: center;
  line-height: 1.6;
  color: #5e6a62;
  pointer-events: none;
}
#empty[hidden] {
  display: none;
}
aside {
  background: #fffdf8;
  padding: 24px;
  border: 1px solid #e5decf;
  border-radius: 24px;
  align-self: start;
}
label,
legend {
  font-size: 0.88rem;
  font-weight: 650;
}
select {
  width: 100%;
  padding: 12px 10px;
  min-height: 46px;
  border: 1px solid #c9c9bc;
  border-radius: 12px;
  background: #fff;
  margin-top: 9px;
}
fieldset {
  margin: 25px 0 0;
  border: 0;
  padding: 0;
}
legend {
  margin-bottom: 12px;
}
.expressions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.expressions button {
  font-size: 0.83rem;
  padding: 10px;
}
.expressions button[aria-pressed="true"] {
  background: #315c49;
  color: #fff;
  border-color: #315c49;
}
.intensity-label {
  display: flex;
  justify-content: space-between;
  margin: 25px 0 9px;
}
#intensity {
  width: 100%;
  accent-color: #a86c50;
  min-height: 34px;
}
output {
  font-variant-numeric: tabular-nums;
}
.note,
#assetInfo {
  font-size: 0.76rem;
  color: #637268;
  line-height: 1.6;
}
#status {
  font-size: 0.85rem;
  line-height: 1.5;
  min-height: 2em;
}
summary {
  font-size: 0.76rem;
  cursor: pointer;
}
details {
  margin-top: 20px;
}
@media (max-width: 900px) {
  main {
    padding: 24px 16px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .stage {
    height: 65dvh;
    min-height: 430px;
  }
  aside {
    padding: 22px;
  }
  .expressions {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 450px) {
  .stage {
    min-height: 390px;
  }
  .camera-controls {
    bottom: 12px;
    gap: 5px;
  }
  .camera-controls button {
    font-size: 0.72rem;
    padding: 8px 11px;
  }
}

#assetInfo {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.return-links{display:flex;gap:24px;flex-wrap:wrap;margin-bottom:28px}.return-links a{color:inherit;min-height:44px;display:inline-flex;align-items:center;text-underline-offset:5px}#resetFace{width:100%}

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
#skinTone { margin-bottom: 0; }
#expressionCue { min-height: 3em; }
