:root {
  color-scheme: light;
  --paper: #f4eee6;
  --paper-deep: #e8ded3;
  --card: rgba(255, 251, 246, 0.82);
  --card-solid: #fffaf4;
  --ink: #211d1a;
  --ink-soft: #4f4740;
  --muted: #8b7f74;
  --faint: #b9ada1;
  --line: rgba(65, 51, 40, 0.14);
  --line-strong: rgba(65, 51, 40, 0.28);
  --terracotta: #c86f6d;
  --terracotta-dark: #9d4e52;
  --terracotta-soft: #f0c3bd;
  --sage: #738777;
  --sage-soft: #d3ded2;
  --gold: #bd8a4c;
  --night: #171514;
  --night-2: #24201e;
  --shadow: 0 22px 65px rgba(48, 34, 23, 0.14);
  --shadow-small: 0 10px 25px rgba(48, 34, 23, 0.08);
  --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;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.hidden {
  display: none !important;
}

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

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

.noise {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.52'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.shell {
  width: min(1380px, calc(100% - 80px));
  margin: 0 auto;
}

.entry-view {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 17%, rgba(217, 150, 127, 0.13), transparent 25rem),
    radial-gradient(circle at 88% 80%, rgba(115, 135, 119, 0.15), transparent 28rem),
    var(--paper);
}

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

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

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

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

.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 13px; background: #e0ad75; }
.brand-mark i:nth-child(3) { height: 10px; background: #d8d8b1; }
.brand-mark i:nth-child(4) { height: 15px; background: #a4bba7; }

.header-note,
.entry-footer {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 250, 244, 0.52);
}

.language-switch button {
  min-width: 27px;
  min-height: 23px;
  padding: 0 6px;
  border-radius: 99px;
  color: var(--muted);
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.language-switch button:hover,
.language-switch button.is-active {
  color: var(--ink);
  background: var(--card-solid);
  box-shadow: 0 2px 6px rgba(65, 51, 40, 0.1);
}

.compact-language {
  min-height: 34px;
  padding: 3px;
}

.compact-language button {
  min-width: 25px;
  min-height: 25px;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot,
.live-dot,
.photo-dot,
.presence-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(115, 135, 119, 0.11);
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  align-items: center;
  gap: clamp(48px, 8vw, 132px);
  min-height: calc(100vh - 140px);
  padding: 68px 0 80px;
}

.entry-hero {
  align-self: center;
  min-width: 0;
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 26px;
}

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

.entry-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.7rem, 8vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.095em;
  line-height: 0.87;
}

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

.hero-copy {
  max-width: 505px;
  margin: 31px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

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

.hero-pills span,
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  background: rgba(255, 250, 244, 0.54);
  font-size: 11px;
}

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

.photo-strip {
  display: flex;
  align-items: flex-end;
  gap: 13px;
  max-width: 600px;
  margin-top: 52px;
  padding-left: 15px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 7px solid #fffaf4;
  border-radius: 7px;
  background: var(--paper-deep);
  box-shadow: var(--shadow-small);
  transform: rotate(-3deg);
}

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

.photo-card-wide {
  width: 235px;
  height: 168px;
}

.photo-card-small {
  width: 128px;
  height: 145px;
  transform: rotate(5deg);
}

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

.photo-card figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 5px;
  color: #fff;
  background: rgba(30, 24, 21, 0.56);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(7px);
}

.photo-card figcaption .photo-dot {
  width: 5px;
  height: 5px;
  background: #bad3b8;
  box-shadow: none;
}

.entry-card {
  position: relative;
  align-self: center;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.entry-card::after {
  position: absolute;
  z-index: -1;
  right: -14px;
  bottom: -14px;
  left: 40px;
  height: 30px;
  border-radius: 50%;
  background: rgba(115, 135, 119, 0.16);
  content: "";
  filter: blur(15px);
}

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

.card-topline {
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-strong);
  color: var(--terracotta-dark);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-topline .mono {
  color: var(--muted);
}

.card-heading {
  align-items: flex-start;
  margin-top: 25px;
}

.card-heading h2,
.modal-heading h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 27px;
  letter-spacing: -0.065em;
}

.ticket-stub {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(8deg);
}

.ticket-stub i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--terracotta);
}

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

.room-tabs,
.profile-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(225, 215, 204, 0.36);
}

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

.room-tab,
.profile-tab {
  min-height: 37px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

.room-tab.is-active,
.profile-tab.is-active {
  color: var(--ink);
  background: var(--card-solid);
  box-shadow: 0 3px 9px rgba(65, 51, 40, 0.09);
}

.entry-form {
  margin-top: 25px;
}

.field {
  display: block;
  min-width: 0;
}

.field > span:first-child,
.field-label {
  display: block;
  margin-bottom: 8px;
}

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

.field-control:focus-within {
  border-color: rgba(200, 111, 109, 0.75);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(200, 111, 109, 0.1);
}

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

.field-control input,
.field-control textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

input::placeholder {
  color: var(--faint);
}

.field-icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--muted);
  background: transparent;
}

.field-icon-button svg {
  width: 14px;
  height: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 15px;
}

.invite-join-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 11px 12px;
  border: 1px solid rgba(115, 135, 119, 0.3);
  border-radius: 12px;
  background: rgba(224, 235, 224, 0.6);
}

.invite-join-icon,
.invite-room-symbol {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--sage-dark);
  background: rgba(255, 255, 255, 0.55);
}

.invite-join-icon svg,
.invite-room-symbol svg {
  width: 16px;
  height: 16px;
}

.invite-join-card strong,
.invite-join-card small {
  display: block;
}

.invite-join-card strong {
  color: var(--ink);
  font-size: 11px;
}

.invite-join-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.profile-picker {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(241, 233, 224, 0.48);
}

.profile-picker-heading {
  align-items: flex-start;
  gap: 15px;
}

.profile-picker-heading small {
  display: block;
  max-width: 250px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.profile-preview {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  border: 2px solid #fffaf4;
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper-deep);
  box-shadow: 0 3px 12px rgba(42, 30, 22, 0.12);
  font-size: 20px;
}

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

.profile-preview-avatar {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 20px;
}

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

.profile-tab {
  min-height: 31px;
  font-size: 10px;
}

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

.asset-option,
.emoji-option {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 9px;
  color: var(--ink);
  background: var(--paper-deep);
  transition: transform 150ms ease, border-color 150ms ease;
}

.asset-option:hover,
.emoji-option:hover {
  transform: translateY(-2px);
}

.asset-option.is-selected,
.emoji-option.is-selected {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(200, 111, 109, 0.12);
}

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

.asset-option::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c5dbc1;
  box-shadow: 0 0 0 3px rgba(27, 23, 20, 0.25);
  content: "";
}

.emoji-option {
  aspect-ratio: auto;
  min-height: 32px;
  font-size: 18px;
}

.upload-avatar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  margin-top: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(255, 250, 244, 0.46);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.upload-avatar-button:hover {
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
}

.upload-avatar-button svg {
  width: 14px;
  height: 14px;
}

.upload-avatar-button input {
  display: none;
}

.upload-note {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-align: center;
}

.primary-button,
.outline-button,
.screen-button,
.sidebar-action,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.primary-button {
  min-height: 46px;
  margin-top: 18px;
  padding: 0 15px;
  border-radius: 10px;
  color: #fffaf4;
  background: var(--ink);
  box-shadow: 0 10px 18px rgba(33, 29, 26, 0.13);
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-button svg {
  width: 15px;
  height: 15px;
}

.form-error {
  min-height: 17px;
  margin: 10px 0 0;
  color: var(--terracotta-dark);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.entry-card-foot {
  gap: 10px;
  margin-top: 23px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.entry-card-foot span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.entry-card-foot svg {
  width: 13px;
  height: 13px;
  color: var(--sage);
}

.entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 22px;
}

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

/* room */

.room-view {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: #ece2d8;
}

.room-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 20px 20px;
  border-right: 1px solid var(--line);
  background: rgba(249, 244, 237, 0.82);
}

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

.sidebar-room-card {
  margin-top: 50px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 250, 244, 0.65);
}

.sidebar-room-card h2 {
  margin: 8px 0 13px;
  overflow: hidden;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-code-line {
  gap: 8px;
  padding-top: 11px;
  border-top: 1px dashed var(--line-strong);
}

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

.text-button {
  padding: 4px 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.text-button:hover {
  color: var(--terracotta-dark);
}

.text-button svg {
  width: 12px;
  height: 12px;
}

.sidebar-section {
  margin-top: 33px;
}

.sidebar-section-heading {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.count-badge,
.seat-count,
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--sage);
  font-family: var(--mono);
  font-size: 10px;
}

.count-badge {
  min-width: 22px;
  min-height: 20px;
  justify-content: center;
  border-radius: 99px;
  background: var(--sage-soft);
}

.sidebar-members {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.sidebar-member {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

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

.sidebar-member-name {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  border: 2px solid #fffaf4;
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper-deep);
  box-shadow: 0 3px 8px rgba(42, 30, 22, 0.08);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
}

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

.avatar.avatar-emoji {
  font-size: 17px;
}

.sidebar-note {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 13px;
  border-radius: 11px;
  background: rgba(226, 217, 205, 0.58);
}

.note-mark {
  color: var(--terracotta);
  font-size: 15px;
}

.sidebar-note strong {
  color: var(--ink-soft);
  font-size: 10px;
}

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

.sidebar-actions {
  display: grid;
  gap: 5px;
  margin-top: 18px;
}

.sidebar-action {
  justify-content: flex-start;
  gap: 9px;
  padding: 9px 5px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.sidebar-action:hover {
  color: var(--ink);
}

.sidebar-action.danger:hover {
  color: var(--terracotta-dark);
}

.sidebar-action svg {
  width: 14px;
  height: 14px;
}

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

.room-topbar {
  flex: 0 0 auto;
  min-height: 76px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(249, 244, 237, 0.68);
}

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

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

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

.topbar-title h1 {
  overflow: hidden;
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.topbar-actions {
  flex: 0 0 auto;
  gap: 10px;
}

.icon-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 250, 244, 0.5);
}

.icon-button:hover,
.outline-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--card-solid);
}

.icon-button svg {
  width: 15px;
  height: 15px;
}

.outline-button {
  gap: 7px;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 600;
}

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

.seat-count {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: rgba(255, 250, 244, 0.5);
}

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

.connection-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 30px;
  color: var(--terracotta-dark);
  background: #f2d5cd;
  font-family: var(--mono);
  font-size: 10px;
}

.connection-spinner,
.loading-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(157, 78, 82, 0.2);
  border-top-color: var(--terracotta-dark);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

.room-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 25px 34px 38px;
  scrollbar-color: rgba(119, 100, 85, 0.38) transparent;
  scrollbar-width: thin;
}

.theater-panel {
  position: relative;
  overflow: hidden;
  padding: 25px;
  border: 1px solid rgba(255, 250, 244, 0.25);
  border-radius: 17px;
  color: #fff8ef;
  background: var(--night);
  box-shadow: 0 18px 35px rgba(35, 26, 21, 0.15);
}

.theater-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.37;
  background: linear-gradient(90deg, rgba(19, 16, 14, 0.98), rgba(19, 16, 14, 0.36) 52%, rgba(19, 16, 14, 0.96)), url("/assets/cats/cat-garden.jpg") center / cover;
  filter: saturate(0.7);
}

.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: 28px;
  letter-spacing: -0.07em;
}

.light-label {
  color: rgba(255, 248, 239, 0.54);
}

.host-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 250, 244, 0.17);
  border-radius: 99px;
  color: #e6c493;
  background: rgba(255, 250, 244, 0.08);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.host-badge svg {
  width: 12px;
  height: 12px;
}

.theater-screen {
  position: relative;
  display: grid;
  min-height: min(43vw, 400px);
  margin-top: 24px;
  overflow: hidden;
  place-items: center;
  border: 9px solid #0b0a0a;
  border-bottom-width: 13px;
  border-radius: 8px;
  background: #0b0a0a;
  box-shadow: 0 14px 0 -4px rgba(8, 7, 6, 0.55), 0 24px 40px rgba(0, 0, 0, 0.28);
}

.screen-glow {
  position: absolute;
  inset: 12% 17%;
  border-radius: 50%;
  background: rgba(221, 157, 111, 0.08);
  filter: blur(45px);
}

.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.6;
  filter: saturate(0.7);
}

.empty-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 15, 13, 0.86), rgba(18, 15, 13, 0.32), rgba(18, 15, 13, 0.76));
}

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

.empty-media-content h3,
.direct-link-player h3 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 37px);
  letter-spacing: -0.07em;
}

.empty-media-content p,
.direct-link-player p {
  margin: 10px auto 0;
  color: rgba(255, 248, 239, 0.62);
  font-size: 11px;
  line-height: 1.55;
}

.empty-media-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 19px;
}

.screen-button {
  min-height: 35px;
  padding: 0 11px;
  border: 1px solid rgba(255, 248, 239, 0.25);
  border-radius: 8px;
  color: #fff8ef;
  background: rgba(255, 248, 239, 0.1);
  font-size: 10px;
  font-weight: 600;
}

.screen-button:hover {
  border-color: rgba(255, 248, 239, 0.52);
  background: rgba(255, 248, 239, 0.18);
}

.screen-button svg {
  width: 13px;
  height: 13px;
}

.media-player {
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0908;
  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;
  object-fit: contain;
}

.screen-share-audio-button {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 14px;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 248, 239, 0.34);
  border-radius: 999px;
  color: #fff8ef;
  background: rgba(19, 15, 13, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
  font-size: 11px;
  font-weight: 700;
}

.screen-share-audio-button:hover {
  border-color: rgba(255, 248, 239, 0.62);
  background: rgba(19, 15, 13, 0.94);
  transform: translateX(-50%) translateY(-1px);
}

.screen-share-audio-button:active {
  transform: translateX(-50%) translateY(1px) scale(0.98);
}

.screen-share-audio-button svg {
  width: 15px;
  height: 15px;
}

.direct-link-player {
  z-index: 2;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(200, 111, 109, 0.27), transparent 44%), #181412;
}

.fullscreen-button {
  position: absolute;
  z-index: 4;
  right: 13px;
  bottom: 13px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 248, 239, 0.23);
  border-radius: 7px;
  color: #fff8ef;
  background: rgba(19, 15, 13, 0.58);
}

.fullscreen-button:hover {
  background: rgba(19, 15, 13, 0.88);
}

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

.media-status {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  padding: 7px 9px;
  border-radius: 99px;
  color: #fff8ef;
  background: rgba(19, 15, 13, 0.67);
  font-family: var(--mono);
  font-size: 9px;
}

.media-sync-button {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  min-height: 38px;
  transform: translate(-50%, -50%);
  background: rgba(19, 15, 13, 0.84);
}

.media-sync-button:hover {
  transform: translate(-50%, calc(-50% - 1px));
}

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

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

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

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

.theater-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.dark-button {
  min-height: 32px;
  border-color: rgba(255, 248, 239, 0.19);
  color: rgba(255, 248, 239, 0.75);
  background: rgba(255, 248, 239, 0.08);
}

.dark-button:hover {
  border-color: rgba(255, 248, 239, 0.38);
  color: #fff8ef;
  background: rgba(255, 248, 239, 0.15);
}

.panel-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.72);
  box-shadow: 0 8px 25px rgba(48, 34, 23, 0.05);
}

.seats-panel {
  margin-top: 19px;
  padding: 22px;
}

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

.panel-heading h2 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.06em;
}

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

.seat-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(65px, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.seat-card {
  position: relative;
  display: flex;
  min-height: 92px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 5px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(242, 234, 225, 0.38);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.seat-card:not(.is-occupied):hover {
  border-color: var(--terracotta);
  background: rgba(240, 195, 189, 0.24);
  transform: translateY(-2px);
}

.seat-card.is-current {
  border-style: solid;
  border-color: var(--terracotta);
  background: rgba(240, 195, 189, 0.25);
  box-shadow: 0 0 0 3px rgba(200, 111, 109, 0.08);
}

.seat-card.is-occupied {
  border-style: solid;
  border-color: rgba(115, 135, 119, 0.28);
  background: rgba(211, 222, 210, 0.35);
}

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

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

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

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

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

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

.seat-owner-mark svg {
  width: 11px;
  height: 11px;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(210px, 0.8fr) minmax(215px, 0.9fr);
  gap: 19px;
  margin-top: 19px;
}

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

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

.online-pill {
  padding: 6px 8px;
  border-radius: 99px;
  background: rgba(211, 222, 210, 0.45);
}

.online-pill .live-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.message-list {
  height: 226px;
  overflow-y: auto;
  margin-top: 17px;
  padding-right: 4px;
  scrollbar-color: rgba(119, 100, 85, 0.38) transparent;
  scrollbar-width: thin;
}

.empty-chat {
  display: grid;
  min-height: 175px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
}

.empty-chat > span {
  color: var(--terracotta);
  font-size: 17px;
}

.empty-chat p {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.55;
}

.message-list::-webkit-scrollbar,
.room-scroll::-webkit-scrollbar {
  width: 5px;
}

.message-list::-webkit-scrollbar-thumb,
.room-scroll::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(119, 100, 85, 0.3);
}

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

.message-row .avatar {
  width: 28px;
  height: 28px;
  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.45;
  overflow-wrap: anywhere;
}

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

.message-pending {
  opacity: 0.68;
}

.message-pending .message-content {
  padding: 7px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: rgba(241, 232, 222, 0.34);
}

.pending-message-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.pending-message-actions .text-button {
  gap: 4px;
  font-family: var(--sans);
  font-size: 9px;
}

.pending-message-actions .text-button svg {
  width: 11px;
  height: 11px;
}

.message-form {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}

.message-form input {
  min-width: 0;
  flex: 1;
  min-height: 37px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.message-form input:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(200, 111, 109, 0.1);
}

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

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

.message-gif-button {
  color: var(--terracotta-dark) !important;
  background: rgba(240, 195, 189, 0.34) !important;
}

.message-gif-button:hover {
  background: rgba(240, 195, 189, 0.7) !important;
}

.message-gif-button svg {
  width: 16px;
  height: 16px;
}

.message-voice-button {
  color: var(--sage) !important;
  background: rgba(211, 222, 210, 0.48) !important;
}

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

.message-voice-button.is-recording {
  animation: voice-pulse 1.1s ease-in-out infinite;
}

@keyframes voice-pulse {
  50% { box-shadow: 0 0 0 5px rgba(115, 135, 119, 0.18); }
}

.voice-recorder {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: rgba(211, 222, 210, 0.28);
}

.voice-recorder.is-recording {
  border-color: rgba(115, 135, 119, 0.38);
  background: rgba(211, 222, 210, 0.48);
}

.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(200, 111, 109, 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: 8px;
}

.voice-recorder-actions .text-button {
  gap: 4px;
  font-size: 9px;
}

.voice-recorder-actions svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 650px) {
  .voice-recorder {
    align-items: flex-start;
    flex-wrap: wrap;
  }

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

.message-audio {
  display: grid;
  gap: 5px;
  width: min(280px, 100%);
  margin-top: 7px;
}

.message-audio audio {
  width: 100%;
  height: 34px;
}

.message-audio span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.chat-gif-link {
  display: block;
  width: min(220px, 100%);
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-deep);
}

.chat-gif {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: cover;
}

.message-preview {
  display: grid;
  gap: 5px;
  width: min(250px, 100%);
  margin-top: 7px;
}

.message-preview > a:last-child,
.chat-link {
  overflow: hidden;
  color: var(--terracotta-dark);
  font-size: 10px;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-video-preview,
.chat-image-preview {
  display: block;
  width: 100%;
  max-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-deep);
  object-fit: cover;
}

.chat-video-preview {
  aspect-ratio: 16 / 9;
}

.chat-image-link {
  display: block;
}

.gif-picker {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(255, 250, 244, 0.72);
}

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

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

.gif-search-field {
  min-width: 0;
  flex: 1;
  gap: 7px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.gif-search-field svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.gif-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.gif-search-form .icon-button {
  flex: 0 0 auto;
  min-width: 34px;
  min-height: 34px;
}

.gif-search-form .icon-button[type="submit"] {
  color: #fffaf4;
  border-color: var(--terracotta);
  background: var(--terracotta);
}

.gif-status {
  min-height: 22px;
  padding: 8px 2px 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.35;
}

.gif-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-height: 224px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(119, 100, 85, 0.38) transparent;
  scrollbar-width: thin;
}

.gif-results::-webkit-scrollbar {
  width: 5px;
}

.gif-results::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(119, 100, 85, 0.3);
}

.gif-result {
  display: block;
  min-width: 0;
  aspect-ratio: 1.35;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-deep);
  transition: transform 150ms var(--ease-out), border-color 150ms ease;
}

.gif-result:hover {
  z-index: 1;
  border-color: var(--terracotta);
  transform: translateY(-2px);
}

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

.gif-attribution {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.reaction-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 25px;
}

.reaction-button {
  display: grid;
  min-height: 49px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(241, 232, 222, 0.48);
  font-size: 22px;
  transition: transform 150ms ease, background 150ms ease;
}

.reaction-button:hover {
  background: rgba(240, 195, 189, 0.42);
  transform: translateY(-2px);
}

.reaction-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.45;
}

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

.queue-list {
  display: grid;
  gap: 7px;
  max-height: 240px;
  margin-top: 19px;
  overflow-y: auto;
}

.queue-empty {
  padding: 35px 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.queue-empty span {
  color: var(--faint);
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(241, 232, 222, 0.45);
}

.queue-item-icon {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  color: var(--terracotta-dark);
  background: var(--terracotta-soft);
}

.queue-item-icon svg {
  width: 13px;
  height: 13px;
}

.queue-item-body {
  min-width: 0;
  flex: 1;
}

.queue-item-title {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item-meta {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-remove {
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  color: var(--muted);
  background: transparent;
}

.queue-remove:hover {
  color: var(--terracotta-dark);
}

.queue-remove svg {
  width: 13px;
  height: 13px;
}

/* modal and feedback */

.modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 22, 19, 0.48);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(100%, 480px);
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--card-solid);
  box-shadow: var(--shadow);
}

.invite-modal-card {
  width: min(100%, 760px);
}

.invite-intro {
  max-width: 580px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.invite-room-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 19px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(241, 233, 224, 0.48);
}

.invite-room-summary strong,
.invite-room-summary small {
  display: block;
}

.invite-room-summary strong {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.04em;
}

.invite-room-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.invite-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin-top: 20px;
}

.invite-qr-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
}

#invite-qr {
  display: grid;
  width: 220px;
  height: 220px;
  place-items: center;
  overflow: hidden;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

#invite-qr img,
#invite-qr canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.invite-qr-status {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-align: center;
}

.invite-link-control input {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.invite-actions .primary-button,
.invite-actions .outline-button {
  min-height: 44px;
  margin-top: 0;
}

.invite-actions .text-button {
  width: 100%;
  justify-content: flex-start;
  margin-top: 3px;
}

.invite-security-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 21px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.invite-security-note svg {
  width: 14px;
  height: 14px;
  color: var(--sage-dark);
}

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

.modal-form {
  margin-top: 25px;
}

.modal-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 19px;
}

.modal-actions .primary-button,
.modal-actions .outline-button {
  margin-top: 0;
}

.modal-actions .outline-button {
  min-height: 46px;
  padding: 0 15px;
}

.toast {
  position: fixed;
  z-index: 70;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(115, 135, 119, 0.25);
  border-radius: 9px;
  color: #3d5542;
  background: #e4eee1;
  box-shadow: var(--shadow-small);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast-alert {
  border-color: rgba(200, 111, 109, 0.28);
  color: var(--terracotta-dark);
  background: #f5dcd6;
}

.toast svg {
  width: 14px;
  height: 14px;
}

.global-loading {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
  background: rgba(244, 238, 230, 0.75);
  backdrop-filter: blur(9px);
  font-family: var(--mono);
  font-size: 10px;
}

.global-loading .loading-cancel,
.global-loading #loading-cancel {
  min-height: 32px;
  color: var(--ink-soft);
  background: rgba(255, 250, 244, 0.7);
}

@media (max-width: 1150px) {
  .entry-layout {
    gap: 48px;
  }

  .entry-hero h1 {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
  }

  .lower-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(190px, 0.8fr);
  }

  .queue-panel {
    grid-column: 1 / -1;
    min-height: 0;
  }

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

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

  .entry-layout {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 56px 0 52px;
  }

  .entry-hero {
    text-align: center;
  }

  .eyebrow,
  .hero-pills {
    justify-content: center;
  }

  .hero-copy {
    margin-right: auto;
    margin-left: auto;
  }

  .photo-strip {
    justify-content: center;
    margin-right: auto;
    margin-left: auto;
  }

  .entry-card {
    width: min(100%, 530px);
    margin: 0 auto;
  }

  .entry-footer {
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 25px;
    text-align: center;
  }

  .room-view {
    display: block;
  }

  .room-sidebar {
    position: fixed;
    z-index: 40;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(310px, 88vw);
    box-shadow: 18px 0 40px rgba(36, 26, 20, 0.18);
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }

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

  .mobile-only {
    display: inline-flex !important;
  }

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

  .room-scroll {
    padding: 19px 20px 32px;
  }

  .theater-screen {
    min-height: min(55vw, 430px);
  }

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

  .lower-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(190px, 0.8fr);
  }

  .queue-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .shell {
    width: min(100% - 28px, 530px);
  }

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

  .header-note {
    display: none;
  }

  .entry-layout {
    padding-top: 39px;
  }

  .entry-hero h1 {
    font-size: clamp(3.4rem, 16vw, 5.7rem);
  }

  .hero-copy {
    margin-top: 24px;
    font-size: 14px;
  }

  .photo-strip {
    gap: 8px;
    margin-top: 34px;
    padding-left: 0;
  }

  .photo-card {
    border-width: 5px;
  }

  .photo-card-wide {
    width: 44vw;
    max-width: 195px;
    height: 130px;
  }

  .photo-card-small {
    width: 25vw;
    max-width: 112px;
    height: 116px;
  }

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

  .photo-card figcaption {
    right: 5px;
    bottom: 5px;
    left: 5px;
    padding: 4px 5px;
    font-size: 7px;
  }

  .entry-card {
    padding: 20px 17px;
    border-radius: 15px;
  }

  .card-heading h2,
  .modal-heading h2 {
    font-size: 23px;
  }

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

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

  .entry-footer {
    display: grid;
    gap: 8px;
    padding-bottom: 18px;
  }

  .topbar-actions .outline-button span,
  .seat-count {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .room-topbar {
    min-height: 64px;
    padding: 0 13px;
  }

  .room-scroll {
    padding: 13px 11px 25px;
  }

  .theater-panel {
    padding: 16px;
    border-radius: 13px;
  }

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

  .theater-screen {
    min-height: 57vw;
    margin-top: 17px;
    border-width: 6px;
    border-bottom-width: 9px;
  }

  .empty-media-content {
    max-width: 340px;
    padding: 13px;
  }

  .empty-media-content h3,
  .direct-link-player h3 {
    font-size: 25px;
  }

  .empty-media-content p,
  .direct-link-player p {
    display: none;
  }

  .empty-media-buttons {
    margin-top: 13px;
  }

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

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

  .theater-controls .outline-button {
    flex: 1;
    padding: 0 7px;
  }

  .theater-controls .outline-button span {
    display: inline;
    font-size: 9px;
  }

  .seats-panel,
  .chat-panel,
  .reactions-panel,
  .queue-panel {
    padding: 15px;
  }

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

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

  .seat-card {
    min-height: 80px;
    padding: 7px 3px;
  }

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

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

  .lower-grid {
    display: block;
  }

  .reactions-panel,
  .queue-panel {
    min-height: 0;
    margin-top: 13px;
  }

  .message-list {
    height: 220px;
  }

  .queue-list {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 12px;
  }

  .modal-card {
    padding: 19px 16px;
    border-radius: 13px;
  }
}

@media (max-width: 380px) {
  .hero-pills span:nth-child(3) {
    display: none;
  }

  .asset-grid,
  .emoji-options {
    gap: 5px;
  }

  .room-symbol {
    display: none;
  }

  .theater-controls .outline-button:nth-child(2) {
    display: none;
  }
}

/* interaction polish: quiet motion, clear states, and a real press response */

.brand,
.brand-mark,
.language-switch button,
.field-control,
.panel-card,
.entry-card,
.sidebar-room-card,
.modal-card,
.primary-button,
.outline-button,
.screen-button,
.sidebar-action,
.text-button,
.icon-button,
.field-icon-button,
.room-tab,
.profile-tab,
.asset-option,
.emoji-option,
.reaction-button,
.message-form button,
.fullscreen-button,
.queue-remove,
.upload-avatar-button,
.seat-card,
.photo-card {
  transition-timing-function: var(--ease-out);
  transition-duration: var(--motion-fast);
}

.brand,
.brand-mark,
.field-control,
.panel-card,
.entry-card,
.sidebar-room-card,
.modal-card,
.primary-button,
.outline-button,
.screen-button,
.sidebar-action,
.text-button,
.icon-button,
.field-icon-button,
.room-tab,
.profile-tab,
.asset-option,
.emoji-option,
.reaction-button,
.message-form button,
.fullscreen-button,
.queue-remove,
.upload-avatar-button,
.seat-card,
.photo-card {
  transition-property: transform, color, background-color, border-color, box-shadow, opacity;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.field-control input:focus-visible,
.field-control textarea:focus-visible {
  outline: 0;
}

.message-form input:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

.brand:hover .brand-mark {
  transform: rotate(-3deg) translateY(-1px) scale(1.04);
}

.status-dot,
.live-dot {
  animation: live-pulse 2.8s ease-in-out infinite;
}

.room-tab,
.profile-tab {
  position: relative;
}

.room-tab::after,
.profile-tab::after {
  position: absolute;
  right: 15%;
  bottom: 4px;
  left: 15%;
  height: 2px;
  border-radius: 99px;
  background: var(--terracotta);
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity var(--motion-fast) ease, transform var(--motion) var(--ease-spring);
}

.room-tab.is-active::after,
.profile-tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.field-control:focus-within {
  transform: translateY(-1px);
}

.modal:not(.hidden) .modal-backdrop {
  animation: backdrop-in 180ms ease both;
}

.modal:not(.hidden) .modal-card {
  animation: modal-in 280ms var(--ease-spring) both;
}

.entry-view > .site-header {
  animation: fade-in 420ms ease both;
}

.entry-layout > .entry-hero {
  animation: reveal-up 560ms var(--ease-out) 60ms both;
}

.entry-layout > .entry-card {
  animation: reveal-up 620ms var(--ease-out) 140ms both;
}

.entry-footer {
  animation: fade-in 500ms ease 260ms both;
}

.room-view:not(.hidden) {
  animation: room-in 380ms var(--ease-out) both;
}

.media-status:not(.hidden) {
  animation: status-in 220ms var(--ease-out) both;
}

@media (hover: hover) {
  .language-switch button:not(.is-active):hover {
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.35);
  }

  .field-control:hover:not(:focus-within) {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.58);
  }

  .panel-card:hover {
    border-color: rgba(65, 51, 40, 0.22);
    box-shadow: 0 12px 30px rgba(48, 34, 23, 0.08);
  }

  .primary-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 25px rgba(33, 29, 26, 0.19);
  }

  .outline-button:hover:not(:disabled),
  .icon-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 7px 15px rgba(48, 34, 23, 0.08);
  }

  .screen-button:hover:not(:disabled):not(.media-sync-button) {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  }

  .sidebar-action:hover {
    transform: translateX(3px);
  }

  .text-button:hover,
  .field-icon-button:hover:not(:disabled),
  .queue-remove:hover:not(:disabled) {
    transform: translateY(-1px);
  }

  .room-tab:not(.is-active):hover,
  .profile-tab:not(.is-active):hover {
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
  }

  .asset-option:hover,
  .emoji-option:hover {
    box-shadow: 0 6px 13px rgba(48, 34, 23, 0.12);
    transform: translateY(-2px) scale(1.03);
  }

  .reaction-button:hover {
    box-shadow: 0 8px 17px rgba(48, 34, 23, 0.11);
    transform: translateY(-3px) scale(1.04);
  }

  .message-form button:hover:not(:disabled),
  .fullscreen-button:hover:not(:disabled) {
    box-shadow: 0 7px 15px rgba(48, 34, 23, 0.16);
    transform: translateY(-1px);
  }

  .upload-avatar-button:hover,
  .seat-card:not(.is-occupied):hover {
    box-shadow: 0 7px 15px rgba(48, 34, 23, 0.08);
  }

  .photo-card-wide:hover {
    box-shadow: 0 17px 32px rgba(48, 34, 23, 0.16);
    transform: translateY(-6px) rotate(-2deg);
  }

  .photo-card-small:hover {
    box-shadow: 0 17px 32px rgba(48, 34, 23, 0.16);
    transform: translateY(-6px) rotate(3deg);
  }

  .photo-card-offset:hover {
    box-shadow: 0 17px 32px rgba(48, 34, 23, 0.16);
    transform: translateY(-20px) rotate(-3deg);
  }
}

.primary-button:active:not(:disabled),
.outline-button:active:not(:disabled),
.screen-button:active:not(:disabled):not(.media-sync-button),
.sidebar-action:active,
.text-button:active,
.icon-button:active:not(:disabled),
.field-icon-button:active:not(:disabled),
.room-tab:active,
.profile-tab:active,
.asset-option:active,
.emoji-option:active,
.reaction-button:active,
.message-form button:active:not(:disabled),
.fullscreen-button:active:not(:disabled),
.queue-remove:active:not(:disabled),
.upload-avatar-button:active,
.seat-card:not(.is-occupied):active {
  transform: translateY(1px) scale(0.98);
  transition-duration: 70ms;
}

.media-sync-button:active {
  transform: translate(-50%, calc(-50% + 1px)) scale(0.98);
  transition-duration: 70ms;
}

@keyframes live-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(115, 135, 119, 0.1);
    opacity: 0.86;
  }

  50% {
    box-shadow: 0 0 0 7px rgba(115, 135, 119, 0.02);
    opacity: 1;
  }
}

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

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@keyframes room-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

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

@keyframes status-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

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

@media (prefers-reduced-motion: reduce) {
  .status-dot,
  .live-dot,
  .entry-view > .site-header,
  .entry-layout > .entry-hero,
  .entry-layout > .entry-card,
  .entry-footer,
  .room-view:not(.hidden),
  .modal:not(.hidden) .modal-backdrop,
  .modal:not(.hidden) .modal-card,
  .media-status:not(.hidden) {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* personalization: themes, profile controls, and settings states */

body[data-theme="midnight"] {
  color-scheme: dark;
  --paper: #17161b;
  --paper-deep: #2b2730;
  --card: rgba(38, 34, 44, 0.88);
  --card-solid: #292530;
  --ink: #f6eee9;
  --ink-soft: #ddd0ca;
  --muted: #a99ca1;
  --faint: #756a74;
  --line: rgba(246, 238, 233, 0.14);
  --line-strong: rgba(246, 238, 233, 0.28);
  --terracotta-soft: #563944;
  --sage-soft: #33473d;
  --night: #100f12;
  --night-2: #201b22;
}

body[data-theme="moss"] {
  --paper: #edf0e8;
  --paper-deep: #d8e0d1;
  --card: rgba(251, 253, 247, 0.86);
  --card-solid: #fbfdf7;
  --ink: #1e2921;
  --ink-soft: #405047;
  --muted: #74847a;
  --faint: #aab8ad;
  --line: rgba(42, 67, 49, 0.15);
  --line-strong: rgba(42, 67, 49, 0.29);
  --terracotta: #9b6b61;
  --terracotta-dark: #765047;
  --terracotta-soft: #ead0c9;
  --sage: #5d8069;
  --sage-soft: #cbdcca;
}

body[data-accent="plum"] {
  --terracotta: #9f708e;
  --terracotta-dark: #784d6d;
  --terracotta-soft: #e6c9dc;
}

body[data-accent="sage"] {
  --terracotta: #718d78;
  --terracotta-dark: #4f6c57;
  --terracotta-soft: #cfe0d1;
}

body[data-font-scale="large"] .message-text,
body[data-font-scale="large"] .field-control input,
body[data-font-scale="large"] .message-form input,
body[data-font-scale="large"] .sidebar-member-name,
body[data-font-scale="large"] .seat-name,
body[data-font-scale="large"] .queue-item-title,
body[data-font-scale="large"] .settings-section,
body[data-font-scale="large"] .auth-intro {
  font-size: 1.08em;
}

body[data-font-scale="small"] .message-text,
body[data-font-scale="small"] .field-control input,
body[data-font-scale="small"] .message-form input,
body[data-font-scale="small"] .sidebar-member-name,
body[data-font-scale="small"] .seat-name,
body[data-font-scale="small"] .queue-item-title,
body[data-font-scale="small"] .settings-section,
body[data-font-scale="small"] .auth-intro {
  font-size: 0.94em;
}

body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

.account-entry-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: rgba(255, 250, 244, 0.52);
  font-size: 10px;
  font-weight: 700;
}

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

.account-entry-button svg {
  width: 14px;
  height: 14px;
}

.lobby-account-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 250, 244, 0.4);
}

.lobby-account-status > div {
  min-width: 0;
  flex: 1;
}

.lobby-account-status strong,
.lobby-account-status small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-account-status strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.lobby-account-status small {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8px;
}

.lobby-account-avatar {
  width: 29px;
  height: 29px;
}

.auth-modal-card {
  width: min(100%, 480px);
}

.auth-intro {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.auth-register-fields {
  margin-top: 20px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.auth-actions .primary-button,
.auth-actions .outline-button {
  min-height: 45px;
  margin-top: 0;
}

.auth-actions .outline-button {
  padding: 0 13px;
}

.auth-footnote {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 17px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
}

.auth-footnote svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  color: var(--sage);
}

.settings-card {
  position: relative;
  display: flex;
  width: min(100%, 720px);
  max-height: min(92dvh, 880px);
  flex-direction: column;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--card-solid);
  box-shadow: var(--shadow);
}

.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 25px 27px 20px;
  border-bottom: 1px solid var(--line);
}

.settings-header h2 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: -0.07em;
}

.settings-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.settings-callout {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 27px 0;
  padding: 10px 11px;
  border: 1px solid rgba(200, 111, 109, 0.25);
  border-radius: 10px;
  color: var(--terracotta-dark);
  background: var(--terracotta-soft);
  font-size: 10px;
  line-height: 1.4;
}

.settings-callout svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.settings-callout span {
  flex: 1;
}

.settings-form {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 0 27px 23px;
  scrollbar-color: rgba(119, 100, 85, 0.38) transparent;
  scrollbar-width: thin;
}

.settings-section {
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--line);
}

.settings-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.settings-section-title span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-section-title small {
  color: var(--muted);
  font-size: 9px;
}

.settings-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
}

.settings-profile-row .profile-preview {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
}

.settings-profile-row > div:last-child {
  min-width: 0;
  flex: 1;
}

.settings-inline-actions {
  display: flex;
  gap: 12px;
}

.settings-upload {
  justify-content: flex-start;
  margin-top: 9px;
}

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

.settings-emoji-grid .emoji-option {
  min-height: 38px;
}

.settings-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.choice-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.choice-field select {
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.choice-field select:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(200, 111, 109, 0.1);
}

.setting-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 49px;
  margin-top: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(241, 232, 222, 0.34);
}

.setting-switch span {
  min-width: 0;
}

.setting-switch strong,
.setting-switch small {
  display: block;
}

.setting-switch strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.setting-switch small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.setting-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.setting-switch i {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 21px;
  border-radius: 99px;
  background: var(--paper-deep);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.setting-switch i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--card-solid);
  box-shadow: 0 2px 5px rgba(48, 34, 23, 0.2);
  content: "";
  transition: transform var(--motion-fast) var(--ease-out), background var(--motion-fast) ease;
}

.setting-switch input:checked + i {
  background: var(--terracotta);
  box-shadow: none;
}

.setting-switch input:checked + i::after {
  background: #fffaf4;
  transform: translateX(15px);
}

.setting-switch input:focus-visible + i {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 20px;
}

.settings-actions .primary-button,
.settings-actions .outline-button {
  min-height: 42px;
  margin-top: 0;
}

.settings-actions .outline-button {
  padding: 0 15px;
}

.settings-security {
  flex: 0 0 auto;
  margin: 0 27px;
  padding-bottom: 25px;
}

.settings-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  border-top: 1px dashed var(--line-strong);
}

.settings-security-row > div {
  min-width: 0;
}

.settings-security-row strong,
.settings-security-row small {
  display: block;
}

.settings-security-row strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.settings-security-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.danger-text {
  color: var(--terracotta-dark);
}

.danger-row {
  margin-top: 4px;
  padding: 12px 9px;
  border: 1px solid rgba(200, 111, 109, 0.22);
  border-radius: 9px;
  background: rgba(240, 195, 189, 0.15);
}

@media (max-width: 650px) {
  .header-tools {
    gap: 7px;
  }

  .account-entry-button {
    min-width: 34px;
    padding: 0 9px;
  }

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

  .settings-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .settings-header,
  .settings-form {
    padding-right: 17px;
    padding-left: 17px;
  }

  .settings-security {
    margin-right: 17px;
    margin-left: 17px;
  }

  .settings-header {
    padding-top: 19px;
    padding-bottom: 16px;
  }

  .settings-header h2 {
    font-size: 25px;
  }

  .settings-callout {
    margin-right: 17px;
    margin-left: 17px;
  }

  .settings-section-title {
    display: block;
  }

  .settings-section-title small {
    display: block;
    margin-top: 4px;
  }

  .settings-choice-grid {
    grid-template-columns: 1fr;
  }

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

  .auth-actions {
    grid-template-columns: 1fr;
  }
}

@media (pointer: coarse) {
  .icon-button,
  .field-icon-button {
    min-width: 40px;
    min-height: 40px;
  }

  .fullscreen-button {
    width: 40px;
    height: 40px;
  }

  .message-form button {
    width: 42px;
    min-height: 42px;
  }
}

/* mobile room mode: let the document own the scroll instead of trapping it */

@media (max-width: 900px) {
  html,
  body {
    min-height: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .room-view {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

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

  .room-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    background: rgba(249, 244, 237, 0.9);
    backdrop-filter: blur(14px);
  }

  .room-scroll {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
}

/* wide rooms get a proper inspector rail; small screens get sheets instead */

@media (min-width: 1151px) {
  .room-scroll {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
      "theater inspector"
      "seats inspector";
    grid-template-rows: auto auto;
    align-items: start;
    gap: 19px;
  }

  .theater-panel {
    grid-area: theater;
    min-width: 0;
  }

  .theater-screen {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .seats-panel {
    grid-area: seats;
    min-width: 0;
    margin-top: 0;
  }

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

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

  .chat-panel {
    min-height: 390px;
    display: flex;
    flex-direction: column;
  }

  .chat-panel .message-list {
    height: auto;
    min-height: 210px;
    flex: 1;
  }

  .reactions-panel {
    min-height: 260px;
  }

  .queue-panel {
    min-height: 230px;
  }

  .seat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
  }

  .seat-card {
    min-height: 106px;
    border-radius: 18px 18px 12px 12px;
  }

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

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

@media (min-width: 1151px) and (hover: hover) {
  .seat-card:not(.is-occupied):hover {
    transform: translateY(-3px) scale(1.015);
  }
}

.emoji-picker-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  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 {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.emoji-search-field:focus-within {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(200, 111, 109, 0.1);
}

.emoji-search-field svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.emoji-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.emoji-empty {
  min-height: 55px;
  padding: 18px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.reaction-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.reaction-button {
  min-height: 62px;
  border-radius: 14px;
  font-size: 30px;
}

.call-deck {
  position: relative;
  padding: 20px;
}

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

.call-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.call-controls .outline-button {
  min-height: 34px;
  font-size: 9px;
}

.call-controls .outline-button.is-active {
  color: #fffaf4;
  border-color: var(--terracotta);
  background: var(--terracotta);
}

.call-audio-host {
  position: fixed;
  z-index: -1;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

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

.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: rgba(242, 234, 225, 0.38);
}

.call-tile.is-you {
  border-color: var(--terracotta);
  background: rgba(240, 195, 189, 0.22);
}

.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);
  font-size: 17px;
}

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

.call-tile-copy {
  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 {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 5px;
}

.call-tile-state .presence-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.call-tile-state .presence-dot.is-call-active {
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(115, 135, 119, 0.12);
}

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

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

.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;
}

.call-empty p {
  margin: 8px 0 0;
}

.mobile-sheet-close {
  display: none;
}

.mobile-action-rail {
  display: none;
}

@media (max-width: 900px) {
  .room-scroll {
    padding-bottom: max(122px, calc(122px + env(safe-area-inset-bottom)));
  }

  .theater-screen {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .mobile-action-rail {
    position: fixed;
    z-index: 55;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(255, 250, 244, 0.94);
    box-shadow: 0 15px 35px rgba(48, 34, 23, 0.15);
    backdrop-filter: blur(16px);
  }

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

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

  .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: 5px;
    right: 22%;
    min-width: 15px;
    padding: 2px 4px;
    border-radius: 99px;
    color: #fffaf4;
    background: var(--terracotta-dark);
    font-size: 8px;
    line-height: 1;
  }

  .mobile-sheet-backdrop {
    position: fixed;
    z-index: 60;
    inset: 0;
    background: rgba(27, 22, 19, 0.38);
    backdrop-filter: blur(4px);
  }

  .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: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 12px;
    display: flex;
    max-height: calc(100dvh - 120px);
    flex-direction: column;
    overflow: auto;
    padding: 18px;
    border-color: var(--line-strong);
    box-shadow: 0 22px 50px rgba(36, 26, 20, 0.24);
    animation: mobile-sheet-in 260ms var(--ease-spring) both;
  }

  .room-view.mobile-sheet-chat .chat-panel .message-list {
    height: min(42vh, 300px);
    flex: 0 0 auto;
  }

  .room-view.mobile-sheet-chat .message-form {
    position: static;
    margin-top: 14px;
  }

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

  .mobile-sheet-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 36px;
    min-height: 36px;
    place-items: center;
  }

  .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: 44px;
  }

  .mobile-mini-player {
    position: fixed;
    z-index: 50;
    right: 12px;
    bottom: calc(135px + env(safe-area-inset-bottom));
    left: 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 7px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: rgba(255, 250, 244, 0.96);
    box-shadow: 0 12px 30px rgba(48, 34, 23, 0.15);
    backdrop-filter: blur(14px);
  }

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

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

  .mobile-mini-copy .screen-kicker {
    display: block;
    font-size: 8px;
  }

  .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;
    color: var(--ink-soft);
    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 {
    flex: 0 0 auto;
    min-width: 36px;
    min-height: 36px;
  }

  .room-view:not(.mobile-sheet-chat) .message-form {
    position: fixed;
    z-index: 52;
    right: 12px;
    bottom: calc(75px + env(safe-area-inset-bottom));
    left: 12px;
    margin: 0;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: rgba(255, 250, 244, 0.96);
    box-shadow: 0 12px 30px rgba(48, 34, 23, 0.15);
    backdrop-filter: blur(14px);
  }

  .room-view:not(.mobile-sheet-chat) .chat-panel {
    padding-bottom: 76px;
  }
}

@media (max-width: 650px) {
  .field-control input,
  .message-form input {
    font-size: 16px;
  }

  .reaction-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .reaction-button {
    min-height: 58px;
    font-size: 28px;
  }

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

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

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

@media (prefers-reduced-motion: reduce) {
  .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 {
    animation: none;
  }
}

/* bounded room layout: the page can breathe, chat cannot take it hostage */

.room-main,
.room-scroll,
.lower-grid,
.chat-panel,
.reactions-panel,
.queue-panel,
.call-deck {
  min-width: 0;
}

.chat-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel .message-list {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  contain: layout paint;
}

.message-content,
.message-preview,
.message-audio,
.chat-gif-link {
  min-width: 0;
  max-width: 100%;
}

.message-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-image-preview,
.chat-video-preview,
.message-audio audio {
  display: block;
  max-width: 100%;
}

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

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

.chat-new-message {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.chat-scroll-latest {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--terracotta-dark);
  background: var(--terracotta-soft);
  box-shadow: 0 5px 14px rgba(48, 34, 23, 0.08);
  font-family: var(--mono);
  font-size: 8px;
  pointer-events: auto;
}

.chat-scroll-latest:hover {
  border-color: var(--terracotta);
  background: var(--card-solid);
  transform: translateY(-1px);
}

.chat-scroll-latest svg {
  width: 12px;
  height: 12px;
}

@media (min-width: 1151px) {
  .lower-grid {
    max-height: calc(100dvh - 112px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(119, 100, 85, 0.28) transparent;
    scrollbar-width: thin;
  }

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

  .chat-panel .message-list {
    height: auto;
    flex: 1 1 0;
  }

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

@media (min-width: 651px) and (max-width: 1150px) {
  .chat-panel {
    height: clamp(360px, 48dvh, 540px);
  }

  .chat-panel .message-list {
    height: auto;
    flex: 1 1 0;
  }
}

@media (max-width: 900px) {
  body.chat-sheet-open {
    overflow: hidden;
  }

  .chat-panel {
    min-height: 0;
  }

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

  .room-view.mobile-sheet-chat .chat-panel {
    height: min(78dvh, calc(100dvh - 104px));
    max-height: calc(100dvh - 104px);
    overflow: hidden;
    overscroll-behavior: contain;
  }

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

  .room-view.mobile-sheet-chat .message-form,
  .room-view.mobile-sheet-chat .voice-recorder,
  .room-view.mobile-sheet-chat .gif-picker {
    flex: 0 0 auto;
  }

  .room-view.mobile-sheet-chat .gif-picker {
    min-height: 0;
    max-height: 34dvh;
    overflow: hidden;
  }

  .room-view.mobile-sheet-chat .gif-results {
    min-height: 0;
    overflow-y: auto;
  }

  .room-view:not(.mobile-sheet-chat) .chat-panel {
    padding-bottom: 86px;
  }

  .room-view:not(.mobile-sheet-chat) .message-list {
    max-height: 220px;
  }

  .room-view.mobile-sheet-chat .panel-heading {
    flex: 0 0 auto;
  }

  .mobile-action-rail {
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 650px) {
  .invite-modal-card {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 18px;
  }

  .invite-layout {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  #invite-qr {
    width: min(58vw, 220px);
    height: min(58vw, 220px);
  }

  .invite-details {
    width: 100%;
  }

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

  .chat-scroll-latest {
    min-height: 30px;
    padding-inline: 10px;
  }

  .message-row {
    gap: 7px;
    margin-bottom: 13px;
  }

  .message-row .avatar {
    flex: 0 0 auto;
  }

  .message-text {
    font-size: 13px;
  }

  .room-view.mobile-sheet-chat .chat-panel {
    right: 8px;
    left: 8px;
    padding: 15px;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-scroll-latest {
    transition: none;
  }
}
