:root {
  color-scheme: dark;
  --bg: #0d1016;
  --bg-accent: #162130;
  --panel: rgba(12, 18, 28, 0.82);
  --panel-strong: rgba(15, 23, 35, 0.96);
  --line: rgba(166, 197, 224, 0.18);
  --line-strong: rgba(243, 170, 92, 0.34);
  --text: #f5f1ea;
  --muted: rgba(245, 241, 234, 0.72);
  --accent: #f3aa5c;
  --accent-2: #84c9c0;
  --danger: #ff9b9b;
  --success: #8ed9a2;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: rgba(243, 170, 92, 0.3);
}

[hidden] {
  display: none !important;
}

.page-shell {
  min-height: 100vh;
  min-height: 100dvh;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.auth-shell {
  display: grid;
  gap: 18px;
  align-items: start;
  justify-items: center;
  width: min(100%, 760px);
  max-width: 760px;
  margin: 0 auto;
}

.auth-shell > .hero-panel,
.auth-shell > .auth-panel {
  width: 100%;
}

.auth-shell > .hero-panel {
  text-align: center;
}

.landing-title {
  max-width: none;
  margin-bottom: 18px;
}

.auth-shell > .hero-panel h1,
.auth-shell > .hero-panel .lead,
.auth-shell > .hero-panel .support-copy {
  margin-left: auto;
  margin-right: auto;
}

.auth-shell > .auth-panel {
  max-width: 460px;
}

.auth-shell > .auth-panel .auth-panel-head {
  text-align: center;
}

.auth-shell > .auth-panel .auth-toggle,
.auth-shell > .auth-panel .auth-form {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.hero-panel,
.auth-panel,
.lounge-panel,
.private-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 25, 37, 0.92), rgba(8, 12, 18, 0.88));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel::before,
.auth-panel::before,
.lounge-panel::before,
.private-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(243, 170, 92, 0.1), transparent 20%),
    radial-gradient(circle at left bottom, rgba(132, 201, 192, 0.1), transparent 24%);
  pointer-events: none;
}

.hero-panel,
.auth-panel {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
}

h1,
h2 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 0.98;
}

h1 {
  font-size: clamp(3rem, 10vw, 5.6rem);
  max-width: 9ch;
}

h2 {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
}

.lead,
.support-copy,
.auth-intro,
.benefit-card p,
.compact-lead {
  color: var(--muted);
  line-height: 1.7;
}

.lead {
  margin: 22px 0 0;
  font-size: 1.05rem;
  max-width: 40rem;
}

.support-copy {
  margin: 16px 0 0;
  max-width: 42rem;
}

.benefit-grid {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.benefit-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.benefit-card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.auth-panel-head {
  margin-bottom: 22px;
}

.auth-intro {
  margin: 12px 0 0;
}

.auth-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab,
.primary-button,
.secondary-button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.button-link {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-width: 0;
  padding: 0 20px;
  box-sizing: border-box;
  font: inherit;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, rgba(243, 170, 92, 0.92), rgba(211, 136, 67, 0.92));
  color: #0f1116;
}

.secondary-button,
.button-link {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.auth-tab {
  padding: 0 18px;
  background: transparent;
  color: var(--muted);
}

.auth-tab.is-active {
  background: linear-gradient(135deg, rgba(243, 170, 92, 0.92), rgba(211, 136, 67, 0.92));
  color: #0f1116;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.field-row[hidden] {
  display: none !important;
}

.field-row {
  display: grid;
  gap: 8px;
}

.captcha-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.captcha-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.captcha-refresh-button:hover {
  border-color: rgba(243, 170, 92, 0.5);
}

.captcha-refresh-button:disabled {
  opacity: 0.55;
}

.captcha-refresh-button svg {
  width: 18px;
  height: 18px;
}

.compact-field-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.compact-field-grid > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field-row label {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.inline-label-note {
  color: rgba(245, 241, 234, 0.62);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.field-row input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  box-sizing: border-box;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.field-row input::placeholder {
  color: rgba(245, 241, 234, 0.4);
}

.field-row textarea,
.field-row select {
  width: 100%;
  padding: 14px 16px;
  box-sizing: border-box;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.field-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 46px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(245, 241, 234, 0.92) 50%),
    linear-gradient(135deg, rgba(245, 241, 234, 0.92) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field-row select[multiple] {
  min-height: 180px;
  padding-right: 16px;
  background-image: none;
}

.field-row select option {
  color: #0c1018;
  background: #f5f1ea;
}

.field-row select[multiple] option {
  padding: 10px 12px;
}

.option-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.option-chip {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 600;
  text-align: left;
}

.option-chip.is-selected {
  border-color: rgba(243, 170, 92, 0.75);
  background: linear-gradient(135deg, rgba(243, 170, 92, 0.96), rgba(202, 122, 54, 0.92));
  color: #0c1018;
}

.option-chip:hover {
  border-color: rgba(243, 170, 92, 0.5);
}

.field-row textarea {
  resize: vertical;
  min-height: 88px;
}

.game-setup-control {
  position: relative;
}

.game-setup-control::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 18px;
  width: 10px;
  height: 10px;
  pointer-events: none;
  transform: translateY(-58%) rotate(45deg);
  border-right: 2px solid rgba(245, 241, 234, 0.78);
  border-bottom: 2px solid rgba(245, 241, 234, 0.78);
  opacity: 0.9;
}

.game-setup-control input,
.game-setup-control select {
  min-height: 58px;
  padding-right: 52px;
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    rgba(12, 18, 28, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.game-setup-control input:hover,
.game-setup-control select:hover {
  border-color: rgba(243, 170, 92, 0.32);
}

.game-setup-control input:focus,
.game-setup-control select:focus {
  border-color: rgba(243, 170, 92, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 4px rgba(243, 170, 92, 0.12);
}

.game-setup-control-combo input {
  letter-spacing: 0.01em;
}

.game-setup-control-combo::after {
  right: 20px;
}

.game-setup-control-select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
}

.game-setup-control-select::after {
  right: 20px;
}

.field-hint,
.form-message {
  margin: 0;
  font-size: 0.92rem;
}

.field-hint {
  color: rgba(245, 241, 234, 0.56);
}

.error-message {
  color: var(--danger);
}

.success-message {
  color: var(--success);
}

.private-panel {
  width: min(960px, 100%);
  padding: 32px;
}

.lounge-panel {
  padding: 32px;
}

.lounge-copy {
  margin-bottom: 22px;
}

.dashboard-copy h1,
.placeholder-panel h1 {
  max-width: 12ch;
}

.lounge-title {
  max-width: none;
  font-size: clamp(1rem, 3.2vw, 2.1rem);
  line-height: 1.08;
  white-space: nowrap;
}

.compact-lead {
  margin-top: 18px;
}

.lounge-actions {
  display: flex;
  justify-content: flex-start;
}

.utility-bar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.utility-bar > * {
  flex: 0 0 auto;
  max-width: 100%;
}

.utility-bar > .primary-button,
.utility-bar > .secondary-button,
.utility-bar > .button-link {
  width: auto;
  min-height: 52px;
}

.notification-hub {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notification-bell {
  gap: 8px;
}

.notification-bell-label {
  font-weight: 700;
}

.notification-count {
  min-width: 24px;
  min-height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(243, 170, 92, 0.2);
  border: 1px solid rgba(243, 170, 92, 0.4);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(460px, calc(100vw - 34px));
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 17, 26, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  z-index: 8;
}

.notification-panel-title {
  margin: 0;
  color: rgba(245, 241, 234, 0.9);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.notification-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.notification-item {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.notification-item-unread {
  border-color: rgba(243, 170, 92, 0.36);
  background: rgba(243, 170, 92, 0.12);
}

.notification-item p {
  margin: 0;
  color: rgba(245, 241, 234, 0.9);
  line-height: 1.5;
}

.notification-item-time {
  margin-top: 6px !important;
  color: rgba(245, 241, 234, 0.62) !important;
  font-size: 0.82rem;
}

.notification-item-link {
  margin-top: 8px;
  display: inline-flex;
}

.notification-item-empty {
  color: var(--muted);
}

.notification-panel-link {
  margin-top: 12px;
  display: inline-flex;
}

.notification-toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(400px, calc(100vw - 32px));
}

.notification-toast {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(132, 201, 192, 0.34);
  background: rgba(14, 23, 34, 0.96);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 10px;
}

.notification-toast p {
  margin: 0;
  color: rgba(245, 241, 234, 0.93);
  line-height: 1.45;
}

.notification-toast-fade {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.button-link {
  min-height: 52px;
}

.dashboard-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  grid-auto-flow: row;
  grid-auto-rows: auto;
  gap: 14px;
  margin-top: 30px;
}

.dashboard-card-link {
  display: block;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
}

.dashboard-card-item {
  display: grid;
  align-content: start;
  min-width: 0;
  height: auto;
  min-height: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.dashboard-card-link:hover .dashboard-card-item,
.dashboard-card-link:focus-visible .dashboard-card-item {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.accent-card {
  background: linear-gradient(180deg, rgba(243, 170, 92, 0.16), rgba(255, 255, 255, 0.05));
  border-color: rgba(243, 170, 92, 0.24);
}

.admin-card {
  background: linear-gradient(180deg, rgba(88, 160, 142, 0.18), rgba(255, 255, 255, 0.05));
  border-color: rgba(88, 160, 142, 0.28);
}

.card-kicker {
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.dashboard-card-item h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  overflow-wrap: anywhere;
}

.dashboard-card-item p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.utility-actions {
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.ghost-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 700;
}

.private-shell {
  display: grid;
  place-items: center;
}

.placeholder-panel {
  position: relative;
}

.app-panel {
  position: relative;
}

.compact-support {
  max-width: 46rem;
}

.content-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.app-grid {
  min-width: 0;
  align-items: start;
}

.app-grid > * {
  min-width: 0;
}

.info-card,
.resource-card,
.empty-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.info-card,
.resource-card {
  padding: 22px;
}

.empty-card {
  padding: 20px;
  color: var(--muted);
}

.section-header,
.resource-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header h2,
.resource-head h3 {
  margin: 0;
}

.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.card-list {
  display: grid;
  gap: 14px;
}

.language-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.language-filter-toggle input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.detail-grid {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-grid div {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-grid-full {
  grid-column: 1 / -1;
}

.detail-grid div:last-child {
  border-bottom: 0;
}

.detail-grid dt {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  color: var(--text);
}

.profile-summary {
  display: grid;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.avatar-shell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-preview,
.avatar-fallback {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.avatar-preview {
  object-fit: cover;
}

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(243, 170, 92, 0.92), rgba(132, 201, 192, 0.78));
  color: #0c1018;
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 700;
}

.profile-summary-copy h2 {
  margin-bottom: 10px;
}

.public-profile-heading {
  margin: 0;
}

.profile-summary-label {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.profile-summary-text {
  margin: 0;
  max-width: 44rem;
  color: rgba(245, 241, 234, 0.88);
}

.profile-moderation-banner {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(243, 170, 92, 0.26);
  background: rgba(243, 170, 92, 0.12);
  color: rgba(255, 228, 196, 0.96);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-links {
  margin-top: 18px;
}

.public-style-grid {
  display: grid;
  gap: 16px;
}

.public-style-group {
  display: grid;
  gap: 8px;
}

.public-style-group h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--accent-2);
}

.public-search-form {
  display: grid;
  gap: 12px;
}

.public-search-row {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.public-search-row .field-row {
  flex: 1 1 240px;
}

.public-user-card {
  display: grid;
  gap: 14px;
}

.public-user-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.public-user-card-actions > * {
  width: 100%;
  min-width: 0;
}

.public-user-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.public-user-card-copy {
  display: grid;
  gap: 6px;
}

.public-user-card-copy h3,
.public-user-card-copy p {
  margin: 0;
}

.public-user-bio {
  color: rgba(245, 241, 234, 0.76);
}

.profile-link-button {
  width: 100%;
}

.character-link-button {
  min-width: 228px;
  max-width: 100%;
  padding: 14px 18px;
  box-sizing: border-box;
  border-radius: 20px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.character-link-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text);
  font-family: 'Fraunces', serif;
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.1;
}

.character-link-subtitle {
  color: rgba(245, 241, 234, 0.66);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.character-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(243, 170, 92, 0.14);
  border: 1px solid rgba(243, 170, 92, 0.24);
  color: var(--accent);
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
}

.resource-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(132, 201, 192, 0.12);
  border: 1px solid rgba(132, 201, 192, 0.24);
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: capitalize;
}

.join-alert-badge {
  background: rgba(243, 170, 92, 0.2);
  border-color: rgba(243, 170, 92, 0.4);
  color: var(--accent);
}

.resource-card-join-highlight {
  border-color: rgba(243, 170, 92, 0.35);
  box-shadow: inset 0 0 0 1px rgba(243, 170, 92, 0.14);
}

.resource-card-focus {
  animation: resourcePulse 1300ms ease;
}

@keyframes resourcePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(243, 170, 92, 0.55);
  }

  100% {
    box-shadow: 0 0 0 12px rgba(243, 170, 92, 0);
  }
}

.resource-head-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.resource-host-link {
  color: rgba(245, 241, 234, 0.86);
  font-weight: 700;
  text-decoration: none;
}

.resource-host-link:hover,
.resource-host-link:focus-visible {
  color: var(--accent);
}

.resource-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 10px;
}

.admin-kpi-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-kpi-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: rgba(245, 241, 234, 0.94);
}

.admin-kpi-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(245, 241, 234, 0.58);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table-shell {
  overflow-x: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(245, 241, 234, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.02);
}

.admin-table td {
  font-size: 0.9rem;
  color: rgba(245, 241, 234, 0.86);
}

.admin-table-compact {
  min-width: 1520px;
}

.admin-table-compact th,
.admin-table-compact td {
  padding: 8px 10px;
  white-space: nowrap;
}

.admin-table-compact th {
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.admin-table-compact td {
  font-size: 0.76rem;
}

.admin-table-compact .admin-table-input {
  min-width: 92px;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 0.72rem;
}

.admin-table-compact .admin-moderation-badge {
  min-height: 22px;
  padding: 0 8px;
  font-size: 0.64rem;
}

.admin-table-compact .field-hint {
  font-size: 0.64rem;
  line-height: 1.3;
}

.admin-table-compact .compact-button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.66rem;
}

.admin-table-users .admin-table-actions {
  min-width: 320px;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table-input {
  width: 100%;
  min-width: 120px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 241, 234, 0.92);
}

.admin-table-input::placeholder {
  color: rgba(245, 241, 234, 0.4);
}

.admin-table-actions {
  white-space: nowrap;
}

.admin-user-moderation {
  display: grid;
  gap: 8px;
}

.admin-moderation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(132, 201, 192, 0.12);
  border: 1px solid rgba(132, 201, 192, 0.24);
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-moderation-badge-suspended {
  background: rgba(243, 170, 92, 0.12);
  border-color: rgba(243, 170, 92, 0.24);
  color: var(--accent);
}

.admin-moderation-badge-banned {
  background: rgba(255, 143, 143, 0.12);
  border-color: rgba(255, 143, 143, 0.24);
  color: #ffd0d0;
}

.admin-report-actions {
  white-space: normal;
}

.admin-report-action-stack {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-report-action-select {
  min-width: 180px;
  border-color: rgba(140, 216, 203, 0.45);
  background: rgba(10, 14, 24, 0.92);
  color: rgba(245, 241, 234, 0.96);
  font-weight: 600;
}

.admin-report-action-select:focus {
  border-color: rgba(140, 216, 203, 0.8);
  box-shadow: 0 0 0 3px rgba(140, 216, 203, 0.2);
  outline: none;
}

.admin-report-action-select option {
  background: #10162a;
  color: #f5f1ea;
}

.admin-table-compact .admin-report-action-select {
  min-width: 140px;
}

.admin-table-actions .compact-button + .compact-button {
  margin-left: 8px;
}

.modal-open {
  overflow: hidden;
}

.admin-evidence-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 10, 17, 0.68);
  backdrop-filter: blur(3px);
}

.admin-evidence-dialog {
  width: min(980px, calc(100vw - 30px));
  max-height: min(86vh, 920px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(14, 21, 35, 0.98), rgba(9, 13, 22, 0.98));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.admin-evidence-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-evidence-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-evidence-body {
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.admin-evidence-entry {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.admin-evidence-entry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(245, 241, 234, 0.7);
}

.admin-evidence-entry-header strong {
  font-size: 0.84rem;
  color: rgba(245, 241, 234, 0.95);
}

.admin-evidence-entry-header time {
  margin-left: auto;
  color: rgba(245, 241, 234, 0.58);
}

.admin-evidence-entry p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
  color: rgba(245, 241, 234, 0.92);
  font-size: 0.9rem;
}

.admin-evidence-marker {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(243, 170, 92, 0.45);
  background: rgba(243, 170, 92, 0.16);
  color: rgba(255, 239, 208, 0.96);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.admin-evidence-marker-active {
  border-color: rgba(255, 226, 168, 0.92);
  background: rgba(255, 196, 93, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 196, 93, 0.24);
}

@media (max-width: 760px) {
  .admin-evidence-modal {
    padding: 12px;
  }

  .admin-evidence-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 24px);
    border-radius: 14px;
    padding: 14px;
  }

  .admin-evidence-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-evidence-actions {
    justify-content: stretch;
  }

  .admin-evidence-entry-header time {
    margin-left: 0;
  }
}

.resource-card details {
  margin-top: 18px;
}

.resource-card summary {
  cursor: pointer;
}

.character-measurements-card {
  margin-top: 4px;
}

.character-detail-card {
  margin-top: 4px;
}

.character-detail-summary {
  min-height: 52px;
  font-size: 1.1rem;
}

.game-rules-card {
  margin-top: 20px;
}

.game-setup-section-card {
  margin-top: 4px;
}

.game-setup-section-summary {
  min-height: 52px;
  font-size: 1.02rem;
}

.room-info-card {
  margin-top: 16px;
}

.room-info-card-compact {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.room-info-summary {
  min-height: 48px;
  font-size: 0.94rem;
}

.room-info-grid {
  gap: 10px;
}

.room-info-grid div {
  padding: 10px 0;
}

.character-measurements-summary {
  min-height: 52px;
  font-size: 1.1rem;
}

.character-measurements-grid {
  margin-top: 2px;
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.room-code-copy {
  margin-top: 14px;
}

.room-code-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(243, 170, 92, 0.12);
  border: 1px solid rgba(243, 170, 92, 0.22);
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.room-management-note {
  margin-bottom: 14px;
}

.room-management-card {
  display: grid;
  gap: 14px;
}

.room-management-actions {
  margin-top: 0;
}

.resource-form {
  margin-top: 16px;
}

.danger-button {
  background: rgba(255, 143, 143, 0.12);
  border: 1px solid rgba(255, 143, 143, 0.24);
  color: #ffd0d0;
}

.meta-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  color: rgba(245, 241, 234, 0.84);
  font-size: 0.94rem;
}

.inline-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.split-actions {
  grid-template-columns: auto;
  margin-top: 0;
}

.collapsible-card {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.collapsible-indicator {
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--accent-2);
  border-bottom: 2px solid var(--accent-2);
  transform: rotate(45deg);
  transition: transform 180ms ease;
  flex: 0 0 auto;
}

.collapsible-card[open] .collapsible-indicator {
  transform: rotate(225deg);
}

.collapsible-content {
  padding: 0 20px 20px;
}

.inline-select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.compact-button {
  min-height: 46px;
  padding: 0 18px;
}

.bullet-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.bullet-stack p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.activity-layout {
  display: grid;
  gap: 18px;
}

.activity-heading {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.activity-item {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.activity-item span {
  color: var(--muted);
  font-size: 0.94rem;
}

.roleplay-room-shell {
  width: min(1180px, 100%);
  padding: 10px;
}

.roleplay-room-minimal-shell {
  width: min(720px, 100%);
}

.roleplay-room-shell .content-stack {
  gap: 10px;
  margin-top: 10px;
}

.roleplay-room-card {
  padding: 24px;
}

.roleplay-room-minimal-card {
  padding: 8px;
  font-size: 0.88rem;
}

.roleplay-room-minimal-card h2 {
  font-size: 1.14rem;
}

.roleplay-room-minimal-card label,
.roleplay-room-minimal-card input,
.roleplay-room-minimal-card select,
.roleplay-room-minimal-card textarea,
.roleplay-room-minimal-card button,
.roleplay-room-minimal-card .form-message {
  font-size: 0.86rem;
}

.roleplay-room-meta-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  align-items: stretch;
}

.roleplay-room-meta-shell {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.roleplay-mobile-disclosure {
  display: grid;
  min-width: 0;
}

.roleplay-mobile-disclosure-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  list-style: none;
  padding: 10px 12px;
  cursor: pointer;
}

.roleplay-mobile-disclosure-toggle::-webkit-details-marker {
  display: none;
}

.roleplay-mobile-disclosure-glyph {
  font-size: 1rem;
  line-height: 1;
  transition: transform 140ms ease;
}

.roleplay-mobile-disclosure[open] .roleplay-mobile-disclosure-glyph {
  transform: rotate(45deg);
}

.roleplay-desktop-section-label {
  display: block;
}

.roleplay-room-meta-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  list-style: none;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-sizing: border-box;
}

.roleplay-room-meta-toggle > .roleplay-request-label {
  flex: 1 1 auto;
  min-width: 0;
}

.roleplay-room-meta-toggle > .roleplay-room-section-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roleplay-room-meta-toggle::-webkit-details-marker {
  display: none;
}

.roleplay-room-meta-toggle-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1rem;
  font-size: 1rem;
  line-height: 1;
  transition: transform 140ms ease;
}

.roleplay-room-meta-shell[open] .roleplay-room-meta-toggle-glyph {
  transform: rotate(45deg);
}

.roleplay-room-meta-shell .roleplay-room-meta-grid {
  margin-bottom: 0;
  padding: 0 12px 12px;
}

.roleplay-meta-card {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px 12px;
  min-height: 172px;
  height: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.roleplay-meta-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.roleplay-meta-title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.roleplay-meta-copy {
  margin: 0;
  color: rgba(245, 241, 234, 0.76);
  font-size: 0.74rem;
  line-height: 1.35;
}

.roleplay-boundary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.roleplay-boundary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(243, 170, 92, 0.18);
  background: rgba(243, 170, 92, 0.08);
  color: rgba(245, 241, 234, 0.84);
  font-size: 0.7rem;
  line-height: 1.2;
}

.roleplay-export-button-row {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.roleplay-story-layout {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.roleplay-presence-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}

.roleplay-presence-slot {
  display: flex;
  min-width: 0;
}

.roleplay-presence-shell {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.roleplay-presence-trigger {
  cursor: pointer;
}

.roleplay-presence-trigger[disabled] {
  cursor: default;
}

.roleplay-presence-slot-left {
  justify-content: flex-start;
}

.roleplay-presence-slot-right {
  justify-content: flex-end;
}

.roleplay-story-layout > * {
  min-width: 0;
  min-height: 0;
}

.roleplay-history-block {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.roleplay-history-head {
  align-items: center;
}

.roleplay-history-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.roleplay-presence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roleplay-presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
}

.roleplay-presence-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 12;
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 19, 30, 0.96);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.32);
}

.roleplay-presence-slot-right .roleplay-presence-menu {
  left: auto;
  right: 0;
}

.roleplay-presence-menu .compact-button,
.roleplay-presence-menu .button-link {
  width: 100%;
}

.roleplay-presence-copy {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.roleplay-presence-name,
.roleplay-presence-state {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roleplay-presence-name {
  flex: 1 1 auto;
}

.roleplay-presence-state {
  flex: 0 1 auto;
  color: rgba(245, 241, 234, 0.62);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.roleplay-presence-separator {
  color: rgba(245, 241, 234, 0.34);
  font-size: 0.52rem;
}

.roleplay-presence-light {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.roleplay-presence-pill-active .roleplay-presence-light {
  background: #67df8c;
  box-shadow: 0 0 0 4px rgba(103, 223, 140, 0.18);
}

.roleplay-presence-pill-inactive .roleplay-presence-light {
  background: #e2a54a;
  box-shadow: 0 0 0 4px rgba(226, 165, 74, 0.18);
}

.roleplay-presence-pill-writing .roleplay-presence-light {
  background: #79caff;
  box-shadow: 0 0 0 4px rgba(121, 202, 255, 0.18);
}

.roleplay-presence-pill-ready_for_next_beat .roleplay-presence-light {
  background: #7fd7b4;
  box-shadow: 0 0 0 4px rgba(127, 215, 180, 0.18);
}

.roleplay-presence-pill-away .roleplay-presence-light,
.roleplay-presence-pill-left_scene .roleplay-presence-light {
  background: #e2a54a;
  box-shadow: 0 0 0 4px rgba(226, 165, 74, 0.18);
}

.report-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.report-dialog::backdrop {
  background: rgba(6, 8, 14, 0.72);
  backdrop-filter: blur(4px);
}

.report-dialog-card {
  width: min(480px, calc(100vw - 32px));
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(28, 33, 49, 0.98), rgba(15, 18, 28, 0.98));
  box-shadow: var(--shadow);
}

.report-dialog-head {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.report-dialog-title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
}

.report-dialog-copy {
  margin: 0;
}

.report-dialog-options {
  display: grid;
  gap: 10px;
}

.report-option-button {
  width: 100%;
  justify-content: flex-start;
  min-height: 50px;
}

.report-dialog-actions {
  margin-top: 18px;
}

.roleplay-story-state-block {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  min-height: 0;
}

.roleplay-trackers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.roleplay-room-section-label {
  font-size: 1rem;
}

.roleplay-mobile-collapsible-summary {
  display: none;
}

.roleplay-mobile-collapsible-glyph {
  font-size: 1rem;
  line-height: 1;
  transition: transform 140ms ease;
}

.roleplay-mobile-collapsible[open] > .roleplay-mobile-collapsible-summary .roleplay-mobile-collapsible-glyph {
  transform: rotate(45deg);
}

.roleplay-tracker-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  margin-top: 10px;
  min-height: 0;
}

.roleplay-trackers-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.roleplay-tracker-approval-actions {
  flex: 0 0 auto;
}

.roleplay-tracker-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roleplay-tracker-dial-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.roleplay-tracker-slider-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 156px;
  padding: 10px 0;
}

.roleplay-tracker-item-label {
  margin: 0;
  color: rgba(245, 241, 234, 0.62);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.roleplay-tracker-slider-rail {
  position: relative;
  width: 6px;
  height: 136px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 10px rgba(64, 140, 255, 0.08);
}

.roleplay-tracker-slider-rail::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 20px;
  height: 3px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  transform: translateX(-50%);
  top: -2px;
}

.roleplay-tracker-slider-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--tracker-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tracker-fill, #3d8bff) 78%, #fff 22%), var(--tracker-fill, #3d8bff));
  box-shadow: 0 0 14px var(--tracker-glow, rgba(61, 139, 255, 0.18));
}

.roleplay-tracker-slider-thumb-visual {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tracker-progress, 0%) - 8px);
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(150, 204, 255, 0.96);
  background: radial-gradient(circle at 35% 35%, #d8efff, #67bbff 48%, #2f82ff);
  box-shadow: 0 0 0 4px rgba(64, 140, 255, 0.14), 0 2px 8px rgba(0, 0, 0, 0.32);
  transform: translateX(-50%);
  pointer-events: none;
}

.roleplay-tracker-slider {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 24px;
  height: 156px;
  writing-mode: vertical-lr;
  direction: rtl;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}

.roleplay-tracker-slider:disabled {
  cursor: default;
  opacity: 0.7;
}

.roleplay-tracker-slider::-webkit-slider-runnable-track {
  width: 6px;
  border-radius: 999px;
  background: transparent;
}

.roleplay-tracker-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.roleplay-tracker-slider::-moz-range-track {
  width: 6px;
  border-radius: 999px;
  background: transparent;
}

.roleplay-tracker-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.roleplay-tracker-item-value {
  margin: 0;
  color: var(--text);
  font-family: 'Fraunces', serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.roleplay-tracker-dial-step {
  color: rgba(245, 241, 234, 0.55);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scene-history-feed {
  display: block;
  max-height: 240px;
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.scene-history-section + .scene-history-section {
  margin-top: 10px;
}

.scene-history-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(243, 170, 92, 0.18);
  border-radius: 14px;
  background: rgba(243, 170, 92, 0.08);
  color: var(--text);
  text-align: left;
}

.scene-history-section-title {
  font-family: 'Fraunces', serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.scene-history-section-chevron {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 700;
}

.scene-history-section-content {
  padding-top: 10px;
}

.scene-history-section-content.is-hidden {
  display: none;
}

.scene-history-section:not(.is-collapsed) .scene-history-section-toggle {
  border-color: rgba(243, 170, 92, 0.28);
  background: rgba(243, 170, 92, 0.1);
}

.scene-history-author {
  margin: 12px 0 6px;
  color: var(--accent-2);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scene-history-author:first-child {
  margin-top: 0;
}

.scene-history-item {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.scene-history-item-left {
  align-items: flex-start;
}

.scene-history-item-right {
  align-items: flex-end;
}

.scene-history-item-center {
  align-items: center;
}

.scene-history-author-left,
.scene-history-author-right,
.scene-history-author-center,
.scene-history-entry-left,
.scene-history-entry-right,
.scene-history-entry-center {
  width: min(100%, 42rem);
}

.scene-history-author-right,
.scene-history-entry-right .scene-history-entry-body,
.scene-history-entry-right .scene-history-entry-edited {
  text-align: right;
}

.scene-history-author-center,
.scene-history-entry-center .scene-history-entry-body,
.scene-history-entry-center .scene-history-entry-edited {
  text-align: center;
}

.scene-history-entry {
  position: relative;
  margin: 0;
  padding: 0;
}

.scene-history-entry + .scene-history-entry {
  margin-top: 5px;
}

.scene-history-entry-body {
  line-height: 1.42;
  color: var(--text);
  word-break: break-word;
}

.scene-history-entry-speech .scene-history-entry-body {
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.46;
  letter-spacing: 0.01em;
}

.scene-history-entry-thought .scene-history-entry-body {
  display: block;
  max-width: calc(100% - 22px);
  margin-left: 18px;
  color: rgba(245, 241, 234, 0.68);
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.3;
}

.scene-history-entry-scene-description .scene-history-entry-body {
  color: #8cc8ff;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.38;
}

.scene-history-entry-action .scene-history-entry-body {
  display: block;
  max-width: calc(100% - 18px);
  margin-left: 14px;
  color: rgba(245, 241, 234, 0.8);
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.3;
}

.scene-history-entry-out_of_scene .scene-history-entry-body {
  display: block;
  max-width: calc(100% - 18px);
  margin-left: 14px;
  color: rgba(198, 192, 180, 0.8);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.24;
  text-decoration: none;
}

.scene-history-entry-chapter {
  background: rgba(243, 170, 92, 0.08);
  border-color: rgba(243, 170, 92, 0.2);
}

.scene-history-entry-chapter .scene-history-entry-body {
  font-family: 'Fraunces', serif;
  font-weight: 700;
}

.scene-history-entry.is-editing {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(140, 200, 255, 0.08);
  border: 1px solid rgba(140, 200, 255, 0.18);
}

.scene-history-entry-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
}

.scene-history-entry-tools {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  flex: 0 0 auto;
  padding-top: 1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.scene-history-edit-button,
.scene-history-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
  cursor: pointer;
}

.scene-history-edit-button svg {
  width: 11px;
  height: 11px;
  display: block;
}

.scene-history-delete-button {
  position: static;
  border: 1px solid rgba(255, 143, 143, 0.24);
  background: rgba(255, 143, 143, 0.12);
  color: #ffd0d0;
}

.scene-history-edit-button {
  border: 1px solid rgba(140, 200, 255, 0.22);
  background: rgba(140, 200, 255, 0.1);
  color: #cfe9ff;
}

.scene-history-entry.is-tools-visible .scene-history-entry-tools,
.scene-history-entry-deletable:focus-within .scene-history-entry-tools {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .scene-history-entry-deletable:hover .scene-history-entry-tools {
    opacity: 1;
    pointer-events: auto;
  }
}

.scene-history-entry-edited {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  color: rgba(245, 241, 234, 0.52);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.roleplay-history-empty {
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.roleplay-top-controls {
  display: grid;
  gap: 12px;
}

.roleplay-composer-layout {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.roleplay-entry-sidecar-shell {
  display: grid;
}

.roleplay-entry-column {
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.roleplay-entry-panel-head {
  display: grid;
  gap: 4px;
}

.roleplay-entry-panel,
.roleplay-entry-sidecar-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
  min-height: 0;
}

.roleplay-entry-panel[hidden],
.roleplay-conflict-chat-panel[hidden],
#conflict-chat-resolution-actions[hidden] {
  display: none !important;
}

.roleplay-entry-sidecar-panel {
  min-height: 220px;
}

.roleplay-conflict-panel {
  display: grid;
  gap: 12px;
}

.roleplay-conflict-current-request,
.roleplay-conflict-request-block {
  display: grid;
  gap: 6px;
}

.roleplay-conflict-request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.roleplay-conflict-request-row-pending {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.roleplay-conflict-state-label {
  margin: 0;
  color: rgba(245, 241, 234, 0.56);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roleplay-conflict-request-title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
}

.roleplay-conflict-state-copy {
  margin: 0;
  color: rgba(245, 241, 234, 0.8);
  font-size: 0.74rem;
  line-height: 1.45;
}

.roleplay-conflict-request-list,
.roleplay-conflict-resolution-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roleplay-conflict-request-separator {
  flex: 0 0 100%;
  height: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2px 0;
}

.roleplay-conflict-inline-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px;
  align-items: center;
  justify-content: end;
  flex: 0 0 auto;
}

.roleplay-conflict-inline-actions-discuss {
  grid-template-columns: auto;
}

.roleplay-conflict-request-button {
  justify-content: flex-start;
  text-align: left;
  min-height: 30px;
  padding: 5px 9px;
  font-size: 0.73rem;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.roleplay-conflict-action-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1;
  justify-content: center;
}

.roleplay-conflict-discuss-button {
  min-width: auto;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.roleplay-conflict-request-sent-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(140, 200, 255, 0.24);
  background: rgba(140, 200, 255, 0.1);
  color: #d7edff;
}

.roleplay-conflict-choice-button {
  min-width: 24px;
  width: 24px;
}

.roleplay-conflict-choice-selected {
  color: rgba(255, 255, 255, 0.96);
}

.secondary-button.roleplay-conflict-choice-accept {
  color: #def6d6;
}

.secondary-button.roleplay-conflict-choice-refuse {
  color: #ffd6d6;
}

.roleplay-conflict-waiting-copy {
  white-space: nowrap;
}

.roleplay-conflict-notice {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  line-height: 1.45;
}

.roleplay-conflict-notice-info {
  border-color: rgba(140, 200, 255, 0.2);
  background: rgba(140, 200, 255, 0.1);
  color: #d7edff;
}

.roleplay-conflict-notice-success {
  border-color: rgba(143, 214, 124, 0.24);
  background: rgba(143, 214, 124, 0.1);
  color: #def6d6;
}

.roleplay-conflict-notice-warning {
  border-color: rgba(255, 170, 116, 0.3);
  background: rgba(255, 170, 116, 0.12);
  color: #ffe0c6;
  box-shadow: 0 0 0 1px rgba(255, 170, 116, 0.1) inset;
}

.roleplay-conflict-chat-panel {
  min-height: 280px;
}

.roleplay-conflict-chat-feed {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.roleplay-conflict-chat-message {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.roleplay-conflict-chat-message.is-own {
  background: rgba(140, 200, 255, 0.08);
  border-color: rgba(140, 200, 255, 0.14);
}

.roleplay-conflict-chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(245, 241, 234, 0.56);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.roleplay-conflict-chat-body {
  color: rgba(245, 241, 234, 0.86);
  font-size: 0.84rem;
  line-height: 1.45;
}

.roleplay-conflict-chat-row {
  gap: 10px;
}

.roleplay-conflict-chat-row input {
  min-height: 42px;
}

.roleplay-conflict-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roleplay-chapter-row,
.roleplay-style-row {
  gap: 10px;
}

.roleplay-style-row > label,
.roleplay-scene-box-row > label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(245, 241, 234, 0.72);
}

.roleplay-request-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.roleplay-chapter-button-wrap {
  display: grid;
  align-items: end;
}

.roleplay-scene-box-row {
  gap: 12px;
}

.roleplay-scene-box-row textarea {
  min-height: 85px;
  resize: vertical;
}

.roleplay-entry-form {
  margin: 0;
}

.roleplay-style-speech {
  font-style: normal;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.roleplay-style-scene-description {
  color: #8cc8ff;
  font-size: 1.08rem;
  font-weight: 800;
  text-decoration: none;
}

.roleplay-style-thought {
  color: rgba(245, 241, 234, 0.68);
  font-size: 0.86rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.roleplay-style-action {
  color: rgba(245, 241, 234, 0.8);
  font-size: 0.87rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.roleplay-style-out-of-scene {
  display: inline-block;
  margin-left: 0.2rem;
  color: rgba(198, 192, 180, 0.8);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.26;
  text-decoration: none;
}

.roleplay-room-button-row {
  display: grid;
  gap: 12px;
}

.roleplay-room-button-row > button {
  min-width: 0;
}

.roleplay-room-button-row-discussion {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .roleplay-mobile-collapsible {
    display: block;
    min-width: 0;
    min-height: 0;
  }

  .roleplay-mobile-story-state-shell,
  .roleplay-mobile-requests-shell,
  .roleplay-entry-form,
  .roleplay-entry-column {
    min-width: 0;
  }

  .roleplay-mobile-collapsible-summary {
    display: none;
  }

  .roleplay-mobile-collapsible-head {
    display: grid;
  }

  .roleplay-mobile-story-state-shell > .roleplay-story-state-block,
  .roleplay-mobile-requests-shell > .roleplay-entry-sidecar-panel {
    min-height: 0;
    height: auto;
  }

  .roleplay-room-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .roleplay-export-button-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .roleplay-export-button-row > button {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.76rem;
  }

  .roleplay-top-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .roleplay-room-button-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .roleplay-room-button-row > button {
    width: 100%;
  }

}

@media (min-width: 960px) {
  .roleplay-presence-layout,
  .roleplay-story-layout,
  .roleplay-composer-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
    align-items: stretch;
  }

  .roleplay-story-layout > .roleplay-history-block,
  .roleplay-story-layout > .roleplay-mobile-story-state-shell,
  .roleplay-composer-layout > .roleplay-entry-column,
  .roleplay-composer-layout > .roleplay-mobile-requests-shell {
    align-self: stretch;
    min-width: 0;
  }

  .roleplay-story-layout > .roleplay-mobile-story-state-shell {
    display: grid;
  }

  .roleplay-story-state-block {
    box-sizing: border-box;
    min-height: 0;
  }

  .roleplay-entry-sidecar-panel {
    box-sizing: border-box;
  }

  .roleplay-mobile-story-state-shell > .roleplay-story-state-block {
    min-height: 0;
  }

  .roleplay-mobile-requests-shell > .roleplay-entry-sidecar-panel {
    height: auto;
  }

  .roleplay-mobile-story-state-shell,
  .roleplay-mobile-requests-shell {
    min-height: 0;
  }

  .scene-history-feed,
  .roleplay-tracker-panel {
    min-height: 0;
  }

  .scene-history-feed {
    overflow: auto;
  }

  .scene-history-feed {
    max-height: none;
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .roleplay-conflict-request-row {
    gap: 6px;
  }

  .roleplay-conflict-inline-actions,
  .roleplay-conflict-resolution-actions {
    gap: 6px;
  }

  .roleplay-conflict-request-button,
  .roleplay-conflict-action-button {
    min-height: 28px;
  }

  .roleplay-conflict-request-button {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .roleplay-conflict-action-button {
    min-width: 28px;
    font-size: 0.88rem;
  }


  .roleplay-conflict-choice-button {
    min-width: 24px;
    width: 24px;
  }

  .roleplay-conflict-choice-selected {
    color: rgba(255, 255, 255, 0.96);
  }

  .roleplay-conflict-choice-accept {
    color: #def6d6;
  }

  .roleplay-conflict-choice-refuse {
    color: #ffd6d6;
  }

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

  .roleplay-tracker-slider-shell {
    height: 144px;
  }

  .roleplay-tracker-slider,
  .roleplay-tracker-slider-rail {
    height: 122px;
  }
}

@media (min-width: 1100px) {
  .roleplay-room-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .roleplay-room-minimal-card {
    padding: 12px;
  }

  .scene-history-section-toggle {
    min-height: 52px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

.mobile-note {
  color: var(--muted);
}

[data-state='error'] {
  color: var(--danger);
}

[data-state='success'] {
  color: var(--success);
}

@media (min-width: 900px) {
  .page-shell {
    padding-top: 34px;
    padding-bottom: 52px;
  }

  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .auth-shell > .hero-panel {
    max-width: 760px;
  }

  .auth-shell > .auth-panel {
    width: min(100%, 520px);
  }

  .benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .dashboard-card-link:last-child {
    grid-column: 1 / -1;
  }

  .app-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  }

  .profile-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }

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

  .inline-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

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

  .public-search-row {
    align-items: stretch;
  }
}

@media (max-width: 899px) {
  h1 {
    max-width: 11ch;
  }
}

@media (max-width: 640px) {
  .roleplay-room-card {
    display: grid;
    gap: 12px;
  }

  .roleplay-room-meta-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .roleplay-meta-card {
    min-height: 0;
    height: auto;
  }

  .roleplay-presence-layout {
    gap: 8px;
  }

  .roleplay-presence-slot,
  .roleplay-presence-slot-left,
  .roleplay-presence-slot-right {
    justify-content: stretch;
  }

  .roleplay-presence-pill {
    width: 100%;
    min-width: 0;
    gap: 6px;
    padding: 5px 8px;
    font-size: 0.58rem;
  }

  .roleplay-presence-menu {
    min-width: min(220px, calc(100vw - 56px));
  }

  .roleplay-presence-copy {
    gap: 4px;
  }

  .roleplay-presence-name {
    font-size: 0.56rem;
  }

  .roleplay-presence-state {
    font-size: 0.5rem;
    letter-spacing: 0.03em;
  }

  .roleplay-presence-separator {
    font-size: 0.46rem;
  }

  .roleplay-story-layout,
  .roleplay-entry-form,
  .roleplay-composer-layout {
    display: contents;
  }

  .roleplay-history-block {
    order: 1;
    min-height: min(36dvh, 300px);
    max-height: min(36dvh, 300px);
    margin-bottom: 0;
  }

  .roleplay-entry-column {
    order: 2;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    min-height: 0;
    max-height: none;
  }

  .roleplay-mobile-story-state-shell {
    order: 3;
  }

  .roleplay-mobile-requests-shell {
    order: 4;
  }

  .roleplay-mobile-collapsible {
    display: grid;
    gap: 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .roleplay-mobile-collapsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    list-style: none;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
  }

  .roleplay-mobile-collapsible-summary > .roleplay-request-label {
    flex: 1 1 auto;
    min-width: 0;
  }

  .roleplay-mobile-collapsible-glyph {
    flex: 0 0 auto;
  }

  .roleplay-mobile-collapsible-summary::-webkit-details-marker {
    display: none;
  }

  .roleplay-mobile-collapsible-head {
    display: none;
  }

  .roleplay-mobile-story-state-shell .roleplay-trackers-head > .roleplay-request-label {
    display: none;
  }

  .roleplay-story-state-block,
  .roleplay-entry-sidecar-panel {
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
  }

  .scene-history-feed,
  .roleplay-entry-panel,
  .roleplay-conflict-chat-panel {
    min-height: 0;
    overflow: auto;
  }

  .scene-history-feed {
    max-height: calc(min(36dvh, 300px) - 42px);
  }

  .roleplay-entry-panel,
  .roleplay-conflict-chat-panel {
    min-height: 0;
    max-height: min(38dvh, 320px);
    align-content: stretch;
  }

  .roleplay-entry-panel {
    gap: 10px;
  }

  .roleplay-entry-sidecar-panel {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .roleplay-mobile-story-state-shell > .roleplay-story-state-block,
  .roleplay-mobile-requests-shell > .roleplay-entry-sidecar-panel {
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
  }

  .roleplay-scene-box-row textarea {
    min-height: 42px;
    height: 42px;
    max-height: 42px;
    resize: none;
  }

  #conflict-chat-input {
    min-height: 42px;
  }

  .roleplay-room-button-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
  }

  .roleplay-room-button-row > button {
    width: 100%;
  }

  .page-shell {
    width: min(100%, calc(100% - 14px));
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }

  .hero-panel,
  .auth-panel,
  .lounge-panel,
  .private-panel {
    border-radius: 24px;
    padding: 22px;
  }

  .roleplay-room-shell {
    padding: 8px;
  }

  .benefit-card {
    padding: 16px;
  }

  .auth-toggle {
    gap: 6px;
    padding: 6px;
  }

  .auth-tab,
  .primary-button,
  .secondary-button,
  .field-row input,
  .inline-select {
    min-height: 52px;
  }

  .field-row textarea,
  .field-row select,
  .field-row input {
    font-size: 16px;
  }

  .utility-bar {
    flex-direction: column;
    position: relative;
    top: auto;
    padding: 0;
    margin: 0 0 20px;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
  }

  .notification-hub {
    width: 100%;
  }

  .notification-panel {
    right: 0;
    left: 0;
    width: auto;
  }

  .notification-toast-region {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .button-link,
  .secondary-button,
  .primary-button,
  .compact-button {
    width: 100%;
  }

  .dashboard-card-item {
    padding: 18px;
  }

  .collapsible-summary {
    min-height: 56px;
    padding: 16px;
    font-size: 1.15rem;
  }

  .collapsible-content {
    padding: 0 16px 16px;
  }

  .avatar-preview,
  .avatar-fallback {
    width: 96px;
    height: 96px;
    border-radius: 24px;
  }

  .section-header,
  .resource-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-summary {
    justify-items: flex-start;
  }

  .info-card,
  .resource-card,
  .empty-card {
    padding: 18px;
  }
}
