:root {
  --cream: #f6f4e9;
  --ink: #263f33;
  --green: #326c50;
  --muted: #7a8378;
  --line: #dcded1;
  --yellow: #efd566;
  --white: #fffef7;
  --shadow: 0 12px 40px #233b2910;
  color-scheme: light;
  font-family:
    Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
}
input {
  min-width: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #c59f35;
  outline-offset: 4px;
}
button:hover:not(:disabled) {
  filter: brightness(0.96);
}
[hidden] {
  display: none !important;
}
body.playing {
  overflow: hidden;
  overscroll-behavior: none;
}
.lobby {
  max-width: 1560px;
  margin: auto;
  padding: 0 56px;
}
.site-header {
  height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 950;
  font-size: 23px;
  letter-spacing: -1px;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--cream);
  height: 34px;
  width: 34px;
  border-radius: 10px;
  font-size: 30px;
  line-height: 1;
}
.brand-jp {
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-left: 3px;
  border-left: 1px solid var(--line);
  padding-left: 15px;
  font-weight: 700;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.online-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
}
.online-tag i,
.art-tag i,
.world-title i,
.connection-status i {
  width: 6px;
  height: 6px;
  background: #73a578;
  border-radius: 100%;
  box-shadow: 0 0 0 4px #73a57814;
}
.text-button {
  padding: 10px 0;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 700;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1.03fr;
  gap: 58px;
  padding: 52px 0 45px;
  align-items: stretch;
}
.hero-copy {
  padding: 9px 0 0 4px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.tiny-star {
  font-size: 25px;
  color: var(--green);
}
h1 {
  font-size: clamp(35px, 3.3vw, 53px);
  letter-spacing: -2px;
  line-height: 1.45;
  margin: 0 0 21px;
  font-weight: 900;
}
.green-text {
  color: var(--green);
}
.hero-description {
  font-size: 13px;
  color: #6b786c;
  line-height: 2.1;
  margin: 0 0 34px;
  letter-spacing: 1px;
}
.entry-panel {
  max-width: 470px;
  border-top: 1px solid var(--line);
  padding-top: 23px;
}
.section-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}
.section-heading h2 {
  font-size: 15px;
  letter-spacing: 0.3px;
  margin: 0;
}
.step-number {
  font: 700 10px/1 Arial;
  border: 1px solid #bac6b2;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
}
.small-note {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.3px;
  margin-left: auto;
  color: #929788;
}
.field-label {
  font-size: 11px;
  font-weight: 700;
  display: block;
  margin: 16px 0 8px;
}
.field-label span {
  font-weight: 400;
  font-size: 10px;
  color: #8c9585;
  margin-left: 8px;
}
input:not([type="color"]) {
  border: 1px solid #d6dacb;
  background: #fffef8;
  border-radius: 8px;
  width: 100%;
  padding: 14px 15px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
input::placeholder {
  color: #a2a697;
}
input:focus {
  border-color: var(--green);
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 55px;
}
.password-field button {
  position: absolute;
  right: 13px;
  top: 10px;
  background: transparent;
  font-size: 10px;
  padding: 7px;
  color: #7c8879;
}
.primary-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--green);
  color: var(--white);
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 8px;
  margin-top: 19px;
  min-height: 48px;
  transition:
    transform 0.15s,
    background 0.15s;
}
.primary-button:hover {
  background: #25563f;
}
.primary-button:active {
  transform: translateY(2px);
}
.primary-button span {
  font-size: 23px;
  line-height: 1;
}
.entry-note {
  font-size: 9px;
  color: #969b8e;
  line-height: 1.7;
  margin: 12px 0 0;
  text-align: center;
}
.lock-icon {
  font-size: 13px;
  margin-right: 3px;
}
.form-error {
  font-size: 12px;
  background: #fbe7db;
  color: #994737;
  padding: 10px;
  border-radius: 5px;
  line-height: 1.7;
}
.hero-art {
  position: relative;
  border-radius: 15px;
  background: #dce9d2;
  overflow: hidden;
  min-height: 660px;
  isolation: isolate;
}
.art-heading {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}
.art-tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.art-coordinate {
  font-size: 7px;
  letter-spacing: 1px;
  color: #7c9275;
}
.lobby-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.lobby-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.art-wordmark {
  position: absolute;
  left: 30px;
  top: 75px;
  font:
    1000 clamp(78px, 9.5vw, 150px)/0.77 Arial,
    sans-serif;
  letter-spacing: -8px;
  color: #bfd2b2;
  z-index: 0;
  transform: rotate(-6deg);
  user-select: none;
}
.art-wordmark span {
  margin-left: 40px;
}
.hero-sticker {
  position: absolute;
  z-index: 3;
  right: 22px;
  top: 228px;
  width: 103px;
  height: 103px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(12deg);
  background: var(--yellow);
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 4px 0 #b39c4e30;
}
.hero-sticker b {
  font-size: 11px;
  line-height: 1.7;
}
.hero-sticker span {
  font-size: 5px;
  letter-spacing: 0.7px;
  margin-top: 6px;
}
.art-bottom {
  position: absolute;
  bottom: 25px;
  left: 28px;
  right: 28px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.art-bottom > div {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 1px;
}
.preview-bleat {
  background: #f9f8ecba;
  border: 1px solid #f9f8ecb0;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 11px 17px;
  font-size: 11px;
  font-weight: 700;
}
.preview-bleat span {
  font-size: 18px;
}
.lobby-footer {
  padding: 25px 0 33px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 45px;
  align-items: center;
}
.lobby-footer > div {
  display: flex;
  gap: 13px;
  align-items: center;
}
.feature-icon {
  font-size: 26px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #ccd4c4;
  border-radius: 50%;
}
.lobby-footer p {
  margin: 0;
  font-size: 11px;
  line-height: 1.9;
  display: flex;
  flex-direction: column;
}
.lobby-footer p span {
  font-size: 9px;
  color: #8a9383;
}
.footer-edition {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1.2px;
  line-height: 1.9;
  text-align: right;
  margin-left: auto;
  color: #8a9383;
}
.welcome-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 14px;
}
.small-button {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  min-height: 36px;
  background: #e9eddf;
  border: 1px solid #d6deca;
  border-radius: 6px;
  padding: 8px 11px;
}
.icon-button {
  font-size: 20px;
  margin-left: auto;
  background: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
}
.room-list {
  max-height: 181px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.room-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffef7;
  border: 1px solid #d6dacb;
  border-radius: 8px;
  padding: 13px;
  text-align: left;
}
.room-item .room-icon {
  font-size: 22px;
  width: 32px;
  height: 32px;
  background: #e7eddb;
  border-radius: 8px;
  text-align: center;
  line-height: 32px;
}
.room-item .room-text {
  flex: 1;
  min-width: 0;
}
.room-item b {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-item small {
  font-size: 9px;
  color: #8c9786;
  display: block;
  margin-top: 4px;
}
.room-item .room-arrow {
  font-size: 20px;
}
.room-empty {
  border: 1px dashed #cad1c0;
  padding: 19px;
  text-align: center;
  border-radius: 8px;
  font-size: 11px;
  color: #8b9584;
  line-height: 1.9;
}
.join-row {
  display: flex;
  gap: 8px;
}
.join-row .primary-button {
  margin: 0;
  width: 100px;
  flex-shrink: 0;
  padding: 12px 15px;
}
.game {
  position: fixed;
  inset: 0;
  background: #bfdeca;
  touch-action: none;
  user-select: none;
}
.game-canvas {
  position: absolute;
  inset: 0;
}
.game-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: 0;
}
.game-top {
  position: absolute;
  left: 30px;
  right: 30px;
  top: 25px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.game-world {
  background: #faf8edee;
  border: 1px solid #fff9;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  max-width: min(500px, 70vw);
}
.game-brand {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.game-brand span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}
.world-title {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  margin-top: 10px;
}
.world-title > span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.count-badge {
  background: #dfe8d4;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.game-menu {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
.round-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #faf8edee;
  font-weight: 700;
  font-size: 19px;
  box-shadow: var(--shadow);
}
.score-panel {
  position: absolute;
  left: 30px;
  top: 145px;
  width: 211px;
  background: #faf8edea;
  backdrop-filter: blur(8px);
  padding: 17px;
  border-radius: 12px;
  border: 1px solid #fff8;
  box-shadow: var(--shadow);
}
.score-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.8px;
}
.combo {
  background: #ecd164;
  color: #524c21;
  font-size: 7px;
  padding: 5px;
  letter-spacing: 0;
  border-radius: 3px;
}
.score-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 12px;
}
.score-total strong {
  font-size: 39px;
  letter-spacing: -1.8px;
}
.score-total > span {
  font-size: 8px;
  color: #87907d;
}
.score-stats {
  display: flex;
  gap: 15px;
  border-top: 1px solid #d8ddcc;
  padding-top: 12px;
  font-size: 9px;
}
.score-stats > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.score-stats b {
  font-size: 12px;
}
.apple-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 44% 44%;
  background: #d7684d;
}
.crate-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 1px;
  background: #bb9257;
  border: 1px solid #9d7744;
}
.leaderboard {
  position: absolute;
  right: 30px;
  top: 88px;
  width: 211px;
  border: 1px solid #fff7;
  background: #faf8edeb;
  backdrop-filter: blur(8px);
  padding: 17px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.leader-title {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
}
.leader-title span {
  font-size: 17px;
}
#leader-list {
  padding: 0;
  margin: 12px 0 15px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#leader-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 9px;
}
#leader-list li .rank {
  font-size: 8px;
  color: #8d9684;
  width: 10px;
}
#leader-list li .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#leader-list li.mine .name {
  font-weight: 800;
}
#leader-list li b {
  font-size: 11px;
}
#leader-list .player-dot {
  height: 13px;
  width: 13px;
  border-radius: 50%;
  border: 1px solid #a5ae97;
}
.chaos-wrap {
  border-top: 1px solid #d8ddcc;
  padding-top: 13px;
}
.chaos-wrap > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
}
.chaos-bar {
  height: 5px;
  background: #dbe0cd;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 9px;
}
.chaos-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: #d2af48;
  border-radius: 8px;
  transition: width 0.3s;
}
.game-bottom {
  position: absolute;
  bottom: 33px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  gap: 15px;
}
.movement-controls {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  grid-template-rows: repeat(2, 46px) 18px;
  gap: 5px;
  pointer-events: auto;
}
.move-button {
  background: #faf8edeb;
  box-shadow: 0 3px 0 #254f3b30;
  border: 1px solid #fff9;
  border-radius: 11px;
  font-size: 22px;
  touch-action: none;
}
.move-button.up {
  grid-column: 2;
}
.move-button.left {
  grid-column: 1;
  grid-row: 2;
}
.move-button.down {
  grid-column: 2;
  grid-row: 2;
}
.move-button.right {
  grid-column: 3;
  grid-row: 2;
}
.movement-controls > span {
  grid-row: 3;
  grid-column: 1/4;
  font-size: 8px;
  letter-spacing: 1px;
  text-align: center;
  color: #36593c;
  align-self: end;
}
.move-button.active,
.move-button:active {
  background: var(--yellow);
  transform: translateY(2px);
  box-shadow: none;
}
.game-tip {
  text-align: center;
  color: #466142;
  padding-bottom: 5px;
  margin-left: 80px;
}
.tip-pill {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid #496c4144;
  border-radius: 20px;
  padding: 6px 14px;
  background: #f7f6e850;
}
.game-tip p {
  font-size: 9px;
  line-height: 1.7;
  margin: 13px 0 0;
}
.action-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: auto;
}
.action-button {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border-radius: 50%;
  background: #f6ecca;
  border: 2px solid #fff5;
  box-shadow: 0 4px 0 #254f3b35;
  min-width: 76px;
  height: 76px;
  touch-action: none;
  position: relative;
}
.action-button.charge {
  width: 98px;
  height: 98px;
  background: #e9bc54;
}
.action-button.jump {
  width: 86px;
  height: 86px;
  background: #f3e39e;
}
.action-button.bleat {
  background: #ead9cc;
}
.action-glyph {
  font-size: 29px;
  line-height: 1;
}
.action-button b {
  font-size: 10px;
  margin-top: 3px;
}
.action-button kbd {
  font: 7px Arial;
  letter-spacing: 0.5px;
  opacity: 0.65;
  margin-top: 4px;
}
.action-button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #254f3b35;
}
.connection-status {
  position: absolute;
  bottom: 12px;
  left: 31px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #426645;
}
.connection-status i {
  width: 4px;
  height: 4px;
}
.compass {
  position: absolute;
  left: 30px;
  bottom: 207px;
  width: 118px;
  height: 142px;
  background: #f5f3e8c9;
  border: 1px solid #fffa;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}
.compass > span:first-child {
  font-size: 8px;
  font-weight: 800;
  position: absolute;
  top: 7px;
}
.compass canvas {
  width: 106px;
  height: 106px;
  display: block;
}
.map-label {
  font-size: 6px;
  letter-spacing: 1.4px;
  font-weight: 800;
}
.event-toast {
  position: absolute;
  left: 50%;
  top: 24%;
  transform: translate(-50%, -8px);
  background: #f8f3dfed;
  color: #345239;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 25px;
  box-shadow: var(--shadow);
  transition:
    opacity 0.2s,
    transform 0.2s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.event-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.connection-overlay,
.webgl-error {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #23392a80;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 25px;
}
.connection-overlay > div,
.webgl-error > div {
  width: min(440px, 100%);
  background: var(--cream);
  text-align: center;
  border-radius: 16px;
  padding: 40px;
}
.connection-overlay h2,
.webgl-error h2 {
  font-size: 19px;
  line-height: 1.6;
}
.connection-overlay p,
.webgl-error p {
  font-size: 12px;
  line-height: 1.8;
  color: #78866c;
}
.loading-ring {
  display: block;
  border: 3px solid #d5dfc6;
  border-top-color: var(--green);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
  margin: auto;
}
.webgl-error {
  z-index: 100;
}
.webgl-error > div > span {
  font-size: 44px;
}
.global-toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 10px);
  padding: 12px 20px;
  border-radius: 9px;
  background: #2c4b37;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  z-index: 60;
  pointer-events: none;
  transition: 0.2s;
  max-width: 90vw;
  text-align: center;
}
.global-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  color: var(--ink);
  background: var(--cream);
  border: 1px solid #fff;
  border-radius: 17px;
  max-height: 92dvh;
  box-shadow: 0 25px 100px #15352144;
  padding: 0;
  overflow: auto;
}
dialog::backdrop {
  background: #243e2d88;
  backdrop-filter: blur(8px);
}
.dialog-close {
  position: absolute;
  top: 16px;
  right: 17px;
  font-size: 25px;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f2f3e8c0;
  z-index: 2;
}
.cosmetics-dialog {
  width: min(850px, 94vw);
}
.cosmetics-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.cosmetic-preview-wrap {
  background: #dce8d0;
  position: relative;
  min-height: 560px;
  overflow: hidden;
}
.cosmetic-preview-wrap > .eyebrow {
  position: absolute;
  left: 28px;
  top: 32px;
  font-size: 8px;
}
.cosmetic-preview-wrap canvas {
  display: block;
}
.preview-caption {
  position: absolute;
  bottom: 30px;
  left: 15px;
  right: 15px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}
#cosmetic-preview {
  position: absolute;
  inset: 0;
}
.cosmetic-options {
  padding: 36px 32px 26px;
}
.cosmetic-options > .eyebrow {
  font-size: 8px;
  margin: 0 0 15px;
}
.cosmetic-options h2 {
  font-size: 26px;
  line-height: 1.5;
  margin: 0 0 24px;
  letter-spacing: -1px;
}
fieldset {
  padding: 0;
  border: 0;
  margin: 0 0 20px;
}
legend {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 11px;
  width: 100%;
  display: flex;
  justify-content: space-between;
}
legend span {
  font-size: 10px;
  color: #8e9987;
  font-weight: 400;
}
.swatches {
  display: flex;
  gap: 10px;
}
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--cream);
  outline: 1px solid #cbd3bd;
  padding: 0;
  position: relative;
}
.swatch.selected {
  outline: 2px solid var(--green);
}
.swatch.selected:after {
  content: "✓";
  color: #263e32;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 0 2px #fff;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.option-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.option-grid button,
.option-row button {
  background: #eeeee1;
  border: 1px solid #d9dece;
  border-radius: 6px;
  padding: 9px 4px;
  font-size: 9px;
  min-height: 43px;
  white-space: nowrap;
}
.option-grid button span {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}
.option-grid button.selected,
.option-row button.selected {
  background: #dfe8d2;
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
.option-row {
  display: flex;
  gap: 6px;
}
.option-row button {
  flex: 1;
  min-height: 35px;
}
.color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  margin: 5px 0 22px;
}
.color-field input {
  height: 30px;
  width: 48px;
  border: 1px solid #d1d9c6;
  border-radius: 5px;
  padding: 3px;
  background: #fff;
  cursor: pointer;
}
.simple-dialog {
  width: min(430px, 92vw);
  padding: 35px;
}
.simple-dialog .eyebrow {
  font-size: 8px;
  margin: 0 0 17px;
}
.simple-dialog h2 {
  font-size: 30px;
  line-height: 1.5;
  letter-spacing: -1px;
  margin: 0 0 20px;
}
.help-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.help-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  font-size: 11px;
  gap: 15px;
}
.help-list li b {
  font-size: 10px;
}
.dialog-note {
  font-size: 11px;
  color: #7f8b75;
  line-height: 1.9;
}
.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.menu-actions .primary-button {
  margin: 5px 0 0;
}
.secondary-button {
  border: 1px solid #cad5bd;
  background: #e9eddf;
  border-radius: 8px;
  padding: 15px;
  font-size: 12px;
  font-weight: 700;
}
.danger {
  color: #ac6650;
}
.game-error {
  color: #a44f36;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1600px) {
  .hero {
    gap: 80px;
  }
  .hero-art {
    min-height: 720px;
  }
  .hero-copy {
    padding-top: 35px;
  }
  .hero-description {
    margin-bottom: 45px;
  }
  .entry-panel {
    max-width: 500px;
  }
}
@media (max-width: 1100px) {
  .lobby {
    padding: 0 32px;
  }
  .hero {
    gap: 30px;
    padding-top: 35px;
  }
  .hero-art {
    min-height: 640px;
  }
  .art-heading {
    left: 20px;
    right: 20px;
  }
  .art-coordinate {
    display: none;
  }
  .hero-sticker {
    right: 10px;
    top: 240px;
    width: 85px;
    height: 85px;
    font-size: 20px;
  }
  .hero-sticker b {
    font-size: 10px;
  }
  .lobby-footer {
    gap: 25px;
  }
  .footer-edition {
    display: none;
  }
  .brand-jp {
    display: none;
  }
  .art-wordmark {
    left: 20px;
    font-size: 100px;
  }
  .game-tip {
    margin-left: 35px;
  }
}
@media (max-width: 800px) {
  .lobby {
    padding: 0 24px;
  }
  .site-header {
    height: 80px;
  }
  .online-tag {
    font-size: 7px;
    letter-spacing: 0.8px;
  }
  .brand {
    font-size: 20px;
  }
  .header-right {
    gap: 15px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 31px;
  }
  .hero-copy {
    display: contents;
  }
  .hero-copy > .eyebrow {
    grid-row: 1;
    margin: 0;
  }
  .hero-copy h1 {
    grid-row: 2;
    margin: 0;
    font-size: 38px;
    line-height: 1.38;
  }
  .hero-description {
    grid-row: 3;
    margin: -12px 0 0;
    font-size: 12px;
  }
  .hero-art {
    grid-row: 4;
    min-height: 440px;
  }
  .hero-copy .entry-panel {
    grid-row: 5;
    max-width: none;
    padding-top: 24px;
  }
  .hero-copy > .eyebrow .tiny-star {
    font-size: 19px;
  }
  .hero {
    row-gap: 22px;
  }
  .art-wordmark {
    font-size: 128px;
    top: 72px;
    left: 35px;
    letter-spacing: -7px;
  }
  .hero-sticker {
    top: 100px;
    right: 25px;
    width: 95px;
    height: 95px;
  }
  .lobby-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 21px;
    padding: 24px 0 35px;
  }
  .lobby-footer > div {
    gap: 16px;
  }
  .lobby-footer p {
    font-size: 12px;
  }
  .lobby-footer p span {
    font-size: 10px;
  }
  .section-heading .small-note {
    font-size: 8px;
  }
  .game-top {
    left: 15px;
    right: 15px;
    top: 15px;
  }
  .game-world {
    padding: 12px 14px;
  }
  .game-brand {
    font-size: 19px;
  }
  .game-brand span {
    display: none;
  }
  .game-menu {
    gap: 5px;
  }
  .round-button {
    width: 37px;
    height: 37px;
    font-size: 17px;
  }
  .score-panel {
    top: 122px;
    left: 15px;
    width: 180px;
    padding: 13px;
  }
  .score-total strong {
    font-size: 32px;
  }
  .score-stats {
    gap: 10px;
    font-size: 8px;
  }
  .leaderboard {
    right: 15px;
    top: 67px;
    width: 168px;
    padding: 13px;
  }
  .leader-title {
    font-size: 10px;
  }
  .game-bottom {
    left: 18px;
    right: 18px;
    bottom: 33px;
  }
  .game-tip {
    display: none;
  }
  .compass {
    left: 15px;
    bottom: 208px;
    width: 98px;
    height: 117px;
  }
  .compass canvas {
    width: 85px;
    height: 85px;
  }
  .map-label {
    font-size: 5px;
  }
  .connection-status {
    left: 19px;
  }
  .event-toast {
    top: 38%;
    font-size: 12px;
  }
  .cosmetics-layout {
    grid-template-columns: 1fr 1.1fr;
  }
  .cosmetic-preview-wrap {
    min-height: 530px;
  }
  .cosmetic-options {
    padding: 30px 23px 22px;
  }
  .cosmetic-options h2 {
    font-size: 24px;
  }
  .swatches {
    gap: 7px;
  }
  .swatch {
    width: 28px;
    height: 28px;
  }
  .option-grid {
    gap: 4px;
  }
  .option-grid button {
    font-size: 8px;
  }
}
@media (max-width: 520px) {
  .lobby {
    padding: 0 20px;
  }
  .site-header {
    height: 71px;
  }
  .header-right .online-tag {
    display: none;
  }
  .brand-jp {
    display: block;
    font-size: 8px;
    letter-spacing: 0.5px;
    padding-left: 10px;
    margin-left: 0;
  }
  .brand {
    font-size: 19px;
    gap: 9px;
  }
  .brand-icon {
    height: 29px;
    width: 29px;
    border-radius: 8px;
    font-size: 25px;
  }
  .hero-copy h1 {
    font-size: 35px;
    letter-spacing: -1.5px;
  }
  .hero-art {
    min-height: 365px;
  }
  .hero-sticker {
    width: 81px;
    height: 81px;
    font-size: 19px;
    top: 102px;
    right: 16px;
  }
  .hero-sticker b {
    font-size: 8px;
  }
  .hero-sticker span {
    font-size: 4px;
  }
  .art-wordmark {
    font-size: 100px;
    left: 22px;
    top: 63px;
    letter-spacing: -6px;
  }
  .art-wordmark span {
    margin-left: 35px;
  }
  .art-heading {
    left: 20px;
    top: 20px;
  }
  .art-tag {
    font-size: 7px;
  }
  .art-bottom {
    left: 20px;
    right: 18px;
    bottom: 18px;
  }
  .art-bottom > div {
    font-size: 8px;
    gap: 8px;
  }
  .art-bottom .tiny-star {
    font-size: 20px;
  }
  .preview-bleat {
    font-size: 9px;
    padding: 9px 12px;
    gap: 10px;
  }
  .entry-panel {
    padding-top: 22px;
  }
  .hero-description {
    font-size: 11px;
    line-height: 1.9;
  }
  .field-label span {
    font-size: 9px;
    margin-left: 5px;
  }
  .hero {
    padding-bottom: 30px;
  }
  .game-top {
    left: 10px;
    right: 10px;
    top: max(10px, env(safe-area-inset-top));
  }
  .game-world {
    padding: 10px 12px;
    max-width: 52vw;
  }
  .game-brand {
    font-size: 16px;
  }
  .world-title {
    gap: 5px;
    font-size: 8px;
    margin-top: 7px;
  }
  .count-badge {
    font-size: 6px;
    padding: 3px 4px;
  }
  .game-menu {
    gap: 5px;
  }
  .round-button {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
  .score-panel {
    left: 10px;
    top: 94px;
    width: 149px;
    padding: 11px;
  }
  .score-topline {
    font-size: 6px;
    letter-spacing: 0.3px;
  }
  .combo {
    font-size: 6px;
    padding: 4px;
  }
  .score-total {
    gap: 6px;
    margin: 7px 0 9px;
  }
  .score-total strong {
    font-size: 29px;
  }
  .score-total > span {
    font-size: 7px;
  }
  .score-stats {
    font-size: 7px;
    gap: 9px;
    padding-top: 9px;
  }
  .score-stats b {
    font-size: 10px;
  }
  .score-stats > span {
    gap: 4px;
  }
  .leaderboard {
    top: 55px;
    right: 10px;
    width: 140px;
    padding: 11px;
  }
  .leader-title {
    font-size: 8px;
  }
  .leader-title span {
    font-size: 13px;
  }
  #leader-list {
    gap: 7px;
    margin: 9px 0 10px;
  }
  #leader-list li {
    font-size: 8px;
    gap: 6px;
  }
  #leader-list li b {
    font-size: 9px;
  }
  #leader-list .player-dot {
    width: 10px;
    height: 10px;
  }
  .chaos-wrap {
    padding-top: 8px;
  }
  .chaos-wrap > div:first-child {
    font-size: 7px;
  }
  .chaos-bar {
    margin-top: 6px;
    height: 4px;
  }
  .game-bottom {
    left: 13px;
    right: 13px;
    bottom: max(32px, env(safe-area-inset-bottom));
    gap: 10px;
  }
  .movement-controls {
    grid-template-columns: repeat(3, 42px);
    grid-template-rows: repeat(2, 44px) 17px;
    gap: 4px;
  }
  .move-button {
    font-size: 20px;
    border-radius: 10px;
  }
  .movement-controls > span {
    font-size: 6px;
  }
  .action-controls {
    gap: 6px;
    align-items: flex-end;
    position: relative;
    padding-bottom: 5px;
  }
  .action-button {
    min-width: 50px;
    width: 50px;
    height: 50px;
    border-width: 1px;
  }
  .action-button.bleat {
    position: absolute;
    right: 115px;
    bottom: 67px;
    width: 49px;
    height: 49px;
  }
  .action-button.jump {
    width: 58px;
    height: 58px;
  }
  .action-button.charge {
    width: 65px;
    height: 65px;
  }
  .action-glyph {
    font-size: 23px;
  }
  .action-button b {
    font-size: 8px;
    margin-top: 1px;
  }
  .action-button kbd {
    display: none;
  }
  .compass {
    width: 75px;
    height: 92px;
    left: 10px;
    bottom: 174px;
  }
  .compass canvas {
    width: 68px;
    height: 68px;
  }
  .compass > span:first-child {
    font-size: 6px;
    top: 5px;
  }
  .map-label {
    font-size: 4px;
    letter-spacing: 0.8px;
  }
  .connection-status {
    left: 14px;
    bottom: 12px;
    font-size: 6px;
  }
  .event-toast {
    font-size: 10px;
    padding: 10px 16px;
    top: 39%;
  }
  .cosmetics-dialog {
    width: 94vw;
    max-height: 93dvh;
  }
  .cosmetics-layout {
    grid-template-columns: 1fr;
  }
  .cosmetic-preview-wrap {
    min-height: 210px;
  }
  .cosmetic-preview-wrap > .eyebrow {
    top: 19px;
    left: 20px;
    font-size: 7px;
  }
  .preview-caption {
    bottom: 13px;
    font-size: 9px;
  }
  .cosmetic-options {
    padding: 24px;
  }
  .cosmetic-options > .eyebrow {
    display: none;
  }
  .cosmetic-options h2 {
    font-size: 21px;
    line-height: 1.5;
    margin-bottom: 18px;
  }
  .cosmetic-options h2 br {
    display: none;
  }
  .cosmetic-options fieldset {
    margin-bottom: 15px;
  }
  .swatches {
    gap: 14px;
  }
  .swatch {
    width: 31px;
    height: 31px;
  }
  .option-grid button {
    font-size: 9px;
    min-height: 45px;
  }
  .option-grid button span {
    font-size: 16px;
    margin-bottom: 4px;
  }
  .color-field {
    margin-bottom: 10px;
  }
  .cosmetic-options .primary-button {
    margin-top: 12px;
  }
  .simple-dialog {
    padding: 30px 25px;
  }
  .simple-dialog h2 {
    font-size: 28px;
  }
  .connection-overlay > div {
    padding: 30px 25px;
  }
}
@media (max-height: 620px) and (orientation: landscape) {
  .game-top {
    top: 10px;
  }
  .game-world {
    padding: 9px 12px;
  }
  .game-brand {
    font-size: 17px;
  }
  .score-panel {
    top: 101px;
    width: 150px;
    padding: 11px;
  }
  .score-total strong {
    font-size: 27px;
  }
  .score-total {
    margin: 5px 0;
  }
  .leaderboard {
    top: 65px;
  }
  .compass {
    display: none;
  }
  .game-bottom {
    bottom: 23px;
  }
  .movement-controls {
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(2, 40px) 15px;
  }
  .game-tip {
    display: none;
  }
  .action-button {
    min-width: 57px;
    height: 57px;
  }
  .action-button.jump {
    width: 63px;
    height: 63px;
  }
  .action-button.charge {
    width: 70px;
    height: 70px;
  }
  .action-button kbd {
    display: none;
  }
  .connection-status {
    bottom: 8px;
  }
  .event-toast {
    top: 28%;
  }
  .cosmetic-preview-wrap {
    min-height: 450px;
  }
  .cosmetics-layout {
    grid-template-columns: 1fr 1fr;
  }
  .cosmetic-options {
    padding: 25px;
  }
  .cosmetic-options h2 {
    font-size: 20px;
  }
  .cosmetics-dialog {
    max-height: 94dvh;
  }
  .cosmetic-options fieldset {
    margin-bottom: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .loading-ring {
    animation-duration: 2s;
  }
}

/* Cooperative festival story: one shared objective, without covering controls. */
.mission-card {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 325px;
  padding: 14px 17px 12px;
  background: #faf7e9ed;
  border: 1px solid #fff9;
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.mission-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 7px;
  letter-spacing: 1px;
  font-weight: 800;
  color: #7b846b;
}
.mission-topline button {
  font-size: 8px;
  letter-spacing: 0;
  background: #e7e9d7;
  padding: 5px 8px;
  border-radius: 15px;
  min-height: 27px;
  font-weight: 700;
}
.mission-tools {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.mission-card.is-compact > p,
.mission-card.is-compact .mission-steps {
  display: none;
}
.mission-card.is-compact .mission-progress-track {
  margin-top: 7px;
}
.mission-card.is-compact .mission-target {
  margin-top: 7px;
  padding-top: 6px;
}
@media (min-width: 801px) and (min-height: 621px) {
  /* Keep the mayor's face and the forward view clear. Controls remain at the sides. */
  .mission-card.is-compact {
    top: auto;
    bottom: 112px;
    width: 310px;
    padding: 10px 14px;
  }
}
.mission-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
}
.mission-title-row h2 {
  font-size: 13px;
  margin: 0;
  letter-spacing: 0.3px;
}
.mission-title-row > b {
  font: 800 18px Arial;
  letter-spacing: -0.5px;
  white-space: nowrap;
  color: #527341;
}
.mission-card > p {
  font-size: 8px;
  line-height: 1.7;
  color: #8b917b;
  margin: 5px 0 8px;
}
.mission-progress-track {
  height: 5px;
  border-radius: 8px;
  background: #e1e4d0;
  overflow: hidden;
}
.mission-progress-track i {
  display: block;
  height: 100%;
  background: #b4ad5b;
  border-radius: 8px;
  transition: width 0.35s;
}
.mission-steps {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}
.mission-steps span {
  font-size: 7px;
  font-weight: 700;
  color: #a4a998;
  letter-spacing: 0.3px;
}
.mission-steps .done {
  color: #52835b;
}
.mission-steps .current {
  color: #687333;
}
.mission-target {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #d9deca;
  font-size: 8px;
  color: #7a876c;
}
.mission-target > b {
  font-size: 9px;
  font-weight: 700;
  flex: 1;
}
.mission-target > span:first-child {
  display: inline-grid;
  place-items: center;
  background: #e8e8cd;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 1;
  font-size: 16px;
  color: #60804d;
}
.mission-target > span:last-child {
  font-size: 7px;
  white-space: nowrap;
}
.mission-target.can-ring {
  color: #a5771d;
}
.mission-target.can-ring > span:first-child {
  background: #e4ce7b;
  color: #695728;
}
.mission-card.is-complete {
  background: #f8efccee;
}
.mission-card.is-complete .mission-progress-track i {
  background: #be9e46;
}
.mission-card.is-complete .mission-title-row > b {
  font-size: 12px;
  letter-spacing: 1px;
  color: #a28538;
}
.chapter-arrived {
  animation: chapter-pop 0.7s ease-out;
}
.story-dialog {
  width: min(580px, 94vw);
  max-height: 92dvh;
  overflow-y: auto;
}
.story-letterhead {
  position: relative;
  text-align: center;
  background: #dfe8cc;
  padding: 31px 42px 26px;
  overflow: hidden;
}
.festival-emblem {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  border: 1px solid #90a47d;
  border-radius: 50%;
  font-size: 37px;
  color: #54734a;
  margin: 0 auto 16px;
}
.story-letterhead > .eyebrow {
  justify-content: center;
  font-size: 8px;
  letter-spacing: 1.7px;
  margin-bottom: 14px;
}
.story-letterhead h2 {
  font-size: 28px;
  letter-spacing: -1px;
  margin: 0 0 13px;
}
.story-letterhead > p:last-of-type {
  font-size: 11px;
  line-height: 1.9;
  color: #718164;
  margin: 0;
}
.story-bunting {
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  display: flex;
  justify-content: space-evenly;
  gap: 12px;
  pointer-events: none;
  transform: rotate(-6deg);
  opacity: 0.75;
}
.story-bunting i {
  width: 11px;
  height: 14px;
  background: #e0bd68;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.story-bunting i:nth-child(3n) {
  background: #c58d7a;
}
.story-bunting i:nth-child(3n + 1) {
  background: #9caf84;
}
.story-letter-body {
  padding: 25px 34px 31px;
}
.story-guide {
  display: flex;
  gap: 13px;
  background: #eeeedc;
  border: 1px solid #dfe3cc;
  border-radius: 9px;
  padding: 14px 15px;
}
.guide-stamp {
  flex-shrink: 0;
  width: 32px;
  height: 39px;
  border: 1px dashed #96a77c;
  display: grid;
  place-items: center;
  font: 800 12px/0.8 Georgia;
  color: #799063;
  background: #e4e8cf;
  padding: 6px 0;
  transform: rotate(-7deg);
}
.story-guide b {
  font-size: 9px;
  letter-spacing: 0.4px;
  color: #607649;
}
.story-guide p {
  font-size: 11px;
  line-height: 1.8;
  margin: 6px 0 0;
  color: #5a6d49;
}
.story-chapters {
  list-style: none;
  margin: 18px 0;
  padding: 0;
}
.story-chapters li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #e0e3d1;
}
.chapter-mark {
  font: 800 11px Arial;
  color: #9aa48e;
  border: 1px solid #d3dac4;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.story-chapters li.current .chapter-mark {
  background: #e5cf81;
  border-color: #d0bb73;
  color: #6b6531;
}
.story-chapters li.done .chapter-mark {
  background: #dce7cd;
  border-color: #b7c7a4;
  color: #59804b;
}
.story-chapters li > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.story-chapters li b {
  font-size: 11px;
}
.story-chapters li > div > span {
  font-size: 9px;
  color: #929b83;
}
.story-chapters li > strong {
  font: 800 13px Arial;
  color: #99a18a;
  white-space: nowrap;
}
.story-chapters li.current > strong,
.story-chapters li.done > strong {
  color: #527847;
}
.story-coop-note {
  font-size: 9px;
  line-height: 1.9;
  text-align: center;
  color: #929b84;
  margin: 19px 0 0;
}
.story-letter-body .primary-button > span:first-child {
  font-size: 12px;
  line-height: 1.5;
}
.story-team {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 190px;
  overflow-y: auto;
}
.story-team li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #dce1cf;
  font-size: 10px;
}
.contributor-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55%;
  font-weight: 700;
}
.contributor-name small {
  display: block;
  font-size: 7px;
  font-weight: 400;
  color: #9ba28d;
  margin-top: 3px;
}
.contributor-totals {
  font-size: 8px;
  color: #899575;
  white-space: nowrap;
}
#story-team-section {
  margin: 21px 0 0;
}
#story-team-title {
  font-size: 11px;
  margin: 0 0 8px;
}
.story-cleared .story-letterhead {
  background: #ece0aa;
}
.story-cleared .festival-emblem {
  background: #f7e9b0;
  border-color: #c5ac55;
  color: #aa8c35;
}
.story-cleared .story-letterhead h2 {
  font-size: 34px;
  color: #5c6339;
}
.story-cleared .story-bunting {
  opacity: 1;
}
.festival-complete .game-world {
  border-color: #e4d391;
}
.festival-complete .tip-pill {
  background: #f4e0a4aa;
}
@keyframes chapter-pop {
  0% {
    box-shadow: 0 0 0 0 #ddc36799;
  }
  60% {
    box-shadow: 0 0 0 11px #ddc36720;
  }
  100% {
    box-shadow: var(--shadow);
  }
}
@media (max-width: 1100px) {
  .mission-card {
    width: 288px;
    top: 24px;
    padding: 12px 13px;
  }
  .mission-title-row h2 {
    font-size: 11px;
  }
  .mission-title-row > b {
    font-size: 16px;
  }
  .mission-card > p {
    font-size: 7px;
  }
  .mission-target > b {
    font-size: 8px;
  }
  .mission-target > span:last-child {
    font-size: 6px;
  }
}
@media (max-width: 800px) {
  .mission-card {
    top: auto;
    bottom: 190px;
    left: 129px;
    right: 15px;
    transform: none;
    width: auto;
    max-width: 370px;
    padding: 11px 14px;
  }
  .mission-card > p {
    margin: 4px 0 6px;
  }
  .mission-target {
    margin-top: 7px;
    padding-top: 6px;
  }
  .mission-topline button {
    min-height: 30px;
    padding: 4px 9px;
  }
  .mission-title-row h2 {
    font-size: 12px;
  }
  .mission-steps {
    margin-top: 7px;
  }
  .event-toast {
    top: 37%;
  }
}
@media (max-width: 520px) {
  .mission-card {
    bottom: 163px;
    left: 96px;
    right: 10px;
    padding: 8px 11px;
    border-radius: 10px;
    max-width: none;
  }
  .mission-topline {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .mission-topline button {
    font-size: 7px;
    min-height: 27px;
    padding: 4px 8px;
  }
  .mission-title-row h2 {
    font-size: 10px;
    letter-spacing: 0;
  }
  .mission-title-row > b {
    font-size: 15px;
  }
  .mission-card > p {
    font-size: 6px;
    line-height: 1.6;
    margin: 3px 0 5px;
  }
  .mission-progress-track {
    height: 4px;
  }
  .mission-steps span {
    font-size: 6px;
  }
  .mission-steps {
    margin-top: 6px;
  }
  .mission-target {
    gap: 5px;
    margin-top: 6px;
    padding-top: 5px;
  }
  .mission-target > b {
    font-size: 7px;
  }
  .mission-target > span:first-child {
    width: 17px;
    height: 17px;
    font-size: 14px;
  }
  .mission-target > span:last-child {
    display: none;
  }
  .mission-card.is-complete .mission-title-row > b {
    font-size: 9px;
  }
  .story-letterhead {
    padding: 28px 24px 22px;
  }
  .story-letterhead h2 {
    font-size: 23px;
  }
  .story-letterhead > .eyebrow {
    font-size: 6px;
    letter-spacing: 1.2px;
  }
  .story-letterhead > p:last-of-type {
    font-size: 10px;
  }
  .festival-emblem {
    width: 44px;
    height: 44px;
    font-size: 31px;
    margin-bottom: 13px;
  }
  .story-letter-body {
    padding: 20px 23px 25px;
  }
  .story-guide {
    gap: 10px;
    padding: 12px;
  }
  .story-guide p {
    font-size: 10px;
  }
  .story-chapters li {
    gap: 9px;
    padding: 12px 0;
  }
  .story-chapters li b {
    font-size: 10px;
  }
  .story-chapters li > div > span {
    font-size: 8px;
  }
  .story-chapters li > strong {
    font-size: 11px;
  }
  .chapter-mark {
    width: 25px;
    height: 25px;
    font-size: 9px;
  }
  .story-team li {
    font-size: 9px;
  }
  .contributor-totals {
    font-size: 7px;
  }
  .story-cleared .story-letterhead h2 {
    font-size: 29px;
  }
  .story-coop-note {
    font-size: 8px;
  }
}
@media (max-height: 620px) and (orientation: landscape) {
  .mission-card {
    top: 12px;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 270px;
    max-width: 34vw;
    padding: 8px 11px;
  }
  .mission-topline {
    font-size: 6px;
  }
  .mission-title-row h2 {
    font-size: 9px;
  }
  .mission-title-row > b {
    font-size: 13px;
  }
  .mission-card > p {
    display: none;
  }
  .mission-progress-track {
    margin-top: 7px;
  }
  .mission-target {
    margin-top: 6px;
    padding-top: 5px;
  }
  .mission-target > b {
    font-size: 7px;
  }
  .mission-target > span:last-child {
    display: none;
  }
  .mission-steps span {
    font-size: 6px;
  }
  .mission-topline button {
    min-height: 24px;
  }
  .event-toast {
    top: 41%;
  }
}

/* Compact shared comedy status: facts stay readable, even when the goats don't. */
.chorus-status {
  margin: 10px 0 0;
  border-top: 1px solid #d8ddcc;
  padding-top: 8px;
  color: #617665;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0;
}
.chorus-status.is-ready {
  color: #376b4f;
}
.score-topline > span:first-child {
  min-width: 0;
  max-width: 112px;
  line-height: 1.5;
}
.score-topline .combo {
  flex-shrink: 0;
}
.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
#reduced-motion-button[aria-pressed="true"] {
  border-color: #789576;
  background: #e2ead8;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}
@media (max-width: 800px) {
  .chorus-status {
    font-size: 8px;
    margin-top: 8px;
    padding-top: 6px;
  }
  .score-topline > span:first-child {
    max-width: 92px;
  }
}
@media (max-width: 520px) {
  .chorus-status {
    font-size: 7px;
    line-height: 1.5;
  }
  .score-topline > span:first-child {
    max-width: 74px;
  }
}
@media (max-height: 620px) and (orientation: landscape) {
  .chorus-status {
    font-size: 7px;
    margin-top: 5px;
    padding-top: 5px;
  }
}

/* Expedition v2: generous paper journal; compact, opt-in gameplay HUD. */
.expedition-badges { display:flex; flex-wrap:wrap; gap:7px; margin:18px 0 25px; }
.expedition-badges span { border:1px solid #c9d4bd; color:#5b765b; border-radius:99px; font-size:10px; font-weight:700; padding:6px 10px; }
.journal-button { background:#e8d89a; }
.expedition-status { position:absolute; left:30px; top:316px; width:211px; border:1px solid #fffb; background:#faf8eded; border-radius:10px; overflow:hidden; box-shadow:var(--shadow); }
#expedition-summary { width:100%; padding:10px 12px; display:flex; align-items:center; gap:7px; justify-content:space-between; background:transparent; text-align:left; font-size:10px; font-weight:700; }
#current-zone { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#stamp-count { white-space:nowrap; font-size:8px; background:#e5ebd9; padding:4px 5px; border-radius:4px; }
.rally-status { display:flex; align-items:center; justify-content:space-between; gap:6px; padding:9px 12px; background:#e9dbab; color:#786330; font-size:10px; }
.rally-urgent { background:#ecd0ac; color:#924d38; }
.world-save-status { position:absolute; bottom:12px; right:30px; font-size:8px; font-weight:700; color:#456947; background:#f6f3e4a6; border-radius:4px; padding:3px 6px; }
.world-save-status.save-warning { background:#f6e6be; color:#8f662f; }
.mission-steps { flex-wrap:wrap; column-gap:6px; row-gap:5px; }
.mission-steps span { white-space:nowrap; }
.mission-target { flex-wrap:wrap; }
.mission-target > b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mission-target > span:last-child { max-width:100%; }
.journal-dialog { width:min(850px,95vw); max-height:92dvh; overflow-y:auto; padding:0; }
.journal-header { padding:34px 38px 25px; background:#dfe7ce; border-bottom:1px solid #cfd9bf; }
.journal-header .eyebrow { font-size:8px; letter-spacing:1.6px; color:#6d815d; margin:0 0 12px; }
.journal-header h2 { font-size:32px; letter-spacing:-1px; margin:0 0 10px; }
.journal-header > p:last-of-type { font-size:12px; color:#6e7c61; margin:0; }
.journal-pills { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:19px; }
.journal-pills span,.journal-pills button { border:1px solid #b5c6a4; background:#eef0de; border-radius:6px; font-size:10px; padding:7px 11px; font-weight:700; }
.journal-pills button { margin-left:auto; background:#648166; border-color:#648166; color:#fffbed; }
.journal-body { padding:27px 34px 32px; display:grid; gap:29px; }
.journal-body h3 { margin:0; font-size:16px; }
.journal-section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.journal-section-heading > span { font-size:12px; font-weight:800; color:#718466; }
.journal-note { color:#79836f; font-size:11px; line-height:1.8; margin:10px 0 14px; }
#journal-map { display:block; width:100%; height:auto; background:#e8ecdc; border:1px solid #d1dcc6; border-radius:10px; }
.journal-zones { margin-top:12px; display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.journal-zone { position:relative; display:flex; text-align:left; align-items:flex-start; gap:9px; padding:13px 11px 24px; min-height:126px; border:1px solid #d9dece; border-left:3px solid var(--zone-color); border-radius:7px; background:#fbfaef; }
.journal-zone:last-child { grid-column:1 / -1; min-height:96px; }
.journal-zone.is-tracked { border-color:#6b8b65; background:#edf0de; }
.zone-number { flex-shrink:0; width:25px; height:25px; display:grid; place-items:center; border:1px solid #c7d0bb; color:#7b8b6a; border-radius:50%; font:800 10px Arial; }
.zone-copy { display:grid; gap:5px; }
.zone-copy b { font-size:12px; }
.zone-copy > span { font-size:9px; color:#849071; }
.zone-copy small { color:#6f7d66; font-size:10px; line-height:1.65; }
.zone-stamp { position:absolute; bottom:9px; right:12px; font-size:9px; font-weight:700; color:#9c9271; }
.is-stamped .zone-stamp { color:#5c815c; }
.is-stamped .zone-number { color:#f6f5e8; border-color:#7d9b72; background:#7d9b72; }
.journal-rally { padding:20px; border:1px solid #dfd4af; background:#f1ecd6; border-radius:10px; }
.journal-rally .eyebrow { font-size:8px; letter-spacing:1px; color:#9c864d; margin:0 0 9px; }
#journal-rally-instruction { color:#7a755b; font-size:11px; line-height:1.8; }
.rally-records { display:flex; gap:26px; border-block:1px solid #ddd6b7; padding:12px 0; margin:15px 0 0; }
.rally-records > div { display:grid; gap:6px; }
.rally-records span { font-size:8px; font-weight:700; color:#9b916b; letter-spacing:1px; }
.rally-records b { font-size:21px; color:#7f6d38; }
.journal-rally .secondary-button { width:auto; padding:11px 17px; font-size:11px; }
.journal-rewards { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.journal-reward { display:grid; align-content:start; gap:8px; padding:15px 11px; border:1px dashed #d1d9c5; background:#eeeee2; border-radius:8px; text-align:center; }
.journal-reward.is-earned { background:#f3e8bd; border:1px solid #d9c781; }
.reward-glyph { font:800 32px Georgia; color:#929b82; }
.is-earned .reward-glyph { color:#9f7935; }
.journal-reward b { font-size:11px; }
.journal-reward > span:not(.reward-glyph) { color:#8a8e78; font-size:9px; }
.journal-reward small { font-size:8px; font-weight:700; color:#7a896b; }
.journal-save { border-top:1px solid #dfe1d2; padding-top:21px; }
#journal-save-copy { font-size:11px; line-height:1.8; color:#6e7c65; }
.storage-copy { color:#7b856e; line-height:1.8; }
.wardrobe-note { font-size:10px; line-height:1.7; color:#7c866f; margin:10px 0 0; }
#hat-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
#hat-options button { min-height:72px; font-size:10px; padding:10px 6px; }
#hat-options button > small { display:block; font-size:8px; line-height:1.4; margin-top:5px; color:#7b866d; }
#hat-options button.is-locked { opacity:.7; cursor:not-allowed; border-style:dashed; background:#eeeee4; }
.contributor-totals { line-height:1.7; max-width:68%; }
@media (max-width:1100px) and (min-width:801px) {
  .game-world { max-width:45vw; }
  .expedition-status { width:185px; }
}
@media (max-width:800px) {
  .expedition-status { left:15px; top:270px; width:180px; }
  #expedition-summary { font-size:9px; padding:9px 10px; }
  #stamp-count { font-size:7px; }
  .world-save-status { right:18px; font-size:7px; }
  .game-world { max-width:calc(100% - 219px); }
  .world-title > span:first-of-type { max-width:140px; }
  .journal-body { padding:24px; }
}
@media (max-width:520px) {
  .game-top { gap:7px; }
  .game-world { max-width:calc(100% - 173px); padding:9px 10px; }
  .game-menu { gap:4px; }
  .round-button { width:30px; height:34px; }
  .game-brand { font-size:15px; }
  .world-title { flex-wrap:wrap; row-gap:4px; margin-top:4px; }
  .world-title > span:first-of-type { max-width:95px; }
  .count-badge { font-size:6px; }
  .expedition-status { top:235px; left:10px; width:149px; border-radius:8px; }
  #expedition-summary { font-size:8px; padding:7px; gap:3px; }
  #stamp-count { font-size:6px; padding:3px; }
  .rally-status { font-size:8px; padding:7px; }
  .world-save-status { right:10px; bottom:11px; font-size:6px; padding:2px 4px; max-width:47vw; }
  .mission-target > span:last-child { display:block; white-space:normal; font-size:7px; width:100%; padding-left:22px; margin-top:-2px; }
  .mission-target > b { font-size:8px; }
  .mission-card.is-compact { padding:8px 10px; }
  .journal-dialog { width:96vw; max-height:94dvh; }
  .journal-header { padding:30px 20px 20px; }
  .journal-header h2 { font-size:25px; }
  .journal-header .eyebrow { font-size:6px; letter-spacing:1px; }
  .journal-header > p:last-of-type { font-size:10px; }
  .journal-body { padding:20px 17px 24px; gap:25px; }
  .journal-zones { grid-template-columns:1fr; }
  .journal-zone,.journal-zone:last-child { min-height:108px; padding:12px 11px 25px; }
  .journal-body h3 { font-size:14px; }
  .journal-note { font-size:10px; }
  .journal-rally { padding:16px; }
  .journal-rewards { grid-template-columns:1fr; }
  .journal-reward { grid-template-columns:40px 1fr; text-align:left; column-gap:10px; padding:13px; }
  .reward-glyph { grid-row:span 3; align-self:center; text-align:center; }
  .journal-pills { gap:6px; }
  .journal-pills span,.journal-pills button { font-size:9px; padding:6px 8px; }
  #clear-waypoint { font-size:8px; padding:7px; }
}
@media (max-height:740px) and (min-width:801px) {
  .expedition-status { top:auto; left:164px; bottom:207px; }
}
@media (max-height:620px) and (orientation:landscape) {
  .game-world { max-width:200px; }
  .expedition-status { top:auto; left:auto; right:15px; bottom:137px; width:170px; }
  .world-save-status { bottom:6px; }
  #expedition-summary { padding:6px 9px; font-size:8px; }
  .rally-status { padding:6px 9px; font-size:8px; }
  .mission-card { max-width:35vw; }
  .mission-target > span:last-child { display:block; width:100%; font-size:7px; padding-left:23px; }
}
@media (max-width:520px) and (max-height:700px) {
  .expedition-status { top:221px; }
  .compass { bottom:190px; }
}
.action-button.lick { background:#dfc7d4; }
@media (max-width:520px) {
  .action-controls { display:grid; grid-template-columns:repeat(2,60px); align-items:center; gap:6px; width:126px; padding:0; }
  .action-controls .action-button, .action-controls .action-button.bleat, .action-controls .action-button.jump, .action-controls .action-button.charge { position:static; width:60px; min-width:60px; height:60px; }
  .action-controls .action-button b { font-size:8px; }
}
@media (max-height:620px) and (orientation:landscape) {
  .action-controls { display:flex; width:auto; }
  .action-controls .action-button, .action-controls .action-button.bleat, .action-controls .action-button.jump, .action-controls .action-button.charge { position:static; width:57px; min-width:57px; height:57px; }
}
.economy-hud { position:absolute; right:30px; top:316px; display:flex; align-items:center; flex-wrap:wrap; gap:7px; width:210px; border-radius:9px; padding:10px 12px; background:#f4eed5eb; border:1px solid #fff9; text-align:left; font-size:9px; }
.economy-hud > span:first-child { width:100%; font-size:7px; color:#879274; letter-spacing:1px; }
.economy-hud b { font-size:13px; color:#6e7956; }
.economy-hud i { font-style:normal; }
.economy-hud > span:last-child { margin-left:auto; font-size:8px; }
.economy-dialog { width:min(810px,95vw); max-height:92dvh; padding:0; overflow-y:auto; }
.economy-header { background:#e8dfbe; padding:30px 34px 23px; }
.economy-header .eyebrow { font-size:8px; color:#9d8753; letter-spacing:1.4px; margin:0 0 12px; }
.economy-header h2 { margin:0 0 10px; font-size:29px; letter-spacing:-1px; }
.economy-header > p:last-of-type { margin:0; font-size:11px; color:#7e7b5f; }
.economy-wallet { display:flex; gap:12px; margin-top:20px; }
.economy-wallet span { display:flex; align-items:center; gap:15px; padding:10px 15px; background:#faf5df; border:1px solid #d8cfa9; border-radius:7px; font-size:11px; font-weight:700; }
.economy-wallet b { font-size:24px; color:#8f7838; }
.economy-body { padding:24px 30px 30px; }
.economy-tabs { display:flex; border:1px solid #d8ddcb; background:#e9eddd; border-radius:8px; padding:4px; gap:4px; }
.economy-tabs button { flex:1; min-height:39px; font-size:12px; background:transparent; border-radius:5px; font-weight:700; }
.economy-tabs button.selected { color:#fffbe9; background:#668265; }
.economy-tabs button span { font-size:9px; margin-left:4px; }
.economy-body h3 { font-size:17px; margin:22px 0 8px; }
.economy-result { margin:14px 0 0; border-radius:7px; padding:0; font-size:12px; line-height:1.8; }
.economy-result:not(:empty) { padding:12px; background:#e8eddb; border:1px solid #d7dfc7; }
.economy-result[data-status="error"] { background:#f1dfcc; color:#8d6044; }
.economy-result[data-status="pending"] { background:#f2e9ca; color:#8e783f; }
.gadget-list { display:grid; gap:10px; }
.gadget-card { display:flex; gap:13px; align-items:center; padding:17px 14px; background:#f5f4e8; border:1px solid #dcded0; border-radius:8px; }
.gadget-icon { flex-shrink:0; display:grid; place-items:center; font-size:28px; width:47px; height:47px; background:#e3e9d6; border-radius:50%; }
.gadget-card > div { flex:1; }
.gadget-card b { font-size:13px; }
.gadget-card p { font-size:10px; line-height:1.7; color:#758169; margin:6px 0; }
.gadget-card small { font-size:9px; font-weight:700; color:#879174; }
.gadget-card button { flex-shrink:0; font-size:10px; padding:10px; max-width:170px; }
.gadget-card button:disabled { cursor:not-allowed; }
.economy-body .secondary-button { width:auto; padding:11px 17px; font-size:11px; }
.gacha-machine-symbol { display:grid; place-items:center; width:180px; height:150px; margin:22px auto; border:1px solid #cbb9ce; background:linear-gradient(#ebdbe8 60%,#c8acbd 60%); border-radius:70px 70px 15px 15px; color:#88627e; font:700 70px Georgia; box-shadow:0 5px 0 #ab8a9e; }
.gacha-machine-symbol span { font:700 11px Arial,sans-serif; color:#fff6e9; }
.gacha-odds { background:#e9eddd; border:1px solid #d7ddc8; border-radius:6px; padding:13px; font-size:12px; line-height:1.8; font-weight:700; }
.gacha-rules { margin:20px 0; padding:14px; border:1px solid #dddac8; border-radius:7px; font-size:11px; color:#787a63; }
.gacha-rules summary { cursor:pointer; font-weight:700; }
.gacha-rules p { line-height:1.9; }
.catalog-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.catalog-card { position:relative; display:grid; gap:7px; padding:15px 13px 30px; border:1px dashed #cfd5c4; border-top:4px solid var(--rarity-color); border-radius:7px; background:#efefe4; color:#89907b; }
.catalog-card.is-owned { background:#fbf9ec; color:#3d5d48; border-style:solid; }
.catalog-glyph { font-size:23px; }
.catalog-card b { font-size:12px; }
.catalog-card small { font-size:8px; }
.catalog-card p { font-size:9px; line-height:1.7; margin:0; }
.catalog-owned { position:absolute; bottom:10px; right:12px; font-size:9px; font-weight:700; }
.contract-card { margin-top:27px; padding:17px; background:#e7ecd9; border:1px solid #d0dbc0; border-radius:9px; display:grid; grid-template-columns:1fr auto; gap:10px; }
.contract-card .eyebrow { margin:0; font-size:7px; letter-spacing:1px; color:#8a9979; }
.contract-card h3 { margin:8px 0 0; font-size:13px; }
.contract-card > b { font-size:22px; align-self:center; color:#7b8a60; }
.contract-card > p,.contract-card > small { grid-column:1/-1; margin:0; font-size:10px; line-height:1.7; color:#79886b; }
#pattern-options,#voice-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
#pattern-options button,#voice-options button { font-size:10px; min-height:46px; padding:8px; }
#pattern-options small,#voice-options small { display:block; margin-top:5px; font-size:8px; color:#8c927c; }
.option-grid .is-locked { cursor:not-allowed; opacity:.7; border-style:dashed; }
#preview-voice { margin-top:10px; }
/* Keep the model independent of the growing collectible option list. */
.cosmetics-dialog { height:min(720px, 92dvh); overflow:hidden; }
.cosmetics-layout { height:100%; min-height:0; grid-template-columns:1fr 1fr; }
.cosmetic-preview-wrap { height:100%; min-height:0; }
.cosmetic-options { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
@media (max-width:520px) and (orientation:portrait) {
  .cosmetics-layout { grid-template-columns:1fr; grid-template-rows:minmax(155px, 28dvh) minmax(0, 1fr); }
  .cosmetic-preview-wrap { height:100%; min-height:0; }
}
@media (max-width:800px) { .economy-hud { right:15px; top:270px; width:168px; } }
@media (max-width:520px) {
  .economy-hud { right:10px; top:235px; width:140px; padding:7px; gap:5px; }
  .economy-hud > span:first-child { font-size:6px; }
  .economy-hud b { font-size:10px; }
  .economy-hud > span:last-child { font-size:7px; }
  .leaderboard li:nth-child(n+4) { display:none; }
  .economy-header { padding:28px 20px 20px; }
  .economy-header h2 { font-size:25px; }
  .economy-header > p:last-of-type { font-size:10px; line-height:1.7; }
  .economy-header .eyebrow { font-size:6px; letter-spacing:1px; }
  .economy-wallet { gap:7px; }
  .economy-wallet span { padding:8px; font-size:9px; gap:10px; }
  .economy-wallet b { font-size:20px; }
  .economy-body { padding:18px 16px 25px; }
  .economy-tabs button { font-size:10px; }
  .economy-tabs button span { display:block; font-size:8px; margin:2px 0 0; }
  .gadget-card { flex-wrap:wrap; padding:13px; gap:9px; }
  .gadget-card > div { min-width:170px; }
  .gadget-card button { margin-left:56px; }
  .gadget-card b { font-size:12px; }
  .gadget-icon { width:42px; height:42px; }
  .catalog-grid { grid-template-columns:repeat(2,1fr); gap:8px; }
  .catalog-card { padding:13px 10px 29px; }
  .catalog-card b { font-size:10px; }
  .gacha-odds { font-size:10px; }
  .journal-pills button { margin-left:0; }
}
@media (max-width:520px) and (max-height:700px) { .economy-hud { top:221px; } }
@media (max-height:620px) and (orientation:landscape) { .economy-hud { top:260px; right:auto; left:15px; width:170px; } }
.boss-status { margin-top:8px; padding:7px 9px; background:#efe1c4; border-radius:5px; color:#997044; font-size:9px; font-weight:700; line-height:1.6; }
.boss-status.is-open { color:#3f7754; background:#dfead5; }
.journal-bosses { display:grid; gap:10px; }
.journal-boss { padding:16px; background:#ebe8d6; border:1px solid #d6d8c1; border-radius:8px; }
.journal-boss > b { font-size:13px; }
.journal-boss p { font-size:11px; line-height:1.8; color:#79826a; }
@media (max-width:520px) { .boss-status { margin-top:5px; padding:5px 6px; font-size:7px; } }
.economy-save-warning { padding:12px; border:1px solid #d4bc83; border-radius:7px; background:#f0e3bf; color:#8a713f; font-size:11px; line-height:1.8; }
.economy-hud.is-pending { background:#efe0b7; border-color:#d4b978; }
.action-stack { display:grid; justify-items:end; gap:9px; pointer-events:none; }
.move-controls { position:relative; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; width:100%; max-width:340px; pointer-events:auto; }
.skill-button { min-width:0; min-height:56px; display:grid; align-content:center; gap:3px; padding:7px 5px; border:1px solid #fff9; border-radius:9px; background:#e9e3cfed; color:#4b6753; box-shadow:0 3px 0 #254f3b25; touch-action:none; }
.skill-button kbd { font:700 8px Arial,sans-serif; color:#8a876c; }
.skill-button b { font-size:11px; }
.skill-button small { font-size:8px; line-height:1.3; min-height:11px; }
.skill-button.is-unavailable { background:#dce1d6e8; color:#7c8775; }
.skill-button.is-locked { border-style:dashed; }
.skill-button.is-charging { background:#f1d491; border-color:#cbab58; color:#856628; }
.skill-button:active { transform:translateY(1px); }
.move-charge-panel { position:absolute; bottom:calc(100% + 7px); right:0; width:240px; padding:8px; border:1px solid #e5cc80; border-radius:8px; background:#faf0cceF; display:flex; gap:9px; align-items:center; }
.move-charge-panel > div { flex:1; min-width:0; }
.move-charge-panel span { font-size:10px; font-weight:700; color:#8b733b; }
.move-charge-track { height:5px; background:#ded4b7; border-radius:5px; overflow:hidden; margin-top:7px; }
.move-charge-track i { display:block; height:100%; width:0; background:#c89f43; }
#move-cancel { flex-shrink:0; width:40px; height:40px; border-radius:7px; background:#eee1b9; font-size:23px; color:#806746; }
.moves-help { margin:24px 0; padding:15px; border-radius:8px; background:#e9eddd; }
.moves-help h3 { font-size:14px; margin:0 0 12px; }
.moves-help ul { list-style:none; padding:0; margin:0; }
.moves-help li + li { margin-top:14px; }
.moves-help b { font-size:11px; }
.moves-help p { font-size:10px; line-height:1.8; margin:5px 0 0; color:#79846c; }
@media (max-width:800px) {
  .game-tip { display:none; }
  .move-controls { max-width:290px; }
  .skill-button { min-height:50px; }
}
@media (max-width:520px) {
  .action-stack { width:156px; flex-shrink:0; gap:8px; }
  .move-controls { width:156px; gap:4px; }
  .skill-button { min-height:52px; padding:5px 2px; border-radius:8px; gap:2px; }
  .skill-button kbd { font-size:6px; }
  .skill-button b { font-size:8px; }
  .skill-button small { font-size:6px; min-height:14px; }
  .move-charge-panel { width:190px; padding:6px; }
  .move-charge-panel span { font-size:8px; }
  #move-cancel { width:36px; height:36px; }
}
@media (max-height:620px) and (orientation:landscape) {
  .action-stack { gap:6px; }
  .move-controls { width:246px; max-width:246px; gap:5px; }
  .skill-button { min-height:42px; padding:4px; gap:2px; }
  .skill-button b { font-size:9px; }
  .skill-button small { font-size:7px; }
  .skill-button kbd { font-size:6px; }
}
.economy-hud.is-pending > span:first-child { color:#876632; letter-spacing:0; }

/* First-play guidance stays inside the existing HUD and never gates play. */
.story-briefing { display:none; }
.story-dialog.is-briefing { width:min(470px,94vw); max-height:92dvh; overflow:hidden; }
.story-dialog.is-briefing > .story-letterhead,.story-dialog.is-briefing > .story-letter-body { display:none; }
.is-briefing .story-briefing { display:flex; flex-direction:column; max-height:90dvh; }
.briefing-body { padding:29px 30px 10px; overflow-y:auto; min-height:0; }
.briefing-body .eyebrow { font-size:9px; margin:0 35px 13px 0; }
.briefing-body h2 { margin:0 0 12px; font-size:31px; }
.briefing-premise { font-size:13px; line-height:1.8; margin:0 0 16px; color:#66785b; }
.briefing-objective { display:grid; gap:7px; padding:14px; background:#e7ebd7; border:1px solid #cbd6ba; border-radius:10px; }
.briefing-objective small { font-size:10px; color:#71845e; }
.briefing-objective b { font-size:16px; }
.briefing-objective p { font-size:12px; line-height:1.7; margin:0; }
.briefing-controls { list-style:none; display:grid; gap:10px; padding:0; margin:17px 0 11px; }
.briefing-controls li { display:flex; align-items:center; gap:13px; font-size:12px; }
.briefing-controls b { width:112px; color:#55724c; }
.briefing-note { color:#7a856d; font-size:10px; line-height:1.7; margin:0; }
.briefing-actions { flex:none; display:grid; gap:5px; padding:10px 30px 16px; background:var(--cream); }
.briefing-actions .primary-button { margin:0; min-height:48px; }
.briefing-actions .text-button { min-height:36px; font-size:10px; }
.first-steps { display:flex; align-items:center; gap:7px; margin-top:8px; border-top:1px dashed #b3c3a3; padding-top:6px; }
.first-steps p { flex:1; min-width:0; margin:0; display:grid; gap:4px; font-size:10px; line-height:1.6; }
.first-steps p > b { color:#557449; font-size:10px; }
.first-steps p > span { color:#66765b; }
#first-steps-skip { flex-shrink:0; width:40px; height:44px; border-radius:8px; background:#e6ead9; font-size:19px; }
.movement-controls { position:relative; }
.camera-reset { grid-column:1; grid-row:1; display:grid; align-content:center; gap:3px; border:1px solid #fff9; border-radius:9px; background:#edf0e1ed; font-size:9px; font-weight:700; box-shadow:0 3px 0 #254f3b25; }
.camera-reset kbd { font:700 8px Arial,sans-serif; color:#6f8168; }
.skill-button.is-ready-to-fire { outline:2px solid #6f9158; background:#e4edb9; }
.move-charge-track { position:relative; }
.move-charge-track::after { content:""; position:absolute; left:40%; top:0; bottom:0; width:2px; background:#46653b; }
.move-charge-track.is-ready i { background:#69914e; }
@media (max-width:520px) {
  .briefing-body { padding:25px 20px 9px; }
  .briefing-body h2 { font-size:27px; }
  .briefing-premise { font-size:12px; margin-bottom:13px; }
  .briefing-objective { padding:11px; }
  .briefing-objective b { font-size:14px; }
  .briefing-objective p { font-size:11px; }
  .briefing-controls { gap:8px; margin-top:13px; }
  .briefing-controls li { font-size:10px; gap:9px; }
  .briefing-controls b { width:100px; }
  .briefing-actions { padding:9px 20px 12px; }
  .first-steps { gap:4px; margin-top:6px; padding-top:4px; }
  .first-steps p,.first-steps p > b { font-size:9px; }
  #first-steps-skip { width:30px; }
  .camera-reset { font-size:8px; }
}
@media (max-height:620px) and (orientation:landscape) {
  .is-briefing .briefing-body { padding-top:19px; }
  .briefing-body h2 { font-size:24px; }
  .briefing-premise { display:none; }
  .briefing-controls { grid-template-columns:1fr; gap:4px; margin:10px 0; }
  .first-steps p,.first-steps p > b { font-size:8px; }
}
