@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");
:root {
  --ink: #25372c;
  --muted: #7a8177;
  --paper: #f8f6ef;
  --line: #ddded3;
  --green: #c7ef76;
  --dark: #294936;
  --orange: #fd8a50;
  --purple: #ded3f1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #7c66b7;
  outline-offset: 4px;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
.header {
  height: 100px;
  max-width: 1440px;
  margin: auto;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -1.7px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 13px 13px 13px 6px;
  font-size: 34px;
  line-height: 1;
  position: relative;
}
.brand-icon > span {
  position: absolute;
  font-size: 15px;
  letter-spacing: 3px;
  top: 0;
  left: 9px;
}
.brand-dot {
  font-size: 12px;
  align-self: flex-start;
  letter-spacing: 0;
  margin: 6px 0 0 -5px;
}
.quiet {
  background: transparent;
  padding: 12px 0;
  font-weight: 600;
  font-size: 13px;
}
.quiet span {
  margin-left: 12px;
}
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 44px 4% 60px;
  min-height: calc(100svh - 180px);
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow:before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin-bottom: 35px;
}
.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(45px, 5.6vw, 76px);
  letter-spacing: -4px;
  line-height: 1.02;
  margin: 15px 0;
}
.hero h1 em {
  font-style: normal;
  position: relative;
  z-index: 0;
}
.hero h1 em:after {
  content: "";
  position: absolute;
  background: var(--green);
  height: 21px;
  bottom: 7px;
  left: -5px;
  right: -7px;
  z-index: -1;
  transform: rotate(-2deg);
}
.hero-copy {
  max-width: 350px;
  justify-self: end;
  padding-top: 16px;
  line-height: 1.7;
  color: #6f796e;
}
.hero-copy p {
  margin: 0 0 16px;
}
.mini-tag {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 10px;
  margin-right: 6px;
  color: var(--ink);
  white-space: nowrap;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}
.section-head h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0;
}
.section-head h2 span {
  font-family: "Space Grotesk";
  font-size: 11px;
  letter-spacing: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  padding: 4px 7px;
  margin-right: 9px;
}
.section-head > span {
  font-size: 12px;
  color: var(--muted);
}
.rooms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
}
.room-card {
  padding: 0;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.room-card:hover {
  transform: translateY(-5px);
}
.room-card.selected {
  border: 2px solid var(--dark);
  box-shadow: 0 5px 0 #d2dfc4;
}
.room-card .room-image {
  aspect-ratio: 1.15;
  overflow: hidden;
  background: #dfd9eb;
}
.room-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.room-card:hover img {
  transform: scale(1.06);
}
.room-info {
  padding: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.room-info b {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.room-info small {
  color: var(--muted);
  font-size: 11px;
}
.room-info .arrow {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.selected .arrow {
  background: var(--green);
  border-color: var(--green);
}
.room-label {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #ffffffdf;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 5px;
  letter-spacing: 1px;
}
.start-row {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.start-note {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}
.start-note i {
  font-style: normal;
  font-size: 22px;
  color: #9eaa7b;
}
.primary {
  background: var(--dark);
  color: #fff;
  border-radius: 10px;
  padding: 16px 24px;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.2s;
}
.primary:hover {
  background: #3d6245;
  transform: translateY(-1px);
}
.primary.lime {
  background: var(--green);
  color: var(--ink);
}
.primary.lime:hover {
  background: #d6f69e;
}
.rules-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 26px;
  gap: 30px;
}
.rule {
  display: flex;
  align-items: center;
  gap: 13px;
}
.rule-icon {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: #eee8df;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.rule:nth-child(2) .rule-icon {
  background: var(--purple);
}
.rule:nth-child(3) .rule-icon {
  background: var(--green);
}
.rule b {
  font-size: 12px;
}
.rule p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0;
  line-height: 1.5;
}
footer {
  max-width: 1320px;
  padding: 22px 4%;
  margin: auto;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
footer span:last-child {
  letter-spacing: 1.5px;
  font-size: 9px;
}
footer i {
  font-style: normal;
  color: var(--ink);
  font-size: 17px;
  margin-left: 10px;
}
.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}
.game-top h1 {
  font-family: "Space Grotesk";
  font-size: 32px;
  letter-spacing: -1.5px;
  margin: 7px 0;
}
.game-top p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.steps {
  display: flex;
  gap: 14px;
  color: #9a9f94;
  font-size: 11px;
}
.steps .active {
  color: var(--ink);
  font-weight: 700;
}
.timer {
  font-family: "Space Grotesk";
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  font-size: 24px;
  min-width: 105px;
  text-align: center;
  white-space: nowrap;
}
.timer.urgent {
  color: #b34736;
  background: #ffebe3;
  border-color: #f1c1ae;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}
.stage-wrap {
  min-width: 0;
}
.stage {
  width: 100%;
  aspect-ratio: 3/2;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #342741;
  touch-action: none;
  isolation: isolate;
}
.stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.stage-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: #fffdf1e6;
  border-radius: 30px;
  font-size: 10px;
  padding: 8px 14px;
  pointer-events: none;
  white-space: nowrap;
}
.stage-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.zoom-controls button,
.tool-button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
}
.sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 19px;
}
.sidebar h3 {
  font-size: 13px;
  margin: 0 0 14px;
}
.pose-tabs {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  margin-bottom: 10px;
}
.pose-tabs button {
  padding: 6px 8px;
  background: var(--paper);
  border-radius: 5px;
  font-size: 9px;
  white-space: nowrap;
}
.pose-tabs .active {
  background: var(--green);
}
.poses {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.pose {
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 7px;
  height: 61px;
  padding: 5px;
}
.pose.active {
  background: #eff9dc;
  border-color: #78934c;
}
.pose canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin: 20px 0 10px;
  color: #687361;
}
.sidebar input[type="range"] {
  width: 100%;
  accent-color: var(--dark);
}
.sidebar .primary {
  width: 100%;
  margin-top: 22px;
  padding: 14px;
  font-size: 12px;
  gap: 15px;
}
.tip {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 15px 0 0;
}
.tip b {
  color: var(--ink);
}
.view-toggle {
  display: flex;
  background: #e8e9df;
  padding: 4px;
  border-radius: 9px;
  gap: 4px;
  margin-bottom: 12px;
}
.view-toggle button {
  flex: 1;
  padding: 10px;
  font-size: 11px;
  border-radius: 6px;
  background: transparent;
}
.view-toggle .active {
  background: #fff;
  box-shadow: 0 2px 5px #25372c10;
}
.paint-stage {
  background: #e8e6df;
  background-image:
    linear-gradient(45deg, #dcded544 25%, transparent 25%),
    linear-gradient(-45deg, #dcded544 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dcded544 75%),
    linear-gradient(-45deg, transparent 75%, #dcded544 75%);
  background-size: 24px 24px;
  background-position:
    0 0,
    0 12px,
    12px -12px,
    -12px 0;
}
.tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.tools button {
  padding: 10px 4px;
  border-radius: 8px;
  background: var(--paper);
  font-size: 10px;
  border: 1px solid transparent;
}
.tools button.active {
  border-color: var(--dark);
  background: #eff9dc;
}
.tools button span {
  display: block;
  font-size: 19px;
  margin-bottom: 4px;
}
.palette {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin-top: 12px;
}
.swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--line);
}
.swatch.active {
  box-shadow: 0 0 0 2px var(--ink);
}
.custom-color {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  font-size: 11px;
  color: var(--muted);
}
input[type="color"] {
  padding: 0;
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  cursor: pointer;
}
.small-actions {
  display: flex;
  gap: 6px;
  margin-top: 15px;
}
.small-actions button {
  flex: 1;
  background: var(--paper);
  padding: 9px;
  border-radius: 7px;
  font-size: 10px;
}
.share-layout {
  max-width: 860px;
  margin: auto;
}
.share-head {
  text-align: center;
  margin: 0 auto 25px;
}
.share-head .eyebrow {
  justify-content: center;
}
.share-head h1 {
  font-family: "Space Grotesk";
  font-size: 45px;
  letter-spacing: -2px;
  margin: 14px 0 10px;
}
.share-head p {
  color: var(--muted);
  font-size: 13px;
}
.share-box {
  margin: 20px 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 10px;
}
.share-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: var(--paper);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
}
.share-box .primary {
  padding: 12px 18px;
  gap: 8px;
}
.center-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.stat {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.stat b {
  font-family: "Space Grotesk";
  font-size: 28px;
  display: block;
}
.stat span {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  color: var(--muted);
}
.find-stage {
  max-width: 980px;
  margin: auto;
}
.finder-bar {
  display: flex;
  align-items: center;
  gap: 18px;
}
.finder-bar .taps {
  font-size: 12px;
  white-space: nowrap;
}
.finder-intro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #24332c75;
  backdrop-filter: blur(8px);
  color: #fff;
  text-align: center;
  padding: 20px;
}
.finder-intro h2 {
  font-family: "Space Grotesk";
  font-size: 34px;
  letter-spacing: -1.5px;
  margin: 0 0 10px;
}
.finder-intro p {
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 22px;
}
.finder-intro .eyebrow {
  margin-bottom: 18px;
}
.history {
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.history h3 {
  font-size: 13px;
}
.history-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 35px;
  max-width: 430px;
  width: calc(100% - 32px);
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: #20372c70;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-family: "Space Grotesk";
  font-size: 45px;
  letter-spacing: -2px;
  line-height: 1.1;
}
dialog p {
  line-height: 1.7;
  font-size: 13px;
  color: #6e776a;
}
dialog .primary {
  width: 100%;
  margin-top: 10px;
}
.close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  font-size: 28px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 30px);
  background: var(--ink);
  color: white;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 12px;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
  z-index: 20;
  max-width: 90vw;
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.loading {
  text-align: center;
  padding: 120px 20px;
  color: var(--muted);
}
.error-card {
  padding: 40px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.key {
  background: var(--green);
  padding: 3px 7px;
  border-radius: 5px;
}
.stage-note {
  font-size: 10px;
  text-align: center;
  color: var(--muted);
  margin-top: 10px;
}
.active-pill {
  background: var(--green);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 10px;
}
.sheet-note {
  font-size: 9px;
  color: var(--muted);
  margin-top: 10px;
}
@media (min-width: 1500px) {
  main {
    padding-top: 55px;
  }
  .rooms {
    gap: 23px;
  }
  .room-card .room-image {
    aspect-ratio: 1.07;
  }
}
@media (max-width: 800px) {
  .header {
    height: 78px;
    padding: 0 6%;
  }
  main {
    padding: 30px 5% 40px;
  }
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .hero h1 {
    font-size: 52px;
    letter-spacing: -3px;
  }
  .hero-copy {
    font-size: 12px;
  }
  .rooms {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .room-card .room-image {
    aspect-ratio: 1.6;
  }
  .rules-strip {
    gap: 15px;
  }
  .rule {
    align-items: flex-start;
    gap: 9px;
  }
  .rule-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }
  .rule p {
    font-size: 10px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 15px;
  }
  .sidebar {
    padding: 14px;
  }
  .steps {
    gap: 9px;
    font-size: 9px;
  }
  .game-top h1 {
    font-size: 26px;
  }
}
@media (max-width: 580px) {
  .brand {
    font-size: 24px;
  }
  .quiet {
    font-size: 11px;
  }
  .header {
    height: 73px;
  }
  .hero {
    display: block;
    margin-bottom: 27px;
  }
  .hero h1 {
    font-size: 53px;
    line-height: 1.02;
    margin: 17px 0;
  }
  .hero-copy {
    padding-top: 0;
    max-width: none;
    font-size: 12px;
  }
  .hero-copy p {
    margin-bottom: 12px;
  }
  .mini-tag {
    font-size: 9px;
    padding: 5px 8px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .section-head {
    margin-bottom: 13px;
  }
  .section-head h2 {
    font-size: 15px;
  }
  .section-head > span {
    font-size: 10px;
  }
  .room-card .room-image {
    aspect-ratio: 1.18;
  }
  .room-info {
    padding: 12px;
  }
  .room-info b {
    font-size: 12px;
  }
  .room-info small {
    font-size: 9px;
  }
  .room-label {
    font-size: 8px;
    left: 8px;
    top: 8px;
  }
  .room-info .arrow {
    width: 23px;
    height: 23px;
    font-size: 12px;
  }
  .start-row {
    gap: 14px;
    align-items: flex-start;
  }
  .start-note {
    font-size: 10px;
    max-width: 150px;
    line-height: 1.6;
  }
  .primary {
    font-size: 12px;
    padding: 15px 19px;
    gap: 18px;
  }
  .rules-strip {
    grid-template-columns: 1fr;
    margin-top: 28px;
    padding-top: 23px;
    gap: 18px;
  }
  .rule {
    align-items: center;
  }
  .rule-icon {
    width: 34px;
    height: 34px;
  }
  .rule p {
    font-size: 11px;
  }
  .rule b {
    font-size: 12px;
  }
  footer {
    padding: 18px 5%;
    font-size: 9px;
  }
  footer span:last-child {
    font-size: 8px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .stage-wrap {
    width: 100%;
  }
  .sidebar {
    width: 100%;
    padding: 17px;
  }
  .poses {
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
  }
  .pose {
    height: 48px;
    padding: 2px;
  }
  .sidebar .primary {
    margin-top: 15px;
  }
  .control-label {
    margin-top: 14px;
  }
  .game-top {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .game-top h1 {
    font-size: 25px;
  }
  .game-top p {
    font-size: 11px;
    max-width: 230px;
    line-height: 1.6;
  }
  .steps {
    font-size: 9px;
  }
  .timer {
    font-size: 21px;
    padding: 9px 11px;
    min-width: 85px;
  }
  .tools {
    grid-template-columns: repeat(3, 1fr);
  }
  .tools button span {
    display: inline;
    margin-right: 7px;
    font-size: 15px;
  }
  .palette {
    grid-template-columns: repeat(12, 1fr);
    gap: 7px;
  }
  .custom-color {
    margin-top: 11px;
  }
  .share-head h1 {
    font-size: 36px;
  }
  .share-box {
    flex-wrap: wrap;
  }
  .share-box input {
    width: 100%;
    flex: auto;
  }
  .share-box .primary {
    flex: 1;
  }
  .finder-bar {
    gap: 8px;
    flex-direction: column;
    align-items: flex-end;
  }
  .finder-bar .taps {
    font-size: 10px;
  }
  .stage-hint {
    font-size: 9px;
    bottom: 9px;
    padding: 6px 9px;
  }
  .stage-note {
    font-size: 9px;
  }
  .finder-intro h2 {
    font-size: 27px;
  }
  .finder-intro p {
    font-size: 11px;
    margin-bottom: 15px;
  }
  .finder-intro .eyebrow {
    margin-bottom: 10px;
  }
  .finder-intro .primary {
    padding: 11px 18px;
  }
  .stat {
    padding: 12px 5px;
  }
  .stat b {
    font-size: 24px;
  }
  .stat span {
    font-size: 9px;
  }
  .center-actions {
    gap: 14px;
  }
  .center-actions .primary {
    font-size: 11px;
  }
  .tip {
    font-size: 10px;
  }
  .paint-stage {
    aspect-ratio: 1.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

.room-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}
.room-navigation button {
  font-size: 24px;
  min-width: 48px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: pointer;
}

.app-icon { width: 48px; height: 48px; object-fit: contain; border-radius: 12px; }
body.finding { overflow: hidden; overscroll-behavior: none; }
.finding > .header, .finding > footer { display: none; }
.finding main { position: fixed; inset: 0; max-width: none; padding: 0; margin: 0; min-height: 0; }
.finding .find-stage { position: absolute; inset: 0; max-width: none; background: #342741; }
.finding .stage { position: absolute; width: min(100vw, 150dvh); height: min(100dvh, 66.6667vw); aspect-ratio: 3/2; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 0; }
.finding .finder-bar { position: absolute; top: max(18px, env(safe-area-inset-top)); right: max(18px, env(safe-area-inset-right)); }
.finding .room-navigation { position: absolute; inset: 50% 16px auto; margin: 0; transform: translateY(-50%); pointer-events: none; }
.finding .room-navigation button { pointer-events: auto; border-radius: 50%; width: 48px; height: 48px; box-shadow: 0 3px 16px #0002; background: #fffdf1ed; }
.finding #current-room { position: fixed; top: calc(50dvh - 45px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; background: #fffdf1ed; padding: 9px 16px; border-radius: 24px; }
.finder-intro { z-index: 5; overflow-y: auto; }
.finder-intro-card { background: var(--paper); color: var(--ink); padding: 28px; border-radius: 24px; width: min(440px, 100%); box-shadow: 0 20px 70px #0003; }
.intro-icon { width: 64px; height: 64px; object-fit: contain; border-radius: 16px; margin-bottom: 16px; }
.finder-intro-card h2 { font-size: 28px; }
#find-shape { width: 100px; height: 100px; display: block; margin: 12px auto; }
.finder-intro-card p { color: #6e776a; font-size: 13px; }
.finder-intro-card .landscape-hint { display: none; }
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .finder-intro-card .landscape-hint {
    display: block;
    padding: 12px;
    border-radius: 12px;
    background: var(--lime);
    color: var(--ink);
    font-weight: 600;
  }
}
.find-complete { position: absolute; bottom: max(65px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--paper); padding: 14px 20px; border-radius: 16px; display: flex; gap: 16px; align-items: center; white-space: nowrap; box-shadow: 0 5px 25px #0002; }
#find-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 580px) { .find-complete { flex-wrap: wrap; justify-content: center; width: 280px; } .finder-intro-card { padding: 20px; } }

/* Game surfaces should never select text or summon image callouts. */
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input[type="text"], input:not([type]), textarea {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
button, a { touch-action: manipulation; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
img, canvas { -webkit-user-drag: none; }

@media (max-width: 800px) {
  .hiding > .header, .hiding > footer { display: none; }
  .hiding main {
    max-width: none;
    padding: 0 0 max(20px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .hiding .workspace, .hiding .stage-wrap { display: contents; }
  .hiding .stage {
    order: 0;
    width: 100%;
    height: 50svh;
    height: 50dvh;
    aspect-ratio: auto;
    border-radius: 0;
    display: grid;
    place-items: center;
  }
  /* Fit the entire room without stretching it; pointer coordinates remain
     relative to the canvas, including in short landscape viewports. */
  .hiding .stage canvas {
    width: min(100%, 75svh);
    width: min(100%, 75dvh);
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .hiding .game-top {
    order: 1;
    margin: 0;
    padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
    align-items: center;
  }
  .hiding .game-top h1 { font-size: 22px; margin: 5px 0; }
  .hiding .game-top p { display: none; }
  .hiding .view-toggle { order: 2; margin: 0 16px; }
  .hiding .stage-tools { order: 3; margin: 0 16px; gap: 8px; flex-wrap: wrap; }
  .hiding .sidebar { order: 4; width: auto; margin: 0 16px; padding: 14px; }
  .hiding .stage-note { order: 5; margin: 0 16px; }
  .hiding .stage-hint { max-width: calc(100% - 24px); white-space: normal; text-align: center; }
  .pose-tabs button { min-height: 44px; flex: 1; font-size: 11px; }
  .view-toggle button, .tools button, .small-actions button,
  .zoom-controls button, .tool-button { min-height: 44px; min-width: 44px; }
  .palette { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .swatch { width: 44px; max-width: 100%; justify-self: center; }
  input[type="range"] { min-height: 44px; }
  input[type="color"] { width: 44px; height: 44px; }
  .share-box input { font-size: 16px; }
  .finding .finder-intro { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
  .finder-intro-card { margin: auto; }
}
@media (max-width: 380px) {
  .header { padding: 0 12px; }
  .brand { font-size: 21px; gap: 6px; }
  .app-icon { width: 36px; height: 36px; }
  .section-head { flex-wrap: wrap; gap: 10px; }
  .start-row, .center-actions { flex-wrap: wrap; }
  .hiding .timer { min-width: 76px; font-size: 19px; }
}
@media (hover: none) {
  .room-card:hover, .primary:hover { transform: none; }
  .room-card:hover img { transform: none; }
}
