#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent;
}

/* Header */
.host-header {
  background: var(--paper-white);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 3px solid var(--ink-navy);
}

.host-header h1 {
  font-family: 'Fredoka', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  color: var(--ink-navy);
  flex: 1;
  font-weight: 700;
}

.host-header .back-btn {
  font-size: 24px;
  padding: 8px 12px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-navy);
}

.host-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  animation: sticker-place 260ms cubic-bezier(.2,.8,.2,1) both;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  border: 3px solid var(--ink-navy);
  box-shadow: 3px 3px 0 rgba(10, 14, 39, 0.12);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
  user-select: none;
  -webkit-user-select: none;
}

@media (hover: hover) {
  .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(10, 14, 39, 0.16);
    filter: saturate(1.08);
  }
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(10, 14, 39, 0.12);
}

.btn:disabled {
  cursor: default;
  opacity: 0.52;
  transform: none;
  box-shadow: 1px 1px 0 rgba(10, 14, 39, 0.1);
}

.btn-primary {
  background: var(--patch-yellow);
  color: var(--ink-navy);
}

.btn-secondary {
  background: var(--paper-white);
  color: var(--ink-navy);
}

.btn-danger {
  background: var(--patch-pink);
  color: var(--paper-white);
}

.btn-success {
  background: var(--patch-teal);
  color: var(--paper-white);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
  min-height: 36px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-group .btn {
  flex: 1;
  min-width: 0;
}

/* Lobby */
.lobby-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lobby-form input {
  padding: 12px 16px;
  border-radius: 14px;
  border: 3px solid var(--ink-navy);
  background: var(--paper-white);
  color: var(--ink-navy);
  font-size: 16px;
  min-height: 44px;
  box-shadow: 3px 3px 0 rgba(10, 14, 39, 0.1);
}

.lobby-form input::placeholder {
  color: var(--ink-navy);
  opacity: 0.4;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--paper-white);
  border: 3px solid var(--ink-navy);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(10, 14, 39, 0.08);
}

.team-row .icon {
  font-size: 20px;
  min-width: 24px;
  text-align: center;
}

.team-row .name {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}

.team-row .score {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: right;
}

.team-row .remove-btn {
  font-size: 20px;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--patch-pink);
  border: 2px solid var(--patch-pink);
  border-radius: 10px;
  background: none;
}

/* Game Menu */
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.game-card {
  background: var(--paper-white);
  border: 3px solid var(--ink-navy);
  border-radius: 18px;
  padding: 16px 12px;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 3px 3px 0 rgba(10, 14, 39, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.game-card::after {
  content: "";
  position: absolute;
  width: 38px;
  height: 38px;
  right: -20px;
  top: 50%;
  border: 3px solid var(--ink-navy);
  border-radius: 50%;
  background: var(--page-wash);
  transform: translateY(-50%);
}

.game-card:nth-child(4n + 1) { background: color-mix(in srgb, var(--patch-yellow) 28%, white); }
.game-card:nth-child(4n + 2) { background: color-mix(in srgb, var(--patch-pink) 18%, white); }
.game-card:nth-child(4n + 3) { background: color-mix(in srgb, var(--patch-teal) 20%, white); }
.game-card:nth-child(4n) { background: color-mix(in srgb, var(--patch-purple) 15%, white); }

@media (hover: hover) {
  .game-card:hover {
    transform: translate(-2px, -3px) rotate(-0.5deg);
    box-shadow: 6px 7px 0 rgba(10, 14, 39, 0.15);
  }

  .game-card:hover .icon { transform: rotate(7deg) scale(1.12); }
}

.game-card .icon {
  transition: transform 180ms ease;
}

.game-card:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(10, 14, 39, 0.1);
}

.game-card .icon {
  font-size: 28px;
}

.game-card .label {
  font-size: 13px;
  font-weight: 700;
}

/* Navigation bar */
.nav-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-bar .btn {
  flex: 1;
}

.nav-bar .btn-icon {
  flex: 0 0 44px;
}

/* Game controls */
.game-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-card {
  background: var(--paper-white);
  border: 3px solid var(--ink-navy);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 3px 3px 0 rgba(10, 14, 39, 0.08);
  animation: sticker-place 240ms cubic-bezier(.2,.8,.2,1) both;
}

.control-card h3 {
  font-family: 'Fredoka', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--ink-navy);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.control-card .label {
  font-size: 14px;
  color: var(--ink-navy);
  opacity: 0.6;
  margin-bottom: 4px;
}

.control-card .value {
  font-size: 16px;
  color: var(--ink-navy);
  margin-bottom: 8px;
  line-height: 1.4;
}

.control-card .value-gold {
  font-size: 20px;
  color: var(--patch-purple);
  font-weight: 700;
}

.score-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.score-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 3px solid var(--ink-navy);
  font-size: 15px;
  font-weight: 700;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-white);
  box-shadow: 2px 2px 0 rgba(10, 14, 39, 0.08);
}

.award-btn {
  width: 100%;
  justify-content: space-between;
  border-color: var(--team-color);
  color: var(--ink-navy);
  background: color-mix(in srgb, var(--team-color) 12%, white);
  text-align: left;
}

.award-btn strong {
  color: var(--team-color);
  font-size: 17px;
  white-space: nowrap;
}

.award-btn small {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--ink-navy);
  background: var(--patch-yellow);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.award-btn.recommended {
  border-width: 4px;
  box-shadow: 4px 4px 0 var(--team-color);
}

.award-empty {
  color: var(--ink-navy);
  font-size: 14px;
  opacity: 0.58;
}

.active-team-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.active-team-btn {
  min-height: 44px;
  padding: 8px 12px;
  border: 3px solid var(--team-color);
  border-radius: 12px;
  background: var(--paper-white);
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.active-team-btn.active {
  background: color-mix(in srgb, var(--team-color) 22%, white);
  box-shadow: 3px 3px 0 var(--team-color);
  transform: translate(-1px, -1px);
}

.score-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 0px 0px 0 rgba(10, 14, 39, 0.08);
}

/* Feud specific */
.feud-answer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 2px solid var(--cloud-grey);
}

.feud-answer-row:last-child {
  border-bottom: none;
}

.feud-answer-row .rank {
  font-size: 14px;
  color: var(--ink-navy);
  opacity: 0.5;
  min-width: 24px;
}

.feud-answer-row .text {
  flex: 1;
  font-size: 15px;
}

.feud-answer-row .pts {
  font-size: 14px;
  color: var(--patch-purple);
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

.feud-answer-row button {
  border: 2px solid var(--ink-navy);
  border-radius: 10px;
  font-weight: 700;
}

/* Strike buttons */
.strike-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.strike-indicator {
  display: flex;
  gap: 4px;
  font-size: 24px;
}

/* Relay trivia */
.relay-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.relay-header {
  text-align: center;
  font-size: 10px;
  color: var(--ink-navy);
  opacity: 0.6;
  padding: 4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.relay-cell {
  padding: 10px 4px;
  background: var(--paper-white);
  border: 2px solid var(--ink-navy);
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-navy);
  box-shadow: 2px 2px 0 rgba(10, 14, 39, 0.08);
  transition: all 0.1s;
}

.relay-cell:active {
  transform: translate(1px, 1px);
  box-shadow: 0px 0px 0 rgba(10, 14, 39, 0.08);
}

.relay-cell.used {
  opacity: 0.2;
  pointer-events: none;
}

/* Story sequencing */
.story-entry {
  padding: 10px 14px;
  background: var(--paper-white);
  border: 2px solid var(--ink-navy);
  border-radius: 12px;
  margin-bottom: 4px;
  font-size: 14px;
  box-shadow: 2px 2px 0 rgba(10, 14, 39, 0.06);
}

/* Logo in host */
.host-logo {
  max-width: 180px;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 6px 8px rgba(10, 14, 39, 0.14));
  animation: logo-float 4s ease-in-out infinite;
}

/* Confirm dialog overlay */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 39, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.confirm-dialog {
  background: var(--paper-white);
  border: 3px solid var(--ink-navy);
  border-radius: 16px;
  padding: 24px;
  margin: 24px;
  max-width: 340px;
  box-shadow: 6px 6px 0 rgba(10, 14, 39, 0.12);
}

.confirm-dialog h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--ink-navy);
}

.confirm-dialog p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--ink-navy);
  opacity: 0.7;
  line-height: 1.4;
}

.confirm-buttons {
  display: flex;
  gap: 8px;
}

.confirm-buttons .btn {
  flex: 1;
}
