:root {
  --primary: #0066cc;
  --primary-focus: #0071e3;
  --canvas: #ffffff;
  --canvas-parchment: #f5f5f7;
  --ink: #1d1d1f;
  --ink-muted: #6e6e73;
  --hairline: #e0e0e0;
  --dark-tile: #272729;
  --topbar-height: 52px;
  --font-ui: "Pretendard Variable", "Pretendard", "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.2px;
  color: var(--ink);
  background: var(--canvas-parchment);
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 700;
  height: var(--topbar-height);
  padding: 0 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: max-content;
}

.topbar-kicker {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.12px;
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.32px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.topbar-actions::-webkit-scrollbar {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 400px 1fr;
  height: calc(100vh - var(--topbar-height));
  height: calc(100dvh - var(--topbar-height));
  min-height: 0;
  transition: grid-template-columns 200ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.app-shell.sidebar-collapsed .sidebar {
  overflow: hidden;
  padding: 0;
  border-right: 0;
}

.sidebar {
  position: relative;
  height: calc(100vh - var(--topbar-height));
  height: calc(100dvh - var(--topbar-height));
  min-height: 0;
  background: var(--canvas);
  border-right: 1px solid var(--hairline);
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.sidebar-view {
  display: none;
}

.sidebar-view.open {
  display: block;
}

.ranking-panel h2 {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.random-card {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--canvas);
}

.random-approve-btn {
  margin-top: 0;
}

.random-status {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: -0.12px;
}

.random-result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

.random-result span,
.random-result small {
  display: block;
  color: var(--ink-muted);
  font-size: 12px;
  letter-spacing: -0.12px;
}

.random-result strong {
  display: block;
  margin: 2px 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.28px;
}

.ranking-notice {
  white-space: normal;
}

.ranking-notice.emphasis {
  padding: 10px 12px;
  border: 1px solid rgba(0, 102, 204, 0.18);
  border-radius: 16px;
  background: rgba(0, 102, 204, 0.06);
  color: var(--primary);
  font-weight: 700;
}

.panel-block + .panel-block {
  margin-top: 28px;
}

.panel-block h2 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.helper {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-muted);
  letter-spacing: -0.12px;
}

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

.pill-input {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  padding: 0 16px;
  font: inherit;
  color: var(--ink);
  background: var(--canvas);
}

.pill-input:focus {
  outline: 2px solid var(--primary-focus);
  outline-offset: 1px;
}

.pill-btn {
  border: 1px solid transparent;
  border-radius: 9999px;
  height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  letter-spacing: -0.18px;
  cursor: pointer;
  transition: transform 140ms ease;
  white-space: nowrap;
}

.pill-btn:active {
  transform: scale(0.95);
}

.pill-btn.primary {
  background: var(--primary);
  color: #fff;
}

.pill-btn.secondary {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.pill-btn.secondary.active {
  background: var(--primary);
  color: #fff;
}

.topbar .pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.12px;
}

.topbar .pill-btn:hover {
  color: var(--primary);
}

.topbar .pill-btn.secondary.active {
  background: transparent;
  color: var(--primary);
}

.topbar .pill-btn.topbar-primary {
  padding: 0 13px;
  background: var(--primary);
  color: #fff;
}

.topbar .pill-btn.topbar-primary:hover {
  color: #fff;
}

.topbar .pill-btn.topbar-primary.active {
  background: var(--ink);
  color: #fff;
}

.pill-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.suggestions {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  overflow: hidden;
  display: none;
  background: var(--canvas);
}

.suggestions.visible {
  display: block;
}

.suggestions li {
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
  cursor: pointer;
}

.suggestions li:last-child {
  border-bottom: 0;
}

.suggestions li:hover,
.suggestions li[aria-selected="true"] {
  background: #f1f6fc;
}

.pick-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.center-candidates-btn {
  width: 100%;
  min-height: 40px;
  margin: 2px 0 8px;
  padding: 0 14px;
  border: 1px solid var(--primary);
  border-radius: 9999px;
  background: transparent;
  color: var(--primary);
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: -0.16px;
  cursor: pointer;
}

.center-candidates-btn:disabled {
  border-color: var(--hairline);
  color: var(--ink-muted);
  cursor: not-allowed;
  opacity: 0.58;
}

.center-candidates-btn:not(:disabled):active {
  transform: scale(0.98);
}

.center-candidates-result {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: -0.12px;
}

.pick-item {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.pick-main {
  min-width: 0;
}

.pick-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.pick-line {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.delete-btn {
  border: 1px solid var(--hairline);
  background: #fafafc;
  color: var(--ink);
  border-radius: 9999px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
}

.delete-btn:active {
  transform: scale(0.95);
}

.empty-state {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.hidden-panel {
  display: none;
}

.hidden-panel.open {
  display: block;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.ranking-item {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ranking-item.tie-winner {
  border-color: rgba(0, 102, 204, 0.24);
  background: rgba(0, 102, 204, 0.06);
}

.ranking-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ranking-rank {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  min-width: 28px;
}

.ranking-name {
  font-size: 15px;
  font-weight: 600;
}

.ranking-line {
  font-size: 12px;
  color: var(--ink-muted);
}

.ranking-votes {
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.map-wrap {
  position: relative;
  min-height: 0;
  min-width: 0;
  background: var(--dark-tile);
}

.deadline-board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.deadline-board.hidden {
  display: none;
}

.deadline-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
  white-space: nowrap;
}

.deadline-board.closed .deadline-label {
  background: #fff;
  color: var(--ink);
}

.deadline-board strong {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.18px;
  white-space: nowrap;
}

#deadline-time {
  overflow: hidden;
  color: #cccccc;
  font-size: 12px;
  letter-spacing: -0.12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-rank-board {
  position: absolute;
  z-index: 20;
  top: 16px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  width: max-content;
  max-width: min(560px, calc(100% - 32px));
  min-height: 44px;
  padding: 8px 16px 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(29, 29, 31, 0.9);
  backdrop-filter: saturate(180%) blur(18px);
  color: #fff;
  transform: translateX(-50%);
}

.top-rank-board.hidden {
  display: none;
}

.top-rank-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.top-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.12px;
  white-space: nowrap;
}

#top-rank-name {
  overflow: hidden;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.24px;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#top-rank-meta {
  overflow: hidden;
  min-width: 0;
  color: #cccccc;
  font-size: 13px;
  letter-spacing: -0.12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-add-btn {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 24px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.18px;
  cursor: pointer;
  transform: translateX(-50%);
  transition: transform 140ms ease;
  white-space: nowrap;
}

.quick-add-btn:active {
  transform: translateX(-50%) scale(0.95);
}

.quick-add-btn:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 3px;
}

.map-ranking-btn,
.map-overlay-btn,
.map-location-btn {
  position: absolute;
  right: 22px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 23px;
  line-height: 1;
  backdrop-filter: saturate(180%) blur(18px);
  transition: transform 140ms ease, background 140ms ease;
}

.map-ranking-btn {
  bottom: 204px;
}

.map-overlay-btn {
  bottom: 146px;
}

.map-location-btn {
  bottom: 88px;
}

.map-ranking-btn.active,
.map-overlay-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.map-ranking-btn.active:hover,
.map-overlay-btn.active:hover {
  background: var(--primary-focus);
}

.map-ranking-btn:hover,
.map-overlay-btn:hover,
.map-location-btn:hover {
  background: #fff;
}

.map-ranking-btn:active,
.map-overlay-btn:active,
.map-location-btn:active {
  transform: scale(0.94);
}

.map-ranking-btn:focus-visible,
.map-overlay-btn:focus-visible,
.map-location-btn:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 3px;
}

.celebration-layer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  overflow: hidden;
}

.firework-burst {
  position: absolute;
  width: 2px;
  height: 2px;
  animation: burst-fade 900ms ease-out forwards;
  transform: translate(-50%, -50%);
}

.firework-burst span {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
  animation: firework-pop 900ms cubic-bezier(0.14, 0.8, 0.22, 1) forwards;
  transform: rotate(var(--angle)) translateX(0) scale(0.5);
  transform-origin: center;
}

.firework-burst span:nth-child(3n + 1) {
  background: var(--primary);
  box-shadow: 0 0 12px rgba(0, 102, 204, 0.7);
}

.firework-burst span:nth-child(3n + 2) {
  background: var(--canvas-parchment);
}

.celebration-message {
  position: absolute;
  left: 50%;
  top: 48%;
  max-width: min(360px, calc(100% - 48px));
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  background: rgba(29, 29, 31, 0.9);
  backdrop-filter: saturate(180%) blur(18px);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.22px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  animation: celebration-message 2100ms ease-out forwards;
  transform: translate(-50%, -50%) scale(0.92);
}

@keyframes firework-pop {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(0) scale(0.4);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--distance)) scale(1);
  }
}

@keyframes burst-fade {
  0%,
  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes celebration-message {
  0% {
    opacity: 0;
    transform: translate(-50%, -42%) scale(0.92);
  }

  16%,
  78% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -56%) scale(0.96);
  }
}

#map {
  width: 100%;
  height: calc(100vh - var(--topbar-height));
  height: calc(100dvh - var(--topbar-height));
}

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

@media (max-width: 833px) {
  .topbar {
    padding: 0 12px;
    gap: 16px;
  }

  .topbar-brand {
    display: block;
  }

  .topbar-kicker {
    display: none;
  }

  .topbar h1 {
    font-size: 17px;
    white-space: nowrap;
  }

  .topbar-actions {
    flex: 1 1 auto;
    align-items: center;
    padding: 0 2px 0 0;
    gap: 12px;
    height: var(--topbar-height);
  }

  .app-shell {
    display: block;
    height: calc(100vh - var(--topbar-height));
    height: calc(100dvh - var(--topbar-height));
    min-height: 0;
  }

  .app-shell.sidebar-collapsed {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 500;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    height: auto;
    max-height: min(72vh, calc(100vh - var(--topbar-height) - 12px));
    max-height: min(72dvh, calc(100dvh - var(--topbar-height) - 12px));
    overflow-y: auto;
    transform: translateY(-120%);
    transition: transform 200ms ease;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .app-shell.sidebar-collapsed .sidebar {
    padding: 20px;
    border-bottom: 1px solid var(--hairline);
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateY(0);
  }

  #map {
    height: calc(100vh - var(--topbar-height));
    height: calc(100dvh - var(--topbar-height));
  }

  .top-rank-board {
    top: 12px;
    width: max-content;
    max-width: calc(100% - 24px);
  }

  .deadline-board {
    justify-content: center;
  }

  #deadline-time {
    display: none;
  }

  #top-rank-meta {
    display: none;
  }

  .quick-add-btn {
    bottom: 18px;
    width: calc(100% - 48px);
    max-width: 320px;
  }

  .map-ranking-btn,
  .map-overlay-btn,
  .map-location-btn {
    right: 16px;
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .map-ranking-btn {
    bottom: 186px;
  }

  .map-overlay-btn {
    bottom: 132px;
  }

  .map-location-btn {
    bottom: 78px;
  }
}

.maplibregl-ctrl-group {
  border: 1px solid var(--hairline);
  box-shadow: none;
  border-radius: 12px;
  overflow: hidden;
}

.maplibregl-ctrl-group button {
  width: 34px;
  height: 34px;
}

.maplibregl-popup-content {
  border-radius: 12px;
  border: 1px solid var(--hairline);
  box-shadow: none;
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: -0.12px;
  color: var(--ink);
}

.station-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.station-marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: var(--primary);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.station-marker-emoji {
  display: inline-block;
  font-size: 22px;
  line-height: 1;
}

.top-rank-marker .station-marker-emoji {
  animation: beer-pin-pulse 1.05s ease-in-out infinite;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
  transform-origin: 50% 100%;
  will-change: transform;
}

.top-rank-marker .station-marker-label {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 10px;
}

.station-marker-label {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -0.08px;
  white-space: nowrap;
}

.center-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.center-marker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.center-marker-label {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.12px;
  white-space: nowrap;
}

@keyframes beer-pin-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.34);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-rank-marker .station-marker-emoji {
    animation: none;
  }
}

[hidden] {
  display: none !important;
}

.auth-card {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.auth-view,
.admin-view {
  display: none;
}

.auth-view.open,
.admin-view.open {
  display: block;
}

.field-label {
  display: block;
  margin: 12px 0 6px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.12px;
}

.select-input {
  width: 100%;
  appearance: none;
}

.participant-select-wrap {
  position: relative;
}

.participant-select-wrap::after {
  position: absolute;
  top: 15px;
  right: 16px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--ink-muted);
  border-bottom: 1px solid var(--ink-muted);
  content: "";
  pointer-events: none;
  transform: rotate(45deg);
}

.participant-select-wrap .pill-input {
  width: 100%;
  padding-right: 40px;
  cursor: pointer;
}

.participant-select-wrap .pill-input:disabled {
  cursor: not-allowed;
}

.participant-suggestions {
  margin-top: 8px;
}

.wide-btn {
  width: 100%;
  margin-top: 12px;
}

.status-pill {
  margin: 0 0 10px;
  padding: 11px 14px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--canvas-parchment);
  color: var(--ink-muted);
  font-size: 14px;
  letter-spacing: -0.12px;
}

.voter-box.open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--canvas);
}

.voter-box.open > div {
  min-width: 0;
}

.participant-switch-btn {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--primary);
  border-radius: 9999px;
  background: transparent;
  color: var(--primary);
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: -0.12px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

.participant-switch-btn:hover {
  background: var(--primary);
  color: #fff;
}

.participant-switch-btn:active {
  transform: scale(0.95);
}

.participant-switch-btn:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 2px;
}

.status-label {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-muted);
  font-size: 12px;
  letter-spacing: -0.12px;
}

#current-participant-name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.24px;
}

.pick-owner {
  margin: 0 0 2px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
}

.delete-btn.danger {
  color: var(--ink-muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 29, 31, 0.36);
  backdrop-filter: saturate(180%) blur(12px);
}

.admin-modal,
.participant-modal {
  max-height: min(86vh, 780px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: rgba(245, 245, 247, 0.96);
  color: var(--ink);
}

.admin-modal {
  width: min(620px, 100%);
}

.participant-modal {
  width: min(430px, 100%);
}

.modal-head,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-head {
  margin-bottom: 18px;
}

.modal-head h2,
.admin-section h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.32px;
}

.modal-head h2 {
  font-size: 21px;
  line-height: 1.19;
}

.admin-section h3 {
  font-size: 19px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:active {
  transform: scale(0.95);
}

.admin-section {
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
}

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

.deadline-grid .pill-btn {
  margin-top: 0;
}

.deadline-admin-status {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: -0.12px;
}

.admin-picker-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
  align-items: start;
}

.admin-pick-field {
  min-width: 0;
}

.admin-pick-status {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: -0.12px;
}

.reset-section .helper {
  margin-top: 8px;
}

.reset-all-btn {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--canvas);
}

.reset-all-btn:hover {
  background: var(--ink);
  color: #fff;
}

.admin-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

.bulk-input {
  width: 100%;
  min-width: 0;
  margin: 10px 0;
  padding: 13px 16px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.bulk-input:focus {
  outline: 2px solid var(--primary-focus);
  outline-offset: 1px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.43;
}

.count-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  color: var(--ink-muted);
  font-size: 12px;
  white-space: nowrap;
}

.admin-participant-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.admin-participant-item,
.admin-empty {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 12px;
  background: var(--canvas);
}

.admin-participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-participant-main {
  min-width: 0;
}

.admin-participant-main strong,
.admin-participant-main span {
  display: block;
}

.admin-participant-main strong {
  font-size: 16px;
  font-weight: 600;
}

.admin-participant-main span,
.admin-empty {
  color: var(--ink-muted);
  font-size: 13px;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.admin-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--primary);
  font-size: 14px;
  letter-spacing: -0.12px;
}

.admin-message.error {
  color: var(--ink-muted);
}

@media (max-width: 833px) {
  .modal-backdrop {
    align-items: flex-start;
    padding: 12px;
  }

  .admin-modal,
  .participant-modal {
    max-height: calc(100dvh - 24px);
    padding: 18px;
    border-radius: 22px;
  }

  .modal-head h2 {
    font-size: 24px;
  }

  .admin-grid.two-cols {
    grid-template-columns: 1fr;
  }

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

  .admin-picker-fields {
    grid-template-columns: 1fr;
  }

  .admin-participant-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-row-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
