:root {
  --ink: #163f49;
  --ink-soft: #52717a;
  --blue: #397cca;
  --blue-strong: #245fa8;
  --teal: #08a39b;
  --teal-strong: #087b7a;
  --mint: #84d8c2;
  --mint-pale: #e5f8f3;
  --sky-pale: #e9f4ff;
  --white: #ffffff;
  --danger: #d45f68;
  --warning: #c47a2b;
  --line: rgba(72, 151, 161, 0.19);
  --glass: rgba(255, 255, 255, 0.69);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --shadow: 0 20px 60px rgba(33, 104, 119, 0.12);
  --shadow-soft: 0 10px 30px rgba(33, 104, 119, 0.09);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color-scheme: light;
  font-family: var(--font);
  background: #f7fcfd;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 8%, rgba(112, 195, 238, 0.22), transparent 26rem),
    radial-gradient(circle at 91% 15%, rgba(104, 220, 184, 0.22), transparent 25rem),
    radial-gradient(circle at 63% 96%, rgba(142, 208, 244, 0.18), transparent 28rem),
    linear-gradient(145deg, #fbfeff 0%, #f4fbfc 50%, #fbfefe 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(91, 181, 189, 0.16);
  border-radius: 45% 55% 60% 40%;
  content: "";
  filter: blur(0.2px);
  pointer-events: none;
}

body::before {
  top: -7rem;
  right: 12%;
  transform: rotate(20deg);
}

body::after {
  bottom: -8rem;
  left: 4%;
  transform: rotate(-16deg);
}

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

button {
  cursor: pointer;
}

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

a {
  color: var(--blue-strong);
}

.hidden {
  display: none !important;
}

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

.glass {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}

.glass-subtle {
  border: 1px solid rgba(72, 151, 161, 0.14);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--teal-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.82rem;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--blue), #448fd4);
  box-shadow: 0 9px 22px rgba(57, 124, 202, 0.2);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 27px rgba(57, 124, 202, 0.26);
  filter: saturate(1.05);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button--teal {
  background: linear-gradient(135deg, var(--teal-strong), var(--teal));
  box-shadow: 0 9px 22px rgba(8, 163, 155, 0.2);
}

.button--quiet {
  border-color: rgba(57, 124, 202, 0.15);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  color: var(--ink);
}

.button--ghost {
  min-height: 36px;
  padding: 0.5rem 0.7rem;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--ink-soft);
}

.button--danger {
  border-color: rgba(212, 95, 104, 0.2);
  background: rgba(255, 245, 246, 0.9);
  box-shadow: none;
  color: #a9414b;
}

.button--small {
  min-height: 34px;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  font-size: 0.78rem;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(57, 124, 202, 0.15);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink-soft);
  transition: 150ms ease;
}

.icon-button:hover {
  border-color: rgba(57, 124, 202, 0.3);
  color: var(--blue-strong);
  transform: translateY(-1px);
}

.field {
  display: grid;
  gap: 0.48rem;
}

.field > span,
.field-label {
  color: var(--ink-soft);
  font-size: 0.77rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid rgba(62, 133, 150, 0.2);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 2px rgba(19, 69, 82, 0.03);
  transition: border 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.input,
.select {
  height: 44px;
  padding: 0 0.85rem;
}

.textarea {
  min-height: 96px;
  padding: 0.78rem 0.85rem;
  line-height: 1.45;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(57, 124, 202, 0.55);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(57, 124, 202, 0.09);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  width: fit-content;
  min-height: 30px;
  padding: 0.4rem 0.67rem;
  border: 1px solid rgba(8, 163, 155, 0.17);
  border-radius: 999px;
  background: rgba(229, 248, 243, 0.76);
  color: var(--teal-strong);
  font-size: 0.74rem;
  font-weight: 780;
}

.status-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill--blue {
  border-color: rgba(57, 124, 202, 0.18);
  background: rgba(233, 244, 255, 0.82);
  color: var(--blue-strong);
}

.status-pill--gray {
  border-color: rgba(82, 113, 122, 0.14);
  background: rgba(240, 245, 246, 0.82);
  color: var(--ink-soft);
}

.status-pill--warning {
  border-color: rgba(196, 122, 43, 0.18);
  background: rgba(255, 248, 232, 0.87);
  color: #9a6428;
}

.toast-stack {
  position: fixed;
  z-index: 200;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  width: min(92vw, 360px);
  gap: 0.6rem;
}

.toast {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(72, 151, 161, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.86rem;
  animation: toast-in 180ms ease-out;
}

.toast--error {
  border-color: rgba(212, 95, 104, 0.25);
  background: rgba(255, 248, 248, 0.97);
  color: #953b45;
}

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

dialog {
  width: min(92vw, 620px);
  max-height: 88vh;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(72, 151, 161, 0.22);
  border-radius: 24px;
  background: rgba(250, 254, 255, 0.96);
  box-shadow: 0 30px 90px rgba(19, 83, 98, 0.24);
  color: var(--ink);
  backdrop-filter: blur(24px);
}

dialog::backdrop {
  background: rgba(17, 55, 64, 0.28);
  backdrop-filter: blur(5px);
}

.dialog-body {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.dialog-actions--start {
  margin-top: 0.8rem;
  justify-content: flex-start;
}

.room-code-input {
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-shell,
.join-shell {
  display: grid;
  min-height: 100vh;
  padding: 1.2rem;
  place-items: center;
}

.login-card,
.join-card {
  width: min(100%, 460px);
  padding: clamp(1.4rem, 5vw, 2.4rem);
  border-radius: var(--radius-xl);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(57, 124, 202, 0.95), rgba(8, 163, 155, 0.88));
  box-shadow: 0 8px 22px rgba(32, 125, 150, 0.22);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  content: "";
}

.brand-mark::before {
  width: 19px;
  height: 19px;
  transform: translate(-5px, -2px);
}

.brand-mark::after {
  width: 9px;
  height: 9px;
  transform: translate(8px, 7px);
}

.brand-title {
  display: block;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  display: block;
  margin-top: 0.12rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 650;
}

.login-card h1,
.join-card h1 {
  margin: 2rem 0 0.55rem;
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  letter-spacing: -0.04em;
}

.form-stack {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.form-error {
  min-height: 1.2rem;
  margin: 0;
  color: #a9414b;
  font-size: 0.82rem;
}

/* Organizer */

.host-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr;
}

.host-topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid rgba(72, 151, 161, 0.14);
  background: rgba(249, 254, 255, 0.76);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.host-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: 270px minmax(0, 1fr);
}

.meetings-sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  padding: 1rem;
  overflow: auto;
  border-right: 1px solid rgba(72, 151, 161, 0.14);
  background: rgba(248, 253, 254, 0.56);
  backdrop-filter: blur(16px);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.sidebar-head h2 {
  margin: 0;
  font-size: 0.87rem;
}

.meeting-list {
  display: grid;
  gap: 0.45rem;
}

.meeting-list-item {
  display: grid;
  width: 100%;
  gap: 0.35rem;
  padding: 0.82rem;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: 150ms ease;
}

.meeting-list-item:hover {
  background: rgba(255, 255, 255, 0.62);
}

.meeting-list-item.active {
  border-color: rgba(57, 124, 202, 0.17);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.meeting-list-title {
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-list-meta {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.host-main {
  min-width: 0;
  padding: 1rem;
}

.empty-workspace {
  display: grid;
  min-height: calc(100vh - 104px);
  padding: 2rem;
  place-items: center;
  text-align: center;
}

.empty-orbit {
  display: grid;
  width: 130px;
  height: 130px;
  margin: 0 auto 1.2rem;
  place-items: center;
  border: 1px solid rgba(57, 124, 202, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 28%, transparent 29%),
    conic-gradient(from 30deg, rgba(57, 124, 202, 0.18), rgba(8, 163, 155, 0.18), rgba(57, 124, 202, 0.18));
  box-shadow: var(--shadow);
}

.workspace {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.meeting-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-lg);
}

.meeting-title-wrap h1 {
  margin: 0.22rem 0 0.35rem;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -0.035em;
}

.meeting-title-wrap p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.meeting-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.meeting-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(220px, 0.78fr) minmax(420px, 2fr) minmax(240px, 0.88fr);
  gap: 1rem;
  align-items: start;
}

.panel {
  min-width: 0;
  padding: 1rem;
  border-radius: var(--radius-lg);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 0.93rem;
}

.agenda-list {
  display: grid;
  gap: 0.55rem;
}

.agenda-item {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 0.48rem;
  padding: 0.82rem;
  overflow: hidden;
  border: 1px solid rgba(72, 151, 161, 0.13);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.54);
  transition: 150ms ease;
}

.agenda-item.active {
  border-color: rgba(57, 124, 202, 0.36);
  background: rgba(240, 248, 255, 0.9);
  box-shadow: 0 10px 26px rgba(57, 124, 202, 0.1);
}

.agenda-main {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.agenda-number {
  color: var(--teal-strong);
  font-size: 0.7rem;
  font-weight: 850;
}

.agenda-title {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.agenda-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.67rem;
}

.agenda-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem;
}

.stage-panel {
  min-height: 560px;
  padding: clamp(1rem, 2vw, 1.4rem);
}

.stage-panel > .empty-workspace {
  min-height: 500px;
  padding: 1rem;
}

.question-stage {
  display: grid;
  gap: 1rem;
}

.question-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.question-copy h2 {
  max-width: 900px;
  margin: 0.25rem 0 0.65rem;
  font-size: clamp(1.28rem, 2.2vw, 1.85rem);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.question-copy p {
  max-width: 820px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.timer {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(57, 124, 202, 0.18);
  border-radius: 17px;
  background: rgba(240, 248, 255, 0.84);
  color: var(--blue-strong);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.timer-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.timer-label {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 720;
}

.timer.expired {
  border-color: rgba(196, 122, 43, 0.24);
  background: rgba(255, 248, 232, 0.9);
  color: #9a6428;
}

.decision-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(8, 163, 155, 0.14);
  border-radius: 15px;
  background: rgba(229, 248, 243, 0.57);
}

.decision-target strong {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.76rem;
  color: var(--teal-strong);
}

.decision-target span {
  display: block;
  font-size: 0.85rem;
  line-height: 1.4;
}

.question-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.character-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.character-panel {
  position: relative;
  min-height: 235px;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid rgba(72, 151, 161, 0.15);
  border-radius: 20px;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.85), transparent 9rem),
    rgba(255, 255, 255, 0.56);
}

.character-panel--proposal {
  background:
    radial-gradient(circle at 84% 18%, rgba(132, 216, 194, 0.28), transparent 9rem),
    rgba(250, 255, 253, 0.72);
}

.character-panel--critic {
  background:
    radial-gradient(circle at 84% 18%, rgba(106, 172, 229, 0.25), transparent 9rem),
    rgba(249, 252, 255, 0.73);
}

.character-copy {
  position: relative;
  z-index: 2;
  max-width: 62%;
}

.character-copy h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.character-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.45;
}

.character-count {
  display: inline-flex;
  margin-top: 0.8rem;
  padding: 0.42rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
}

.character-sprite {
  position: absolute;
  right: -1.2rem;
  bottom: -0.7rem;
  width: min(48%, 190px);
  aspect-ratio: 1 / 1;
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 200% 100%;
  filter: drop-shadow(0 12px 16px rgba(32, 93, 104, 0.14));
  transform-origin: 58% 82%;
  transition: transform 180ms ease, background-position 80ms step-end;
}

.character-sprite--proposal {
  background-image: url("/assets/predlozhuk-sprite.png");
}

.character-sprite--critic {
  background-image: url("/assets/kritikot-sprite.png");
}

.character-panel:hover .character-sprite,
.character-panel:focus-within .character-sprite,
.character-card:hover .character-sprite,
.character-card:focus-within .character-sprite {
  background-position: right center;
}

.character-panel:hover .character-sprite--proposal,
.character-panel:focus-within .character-sprite--proposal,
.character-card:hover .character-sprite--proposal,
.character-card:focus-within .character-sprite--proposal {
  animation: beetle-idea 760ms ease-in-out both;
}

.character-panel:hover .character-sprite--critic,
.character-panel:focus-within .character-sprite--critic,
.character-card:hover .character-sprite--critic,
.character-card:focus-within .character-sprite--critic {
  animation: cat-inspect 850ms ease-in-out both;
}

@keyframes beetle-idea {
  0% { transform: translateY(0) rotate(0deg); }
  32% { transform: translateY(-8px) rotate(-2deg); }
  58% { transform: translateY(-3px) rotate(2deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes cat-inspect {
  0% { transform: translateX(0) rotate(0deg); }
  35% { transform: translateX(-7px) rotate(-1deg); }
  66% { transform: translateX(-3px) rotate(1deg); }
  100% { transform: translateX(0) rotate(0deg); }
}

.synthesis-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.synthesis-column {
  min-width: 0;
}

.synthesis-column-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.synthesis-column-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.mini-avatar {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  background-color: rgba(255, 255, 255, 0.75);
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 200% 100%;
}

.mini-avatar--proposal {
  background-image: url("/assets/predlozhuk-sprite.png");
}

.mini-avatar--critic {
  background-image: url("/assets/kritikot-sprite.png");
}

.cluster-list {
  display: grid;
  gap: 0.65rem;
}

.cluster-card {
  padding: 0.85rem;
  border: 1px solid rgba(72, 151, 161, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
}

.cluster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.cluster-card h4 {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.cluster-card > p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.star-button.active {
  border-color: rgba(8, 163, 155, 0.24);
  background: rgba(229, 248, 243, 0.85);
  color: var(--teal-strong);
}

.originals {
  margin-top: 0.6rem;
  border-top: 1px solid rgba(72, 151, 161, 0.12);
}

.originals summary {
  padding-top: 0.62rem;
  color: var(--blue-strong);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 750;
}

.original-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.original-list li {
  padding: 0.58rem;
  border-radius: 10px;
  background: rgba(242, 248, 249, 0.82);
  font-size: 0.72rem;
  line-height: 1.4;
}

.original-list strong {
  color: var(--teal-strong);
}

.decision-form {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  border: 1px solid rgba(8, 163, 155, 0.16);
  border-radius: 16px;
  background: rgba(229, 248, 243, 0.48);
}

.decision-form h3 {
  margin: 0;
  font-size: 0.92rem;
}

.participant-list,
.neutral-list {
  display: grid;
  gap: 0.5rem;
}

.participant-row,
.neutral-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
  border: 1px solid rgba(72, 151, 161, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.54);
}

.participant-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.participant-name {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-progress {
  display: flex;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.66rem;
}

.approval-actions {
  display: flex;
  gap: 0.35rem;
}

.neutral-row p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.42;
}

.neutral-author {
  color: var(--teal-strong);
  font-size: 0.67rem;
  font-weight: 780;
}

.side-stack {
  display: grid;
  gap: 1rem;
}

.processing {
  display: grid;
  min-height: 260px;
  place-items: center;
  text-align: center;
}

.spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 0.8rem;
  border: 3px solid rgba(57, 124, 202, 0.14);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

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

.invite-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(220px, 1.25fr);
  gap: 1rem;
  align-items: center;
}

.qr-frame {
  display: grid;
  aspect-ratio: 1;
  padding: 0.8rem;
  place-items: center;
  border: 1px solid rgba(72, 151, 161, 0.16);
  border-radius: 20px;
  background: #fff;
}

.qr-frame img {
  width: 100%;
  height: 100%;
}

.room-code {
  margin: 0.25rem 0 1rem;
  color: var(--blue-strong);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

/* Participant */

.room-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0.8rem;
}

.room-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0.2rem 1rem;
}

.room-card {
  padding: clamp(1rem, 4vw, 1.5rem);
  border-radius: 24px;
}

.waiting-view {
  display: grid;
  min-height: 62vh;
  place-items: center;
  text-align: center;
}

.waiting-pulse {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(57, 124, 202, 0.9), rgba(8, 163, 155, 0.85));
  box-shadow: var(--shadow);
}

.waiting-pulse::before,
.waiting-pulse::after {
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(57, 124, 202, 0.28);
  border-radius: inherit;
  content: "";
  animation: pulse 2.2s ease-out infinite;
}

.waiting-pulse::after {
  animation-delay: 1.1s;
}

@keyframes pulse {
  from { opacity: 0.8; transform: scale(0.78); }
  to { opacity: 0; transform: scale(1.5); }
}

.mobile-question {
  display: grid;
  gap: 0.9rem;
}

.mobile-question h1 {
  margin: 0;
  font-size: clamp(1.35rem, 6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.mobile-question p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.48;
}

.mobile-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(57, 124, 202, 0.16);
  border-radius: 15px;
  background: rgba(233, 244, 255, 0.68);
}

.mobile-timer strong {
  color: var(--blue-strong);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.mobile-character-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.character-card {
  position: relative;
  min-height: 200px;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid rgba(72, 151, 161, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
}

.character-card .character-sprite {
  right: -0.8rem;
  top: -0.15rem;
  bottom: auto;
  width: min(46%, 165px);
  z-index: 2;
}

.character-card-head {
  position: relative;
  z-index: 2;
  width: 56%;
  min-height: 126px;
}

.character-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.character-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.card-slots {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.card-slot {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid rgba(72, 151, 161, 0.13);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
}

.card-slot .textarea {
  min-height: 76px;
  background: rgba(250, 254, 255, 0.95);
}

.card-slot-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.slot-counter {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.room-footer-actions {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.closed-message {
  display: grid;
  min-height: 42vh;
  padding: 2rem 1rem;
  place-items: center;
  text-align: center;
}

.closed-message h2 {
  margin: 0 0 0.5rem;
}

.closed-message p {
  max-width: 440px;
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 1180px) {
  .meeting-grid {
    grid-template-columns: minmax(220px, 0.8fr) minmax(440px, 2fr);
  }

  .side-stack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .host-layout {
    grid-template-columns: 1fr;
  }

  .meetings-sidebar {
    position: static;
    height: auto;
    padding-bottom: 0;
    border-right: 0;
    background: transparent;
  }

  .meeting-list {
    display: flex;
    padding-bottom: 0.3rem;
    overflow: auto;
  }

  .meeting-list-item {
    min-width: 210px;
    background: rgba(255, 255, 255, 0.5);
  }

  .meeting-grid {
    grid-template-columns: 1fr;
  }

  .stage-panel {
    min-height: auto;
  }

  .agenda-panel {
    order: 2;
  }

  .stage-panel {
    order: 1;
  }

  .side-stack {
    order: 3;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .host-topbar {
    align-items: flex-start;
  }

  .brand-subtitle,
  .topbar-user-label {
    display: none;
  }

  .host-main {
    padding: 0.7rem;
  }

  .meeting-header,
  .question-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .meeting-actions {
    justify-content: flex-start;
  }

  .timer {
    width: 100%;
  }

  .character-board,
  .synthesis-columns,
  .field-row,
  .invite-layout,
  .decision-target {
    grid-template-columns: 1fr;
  }

  .character-panel {
    min-height: 215px;
  }

  .character-copy {
    max-width: 65%;
  }

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

  .dialog-actions .button {
    width: 100%;
  }
}

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