:root {
  color-scheme: dark;
  font-family: Poppins, "Poppins Fallback", Helvetica, Arial, sans-serif;
  background: #0d0d0f;
  color: #f7f4ff;
  --bg: #0d0d0f;
  --panel: #202024;
  --panel-2: #28242f;
  --line: #4d3a76;
  --muted: #aaa4b8;
  --accent: #8b55e6;
  --accent-2: #c990ff;
  --good: #42d392;
  --motion-fast: 150ms ease;
  --motion: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion-spring: 360ms cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

* {
  box-sizing: border-box;
}

[ng-cloak] {
  display: none !important;
}

html,
body,
#planning-poker-root {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  overflow-x: hidden;
}

body.light-mode {
  color-scheme: light;
  color: #121218;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-2: #eef1f5;
  --line: #c8b9e8;
  --muted: #666c77;
  --accent: #7b4dd2;
  --accent-2: #6838c0;
  --good: #178052;
}

@keyframes surface-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-pop {
  0% {
    transform: translateY(0) scale(0.92);
  }
  62% {
    transform: translateY(-7px) scale(1.05);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes reveal-card {
  0% {
    transform: rotateY(-72deg) scale(0.96);
  }
  100% {
    transform: rotateY(0deg) scale(1);
  }
}

@keyframes pulse-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(139, 85, 230, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(139, 85, 230, 0.18);
  }
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  transition: border-color var(--motion-fast), background var(--motion-fast), color var(--motion-fast), opacity var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

button:hover,
input:focus,
select:focus {
  border-color: var(--accent-2);
  outline: none;
}

button:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(140deg, #2545c8, #933eff);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(360px, 1fr) minmax(310px, 460px);
  grid-template-rows: 70px minmax(450px, 1fr) 210px;
  grid-template-areas:
    "topbar topbar topbar"
    "roster table tickets"
    "roster bottom tickets";
  gap: 14px;
  padding: 16px;
}

.app-shell.items-hidden {
  grid-template-columns: minmax(250px, 320px) minmax(360px, 1fr);
  grid-template-areas:
    "topbar topbar"
    "roster table"
    "roster bottom";
}

.topbar {
  grid-area: topbar;
  position: relative;
  z-index: 25;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  animation: surface-in var(--motion) both;
}

.room-title,
.toolbar,
.ticket-search,
.result-actions,
.ticket-meta,
.ticket-actions,
.profile-dock {
  display: flex;
  align-items: center;
}

.room-title {
  gap: 10px;
  min-width: 240px;
}

.room-title h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.room-title p {
  margin: 3px 0 0;
  color: var(--muted);
}

.status-dot {
  margin-left: 8px;
  padding: 3px 8px;
  border: 1px solid #514764;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot.live {
  color: var(--good);
}

.toolbar {
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.toolbar-menu-wrap {
  position: relative;
  display: inline-grid;
}

.icon-button,
.avatar-button,
.invite-button {
  min-width: 54px;
  height: 46px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  position: relative;
}

.avatar-button span {
  font-size: 28px;
}

.avatar-button:hover span,
.avatar-preview-button:hover span {
  transform: scale(1.08);
}

.invite-button {
  min-width: 170px;
  grid-auto-flow: column;
  gap: 8px;
  color: var(--accent-2);
  font-weight: 700;
}

.icon-button small {
  position: absolute;
  right: 8px;
  top: 5px;
  color: var(--accent-2);
  font-size: 11px;
}

.icon-button.grouped {
  border-radius: 0;
  margin-left: -9px;
}

.icon-button.grouped.group-start {
  margin-left: 0;
  border-radius: 8px 0 0 8px;
}

.icon-button.grouped.group-end {
  border-radius: 0 8px 8px 0;
}

.icon-button[aria-pressed="true"] {
  background: #2b2238;
  color: var(--accent-2);
}

.settings-menu,
.panel-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 240px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #55466f;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
  animation: surface-in var(--motion) both;
}

.settings-menu label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.settings-menu input {
  height: 38px;
  min-width: 0;
  border: 1px solid #54505e;
  border-radius: 8px;
  background: var(--panel-2);
  color: inherit;
  padding: 0 10px;
}

.settings-menu button,
.panel-menu button {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  padding: 0 10px;
}

.settings-menu button:hover,
.panel-menu button:hover {
  transform: none;
  background: rgba(139, 85, 230, 0.16);
  color: var(--accent-2);
}

.settings-menu strong {
  color: var(--accent-2);
  font-size: 12px;
}

.roster {
  grid-area: roster;
  overflow: auto;
  padding-right: 4px;
}

.roster-group + .roster-group {
  margin-top: 20px;
}

.roster-group h2 {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 20px;
}

.roster-list {
  display: grid;
  gap: 7px;
}

.roster-row {
  min-height: 50px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(90deg, #814fd4, #c28af4);
  color: white;
  font-size: 16px;
  font-weight: 700;
  animation: surface-in var(--motion) both;
  transition: opacity var(--motion), transform var(--motion), border-color var(--motion-fast), background var(--motion-fast);
}

.roster-row:hover {
  transform: translateX(3px);
}

.roster-row.offline {
  opacity: 0.55;
}

.person-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #343139;
  font-size: 25px;
}

.roster-row b {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: #1e1e22;
}

.host-badge,
.role-chip {
  justify-self: end;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.table-zone {
  grid-area: table;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 24px;
}

.ticket-pill {
  width: min(100%, 900px);
  min-height: 54px;
  border-radius: 9px;
  text-align: left;
  padding: 0 18px;
  background: #232326;
  animation: surface-in var(--motion) both;
  transition: border-color var(--motion-fast), transform var(--motion-fast), background var(--motion-fast);
}

.ticket-pill:hover {
  transform: translateY(-1px);
}

.ticket-pill.empty-ticket {
  border-style: dashed;
  color: var(--muted);
}

.ticket-pill span {
  color: var(--accent-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  margin-right: 10px;
}

.poker-table {
  min-height: 450px;
  display: grid;
  grid-template-rows: minmax(190px, auto) 100px;
  justify-items: center;
  align-content: center;
  gap: 12px;
}

.seat-ring {
  display: flex;
  justify-content: center;
  gap: 20px;
  min-height: 190px;
  max-width: 520px;
  flex-wrap: wrap;
  align-content: center;
}

.seat {
  width: 54px;
  display: grid;
  justify-items: center;
  gap: 6px;
  animation: surface-in var(--motion-spring) both;
}

.seat:nth-child(2) {
  animation-delay: 35ms;
}

.seat:nth-child(3) {
  animation-delay: 70ms;
}

.seat:nth-child(4) {
  animation-delay: 105ms;
}

.seat:nth-child(5) {
  animation-delay: 140ms;
}

.seat:nth-child(6) {
  animation-delay: 175ms;
}

.seat-person {
  display: grid;
  justify-items: center;
}

.seat-person span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2c2c31;
  border: 2px solid #454049;
  font-size: 38px;
  transition: border-color var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

.seat:hover .seat-person span {
  transform: translateY(-2px);
  border-color: var(--accent-2);
}

.seat-person small {
  max-width: 70px;
  margin-top: -6px;
  padding: 2px 5px;
  border-radius: 6px;
  background: #303034;
  color: white;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-card {
  width: 48px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 11px;
  background: #232326;
  color: var(--accent-2);
  font-weight: 900;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: background var(--motion), border-color var(--motion), color var(--motion), transform var(--motion), box-shadow var(--motion-fast);
}

.observer-card {
  opacity: 0.42;
  border-style: dashed;
}

.voted-card {
  border-color: var(--accent);
  background: #7d4ed0;
  animation: card-pop var(--motion-spring);
  color: white;
}

.revealed-card {
  animation: reveal-card 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.18);
}

.table-action {
  width: min(360px, 70vw);
  height: 100px;
  border-radius: 14px;
  color: var(--accent-2);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  animation: surface-in var(--motion) 90ms both;
}

.table-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(201, 144, 255, 0.22);
}

.table-action:disabled,
.deck-cards button:disabled,
.result-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.waiting-action {
  color: var(--muted);
  background: var(--panel);
  border-color: #5f5969;
  opacity: 1 !important;
}

.current-seat {
  transform: translateY(-6px);
}

.current-seat .seat-person span {
  animation: pulse-ring 1800ms ease-in-out infinite;
  border-color: var(--accent-2);
}

.bottom-panel {
  grid-area: bottom;
  display: grid;
  place-items: center;
}

.voting-deck {
  width: min(760px, 100%);
  text-align: center;
}

.voting-deck h2 {
  margin: 0 0 18px;
  font-size: 18px;
  animation: surface-in var(--motion) both;
}

.deck-cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(42px, 1fr));
  gap: 10px;
}

.deck-cards button {
  height: 90px;
  border: 0;
  border-radius: 9px;
  background: #242426;
  color: var(--accent-2);
  font-size: 17px;
  font-weight: 900;
  animation: surface-in var(--motion) both;
  transition: background var(--motion), color var(--motion), transform var(--motion-spring), box-shadow var(--motion-fast), opacity var(--motion-fast);
}

.deck-cards button:nth-child(2) {
  animation-delay: 20ms;
}

.deck-cards button:nth-child(3) {
  animation-delay: 40ms;
}

.deck-cards button:nth-child(4) {
  animation-delay: 60ms;
}

.deck-cards button:nth-child(5) {
  animation-delay: 80ms;
}

.deck-cards button:nth-child(6) {
  animation-delay: 100ms;
}

.deck-cards button:nth-child(7) {
  animation-delay: 120ms;
}

.deck-cards button:nth-child(8) {
  animation-delay: 140ms;
}

.deck-cards button:nth-child(9) {
  animation-delay: 160ms;
}

.deck-cards button:nth-child(10) {
  animation-delay: 180ms;
}

.deck-cards button:nth-child(11) {
  animation-delay: 200ms;
}

.deck-cards button:nth-child(12) {
  animation-delay: 220ms;
}

.deck-cards button:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px rgba(201, 144, 255, 0.18);
}

.deck-cards button.selected {
  background: #8150d4;
  color: white;
  transform: translateY(-10px);
  box-shadow: 0 12px 26px rgba(129, 80, 212, 0.28);
}

.results-panel {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.result-actions {
  gap: 10px;
  animation: surface-in var(--motion) both;
}

.result-actions button {
  min-width: 160px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--accent-2);
  font-weight: 700;
}

.result-chart {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  position: relative;
  padding-right: 4px;
}

.result-chart:focus {
  outline: none;
}

.bars {
  min-height: 128px;
  display: flex;
  align-items: end;
  gap: 6px;
}

.bar-wrap {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.bar {
  width: 48px;
  min-height: 24px;
  max-height: 126px;
  display: grid;
  place-items: end center;
  padding-bottom: 8px;
  border-radius: 10px;
  background: linear-gradient(#8f5ce6, #cf94ff);
  color: white;
  font-weight: 900;
  animation: surface-in var(--motion-spring) both;
  transition: height var(--motion-spring);
}

.donut-chart-wrap {
  width: 130px;
  height: 130px;
  position: relative;
  animation: surface-in var(--motion-spring) 80ms both;
}

.donut-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.donut-center {
  position: absolute;
  inset: 30px;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background: var(--bg);
  pointer-events: none;
}

.donut-center strong {
  font-size: 18px;
  line-height: 1;
}

.donut-center span {
  font-size: 14px;
  font-weight: 800;
}

.chart-popover {
  position: absolute;
  left: calc(100% + 16px);
  bottom: -6px;
  z-index: 20;
  width: 234px;
  margin: 0;
  padding: 9px 56px 9px 16px;
  border: 1px solid #4d4658;
  border-radius: 15px;
  background: #262629;
  color: #f5f1fb;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px) scale(0.98);
  transition: opacity var(--motion-fast), transform var(--motion-fast);
}

.result-chart:hover .chart-popover,
.result-chart:focus-within .chart-popover,
.result-chart:focus .chart-popover {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.chart-popover div {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  min-height: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-popover div:last-of-type {
  border-bottom: 0;
}

.chart-popover dt,
.chart-popover dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.chart-popover dt {
  font-weight: 900;
}

.chart-popover dd {
  font-weight: 800;
}

.chart-lock {
  position: absolute;
  top: 9px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: white;
  font-size: 16px;
}

.ticket-rail {
  grid-area: tickets;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.ticket-search {
  gap: 8px;
}

.ticket-search input,
.add-ticket input,
.profile-dock input,
.profile-dock select {
  height: 42px;
  min-width: 0;
  border: 1px solid #54505e;
  border-radius: 8px;
  background: #232326;
  color: white;
  padding: 0 12px;
}

.ticket-search input {
  flex: 1;
}

.ticket-search button {
  width: 48px;
  height: 42px;
  border-radius: 8px;
}

.ticket-list {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
}

.empty-list {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #4b4654;
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  animation: surface-in var(--motion) both;
}

.empty-list strong {
  color: var(--accent-2);
}

.ticket-card {
  border: 1px solid #4b4654;
  border-radius: 10px;
  background: #242426;
  padding: 12px;
  animation: surface-in var(--motion) both;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast), background var(--motion-fast);
}

.ticket-card:hover {
  transform: translateY(-2px);
  border-color: #665a78;
}

.ticket-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.ticket-meta {
  gap: 8px;
  position: relative;
}

.ticket-meta span,
.ticket-meta b {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--accent-2);
  padding: 3px 7px;
  font-size: 13px;
}

.ticket-meta span.revealed {
  color: white;
  background: var(--accent);
}

.ticket-meta small {
  margin-left: auto;
  color: var(--muted);
}

.ticket-meta .ticket-menu-button {
  width: 26px;
  height: 28px;
  border: 0;
  background: transparent;
}

.ticket-menu {
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 15;
  min-width: 170px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid #55466f;
  border-radius: 10px;
  background: #202024;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  animation: surface-in var(--motion) both;
}

.ticket-menu button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: white;
  text-align: left;
  padding: 0 10px;
}

.ticket-menu button:hover {
  background: #30283e;
  color: var(--accent-2);
  transform: none;
}

.ticket-card p {
  min-height: 44px;
  margin: 12px 0;
  line-height: 1.35;
}

.ticket-progress {
  height: 1px;
  background: #48454f;
}

.ticket-progress span {
  display: block;
  height: 3px;
  background: var(--accent);
  transition: width var(--motion);
}

.ticket-actions {
  min-height: 44px;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ticket-actions em,
.ticket-actions button {
  min-height: 31px;
  border: 1px solid #56505f;
  border-radius: 7px;
  padding: 5px 9px;
  color: white;
  background: #242426;
  font-style: normal;
  font-weight: 700;
}

.ticket-actions input {
  margin-left: auto;
  width: 54px;
  height: 31px;
  border: 1px solid #3f3b45;
  border-radius: 8px;
  background: #202024;
  color: white;
  text-align: center;
}

.add-ticket {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 8px;
}

.add-ticket button {
  border-radius: 8px;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

.add-ticket button:hover {
  transform: translateY(-1px);
}

.profile-dock {
  position: fixed;
  left: 16px;
  bottom: 14px;
  gap: 8px;
  padding: 8px;
  border: 1px solid #3f3555;
  border-radius: 10px;
  background: rgba(24, 24, 28, 0.94);
  backdrop-filter: blur(8px);
  animation: surface-in var(--motion) 120ms both;
}

.role-chip {
  color: var(--accent-2);
  border-color: var(--line);
  padding: 3px 8px;
}

.avatar-preview-button {
  width: 58px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #242426;
}

.avatar-preview-button span,
.avatar-button span {
  display: inline-block;
  transition: transform var(--motion-fast);
}

.avatar-preview-button span {
  font-size: 32px;
}

.profile-dock input {
  width: 130px;
}

.avatar-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 7, 10, 0.68);
  backdrop-filter: blur(7px);
  animation: surface-in var(--motion) both;
}

.avatar-picker-panel {
  width: min(620px, 100%);
  max-height: min(720px, 92vh);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  overflow: hidden;
  border: 1px solid #55466f;
  border-radius: 16px;
  background: #202024;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  padding: 18px;
  animation: surface-in var(--motion-spring) both;
}

.avatar-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.avatar-picker-head h2 {
  margin: 0;
  font-size: 22px;
}

.avatar-picker-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.avatar-picker-close {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-weight: 900;
  color: var(--accent-2);
}

.avatar-preview-large {
  min-height: 138px;
  display: grid;
  place-items: center;
  border: 1px solid #4c435b;
  border-radius: 14px;
  background: radial-gradient(circle at center, #383045 0, #242426 58%);
}

.avatar-preview-large span {
  font-size: clamp(74px, 14vw, 106px);
  line-height: 1;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.28));
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
  overflow: auto;
  padding: 2px 2px 4px;
}

.avatar-option {
  aspect-ratio: 1;
  min-height: 78px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #28242f;
  border-color: #4f4461;
  font-size: 42px;
  line-height: 1;
}

.avatar-option:hover,
.avatar-option.selected {
  border-color: var(--accent-2);
  background: #342949;
  transform: translateY(-3px);
}

.avatar-option.selected {
  box-shadow: inset 0 0 0 2px var(--accent), 0 12px 30px rgba(139, 85, 230, 0.24);
}

.room-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  justify-items: end;
  background: rgba(6, 6, 9, 0.34);
  animation: surface-in var(--motion-fast) both;
}

.room-panel {
  width: min(430px, 100vw);
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  border-left: 1px solid #55466f;
  background: var(--panel);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.36);
  animation: panel-slide var(--motion) both;
}

@keyframes panel-slide {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.panel-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid rgba(139, 85, 230, 0.25);
}

.panel-head h2 {
  margin: 0;
  font-size: 20px;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-head button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--accent-2);
  font-weight: 900;
}

.panel-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.users-panel {
  display: grid;
  align-content: start;
  gap: 8px;
}

.users-panel h3 {
  margin: 14px 0 4px;
  color: var(--accent-2);
  font-size: 14px;
}

.panel-user-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid rgba(139, 85, 230, 0.28);
  border-radius: 8px;
  background: var(--panel-2);
}

.panel-user-row span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2c2c31;
  font-size: 22px;
}

.panel-user-row em,
.panel-user-row small {
  color: var(--accent-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.muted-row {
  opacity: 0.72;
}

.chat-panel {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
}

.chat-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
}

.chat-message {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
}

.chat-message > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2c2c31;
  font-size: 22px;
}

.chat-message strong {
  font-size: 13px;
}

.chat-message p {
  margin: 3px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--panel-2);
  line-height: 1.35;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
}

.chat-compose input,
.notes-editor {
  border: 1px solid #54505e;
  border-radius: 8px;
  background: var(--panel-2);
  color: inherit;
}

.chat-compose input {
  height: 42px;
  min-width: 0;
  padding: 0 12px;
}

.chat-compose button {
  border-radius: 8px;
  color: var(--accent-2);
  font-weight: 800;
}

.notes-panel {
  display: grid;
}

.notes-editor {
  width: 100%;
  min-height: 100%;
  resize: none;
  padding: 14px;
  line-height: 1.5;
}

.round-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.round-panel dl div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(139, 85, 230, 0.22);
  border-radius: 8px;
  background: var(--panel-2);
}

.round-panel dt {
  color: var(--muted);
  font-size: 12px;
}

.round-panel dd {
  margin: 0;
  font-weight: 800;
}

.round-dist {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.round-dist article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-radius: 8px;
  background: rgba(139, 85, 230, 0.16);
}

.empty-list.compact {
  min-height: 96px;
}

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

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto minmax(440px, 1fr) auto 420px;
    grid-template-areas:
      "topbar topbar"
      "roster table"
      "roster bottom"
      "tickets tickets";
  }

  .app-shell.items-hidden {
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto minmax(440px, 1fr) auto;
    grid-template-areas:
      "topbar topbar"
      "roster table"
      "roster bottom";
  }

  .ticket-rail {
    min-height: 380px;
  }
}

@media (max-width: 780px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas:
      "topbar"
      "table"
      "bottom"
      "roster"
      "tickets";
    padding: 10px;
  }

  .app-shell.items-hidden {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "topbar"
      "table"
      "bottom"
      "roster";
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .deck-cards {
    grid-template-columns: repeat(4, minmax(54px, 1fr));
  }

  .poker-table {
    min-height: 390px;
    grid-template-rows: auto 92px;
  }

  .ticket-rail {
    min-height: 440px;
  }

  .profile-dock {
    position: static;
    transform: none;
    justify-self: stretch;
  }

  .add-ticket {
    grid-template-columns: 1fr;
  }
}
