/* layout design: whiskerwatch room and lobby overhaul */

:root {
  --paper: #f2eee8;
  --paper-deep: #e6ded4;
  --card: #fbf8f3;
  --card-solid: #fffdf9;
  --ink: #211e1b;
  --ink-soft: #544d46;
  --muted: #85796d;
  --faint: #b6a99c;
  --line: rgba(56, 45, 36, 0.14);
  --line-strong: rgba(56, 45, 36, 0.25);
  --terracotta: #bb645f;
  --terracotta-dark: #8f4647;
  --terracotta-soft: #ecc4bd;
  --sage: #6d8475;
  --sage-soft: #d5e0d7;
  --gold: #b58249;
  --night: #171716;
  --night-2: #232321;
  --night-3: #2f2e2a;
  --shadow: 0 24px 70px rgba(46, 34, 24, 0.14);
  --shadow-small: 0 10px 30px rgba(46, 34, 24, 0.09);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.2, 0.75, 0.25, 1.2);
  --motion-fast: 140ms;
  --motion: 220ms;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "DM Mono", ui-monospace, monospace;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
}

body.chat-sheet-open {
  overflow: hidden;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(187, 100, 95, 0.42);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

.shell {
  width: min(1440px, calc(100% - 64px));
  margin-inline: auto;
}

.mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.section-label,
.field > span:first-child,
.field-label,
.screen-kicker,
.eyebrow {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* lobby */

.entry-view {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 9% 15%, rgba(187, 100, 95, 0.14), transparent 24rem),
    radial-gradient(circle at 92% 83%, rgba(109, 132, 117, 0.16), transparent 27rem),
    var(--paper);
}

.site-header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.brand-mark {
  display: inline-flex;
  width: 25px;
  height: 24px;
  align-items: flex-end;
  gap: 3px;
  padding: 4px;
  border-radius: 9px 9px 9px 3px;
  background: var(--ink);
  transform: rotate(-7deg);
}

.brand-mark i {
  display: block;
  width: 3px;
  border-radius: 99px;
  background: var(--terracotta-soft);
}

.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 14px; background: #dfae7a; }
.brand-mark i:nth-child(3) { height: 10px; background: #d4d9af; }
.brand-mark i:nth-child(4) { height: 16px; background: #a5bca9; }

.header-tools,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-note,
.entry-footer {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.entry-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.72fr);
  align-items: center;
  gap: clamp(48px, 8vw, 132px);
  padding-block: clamp(48px, 8vh, 92px);
}

.entry-hero {
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--terracotta-dark);
}

.eyebrow-line {
  width: 24px;
  height: 1px;
  background: var(--terracotta);
}

.entry-hero h1 {
  max-width: 700px;
  margin: 26px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(52px, 7.1vw, 108px);
  font-weight: 600;
  letter-spacing: -0.095em;
  line-height: 0.9;
}

.entry-hero h1 em {
  color: var(--terracotta);
  font-style: normal;
}

.hero-copy {
  max-width: 520px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.hero-pills span,
.feature-chip {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  background: rgba(255, 253, 249, 0.48);
  font-size: 11px;
}

.hero-pills svg {
  width: 14px;
  height: 14px;
  color: var(--terracotta-dark);
}

.photo-strip {
  display: grid;
  max-width: 570px;
  grid-template-columns: 1.45fr 0.72fr 0.72fr;
  gap: 10px;
  margin-top: 34px;
}

.photo-card {
  position: relative;
  min-height: 130px;
  overflow: hidden;
  border: 1px solid rgba(56, 45, 36, 0.14);
  border-radius: var(--radius-md);
  background: var(--paper-deep);
  box-shadow: var(--shadow-small);
  transform: rotate(-1deg);
}

.photo-card-small {
  min-height: 112px;
  transform: rotate(2deg) translateY(18px);
}

.photo-card-offset {
  transform: rotate(-3deg) translateY(6px);
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.97);
}

.photo-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20, 17, 14, 0.68));
  content: "";
}

.photo-card figcaption {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 10px;
  left: 12px;
  color: #fffaf3;
  font-family: var(--mono);
  font-size: 9px;
}

.photo-dot,
.status-dot,
.live-dot,
.presence-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(109, 132, 117, 0.13);
}

.photo-dot {
  width: 5px;
  height: 5px;
  margin-right: 5px;
  box-shadow: none;
}

.entry-card {
  position: relative;
  min-width: 0;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: rgba(255, 253, 249, 0.84);
  box-shadow: var(--shadow);
}

.entry-card::before {
  position: absolute;
  top: -1px;
  right: 24px;
  left: 24px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--terracotta), var(--gold), var(--sage));
  content: "";
}

.card-topline,
.card-heading,
.profile-picker-heading,
.panel-heading,
.theater-heading,
.theater-meta,
.room-code-line,
.sidebar-section-heading,
.room-topbar,
.topbar-left,
.modal-heading,
.modal-actions {
  display: flex;
  justify-content: space-between;
}

.card-topline {
  color: var(--terracotta-dark);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-heading {
  align-items: flex-start;
  gap: 20px;
  margin-top: 32px;
}

.card-heading h2,
.modal-heading h2 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.08em;
  line-height: 0.96;
}

.ticket-stub {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  transform: rotate(7deg);
}

.ticket-stub i {
  display: block;
  width: 4px;
  height: 15px;
  border-radius: 99px;
  background: var(--terracotta);
}

.ticket-stub i:nth-child(2) { height: 24px; background: var(--gold); }
.ticket-stub i:nth-child(3) { height: 18px; background: var(--sage); }

.room-tabs,
.profile-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.room-tabs {
  margin-top: 28px;
}

.room-tab,
.profile-tab {
  min-height: 42px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

.room-tab:hover,
.profile-tab:hover,
.room-tab.is-active,
.profile-tab.is-active {
  color: var(--ink);
  background: var(--card-solid);
  box-shadow: 0 4px 12px rgba(46, 34, 24, 0.07);
}

.entry-form {
  display: grid;
  gap: 15px;
  margin-top: 25px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-control {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
}

.field-control:focus-within {
  border-color: var(--terracotta);
  background: var(--card-solid);
  box-shadow: 0 0 0 4px rgba(187, 100, 95, 0.11);
}

.field-control > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
}

.field-control input,
.field-control textarea {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.field-icon-button {
  display: grid;
  width: 36px;
  min-height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
}

.field-icon-button:hover {
  color: var(--ink);
  background: var(--paper);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-picker {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(242, 238, 232, 0.66);
}

.profile-picker-heading {
  align-items: center;
  gap: 14px;
}

.profile-picker-heading small,
.upload-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.profile-preview {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--card-solid);
  border-radius: 50%;
  background: var(--paper-deep);
  box-shadow: 0 0 0 1px var(--line-strong);
  font-size: 21px;
}

.profile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-tabs {
  margin-top: 15px;
}

.asset-grid,
.emoji-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.asset-option,
.emoji-option {
  display: grid;
  min-height: 45px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-solid);
}

.asset-option:hover,
.emoji-option:hover,
.asset-option.is-selected,
.emoji-option.is-selected {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(187, 100, 95, 0.12);
  transform: translateY(-1px);
}

.asset-option img {
  width: 100%;
  height: 52px;
  object-fit: cover;
}

.emoji-option {
  font-size: 21px;
}

.upload-avatar-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--terracotta-dark);
  background: rgba(255, 253, 249, 0.7);
  font-size: 10px;
  font-weight: 700;
}

.upload-avatar-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.primary-button,
.outline-button,
.screen-button,
.sidebar-action,
.text-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) ease, background var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  padding: 0 18px;
  color: #fffaf3;
  background: var(--terracotta);
  box-shadow: 0 12px 22px rgba(143, 70, 71, 0.18);
}

.primary-button:hover,
.screen-button:hover,
.outline-button:hover,
.sidebar-action:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  background: var(--terracotta-dark);
  box-shadow: 0 15px 28px rgba(143, 70, 71, 0.24);
}

.primary-button:active,
.outline-button:active,
.screen-button:active,
.sidebar-action:active,
.text-button:active {
  transform: translateY(1px) scale(0.985);
}

.outline-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: rgba(255, 253, 249, 0.62);
}

.outline-button:hover {
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
  background: var(--card-solid);
}

.icon-button {
  display: grid;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 253, 249, 0.62);
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) ease, color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.icon-button:hover {
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
  background: var(--card-solid);
  transform: translateY(-1px);
}

.text-button {
  min-height: 36px;
  padding: 0 8px;
  color: var(--terracotta-dark);
  background: transparent;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--terracotta-dark);
  font-size: 11px;
}

.entry-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 21px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.entry-footer {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.entry-footer a {
  color: var(--terracotta-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* room shell */

.room-view {
  display: grid;
  height: 100dvh;
  min-height: 620px;
  grid-template-columns: 244px minmax(0, 1fr);
  overflow: hidden;
  background: var(--paper);
}

.room-view.hidden {
  display: none !important;
}

.room-sidebar {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.58);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-room-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card-solid);
}

.sidebar-room-card h2 {
  margin: 7px 0 15px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.07em;
  line-height: 1;
}

.room-code-line {
  align-items: center;
  gap: 8px;
}

.room-code-line .mono {
  color: var(--terracotta-dark);
  font-size: 12px;
}

.sidebar-section {
  min-height: 0;
}

.sidebar-section-heading {
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.count-badge,
.seat-count,
.online-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  background: rgba(213, 224, 215, 0.5);
  font-family: var(--mono);
  font-size: 9px;
}

.sidebar-members {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.sidebar-member {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
}

.sidebar-member:hover {
  border-color: var(--line);
  background: rgba(255, 253, 249, 0.74);
}

.sidebar-member-info {
  min-width: 0;
}

.sidebar-member-name,
.sidebar-member-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-member-name {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-member-role {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--card-solid);
  border-radius: 50%;
  background: var(--paper-deep);
  box-shadow: 0 0 0 1px var(--line-strong);
  font-size: 15px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-note {
  display: flex;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(187, 100, 95, 0.18);
  border-radius: 13px;
  background: rgba(236, 196, 189, 0.22);
}

.note-mark {
  color: var(--terracotta);
  font-size: 17px;
  line-height: 1;
}

.sidebar-note strong {
  color: var(--terracotta-dark);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.sidebar-note p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.sidebar-actions {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.sidebar-action {
  justify-content: flex-start;
  padding: 0 11px;
  border: 1px solid transparent;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10px;
}

.sidebar-action:hover {
  border-color: var(--line);
  background: var(--card-solid);
}

.sidebar-action.danger:hover {
  border-color: rgba(187, 100, 95, 0.3);
  color: var(--terracotta-dark);
  background: rgba(236, 196, 189, 0.2);
}

.room-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.room-topbar {
  z-index: 10;
  min-height: 74px;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 238, 232, 0.9);
  backdrop-filter: blur(18px);
}

.topbar-left {
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.room-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--terracotta-dark);
  background: var(--card-solid);
  font-size: 19px;
}

.topbar-title {
  min-width: 0;
}

.topbar-title h1 {
  max-width: 340px;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title .live-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.topbar-actions {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.seat-count {
  background: var(--card-solid);
}

.seat-count svg {
  width: 14px;
  height: 14px;
  color: var(--terracotta-dark);
}

.connection-banner {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 7px 20px;
  color: var(--terracotta-dark);
  background: rgba(236, 196, 189, 0.28);
  font-family: var(--mono);
  font-size: 9px;
}

.connection-spinner,
.loading-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(143, 70, 71, 0.22);
  border-top-color: var(--terracotta-dark);
  border-radius: 50%;
  animation: layout-spin 700ms linear infinite;
}

@keyframes layout-spin {
  to { transform: rotate(360deg); }
}

.room-scroll {
  display: grid;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) 348px;
  grid-template-areas: "theater inspector" "seats inspector";
  grid-template-rows: auto auto;
  align-content: start;
  gap: 18px;
  overflow-y: auto;
  padding: 22px 28px 32px;
  scrollbar-color: rgba(133, 121, 109, 0.45) transparent;
  scrollbar-width: thin;
}

.theater-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  grid-area: theater;
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px solid rgba(255, 253, 249, 0.18);
  border-radius: var(--radius-lg);
  color: #fffaf3;
  background: var(--night);
  box-shadow: 0 22px 44px rgba(25, 22, 19, 0.18);
}

.theater-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background: linear-gradient(90deg, rgba(17, 17, 16, 0.98), rgba(17, 17, 16, 0.38), rgba(17, 17, 16, 0.96)), url("/assets/cats/cat-garden.jpg") center / cover;
  filter: saturate(0.62) contrast(1.05);
}

.theater-heading,
.theater-screen,
.theater-meta {
  position: relative;
  z-index: 1;
}

.theater-heading {
  align-items: flex-start;
}

.theater-heading h2 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.08em;
  line-height: 0.95;
}

.light-label {
  color: rgba(255, 250, 243, 0.56);
}

.host-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255, 250, 243, 0.2);
  border-radius: 99px;
  color: #e4bb7c;
  background: rgba(255, 250, 243, 0.08);
  font-family: var(--mono);
  font-size: 9px;
}

.theater-screen {
  display: grid;
  min-height: 0;
  aspect-ratio: 16 / 9;
  margin-top: 22px;
  overflow: hidden;
  place-items: center;
  border: 8px solid #0b0b0a;
  border-bottom-width: 12px;
  border-radius: 13px;
  background: #0b0b0a;
  box-shadow: 0 15px 0 -5px rgba(0, 0, 0, 0.55), 0 26px 44px rgba(0, 0, 0, 0.3);
  scroll-margin-top: 18px;
}

.screen-glow {
  position: absolute;
  inset: 15% 17%;
  border-radius: 50%;
  background: rgba(205, 135, 88, 0.1);
  filter: blur(48px);
}

.empty-media,
.direct-link-player {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
}

.empty-media img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.57;
  filter: saturate(0.68) contrast(0.95);
}

.empty-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 15, 14, 0.9), rgba(15, 15, 14, 0.3), rgba(15, 15, 14, 0.82));
}

.empty-media-content,
.direct-link-player {
  z-index: 1;
  max-width: 500px;
  padding: 24px;
  text-align: center;
}

.empty-media-content h3,
.direct-link-player h3 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(24px, 3.4vw, 42px);
  letter-spacing: -0.08em;
  line-height: 0.96;
}

.empty-media-content p,
.direct-link-player p {
  max-width: 410px;
  margin: 11px auto 0;
  color: rgba(255, 250, 243, 0.64);
  font-size: 11px;
  line-height: 1.55;
}

.empty-media-buttons,
.theater-controls,
.call-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.empty-media-buttons {
  justify-content: center;
  margin-top: 20px;
}

.screen-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(255, 250, 243, 0.28);
  border-radius: 10px;
  color: #fffaf3;
  background: rgba(255, 250, 243, 0.1);
}

.screen-button:hover {
  border-color: rgba(255, 250, 243, 0.56);
  background: rgba(255, 250, 243, 0.19);
}

.media-player {
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  background: #090909;
  object-fit: contain;
}

.external-player {
  min-height: 100%;
  overflow: hidden;
}

.external-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.screen-share-video {
  z-index: 3;
  background: #050505;
}

.screen-share-audio-button {
  position: absolute;
  z-index: 6;
  bottom: 15px;
  left: 50%;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid rgba(255, 250, 243, 0.38);
  border-radius: 99px;
  color: #fffaf3;
  background: rgba(17, 17, 16, 0.82);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.direct-link-player {
  z-index: 2;
  background: radial-gradient(circle at 50% 35%, rgba(187, 100, 95, 0.28), transparent 44%), #1b1b19;
}

.fullscreen-button {
  position: absolute;
  z-index: 4;
  right: 13px;
  bottom: 13px;
  display: grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 250, 243, 0.28);
  border-radius: 10px;
  color: #fffaf3;
  background: rgba(17, 17, 16, 0.62);
}

.media-status {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 99px;
  color: #fffaf3;
  background: rgba(17, 17, 16, 0.72);
  font-family: var(--mono);
  font-size: 9px;
}

.media-sync-button {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  min-height: 42px;
  transform: translate(-50%, -50%);
  background: rgba(17, 17, 16, 0.86);
}

.theater-meta {
  align-items: flex-end;
  gap: 18px;
  margin-top: 18px;
}

.now-playing {
  min-width: 0;
}

.now-playing h3 {
  max-width: 620px;
  margin: 7px 0 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing p {
  max-width: 620px;
  margin: 4px 0 0;
  overflow: hidden;
  color: rgba(255, 250, 243, 0.55);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark-button {
  min-height: 38px;
  border-color: rgba(255, 250, 243, 0.2);
  color: rgba(255, 250, 243, 0.78);
  background: rgba(255, 250, 243, 0.08);
}

.dark-button:hover {
  border-color: rgba(255, 250, 243, 0.45);
  color: #fffaf3;
  background: rgba(255, 250, 243, 0.15);
}

/* seats and inspector */

.panel-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 249, 0.78);
  box-shadow: 0 9px 28px rgba(46, 34, 24, 0.05);
}

.seats-panel {
  min-width: 0;
  grid-area: seats;
  padding: 22px;
}

.panel-heading {
  align-items: flex-start;
  gap: 14px;
}

.panel-heading h2 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: -0.07em;
  line-height: 1;
}

.panel-heading > p {
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
}

.seat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  max-width: 900px;
  margin: 20px auto 0;
}

.seat-card {
  position: relative;
  display: flex;
  min-height: 108px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px 20px 13px 13px;
  color: var(--muted);
  background: rgba(242, 238, 232, 0.54);
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.seat-card:nth-child(1),
.seat-card:nth-child(5) {
  transform: translateY(8px);
}

.seat-card:nth-child(6),
.seat-card:nth-child(10) {
  transform: translateY(-3px);
}

.seat-card:not(.is-occupied):hover {
  border-color: var(--terracotta);
  background: rgba(236, 196, 189, 0.26);
  box-shadow: 0 10px 20px rgba(143, 70, 71, 0.1);
  transform: translateY(-2px);
}

.seat-card.is-current {
  border-style: solid;
  border-color: var(--terracotta);
  background: rgba(236, 196, 189, 0.26);
  box-shadow: 0 0 0 4px rgba(187, 100, 95, 0.1);
}

.seat-card.is-occupied {
  border-style: solid;
  border-color: rgba(109, 132, 117, 0.33);
  background: rgba(213, 224, 215, 0.42);
}

.seat-card .avatar {
  width: 48px;
  height: 48px;
}

.seat-number,
.seat-empty-label {
  font-family: var(--mono);
  font-size: 8px;
}

.seat-number {
  position: absolute;
  top: 9px;
  left: 10px;
  color: var(--faint);
}

.seat-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-empty-label {
  color: var(--faint);
}

.seat-owner-mark {
  position: absolute;
  top: 8px;
  right: 9px;
  color: var(--gold);
}

.lower-grid {
  display: flex;
  min-width: 0;
  min-height: 0;
  grid-area: inspector;
  flex-direction: column;
  gap: 14px;
}

.chat-panel,
.reactions-panel,
.queue-panel,
.call-deck {
  min-width: 0;
  min-height: 0;
  padding: 20px;
}

.chat-panel {
  display: flex;
  height: clamp(430px, 60dvh, 680px);
  flex-direction: column;
  overflow: hidden;
}

.compact-heading {
  flex: 0 0 auto;
}

.message-list {
  min-width: 0;
  min-height: 0;
  flex: 1 1 0;
  height: auto;
  margin-top: 18px;
  padding-right: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(133, 121, 109, 0.42) transparent;
  scrollbar-width: thin;
}

.message-list::-webkit-scrollbar,
.room-scroll::-webkit-scrollbar,
.gif-results::-webkit-scrollbar,
.reaction-grid::-webkit-scrollbar {
  width: 6px;
}

.message-list::-webkit-scrollbar-thumb,
.room-scroll::-webkit-scrollbar-thumb,
.gif-results::-webkit-scrollbar-thumb,
.reaction-grid::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(133, 121, 109, 0.35);
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
}

.message-row .avatar {
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.message-content {
  min-width: 0;
  flex: 1;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.message-author {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.message-time {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
}

.message-text {
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-reaction .message-text {
  font-size: 25px;
  line-height: 1;
}

.message-form {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  margin-top: 14px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(242, 238, 232, 0.76);
}

.message-form input {
  min-width: 0;
  min-height: 40px;
  flex: 1;
  padding: 0 9px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.message-form input:focus {
  box-shadow: none;
}

.message-form button {
  display: grid;
  width: 40px;
  min-height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: #fffaf3;
  background: var(--terracotta);
}

.message-form button:hover {
  background: var(--terracotta-dark);
}

.message-form .message-gif-button {
  color: var(--terracotta-dark) !important;
  background: rgba(236, 196, 189, 0.62) !important;
}

.message-form .message-voice-button {
  color: var(--sage) !important;
  background: rgba(213, 224, 215, 0.72) !important;
}

.message-form .message-voice-button:hover,
.message-form .message-voice-button.is-recording {
  color: #fffaf3 !important;
  background: var(--sage) !important;
}

.chat-scroll-tools {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
  pointer-events: none;
}

.chat-scroll-tools.has-content {
  min-height: 32px;
  margin-top: 6px;
}

.chat-scroll-latest {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(187, 100, 95, 0.34);
  border-radius: 99px;
  color: var(--terracotta-dark);
  background: var(--terracotta-soft);
  font-family: var(--mono);
  font-size: 8px;
  pointer-events: auto;
}

.gif-picker {
  display: flex;
  min-height: 0;
  max-height: 360px;
  flex-direction: column;
  gap: 9px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card-solid);
}

.gif-picker-toolbar,
.gif-search-form,
.gif-search-field,
.emoji-search-field {
  display: flex;
  align-items: center;
}

.gif-search-form {
  width: 100%;
  gap: 6px;
}

.gif-search-field,
.emoji-search-field {
  min-width: 0;
  flex: 1;
  gap: 7px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.gif-search-field:focus-within,
.emoji-search-field:focus-within {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(187, 100, 95, 0.1);
}

.gif-search-field input,
.emoji-search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.gif-status {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.gif-results {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  overflow-y: auto;
  scrollbar-color: rgba(133, 121, 109, 0.35) transparent;
  scrollbar-width: thin;
}

.gif-result {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-deep);
}

.gif-result img {
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: cover;
}

.gif-attribution {
  flex: 0 0 auto;
  color: var(--terracotta-dark);
  font-family: var(--mono);
  font-size: 8px;
  text-decoration: underline;
}

.reactions-panel,
.queue-panel,
.call-deck {
  flex: 0 0 auto;
}

.reaction-grid {
  display: grid;
  max-height: 230px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  overflow-y: auto;
  scrollbar-color: rgba(133, 121, 109, 0.35) transparent;
  scrollbar-width: thin;
}

.emoji-picker-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.emoji-picker-heading small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0;
  text-transform: none;
}

.emoji-search-field {
  margin-top: 10px;
}

.reaction-button {
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  font-size: 28px;
}

.reaction-button:hover {
  border-color: var(--terracotta);
  background: var(--terracotta-soft);
  transform: translateY(-1px);
}

.queue-list {
  min-height: 86px;
  margin-top: 16px;
}

.queue-empty,
.empty-chat,
.call-empty {
  display: grid;
  min-height: 90px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.queue-empty span,
.empty-chat p,
.call-empty p {
  margin: 7px 0 0;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.45;
}

.call-deck {
  position: relative;
}

.call-status {
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.call-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.call-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.call-tile.is-you {
  border-color: var(--terracotta);
  background: rgba(236, 196, 189, 0.24);
}

.call-tile-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-deep);
}

.call-tile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-tile-copy,
.call-tile-state {
  min-width: 0;
}

.call-tile-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-tile-copy span,
.call-tile-state {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.call-tile-state {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 5px;
}

.call-layout-note,
.reaction-note {
  display: flex;
  gap: 7px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.45;
}

.call-layout-note svg,
.reaction-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--terracotta);
}

.voice-recorder {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(213, 224, 215, 0.4);
}

.voice-recorder-indicator {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sage);
}

.voice-recorder.is-recording .voice-recorder-indicator {
  background: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(187, 100, 95, 0.14);
}

.voice-recorder > div:not(.voice-recorder-actions) {
  min-width: 0;
  flex: 1;
}

.voice-recorder strong,
.voice-recorder small {
  display: block;
}

.voice-recorder strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-recorder small {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.voice-recorder-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

/* mobile composition */

.mobile-only,
.mobile-action-rail,
.mobile-mini-player,
.mobile-sheet-backdrop,
.mobile-sheet-close {
  display: none !important;
}

@media (max-width: 1150px) and (min-width: 901px) {
  .room-view {
    grid-template-columns: 216px minmax(0, 1fr);
  }

  .room-scroll {
    grid-template-columns: minmax(0, 1fr) 300px;
    padding-inline: 20px;
  }

  .room-topbar {
    padding-inline: 20px;
  }

  .topbar-actions .watch-call-toggle span,
  .topbar-actions .seat-count {
    display: none;
  }

  .chat-panel {
    height: clamp(390px, 58dvh, 600px);
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 32px, 680px);
  }

  .entry-view {
    min-height: 100svh;
    overflow: visible;
  }

  .site-header {
    min-height: 64px;
  }

  .header-note {
    display: none;
  }

  .entry-layout {
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 34px;
    padding-block: 46px 32px;
  }

  .entry-hero h1 {
    max-width: 520px;
    font-size: clamp(53px, 15vw, 86px);
  }

  .hero-copy {
    max-width: 560px;
    font-size: 16px;
  }

  .photo-strip {
    max-width: 560px;
    margin-top: 26px;
  }

  .entry-card {
    max-width: 620px;
  }

  .entry-footer {
    min-height: 76px;
    flex-wrap: wrap;
    padding-block: 16px;
  }

  .room-view:not(.hidden) {
    display: block;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .room-sidebar {
    position: fixed;
    z-index: 75;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, calc(100% - 46px));
    transform: translateX(-105%);
    transition: transform var(--motion) var(--ease-out);
    box-shadow: 20px 0 55px rgba(46, 34, 24, 0.18);
  }

  .room-view.sidebar-open .room-sidebar {
    transform: translateX(0);
  }

  .room-main {
    height: 100dvh;
    min-height: 0;
  }

  .room-topbar {
    position: sticky;
    top: 0;
    min-height: 64px;
    padding: 0 14px;
  }

  .mobile-only {
    display: grid !important;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions > .outline-button,
  .topbar-actions > .seat-count,
  .topbar-actions > .watch-call-toggle,
  .topbar-actions > .compact-language {
    display: none;
  }

  .topbar-title h1 {
    max-width: 180px;
    font-size: 17px;
  }

  .room-symbol {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .room-scroll {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    padding: 14px 12px 112px;
    overscroll-behavior: contain;
  }

  .theater-panel {
    order: 1;
    padding: 16px;
    border-radius: 20px;
  }

  .theater-screen {
    margin-top: 17px;
    border-width: 5px;
    border-bottom-width: 8px;
    border-radius: 9px;
  }

  .theater-meta {
    display: block;
    margin-top: 15px;
  }

  .theater-controls {
    margin-top: 14px;
  }

  .theater-controls .outline-button {
    flex: 1 1 auto;
    min-width: 0;
  }

  .seats-panel {
    order: 3;
    padding: 16px;
  }

  .panel-heading > p {
    display: none;
  }

  .seat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-top: 15px;
  }

  .seat-card,
  .seat-card:nth-child(1),
  .seat-card:nth-child(5),
  .seat-card:nth-child(6),
  .seat-card:nth-child(10) {
    min-height: 84px;
    border-radius: 15px 15px 10px 10px;
    transform: none;
  }

  .seat-card .avatar {
    width: 36px;
    height: 36px;
  }

  .lower-grid {
    display: block;
    order: 2;
  }

  .chat-panel {
    display: flex;
    height: 420px;
    padding: 16px;
  }

  .reactions-panel,
  .queue-panel,
  .call-deck {
    display: none;
  }

  .chat-panel .message-list {
    height: 250px;
    flex: 0 0 250px;
  }

  .mobile-action-rail {
    position: fixed;
    z-index: 55;
    right: 10px;
    bottom: max(9px, env(safe-area-inset-bottom));
    left: 10px;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--line-strong);
    border-radius: 17px;
    background: rgba(255, 253, 249, 0.94);
    box-shadow: 0 18px 42px rgba(46, 34, 24, 0.18);
    backdrop-filter: blur(18px);
  }

  .mobile-action-rail button {
    position: relative;
    display: grid;
    min-height: 49px;
    place-items: center;
    align-content: center;
    gap: 3px;
    border-radius: 12px;
    color: var(--muted);
    background: transparent;
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .mobile-action-rail button svg {
    width: 17px;
    height: 17px;
  }

  .mobile-action-rail button.is-active,
  .mobile-action-rail button:active {
    color: var(--terracotta-dark);
    background: var(--terracotta-soft);
  }

  .mobile-action-rail button b {
    position: absolute;
    top: 4px;
    right: 20%;
    min-width: 16px;
    padding: 2px 4px;
    border-radius: 99px;
    color: #fffaf3;
    background: var(--terracotta-dark);
    font-size: 8px;
    line-height: 1;
  }

  .mobile-sheet-backdrop {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: block !important;
    background: rgba(27, 24, 21, 0.42);
    backdrop-filter: blur(5px);
  }

  .mobile-sheet-backdrop.hidden {
    display: none !important;
  }

  .mobile-sheet-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: grid !important;
    width: 40px;
    min-height: 40px;
  }

  .room-view.mobile-sheet-chat .chat-panel,
  .room-view.mobile-sheet-reactions .reactions-panel,
  .room-view.mobile-sheet-queue .queue-panel,
  .room-view.mobile-sheet-call .call-deck {
    position: fixed;
    z-index: 65;
    right: 9px;
    bottom: calc(75px + env(safe-area-inset-bottom));
    left: 9px;
    display: flex;
    height: min(78dvh, 650px);
    max-height: calc(100dvh - 100px);
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
    border-color: var(--line-strong);
    box-shadow: 0 26px 60px rgba(36, 27, 22, 0.28);
    animation: layout-sheet-in 240ms var(--ease-spring) both;
  }

  .room-view.mobile-sheet-reactions .reactions-panel,
  .room-view.mobile-sheet-queue .queue-panel,
  .room-view.mobile-sheet-call .call-deck {
    height: auto;
    min-height: 0;
  }

  .room-view.mobile-sheet-chat .chat-panel .panel-heading,
  .room-view.mobile-sheet-reactions .reactions-panel .panel-heading,
  .room-view.mobile-sheet-queue .queue-panel .panel-heading,
  .room-view.mobile-sheet-call .call-deck .panel-heading {
    padding-right: 50px;
  }

  .room-view.mobile-sheet-chat .chat-panel .message-list {
    height: auto;
    min-height: 0;
    flex: 1 1 0;
  }

  .room-view.mobile-sheet-chat .gif-picker {
    max-height: 40dvh;
  }

  .room-view.mobile-sheet-chat .gif-results {
    max-height: 28dvh;
  }

  .mobile-mini-player {
    position: fixed;
    z-index: 50;
    right: 12px;
    bottom: calc(133px + env(safe-area-inset-bottom));
    left: 12px;
    display: flex !important;
    min-height: 58px;
    align-items: center;
    gap: 9px;
    padding: 7px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: rgba(255, 253, 249, 0.96);
    box-shadow: 0 13px 32px rgba(46, 34, 24, 0.16);
    backdrop-filter: blur(16px);
  }

  .mobile-mini-player.hidden {
    display: none !important;
  }

  .mobile-mini-player img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
  }

  .mobile-mini-copy {
    min-width: 0;
    flex: 1;
  }

  .mobile-mini-copy strong,
  .mobile-mini-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-mini-copy strong {
    margin-top: 3px;
    font-size: 10px;
  }

  .mobile-mini-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
  }

  .mobile-mini-player > .icon-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .message-form input,
  .field-control input,
  .field-control textarea {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 680px);
  }

  .header-tools {
    gap: 6px;
  }

  .account-entry-button span {
    display: none;
  }

  .account-entry-button {
    min-width: 42px;
    padding-inline: 9px;
  }

  .entry-layout {
    gap: 24px;
    padding-block: 34px 22px;
  }

  .entry-hero h1 {
    margin-top: 20px;
    font-size: clamp(48px, 16.5vw, 74px);
  }

  .hero-copy {
    margin-top: 20px;
    font-size: 15px;
  }

  .hero-pills {
    margin-top: 20px;
  }

  .hero-pills span {
    min-height: 34px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .photo-strip {
    grid-template-columns: 1.4fr 0.8fr;
    gap: 8px;
    margin-top: 22px;
  }

  .photo-card-small:last-child {
    display: none;
  }

  .entry-card {
    padding: 19px 16px;
    border-radius: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .asset-grid,
  .emoji-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .entry-card-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .room-topbar {
    padding-inline: 10px;
  }

  .room-symbol {
    display: none;
  }

  .topbar-title h1 {
    max-width: 150px;
  }

  .theater-heading h2 {
    font-size: 25px;
  }

  .theater-controls .outline-button {
    min-width: calc(50% - 4px);
    padding-inline: 8px;
    font-size: 10px;
  }

  .seat-grid {
    grid-template-columns: repeat(5, minmax(47px, 1fr));
  }

  .seat-card,
  .seat-card:nth-child(1),
  .seat-card:nth-child(5),
  .seat-card:nth-child(6),
  .seat-card:nth-child(10) {
    min-height: 75px;
    padding-inline: 3px;
  }

  .seat-card .avatar {
    width: 31px;
    height: 31px;
  }

  .seat-name {
    font-size: 9px;
  }

  .chat-panel {
    height: 390px;
  }

  .chat-panel .message-list {
    height: 222px;
    flex-basis: 222px;
  }

  .gif-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .call-tiles {
    grid-template-columns: 1fr;
  }

  .voice-recorder {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .voice-recorder-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@keyframes layout-sheet-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* keep the seating row in normal flow when the inspector spans both rows */

@media (min-width: 901px) {
  .room-scroll {
    align-items: start;
    grid-template-rows: max-content max-content;
  }

  .theater-panel {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    height: fit-content;
  }

  .seats-panel {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    height: fit-content;
    margin-top: 0;
  }

  .lower-grid {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    height: fit-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* centered room dock: persistent tools without stealing the stage */

.room-main {
  position: relative;
}

.room-dock-scrim {
  position: fixed;
  z-index: 34;
  inset: 0;
  background: rgba(29, 24, 20, 0.28);
  backdrop-filter: blur(4px);
  animation: dock-scrim-in 180ms ease both;
}

.room-dock-scrim.hidden {
  display: none !important;
}

.room-dock {
  position: fixed;
  z-index: 60;
  bottom: 18px;
  left: 50vw;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 8px;
  border: 1px solid rgba(255, 253, 249, 0.82);
  border-radius: 23px;
  background: rgba(255, 253, 249, 0.78);
  box-shadow: 0 18px 42px rgba(47, 34, 25, 0.18), 0 2px 6px rgba(47, 34, 25, 0.08);
  backdrop-filter: blur(22px) saturate(1.15);
  transform: translateX(-50%);
}

.room-dock::before {
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 20px;
  content: "";
  pointer-events: none;
}

.room-dock-item {
  --dock-scale: 1;
  --dock-lift: 0px;
  --dock-press-scale: 1;
  --dock-press-lift: 0px;
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  transform: translateY(calc(var(--dock-lift) + var(--dock-press-lift))) scale(calc(var(--dock-scale) * var(--dock-press-scale)));
  transform-origin: center bottom;
  transition: transform 110ms cubic-bezier(0.2, 0.8, 0.2, 1), color 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  will-change: transform;
}

.room-dock-item:hover,
.room-dock-item:focus-visible,
.room-dock-item.is-active {
  z-index: 1;
  color: var(--terracotta-dark);
  border-color: rgba(187, 100, 95, 0.22);
  background: rgba(236, 196, 189, 0.42);
  box-shadow: 0 7px 16px rgba(143, 70, 71, 0.1);
}

.room-dock-item:active {
  filter: brightness(0.97);
}

.room-dock-item.is-pressed {
  --dock-press-scale: 0.84;
  --dock-press-lift: 2px;
  transition-duration: 70ms;
}

.room-dock-item.is-holding {
  --dock-press-scale: 0.91;
  --dock-press-lift: 1px;
  border-color: rgba(187, 100, 95, 0.34);
  box-shadow: 0 3px 10px rgba(143, 70, 71, 0.16);
}

.room-dock-item svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
  transform-box: fill-box;
  transform-origin: center;
}

.room-dock-item.is-just-clicked svg {
  animation: dock-icon-click 240ms var(--ease-spring) both;
}

.dock-item-label {
  position: absolute;
  bottom: calc(100% + 11px);
  left: 50%;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--card-solid);
  box-shadow: 0 8px 18px rgba(47, 34, 25, 0.12);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.room-dock-item:hover .dock-item-label,
.room-dock-item:focus-visible .dock-item-label,
.room-dock-item.is-active .dock-item-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.room-dock-item b {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  padding: 3px 4px;
  border: 2px solid rgba(255, 253, 249, 0.9);
  border-radius: 99px;
  color: #fffaf3;
  background: var(--terracotta-dark);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1;
}

.chat-heading-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.chat-expand-button {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
}

.chat-expand-button svg {
  width: 14px;
  height: 14px;
}

@media (min-width: 901px) {
  .room-view.dock-panel-open .room-scroll,
  .room-view.dock-panel-open .lower-grid {
    overflow: visible;
  }

  .room-view.dock-chat-open .chat-panel,
  .room-view.dock-reactions-open .reactions-panel,
  .room-view.dock-queue-open .queue-panel,
  .room-view.dock-call-open .call-deck {
    position: fixed;
    z-index: 45;
    top: 50dvh;
    left: 50vw;
    width: min(700px, calc(100% - 64px));
    min-height: 0;
    max-height: calc(100dvh - 150px);
    margin: 0;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    animation: dock-panel-in 200ms var(--ease-spring) both;
  }

  .room-view.dock-chat-open .chat-panel {
    height: min(78dvh, 720px);
  }

  .room-view.dock-chat-open .gif-picker {
    max-height: 460px;
  }

  .room-view.dock-chat-open .gif-results {
    max-height: 350px;
  }

  .room-view.dock-reactions-open .reactions-panel,
  .room-view.dock-queue-open .queue-panel,
  .room-view.dock-call-open .call-deck {
    width: min(560px, calc(100% - 64px));
    height: min(72dvh, 620px);
  }
}

@media (max-width: 900px) {
  .room-dock-scrim {
    display: none !important;
  }

  .room-dock {
    position: fixed;
    z-index: 55;
    bottom: max(9px, env(safe-area-inset-bottom));
    left: 50vw;
    max-width: calc(100% - 20px);
    padding: 6px;
    border-radius: 22px;
  }

  .room-dock-item {
    width: 47px;
    height: 47px;
    flex-basis: 47px;
    border-radius: 15px;
  }

  .room-dock-item .dock-item-label {
    display: none;
  }

  .room-dock-item:hover,
  .room-dock-item:focus-visible,
  .room-dock-item.is-active {
    transform: translateY(calc(var(--dock-lift) + var(--dock-press-lift))) scale(calc(var(--dock-scale) * var(--dock-press-scale)));
  }
}

@keyframes dock-scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dock-panel-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes dock-icon-click {
  0% { transform: scale(0.86) translateY(1px); }
  46% { transform: scale(1.12) translateY(-1px); }
  72% { transform: scale(0.97) translateY(0); }
  100% { transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .room-dock-item,
  .room-dock-item.is-just-clicked svg,
  .dock-item-label,
  .room-dock-scrim,
  .room-view.dock-panel-open .chat-panel,
  .room-view.dock-panel-open .reactions-panel,
  .room-view.dock-panel-open .queue-panel,
  .room-view.dock-panel-open .call-deck {
    animation: none;
    transition: none;
  }
}
