:root {
  color-scheme: dark;
  --night: #160832;
  --court: #1e0c47;
  --court-raised: #28115a;
  --court-line: #492882;
  --court-soft: #321865;
  --cyan: #14d8e8;
  --cyan-surface: #14d8e8;
  --cyan-dark: #061333;
  --lemon: #ffe46b;
  --pink: #ff7293;
  --ink: #fff9e7;
  --muted: #b7a7d0;
  --subtle: #8f7daa;
  --radius-card: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", "Noto Sans TC", sans-serif;
  background: var(--night);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--night); }
body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(64, 24, 130, .42), transparent 46rem),
    var(--night);
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--lemon);
  outline-offset: 3px;
}
a { color: inherit; }

.phone-shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin-inline: auto;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 0 27px, rgba(125, 77, 193, .07) 28px 29px, transparent 30px 100%),
    var(--night);
  box-shadow: 0 0 0 1px rgba(159, 120, 224, .12), 0 0 90px rgba(8, 3, 24, .4);
}
.app-header {
  min-height: 66px;
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: max(10px, env(safe-area-inset-top)) 20px 10px;
  border-bottom: 1px solid rgba(161, 130, 212, .12);
  background: rgba(22, 8, 50, .94);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.brand img { display: block; width: 132px; height: 66px; object-fit: contain; }
.brand small { display: block; color: var(--muted); font-size: 10px; line-height: 1.3; }
.page-content {
  min-height: calc(100dvh - 145px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px 20px calc(115px + env(safe-area-inset-bottom));
}
.page-content:focus { outline: none; }
.page-header { min-width: 0; }
.page-title { margin: 0; font-size: 28px; line-height: 1.18; letter-spacing: -.035em; }
.page-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 25px 0 12px;
}
.section-title h2 { margin: 0; font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 760;
  text-align: center;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, background .16s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { color: var(--cyan-dark); background: var(--cyan-surface); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { border: 1px solid var(--court-line); color: var(--ink); background: rgba(16, 6, 39, .46); }
.btn-subtle { min-height: 40px; padding-inline: 11px; border: 1px solid var(--court-line); color: var(--muted); background: transparent; font-size: 12px; }
.btn-danger { color: #ffd9e1; border: 1px solid rgba(255, 114, 147, .4); background: rgba(128, 27, 65, .3); }
.btn-wide { width: 100%; }
.deletion-cleanup-pending .btn + .btn { margin-top: 8px; }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }

.home-announcements > .section-title { margin: 0 0 12px; }
.announcement-list { display: grid; gap: 10px; }
.announcement-card {
  overflow: hidden;
  border: 1px solid rgba(150, 112, 208, .3);
  border-radius: 18px;
  background: linear-gradient(145deg, #281259, #21104d);
}
.announcement-image-button {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.announcement-image-button:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; border-radius: 16px; }
.announcement-image-button:hover .announcement-image { filter: brightness(1.07); }
.announcement-image {
  width: 100%;
  aspect-ratio: 16 / 7;
  display: block;
  object-fit: cover;
  background: #2d155b;
}
.announcement-placeholder {
  aspect-ratio: 16 / 7;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 15px;
  border-bottom: 1px solid rgba(161, 130, 212, .15);
  background:
    linear-gradient(90deg, transparent 0 24px, rgba(20, 216, 232, .12) 25px 26px, transparent 27px 100%),
    var(--court-soft);
}
.announcement-placeholder .mini-shuttle { width: 34px; height: 34px; flex: 0 0 auto; color: var(--cyan); }
.announcement-body { padding: 13px 15px 15px; }
.announcement-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; color: var(--cyan); font-size: 11px; font-weight: 700; }
.announcement-meta .preview-pill { color: var(--night); background: var(--lemon); }
.announcement-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.announcement-link { display: inline-block; margin-top: 10px; color: var(--lemon); font-size: 12px; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.announcement-modal .modal-top { align-items: center; }
.announcement-modal-date { margin: 0 0 4px; color: var(--cyan); font-size: 11px; font-weight: 700; }
.announcement-modal .modal-top h2 { font-size: 19px; line-height: 1.4; }
.announcement-modal-image { width: 100%; aspect-ratio: 16 / 7; display: block; border-radius: 14px; object-fit: cover; background: #2d155b; }
.announcement-modal-content { padding-top: 14px; }
.announcement-modal-content > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.announcement-modal-content > p.empty-note { padding: 12px; }
.empty-note {
  padding: 18px 15px;
  border: 1px dashed rgba(150, 112, 208, .38);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(34, 12, 75, .42);
  font-size: 13px;
  line-height: 1.55;
}
ins.adsbygoogle[data-ad-status="unfilled"],
ins.adsbygoogle[data-ad-status="unfill-optimized"] { display: none !important; }
.member-id-home-copy { min-width: 0; display: grid; gap: 4px; }
.member-id-home-copy strong { font-size: 13px; }
.member-id-home-copy code { color: var(--lemon); font: 750 17px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .09em; }
.friend-id-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 0 15px; margin: -2px 0 15px; border-bottom: 1px solid rgba(161, 130, 212, .18); }
.friend-id-row .btn { min-height: 42px; padding-inline: 11px; font-size: 11px; white-space: nowrap; }
.friend-id-row .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.finished-rooms > .section-title { margin: 0 0 12px; }
.ended-room-list { display: grid; gap: 8px; }
.ended-room {
  width: 100%; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 15px; border: 1px solid rgba(136, 95, 197, .32); border-radius: 15px; color: var(--ink);
  background: var(--court-raised); text-align: left; cursor: pointer;
}
.ended-room:hover { border-color: rgba(20, 216, 232, .52); }
.ended-room-info, .ended-room-result { min-width: 0; display: grid; gap: 5px; }
.ended-room-info strong { font-size: 14px; }
.ended-room-info small, .ended-room-result small { color: var(--muted); font-size: 11px; }
.ended-room-result { justify-items: end; }
.ended-room-result strong { color: var(--lemon); font-size: 16px; font-variant-numeric: tabular-nums; }
.return-to-rooms { align-self: flex-start; }

.panel {
  padding: 18px;
  border: 1px solid rgba(136, 95, 197, .32);
  border-radius: var(--radius-card);
  background: linear-gradient(150deg, rgba(42, 17, 91, .93), rgba(29, 11, 68, .95));
  box-shadow: 0 14px 30px rgba(7, 2, 21, .12);
}
.panel h2, .panel h3 { margin: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.panel-heading h2 { font-size: 19px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.panel-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(20, 216, 232, .38);
  border-radius: 13px;
  color: var(--cyan);
  background: rgba(20, 216, 232, .08);
  font-size: 18px;
  font-weight: 800;
}
.member-accordion,
.member-disclosure { overflow: hidden; }
.member-accordion > summary,
.member-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.member-accordion > summary::-webkit-details-marker,
.member-disclosure > summary::-webkit-details-marker { display: none; }
.member-accordion > summary::after,
.member-disclosure > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}
.member-accordion[open] > summary::after,
.member-disclosure[open] > summary::after { content: "−"; }
.member-accordion > summary:focus-visible,
.member-disclosure > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; }
.member-accordion-summary { min-height: 66px; padding: 15px 18px; }
.member-accordion-summary h2 { margin: 0; font-size: 16px; line-height: 1.3; }
.member-accordion-summary small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.member-accordion-content { padding: 16px 18px 18px; border-top: 1px solid rgba(168, 137, 211, .18); }
.member-accordion-content > :first-child { margin-top: 0; }
.member-accordion-content > :last-child { margin-bottom: 0; }
.member-card-static { padding: 0; }
.member-card-static .member-card-top { padding: 15px 16px; }
.member-card-content { padding: 15px 16px 16px; border-top: 1px solid rgba(168, 137, 211, .18); }
.member-rules { display: grid; gap: 0; padding: 0; }
.member-rules-content { display: grid; gap: 9px; padding: 14px 18px 18px; border-top: 1px solid rgba(168, 137, 211, .18); }
.member-bottom-actions { display: grid; gap: 9px; }
.member-bottom-actions .btn-danger { min-height: 46px; }
.member-bottom-actions .fine-print { margin: 3px 0 0; text-align: center; }
.member-disclosure { border: 1px solid rgba(136, 95, 197, .32); border-radius: 16px; background: linear-gradient(150deg, rgba(42, 17, 91, .83), rgba(29, 11, 68, .9)); }
.member-disclosure > summary { min-height: 62px; padding: 12px 14px; }
.member-disclosure-summary-copy { min-width: 0; display: grid; gap: 4px; }
.member-disclosure-summary-copy strong { color: var(--ink); font-size: 13px; line-height: 1.35; }
.member-disclosure-summary-copy small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.member-disclosure-content { padding: 13px 14px 15px; border-top: 1px solid rgba(168, 137, 211, .16); color: var(--muted); font-size: 12px; line-height: 1.65; }
.member-disclosure-content p { margin: 0 0 10px; }
.member-disclosure-content ul { display: grid; gap: 7px; margin: 0 0 10px; padding-left: 19px; }
.member-disclosure-content li { padding-left: 2px; }
.member-disclosure-alert { padding: 10px 11px; border: 1px solid rgba(255, 228, 107, .25); border-radius: 11px; color: #e8d992; background: rgba(255, 228, 107, .055); }
.format-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 5px;
  border-radius: 17px;
  background: rgba(14, 5, 35, .67);
}
.format-choice {
  min-height: 82px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.format-choice .format-icon { display: block; width: 39px; height: 39px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(6, 0, 30, .42)); }
.format-choice.is-selected { color: var(--cyan-dark); background: var(--cyan-surface); }
.format-choice small { color: inherit; opacity: .78; font-size: 10px; font-weight: 650; }
.match-setup > .panel-heading { margin-bottom: 12px; }
.match-stepper { display: flex; align-items: center; gap: 7px; margin: 7px 0 19px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.match-stepper span { display: inline-flex; align-items: center; gap: 5px; }
.match-stepper b { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--court-line); border-radius: 50%; font-size: 10px; }
.match-stepper .is-current { color: var(--ink); }
.match-stepper .is-current b { color: var(--cyan-dark); border-color: var(--cyan-surface); background: var(--cyan-surface); }
.match-stepper i { height: 1px; min-width: 9px; flex: 1; background: var(--court-line); }
.form-section-label { display: block; margin: 0 0 9px; color: var(--muted); font-size: 12px; font-weight: 750; }
.pairing-mode { margin-top: 21px; }
.pairing-mode h3 { margin: 0; font-size: 17px; }
.pairing-mode > p { margin: 5px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.pairing-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pairing-mode-choice { min-height: 76px; padding: 11px 12px; border: 1px solid var(--court-line); border-radius: 14px; color: var(--ink); background: rgba(11, 4, 29, .4); text-align: left; cursor: pointer; }
.pairing-mode-choice strong, .pairing-mode-choice small { display: block; }
.pairing-mode-choice strong { font-size: 12px; line-height: 1.35; }
.pairing-mode-choice small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.pairing-mode-choice.is-selected { border-color: var(--cyan); background: rgba(20, 216, 232, .08); box-shadow: inset 0 0 0 1px rgba(20, 216, 232, .12); }
.pairing-mode-choice.is-selected strong span { color: var(--cyan); }
.input-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.input-label strong { color: var(--ink); font-size: 12px; }
.input-label small { color: var(--muted); font-size: 10px; }
.pairing-code-input { min-height: 52px; font-size: 16px; font-weight: 750; letter-spacing: .15em; }
.pairing-code-card { margin-top: 12px; padding: 13px; border: 1px solid rgba(20, 216, 232, .3); border-radius: 14px; background: rgba(20, 216, 232, .08); }
.pairing-code-card > small { color: var(--muted); font-size: 10px; }
.pairing-code-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.pairing-code-card code { color: var(--lemon); font: 800 25px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .17em; }
.team-management { margin-top: 18px; border-top: 1px solid rgba(161, 130, 212, .16); padding-top: 14px; }
.team-management summary { color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.team-management .team-list { margin-top: 12px; }
.team-first-note { margin-top: 15px; }
.rule-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-row { display: grid; gap: 7px; margin-top: 13px; }
.form-row label { color: var(--muted); font-size: 12px; }
.announcement-submit-actions { display: grid; gap: 8px; margin-top: 8px; }
.direct-team-result { margin-top: 18px; }
.direct-team-result .form-section-label { margin-bottom: 8px; color: var(--ink); }
.direct-team-result .pairing-mode { margin-top: 22px; }
.direct-score-form { gap: 9px; }
.team-selection-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; margin-top: 12px; padding: 11px 13px; border-left: 2px solid var(--cyan); border-radius: 0 11px 11px 0; background: rgba(20, 216, 232, .05); }
.team-selection-summary small { color: var(--muted); font-size: 10px; }
.team-selection-summary strong { color: var(--ink); font-size: 13px; }
.team-selection-summary span { color: var(--muted); font-size: 11px; }
.friend-request-row { align-items: center; }
.friend-request-row .team-actions { justify-content: flex-end; }
.input, .textarea, .select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--court-line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(11, 4, 28, .6);
}
.textarea { min-height: 115px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--subtle); }
.select option { color: var(--ink); background: var(--court); }
.segmented {
  min-height: 43px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--court-raised);
}
.segmented button {
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.segmented button.is-selected { color: var(--cyan-dark); background: var(--cyan-surface); font-weight: 760; }
.form-help { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.panel-actions { display: grid; gap: 9px; margin-top: 15px; }

.status-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lemon); }
.status-dot.is-good { background: var(--cyan); }
.status-dot.is-bad { background: var(--pink); }
.room-card { margin-top: 0; }
.room-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.room-top h2 { margin: 0; font-size: 20px; }
.room-code { margin-top: 5px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.room-state {
  padding: 6px 9px;
  border: 1px solid rgba(255, 228, 107, .35);
  border-radius: 999px;
  color: var(--lemon);
  background: rgba(255, 228, 107, .08);
  font-size: 10px;
  white-space: nowrap;
}
.room-players { display: grid; gap: 7px; margin-top: 13px; }
.room-player-wrap { display: grid; gap: 5px; }
.room-player {
  min-height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(159, 126, 210, .19);
  border-radius: 13px;
  background: rgba(10, 4, 28, .31);
}
.room-player strong { display: block; font-size: 13px; }
.room-player small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.room-player .slot-label { color: var(--cyan); font-size: 10px; }
.room-player-actions { display: flex; align-items: center; gap: 6px; }
.room-id-invite { margin: 0 0 0 10px; grid-template-columns: 1fr auto; align-items: center; }
.room-id-invite label { grid-column: 1 / -1; }
.room-id-invite .input { min-width: 0; min-height: 42px; }
.room-id-invite .btn { min-height: 42px; }
.qr-wrap { display: grid; place-items: center; gap: 8px; margin-top: 14px; padding: 14px; border: 1px solid rgba(20, 216, 232, .27); border-radius: 15px; background: #fff; }
.qr-wrap canvas { width: min(100%, 226px); height: auto; image-rendering: pixelated; }
.qr-wrap small { color: #4a3b64; font-size: 11px; text-align: center; }
.score-box { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 11px; margin-top: 14px; }
.score-field { text-align: center; }
.score-field label { display: block; color: var(--muted); font-size: 11px; }
.score-field .input { min-height: 61px; margin-top: 6px; font-size: 30px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.score-colon { padding-top: 18px; color: var(--lemon); font-size: 25px; font-weight: 850; }
.room-buttons { display: grid; gap: 8px; margin-top: 13px; }
.score-points { color: var(--lemon); font-size: 11px; }

.team-list { display: grid; gap: 10px; margin-top: 12px; }
.team-card { padding: 13px; border: 1px solid rgba(159, 126, 210, .25); border-radius: 15px; background: rgba(11, 4, 29, .34); }
.team-card-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.team-card-head strong { font-size: 14px; }
.team-kind { color: var(--cyan); font-size: 10px; font-weight: 700; }
.team-members { display: grid; gap: 6px; margin: 10px 0; }
.team-member { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.team-member b { color: var(--ink); font-weight: 600; }
.team-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stat-card { padding: 12px 10px; border: 1px solid rgba(150, 112, 208, .27); border-radius: 14px; background: rgba(39, 16, 83, .58); }
.stat-card strong { display: block; color: var(--lemon); font-size: 21px; font-variant-numeric: tabular-nums; }
.stat-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.admin-member-count { margin: 14px 0 18px; }
.players-controls { display: flex; align-items: center; gap: 10px; }
.players-controls .segmented { flex: 1; min-width: 0; grid-template-columns: repeat(3, 1fr); }
.players-controls .btn { flex: 0 0 auto; }
.leaderboard-section { display: grid; gap: 12px; }
.friend-player-row { grid-template-columns: 48px minmax(0, 1fr) auto; min-height: 72px; padding-inline: 13px; }
.leaderboard-avatar { display: grid; position: relative; width: 48px; height: 48px; place-items: center; overflow: hidden; border: 1px solid rgba(20, 216, 232, .3); border-radius: 15px; color: var(--cyan); background: rgba(20, 216, 232, .1); font-size: 17px; font-weight: 800; }
.leaderboard-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.leaderboard-avatar-fallback[hidden] { display: none; }
.leaderboard-controls .segmented button { min-width: 0; padding-inline: 6px; font-size: 13px; font-weight: 650; }
.icon-only-button { width: 43px; min-height: 43px; padding: 0; }
.icon-only-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.player-list, .history-list { display: grid; gap: 9px; margin: 0; }
.player-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px;
  min-height: 82px; padding: 14px 16px; border: 1px solid rgba(150, 112, 208, .25);
  border-radius: 18px; background: var(--court-raised);
}
.player-row.leaderboard-row { grid-template-columns: 48px minmax(0, 1fr) auto; min-height: 72px; padding-inline: 13px; }
.leaderboard-row .player-rating { white-space: nowrap; }
.player-name { min-width: 0; }
.player-name strong { display: block; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.player-name small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.player-name .player-provisional { color: var(--cyan); }
.player-actions { display: grid; justify-items: end; gap: 7px; }
.player-actions .btn { min-height: 32px; padding: 6px 9px; font-size: 10px; }
.player-rating { color: var(--lemon); font-size: 28px; font-weight: 850; font-variant-numeric: tabular-nums; }
.player-empty { margin: 0; }
.public-data-note { margin: 2px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.public-group-filter.segmented { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.public-team-card .team-member b { color: var(--cyan); font-size: 11px; }
.gathering-form { margin-top: 8px; }
.gathering-form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.gathering-form-grid > div { display: grid; align-content: start; gap: 7px; }
.gathering-map-link { width: fit-content; color: var(--cyan); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.gathering-map-link[hidden] { display: none; }
.gatherings-section { display: grid; align-content: start; gap: 13px; }
.gatherings-heading { display: flex; align-items: end; justify-content: space-between; margin: 3px 0 2px; }
.gatherings-heading h2 { margin: 0; font-size: 19px; line-height: 1.2; }
.gatherings-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.gathering-list { display: grid; gap: 11px; }
.gathering-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid rgba(159, 126, 210, .2); border-radius: 14px; background: rgba(40, 17, 90, .62); }
.gathering-filter label { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.gathering-filter .select { min-height: 42px; padding-block: 8px; }
.gathering-card { padding: 16px; border: 1px solid rgba(159, 126, 210, .27); border-radius: 18px; background: linear-gradient(150deg, rgba(42, 17, 91, .92), rgba(29, 11, 68, .96)); }
.gathering-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gathering-card-head h3 { min-width: 0; margin: 1px 0 0; font-size: 16px; line-height: 1.4; }
.gathering-count { flex: 0 0 auto; padding: 6px 9px; border: 1px solid rgba(20, 216, 232, .2); border-radius: 999px; color: var(--cyan); background: rgba(20, 216, 232, .085); font-size: 11px; font-weight: 750; white-space: nowrap; }
.gathering-count.is-full { border-color: rgba(255, 228, 107, .26); color: var(--lemon); background: rgba(255, 228, 107, .07); }
.gathering-facts { display: grid; gap: 10px; margin-top: 15px; }
.gathering-time, .gathering-place { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 9px; margin: 0; color: var(--ink); font-size: 13px; line-height: 1.4; }
.gathering-time svg, .gathering-place > svg { width: 18px; height: 18px; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gathering-place > div { min-width: 0; }
.gathering-place strong { display: flex; align-items: center; min-width: 0; gap: 7px; font-size: 13px; font-weight: 650; }
.gathering-city { flex: 0 0 auto; padding: 3px 6px; border: 1px solid rgba(20, 216, 232, .2); border-radius: 7px; color: var(--cyan); background: rgba(20, 216, 232, .08); font-size: 10px; font-weight: 750; line-height: 1.25; }
.gathering-place-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gathering-place a { display: inline-block; margin-top: 3px; color: var(--cyan); font-size: 11px; text-decoration: underline; text-underline-offset: 2px; }
.gathering-note { margin: 13px 0 0; padding: 10px 11px; border-radius: 11px; color: var(--muted); background: rgba(11, 4, 29, .3); font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.gathering-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(159, 126, 210, .2); color: var(--muted); font-size: 11px; }
.gathering-card-footer .btn { min-width: 108px; min-height: 40px; padding: 7px 13px; font-size: 12px; }
.gathering-card-footer .btn:disabled { cursor: default; opacity: .65; }
.gatherings-section .group-empty { margin: 0; }
.gathering-fab {
  position: fixed;
  z-index: 12;
  right: max(18px, calc((100vw - 430px) / 2 + 20px));
  bottom: calc(102px + env(safe-area-inset-bottom));
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  color: var(--cyan-dark);
  background: var(--cyan-surface);
  box-shadow: 0 8px 24px rgba(4, 2, 18, .48), 0 0 0 5px rgba(20, 216, 232, .1);
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}
.gathering-fab span { margin-top: -3px; font-size: 37px; font-weight: 450; line-height: 1; }
.gathering-fab:hover { filter: brightness(1.06); }
.gathering-fab:active { transform: scale(.94); }
.gathering-composer { width: min(100%, 460px); }
.gathering-composer .modal-top { margin-bottom: 10px; }
.gathering-composer .gathering-form { gap: 8px; }
.gathering-composer .form-help { margin: 0; }
@media (max-width: 380px) {
  .gathering-card-footer { align-items: flex-start; flex-direction: column; }
  .gathering-card-footer .btn { width: 100%; }
}
.history-search { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.history-search .btn { padding-inline: 12px; }
.history-card { padding: 15px; border: 1px solid rgba(136, 95, 197, .34); border-radius: 19px; background: linear-gradient(150deg, rgba(42, 17, 91, .94), rgba(29, 11, 68, .96)); box-shadow: 0 12px 26px rgba(7, 2, 21, .12); }
.history-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-card-head strong { font-size: 15px; }
.history-score-inline { color: var(--lemon); font-size: 22px; font-weight: 850; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.history-status { padding: 4px 8px; border: 1px solid rgba(20, 216, 232, .3); border-radius: 999px; color: var(--cyan); font-weight: 750; white-space: nowrap; }
.history-status.is-pending { color: var(--lemon); border-color: rgba(255, 228, 107, .35); }
.history-status.is-disputed { color: #ff9b9b; border-color: rgba(255, 114, 147, .42); }
.history-rules-note { padding: 10px 12px; border: 1px solid rgba(20, 216, 232, .2); border-radius: 12px; color: var(--muted); background: rgba(20, 216, 232, .045); font-size: 10px; line-height: 1.55; }
.history-card-members { display: grid; gap: 0; margin-top: 12px; }
.history-member { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 2px; border-top: 1px solid rgba(73, 40, 130, .72); font-size: 11px; }
.history-member + .history-member { padding-top: 10px; }
.history-change { font-size: 10px; text-align: right; white-space: nowrap; }
.history-change.is-gain { color: var(--cyan); font-weight: 750; }
.history-change.is-loss { color: #ff9b9b; font-weight: 750; }
.history-change.is-even, .history-change.is-unsettled { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.member-identity {
  display: flex; align-items: center; gap: 14px; min-height: 112px; padding: 17px 18px;
  border: 1px solid rgba(136, 95, 197, .32); border-radius: 20px; background: var(--court-raised);
}
.member-identity img { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 16px; object-fit: cover; }
.member-identity h2 { margin: 0; font-size: 20px; }
.member-identity p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.member-identity small { display: block; margin-top: 7px; color: var(--lemon); font-size: 11px; font-weight: 700; }
.member-card { padding: 0; border: 1px solid rgba(20, 216, 232, .38); border-radius: 21px; background: linear-gradient(145deg, rgba(42, 17, 95, .96), rgba(29, 11, 68, .96)); box-shadow: 0 14px 30px rgba(7, 2, 21, .16); }
.member-card-top { display: flex; align-items: center; gap: 12px; }
.member-avatar {
  width: 55px; height: 55px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; padding: 0; cursor: pointer;
  border: 1px solid rgba(20, 216, 232, .48); border-radius: 18px; color: var(--cyan-dark); background: linear-gradient(145deg, #27cddd, #6840af);
  font-size: 22px; font-weight: 850;
}
.member-avatar:disabled { cursor: wait; opacity: .7; }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-avatar-picker { display: grid; flex: 0 0 auto; justify-items: center; gap: 3px; }
.member-avatar-link { min-height: 20px; padding: 0 3px; border: 0; color: var(--cyan); background: transparent; font-size: 10px; line-height: 1.2; cursor: pointer; }
.member-avatar-link:disabled { cursor: wait; opacity: .65; }
.member-avatar-remove { color: var(--muted); }
.member-avatar-caption { color: var(--subtle); font-size: 9px; white-space: nowrap; }
.member-card-title { min-width: 0; flex: 1; }
.member-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.member-card .member-name-line h2 { margin: 0; }
.member-name-edit { min-height: 27px; padding: 3px 7px; border: 1px solid rgba(20, 216, 232, .25); border-radius: 8px; color: var(--cyan); background: rgba(20, 216, 232, .07); font-size: 10px; font-weight: 750; cursor: pointer; }
.member-card h2 { margin: 0 0 4px; font-size: 18px; }
.member-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.member-verified { padding: 5px 8px; border: 1px solid rgba(20, 216, 232, .34); border-radius: 999px; color: var(--cyan); font-size: 9px; font-weight: 800; white-space: nowrap; }
.member-id { margin-top: 15px; padding-top: 12px; border-top: 1px solid rgba(168, 137, 211, .19); color: var(--muted); font-size: 11px; }
.member-friend-code { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; margin-top: 12px; padding: 10px 11px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; background: rgba(10, 4, 28, .35); }
.member-friend-code code { color: var(--lemon); font: 800 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.member-friend-code .btn { min-height: 32px; padding: 4px 7px; border: 0; color: var(--cyan); font-size: 10px; }
.skill-overview { margin-top: 0; }
.skill-completed { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; background: rgba(10, 4, 28, .38); }
.skill-completed strong { display: block; font-size: 13px; }
.skill-completed small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.skill-completed b { color: var(--lemon); font: 800 17px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.skill-overview .skill-level-guide { margin-top: 10px; border: 0; border-top: 1px solid var(--court-line); border-radius: 0; background: transparent; }
.skill-overview .skill-level-guide summary { padding: 11px 0 0; color: var(--cyan); font-size: 11px; }
.skill-overview .skill-level-guide summary::after { font-size: 18px; }
.skill-overview .skill-level-list { padding: 0; }
.account-sync-note { display: flex; align-items: center; gap: 10px; padding: 7px 0 11px; color: var(--muted); font-size: 11px; }
.account-sync-mark { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(20, 216, 232, .3); border-radius: 9px; color: var(--cyan); background: rgba(20, 216, 232, .07); font-weight: 800; }
.login-provider-list { display: grid; gap: 9px; margin-top: 15px; }
.provider-btn { min-height: 54px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 18px; border: 1px solid rgba(183, 167, 208, .32); border-radius: 13px; color: var(--ink); background: rgba(10, 4, 28, .4); font-weight: 700; cursor: pointer; }
.provider-btn:hover { border-color: var(--cyan); background: rgba(20, 216, 232, .08); }
.provider-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--night); background: var(--ink); font-size: 13px; font-weight: 850; }
.provider-btn-google .provider-icon.google { border-radius: 0; color: #4285f4; background: transparent; font-family: Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 1; }
.provider-btn-line { border-color: #06c755; color: #fff; background: #06c755; }
.provider-btn-line:hover { border-color: #05b84f; background: #05b84f; }
.provider-btn-line .provider-icon.line { border-radius: 0; color: #fff; background: transparent; }
.provider-btn-line .provider-icon.line svg { width: 22px; height: 22px; fill: currentColor; }
.skill-setup { margin-top: 0; }
.skill-value { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--court-line); border-radius: 13px; background: rgba(10, 4, 28, .45); }
.skill-value strong { color: var(--lemon); font-size: 21px; }
.skill-value small { color: var(--muted); font-size: 11px; }
.skill-level-guide { overflow: hidden; border: 1px solid var(--court-line); border-radius: 13px; background: rgba(10, 4, 28, .45); }
.skill-level-guide summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 14px; color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; }
.skill-level-guide summary::-webkit-details-marker { display: none; }
.skill-level-guide summary::after { content: "+"; color: var(--lemon); font-size: 20px; line-height: 1; }
.skill-level-guide[open] summary::after { content: "−"; }
.skill-level-guide summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; }
.skill-level-list { border-top: 1px solid var(--court-line); padding: 0 14px; }
.skill-level-item { padding: 11px 0; border-bottom: 1px solid var(--court-line); }
.skill-level-item:last-child { border-bottom: 0; }
.skill-level-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.skill-level-heading strong { color: var(--ink); font-size: 12px; }
.skill-level-heading span { color: var(--lemon); font-size: 10px; white-space: nowrap; }
.skill-level-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.admin-flag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgba(255, 228, 107, .35); border-radius: 999px; color: var(--lemon); background: rgba(255, 228, 107, .08); font-size: 10px; font-weight: 750; }
.admin-back { align-self: flex-start; }

.divider { height: 1px; margin: 15px 0; background: rgba(166, 134, 210, .16); }
.admin-list { display: grid; gap: 9px; margin-top: 15px; }
.admin-item { padding: 13px; border: 1px solid rgba(150, 112, 208, .27); border-radius: 14px; background: rgba(11, 4, 29, .35); }
.admin-item h3 { margin: 0; font-size: 14px; }
.admin-item p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; white-space: pre-wrap; }
.admin-item-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.admin-item-footer small { color: var(--subtle); font-size: 10px; }
.admin-moderation { margin-top: 18px; }
.admin-moderation > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.admin-moderation > summary::-webkit-details-marker { display: none; }
.admin-moderation > summary h2 { margin: 0; font-size: 16px; }
.admin-moderation > summary small { color: var(--subtle); font-size: 10px; text-align: right; }
.admin-moderation-content { margin-top: 14px; }
.admin-review-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(166, 134, 210, .16); }
.admin-review-form .textarea { min-height: 64px; }
.admin-term-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-term-row > div { display: grid; gap: 4px; }
.admin-term-row small { color: var(--subtle); font-size: 10px; }
.moderation-term-form { margin-top: 12px; }
.moderation-avatar-preview { display: block; width: min(100%, 220px); max-height: 240px; margin: 10px auto; border: 1px solid rgba(159, 126, 210, .28); border-radius: 16px; background: rgba(16, 6, 42, .75); object-fit: contain; }
.avatar-review-item .team-actions { margin-top: 10px; }
.avatar-safety-trigger { flex: 0 0 auto; width: 30px; height: 34px; border: 1px solid rgba(159, 126, 210, .3); border-radius: 10px; color: var(--muted); background: rgba(40, 17, 90, .42); font-size: 20px; line-height: 1; cursor: pointer; }
.gathering-safety-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 7px; }
.gathering-safety-actions .btn { min-height: 32px; padding: 6px 9px; font-size: 10px; }
.image-preview { width: 100%; max-height: 200px; margin-top: 10px; border-radius: 12px; object-fit: cover; }
.fine-print { color: var(--subtle); font-size: 10px; line-height: 1.5; }

.bottom-nav {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: max(9px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 456px);
  min-height: 76px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  padding: 6px;
  border: 1px solid rgba(121, 63, 210, .8);
  border-radius: 999px;
  background: rgba(42, 18, 88, .94);
  box-shadow: 0 8px 34px rgba(5, 1, 16, .45), inset 0 1px 0 rgba(255,255,255,.04);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}
.tab-button {
  min-width: 0;
  min-height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  padding: 3px 2px;
  border: 0;
  border-radius: 999px;
  color: #e8ddf8;
  background: transparent;
  cursor: pointer;
}
.tab-button img { display: block; width: 35px; height: 35px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 3px rgba(3, 1, 15, .3)); }
.tab-button span { overflow: hidden; max-width: 100%; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tab-button.is-active { color: var(--cyan); background: rgba(144, 101, 214, .3); box-shadow: inset 0 0 0 1px rgba(188, 138, 255, .16); }
.tab-button.is-active img { filter: drop-shadow(0 0 5px rgba(20, 216, 232, .32)); }
.group-kind-switch { margin-top: 4px; }
.group-kind-switch button { min-height: 39px; font-size: 12px; font-weight: 700; }
.group-team-list { margin-top: 14px; }
.group-empty { margin-top: 14px; }

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  max-width: calc(100% - 36px);
  padding: 11px 14px;
  border: 1px solid rgba(20, 216, 232, .34);
  border-radius: 13px;
  color: var(--ink);
  background: #281259;
  box-shadow: 0 8px 25px rgba(0,0,0,.3);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { border-color: rgba(255, 114, 147, .6); }
.modal-backdrop {
  position: fixed;
  z-index: 25;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 0;
  background: rgba(7, 2, 20, .7);
  backdrop-filter: blur(5px);
}
.modal-sheet {
  max-height: min(88dvh, 760px);
  overflow: auto;
  padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
  border: 1px solid rgba(150, 112, 208, .42);
  border-bottom: 0;
  border-radius: 25px 25px 0 0;
  background: #1d0b47;
  box-shadow: 0 -16px 50px rgba(0,0,0,.32);
}
.modal-top { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.modal-top h2 { margin: 0; font-size: 20px; }
.modal-top p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-close { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--court-line); border-radius: 50%; color: var(--muted); background: var(--court); font-size: 18px; cursor: pointer; }
.camera-box { min-height: 170px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--court-line); border-radius: 14px; background: #0d0422; }
.camera-box video { width: 100%; max-height: 260px; object-fit: cover; }
.camera-hint { color: var(--muted); font-size: 11px; text-align: center; }

.notice-box { padding: 12px 13px; border: 1px solid rgba(255, 228, 107, .28); border-radius: 13px; color: #e8d992; background: rgba(255, 228, 107, .06); font-size: 11px; line-height: 1.5; }
.error-box { padding: 12px 13px; border: 1px solid rgba(255, 114, 147, .38); border-radius: 13px; color: #ffc1cf; background: rgba(255, 114, 147, .07); font-size: 12px; line-height: 1.5; }
.loading-line { display: flex; align-items: center; gap: 9px; padding: 15px 0; color: var(--muted); font-size: 12px; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(183,167,208,.27); border-top-color: var(--cyan); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer-note { margin-top: 0; color: var(--subtle); font-size: 10px; line-height: 1.5; text-align: center; }
.site-legal-links { display: flex; justify-content: center; gap: 18px; margin-top: auto; padding: 15px 0 4px; border-top: 1px solid rgba(161, 130, 212, .13); color: var(--subtle); font-size: 11px; }
.site-legal-links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.member-data-note { margin: 0; color: var(--subtle); font-size: 11px; line-height: 1.5; }
.stack-top { margin-top: 14px; }
.room-notice { margin-top: 13px; }
.clipboard-fallback { position: fixed; left: -10000px; top: 0; }

@media (min-width: 700px) {
  body { padding: 18px 0; }
  .phone-shell { min-height: calc(100dvh - 36px); border: 1px solid rgba(159, 120, 224, .2); border-radius: 34px; }
  .app-header { border-radius: 34px 34px 0 0; }
  .page-content { min-height: calc(100dvh - 181px); padding-top: 22px; }
  .bottom-nav { bottom: 26px; }
  .toast { bottom: 110px; }
  .modal-backdrop { align-items: center; padding: 18px; }
  .modal-sheet { width: min(100%, 460px); border-bottom: 1px solid rgba(150, 112, 208, .42); border-radius: 25px; padding-bottom: 22px; }
  .gathering-fab { right: max(20px, calc((100vw - 430px) / 2 + 20px)); bottom: calc(120px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* A dedicated desktop-capable workspace for authorized Poinminton admins. */
body.admin-workspace-open { padding: 0; background: #edf3f4; }
.phone-shell.is-admin-open {
  width: min(100%, 1440px);
  min-height: 100dvh;
  margin-inline: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color-scheme: light;
  color: #163342;
  background: #f3f7f7;
  box-shadow: none;
}
.phone-shell.is-admin-open .app-header { min-height: 68px; padding-inline: 28px; border: 0; border-radius: 0; background: #173744; }
.phone-shell.is-admin-open .page-content { min-height: calc(100dvh - 68px); gap: 0; padding: 0 0 28px; }
.phone-shell.is-admin-open .bottom-nav { display: none; }
.phone-shell.is-admin-open .site-legal-links { margin: 0 32px; padding: 18px 0 4px; border-color: #dbe4e5; color: #667c83; }
.phone-shell.is-admin-open .toast { bottom: 22px; color: #fff; background: #173744; }
.admin-workspace { min-height: calc(100dvh - 68px); color: #163342; background: #f3f7f7; }
.admin-workspace-head {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 30px clamp(22px, 5.2vw, 70px);
  color: #f2fbfc;
  background: #173744;
}
.admin-workspace-head > div:first-child { position: relative; z-index: 1; max-width: 650px; }
.admin-kicker, .admin-card-kicker { color: #76d5d5; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.admin-workspace-head h1 { margin: 8px 0 7px; font-size: clamp(26px, 3vw, 35px); line-height: 1.12; letter-spacing: -.035em; }
.admin-workspace-head p { max-width: 590px; margin: 0; color: #c1d5d8; font-size: 13px; line-height: 1.6; }
.admin-head-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; }
.admin-role-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid rgba(135, 222, 218, .3); border-radius: 99px; color: #c4efeb; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 700; white-space: nowrap; }
.admin-role-chip span { color: #6ed4c1; font-size: 9px; }
.admin-icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(205, 231, 235, .25); border-radius: 12px; color: #e8f6f6; background: rgba(255,255,255,.06); cursor: pointer; }
.admin-icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-back-link { min-height: 40px; padding: 0 12px; border: 1px solid rgba(205, 231, 235, .25); border-radius: 12px; color: #e8f6f6; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.admin-court-mark { position: absolute; top: 50%; right: 10%; width: 215px; height: 125px; border: 1px solid rgba(119, 204, 201, .22); transform: translateY(-50%) perspective(330px) rotateY(-18deg); }
.admin-court-mark::before, .admin-court-mark::after { position: absolute; content: ""; background: rgba(119, 204, 201, .22); }
.admin-court-mark::before { left: 50%; top: 0; width: 1px; height: 100%; }
.admin-court-mark::after { left: 0; right: 0; top: 50%; height: 1px; }
.admin-court-mark span { position: absolute; left: 17%; right: 17%; height: 1px; background: rgba(119, 204, 201, .18); }
.admin-court-mark span:first-child { top: 23%; }
.admin-court-mark span:nth-child(2) { bottom: 23%; }
.admin-court-mark i { position: absolute; left: -4px; top: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: #83dbd2; box-shadow: 0 0 0 5px rgba(131,219,210,.1); }
.admin-workspace-layout { width: min(100%, 1370px); display: grid; grid-template-columns: 228px minmax(0, 1fr); align-items: start; gap: 28px; margin-inline: auto; padding: 28px clamp(22px, 4.7vw, 64px) 36px; }
.admin-sidebar { position: sticky; top: 18px; min-width: 0; padding: 15px 11px 12px; border: 1px solid #dce6e7; border-radius: 18px; background: #fff; box-shadow: 0 7px 23px rgba(37,76,83,.045); }
.admin-sidebar-label { padding: 4px 11px 10px; color: #819499; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.admin-sidebar-nav { display: grid; gap: 4px; }
.admin-nav-item { width: 100%; min-height: 43px; display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 0 10px; border: 0; border-radius: 11px; color: #577079; background: transparent; font-size: 12px; font-weight: 650; text-align: left; cursor: pointer; }
.admin-nav-item:hover { color: #173744; background: #f1f7f7; }
.admin-nav-item.is-active { color: #123541; background: #e4f5f2; box-shadow: inset 3px 0 #19aeb2; }
.admin-nav-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: #218c8d; background: #edf7f5; font-size: 15px; font-weight: 700; }
.admin-nav-item small { min-width: 20px; padding: 3px 6px; border-radius: 99px; color: #49646b; background: #eaf0f1; font-size: 10px; text-align: center; }
.admin-nav-item.is-active small { color: #16686b; background: #c8eeea; }
.admin-sidebar-foot { margin: 22px 4px 0; padding: 12px 9px 4px; border-top: 1px solid #e7eded; color: #55737a; font-size: 10px; line-height: 1.7; }
.admin-sidebar-foot small { display: block; color: #83959a; font-size: 9px; }
.admin-sidebar-foot button { margin-top: 10px; padding: 0; border: 0; color: #267b7e; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.admin-online-dot { width: 7px; height: 7px; display: inline-block; margin: 0 5px 1px 0; border-radius: 50%; background: #4cba91; }
.admin-main { min-width: 0; }
.admin-section-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 19px; }
.admin-section-head h2 { margin: 0; color: #183a46; font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.admin-section-head p { margin: 5px 0 0; color: #72878c; font-size: 12px; line-height: 1.5; }
.admin-section-meta { color: #73898e; font-size: 10px; white-space: nowrap; }
.admin-overview { display: grid; gap: 18px; }
.admin-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.admin-metric { position: relative; min-height: 119px; overflow: hidden; padding: 15px 16px; border: 1px solid #dce6e7; border-radius: 15px; background: #fff; }
.admin-metric > span { color: #60787f; font-size: 11px; font-weight: 700; }
.admin-metric strong { display: block; margin-top: 10px; color: #163d49; font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
.admin-metric small { display: block; margin-top: 8px; color: #8a9b9e; font-size: 9px; }
.admin-metric-icon { position: absolute; top: 13px; right: 14px; color: #5db9b4; font-size: 17px; }
.admin-metric-members { color: #f4ffff; border-color: #194b55; background: #1d5961; }
.admin-metric-members > span, .admin-metric-members small { color: #c0e1df; }
.admin-metric-members strong { color: #fff; }
.admin-metric-members i { position: absolute; width: 100px; height: 100px; right: -37px; bottom: -57px; border: 1px solid rgba(175,240,229,.35); border-radius: 50%; box-shadow: 0 0 0 12px rgba(175,240,229,.07), 0 0 0 26px rgba(175,240,229,.045); }
.admin-overview-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: 16px; }
.admin-module { min-width: 0; padding: 17px; border: 1px solid #dce6e7; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(37,76,83,.035); }
.admin-module-stack { display: grid; gap: 14px; }
.admin-module-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; }
.admin-module-head h3 { margin: 0; color: #1c424e; font-size: 15px; }
.admin-module-head p { margin: 4px 0 0; color: #7d9094; font-size: 10px; line-height: 1.45; }
.admin-module-head .btn { flex: 0 0 auto; }
.admin-task-list { display: grid; }
.admin-task-row { width: 100%; display: grid; grid-template-columns: 28px minmax(0,1fr) auto 15px; align-items: center; gap: 10px; padding: 12px 2px; border: 0; border-top: 1px solid #edf1f1; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.admin-task-row:first-child { border-top: 0; }
.admin-task-row:hover .admin-task-copy strong { color: #148c91; }
.admin-task-mark { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: #329b7e; background: #e9f7f0; font-size: 12px; font-weight: 800; }
.admin-task-mark.is-pending { color: #b87920; background: #fff4df; }
.admin-task-mark.is-unknown { color: #71858a; background: #eef2f2; }
.admin-task-copy { min-width: 0; display: grid; gap: 4px; }
.admin-task-copy strong { color: #294a54; font-size: 11px; }
.admin-task-copy small { color: #839598; font-size: 9px; line-height: 1.4; }
.admin-task-row > b { color: #42656d; font-size: 12px; font-variant-numeric: tabular-nums; }
.admin-task-open { color: #9babad; font-size: 20px; }
.admin-text-action { padding: 5px 0; border: 0; color: #16888e; background: transparent; font-size: 10px; font-weight: 750; cursor: pointer; }
.admin-recent-list { display: grid; }
.admin-recent-row { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 5px 9px; padding: 10px 0; border: 0; border-top: 1px solid #edf1f1; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.admin-recent-row:first-child { border-top: 0; }
.admin-recent-row strong { overflow: hidden; color: #294a54; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-recent-row small { grid-column: 2; color: #899a9e; font-size: 9px; }
.admin-status-pill { width: fit-content; display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 99px; color: #647d82; background: #eef3f4; font-size: 9px; font-weight: 750; white-space: nowrap; }
.admin-status-pill.is-live { color: #267a62; background: #e7f6ee; }
.admin-status-pill.is-scheduled { color: #80662d; background: #fff5de; }
.admin-status-pill.is-draft { color: #65767a; background: #eff3f3; }
.admin-create-shortcut { min-height: 39px; display: flex; align-items: center; gap: 8px; margin-top: 7px; padding: 0 11px; border: 1px dashed #b7d5d4; border-radius: 10px; color: #21858a; background: #f5fbfa; font-size: 10px; font-weight: 700; cursor: pointer; }
.admin-create-shortcut span { font-size: 17px; line-height: 1; }
.admin-muted-note { margin: 0; padding: 15px 0; color: #809196; font-size: 10px; line-height: 1.5; }
.admin-privacy-note { display: flex; gap: 11px; padding: 12px 14px; border: 1px solid #cfe4e2; border-radius: 13px; color: #55757b; background: #eaf5f3; }
.admin-privacy-note > span { color: #328e8b; font-size: 17px; }
.admin-privacy-note p { margin: 0; font-size: 9px; line-height: 1.55; }
.admin-privacy-note strong { color: #245b61; font-size: 10px; }
.admin-announcement-list { display: grid; }
.admin-announcement-row { min-width: 0; display: grid; grid-template-columns: 112px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid #e9eeee; }
.admin-announcement-row:first-child { border-top: 0; }
.admin-announcement-row > img, .admin-announcement-placeholder { width: 112px; height: 72px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; color: #409b98; background: #e6f1ef; object-fit: cover; font-size: 19px; font-weight: 800; }
.admin-announcement-copy { min-width: 0; }
.admin-status-line { display: flex; align-items: center; gap: 8px; }
.admin-status-line time, .admin-announcement-copy > small { color: #899a9e; font-size: 9px; }
.admin-announcement-copy h3 { overflow: hidden; margin: 7px 0 3px; color: #234651; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-announcement-copy p { overflow: hidden; margin: 0 0 4px; color: #70858a; font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.admin-announcement-actions { display: flex; align-items: center; gap: 7px; }
.admin-announcement-actions .btn { min-height: 34px; padding: 0 9px; border-radius: 9px; font-size: 10px; }
.admin-footnote { margin: 13px 0 0; color: #829397; font-size: 10px; line-height: 1.5; }
.admin-editor-card { margin-bottom: 15px; padding: 18px; border: 1px solid #c8dedd; border-radius: 16px; background: #fff; }
.admin-editor-card .panel-heading { margin: 0 0 5px; }
.admin-editor-card .panel-heading h3 { margin: 4px 0; color: #183f4a; font-size: 17px; }
.admin-editor-card .panel-heading p { color: #788d91; font-size: 10px; }
.admin-editor-card > label, .admin-review-form > label, .moderation-term-form > label { color: #48656d; font-size: 11px; font-weight: 700; }
.phone-shell.is-admin-open .input, .phone-shell.is-admin-open .textarea, .phone-shell.is-admin-open .select { border-color: #cad9db; color: #183c46; background: #fbfdfd; }
.phone-shell.is-admin-open .input::placeholder, .phone-shell.is-admin-open .textarea::placeholder { color: #94a4a8; }
.phone-shell.is-admin-open .form-help { color: #7e9094; font-size: 10px; }
.phone-shell.is-admin-open .image-preview { max-width: 580px; border: 1px solid #d8e4e4; }
.admin-module .admin-list { margin-top: 8px; }
.admin-module .admin-item { border-color: #e2eaea; border-radius: 12px; color: #25434d; background: #fbfdfd; }
.admin-module .admin-item h3, .admin-module .admin-item strong { color: #23444e; }
.admin-module .admin-item p { color: #71868a; }
.admin-module .admin-item-footer small, .admin-module .admin-term-row small { color: #7e9195; }
.admin-module .empty-note { border-color: #d7e5e5; color: #73888d; background: #f8fbfb; }
.admin-module .btn-secondary { border-color: #c5dddd; color: #24565e; background: #f2f8f7; }
.admin-module .btn-subtle { border-color: #dae4e5; color: #5e797f; }
.admin-module .btn-danger { border-color: #f0c7ca; color: #9d454d; background: #fff3f3; }
.admin-module .btn-primary { color: #fff; background: #1d858b; }
.admin-module .moderation-avatar-preview { border-color: #d9e5e5; background: #f2f6f6; }
.admin-module .divider { background: #e7eded; }
.admin-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.admin-filter-tabs button { min-height: 31px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid #dce6e7; border-radius: 99px; color: #6b8186; background: #fff; font-size: 10px; cursor: pointer; }
.admin-filter-tabs button.is-active { border-color: #9bd0cd; color: #1b6b70; background: #e8f6f3; }
.admin-filter-tabs b { font-size: 9px; }
.admin-module .admin-review-form { border-color: #e7eded; }
.admin-module .moderation-term-form { margin: 12px 0 16px; padding: 13px; border: 1px solid #e6eeee; border-radius: 12px; background: #f8fbfb; }

@media (max-width: 900px) {
  .admin-workspace-head { flex-wrap: wrap; }
  .admin-head-actions { margin-left: auto; }
  .admin-workspace-layout { grid-template-columns: 196px minmax(0,1fr); gap: 17px; padding-inline: 18px; }
  .admin-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-overview-grid { grid-template-columns: 1fr; }
  .admin-court-mark { right: 4%; opacity: .7; }
}
@media (max-width: 650px) {
  .phone-shell.is-admin-open .app-header { padding-inline: 17px; }
  .phone-shell.is-admin-open .page-content { padding-bottom: 20px; }
  .admin-workspace-head { min-height: 185px; display: grid; align-content: center; gap: 14px; padding: 23px 18px; }
  .admin-workspace-head p { max-width: 390px; font-size: 11px; }
  .admin-head-actions { justify-content: flex-start; }
  .admin-role-chip { margin-right: auto; }
  .admin-back-link { min-height: 36px; }
  .admin-court-mark { top: 26px; right: -115px; transform: scale(.74) perspective(330px) rotateY(-18deg); opacity: .5; }
  .admin-workspace-layout { display: block; padding: 13px 13px 25px; }
  .admin-sidebar { position: static; margin-bottom: 17px; padding: 7px; border-radius: 13px; }
  .admin-sidebar-label, .admin-sidebar-foot { display: none; }
  .admin-sidebar-nav { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .admin-sidebar-nav::-webkit-scrollbar { display: none; }
  .admin-nav-item { width: auto; min-width: max-content; min-height: 39px; grid-template-columns: 22px auto auto; gap: 5px; padding: 0 9px; font-size: 10px; }
  .admin-nav-icon { width: 21px; height: 21px; font-size: 12px; }
  .admin-section-head { min-height: 0; align-items: flex-end; margin-bottom: 14px; }
  .admin-section-head h2 { font-size: 21px; }
  .admin-section-head p { font-size: 10px; }
  .admin-section-meta { max-width: 100px; text-align: right; white-space: normal; }
  .admin-metrics { gap: 8px; }
  .admin-metric { min-height: 105px; padding: 12px; }
  .admin-metric strong { font-size: 25px; }
  .admin-module { padding: 13px; }
  .admin-module-head { align-items: flex-start; gap: 8px; }
  .admin-module-head h3 { font-size: 13px; }
  .admin-module-head p { max-width: 240px; font-size: 9px; }
  .admin-module-head .btn { min-height: 34px; padding-inline: 9px; font-size: 10px; }
  .admin-announcement-row { grid-template-columns: 70px minmax(0,1fr); gap: 8px 10px; }
  .admin-announcement-row > img, .admin-announcement-placeholder { width: 70px; height: 64px; }
  .admin-announcement-actions { grid-column: 2; }
  .admin-announcement-actions .btn { min-height: 30px; }
  .admin-editor-card { padding: 13px; }
  .admin-editor-card .announcement-submit-actions { display: grid; }
  .admin-task-row { grid-template-columns: 25px minmax(0,1fr) auto 10px; gap: 7px; }
  .admin-task-copy small { font-size: 8px; }
  .phone-shell.is-admin-open .site-legal-links { margin-inline: 14px; }
}
