:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  --bg: #151512;
  --surface: #211f1b;
  --raised: #2b2822;
  --input: #181711;
  --ink: #ece8dc;
  --muted: #acae9f;
  --subtle: #929889;
  --gold: #d7b477;
  --gold-hover: #e6c58d;
  --line: #464136;
  --online: #a8c099;
  --cold: #aec3cf;
  --danger: #f0aa96;
  --paper: var(--surface);
  --green: #28372b;
  --rust: var(--gold);
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 12px 36px #0003;
  --display: Georgia, "Times New Roman", serif;
  --ease: 160ms ease;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  background: var(--raised);
  color: var(--ink);
  transition:
    background var(--ease),
    border-color var(--ease);
}
button:hover {
  background: #38342a;
  border-color: #776b55;
}
button:active {
  background: #403a2e;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button.primary,
.primary {
  background: var(--gold);
  color: #201b12;
  border-color: var(--gold);
  font-weight: 650;
}
button.primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}
button.danger {
  color: var(--danger);
  border-color: #6a4c3e;
  background: #302820;
}
button.small {
  min-height: 36px;
  font-size: 13px;
  padding: 7px 11px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold-hover);
  outline-offset: 3px;
}
a {
  color: #d6c08d;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
a:hover {
  color: #f0d6a3;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.2;
  color: #f0e9d9;
}
h1 {
  font-size: 32px;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 29px;
}
h3 {
  font-size: 23px;
}
p {
  line-height: 1.65;
}
label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #c3c6b5;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #605746;
  border-radius: var(--radius-sm);
  background: var(--input);
  color: var(--ink);
}
input::placeholder,
textarea::placeholder {
  color: #959c8b;
  opacity: 1;
}
input:hover,
textarea:hover,
select:hover {
  border-color: #8a7c62;
}
textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--gold);
  min-width: 18px;
  min-height: 18px;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--gold);
  cursor: pointer;
  min-height: 24px;
}
input[type="file"] {
  font-size: 13px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.5px;
  color: var(--gold);
}
.loading {
  padding: 25vh 10vw;
  font: 30px var(--display);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.brand img {
  width: 38px;
  height: 38px;
}
.brand strong {
  font: 22px var(--display);
  white-space: nowrap;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.1px;
  margin-top: 4px;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-size: 11px;
  color: #c2c8b8;
  white-space: nowrap;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  display: inline-block;
  background: var(--online);
  flex-shrink: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.row > label {
  flex: 1;
  min-width: 0;
}
.stack {
  display: grid;
  gap: 16px;
}
.check {
  display: flex;
  align-items: center;
  font-weight: 400;
  gap: 10px;
}
.empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  padding: 24px 0;
}
.divider {
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.note {
  background: #242a20;
  border-left: 2px solid #a18758;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.65;
  color: #c8cbbd;
}
.link-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #2a261e;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}
.link-card small {
  display: block;
  font-size: 12px;
  margin-top: 5px;
}
.link-card:hover {
  background: #393225;
}
.link-card[aria-disabled="true"] {
  color: var(--muted);
  background: #1e1c17;
  border-style: dashed;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
  min-height: 20px;
}
.auth {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  background: var(--surface);
}
.auth-art {
  position: relative;
  background:
    linear-gradient(0deg, #10150ee6, #10150e0a),
    url("/assets/tavern.webp") center/cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
}
.auth-art h1 {
  font-size: clamp(44px, 5vw, 72px);
  max-width: 660px;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.auth-art p {
  max-width: 390px;
  color: #d1d2c1;
  font-size: 15px;
}
.auth-panel {
  padding: 40px 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-panel h2 {
  margin-bottom: 8px;
}
.auth-panel > p {
  font-size: 14px;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  gap: 22px;
}
.auth-tabs button {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 12px 2px;
  font-size: 14px;
  color: var(--muted);
}
.auth-tabs button.active {
  color: var(--gold);
  box-shadow: inset 0 -2px var(--gold);
}
.auth-panel footer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin-top: 28px;
}
.auth-panel .primary {
  padding: 13px;
}
.shell {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: 100svh;
}
.rail {
  background: #1e1d18;
  border-right: 1px solid #3c382e;
  padding: 20px 8px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  position: sticky;
  top: 0;
  height: 100svh;
}
.rail img {
  width: 42px;
  margin-bottom: 18px;
}
.rail button {
  color: #b0b8a5;
  background: transparent;
  border: 1px solid transparent;
  font-size: 11px;
  padding: 11px 3px;
  width: 62px;
}
.rail button span {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
  line-height: 1.1;
}
.rail button.active {
  background: #303428;
  color: #edce96;
  border-color: #595740;
}
.rail button:hover {
  background: #292f23;
}
.rail .bottom {
  margin-top: auto;
}
.workspace {
  min-width: 0;
  padding: 22px 24px 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1900px;
  margin: 0 auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.topbar .row {
  gap: 10px;
}
.topbar .pill {
  font-size: 10px;
  letter-spacing: 0.8px;
}
.identity {
  font-size: 13px;
  max-width: 135px;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.avatar {
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font: 17px var(--display);
  color: var(--gold);
  background: #32372a;
  border: 1px solid #5b6047;
}
.connection {
  display: block;
  color: var(--online);
  font-size: 11px;
}
.reconnect {
  color: var(--gold);
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 370px);
  gap: 24px;
  padding-top: 22px;
  flex: 1;
  align-items: start;
  min-height: 0;
}
.content-grid.chat-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.chat-hidden .chat-panel {
  display: none;
}
.chat-hidden .main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.main {
  min-width: 0;
}
.welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.welcome h1 {
  font-size: 29px;
  margin: 6px 0;
}
.welcome p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.weather {
  font: 14px var(--display);
  color: var(--cold);
  text-align: right;
  white-space: nowrap;
}
.weather small {
  display: block;
  font:
    11px "Segoe UI",
    sans-serif;
  margin-top: 6px;
  color: var(--muted);
}
.tavern-scene {
  background: #262219;
  border: 1px solid #50513c;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.scene-label {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 18px;
  background: #141b16e8;
  color: #e9dac0;
  border: 1px solid #756549;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 1px;
}
.hotspot {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 30px;
  border: 1px solid #b39a6c;
  box-shadow: 0 3px 10px #0005;
  background: #191d17ed;
  color: #f2e3c9;
  font-size: 12px;
  padding: 7px 12px;
  min-height: 36px;
}
.hotspot:before {
  content: "+";
  color: #dfba76;
  font-size: 16px;
  line-height: 1;
}
.hotspot:hover {
  background: #363a29;
  color: #fff0d7;
  border-color: #f0cd8c;
}
.hotspot.hearth {
  left: 5%;
  top: 50%;
}
.hotspot.bar {
  right: 3%;
  top: 43%;
}
.hotspot.board {
  left: 52%;
  top: 29%;
}
.hotspot.table {
  left: 58%;
  top: 79%;
}
.hotspot.room {
  right: 24%;
  top: 20%;
}
.scene-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 15px 18px;
}
.scene-caption {
  font: 15px/1.5 var(--display);
  color: #d0c8b1;
  margin: 0;
  max-width: 370px;
}
.scene-caption small {
  display: block;
  margin-top: 4px;
  font:
    11px "Segoe UI",
    sans-serif;
  color: var(--muted);
}
.atmosphere-control {
  display: grid;
  grid-template-columns: auto 92px;
  gap: 4px 10px;
  align-items: center;
  flex-shrink: 0;
}
.atmosphere-control label {
  font-size: 12px;
}
.atmosphere-control select {
  font-size: 13px;
  padding: 7px;
  min-height: 36px;
}
.atmosphere-control small {
  grid-column: 1/-1;
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}
.room-below {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}
.teaser {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 14px 16px;
  text-align: left;
  background: #211f19;
  border-color: #453e2f;
}
.teaser .symbol {
  font-size: 24px;
  color: #ad9c72;
}
.teaser strong {
  font: 17px var(--display);
  color: #ded8c4;
}
.teaser small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
.chat-panel {
  position: sticky;
  top: 18px;
  background: #211f1a;
  border: 1px solid #424b3b;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 160px);
  min-height: 460px;
  overflow: clip;
  isolation: isolate;
}
.chat-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: #29261e;
}
.chat-header h3 {
  font-size: 24px;
  margin: 0;
}
.chat-header p {
  color: #aeb7a3;
  font-size: 13px;
  margin: 7px 0 14px;
}
.presence {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 24px;
  max-height: 90px;
  overflow: auto;
}
.person {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  line-height: 1.4;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid #47563c;
  background: #2b3425;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.messages {
  position: relative;
  flex: 1;
  overflow: auto;
  min-height: 100px;
  padding: 0 22px 16px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #5d6853 #211f1a;
  background: #211f1a;
}
.message {
  margin: 0;
  padding-top: 19px;
  overflow-wrap: anywhere;
}
.message.continuation {
  padding-top: 5px;
}
.message-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  align-items: baseline;
  line-height: 1.4;
  margin-bottom: 5px;
}
.message-head strong {
  color: #e1c490;
  font-size: 13px;
  font-weight: 650;
}
.message-head time {
  color: #a6b09b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.message p {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  white-space: pre-wrap;
  color: #e0e4d8;
}
.message.roleplay {
  border-left: 2px solid #9b855b;
  padding-left: 12px;
  margin-top: 15px;
  padding-top: 0;
}
.message.roleplay.continuation {
  margin-top: 5px;
}
.message.roleplay p {
  color: #d9ddcd;
}
.message.dice {
  background: #2b3124;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-top: 15px;
}
.message.dice p {
  color: #e3c690;
  font-size: 14px;
}
.mode-label {
  color: #b5c4ca;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #2b3636;
}
.chat-form {
  flex-shrink: 0;
  padding: 14px 17px 16px;
  border-top: 1px solid var(--line);
  background: #2b271e;
}
.chat-form textarea {
  min-height: 78px;
  max-height: 180px;
  font-size: 15px;
  border-color: #746448;
  background: #191711;
}
.chat-form .row {
  margin-top: 10px;
}
.chat-form select {
  font-size: 12px;
  padding: 8px;
  width: 155px;
  min-height: 40px;
}
.chat-form button {
  font-size: 13px;
  min-height: 40px;
}
.chat-form .form-error {
  margin-top: 8px;
}
.chat-form .form-error:empty {
  display: none;
}
.sr-label {
  font-size: 12px;
  font-weight: 400;
  color: #bdc7ae;
  margin-bottom: 7px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.new-messages {
  border-radius: 0;
  min-height: 32px;
  background: #37452b;
  color: #e6d3a9;
  border: 0;
  border-top: 1px solid #69764f;
  flex-shrink: 0;
}
.audio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 15px 0;
  margin-top: 8px;
  font-size: 12px;
}
.audio-bar button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}
.audio-sliders {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.audio-sliders label {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
}
.audio-sliders input {
  width: 70px;
}
.offline-hint {
  font-size: 11px;
  color: var(--muted);
}
.connected-hint {
  color: var(--online);
}
.compact-label {
  display: none;
}
.chat-panel {
  scroll-margin-top: 16px;
}
.room-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 420px;
}
.room-panel h2 {
  margin: 8px 0 12px;
}
.room-panel .intro {
  font-size: 15px;
  color: #b8c0ad;
  max-width: 640px;
}
.notice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.notice {
  padding: 20px;
  background: #2b2c20;
  border: 1px solid #5d5b3d;
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}
.notice h3 {
  font-size: 23px;
  margin: 12px 0 9px;
}
.notice p {
  font-size: 14px;
  white-space: pre-wrap;
  color: #d5d7c6;
}
.notice .small {
  padding: 5px 9px;
  font-size: 12px;
}
.notice-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
summary {
  cursor: pointer;
  color: #d9c697;
  padding: 10px 0;
  font-size: 14px;
}
.npc-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.morrow-mark {
  width: 62px;
  height: 62px;
  border: 1px solid #a18c5c;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 32px var(--display);
  color: var(--gold);
  background: #343527;
}
.npc-messages {
  height: 340px;
  overflow: auto;
  padding: 0 12px 16px;
  border-block: 1px solid var(--line);
  scrollbar-width: thin;
}
.npc-messages .message {
  background: #2b2821;
  padding: 12px 14px;
  margin-top: 14px;
  border-radius: var(--radius-sm);
}
.npc-messages .message.visitor {
  background: #333027;
  margin-left: 24px;
}
.npc-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.npc-form .check {
  font-size: 13px;
}
.dice-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0;
}
.dice-options button {
  min-width: 65px;
  font: 23px var(--display);
  padding: 20px 12px;
}
.dm-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.dm-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 19px;
  min-width: 0;
}
.dm-section h3 {
  font-size: 22px;
}
.dm-section.wide {
  grid-column: 1/-1;
}
.dm-section p {
  font-size: 14px;
}
.dm-section .row {
  flex-wrap: wrap;
}
.dm-section .row > label {
  min-width: 140px;
}
.cue-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}
.dm-section details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.memory-list {
  max-height: 360px;
  overflow: auto;
}
.memory {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.memory p {
  margin: 8px 0;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.media-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  overflow-wrap: anywhere;
}
.media-item img,
.media-item video {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #11150e;
  margin: 10px 0;
}
.reveal {
  padding: 20px;
  border: 1px solid #847548;
  border-radius: var(--radius);
  background: #2c271e;
  margin-bottom: 20px;
}
.reveal h3 {
  margin: 5px 0 14px;
}
.reveal img,
.reveal video {
  max-height: 480px;
  width: 100%;
  object-fit: contain;
}
.statusline {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.history {
  max-height: 280px;
  overflow: auto;
}
#toast {
  position: fixed;
  z-index: 30;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 20px;
  border: 1px solid #7c805c;
  border-radius: var(--radius);
  background: #303925;
  color: #f0eddb;
  box-shadow: var(--shadow);
  font-size: 14px;
}
.join-code {
  overflow-wrap: anywhere;
  background: #303826;
  border: 1px solid #596345;
  padding: 14px;
  font: 14px monospace;
}
@media (min-width: 1600px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 30px;
  }
  .workspace {
    padding-inline: 32px;
  }
}
@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
  }
  .workspace {
    padding-inline: 18px;
  }
  .weather {
    display: none;
  }
  .topbar .pill {
    display: none;
  }
  .scene-caption {
    font-size: 14px;
  }
  .scene-footer {
    flex-wrap: wrap;
    gap: 10px;
  }
  .atmosphere-control {
    margin-left: auto;
  }
  .dm-layout {
    grid-template-columns: 1fr;
  }
  .notice-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .chat-panel {
    position: relative;
    top: 0;
    height: 600px;
    min-height: 450px;
  }
  .chat-hidden .main {
    max-width: none;
  }
  .scene-footer {
    flex-wrap: nowrap;
  }
  .auth-art {
    padding: 30px;
  }
  .auth-panel {
    padding: 32px 8%;
  }
  .audio-bar > .offline-hint {
    display: none;
  }
}
@media (max-width: 600px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-art {
    min-height: 260px;
    padding: 25px;
  }
  .auth-art h1 {
    font-size: 37px;
    margin: 28px 0 8px;
    letter-spacing: -1px;
  }
  .auth-art p,
  .auth-art .pill {
    display: none;
  }
  .auth-panel {
    padding: 28px 24px;
  }
  .shell {
    display: block;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .rail {
    position: fixed;
    z-index: 10;
    bottom: 0;
    top: auto;
    width: 100%;
    height: auto;
    min-height: 70px;
    padding: 4px 3px calc(4px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    border-top: 1px solid #4a5340;
    background: #252119;
  }
  .rail img {
    display: none;
  }
  .rail button {
    width: auto;
    min-width: 44px;
    flex: 1;
    max-width: 68px;
    min-height: 58px;
    font-size: 10px;
    padding: 7px 2px;
  }
  .rail button span {
    font-size: 21px;
    margin-bottom: 5px;
  }
  .rail .bottom {
    margin: 0;
  }
  .workspace {
    padding: 16px 12px 0;
  }
  .topbar {
    padding-bottom: 15px;
    gap: 8px;
  }
  .topbar .brand {
    gap: 8px;
  }
  .topbar .brand img {
    width: 29px;
    height: 29px;
  }
  .topbar .brand strong {
    font-size: 18px;
  }
  .topbar .brand small {
    font-size: 9px;
    letter-spacing: 0.5px;
  }
  .topbar .identity,
  .topbar .avatar {
    display: none;
  }
  #toggle-chat {
    min-height: 40px;
    font-size: 12px;
    padding: 7px 9px;
  }
  .content-grid {
    padding-top: 19px;
    gap: 16px;
  }
  .welcome {
    margin-bottom: 14px;
  }
  .welcome h1 {
    font-size: 29px;
  }
  .welcome p {
    font-size: 13px;
    max-width: 300px;
  }
  .scene-label {
    top: 8px;
    left: 9px;
    padding: 4px 6px;
    font-size: 8px;
    letter-spacing: 0.7px;
  }
  .hotspot {
    font-size: 10px;
    min-height: 32px;
    padding: 5px 7px;
    gap: 4px;
  }
  .hotspot:before {
    font-size: 13px;
  }
  .hotspot.hearth {
    left: 2%;
    top: 49%;
  }
  .hotspot.board {
    left: 45%;
    top: 31%;
  }
  .hotspot.room {
    right: 3%;
    top: 11%;
  }
  .hotspot.bar {
    right: 2%;
    top: 52%;
  }
  .hotspot.table {
    left: 52%;
    top: 80%;
  }
  .scene-footer {
    padding: 12px;
  }
  .scene-caption {
    display: none;
  }
  .atmosphere-control {
    width: 100%;
    grid-template-columns: 1fr 110px;
    margin: 0;
  }
  .atmosphere-control select {
    min-height: 42px;
    font-size: 14px;
  }
  .atmosphere-control label {
    font-size: 14px;
  }
  .atmosphere-control small {
    text-align: left;
    font-size: 11px;
  }
  .room-below {
    gap: 9px;
    margin: 12px 0 0;
  }
  .teaser {
    padding: 12px;
    gap: 8px;
  }
  .teaser .symbol {
    font-size: 20px;
  }
  .teaser strong {
    font-size: 15px;
  }
  .teaser small {
    font-size: 11px;
  }
  .chat-panel {
    height: min(680px, 78svh);
    min-height: 470px;
  }
  .chat-header {
    padding: 17px 18px 14px;
  }
  .chat-header p {
    margin-bottom: 10px;
  }
  .messages {
    padding-inline: 18px;
  }
  .message p {
    font-size: 15px;
  }
  .chat-form textarea {
    font-size: 16px;
  }
  .chat-form select,
  .chat-form button {
    min-height: 44px;
  }
  .audio-bar {
    gap: 18px;
    padding-block: 17px;
  }
  .audio-sliders {
    width: 100%;
    justify-content: space-between;
  }
  .audio-sliders label {
    display: grid;
    gap: 4px;
  }
  .audio-sliders input {
    width: 86px;
  }
  .audio-bar button {
    min-height: 42px;
  }
  .room-panel {
    padding: 20px 16px;
  }
  .room-panel h2 {
    font-size: 28px;
  }
  .room-panel .intro {
    font-size: 14px;
  }
  .dm-section {
    padding: 16px;
  }
  .media-grid {
    grid-template-columns: 1fr;
  }
  .npc-form .row {
    flex-wrap: wrap;
  }
  .npc-form .row small {
    width: 100%;
  }
  #toast {
    bottom: calc(85px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 900px) {
  .wide-label {
    display: none;
  }
  .compact-label {
    display: inline;
  }
}
@media (max-width: 600px) {
  .room-below {
    display: none;
  }
  .hotspot.board,
  .hotspot.table,
  .hotspot.room {
    display: none;
  }
  .hotspot.hearth,
  .hotspot.bar {
    min-height: 44px;
    padding-inline: 10px;
    font-size: 11px;
  }
}
