/* Show instruction before play; let the scene carry the action. */
.wall[data-game='cooling'] .story-panel,
.wall[data-game='cooling'] .brand,
.wall[data-game='cooling'] .instruction-strip,
.wall[data-game='cooling'] .bottom-line,
.wall[data-game='cooling'] .team-toast,
.wall[data-game='cooling'] .result-card > .card-kicker,
.wall[data-game='cooling'] #result-label,
.wall[data-game='cooling'] #result-message,
.wall[data-game='cooling'] #result-contributions {
  display: none;
}
.wall-game-name {
  position: fixed;
  left: 36px;
  top: 26px;
  margin: 0;
  color: #34352a;
  text-shadow: 0 2px #fff9e7;
}
.wall[data-game='cooling'] .wall-game-name {
  font-size: 30px;
  letter-spacing: -1px;
}
.wall:not([data-phase='lobby']) .wall-game-name,
.wall:not([data-phase='lobby']) .room-label {
  display: none;
}
.wall[data-game='cooling'] .wall-header {
  justify-content: flex-end;
}
.wall[data-game='cooling'] .header-right {
  background: transparent;
  border: 0;
  padding: 0;
  gap: 8px;
}
.wall[data-game='cooling'] .icon-button {
  background: #fff9e8c9;
  border: 1px solid #61543a44;
}
.wall[data-game='cooling'] #sound-button.active {
  background: #c9e987;
  border-color: #526731;
}
.wall .sound-hint {
  display: none;
}
.wall[data-game='cooling'] #sound-button {
  position: relative;
  overflow: visible;
}
.wall[data-game='cooling'] #sound-button:not([data-audio='on']) {
  margin-inline-start: 132px;
}
.wall[data-game='cooling'] #sound-button:not([data-audio='on']) .sound-hint {
  display: block;
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) rotate(-5deg);
  color: #e74632;
  font-family: Jua, 'Malgun Gothic', sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  -webkit-text-stroke: 3px #fff5da;
  paint-order: stroke fill;
  text-shadow: 0 2px 2px #49391955;
}
@media (max-width: 600px) {
  .wall[data-game='cooling'] #sound-button:not([data-audio='on']) {
    margin-inline-start: 112px;
  }
  .wall[data-game='cooling'] #sound-button:not([data-audio='on']) .sound-hint {
    top: 0;
    font-size: 18px;
  }
}
.wall #sound-button[data-audio='blocked'] {
  animation: sound-invite 1.6s ease-in-out infinite;
}
@keyframes sound-invite {
  50% { box-shadow: 0 0 0 5px #ffcf664d; }
}
.wall[data-game='cooling'] .connection {
  display: none;
}
.wall[data-game='cooling'] .connection.offline {
  display: flex;
  background: #fff8e8;
  padding: 8px;
  border-radius: 10px;
}
.wall[data-game='cooling'] .room-label {
  background: #fff9e8c9;
  border-radius: 10px;
  font-size: 10px;
}
.wall[data-game='cooling'] .boss-gauge {
  left: 32%;
  top: 21%;
  width: 36%;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}
.wall[data-game='cooling'] .heat-track {
  height: 21px;
  border-width: 3px;
  background: #fff9e7e6;
  box-shadow: 0 2px 0 #fff7db99;
}
.wall[data-game='cooling'] .heat-scale {
  margin-top: 5px;
  color: #3a3529;
  font-size: 13px;
  text-shadow: 0 1px #fff;
}
.wall[data-game='cooling'] #heat-cursor {
  top: -32px;
  background: #fff9e8;
  border: 2px solid #493d2d;
  border-radius: 9px;
  padding: 2px 7px;
  font-size: 16px;
  color: #623727;
}
#heat-target {
  position: absolute;
  top: 25px;
  transform: translateX(-50%);
  font-size: 11px;
  color: #374f27;
  text-shadow: 0 1px #fff;
}
#heat-target::before {
  content: '';
  position: absolute;
  height: 25px;
  border-left: 2px dashed #394d2f;
  bottom: 17px;
  left: 50%;
}
.wall[data-game='cooling'] .side-panel {
  position: static;
}
.wall[data-game='cooling'] .join-card {
  position: fixed;
  top: 100px;
  right: 32px;
  bottom: auto;
  left: auto;
  width: 155px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 2px solid #4c442d;
  border-radius: 14px;
  background: #fff9e8ed;
  box-shadow: 0 4px 0 #46391f22;
}
.wall[data-game='cooling'] .join-card .card-kicker,
.wall[data-game='cooling'] .join-card p,
.wall[data-game='cooling'] .join-card > small {
  display: none;
}
.wall[data-game='cooling'] .join-card h2 {
  font-size: 20px;
  margin: 0;
}
.wall[data-game='cooling'] .join-card .qr-wrap {
  width: 116px;
  max-width: none;
  padding: 3px;
  margin: 0;
}
.wall[data-game='cooling'] .join-card #join-link {
  margin: 0;
  font-size: 12px;
}
.wall[data-game='cooling'] .joined-count {
  font-size: 12px;
  margin: 0;
}
.wall[data-game='cooling'] .joined-count span {
  font-size: 16px;
}
.wall[data-game='cooling'] .join-card .primary-button {
  width: 100%;
  margin: 0;
  padding: 9px;
}
.wall[data-game='cooling'] .play-card {
  display: contents;
}
.wall[data-game='cooling'] .play-card > :not(.timer-ring) {
  display: none;
}
.wall[data-game='cooling'] .timer-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  position: fixed;
  left: 36px;
  top: 27px;
  width: 66px;
  height: 66px;
  margin: 0;
  border: 3px solid #48432d;
  background: #fff9e8e8;
  box-shadow: 0 3px 0 #62452125;
}
.wall[data-game='cooling'] .timer-ring::before {
  display: none;
}
.wall[data-game='cooling'] .timer-ring b {
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}
.wall[data-game='cooling'][data-phase='countdown'] .play-card,
.wall[data-game='cooling'][data-phase='result'] .play-card {
  display: none;
}
.wall.time-urgent .timer-ring {
  color: #bd3c2e;
  animation: clock-urgent 0.5s ease-in-out infinite;
}
@keyframes clock-urgent {
  50% {
    transform: scale(1.08);
  }
}
.actor-body > img {
  position: absolute;
  inset: 0;
}
.pose-out {
  visibility: hidden;
}
.arena-actor[data-pose='out'] .pose-ready {
  visibility: hidden;
}
.arena-actor[data-pose='out'] .pose-out {
  visibility: visible;
}
.fan-origin {
  position: absolute;
  left: 90%;
  top: 27%;
  width: 2px;
  height: 2px;
}
.actor-label {
  bottom: -20px;
  font-size: clamp(14px, 1.6vw, 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.actor-label i {
  font-size: 0.75em;
  font-style: normal;
  margin-right: 5px;
}
.arena-actor.unoccupied {
  opacity: 0.45;
}
.arena-actor.unoccupied .actor-label {
  font-size: 27px;
}
.wall[data-game='cooling'] .countdown {
  background: transparent;
}
.wall[data-game='cooling'] .countdown p {
  font-size: 22px;
  background: #fff9e8e8;
  border-radius: 30px;
  padding: 9px 22px;
  color: #39392d;
}
.wall[data-game='cooling'] .result-overlay {
  background: #44382266;
  backdrop-filter: blur(3px);
}
.wall[data-game='cooling'] .result-card {
  width: min(380px, 90vw);
  padding: 26px;
  border-radius: 20px;
  box-shadow: 0 8px 0 #3b322433;
}
.wall[data-game='cooling'] .result-card h2 {
  font-size: 44px;
  margin: 0;
}
.wall[data-game='cooling'] .result-temperature {
  font-size: 28px;
  margin: 0 0 18px;
}
.wall[data-game='cooling'] .result-cup {
  margin: 15px auto;
}
.wall[data-game='cooling'] .result-card .primary-button {
  font-size: 18px;
}
@media (max-aspect-ratio: 1/1) {
  .wall[data-game='cooling'] .boss-gauge {
    left: 13%;
    width: 74%;
    top: 24%;
  }
  .wall[data-game='cooling'] .join-card {
    top: auto;
    bottom: 5%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 340px;
    max-width: 90vw;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 5px 15px;
    padding: 12px;
    text-align: center;
  }
  .wall[data-game='cooling'] .join-card > * {
    grid-column: 2;
    grid-row: auto;
  }
  .wall[data-game='cooling'] .join-card .qr-wrap {
    grid-column: 1;
    grid-row: 1/5;
    width: 100px;
  }
  .wall[data-game='cooling'] .join-card h2 {
    font-size: 22px;
  }
  .wall[data-game='cooling']:is(
      [data-phase='playing'],
      [data-phase='countdown'],
      [data-phase='result']
    )
    .arena-actor {
    bottom: 12%;
  }
  .wall[data-game='cooling']:is(
      [data-phase='playing'],
      [data-phase='countdown'],
      [data-phase='result']
    )
    .arena-actor:nth-child(2),
  .wall[data-game='cooling']:is(
      [data-phase='playing'],
      [data-phase='countdown'],
      [data-phase='result']
    )
    .arena-actor:nth-child(3) {
    bottom: 14%;
  }
}
@media (max-width: 600px) and (max-aspect-ratio: 1/1) {
  .wall[data-game='cooling'] .wall-game-name {
    font-size: 22px;
    top: 24px;
    left: 16px;
  }
  .wall[data-game='cooling'] .room-label {
    display: none;
  }
  .wall[data-game='cooling'] .boss-gauge {
    left: 8%;
    width: 84%;
    top: 25%;
  }
  .wall[data-game='cooling'] .heat-track {
    height: 17px;
    border-width: 2px;
  }
  .wall[data-game='cooling'] .heat-scale {
    font-size: 11px;
  }
  .wall[data-game='cooling'] #heat-cursor {
    font-size: 14px;
    top: -30px;
  }
  #heat-target {
    top: 22px;
  }
  #heat-target::before {
    height: 20px;
    bottom: 15px;
  }
  .wall[data-game='cooling'] .timer-ring {
    top: 20px;
    left: 20px;
    width: 52px;
    height: 52px;
  }
  .wall[data-game='cooling'] .timer-ring b {
    font-size: 25px;
  }
  .wall[data-game='cooling'] .join-card {
    width: 290px;
    bottom: 4%;
    grid-template-columns: 88px 1fr;
    gap: 4px 12px;
  }
  .wall[data-game='cooling'] .join-card .qr-wrap {
    width: 88px;
  }
  .wall[data-game='cooling'] .join-card h2 {
    font-size: 20px;
  }
  .actor-label {
    font-size: 11px;
    bottom: -19px;
  }
  .wall[data-game='cooling'] .countdown p {
    font-size: 17px;
  }
}
/* Controller: choose, get ready, then use the phone as the fan. */
.controller {
  background: #f7f4e9;
}
.controller .phone-shell {
  max-width: 460px;
  padding: 22px 25px;
}
.controller .phone-header {
  padding: 0 0 18px;
}
.controller .phone-header .brand {
  font-size: 0;
}
.controller .phone-header .brand-mark {
  width: 32px;
  height: 32px;
  font-size: 22px;
}
.controller .phone-header .brand-mark span {
  font-size: 13px;
}
.controller .phone-connection {
  font-size: 11px;
}
.controller .phone-main {
  padding-top: 8px;
}
.controller .phone-eyebrow,
.controller .phone-footer,
.controller #phone-description,
.controller #join-screen > .phone-art,
.controller #join-screen > .phone-note,
.controller #personal-count,
.controller .phone-progress,
.controller #phone-result-message {
  display: none;
}
.controller h1 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -1.3px;
  margin: 12px 0 22px;
}
.phone-step {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 14px;
}
.phone-step i {
  width: 22px;
  height: 4px;
  border-radius: 4px;
  background: #dddccf;
}
.phone-step i.active {
  background: #4e6843;
}
.character-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 12px 0 18px;
}
.character-choice {
  position: relative;
  border: 2px solid #dddacc;
  border-radius: 18px;
  background: #fffdf5;
  color: #333a2e;
  padding: 8px 8px 10px;
  cursor: pointer;
  font: inherit;
}
.character-choice[aria-pressed='true'] {
  border: 3px solid #3f5034;
  background: #e6edcd;
  padding: 7px 7px 9px;
  box-shadow: 0 3px 0 #3f50342b;
}
.character-choice[aria-pressed='true']::after {
  content: '✓';
  position: absolute;
  right: 9px;
  top: 7px;
  font-size: 17px;
  color: #3f5034;
}
.character-choice img {
  display: block;
  width: 100%;
  height: 124px;
  object-fit: contain;
}
.character-choice span {
  display: block;
  font-size: 14px;
  margin-top: 5px;
}
.controller .name-field {
  margin: 10px 0;
  font-size: 12px;
  text-align: left;
}
.controller .name-field input {
  margin-top: 5px;
  padding: 11px 14px;
  font-size: 15px;
}
.controller .primary-button {
  background: #3f583a;
  border-radius: 14px;
  min-height: 52px;
  font-size: 18px;
  padding: 13px;
  box-shadow: 0 4px 0 #23382036;
}
.controller .slot-tag {
  margin: 0 0 8px;
  font-size: 14px;
  padding: 7px 15px;
}
.character-preview {
  position: relative;
  width: 230px;
  height: 252px;
  margin: 4px auto 14px;
}
.character-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.character-preview .preview-ready {
  animation: preview-ready 1.4s steps(1, end) infinite;
}
.character-preview .preview-out {
  animation: preview-out 1.4s steps(1, end) infinite;
}
@keyframes preview-ready {
  0%,
  72% {
    visibility: visible;
  }
  73%,
  90% {
    visibility: hidden;
  }
  91%,
  100% {
    visibility: visible;
  }
}
@keyframes preview-out {
  0%,
  72% {
    visibility: hidden;
  }
  73%,
  90% {
    visibility: visible;
  }
  91%,
  100% {
    visibility: hidden;
  }
}
.controller #controller-art,
.controller #gesture-guide,
.controller #solo-guide {
  display: none;
}
.controller .phone-mates {
  margin: 12px 0 20px;
}
.controller .sensor-status {
  margin: 8px 0;
  font-size: 12px;
}
.controller .sensor-status.good {
  display: none;
}
.controller .phone-secondary,
.controller .leave-button {
  font-size: 12px;
  margin-top: 12px;
  padding: 8px;
}
.controller #sensor-retry {
  display: none;
}
.controller #leave-button {
  margin-left: 10px;
}
.controller #ready-button.is-ready {
  background: transparent;
  color: #58664b;
  box-shadow: none;
  border: 1px solid #c9cfbe;
  min-height: 40px;
  padding: 8px;
  font-size: 14px;
}
.controller #countdown-screen .slot-tag,
.controller #countdown-screen h1 {
  display: none;
}
.controller #countdown-guide {
  font-size: 18px;
}
.controller #countdown-screen {
  padding-top: 15vh;
}
.controller #play-title {
  display: none;
}
.controller .phone-stats {
  border: 0;
  padding: 8px 18px;
  background: transparent;
  margin: 12px 0 42px;
}
.controller .phone-stats span {
  display: none;
}
.controller .phone-stats strong {
  font-size: 26px;
}
.controller .phone-action {
  position: relative;
  width: 100%;
  height: 340px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #303e2d;
  margin: 0 auto 8px;
}
.controller .phone-action .action-avatar {
  position: absolute;
  width: 270px;
  height: 296px;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  object-fit: contain;
  pointer-events: none;
}
.controller .phone-action .action-out {
  visibility: hidden;
}
.controller .phone-action.pulse .action-ready {
  visibility: hidden;
}
.controller .phone-action.pulse .action-out {
  visibility: visible;
}
.controller .phone-action > span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 24px;
}
.controller .phone-action.pulse {
  transform: none;
}
.controller .phone-action-hint {
  font-size: 14px;
  line-height: 1.5;
  margin: 18px 0;
}
.controller #help-button {
  margin-top: 5px;
}
.controller #play-sensor-reconnect {
  margin-top: 5px;
}
.controller #phone-result-number {
  font-size: 34px;
  margin: 10px 0 24px;
}
.controller #reset-note {
  font-size: 12px;
}
.controller[data-screen='result'] .phone-main {
  padding-top: 45px;
}
@media (max-height: 740px) {
  .controller .phone-shell {
    padding-top: 14px;
  }
  .controller .character-choice img {
    height: 96px;
  }
  .controller .phone-header {
    padding-bottom: 7px;
  }
  .controller h1 {
    margin-bottom: 14px;
    font-size: 29px;
  }
  .controller .character-preview {
    height: 210px;
    width: 195px;
  }
  .controller .phone-action {
    height: 280px;
  }
  .controller .phone-action .action-avatar {
    height: 240px;
    width: 220px;
  }
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #267b9c;
  outline-offset: 4px;
}
/* Anchor both drawings at the planted foot; oversized fan can extend into open space. */
.pose-out, .character-preview .preview-out {
  transform: translateX(var(--pose-shift, 0%)) scale(var(--pose-scale, 1.15));
  transform-origin: 18% 96%;
}
[data-character='cyan'] { --pose-shift: 2%; }
[data-character='charcoal'] { --pose-scale: 1.18; --pose-shift: 4.2%; }
.controller .phone-action .action-out {
  transform: translateX(calc(-50% + var(--pose-shift, 0%))) scale(var(--pose-scale, 1.15));
  transform-origin: 18% 96%;
}
.fan-origin { left: 93%; top: 8%; }
.controller .slot-tag { color: #253421; background: #e3ebd1; border: 1px solid #b3c39a; }
