:root {
  --ink:#233d3a;
  --muted:#72887e;
  --green:#327a4c;
  --deep-green:#245d3a;
  --paper:#fffef2;
  --line:#2d5143;
  --yellow:#f9d76c;
  --shadow:#1e483329;
  --sky:#d9edf1;
  font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--ink);
  font-synthesis:none
}
* {
  box-sizing:border-box
}
html,body {
  margin:0;
  width:100%;
  height:100%;
  overflow:hidden
}
body {
  background:var(--sky);
  font-size:14px
}
button,a,input,select {
  font:inherit
}
button {
  color:inherit;
  cursor:pointer;
  border:0
}
button:disabled {
  cursor:not-allowed;
  opacity:.5
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #cb842b;
  outline-offset:4px
}
button:active:not(:disabled) {
  transform:translateY(2px)
}
#game {
  position:relative;
  width:100%;
  height:100dvh;
  min-height:400px;
  isolation:isolate
}
#world {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  outline:none;
  background:#cfe8ef;
  touch-action:none
}
.hud {
  position:absolute;
  z-index:5;
  inset:0 0 auto;
  height:83px;
  background:#fffef4f5;
  border-bottom:3px solid var(--line);
  display:flex;
  align-items:center;
  gap:30px;
  padding:0 28px;
  box-shadow:0 5px 0 #43745a15
}
.brand {
  display:flex;
  align-items:center;
  gap:13px;
  text-decoration:none;
  color:var(--ink);
  min-width:220px
}
.brand b {
  font-size:23px;
  font-weight:900;
  letter-spacing:2px;
  display:block;
  line-height:1.3
}
.brand small {
  font-size:9px;
  font-weight:800;
  letter-spacing:4px;
  color:var(--green)
}
.brand-cube {
  display:block;
  width:37px;
  height:37px;
  position:relative;
  background:#7eb36a;
  box-shadow:inset -10px -10px #3a7b47;
  border:3px solid var(--line);
  transform:rotate(-7deg)
}
.brand-cube:before,.brand-cube:after {
  content:"";
  position:absolute;
  width:10px;
  height:10px;
  top:4px;
  background:#b0d48a;
  left:4px
}
.brand-cube:after {
  top:18px;
  left:17px;
  background:#24613c
}
.brand-cube i {
  position:absolute;
  left:3px;
  right:3px;
  height:4px;
  background:#b9d18d;
  top:-8px
}
.level-box {
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  max-width:280px
}
.level-icon {
  font-size:25px;
  color:#cfa33e
}
.level-box>div {
  flex:1
}
.level-box #level-name {
  font-weight:750;
  font-size:12px
}
.xp-line {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px
}
.xp-line small {
  color:var(--muted);
  font-size:10px;
  white-space:nowrap
}
.xp-track {
  height:7px;
  min-width:60px;
  max-width:130px;
  background:#dce7d7;
  flex:1
}
.xp-track i {
  display:block;
  width:0;
  height:100%;
  background:var(--green);
  transition:width .4s
}
.resources {
  display:flex;
  gap:22px;
  margin-left:auto
}
.resources>span {
  display:grid;
  grid-template-columns:20px auto;
  column-gap:8px;
  align-items:center
}
.resources b {
  font-size:18px;
  line-height:1
}
.resources small {
  grid-column:2;
  color:var(--muted);
  font-size:9px;
  margin-top:4px
}
.material {
  display:inline-block;
  width:17px;
  height:19px;
  grid-row:span 2;
  border:2px solid #775735;
  box-shadow:inset -4px -4px #0002
}
.material.wood {
  background:#b58a4d
}
.material.stone {
  background:#a5b4b4;
  border-color:#677f7d
}
.material.crystal {
  background:#8dcac7;
  border-color:#417779;
  transform:rotate(45deg);
  width:14px;
  height:18px;
  box-shadow:inset -4px -4px #549c9c
}
.hud-actions {
  display:flex;
  gap:8px
}
.square {
  border:2px solid #c5d1bd;
  width:37px;
  height:37px;
  min-width:37px;
  display:inline-grid;
  place-items:center;
  font-size:19px;
  font-weight:800;
  background:#f5f6e9;
  box-shadow:0 2px #a6b9a1
}
.square.active {
  background:#f5db7c;
  border-color:#bda258
}
.panel {
  position:absolute;
  z-index:3;
  background:#fffef3f2;
  border:3px solid var(--line);
  box-shadow:5px 5px 0 var(--shadow);
  padding:20px
}
.mission-panel {
  left:24px;
  top:109px;
  width:250px
}
.eyebrow {
  font-size:10px;
  font-weight:800;
  letter-spacing:1.3px;
  display:flex;
  align-items:center;
  gap:6px;
  color:#6e8975;
  text-transform:uppercase
}
.eyebrow>span:last-child {
  margin-left:auto;
  letter-spacing:.5px;
  font-size:9px
}
.live-dot {
  display:inline-block;
  width:6px;
  height:6px;
  background:#6c9b58;
  box-shadow:0 0 0 3px #8fba7722;
  flex-shrink:0
}
.region-stamp {
  margin-top:17px;
  width:38px;
  height:33px;
  display:grid;
  place-items:center;
  background:#e2eccc;
  border:2px solid #aabd98;
  color:#59794c;
  font-family:monospace;
  font-size:20px;
  font-weight:800;
  box-shadow:3px 3px #d0dcb9
}
h1 {
  font-size:26px;
  letter-spacing:1px;
  margin:14px 0 3px;
  line-height:1.2
}
.region-subtitle {
  font-size:11px;
  color:var(--muted);
  margin:0
}
.panel-rule {
  height:2px;
  background:#e0e6d6;
  margin:18px 0
}
.mission-story {
  line-height:1.8;
  font-size:12px;
  margin:0;
  color:#63796b
}
.mission-steps {
  list-style:none;
  margin:16px 0;
  padding:0;
  display:grid;
  gap:13px
}
.mission-steps li {
  display:flex;
  gap:9px;
  align-items:flex-start;
  font-size:12px;
  line-height:1.6
}
.step-marker {
  display:inline-grid;
  place-items:center;
  min-width:18px;
  height:18px;
  border:2px solid #bfccb7;
  background:#f1f3e5;
  color:#8a9a80;
  font-size:10px
}
.done .step-marker {
  background:var(--green);
  border-color:var(--green);
  color:white
}
.mission-steps small {
  display:block;
  color:#839383;
  font-size:10px
}
.button {
  border:2px solid var(--line);
  box-shadow:0 4px 0 var(--line);
  padding:11px 16px;
  font-weight:800;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  min-height:44px;
  background:#f4efd7;
  font-size:13px
}
.button.primary {
  background:var(--green);
  color:#fffef2;
  border-color:var(--deep-green);
  box-shadow:0 4px 0 var(--deep-green)
}
.button.primary:hover {
  background:#3d8957
}
.button.gold {
  background:var(--yellow);
  border-color:#aa8834;
  box-shadow:0 4px 0 #aa8834
}
.full {
  width:100%
}
.button span {
  margin-left:auto
}
.field-note {
  margin-top:23px;
  border-left:3px solid #dfc37a;
  padding-left:10px
}
.field-note>span {
  font-size:10px;
  font-weight:800;
  color:#aa8b45
}
.field-note p {
  color:#8c9278;
  font-size:10px;
  line-height:1.8;
  margin:6px 0
}
.session-progress {
  display:flex;
  flex-wrap:wrap;
  font-size:9px;
  align-items:center;
  margin-top:20px;
  color:#7a8c75;
  gap:7px
}
.session-progress b {
  margin-left:auto;
  font-size:10px
}
.six-pips {
  width:100%;
  display:flex;
  gap:5px
}
.six-pips i {
  flex:1;
  height:5px;
  background:#dce5d3
}
.six-pips i.done {
  background:#6c9b58
}
.map-panel {
  right:24px;
  top:109px;
  width:214px;
  padding:17px
}
.map-panel .eyebrow>span {
  font-size:7px
}
.island-list {
  margin-top:15px;
  display:grid;
  gap:5px
}
.island-item {
  background:transparent;
  display:flex;
  align-items:center;
  text-align:left;
  gap:10px;
  padding:9px 7px;
  width:100%;
  border:2px solid transparent;
  min-height:47px;
  position:relative
}
.island-item.current {
  background:#eaf0da;
  border-color:#b3c69e
}
.island-item:hover:not(:disabled) {
  background:#eef1e3
}
.island-item:disabled {
  opacity:.45
}
.island-pixel {
  width:23px;
  height:23px;
  background:var(--island-color);
  border:2px solid #365845;
  box-shadow:inset -5px -6px #0002;
  transform:rotate(-5deg);
  flex-shrink:0
}
.island-item span:nth-child(2) {
  font-size:11px;
  font-weight:750
}
.island-item small {
  display:block;
  font-size:8px;
  font-weight:500;
  color:#7c8e77;
  margin-top:2px
}
.island-state {
  margin-left:auto;
  font-size:11px;
  color:#6d9462
}
.achievement-preview {
  display:flex;
  gap:9px;
  align-items:center
}
.medal-icon {
  background:#f8d86d;
  color:#967122;
  border:2px solid #c4a043;
  padding:2px 6px;
  font-size:22px;
  box-shadow:2px 2px #e4c367
}
.achievement-preview b {
  font-size:10px;
  display:block
}
.achievement-preview small {
  font-size:8px;
  line-height:1.6;
  color:var(--muted);
  display:block;
  margin-top:3px
}
.text-button {
  display:flex;
  width:100%;
  padding:15px 0 0;
  color:#6a8a65;
  font-size:10px;
  font-weight:750;
  background:none;
  text-align:left
}
.text-button span {
  margin-left:auto
}
.world-caption {
  position:absolute;
  top:103px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  gap:7px;
  background:#f7ffec9e;
  padding:7px 11px;
  font-size:10px;
  color:#608061;
  white-space:nowrap;
  pointer-events:none
}
.save-dot {
  font-size:9px;
  border-left:1px solid #b4c6a8;
  margin-left:2px;
  padding-left:8px;
  color:#809578
}
.quick-actions {
  position:absolute;
  z-index:3;
  bottom:26px;
  left:24px;
  display:flex;
  gap:8px
}
.quick-actions button {
  background:#fffef3ed;
  border:2px solid var(--line);
  box-shadow:3px 3px var(--shadow);
  min-height:43px;
  padding:8px 12px;
  font-weight:750;
  font-size:11px
}
.quick-actions button>span {
  font-size:16px;
  margin-right:6px
}
.quick-actions small {
  font-size:9px;
  color:#7f9276;
  margin-left:5px
}
.controls-dock {
  position:absolute;
  z-index:3;
  bottom:19px;
  left:50%;
  transform:translateX(-50%);
  text-align:center
}
.keyboard-hint {
  color:#526e62;
  font-size:10px;
  margin:0 0 12px;
  text-shadow:0 1px #fff
}
.keyboard-hint span {
  color:#9bb19f;
  margin:0 8px
}
kbd {
  font-family:inherit;
  font-weight:800;
  font-size:9px
}
.hotbar {
  display:flex;
  gap:5px;
  background:#f3f4deef;
  border:3px solid var(--line);
  padding:6px;
  box-shadow:4px 4px #1e483329
}
.tool-slot {
  width:54px;
  height:55px;
  position:relative;
  background:#e8ead5;
  border:2px solid #aebfa3;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  box-shadow:inset 2px 2px #fff7
}
.tool-slot.selected {
  background:#f5df94;
  border-color:#9f873b;
  outline:2px solid #f7eab9;
  outline-offset:-5px
}
.tool-slot .tool-image {
  height:28px;
  display:grid;
  place-items:center;
  font-size:24px;
  line-height:1
}
.tool-slot small {
  font-size:8px;
  opacity:.65
}
.tool-slot kbd {
  position:absolute;
  left:4px;
  top:1px;
  color:#87957b;
  font-size:8px
}
.selected-tool {
  font-size:9px;
  color:#58715f;
  margin:10px 0 0;
  white-space:nowrap;
  text-shadow:0 1px #fff
}
.mobile-tabs,.touch-controls {
  display:none
}
.toast-stack {
  position:absolute;
  z-index:12;
  top:147px;
  left:50%;
  transform:translateX(-50%);
  display:grid;
  gap:8px;
  pointer-events:none;
  width:max-content;
  max-width:90vw
}
.toast {
  padding:12px 18px;
  border:2px solid #496d4b;
  background:#fffdf0;
  box-shadow:4px 4px #33543926;
  font-size:12px;
  font-weight:700;
  animation:toast-in .2s ease-out;
  max-width:100%;
  line-height:1.6
}
.toast.reward {
  border-color:#b99537;
  background:#fff5c9
}
.toast.exit {
  opacity:0;
  transition:opacity .3s
}
@keyframes toast-in {
  from {
    opacity:0;
    transform:translateY(-6px)
  }
  to {
    opacity:1;
    transform:translateY(0)
  }
}
dialog {
  border:3px solid var(--line);
  box-shadow:8px 8px #23473444;
  background:var(--paper);
  color:var(--ink);
  padding:0;
  width:min(730px,calc(100vw - 32px));
  max-height:calc(100dvh - 40px);
  overflow:auto
}
dialog::backdrop {
  background:#1f3e3b70;
  backdrop-filter:blur(3px)
}
.dialog-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:23px 27px 20px;
  border-bottom:2px solid #e1e6d4;
  background:#fbfceb;
  position:sticky;
  top:0;
  z-index:2
}
.dialog-top h2 {
  font-size:24px;
  letter-spacing:1px;
  margin:7px 0 0
}
.dialog-top .eyebrow {
  font-size:9px
}
.dialog-top .square {
  box-shadow:none;
  flex-shrink:0
}
#dialog-body {
  padding:24px 27px 28px
}
.dialog-intro {
  font-size:13px;
  line-height:1.9;
  color:#70806c;
  margin:0 0 19px
}
.experiment-stage {
  border:2px solid #bfd0b5;
  background:#e9f0df;
  position:relative;
  overflow:hidden;
  min-height:220px;
  display:grid;
  place-items:center
}
.experiment-stage svg {
  width:100%;
  height:auto;
  max-height:270px;
  display:block
}
.stage-label {
  font:12px system-ui;
  fill:#4d6b55
}
.stage-label.bold {
  font-weight:750;
  fill:#2c5140
}
.experiment-controls {
  margin-top:20px;
  display:grid;
  gap:16px
}
.control-row {
  display:flex;
  align-items:center;
  gap:15px;
  flex-wrap:wrap
}
.control-row>label {
  font-size:12px;
  font-weight:750;
  min-width:85px
}
.control-row output {
  font-weight:800;
  color:#3f7951;
  font-size:12px;
  min-width:45px
}
.control-row input[type=range] {
  flex:1;
  min-width:120px;
  accent-color:var(--green);
  height:28px
}
.observation {
  padding:12px 15px;
  background:#f0f2e2;
  border-left:3px solid #8fa981;
  margin:17px 0;
  font-size:12px;
  line-height:1.8;
  color:#58715a;
  min-height:50px
}
.observation.success {
  background:#edf2d0;
  border-color:#6b9b4d
}
.experiment-footer {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:18px
}
.experiment-footer .button {
  flex:1
}
.science-note {
  font-size:12px;
  line-height:1.9;
  margin:14px 0 0;
  color:#6d7d66
}
.science-note strong {
  color:#4d7352
}
.chip {
  background:#e8eed9;
  border:1px solid #c4d3b9;
  font-size:10px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:5px 8px;
  color:#647c59
}
.experiment-status {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
  gap:8px
}
.experiment-status .chip {
  font-size:10px
}
.goal {
  font-size:12px;
  font-weight:750;
  margin:0 0 12px
}
.option-segments {
  display:flex;
  gap:5px;
  flex-wrap:wrap
}
.option-segments button {
  background:#edf1df;
  border:2px solid #c0ccb3;
  min-height:40px;
  padding:8px 12px;
  font-size:12px
}
.option-segments button.selected {
  background:#d9e7b8;
  border-color:#6b9457;
  color:#345e3b
}
.notebook-toolbar {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:17px
}
.notebook-toolbar input,.notebook-toolbar select {
  border:2px solid #bdcbb1;
  background:#fffff5;
  min-height:43px;
  padding:9px 10px;
  color:var(--ink);
  font-size:12px
}
.notebook-toolbar input {
  flex:1;
  min-width:150px
}
.notebook-tabs {
  display:flex;
  gap:6px;
  margin-bottom:16px
}
.notebook-tabs button {
  background:#e8eddc;
  padding:9px 15px;
  min-height:40px;
  border:2px solid #bdcbb1;
  font-size:12px
}
.notebook-tabs .selected {
  background:var(--green);
  color:#fff;
  border-color:var(--deep-green)
}
.question-list {
  display:grid;
  gap:7px;
  max-height:390px;
  overflow:auto;
  padding:2px
}
.question-row {
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  width:100%;
  padding:13px;
  background:#f2f4e7;
  border:2px solid #d2ddc6;
  min-height:65px
}
.question-row:hover {
  background:#e9efd7
}
.question-number {
  font-family:monospace;
  min-width:30px;
  color:#93a07f;
  font-size:16px;
  font-weight:800
}
.question-row b {
  font-size:12px;
  font-weight:650;
  line-height:1.6;
  display:block
}
.question-row small {
  font-size:10px;
  color:#8b9980;
  display:block;
  margin-top:4px
}
.question-row .status {
  margin-left:auto;
  color:#6b9257;
  font-size:11px;
  white-space:nowrap
}
.empty-list {
  text-align:center;
  padding:40px;
  color:#809177;
  line-height:2
}
.research-npc {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px
}
.npc-face {
  width:45px;
  height:47px;
  display:grid;
  place-items:center;
  background:#d4b98d;
  border:3px solid #644e38;
  box-shadow:inset 0 10px #668c56,inset 0 -9px #f3ecce;
  font-size:22px;
  font-family:monospace
}
.research-npc strong {
  font-size:13px
}
.research-npc small {
  display:block;
  color:#819474;
  font-size:11px;
  margin-top:5px
}
.research-question {
  background:#f1f4e4;
  border:2px solid #ccd8bf;
  padding:20px;
  line-height:1.9;
  margin:0 0 18px;
  font-size:16px;
  font-weight:700
}
.answer-list {
  display:grid;
  gap:9px
}
.answer-button {
  border:2px solid #c3d1b8;
  background:#fcfcf0;
  text-align:left;
  min-height:50px;
  padding:12px;
  display:flex;
  align-items:center;
  gap:12px;
  font-size:13px;
  line-height:1.7
}
.answer-button:hover:not(:disabled) {
  background:#eaf0d9
}
.answer-button .letter {
  display:grid;
  place-items:center;
  min-width:25px;
  height:26px;
  background:#e9edda;
  font-weight:800;
  color:#819271
}
.answer-button.correct {
  background:#e0edcd;
  border-color:#679652
}
.answer-button.wrong {
  background:#f6e7cf;
  border-color:#c49d63
}
.answer-feedback {
  margin:18px 0 0;
  background:#eef3dd;
  padding:16px;
  border:2px solid #b7cba4;
  line-height:1.9;
  font-size:13px
}
.answer-feedback.retry {
  background:#fff3da;
  border-color:#d3ba82
}
.answer-feedback strong {
  display:block;
  margin-bottom:6px
}
.question-actions {
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin-top:18px
}
.question-actions button {
  flex:1
}
.hint-text {
  font-size:12px;
  color:#8b815c;
  background:#faf1d1;
  padding:12px;
  line-height:1.8;
  margin-top:14px
}
.question-source {
  font-size:10px;
  color:#98a18a;
  margin:16px 0 0
}
.craft-list {
  display:grid;
  gap:12px
}
.craft-card {
  display:flex;
  align-items:center;
  gap:18px;
  background:#f1f3e4;
  border:2px solid #ccd8be;
  padding:17px
}
.craft-icon {
  display:grid;
  place-items:center;
  width:65px;
  height:65px;
  min-width:65px;
  background:#d9e5c5;
  border:2px solid #92ae7f;
  font-size:35px
}
.craft-copy {
  flex:1
}
.craft-copy h3 {
  font-size:16px;
  margin:0 0 7px
}
.craft-copy p {
  font-size:11px;
  line-height:1.7;
  color:#7d8c72;
  margin:0
}
.recipe {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:13px 0;
  font-size:11px
}
.recipe span {
  display:flex;
  align-items:center;
  gap:5px
}
.recipe .material {
  width:11px;
  height:12px;
  border-width:1px
}
.craft-card .button {
  font-size:11px;
  min-width:90px;
  padding:10px;
  align-self:center
}
.achievement-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.achievement-card {
  border:2px solid #d3dcc6;
  background:#eff2e4;
  padding:17px;
  display:flex;
  gap:13px;
  opacity:.55
}
.achievement-card.earned {
  background:#fff3c7;
  border-color:#d1b663;
  opacity:1
}
.achievement-glyph {
  font-size:27px;
  color:#a2ac8b
}
.earned .achievement-glyph {
  color:#bd9532
}
.achievement-card b {
  font-size:12px;
  display:block
}
.achievement-card p {
  font-size:10px;
  line-height:1.8;
  margin:7px 0 0;
  color:#8c9578
}
.setting-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  border-bottom:1px solid #dbe3cd;
  padding:16px 0;
  font-size:13px
}
.setting-row:first-child {
  padding-top:0
}
.setting-row small {
  display:block;
  color:#8c997d;
  font-size:11px;
  margin-top:6px;
  line-height:1.7
}
.setting-row .button {
  font-size:11px;
  padding:8px 12px;
  box-shadow:0 2px var(--line)
}
.toggle {
  min-width:55px;
  min-height:33px;
  background:#d2ddc4;
  border:2px solid #a7bc98;
  padding:3px;
  display:flex;
  align-items:center
}
.toggle:before {
  content:"";
  width:22px;
  height:21px;
  background:#ffffef;
  box-shadow:1px 1px #72936366
}
.toggle.enabled {
  background:var(--green);
  border-color:var(--deep-green);
  justify-content:flex-end
}
.danger-button {
  border-color:#b99c7b;
  color:#946d46;
  background:#fbefda;
  box-shadow:0 2px #b99c7b
}
.help-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.help-card {
  border:2px solid #cfdbc1;
  background:#f1f4e5;
  padding:15px
}
.help-card b {
  font-size:13px;
  display:block;
  margin-bottom:9px
}
.help-card p {
  font-size:12px;
  line-height:1.9;
  color:#7c8c72;
  margin:0
}
.help-card kbd {
  background:#e3e9d4;
  border:1px solid #bdccb1;
  padding:2px 5px
}
.help-footer {
  font-size:12px;
  line-height:1.9;
  color:#7a8b70;
  margin:20px 0 0
}
.print-type {
  display:flex;
  gap:15px;
  align-items:center;
  justify-content:center;
  padding:25px
}
.type-piece {
  width:76px;
  height:76px;
  border:3px solid #785d3d;
  background:#b58c55;
  box-shadow:5px 5px #836743;
  display:grid;
  place-items:center;
  font-size:44px;
  font-weight:900;
  color:#312d29;
  cursor:grab
}
.print-paper {
  min-width:170px;
  height:100px;
  background:#fffbe4;
  border:2px solid #c5b98c;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:40px;
  font-weight:800;
  letter-spacing:10px;
  color:#2e3c3a
}
.print-arrow {
  color:#90a779;
  font-size:25px
}
.experiment-stage.printing {
  display:flex;
  flex-wrap:wrap;
  gap:15px;
  padding:20px
}
.print-slot {
  width:65px;
  height:76px;
  border:2px dashed #a9b696;
  display:grid;
  place-items:center;
  color:#789362;
  font-size:34px;
  font-weight:800;
  background:#f3f6e8
}
.print-slot.filled {
  background:#b9915c;
  color:#2e2b27;
  border:3px solid #7b613e;
  box-shadow:3px 3px #8e734d
}
.print-slots {
  display:flex;
  gap:8px
}
.seed-options {
  display:grid;
  gap:14px
}
.reward-line {
  font-size:11px;
  color:#9b803d;
  margin:14px 0;
  line-height:1.8
}
.back-link {
  background:none;
  padding:0;
  color:#7e966c;
  font-size:11px;
  margin-bottom:16px;
  min-height:26px
}
.island-complete {
  padding:14px;
  background:#f8efc7;
  border:2px solid #cbb66d;
  font-size:12px;
  line-height:1.9;
  margin:0 0 16px
}
.progress-summary {
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:12px 15px;
  background:#eef2dd;
  font-size:12px;
  margin-bottom:18px
}
.progress-summary b {
  color:var(--green)
}
@media(min-width:1450px) {
  .mission-panel {
    left:36px;
    top:117px;
    width:265px;
    padding:23px
  }
  .map-panel {
    right:36px;
    top:117px;
    width:220px
  }
  .quick-actions {
    left:36px;
    bottom:30px
  }
  .hud {
    padding:0 36px
  }
  .mission-story {
    font-size:13px
  }
  .mission-steps {
    gap:16px
  }
  .mission-steps li {
    font-size:13px
  }
}
@media(max-height:790px) and (min-width:901px) {
  .mission-panel {
    top:101px;
    padding:16px
  }
  .mission-panel h1 {
    font-size:23px;
    margin-top:11px
  }
  .region-stamp {
    margin-top:10px;
    height:27px;
    font-size:17px
  }
  .panel-rule {
    margin:12px 0
  }
  .mission-steps {
    gap:8px;
    margin:12px 0
  }
  .mission-story {
    font-size:11px
  }
  .field-note {
    margin-top:16px
  }
  .session-progress {
    margin-top:13px
  }
  .map-panel {
    top:101px
  }
  .island-item {
    min-height:41px;
    padding:6px
  }
  .controls-dock {
    bottom:13px
  }
  .quick-actions {
    bottom:17px
  }
}
@media(max-width:1150px) {
  .hud {
    gap:20px;
    padding:0 20px
  }
  .brand {
    min-width:200px
  }
  .brand b {
    font-size:21px
  }
  .level-box {
    max-width:210px
  }
  .resources {
    gap:14px
  }
  .mission-panel {
    left:16px;
    width:227px;
    padding:16px
  }
  .map-panel {
    right:16px;
    width:188px;
    padding:13px
  }
  .quick-actions {
    left:16px;
    bottom:19px;
    flex-direction:column
  }
  .controls-dock {
    bottom:18px
  }
  .quick-actions button {
    min-height:36px;
    padding:7px 9px;
    font-size:10px
  }
  .island-item {
    gap:8px;
    padding:7px 4px
  }
  .island-item span:nth-child(2) {
    font-size:10px
  }
  .region-stamp {
    margin-top:14px
  }
  h1 {
    font-size:24px
  }
}
@media(max-width:900px),(pointer:coarse) {
  .hud {
    height:69px;
    padding:0 15px;
    gap:15px
  }
  .brand {
    min-width:auto;
    gap:10px
  }
  .brand b {
    font-size:19px;
    letter-spacing:1px
  }
  .brand small {
    font-size:7px;
    letter-spacing:2.5px
  }
  .brand-cube {
    width:30px;
    height:30px
  }
  .brand-cube:before {
    width:8px;
    height:8px;
    left:3px;
    top:3px
  }
  .brand-cube:after {
    width:7px;
    height:7px;
    left:14px;
    top:14px
  }
  .level-box {
    display:none
  }
  .resources {
    gap:15px
  }
  .resources b {
    font-size:16px
  }
  .resources small {
    display:none
  }
  .resources>span {
    grid-template-columns:15px auto;
    gap:6px
  }
  .material {
    width:14px;
    height:16px
  }
  .material.crystal {
    width:12px;
    height:15px
  }
  .hud-actions {
    gap:5px
  }
  .square {
    width:33px;
    height:33px;
    min-width:33px
  }
  .mobile-tabs {
    position:absolute;
    z-index:4;
    top:82px;
    left:15px;
    display:flex;
    gap:7px
  }
  .mobile-tabs button {
    background:#fffdf0e8;
    border:2px solid var(--line);
    box-shadow:2px 2px var(--shadow);
    padding:10px 12px;
    min-height:42px;
    font-size:11px;
    font-weight:750
  }
  .mobile-tabs button[aria-expanded=true] {
    background:#dce9c8
  }
  .panel {
    display:none;
    top:135px;
    bottom:170px;
    max-height:470px;
    overflow:auto
  }
  .panel.drawer-open {
    display:block
  }
  .mission-panel {
    left:15px;
    width:245px
  }
  .map-panel {
    right:auto;
    left:15px;
    width:245px
  }
  .world-caption {
    top:85px;
    left:auto;
    right:15px;
    transform:none;
    padding:8px;
    font-size:9px
  }
  .save-dot {
    display:none
  }
  .quick-actions {
    left:auto;
    right:15px;
    top:133px;
    bottom:auto;
    gap:8px
  }
  .quick-actions button {
    width:43px;
    height:43px;
    font-size:0;
    padding:0
  }
  .quick-actions button>span {
    margin:0;
    font-size:23px
  }
  .quick-actions small {
    display:none
  }
  .controls-dock {
    bottom:21px
  }
  .keyboard-hint {
    display:none
  }
  .hotbar {
    gap:4px;
    padding:5px
  }
  .tool-slot {
    width:47px;
    height:48px
  }
  .tool-slot .tool-image {
    font-size:22px
  }
  .selected-tool {
    font-size:8px;
    max-width:290px;
    white-space:normal;
    line-height:1.7;
    margin-top:7px
  }
  .touch-controls {
    display:flex;
    position:absolute;
    bottom:32px;
    left:17px;
    right:17px;
    align-items:center;
    justify-content:space-between;
    pointer-events:none;
    z-index:4
  }
  .dpad {
    display:grid;
    grid-template-columns:43px 43px 43px;
    grid-template-rows:43px 43px;
    gap:3px;
    pointer-events:auto;
    touch-action:none
  }
  .dpad button,.touch-actions button {
    background:#fffdf0db;
    border:2px solid #517457;
    box-shadow:2px 2px #3752382b;
    min-width:43px;
    min-height:43px;
    color:#567b55;
    font-size:15px;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none
  }
  .d-up {
    grid-column:2;
    grid-row:1
  }
  .d-left {
    grid-column:1;
    grid-row:2
  }
  .d-down {
    grid-column:2;
    grid-row:2
  }
  .d-right {
    grid-column:3;
    grid-row:2
  }
  .touch-actions {
    display:flex;
    align-items:center;
    gap:9px;
    pointer-events:auto
  }
  .touch-actions #touch-interact {
    width:64px;
    height:64px;
    background:#377b4cdf;
    color:#fffde6;
    font-weight:750;
    font-size:13px;
    box-shadow:3px 3px #27593678
  }
  .touch-interact span {
    display:block;
    font-size:9px;
    opacity:.65;
    margin-top:3px
  }
  .touch-actions #touch-jump {
    font-size:10px;
    min-width:44px;
    min-height:44px
  }
  .toast-stack {
    top:140px
  }
  .toast {
    font-size:11px;
    padding:10px 13px
  }
  dialog {
    max-height:calc(100dvh - 24px);
    width:calc(100vw - 28px)
  }
  .dialog-top {
    padding:19px 20px 17px
  }
  #dialog-body {
    padding:20px
  }
  .dialog-top h2 {
    font-size:21px
  }
  .experiment-stage {
    min-height:180px
  }
  .experiment-stage svg {
    max-height:235px
  }
}
@media(max-width:650px) {
  .hud {
    padding:0 11px;
    gap:10px;
    height:65px
  }
  .brand {
    gap:8px
  }
  .brand b {
    font-size:16px;
    letter-spacing:0
  }
  .brand small {
    font-size:6px;
    letter-spacing:2px;
    margin-top:3px
  }
  .brand-cube {
    width:27px;
    height:27px;
    border-width:2px
  }
  .brand-cube i {
    height:3px;
    top:-6px
  }
  .resources {
    gap:10px
  }
  .resources>span {
    gap:4px;
    grid-template-columns:10px auto
  }
  .resources b {
    font-size:13px
  }
  .resources .material {
    width:10px;
    height:12px;
    border-width:1px
  }
  .resources .material.crystal {
    width:9px;
    height:12px
  }
  .hud-actions {
    gap:6px
  }
  .hud-actions .square {
    width:31px;
    height:33px;
    min-width:31px;
    font-size:17px
  }
  #help-open {
    display:none
  }
  .mobile-tabs {
    left:12px;
    top:77px
  }
  .mobile-tabs button {
    padding:9px;
    font-size:10px
  }
  .world-caption {
    right:12px;
    top:80px;
    font-size:8px;
    max-width:135px
  }
  .world-caption #world-caption {
    overflow:hidden;
    text-overflow:ellipsis
  }
  .quick-actions {
    right:12px;
    top:130px
  }
  .panel {
    top:128px;
    bottom:190px
  }
  .mission-panel,.map-panel {
    left:12px
  }
  .controls-dock {
    bottom:16px;
    max-width:265px
  }
  .hotbar {
    gap:3px;
    padding:4px;
    border-width:2px;
    box-shadow:3px 3px #1e483329
  }
  .tool-slot {
    width:42px;
    height:46px;
    border-width:2px
  }
  .tool-slot .tool-image {
    font-size:20px
  }
  .tool-slot small {
    font-size:7px
  }
  .selected-tool {
    font-size:7px;
    margin-top:6px
  }
  .touch-controls {
    bottom:100px;
    left:12px;
    right:12px
  }
  .dpad {
    grid-template-columns:44px 44px 44px;
    grid-template-rows:44px 44px;
    gap:3px
  }
  .dpad button {
    min-width:44px;
    min-height:44px
  }
  .touch-actions {
    gap:7px;
    align-self:flex-end
  }
  .touch-actions #touch-interact {
    width:58px;
    height:58px;
    font-size:12px
  }
  .touch-actions #touch-jump {
    min-width:44px;
    min-height:44px
  }
  .dialog-top {
    padding:16px
  }
  #dialog-body {
    padding:17px
  }
  .dialog-top h2 {
    font-size:20px
  }
  .dialog-top .square {
    width:34px;
    height:34px
  }
  .dialog-intro {
    font-size:12px
  }
  .experiment-status {
    align-items:flex-start;
    flex-wrap:wrap
  }
  .experiment-status .chip {
    font-size:9px
  }
  .goal {
    font-size:11px
  }
  .experiment-stage {
    min-height:175px
  }
  .control-row {
    gap:9px
  }
  .control-row>label {
    font-size:11px;
    min-width:75px
  }
  .control-row output {
    font-size:11px
  }
  .observation {
    font-size:11px;
    margin:13px 0
  }
  .button {
    font-size:12px;
    padding:10px 13px;
    min-height:44px
  }
  .science-note {
    font-size:11px
  }
  .notebook-toolbar {
    gap:7px
  }
  .notebook-toolbar select {
    max-width:140px
  }
  .question-row {
    padding:10px;
    gap:8px
  }
  .question-row b {
    font-size:11px
  }
  .question-row small {
    font-size:9px
  }
  .question-number {
    min-width:23px;
    font-size:13px
  }
  .question-row .status {
    font-size:9px
  }
  .research-question {
    font-size:14px;
    padding:14px
  }
  .answer-button {
    font-size:12px;
    padding:10px;
    gap:9px
  }
  .answer-feedback {
    font-size:12px;
    padding:12px
  }
  .craft-card {
    gap:10px;
    padding:12px;
    flex-wrap:wrap
  }
  .craft-icon {
    width:45px;
    min-width:45px;
    height:48px;
    font-size:26px
  }
  .craft-copy h3 {
    font-size:14px
  }
  .craft-card .button {
    width:100%
  }
  .recipe {
    gap:10px
  }
  .achievement-grid {
    grid-template-columns:1fr
  }
  .achievement-card {
    padding:14px
  }
  .help-grid {
    grid-template-columns:1fr
  }
  .setting-row {
    font-size:12px;
    gap:13px
  }
  .setting-row small {
    font-size:10px
  }
  .type-piece {
    width:56px;
    height:62px;
    font-size:34px
  }
  .print-type {
    padding:13px;
    gap:10px
  }
  .print-paper {
    min-width:125px;
    height:75px;
    font-size:29px
  }
  .print-slot {
    width:53px;
    height:62px;
    font-size:28px
  }
  .experiment-stage.printing {
    padding:18px;
    gap:12px
  }
  .notebook-tabs button {
    min-height:44px
  }
  .square {
    min-height:36px
  }
  .hud-actions .square {
    min-height:38px
  }
  .mobile-tabs button {
    min-height:44px
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important
  }
}
.reduced-motion * {
  animation:none!important;
  transition:none!important
}
dialog .control-row input[type=range] {
  min-width:80px
}
.setting-row .control-row {
  max-width:270px;
  flex:1;
  justify-content:flex-end
}
.setting-row input[type=range] {
  width:150px
}
.setting-row output {
  min-width:36px;
  font-size:11px
}
.experiment-stage.printing .print-slots {
  flex-wrap:nowrap
}
@media(max-width:650px) {
  .setting-row input[type=range] {
    width:100px;
    min-width:70px
  }
  .setting-row .control-row {
    max-width:155px;
    gap:6px
  }
  .experiment-status {
    gap:6px
  }
  .progress-summary {
    font-size:10px;
    flex-wrap:wrap;
    gap:8px
  }
}
@media(max-width:900px),(pointer:coarse) {
  .quick-actions button {
    width:112px;
    height:44px;
    padding:0 9px;
    gap:6px;
    font-size:11px;
    white-space:nowrap
  }
  .hud-actions .square {
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px
  }
  .dialog-top .square {
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px
  }
  .option-segments button {
    min-height:44px
  }
  .notebook-tabs button {
    min-height:44px
  }
}
@media(max-width:650px) {
  .tool-slot {
    width:44px;
    min-width:44px;
    height:48px
  }
  .hud {
    gap:8px
  }
  .resources {
    gap:9px
  }
  .hud-actions {
    gap:5px
  }
  .brand b {
    font-size:15px
  }
  .brand {
    gap:7px
  }
  .brand small {
    font-size:5px;
    letter-spacing:2px
  }
  .brand-cube {
    width:25px;
    height:25px
  }
  .touch-controls {
    bottom:105px
  }
  .controls-dock {
    bottom:14px;
    max-width:270px
  }
}
.save-error {
  color:#a53e27!important;
  font-weight:700
}
.setting-row[hidden] {
  display:none
}
.trial-launch {
  border-color:#376d47!important;
  background:#ecdf9e!important
}
.trial-regions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:22px
}
.trial-regions .button {
  font-size:12px
}
.trial-heading {
  font-size:22px;
  color:#2b5638;
  margin:12px 0
}
.trial-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px
}
.trial-stage {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
  padding:18px;
  background:#eeefd8;
  border:2px solid #a9bd96;
  color:#294c35;
  font:inherit;
  min-height:142px;
  cursor:pointer;
  box-shadow:3px 3px #a2b69955;
  text-align:left
}
.trial-stage:hover:not(:disabled) {
  background:#f4e4a8;
  border-color:#658447
}
.trial-stage:disabled {
  opacity:.45;
  cursor:default
}
.trial-stage.cleared {
  background:#e1ebcc
}
.trial-number {
  font-size:24px;
  font-weight:800;
  opacity:.4
}
.trial-stage b {
  font-size:15px
}
.trial-stage small {
  font-size:11px
}
.trial-stars {
  color:#af872d;
  font-size:20px;
  letter-spacing:3px
}
.trial-dialog {
  width:min(1160px,calc(100vw - 24px));
  max-height:calc(100dvh - 16px)
}
.trial-dialog #dialog-body {
  padding:16px;
  background:#153b32
}
.trial-dialog .dialog-top {
  padding:14px 18px
}
.trial-dialog .dialog-top h2 {
  font-size:19px
}
.trial-dialog .dialog-top .eyebrow {
  font-size:10px
}
@media(max-width:650px) {
  .trial-grid {
    grid-template-columns:repeat(2,1fr);
    gap:8px
  }
  .trial-stage {
    padding:12px;
    min-height:134px
  }
  .trial-stage b {
    font-size:13px
  }
  .trial-regions {
    gap:6px
  }
  .trial-regions .button {
    font-size:11px;
    padding:8px
  }
  .trial-dialog #dialog-body {
    padding:8px
  }
  .trial-dialog .dialog-top {
    padding:10px 12px
  }
  .trial-dialog .dialog-top h2 {
    font-size:16px
  }
}
[hidden] {
  display:none!important
}

@media(max-width:900px),(pointer:coarse) {
  .save-dot.save-error { display:inline; color:#9e3423; }
  #touch-interact span { display:none; }
}
