* { box-sizing: border-box; }

:root {
  --ink: #f6f2ea;
  --blue: #00aef3;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #050607;
}

body {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
textarea {
  font: inherit;
}

.prototype-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at center, #222 0, #050607 72%);
}

.wall-stage {
  position: relative;
  width: min(100vw, 150vh);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #17120d;
  isolation: isolate;
}

.wall-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
}

/* The Drop Zone keeps its navigation in the existing horizontal header. */
.motionc-brand {
  position: absolute;
  z-index: 32;
  left: 2.1%;
  top: .7%;
  display: grid;
  width: 7.1%;
  aspect-ratio: 1;
  padding: .35%;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 17px;
  background: #102823;
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 7px 18px rgba(0,0,0,.32);
  cursor: pointer;
}

.motionc-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top-navigation {
  position: absolute;
  z-index: 31;
  left: 60.5%;
  top: 0;
  display: grid;
  width: 39.5%;
  height: 8.9%;
  padding: 0 .35%;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: linear-gradient(180deg, #080a0a, #030404);
  box-shadow: 0 5px 12px rgba(0,0,0,.24);
}

.top-navigation a,
.mobile-more-toggle {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 4px 2px 5px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(255,255,255,.74);
  background: transparent;
  text-decoration: none;
}

.top-navigation a img {
  width: clamp(24px, 2.35vw, 38px);
  height: clamp(24px, 2.35vw, 38px);
  object-fit: contain;
}

.top-navigation a small,
.mobile-more-toggle small {
  font-size: clamp(7px, .66vw, 10px);
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.top-navigation a:hover,
.top-navigation a:focus-visible,
.top-navigation a.active {
  color: #fff;
  outline: none;
}

.top-navigation a.active img {
  box-sizing: border-box;
  width: clamp(38px, 3.5vw, 52px);
  height: clamp(38px, 3.5vw, 52px);
  padding: clamp(5px, .5vw, 8px);
  border: 1px solid rgba(183,221,199,.42);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(53,102,73,.96), rgba(31,73,52,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.14), 0 7px 14px rgba(0,0,0,.28);
}

.top-navigation a.active small { color: #eef8ef; }

.top-navigation a::before,
.mobile-more-toggle::before {
  position: absolute;
  z-index: 3;
  top: 2px;
  left: 50%;
  width: clamp(39px, 3.8vw, 56px);
  height: clamp(39px, 3.8vw, 56px);
  border: 3px solid #f0b429;
  border-radius: 13px;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.nav-visualization .top-navigation a:hover::before,
.nav-visualization .top-navigation a:focus-visible::before,
.nav-visualization .mobile-more-toggle:hover::before,
.nav-visualization .mobile-more-toggle:focus-visible::before,
.nav-visualization .mobile-more-toggle:active::before {
  opacity: 1;
  box-shadow: 0 0 14px rgba(240,180,41,.6);
}

.mobile-more-toggle,
.mobile-more-menu { display: none; }

.preferences-menu {
  position: absolute;
  z-index: 70;
  top: 9.8%;
  left: 1.8%;
  width: 225px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 13px;
  color: #17352c;
  background: rgba(255,255,255,.97);
  box-shadow: 0 14px 32px rgba(0,0,0,.28);
}

.preferences-menu[hidden] { display: none; }
.preferences-menu > strong { display: block; font-size: 16px; }
.preferences-menu > p { margin: 5px 0 12px; color: #687771; font-size: 11px; }

.preferences-menu label {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 9px;
  align-items: center;
  border-radius: 8px;
  background: #f2f6f2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.preferences-menu label small { margin-left: auto; color: #728078; }

.preferences-close {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #607069;
  background: transparent;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.preferences-close:hover,
.preferences-close:focus-visible {
  color: #17352c;
  background: #e8efe9;
  outline: none;
}

.tag-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.common-history {
  position: absolute;
  z-index: 6;
  left: 81.25%;
  top: 21.35%;
  width: 17.25%;
  height: 41.5%;
  overflow: hidden auto;
  padding: .6% .8% 1%;
  scrollbar-color: rgba(0, 174, 243, .58) rgba(255, 255, 255, .05);
  scrollbar-width: thin;
}

.visitor-account-actions {
  position: absolute;
  z-index: 34;
  left: 82.1%;
  top: 18.7%;
  display: flex;
  width: 15.6%;
  gap: 5px;
  justify-content: center;
}
.visitor-account-actions[hidden] { display: none; }
.visitor-account-actions a {
  padding: 5px 8px;
  border: 1px solid rgba(0,174,243,.5);
  border-radius: 6px;
  color: #8ddcff;
  background: rgba(2,5,6,.94);
  font-size: clamp(7px,.57vw,10px);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.visitor-account-actions a:hover { border-color: var(--blue); color: white; }

.wall-view-tabs {
  position: absolute;
  z-index: 33;
  left: 81.3%;
  top: 10.6%;
  display: grid;
  width: 17.2%;
  height: 10.8%;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 45% 55%;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: #07090a;
}

.wall-view-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,.68);
  background: #07090a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(10px, 1.05vw, 16px);
  font-weight: 700;
  font-style: normal;
  padding-inline: 2px;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.wall-view-tabs p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 4% 6% 0;
  color: rgba(255,255,255,.72);
  font-size: clamp(7px,.72vw,13px);
  line-height: 1.35;
  text-align: center;
}

.wall-view-tabs button.active {
  border-bottom-color: var(--blue);
  color: var(--blue);
  text-shadow: 0 0 8px rgba(0,174,243,.35);
}

.my-wall-invitation {
  position: absolute;
  z-index: 45;
  left: 22%;
  top: 18%;
  width: 52%;
  padding: 4.2% 5%;
  border: 1px solid rgba(0,174,243,.58);
  border-radius: 18px;
  color: #f6f2ea;
  background:
    linear-gradient(135deg, rgba(8,27,29,.97), rgba(6,9,10,.97)),
    #080b0c;
  box-shadow: 0 24px 80px rgba(0,0,0,.72), inset 0 0 42px rgba(0,174,243,.07);
  text-align: center;
}

.my-wall-invitation[hidden] { display: none; }
.my-wall-invitation p { margin: 0 0 1%; color: var(--blue); font-weight: 900; letter-spacing: .16em; }
.my-wall-invitation h2 { margin: 0 0 5%; font: 700 clamp(23px, 3vw, 48px)/1.05 Georgia, serif; }
.my-wall-invitation ul { display: grid; gap: .75em; max-width: 76%; margin: 0 auto 6%; padding: 0; list-style: none; color: rgba(255,255,255,.82); }
.my-wall-invitation li::before { margin-right: .55em; color: #77d13d; content: "✓"; }
.my-wall-invitation a { display: inline-block; padding: .8em 1.4em; border-radius: 10px; color: white; background: #0879c9; font-weight: 900; text-decoration: none; }
.my-wall-invitation small { display: block; margin-top: 4%; color: rgba(255,255,255,.58); }
.invitation-close { position: absolute; top: 4%; right: 3%; border: 0; color: white; background: transparent; font-size: clamp(20px,2vw,34px); cursor: pointer; }

.wall-stage.my-wall-mode::before {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 9%;
  width: 80.5%;
  height: 64%;
  content: "";
  pointer-events: none;
  background: linear-gradient(135deg, rgba(8,74,78,.16), rgba(40,18,62,.12));
  box-shadow: inset 0 0 80px rgba(0,0,0,.2);
  mix-blend-mode: multiply;
}

.common-history::-webkit-scrollbar {
  width: 6px;
}

.common-history::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .04);
}

.common-history::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 174, 243, .58);
}

.history-tag {
  padding: 5.5% 3.5%;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.history-tag:first-child {
  padding-top: 2%;
}

.history-tag p {
  margin: 0 0 4px;
  font-size: clamp(10px, 1.02vw, 17px);
  font-weight: 800;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .9);
}

.history-tag time {
  display: block;
  color: rgba(224, 227, 230, .58);
  font-size: clamp(7px, .58vw, 10px);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
}

.history-actions button {
  padding: 3px 5px;
  border: 1px solid rgba(0,174,243,.28);
  border-radius: 5px;
  color: rgba(255,255,255,.72);
  background: rgba(0,0,0,.42);
  font-size: clamp(6px,.5vw,9px);
  cursor: pointer;
}

.history-actions button:hover { color: white; border-color: var(--blue); }
.history-pin {
  display: inline-block;
  margin-bottom: 5px;
  color: #ffd43b;
  font-size: clamp(7px,.58vw,10px);
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.member-choice.unlocked,
[data-member-font].unlocked { opacity: 1; filter: none; cursor: pointer; }

.history-state {
  margin: 10% 3%;
  color: rgba(230, 232, 234, .68);
  font-size: clamp(9px, .82vw, 14px);
  line-height: 1.35;
  text-align: center;
}

.history-state.error {
  color: #ffbf22;
}

.wall-tag {
  position: absolute;
  left: var(--tag-left);
  top: var(--tag-top);
  width: var(--tag-width);
  max-width: var(--tag-width);
  color: var(--tag-color);
  font-family: var(--tag-font);
  font-size: clamp(14px, var(--tag-size), 40px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.015em;
  text-wrap: balance;
  text-shadow: none;
  transform: translate(var(--tag-shift-x, 0), var(--tag-shift-y, 0)) rotate(var(--tag-angle));
  transform-origin: center;
}

.wall-tag.revealed {
  animation: tagReveal 1150ms 350ms both;
}

@keyframes tagReveal {
  0% { filter: blur(5px); opacity: 0; transform: translate(var(--tag-shift-x, 0), var(--tag-shift-y, 0)) rotate(var(--tag-angle)) scale(.94); }
  55% { filter: blur(2px); opacity: .55; }
  100% { filter: blur(0); opacity: .96; transform: translate(var(--tag-shift-x, 0), var(--tag-shift-y, 0)) rotate(var(--tag-angle)) scale(1); }
}

.permanent-tag {
  position: absolute;
  z-index: 2;
  color: rgba(69, 44, 36, .7);
  font-family: "Comic Sans MS", cursive;
  font-weight: 700;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.mira-tag {
  left: 16.5%;
  top: 58%;
  font-size: clamp(11px, 1.2vw, 22px);
  transform: rotate(-7deg);
}

.steps-tag {
  left: 51%;
  top: 60%;
  color: rgba(55, 32, 25, .9);
  font-size: clamp(9px, .9vw, 17px);
  font-weight: 800;
  opacity: .88;
  transform: rotate(4deg);
}

.mist-target {
  position: absolute;
  z-index: 7;
  left: var(--target-left);
  top: var(--target-top);
  width: 30%;
  height: 25%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-23%, -34%);
}

.mist-target.active {
  animation: mistEnvelope 2700ms ease-out both;
}

.mist-target i {
  position: absolute;
  left: calc(-2% + (var(--cloud-index) % 6) * 16%);
  top: calc(-4% + (var(--cloud-index) % 4) * 22%);
  width: calc(31% + (var(--cloud-index) % 4) * 7%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--paint), white 30%) 0 9%, var(--paint) 38%, transparent 72%);
  filter: blur(9px);
  opacity: .78;
  transform: scale(.25);
  animation: cloudBloom 2150ms calc(var(--cloud-index) * 45ms) ease-out both;
}

@keyframes mistEnvelope {
  0% { opacity: 0; }
  12% { opacity: .35; }
  34%, 72% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes cloudBloom {
  0% { opacity: 0; transform: scale(.12) translate(45%, 24%); }
  28% { opacity: .92; }
  66% { opacity: .72; transform: scale(1.35) translate(-5%, -3%); }
  100% { opacity: 0; transform: scale(2.05) translate(-12%, -8%); }
}

.spray-stream {
  position: absolute;
  z-index: 8;
  left: 72.25%;
  top: 63.85%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.spray-stream i {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--paint);
  box-shadow: 0 0 9px color-mix(in srgb, var(--paint), white 25%);
  filter: blur(.5px);
  animation: sprayFlight 1250ms var(--delay) cubic-bezier(.08, .38, .18, 1) both;
}

@keyframes sprayFlight {
  0% { opacity: 0; transform: translate(0, 0) scale(.35); }
  7% { opacity: .92; }
  38% { opacity: .76; }
  100% {
    opacity: 0;
    transform: translate(calc(-30vw + var(--spread-x)), calc(-21vh + var(--spread-y))) scale(1.15);
  }
}

.purple-can-pulse {
  position: absolute;
  z-index: 5;
  left: 70.8%;
  top: 66.4%;
  width: 5.1%;
  height: 10.6%;
  border-radius: 50% 50% 20% 20%;
  pointer-events: none;
  transform-origin: 50% 100%;
}

.purple-can-pulse.spraying {
  animation: canShake 1200ms ease-in-out;
  filter: drop-shadow(0 0 8px rgba(166, 74, 255, .85));
}

@keyframes canShake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-3deg) translateY(-2px); }
  45% { transform: rotate(2.5deg); }
  70% { transform: rotate(-1.5deg) translateY(1px); }
}

.interactive-controls {
  position: absolute;
  inset: 75% 20.2% 5.4% .5%;
  z-index: 10;
}

.editor-open,
.editor-close {
  display: none;
}

.interactive-controls::before {
  position: absolute;
  z-index: 3;
  left: 34.5%;
  top: 7%;
  width: 43.5%;
  height: 39%;
  border-radius: 7px;
  content: "";
  pointer-events: none;
  background: #101112;
}

.message-field {
  position: absolute;
  left: 2%;
  top: 30%;
  width: 27%;
  height: 62%;
  border-radius: 9px;
  background: #101112;
  box-shadow: 0 0 0 6px #101112;
}

.message-field textarea {
  width: 100%;
  height: 100%;
  resize: none;
  border: 1px solid #555;
  border-radius: 7px;
  outline: none;
  padding: 12px 14px 24px;
  color: #f4f4f4;
  background: #0c0d0e;
}

.message-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(0, 174, 243, .16);
}

.message-field small {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #8e9297;
}

.font-picks {
  position: absolute;
  left: 35.5%;
  top: 13%;
  display: flex;
  z-index: 4;
  gap: clamp(3px, .35vw, 6px);
}

.font-picks button {
  width: clamp(54px, 4.1vw, 68px);
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid #4c4f52;
  border-radius: 6px;
  color: #e7e7e7;
  background: rgba(12, 13, 14, .94);
  cursor: pointer;
  font-size: clamp(9px, .72vw, 12px);
  font-weight: 800;
  white-space: nowrap;
}

.font-picks button.selected {
  border-color: var(--blue);
  color: var(--blue);
}

.style-picks button {
  width: auto;
  min-width: clamp(52px, 4.2vw, 70px);
  padding-inline: clamp(6px, .55vw, 10px);
}

.style-picks button[data-style="fresh-paint"] {
  min-width: clamp(76px, 6.2vw, 98px);
}

.style-picks button[data-style="brush"] {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: clamp(10px, .8vw, 13px);
  font-style: italic;
  font-weight: 800;
  letter-spacing: .01em;
}

.style-picks button[data-style="fresh-paint"] {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-weight: 900;
  letter-spacing: -.02em;
}

.style-picks button[data-style="wild"] {
  font-family: "Arial Black", Impact, sans-serif;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.04em;
  transform: skewX(-4deg);
}

.style-picks button[data-style="marker"] {
  font-family: "Segoe Print", "Comic Sans MS", cursive;
  font-weight: 700;
  letter-spacing: .02em;
}

.style-picks button[data-style="chalk"] {
  font-family: "Comic Sans MS", "Segoe Print", cursive;
  font-weight: 700;
  letter-spacing: .05em;
}

.font-picks button.locked-choice,
.color-picks button.locked-choice {
  position: relative;
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: .38;
}

.font-picks button.locked-choice::after,
.color-picks button.locked-choice::after {
  content: "🔒";
  position: absolute;
  right: -5px;
  top: -8px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #555;
  border-radius: 50%;
  background: #111;
  filter: grayscale(1);
  font-size: 10px;
  line-height: 1;
}

.color-picks {
  position: absolute;
  left: 36.2%;
  top: 59%;
  display: flex;
  z-index: 4;
  gap: 18px;
}

.color-picks button {
  width: clamp(24px, 2vw, 36px);
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.color-picks button.selected {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.2);
}

.size-picks {
  position: absolute;
  left: 64%;
  top: 13%;
  display: flex;
  z-index: 4;
  align-items: flex-end;
  gap: 6px;
}

.size-picks > span {
  display: none;
}

.size-picks button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #4c4f52;
  border-radius: 6px;
  color: #e7e7e7;
  background: rgba(12, 13, 14, .94);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.size-picks button[data-size="small"] { font-size: 11px; }
.size-picks button[data-size="medium"] { font-size: 15px; }
.size-picks button[data-size="large"] { font-size: 19px; }

.size-picks button:hover,
.size-picks button:focus-visible {
  border-color: #8ddcff;
  outline: none;
}

.size-picks button.selected {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 0 0 2px rgba(0, 174, 243, .14);
}

.spray-button {
  position: absolute;
  right: 2.35%;
  top: 24%;
  width: 15%;
  height: 48%;
  border: 1px solid #168bd0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(#1685d2, #0663b3);
  box-shadow:
    0 0 0 9px #101112,
    0 5px 15px rgba(0, 87, 174, .28);
  cursor: pointer;
  font-size: clamp(13px, 1.35vw, 23px);
  font-weight: 900;
  letter-spacing: .03em;
  white-space: nowrap;
}

.visitor-post-limit {
  position: absolute;
  right: 1.5%;
  top: 15%;
  display: grid;
  width: 17.5%;
  min-height: 72%;
  padding: 8px 7px;
  place-content: center;
  gap: 5px;
  border: 1px solid #168bd0;
  border-radius: 8px;
  color: white;
  background: linear-gradient(#174c70, #102d40);
  box-shadow: 0 0 0 7px #101112;
  font-size: clamp(6px,.54vw,10px);
  line-height: 1.2;
  text-align: center;
}
.visitor-post-limit[hidden] { display: none; }
.visitor-post-limit strong { color: #ffcf54; font-size: clamp(8px,.72vw,13px); text-transform: uppercase; }
.visitor-post-limit small { color: rgba(255,255,255,.76); font-size: inherit; }
.visitor-post-limit span { display: flex; gap: 5px; margin-top: 4px; justify-content: center; }
.visitor-post-limit a {
  padding: 4px 6px;
  border: 1px solid rgba(141,220,255,.5);
  border-radius: 5px;
  color: #8ddcff;
  background: rgba(0,0,0,.35);
  font-weight: 800;
  white-space: nowrap;
}

.emoji-picker {
  position: absolute;
  left: 30%;
  top: 32%;
  z-index: 20;
}

.emoji-toggle {
  display: grid;
  width: clamp(38px, 3.6vw, 58px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #4c4f52;
  border-radius: 8px;
  color: #fff;
  background: rgba(12, 13, 14, .96);
  cursor: pointer;
  font-size: clamp(19px, 1.8vw, 28px);
}

.emoji-toggle:hover,
.emoji-toggle[aria-expanded="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(0, 174, 243, .16);
}

.emoji-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 7px;
  border: 1px solid #45484b;
  border-radius: 9px;
  background: rgba(9, 10, 11, .98);
  box-shadow: 0 9px 28px rgba(0,0,0,.55);
}

.emoji-menu[hidden] {
  display: none;
}

.emoji-menu button {
  display: grid;
  width: 36px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #1a1c1e;
  cursor: pointer;
  font-size: 21px;
}

.emoji-menu button:hover {
  border-color: var(--blue);
}

.emoji-menu .locked {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: .28;
}

.spray-button:disabled {
  cursor: wait;
  color: #d8e5ee;
  background: linear-gradient(#306f9f, #24577e);
  filter: saturate(.7);
  opacity: 1;
}

.spray-button:not(:disabled):active {
  transform: translateY(2px) scale(.985);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tablet composition: keep the wall visible and move creation into a usable drawer. */
@media (max-width: 900px), (orientation: landscape) and (max-height: 700px) {
  .mist-target {
    position: fixed;
    z-index: 64;
    left: 50%;
    top: 34%;
    width: min(64vw, 520px);
    height: min(34vh, 240px);
    transform: translate(-50%, -50%);
  }

  .spray-stream,
  .purple-can-pulse { display: none; }

  .editor-open {
    position: fixed;
    z-index: 64;
    right: 14px;
    bottom: 14px;
    display: block;
    min-width: 148px;
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid #43bdf0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(#1685d2, #0663b3);
    box-shadow: 0 10px 28px rgba(0,0,0,.46);
    font-weight: 900;
    cursor: pointer;
  }

  .editor-open[aria-expanded="true"] {
    opacity: 0;
    pointer-events: none;
  }

  .interactive-controls {
    position: fixed;
    z-index: 65;
    inset: auto 12px 12px;
    display: grid;
    width: auto;
    height: auto;
    max-height: min(72dvh, 430px);
    padding: 54px 18px 18px;
    grid-template-columns: minmax(220px, 1.4fr) minmax(190px, 1fr) minmax(150px, .7fr);
    gap: 14px 18px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(91,202,247,.55);
    border-radius: 20px;
    color: #f6f2ea;
    background: linear-gradient(155deg, rgba(18,25,28,.99), rgba(7,10,12,.99));
    box-shadow: 0 22px 60px rgba(0,0,0,.72);
    transform: translateY(calc(100% + 100px));
    transition: transform 260ms ease, visibility 260ms step-end;
    visibility: hidden;
    pointer-events: none;
  }

  .interactive-controls.open {
    transform: none;
    transition: transform 260ms ease, visibility 0s;
    visibility: visible;
    pointer-events: auto;
  }

  .interactive-controls::before { display: none; }

  .editor-close {
    position: absolute;
    top: 10px;
    right: 12px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid #596269;
    border-radius: 50%;
    color: #fff;
    background: #20272b;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
  }

  .message-field,
  .emoji-picker,
  .font-picks,
  .color-picks,
  .size-picks,
  .spray-button,
  .visitor-post-limit {
    position: static;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
  }

  .message-field {
    grid-row: 1 / span 3;
    min-height: 156px;
    border-radius: 10px;
    box-shadow: none;
  }

  .message-field textarea { min-height: 156px; }
  .emoji-picker {
    grid-column: 2 / -1;
    grid-row: 1;
    display: flex;
    width: 100%;
    align-items: center;
    align-self: start;
    gap: 10px;
  }
  .font-picks { grid-column: 2; grid-row: 2; flex-wrap: wrap; }
  .color-picks { grid-column: 2; grid-row: 3; gap: 12px; flex-wrap: wrap; }
  .size-picks { grid-column: 3; grid-row: 2; align-self: start; }
  .spray-button,
  .visitor-post-limit { grid-column: 3; grid-row: 3; }

  .spray-button {
    min-height: 58px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,87,174,.28);
  }

  .emoji-toggle {
    flex: 0 0 48px;
    width: 48px;
    font-size: 25px;
  }

  .emoji-menu {
    position: static;
    flex: 1;
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    margin: 0;
    padding: 6px;
  }

  .emoji-menu button { width: 100%; min-width: 38px; font-size: 22px; }
}

@media (max-width: 900px) and (orientation: portrait) {
  .wall-view-tabs {
    position: fixed;
    z-index: 64;
    top: 12px;
    left: 76px;
    width: calc(100vw - 88px);
    height: 50px;
    grid-template-rows: 1fr;
    overflow: hidden;
    border: 1px solid rgba(0,174,243,.38);
    border-radius: 13px;
    box-shadow: 0 8px 20px rgba(0,0,0,.38);
  }

  .wall-view-tabs button { min-height: 48px; font-size: 12px; }
  .wall-view-tabs p { display: none; }

  .editor-open {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .interactive-controls {
    inset: auto 10px calc(80px + env(safe-area-inset-bottom));
    max-height: min(66dvh, 640px);
    padding: 52px 16px 16px;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .72fr);
    gap: 12px;
  }

  .message-field { grid-column: 1 / -1; grid-row: auto; min-height: 128px; }
  .message-field textarea { min-height: 128px; }
  .emoji-picker,
  .font-picks,
  .color-picks,
  .size-picks,
  .spray-button,
  .visitor-post-limit { grid-column: auto; grid-row: auto; }
  .font-picks { align-content: start; }
  .spray-button { min-height: 54px; }

  .emoji-picker {
    grid-column: 1 / -1;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
  }

  .emoji-toggle {
    flex: 0 0 48px;
    width: 48px;
    font-size: 25px;
  }

  .emoji-menu {
    position: static;
    flex: 1;
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    margin: 0;
    padding: 6px;
  }

  .emoji-menu button { width: 100%; min-width: 38px; font-size: 22px; }

  .size-picks { align-items: center; gap: 9px; }
  .size-picks button { width: 48px; height: 48px; }
  .size-picks button[data-size="small"] { font-size: 16px; }
  .size-picks button[data-size="medium"] { font-size: 24px; }
  .size-picks button[data-size="large"] { font-size: 32px; }

  .visitor-post-limit {
    grid-column: 1 / -1;
    min-height: 104px;
    padding: 14px;
    gap: 8px;
    font-size: 14px;
    line-height: 1.35;
  }

  .visitor-post-limit strong { font-size: 17px; }
  .visitor-post-limit a { padding: 8px 12px; font-size: 13px; }

  .wall-tag {
    font-size: clamp(16px, calc(var(--tag-size) * 1.35), 44px);
  }
}

@media (max-width: 760px), (max-width: 900px) and (orientation: portrait) {
  .wall-stage::after {
    position: absolute;
    z-index: 31;
    top: 0;
    left: 0;
    width: 140px;
    height: 90px;
    background: #050607;
    content: "";
    pointer-events: none;
  }

  .prototype-shell { align-items: start; }
  .wall-stage { min-width: 1000px; transform-origin: top left; }

  .motionc-brand {
    position: fixed;
    z-index: 62;
    top: 10px;
    left: 10px;
    width: 48px;
    height: 48px;
    padding: 3px;
    border-radius: 14px;
  }

  .top-navigation {
    position: fixed;
    z-index: 60;
    inset: auto 0 0;
    left: 0;
    top: auto;
    display: grid;
    width: 100%;
    height: 70px;
    padding: 5px 8px max(5px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    border-top: 1px solid rgba(255,255,255,.16);
    background: rgba(10,27,24,.97);
    box-shadow: 0 -8px 24px rgba(7,24,20,.28);
  }

  .top-navigation a,
  .mobile-more-toggle {
    display: grid;
    min-width: 0;
    min-height: 58px;
    padding: 3px 1px;
    font-size: inherit;
  }

  .top-navigation a img { width: 25px; height: 25px; }
  .top-navigation a.active img { width: 38px; height: 38px; padding: 7px; border-radius: 12px; }

  .top-navigation a small,
  .mobile-more-toggle small { font-size: 7px; }

  .top-navigation a::before,
  .mobile-more-toggle::before { top: 1px; width: 42px; height: 42px; border-radius: 11px; }

  .nav-home { order: 1; }
  .nav-daily { order: 2; }
  .nav-mcp { order: 3; }
  .nav-library { order: 4; }
  .mobile-more-toggle { order: 5; }

  .top-navigation .nav-walking,
  .top-navigation .nav-drop-zone { display: none; }

  .mobile-more-toggle {
    border: 0;
    color: rgba(255,255,255,.74);
    background: transparent;
  }

  .more-glyph {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 11px;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1;
  }

  .mobile-more-toggle.section-active .more-glyph,
  .mobile-more-toggle[aria-expanded="true"] .more-glyph {
    border-color: rgba(183,221,199,.46);
    background: linear-gradient(145deg, #356649, #1f4934);
    box-shadow: 0 7px 14px rgba(0,0,0,.24);
  }

  .mobile-more-toggle.section-active small { color: #eef8ef; }

  .mobile-more-menu {
    position: fixed;
    z-index: 61;
    right: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    display: grid;
    width: min(230px, calc(100vw - 20px));
    gap: 6px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 15px;
    background: rgba(13,37,32,.98);
    box-shadow: 0 16px 38px rgba(0,0,0,.34);
  }

  .mobile-more-menu[hidden] { display: none; }

  .mobile-more-menu a {
    display: flex;
    gap: 12px;
    padding: 11px 12px;
    align-items: center;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
  }

  .mobile-more-menu a.active { background: rgba(53,102,73,.64); }

  .mobile-more-menu a:hover,
  .mobile-more-menu a:focus-visible {
    outline: 2px solid #f0b429;
    background: rgba(255,255,255,.08);
  }

  .mobile-more-menu img { width: 30px; height: 30px; object-fit: contain; }

  .preferences-menu {
    position: fixed;
    top: 66px;
    left: 10px;
    width: min(260px, calc(100vw - 20px));
  }
}

@media (min-width: 761px) and (max-width: 900px) and (orientation: portrait) {
  .wall-stage {
    width: 100vw;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spray-stream,
  .mist-target { display: none; }
  .wall-tag.revealed { animation-duration: 1ms; animation-delay: 0ms; }
}

/* Scale the height-constrained wall header against its existing 3:2 canvas.
   Keep viewport-fixed editor/drawer and narrow-screen rules unchanged. */
@media (min-width: 951px) and (min-height: 481px) and (min-aspect-ratio: 3/2) {
  .wall-stage { --wall-content-unit: min(1vw, 1.5vh); }
  .wall-view-tabs button { font-size: clamp(10px, calc(1.05 * var(--wall-content-unit)), 16px); }
  .wall-view-tabs p { font-size: clamp(7px, calc(.72 * var(--wall-content-unit)), 13px); }
  .visitor-account-actions a { font-size: clamp(7px, calc(.57 * var(--wall-content-unit)), 10px); }
  .wall-stage:has(.visitor-account-actions:not([hidden])) .wall-view-tabs p { padding-top: 1%; }
  .history-state { font-size: clamp(9px, calc(.82 * var(--wall-content-unit)), 14px); }
}
