:root {
  --bg: #f4f9f0;
  --surface: #ffffff;
  --surface-strong: #eef7e8;
  --text: #18311a;
  --muted: #58715a;
  --border: #d8e8d1;
  --primary: #2d6a2e;
  --primary-strong: #1f4f22;
  --accent: #d4e157;
  --accent-strong: #c0d62f;
  --clay: #c1682e;
  --shadow: 0 18px 50px rgba(33, 73, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(212, 225, 87, 0.35), transparent 22%),
    linear-gradient(180deg, #fbfdf8 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
  background: rgba(31, 79, 34, 0.08);
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.42rem 0;
  backdrop-filter: blur(18px);
  background:
    linear-gradient(90deg, rgba(244, 249, 240, 0.92), rgba(255, 255, 255, 0.74), rgba(244, 249, 240, 0.92));
  border-bottom: 1px solid rgba(216, 232, 209, 0.7);
  box-shadow: 0 10px 32px rgba(31, 79, 34, 0.06);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 22rem;
  font-weight: 800;
  min-height: 2.25rem;
}

.brand span {
  display: none;
}

.brand-logo,
.brand-ball,
.ball,
.google-dot {
  border-radius: 999px;
}

.brand-logo {
  position: absolute;
  left: -0.85rem;
  top: 0.18rem;
  z-index: 2;
  width: 22rem;
  height: 4.6rem;
  margin: 0;
  object-fit: cover;
  object-position: center 52%;
  border-radius: 0;
  filter: drop-shadow(0 0.45rem 0.8rem rgba(31, 79, 34, 0.16));
}

.brand-ball {
  width: 1rem;
  height: 1rem;
  background: radial-gradient(circle at 35% 35%, #f1ff92 0%, var(--accent) 55%, var(--accent-strong) 100%);
  box-shadow: 0 0 0 3px rgba(212, 225, 87, 0.2);
  animation: ballPulse 2.8s ease-in-out infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  inset: 0.35rem 0.45rem;
  z-index: -1;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(212, 225, 87, 0.34), rgba(238, 247, 232, 0.78));
  opacity: 0;
  transform: scaleX(0.82);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-strong);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.nav-link:hover::before,
.nav-link:focus-visible::before,
.nav-link.is-active::before {
  opacity: 1;
  transform: scaleX(1);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-dropdown {
  position: relative;
  padding-bottom: 0.45rem;
  margin-bottom: -0.45rem;
}

.nav-dropdown summary {
  cursor: pointer;
  list-style: none;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-trigger {
  gap: 0.35rem;
  padding-right: 1.65rem;
}

.nav-trigger::after {
  left: auto;
  right: 0.75rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  bottom: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: transparent;
  transform: translateY(-60%) rotate(45deg);
  transform-origin: center;
}

.nav-dropdown:hover .nav-trigger::after,
.nav-dropdown:focus-within .nav-trigger::after,
.nav-dropdown[open] .nav-trigger::after {
  transform: translateY(-35%) rotate(225deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.08rem);
  left: 50%;
  z-index: 30;
  display: grid;
  min-width: 12.5rem;
  padding: 0.55rem;
  border: 1px solid rgba(216, 232, 209, 0.9);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 48px rgba(31, 79, 34, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -0.4rem) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-dropdown:not([open]) > .dropdown-menu {
  display: grid;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown[open] .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.dropdown-link {
  display: flex;
  align-items: center;
  min-height: 2.55rem;
  padding: 0 0.8rem;
  border-radius: 0.8rem;
  color: var(--text);
  font-weight: 700;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dropdown-link:hover,
.dropdown-link:focus-visible,
.dropdown-link.is-active {
  color: var(--primary-strong);
  background: linear-gradient(135deg, rgba(212, 225, 87, 0.34), rgba(238, 247, 232, 0.86));
  transform: translateX(2px);
}

@keyframes ballPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(212, 225, 87, 0.2), 0 0 0 0 rgba(212, 225, 87, 0.34); }
  50% { box-shadow: 0 0 0 3px rgba(212, 225, 87, 0.2), 0 0 0 8px rgba(212, 225, 87, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-ball,
  .nav-link,
  .nav-link::before,
  .nav-link::after,
  .dropdown-menu,
  .dropdown-link,
  .burger span {
    animation: none;
    transition: none;
  }
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.4rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2.8rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: var(--shadow);
}

.button-ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.75);
}

.button-google {
  width: 100%;
  color: var(--text);
  border-color: var(--border);
  background: #fff;
}

.google-dot {
  width: 0.85rem;
  height: 0.85rem;
  background: conic-gradient(#4285f4 0 25%, #34a853 25% 50%, #fbbc05 50% 75%, #ea4335 75% 100%);
}

.flash-stack {
  padding-top: 1rem;
}

.flash {
  margin-bottom: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
}

.flash-success {
  border-color: rgba(45, 106, 46, 0.24);
}

.flash-warning,
.flash-error {
  border-color: rgba(193, 104, 46, 0.28);
}

.hero {
  padding: 4rem 0 2rem;
}

.hero-grid,
.dashboard-grid,
.feature-grid {
  display: grid;
  gap: 1.25rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.84rem;
}

h1,
h2 {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.35rem;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.lead.compact {
  margin-bottom: 1.2rem;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.court-card,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.court-card {
  min-height: 360px;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 50% 20%, rgba(212, 225, 87, 0.16), transparent 24%),
    linear-gradient(180deg, #2f7d32 0%, #1e5a24 100%);
}

.court-thumbnail {
  position: absolute;
  inset: 1.15rem;
  border: 4px solid rgba(255, 255, 255, 0.94);
  border-radius: 1.05rem;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #287b32 0%, #1f6429 100%);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 18px 30px rgba(255, 255, 255, 0.08),
    inset 0 -24px 36px rgba(0, 0, 0, 0.12);
}

.court-thumbnail::before,
.court-thumbnail::after,
.court-baseline,
.court-singles,
.court-service-line,
.court-center-line,
.court-net {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
}

.court-thumbnail::before,
.court-thumbnail::after {
  content: "";
  left: 0;
  right: 0;
  height: 3px;
}

.court-thumbnail::before {
  top: 13%;
}

.court-thumbnail::after {
  bottom: 13%;
}

.court-baseline {
  top: 0;
  bottom: 0;
  width: 3px;
}

.court-baseline.top {
  left: 14%;
}

.court-baseline.bottom {
  right: 14%;
}

.court-singles {
  left: 14%;
  right: 14%;
  height: 3px;
}

.court-singles.left {
  top: 25%;
}

.court-singles.right {
  bottom: 25%;
}

.court-service-line {
  top: 25%;
  bottom: 25%;
  width: 3px;
}

.court-service-line.top {
  left: 36%;
}

.court-service-line.bottom {
  right: 36%;
}

.court-center-line {
  left: 36%;
  right: 36%;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
}

.court-net {
  left: 50%;
  top: -4%;
  bottom: -4%;
  width: 5px;
  transform: translateX(-50%);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.92) 0 8px, rgba(255, 255, 255, 0.34) 8px 11px),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.32);
}

.ball {
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  background: radial-gradient(circle at 35% 35%, #f1ff92 0%, var(--accent) 55%, var(--accent-strong) 100%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.ball-a {
  right: 2rem;
  top: 2rem;
}

.ball-b {
  left: 2rem;
  bottom: 5.5rem;
}

.court-caption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  display: grid;
  gap: 0.4rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
}

.section {
  padding: 1.5rem 0 3rem;
}

.feature-grid,
.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 1.4rem;
}

.narrow-section {
  padding-top: 3rem;
}

.narrow-container {
  width: min(520px, calc(100% - 2rem));
}

.login-panel {
  padding: 2rem;
}

.profile-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-strong);
}

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
}

.chip-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--primary-strong);
  font-weight: 700;
}

.plain-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.8;
}

.plain-list a {
  color: var(--primary-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.dashboard-shell {
  display: grid;
  gap: 1rem;
}

.dashboard-grid-main {
  align-items: stretch;
}

.dashboard-grid-secondary {
  grid-template-columns: 2fr 1fr 1fr;
}

.dashboard-wide-panel {
  grid-row: span 2;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.win-rate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.8rem;
  min-height: 4.8rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f1ff92 0%, var(--accent) 44%, var(--primary) 100%);
  color: var(--primary-strong);
  font-size: 1.35rem;
  box-shadow: 0 16px 36px rgba(45, 106, 46, 0.18);
}

.record-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.record-stat-grid div {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(238, 247, 232, 0.72);
}

.record-stat-grid span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.record-stat-grid strong {
  color: var(--primary-strong);
  font-size: 1.45rem;
}

.record-bar {
  display: flex;
  min-height: 2.4rem;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px rgba(216, 232, 209, 0.9);
}

.record-bar-win,
.record-bar-loss,
.record-bar-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  padding: 0 0.9rem;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.record-bar-win {
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
}

.record-bar-loss {
  background: linear-gradient(90deg, #bd6a3b, var(--clay));
}

.record-bar-empty {
  width: 100%;
  color: var(--muted);
  background: var(--surface-strong);
}

.next-match-card,
.my-competition-card,
.match-result-row {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 232, 0.78));
}

.next-match-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
}

.next-match-card span,
.my-competition-card span,
.match-result-row span {
  color: var(--muted);
}

.match-result-list,
.my-competition-list,
.quick-card-list {
  display: grid;
  gap: 0.75rem;
}

.match-result-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
}

.match-result-row div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.match-result-row strong,
.match-result-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  min-height: 2rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--surface-strong);
  font-weight: 900;
}

.result-win {
  color: #fff;
  background: var(--primary);
}

.result-loss {
  color: #fff;
  background: var(--clay);
}

.result-bye {
  background: var(--accent);
}

.my-competition-card,
.quick-card-list a {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
}

.quick-card-list a {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(238, 247, 232, 0.72);
  color: var(--primary-strong);
  font-weight: 800;
}

.next-action-panel {
  display: grid;
  gap: 0.85rem;
  align-content: center;
  padding: 2rem;
}

.next-action-panel p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.home-section {
  padding-top: 1rem;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-stats-panel,
.home-wide-panel {
  grid-column: span 2;
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.home-stat-grid div {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(238, 247, 232, 0.72);
}

.home-stat-grid span,
.home-info-card span,
.home-result-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

.home-stat-grid strong {
  color: var(--primary-strong);
  font-size: 1.65rem;
}

.home-list-panel .panel-title-row a {
  color: var(--primary-strong);
  font-weight: 800;
}

.home-card-list,
.home-result-list {
  display: grid;
  gap: 0.75rem;
}

.home-info-card,
.home-result-row {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 232, 0.78));
}

.home-info-card strong,
.home-result-row strong {
  color: var(--primary-strong);
}

.home-flow-panel {
  display: grid;
  gap: 1rem;
}

.home-flow-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
  font-weight: 800;
}

.message-link {
  color: var(--primary-strong);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  white-space: nowrap;
}

.message-thread-list {
  display: grid;
  gap: 0.75rem;
}

.message-thread {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(238, 247, 232, 0.9), rgba(255, 255, 255, 0.92));
  color: var(--text);
}

.message-thread span {
  color: var(--muted);
  font-size: 0.92rem;
}

.match-message-header,
.match-message-panel,
.match-message-compose {
  margin-top: 1rem;
}

.message-list {
  display: grid;
  gap: 0.9rem;
}

.message-item {
  display: grid;
  gap: 0.45rem;
  max-width: 44rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
}

.message-item.is-own {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(238, 247, 232, 0.96), rgba(255, 255, 255, 0.96));
}

.message-item.is-deleted {
  opacity: 0.72;
}

.message-item p {
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
}

.message-meta strong {
  color: var(--primary-strong);
}

.muted-text {
  color: var(--muted);
  line-height: 1.65;
}

.table-wrap {
  overflow-x: auto;
}

.schedule-table {
  min-width: 1080px;
}

.schedule-table th:nth-child(1),
.schedule-table td:nth-child(1) {
  width: 6rem;
  white-space: nowrap;
}

.schedule-table th:nth-child(2),
.schedule-table td:nth-child(2),
.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) {
  width: 4rem;
  text-align: center;
  white-space: nowrap;
}

.schedule-table th:nth-child(4),
.schedule-table td:nth-child(4) {
  min-width: 13rem;
}

.schedule-table th:nth-child(8),
.schedule-table td:nth-child(8) {
  width: 5rem;
  white-space: nowrap;
}

.schedule-edit-row td {
  padding-top: 0.35rem;
  background: rgba(238, 247, 232, 0.3);
}

.schedule-edit-form {
  display: grid;
  grid-template-columns: 5rem 5rem 5rem minmax(10rem, 1fr) minmax(10rem, 1fr) minmax(10rem, 1fr) minmax(12rem, 1fr) minmax(10rem, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.schedule-edit-form .note-input,
.schedule-edit-form .note-input-wide {
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── 手機（860px）─────────────────────────────────── */

@media (max-width: 860px) {
  .hero-grid,
  .feature-grid,
  .help-grid,
  .help-grid.two-col {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dashboard-grid-secondary {
    grid-template-columns: 1fr;
  }

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

  .home-stats-panel,
  .home-wide-panel {
    grid-column: auto;
  }

  .next-action-panel {
    padding: 1.4rem;
  }

  .dashboard-wide-panel {
    grid-row: auto;
  }

  .record-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-result-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .match-result-row strong,
  .match-result-row span {
    white-space: normal;
  }

  .competition-form-grid {
    grid-template-columns: 1fr;
  }

  .nav-shell {
    flex-wrap: wrap;
  }

  .brand {
    width: min(22rem, calc(100% - 3.75rem));
  }

  .brand-logo {
    width: min(22rem, calc(100vw - 4.75rem));
  }

  .burger {
    display: flex;
  }

  .nav-links {
    display: flex;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0;
    border-top: 1px solid var(--border);
    transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.22s ease;
  }

  .nav-links > * {
    width: 100%;
  }

  .nav-links.nav-open {
    max-height: 80vh;
    opacity: 1;
    padding: 0.75rem 0 0.5rem;
  }

  .nav-link {
    justify-content: center;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
  }

  .nav-dropdown {
    display: block;
    width: 100%;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .nav-dropdown summary {
    display: block;
    width: 100%;
  }

  .nav-trigger {
    width: 100%;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 2rem 0.75rem 1rem;
  }

  .dropdown-menu {
    left: auto !important;
    right: auto !important;
    position: static !important;
    display: grid;
    min-width: 0;
    width: 100% !important;
    max-width: none;
    margin-top: 0.35rem;
    padding: 0.35rem;
    border-radius: 1rem;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none !important;
    justify-items: stretch;
  }

  .nav-dropdown:not([open]) .dropdown-menu {
    display: none;
  }

  .nav-dropdown[open] .dropdown-menu {
    display: grid;
  }

  .dropdown-link {
    justify-content: center;
    width: 100%;
    min-height: 2.8rem;
    padding: 0.65rem 0.8rem;
    text-align: center;
    white-space: normal;
  }

  .nav-links .button {
    width: 100%;
    justify-content: center;
    margin-top: 0.25rem;
    min-height: 3rem;
  }

  .hero {
    padding-top: 2rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .page-header .button {
    width: 100%;
    justify-content: center;
  }

  /* 表格卡片化 */
  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
  }

  .responsive-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(216, 232, 209, 0.5);
    font-size: 0.95rem;
  }

  .responsive-table tbody td:last-child {
    border-bottom: none;
  }

  .responsive-table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 0.05rem;
  }

  /* Collapsible rows：預設只顯示第一欄，點擊展開 */
  .collapsible tbody tr {
    cursor: pointer;
    user-select: none;
  }

  .collapsible tbody td:not(:first-child) {
    display: none;
  }

  .collapsible tbody tr.expanded td:not(:first-child) {
    display: flex;
  }

  .row-chevron {
    margin-left: auto;
    font-size: 1.1rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
  }

  .action-cell {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .action-cell::before {
    display: none;
  }

  .inline-form {
    flex-wrap: wrap;
  }

  .note-input {
    width: 100%;
    flex: 1 1 100%;
  }

  .schedule-table {
    min-width: 0;
  }

  .schedule-table th,
  .schedule-table td {
    width: auto;
    min-width: 0;
    text-align: left;
  }

  .schedule-edit-row td {
    display: block;
  }

  .schedule-edit-row td::before {
    content: "修改";
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
  }

  .schedule-edit-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .draw-summary {
    grid-template-columns: 1fr;
  }

  .draw-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setup-panel {
    padding: 1.25rem;
  }

  .map-preview {
    height: 220px;
  }
}

/* ── 超小螢幕（480px）──────────────────────────────── */

@media (max-width: 480px) {
  h1 {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }

  .panel {
    border-radius: 1.1rem;
    padding: 1.1rem;
  }

  .section {
    padding: 1rem 0 2rem;
  }

  .narrow-section {
    padding-top: 1.5rem;
  }

  .avatar {
    width: 3.5rem;
    height: 3.5rem;
  }

  .chip {
    font-size: 0.82rem;
    min-height: 1.9rem;
    padding: 0 0.7rem;
  }

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

  .form-input,
  .form-select {
    font-size: 1rem;
    padding: 0.75rem 0.85rem;
  }

  .button {
    min-height: 3rem;
  }

  .map-preview {
    height: 180px;
  }
}

/* ── Forms ─────────────────────────────────────────── */

.setup-panel {
  padding: 2rem;
}

.setup-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.required {
  color: var(--clay);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 46, 0.12);
}

.radio-group {
  display: flex;
  gap: 1.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
}

.radio-label input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--primary);
}

.form-submit {
  width: 100%;
  margin-top: 0.5rem;
}

.question-block {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.55);
}

.question-block legend {
  padding: 0 0.35rem;
  font-weight: 800;
}

.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.75rem;
  line-height: 1.55;
  cursor: pointer;
}

.radio-row input {
  margin-top: 0.25rem;
  accent-color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.competition-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.process-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  overflow-x: auto;
}

.process-tab {
  flex: 0 0 auto;
  min-height: 2.6rem;
  padding: 0 1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.process-tab:hover,
.process-tab:focus-visible,
.process-tab.is-active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(45, 106, 46, 0.18);
}

.process-tab-panel[hidden] {
  display: none;
}

.process-tab-panel h2 {
  margin-top: 0;
}

.competition-format-table {
  table-layout: fixed;
}

.competition-format-table th:first-child,
.competition-format-table td:first-child {
  width: 44%;
}

.competition-format-table th:nth-child(2),
.competition-format-table td:nth-child(2),
.competition-format-table th:nth-child(3),
.competition-format-table td:nth-child(3),
.competition-format-table th:nth-child(4),
.competition-format-table td:nth-child(4) {
  width: 18.66%;
}

.competition-row.is-odd td {
  background: rgba(255, 255, 255, 0.72);
}

.competition-row.is-even td {
  background: rgba(238, 247, 232, 0.42);
}

.competition-row.operation-detail-row td {
  border-top: none;
}

.compact-form textarea {
  min-height: 5rem;
}

/* ── Help page ──────────────────────────────────────── */

.help-container {
  width: min(1400px, calc(100% - 2rem));
}

.help-flow {
  margin-bottom: 1.25rem;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

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

.role-card h2 {
  margin: 0.75rem 0 0.75rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1rem 1rem 3.1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.58);
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.step-list strong,
.step-list span {
  display: block;
}

.step-list span {
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 860px) {
  .help-grid,
  .help-grid.two-col,
  .step-list {
    grid-template-columns: 1fr;
  }

  .help-container {
    width: min(100% - 1rem, 100%);
  }

  .role-card h2 {
    font-size: 1.45rem;
    line-height: 1.25;
  }
}

/* ── Map preview ────────────────────────────────────── */

.map-preview {
  width: 100%;
  height: 280px;
  margin-top: 0.3rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

/* ── Venues ─────────────────────────────────────────── */

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-left: 0.5cm;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin-bottom: 0;
}

.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.venue-card {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.venue-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.venue-name {
  font-size: 1.1rem;
  margin: 0;
}

.venue-address {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.venue-map-link {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

.venue-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.competition-progress {
  font-weight: 800;
  color: var(--primary-strong);
}

.chip-county {
  background: rgba(45, 106, 46, 0.1);
  color: var(--primary-strong);
  white-space: nowrap;
}

.chip-approved {
  background: rgba(45, 106, 46, 0.12);
  color: var(--primary-strong);
}

.chip-rejected {
  background: rgba(193, 104, 46, 0.12);
  color: var(--clay);
}

.empty-state {
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* ── Admin venue table ──────────────────────────────── */

.inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.inline-form.no-margin {
  margin-bottom: 0;
}

.operation-steps {
  display: grid;
  gap: 0.55rem;
}

.operation-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.operation-row-single {
  row-gap: 0.65rem;
}

.operation-row-single .button,
.operation-row-single button {
  min-height: 2.6rem;
  min-width: 8.75rem;
  justify-content: center;
  text-align: center;
}

.operation-row-single .form-select {
  min-height: 2.6rem;
}

.operation-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.operation-select {
  width: 150px;
}

.operation-detail-row td {
  padding-top: 0.9rem;
  padding-bottom: 1.15rem;
  border-top: none;
  border-bottom: 1px solid var(--border);
}

.operation-detail-row .operation-steps {
  width: 100%;
}

.note-input {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  width: 140px;
}

.note-input-wide {
  width: 220px;
}

/* ── Competition bracket and draw ────────────────────── */

.bracket-scroll,
.matrix-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
}

.compact-bracket {
  margin-bottom: 1rem;
}

.bracket-section + .bracket-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.bracket-round-labels {
  position: relative;
  height: 2rem;
  min-width: max-content;
  margin: 0 auto 0.7rem;
}

.bracket-round-labels h4 {
  position: absolute;
  top: 0;
  width: 110px;
  margin: 0;
  color: var(--primary-strong);
}

.bracket-map {
  position: relative;
  min-width: max-content;
  margin: 0 auto;
}

.bracket-card {
  position: absolute;
  z-index: 2;
  width: 110px;
  height: 112px;
  padding: 0.5rem 0.45rem;
  border: 1px solid rgba(88, 113, 90, 0.24);
  border-radius: 0.8rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 232, 0.84));
  box-shadow: 0 12px 26px rgba(33, 73, 34, 0.1);
}

.bracket-card.is-placeholder {
  color: var(--muted);
  background: rgba(238, 247, 232, 0.72);
  border-style: dashed;
}

.bracket-card-meta,
.bracket-card-result {
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
}

.bracket-card-player {
  min-height: 1.45rem;
  margin-top: 0.16rem;
  padding: 0.18rem 0.3rem;
  border: 1px solid rgba(216, 232, 209, 0.9);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-card-player.is-winner {
  border-color: rgba(214, 33, 33, 0.42);
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.96);
}

.bracket-card-vs {
  margin-top: 0.04rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.bracket-card-result {
  margin-top: 0.18rem;
}

.bracket-connector {
  position: absolute;
  z-index: 1;
  background: rgba(88, 113, 90, 0.55);
}

.bracket-connector.horizontal {
  transform: translateY(-1px);
}

.bracket-connector.vertical {
  transform: translateX(-1px);
}

.tournament-bracket {
  --node-width: 250px;
  --node-height: 116px;
  --line-length: 3.5rem;
  --line-color: #9aa89a;
  --win-line: #d62121;
  display: flex;
  align-items: flex-start;
  gap: var(--line-length);
  min-width: max-content;
  padding: 0.75rem calc(var(--line-length) + 0.5rem) 1.5rem 0;
}

.tournament-round {
  display: flex;
  flex-direction: column;
  gap: var(--round-gap, 1rem);
  min-width: var(--node-width);
}

.tournament-round h4 {
  margin: 0 0 1rem;
  color: var(--primary-strong);
}

.tournament-round:nth-child(1) {
  --round-gap: 1.25rem;
  --round-offset: 0;
  --connector-span: 4.25rem;
}

.tournament-round:nth-child(2) {
  --round-gap: 9.75rem;
  --round-offset: 4.25rem;
  --connector-span: 8.5rem;
}

.tournament-round:nth-child(3) {
  --round-gap: 26.75rem;
  --round-offset: 12.75rem;
  --connector-span: 17rem;
}

.tournament-round:nth-child(4) {
  --round-gap: 60.75rem;
  --round-offset: 29.75rem;
  --connector-span: 34rem;
}

.tournament-round:nth-child(5) {
  --round-gap: 128.75rem;
  --round-offset: 63.75rem;
  --connector-span: 68rem;
}

.tournament-round .tournament-match:first-of-type {
  margin-top: var(--round-offset, 0);
}

.tournament-match {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.35rem;
  width: var(--node-width);
  min-height: var(--node-height);
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(88, 113, 90, 0.22);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 232, 0.82));
  box-shadow: 0 12px 26px rgba(33, 73, 34, 0.1);
}

.tournament-match::before,
.tournament-match::after {
  content: "";
  position: absolute;
  background: var(--line-color);
  pointer-events: none;
}

.tournament-match::before {
  left: 100%;
  width: var(--line-length);
  top: 50%;
  height: 2px;
}

.tournament-match::after {
  left: calc(100% + var(--line-length));
  top: 50%;
  width: 2px;
  height: var(--connector-span);
  transform-origin: top;
}

.tournament-match:not(.has-next)::before,
.tournament-match:not(.has-next)::after {
  display: none;
}

.tournament-match.has-winner::before,
.tournament-match.has-winner::after {
  background: var(--win-line);
}

.tournament-match:nth-of-type(even)::after {
  top: auto;
  bottom: 50%;
  transform-origin: bottom;
}

.tournament-match.is-placeholder {
  color: var(--muted);
  background: rgba(238, 247, 232, 0.72);
  border-style: dashed;
}

.tournament-match-meta,
.tournament-result {
  position: relative;
  z-index: 1;
  color: var(--clay);
  font-size: 0.86rem;
  font-weight: 700;
}

.tournament-player {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(216, 232, 209, 0.9);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-weight: 800;
}

.tournament-player.is-winner {
  border-color: rgba(214, 33, 33, 0.42);
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-strong);
}

.winner-mark {
  color: #1e55c8;
  font-size: 0.82rem;
  font-weight: 900;
}

.tournament-result {
  text-align: right;
}

.round-robin-matrix {
  min-width: 720px;
  width: 100%;
  border-collapse: collapse;
}

.round-robin-matrix th,
.round-robin-matrix td {
  padding: 0.75rem;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.round-robin-matrix th {
  background: var(--surface-strong);
  color: var(--primary-strong);
}

.draw-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.5fr);
  gap: 1rem;
  align-items: start;
}

.draw-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(0, 2fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.draw-summary-main,
.draw-summary-stats div {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(238, 247, 232, 0.52);
}

.draw-summary-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-color: rgba(45, 106, 46, 0.28);
  background: linear-gradient(135deg, rgba(238, 247, 232, 0.95), rgba(255, 255, 255, 0.84));
}

.draw-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.draw-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.draw-summary strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--primary-strong);
}

.draw-summary-main strong {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.draw-summary-main em {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 0.6rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(45, 106, 46, 0.12);
  color: var(--primary-strong);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 800;
}

.draw-summary-stats strong {
  font-size: 1.25rem;
}

.draw-player-list {
  display: grid;
  gap: 0.6rem;
}

.bye-player-list {
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  border: 1px dashed rgba(193, 104, 46, 0.42);
  border-radius: 1rem;
  background: rgba(238, 247, 232, 0.48);
}

.draw-count {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.draw-player,
.draw-slot {
  position: relative;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.8);
  font-weight: 800;
}

.draw-player {
  padding-left: 3rem;
}

.draw-player-no {
  position: absolute;
  left: 0.85rem;
  top: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--primary-strong);
  font-size: 0.76rem;
  font-weight: 900;
}

.draw-player span,
.draw-slot-label {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.draw-player .draw-player-no {
  display: inline-flex;
  margin-top: 0;
  color: var(--primary-strong);
  font-size: 0.76rem;
  font-weight: 900;
}

.draw-player.is-drawn {
  opacity: 0;
}

.draw-player.is-bye {
  border-color: rgba(193, 104, 46, 0.42);
  background: rgba(238, 247, 232, 0.86);
}

.empty-bye-note {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 700;
}

.draw-status {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--primary-strong);
  font-weight: 800;
}

.draw-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 0.75rem;
}

.draw-slots.is-round-robin {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.draw-slot {
  min-height: 5rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.draw-slot.is-active {
  border-color: var(--accent-strong);
  background: rgba(212, 225, 87, 0.22);
  box-shadow: 0 0 0 4px rgba(212, 225, 87, 0.16);
  transform: translateY(-3px);
}

.draw-slot.is-shuffling {
  border-color: rgba(193, 104, 46, 0.55);
  background: linear-gradient(135deg, rgba(238, 247, 232, 0.95), rgba(255, 255, 255, 0.9));
}

.draw-slot.is-filled {
  border-color: rgba(45, 106, 46, 0.28);
  background: rgba(238, 247, 232, 0.9);
}

.draw-actions {
  margin-top: 1rem;
}

.draw-actions-top {
  margin-top: 0;
  margin-bottom: 0.55rem;
}

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

  .draw-slots {
    grid-template-columns: 1fr;
  }
}

.button-approve {
  padding: 0 0.8rem;
  min-height: 2.2rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
}

.button-reject {
  padding: 0 0.8rem;
  min-height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(193, 104, 46, 0.4);
  background: transparent;
  color: var(--clay);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
}

.button-test {
  padding: 0 0.8rem;
  min-height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 225, 87, 0.75);
  background: rgba(212, 225, 87, 0.2);
  color: var(--primary-strong);
  font-weight: 800;
  cursor: pointer;
  font-size: 0.85rem;
}

.button-test:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-hint {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.gps-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.75rem;
  background: var(--surface-strong);
  font-size: 0.88rem;
  color: var(--muted);
  font-family: monospace;
}

.gps-badge {
  font-style: normal;
  font-family: inherit;
  font-weight: 700;
  color: var(--primary);
}

.profile-login-time {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.map-tiny-link {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

/* ── Address autocomplete dropdown ─────────────────── */

.address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(33, 73, 34, 0.12);
  overflow: hidden;
}

.suggestion-item {
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font-size: 0.93rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(216, 232, 209, 0.5);
  transition: background 0.1s;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: var(--surface-strong);
}
