@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&display=swap");

:root {
  --bg-main: #090909;
  --bg-soft: #111111;
  --bg-veil: #171717;
  --surface: #151515;
  --surface-soft: #1b1b1b;
  --surface-strong: #222222;
  --line: #2f2f2f;
  --line-strong: #4a4a4a;
  --text: #f5f5f5;
  --muted: #b6b6b6;
  --text-strong: #ffffff;
  --danger: #ff6c6c;
  --success: #45cd72;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% -6%, rgba(255, 255, 255, 0.12) 0%, transparent 44%),
    radial-gradient(circle at 84% 6%, rgba(255, 255, 255, 0.08) 0%, transparent 36%),
    linear-gradient(180deg, #121212 0%, var(--bg-main) 68%);
}

body.modal-open {
  overflow: hidden;
}

.page-shell {
  min-height: 100vh;
  padding: 18px;
}

.container {
  width: min(1460px, 100%);
  margin: 0 auto;
}

h2,
h3,
h4 {
  margin-top: 0;
}

.card {
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.95), rgba(16, 16, 16, 0.98));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.hidden {
  display: none !important;
}

input {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 8, 8, 0.92);
  color: var(--text);
  font-size: 15px;
}

input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

input::placeholder {
  color: #7f7f7f;
}

button {
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #f3f3f3, #d8d8d8);
  color: #0f0f0f;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
  filter: brightness(1.03);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.ghost-btn {
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid #666666;
  color: #ececec;
}

.ghost-btn:hover {
  filter: none;
  background: rgba(32, 32, 32, 0.95);
}

.error {
  min-height: 20px;
  margin-top: 4px;
  color: var(--danger);
}

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

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.home-block {
  padding: 4px;
}

.join-card {
  width: min(560px, 100%);
}

.screen-brand-row {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}

.app-brand-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #575757;
  background: linear-gradient(180deg, rgba(34, 34, 34, 0.95), rgba(18, 18, 18, 0.98));
  color: #f2f2f2;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.09em;
  font-weight: 800;
  text-transform: uppercase;
}

.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 395px);
  gap: 16px;
  align-items: start;
}

.room-main {
  min-height: calc(100vh - 136px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% -22%, rgba(255, 255, 255, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(24, 24, 24, 0.97), rgba(10, 10, 10, 0.99));
  border: 1px solid var(--line);
}

.room-sidebar {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.97), rgba(12, 12, 12, 0.99));
}

.room-title-wrap {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-brand-inline-room {
  padding: 7px 12px;
}

.room-meta-compact {
  min-width: 0;
  border-radius: 12px;
  border: 1px solid #474747;
  background: rgba(10, 10, 10, 0.72);
}

.room-meta-compact summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 12px;
  color: #d6d6d6;
  user-select: none;
}

.room-meta-compact summary::-webkit-details-marker {
  display: none;
}

.room-meta-panel {
  border-top: 1px solid #3f3f3f;
  padding: 8px 10px 9px;
  display: grid;
  gap: 6px;
}

.room-meta-line {
  margin: 0;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #d8d8d8;
}

.room-meta-key {
  color: #a9a9a9;
}

.room-name-compact {
  font-size: 12px;
  line-height: 1.2;
  color: #ffffff;
}

.room-error-inline {
  text-align: center;
}

.share-fab {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 75;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 999px;
  padding: 0;
  border: 1px solid #8c8c8c;
  background: linear-gradient(180deg, rgba(38, 38, 38, 0.96), rgba(18, 18, 18, 0.98));
  color: #f3f3f3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.36);
}

.share-fab:hover {
  filter: none;
  background: linear-gradient(180deg, rgba(54, 54, 54, 0.96), rgba(24, 24, 24, 0.98));
}

.share-fab-icon {
  font-size: 17px;
  line-height: 1;
  transform: translateY(-1px);
}

.feature-banner {
  margin: 18px auto 0;
  width: min(100%, 560px);
}

.feature-banner-main {
  border-radius: 28px;
  padding: 18px;
  border: 1px solid #505050;
  background: linear-gradient(160deg, #2d2d2d 0%, #1f1f1f 64%, #141414 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 28px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.feature-banner-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #b8b8b8;
}

.feature-banner-title {
  margin: 0;
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 800;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.feature-banner-status {
  margin: 8px 0 0;
  font-size: 14px;
  color: #dddddd;
  overflow-wrap: anywhere;
}

.table-vote-timer,
.table-reveal-countdown {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid #cfcfcf;
  background: rgba(255, 255, 255, 0.08);
  color: #f7f7f7;
  font-size: clamp(18px, 3.4vw, 24px);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.table-vote-timer-expired {
  border-color: var(--success);
  background: rgba(69, 205, 114, 0.2);
  color: #e8ffef;
}

.table-vote-timer-shake {
  animation: timer-shake 0.58s ease-in-out 1;
}

@keyframes timer-shake {
  0% {
    transform: translateX(0);
  }
  16% {
    transform: translateX(-6px);
  }
  32% {
    transform: translateX(6px);
  }
  48% {
    transform: translateX(-4px);
  }
  64% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}

.feature-banner-metrics {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.feature-metric-card {
  min-width: 0;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid #4a4a4a;
  background: rgba(7, 7, 7, 0.42);
  text-align: left;
}

.feature-metric-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b9b9b9;
}

.feature-metric-value {
  margin-top: 2px;
  display: block;
  font-size: 15px;
  color: #f8f8f8;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.table-controls {
  margin: 12px auto 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.table-controls button {
  min-width: 180px;
}

.participants-block {
  margin-top: 16px;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid #3d3d3d;
  background: rgba(0, 0, 0, 0.34);
}

.participants-block-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.participants-title {
  margin: 0;
  font-size: 15px;
  color: #ececec;
}

.participants-counter {
  font-size: 13px;
  color: var(--muted);
}

.participant-ring {
  display: grid;
  --seat-card-width: 108px;
  --table-core-size: 168px;
  grid-template-columns: minmax(0, 1fr) var(--table-core-size) minmax(0, 1fr);
  grid-template-rows: auto var(--table-core-size) auto;
  gap: 9px;
  min-height: 390px;
  align-items: stretch;
}

.participant-zone {
  min-width: 0;
  display: flex;
  gap: 5px;
}

.participant-zone-top {
  grid-column: 1 / -1;
  grid-row: 1;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
}

.participant-zone-bottom {
  grid-column: 1 / -1;
  grid-row: 3;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.participant-zone-left {
  grid-column: 1;
  grid-row: 2;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  align-self: center;
}

.participant-zone-right {
  grid-column: 3;
  grid-row: 2;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  align-self: center;
}

.participant-zone-top .seat,
.participant-zone-bottom .seat {
  width: var(--seat-card-width);
  flex: 0 0 var(--seat-card-width);
}

.participant-zone-left .seat {
  width: var(--seat-card-width);
  flex: 0 0 var(--seat-card-width);
  margin-left: auto;
}

.participant-zone-right .seat {
  width: var(--seat-card-width);
  flex: 0 0 var(--seat-card-width);
  margin-right: auto;
}

.poker-table-core {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: var(--table-core-size);
  aspect-ratio: 1 / 1;
  min-height: 0;
  border-radius: 18px;
  border: 1px solid #4a4a4a;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: linear-gradient(180deg, rgba(31, 31, 31, 0.96), rgba(13, 13, 13, 0.99));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.poker-table-hint {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d4d4d4;
  position: relative;
  z-index: 1;
}

.poker-table-timer {
  font-size: 11px;
  font-weight: 700;
  color: #f2f2f2;
  position: relative;
  z-index: 1;
}

.seat {
  width: 100%;
}

.seat-card {
  position: relative;
  width: 100%;
  min-height: 122px;
  padding: 6px 6px 8px;
  border-radius: 12px;
  border: 1px solid #d9d9d9;
  background:
    linear-gradient(180deg, rgba(251, 251, 251, 0.98), rgba(222, 222, 222, 0.97)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 236, 236, 0.93));
  color: #181818;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  overflow: hidden;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.26);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.seat-card-reactable {
  cursor: pointer;
}

.seat-card-reactable:hover {
  transform: translateY(-2px);
  border-color: #ffffff;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.34);
}

.seat-card-hit {
  border-color: #fefefe;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.26), 0 13px 20px rgba(0, 0, 0, 0.35);
}

.seat-card-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  position: relative;
  z-index: 2;
  min-height: 14px;
}

.seat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #f8f8f8;
  background: linear-gradient(180deg, #222222, #0c0c0c);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.26);
  position: relative;
  z-index: 2;
}

.seat-main {
  min-width: 0;
  flex: 1;
}

.seat-name {
  width: 100%;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 12px;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 2;
}

.seat-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.badge {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(17, 17, 17, 0.13);
  color: #2e2e2e;
}

.badge-green {
  background: rgba(69, 205, 114, 0.25);
  color: #1f5c34;
}

.badge-gray {
  background: rgba(116, 116, 116, 0.2);
  color: #303030;
}

.seat-vote-state {
  min-height: 17px;
  font-size: 12px;
  font-weight: 800;
  color: #1e1e1e;
  line-height: 1;
  position: relative;
  z-index: 2;
}

.seat-vote-state-picked,
.seat-vote-state-value {
  color: inherit;
}

.seat-vote-state-empty {
  color: #3b3b3b;
}

.seat-card-voted {
  border-color: #2f2f2f;
  background: linear-gradient(180deg, rgba(45, 45, 45, 0.98), rgba(19, 19, 19, 0.98));
  color: #f3f3f3;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.34);
}

.seat-card-voted .seat-name,
.seat-card-voted .seat-vote-state {
  color: #f7f7f7;
}

.seat-card-voted .badge {
  background: rgba(255, 255, 255, 0.15);
  color: #f4f4f4;
}

.seat-card-voted .badge-green {
  background: rgba(69, 205, 114, 0.28);
  color: #d6ffe5;
}

.seat-card-voted .seat-avatar {
  background: linear-gradient(180deg, #f8f8f8, #d8d8d8);
  color: #101010;
  opacity: 1;
  transform: none;
}

.seat-card-revealed {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26), 0 10px 16px rgba(0, 0, 0, 0.36);
}

.table-vote-strip {
  margin-top: auto;
  padding-top: 20px;
}

.table-vote-strip-inner {
  width: 100%;
  margin: 0 auto;
  border-radius: 20px;
  border: 1px solid #444444;
  background: rgba(6, 6, 6, 0.64);
  padding: 14px 12px 16px;
  overflow-x: auto;
}

.table-vote-strip-inner::-webkit-scrollbar {
  height: 7px;
}

.table-vote-strip-inner::-webkit-scrollbar-thumb {
  background: rgba(210, 210, 210, 0.46);
  border-radius: 999px;
}

.cards-row {
  display: inline-flex;
  gap: 10px;
  align-items: flex-end;
}

.vote-card {
  position: relative;
  width: 74px;
  min-height: 102px;
  border-radius: 14px;
  border: 2px solid #8d8d8d;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.11), rgba(20, 20, 20, 0.82)),
    linear-gradient(180deg, rgba(18, 18, 18, 0.95), rgba(7, 7, 7, 0.98));
  color: #f2f2f2;
  font-size: 31px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.72);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.vote-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.38);
  border-color: #cecece;
}

.vote-card.selected {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(206, 206, 206, 0.94));
  border-color: #ffffff;
  color: #0f0f0f;
  text-shadow: none;
  box-shadow: 0 12px 26px rgba(240, 240, 240, 0.21);
}

.sidebar-section {
  border-bottom: 1px solid #343434;
  padding-bottom: 12px;
}

.sidebar-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.compact-stats {
  border-bottom: 0;
  display: flex;
  gap: 10px;
  padding-bottom: 0;
}

.stat-pill {
  flex: 1;
  border-radius: 14px;
  border: 1px solid #444444;
  background: rgba(7, 7, 7, 0.7);
  padding: 10px;
}

.stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--muted);
}

.feature-form-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-form-column input {
  margin: 0;
}

.features-list,
.votes-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.feature-item,
.vote-item {
  border-radius: 12px;
  border: 1px solid #454545;
  background: rgba(7, 7, 7, 0.56);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.item-left {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.item-left strong,
.small-text,
.feature-title-line,
.vote-item span {
  overflow-wrap: anywhere;
}

.item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-box,
.active-feature-box {
  border-radius: 14px;
  border: 1px solid #454545;
  background: rgba(8, 8, 8, 0.64);
  padding: 14px;
}

.feature-title-line {
  margin: 0 0 8px;
  font-size: 17px;
}

.vote-value {
  font-weight: 700;
  color: #f0f0f0;
}

.small-text {
  font-size: 12px;
}

.emoji-picker {
  position: fixed;
  z-index: 85;
  width: min(340px, calc(100vw - 18px));
  border-radius: 14px;
  border: 1px solid #666666;
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.98), rgba(10, 10, 10, 0.98));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.emoji-picker-title {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c7c7c7;
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.emoji-picker-grid-extended {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.emoji-picker-toggle-btn {
  margin-top: 8px;
  width: 100%;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  letter-spacing: 0.03em;
  border-color: #707070;
  background: linear-gradient(180deg, #272727, #1d1d1d);
  color: #f3f3f3;
}

.emoji-picker-toggle-btn:hover {
  filter: none;
  background: linear-gradient(180deg, #333333, #232323);
}

.emoji-picker-extended {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #444444;
}

.emoji-picker-caption {
  margin: 0 0 7px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #aaaaaa;
}

.emoji-picker-grid-extended {
  max-height: 235px;
  overflow-y: auto;
  padding-right: 3px;
}

.emoji-picker-grid-extended::-webkit-scrollbar {
  width: 7px;
}

.emoji-picker-grid-extended::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(191, 191, 191, 0.42);
}

.emoji-reaction-btn {
  border-radius: 10px;
  border: 1px solid #555555;
  background: rgba(8, 8, 8, 0.9);
  color: #f5f5f5;
  font-size: 21px;
  line-height: 1;
  padding: 7px 0;
}

.emoji-reaction-btn:hover {
  background: rgba(34, 34, 34, 0.98);
  transform: translateY(-1px);
}

.flying-emoji {
  position: fixed;
  z-index: 90;
  font-size: 34px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.45));
  user-select: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 2, 0.74);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  border-radius: 18px;
  border: 1px solid #5a5a5a;
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.98), rgba(12, 12, 12, 0.98));
}

.modal-header {
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.modal-header h3 {
  margin: 0;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  padding: 0;
  font-size: 23px;
  line-height: 1;
}

.modal-panel input {
  margin: 8px 0 0;
}

.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

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

  .room-main {
    min-height: 620px;
  }

  .room-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 860px) {
  .page-shell {
    padding: 12px;
  }

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

  .card {
    padding: 18px;
    border-radius: 20px;
  }

  .join-card {
    width: 100%;
  }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 420px);
  }

  .table-controls button {
    width: 100%;
    min-width: 0;
  }

  .compact-stats {
    flex-direction: column;
  }

  .participant-ring {
    --seat-card-width: 90px;
    --table-core-size: 124px;
    grid-template-columns: minmax(0, 1fr) var(--table-core-size) minmax(0, 1fr);
    grid-template-rows: auto var(--table-core-size) auto;
    min-height: 336px;
    gap: 6px;
  }

  .poker-table-core {
    padding: 8px 6px;
    border-radius: 14px;
  }

  .poker-table-hint {
    font-size: 9px;
  }

  .poker-table-timer {
    font-size: 10px;
  }

  .seat-card {
    min-height: 102px;
    padding: 5px 6px 7px;
    border-radius: 11px;
  }

  .seat-avatar {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

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

  .seat-vote-state {
    min-height: 15px;
    font-size: 11px;
  }

  .badge {
    font-size: 6px;
    padding: 1px 3px;
  }

  .share-fab {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  body.mobile-vote-active .room-main {
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
  }

  body.mobile-vote-active .table-vote-strip {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
    z-index: 78;
    background: linear-gradient(
      180deg,
      rgba(9, 9, 9, 0),
      rgba(9, 9, 9, 0.86) 28%,
      rgba(9, 9, 9, 0.97)
    );
  }

  body.mobile-vote-active .table-vote-strip-inner {
    width: min(100%, 700px);
    margin: 0 auto;
    border-color: #696969;
    background: rgba(12, 12, 12, 0.96);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  }

  .feature-banner {
    width: 100%;
  }

  .feature-banner-main {
    border-radius: 22px;
    padding: 15px;
  }

  .feature-banner-metrics {
    grid-template-columns: 1fr;
  }

  .table-vote-strip-inner {
    padding: 12px 10px 14px;
  }

  .vote-card {
    width: 64px;
    min-height: 90px;
    font-size: 26px;
  }

  .feature-item,
  .vote-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .feature-item .item-right,
  .vote-item .item-right,
  .feature-item .item-right button {
    width: 100%;
  }

  .modal-panel {
    border-radius: 14px;
    padding: 16px;
  }

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

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

  .emoji-picker-grid-extended {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 10px;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .screen-brand-row {
    margin-bottom: 10px;
  }

  .app-brand-inline {
    padding: 6px 10px;
    font-size: 11px;
  }

  .room-title-wrap {
    gap: 8px;
    align-items: flex-start;
    flex-direction: column;
  }

  .room-meta-compact {
    width: 100%;
  }

  .room-meta-line {
    font-size: 11px;
  }

  .share-fab {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .share-fab-icon {
    font-size: 15px;
  }

  .feature-banner-title {
    font-size: 20px;
  }

  .table-vote-timer,
  .table-reveal-countdown {
    font-size: 18px;
  }

  .cards-row {
    gap: 8px;
  }

  .vote-card {
    width: 56px;
    min-height: 82px;
    border-radius: 12px;
    font-size: 22px;
  }

  .participant-ring {
    --seat-card-width: 78px;
    --table-core-size: 98px;
    grid-template-columns: minmax(0, 1fr) var(--table-core-size) minmax(0, 1fr);
    grid-template-rows: auto var(--table-core-size) auto;
    min-height: 292px;
    gap: 5px;
  }

  .poker-table-core {
    border-radius: 12px;
    padding: 6px 5px;
  }

  .poker-table-hint {
    font-size: 8px;
  }

  .poker-table-timer {
    font-size: 9px;
  }

  .seat-card {
    min-height: 88px;
    padding: 5px 4px 6px;
    border-radius: 10px;
  }

  .seat-avatar {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }

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

  .seat-badges {
    gap: 3px;
  }

  .seat-vote-state {
    min-height: 13px;
    font-size: 10px;
  }

  .badge {
    font-size: 6px;
    padding: 1px 3px;
  }

  body.mobile-vote-active .room-main {
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }

  body.mobile-vote-active .table-vote-strip {
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  }

  .emoji-picker {
    width: min(94vw, 340px);
  }

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

  .emoji-picker-grid-extended {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .emoji-reaction-btn {
    font-size: 20px;
    padding: 6px 0;
  }

  .flying-emoji {
    font-size: 28px;
  }
}
