:root {
  --bg: #050a13;
  --bg-2: #071321;
  --panel: rgba(9, 20, 36, 0.72);
  --panel-solid: #0a1627;
  --panel-lite: rgba(18, 38, 63, 0.5);
  --line: rgba(125, 211, 252, 0.13);
  --line-strong: rgba(125, 211, 252, 0.24);
  --text: #f4f8ff;
  --muted: #8ea4bd;
  --muted-2: #61758d;
  --blue: #3b82f6;
  --cyan: #38bdf8;
  --ice: #b9e7ff;
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.13);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.13);
  --gold: #fbbf24;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 5%, rgba(37, 99, 235, 0.18), transparent 31rem),
    radial-gradient(circle at 86% 18%, rgba(56, 189, 248, 0.09), transparent 27rem),
    radial-gradient(circle at 50% 110%, rgba(30, 64, 175, 0.18), transparent 40rem),
    var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  color: #03111e;
  background: var(--ice);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.72;
}

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

.orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.7;
  animation: float-orb 16s ease-in-out infinite alternate;
}

.orb-blue {
  top: 17%;
  left: -13rem;
  width: 36rem;
  height: 36rem;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), transparent 66%);
}

.orb-cyan {
  top: 38%;
  right: -12rem;
  width: 38rem;
  height: 38rem;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.1), transparent 67%);
  animation-delay: -7s;
}

.orb-low {
  bottom: -18rem;
  left: 35%;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent 68%);
  animation-delay: -3s;
}

.grid-noise {
  position: absolute;
  inset: 0;
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(148, 196, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 196, 255, 0.035) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.page {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 50px;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  padding: 9px 12px 9px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(6, 15, 28, 0.7);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px) saturate(130%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  border-radius: 12px;
}

.brand-mark {
  width: 47px;
  height: 40px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.26));
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-tag {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.header-link:hover {
  color: var(--text);
  background: rgba(125, 211, 252, 0.06);
  border-color: var(--line);
}

.header-link svg {
  width: 15px;
  height: 15px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.72fr);
  gap: clamp(30px, 5vw, 80px);
  align-items: center;
  min-height: clamp(470px, 63vh, 680px);
  padding: 58px 0 52px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  width: 26px;
  height: 1px;
  background: var(--cyan);
  content: "";
  box-shadow: 0 0 14px var(--cyan);
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(94px, 10.7vw, 166px);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.085em;
}

.hero-title .title-line {
  display: block;
  white-space: nowrap;
}

.hero-title .accent {
  color: transparent;
  background: linear-gradient(112deg, #ffffff 10%, #b9e7ff 46%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(56, 189, 248, 0.11));
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 37px;
}

.hero-count {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
}

.hero-count strong {
  color: var(--text);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.07em;
}

.hero-line {
  width: 62px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.hero-mark-wrap {
  position: absolute;
  top: 48%;
  right: 0;
  z-index: 0;
  width: min(47vw, 560px);
  transform: translateY(-50%) rotate(-5deg);
  opacity: 0.105;
  pointer-events: none;
  user-select: none;
}

.hero-mark-wrap img {
  width: 100%;
  filter: drop-shadow(0 0 45px rgba(56, 189, 248, 0.25));
}

.hero-mark-wrap::before {
  position: absolute;
  inset: 13% 3%;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 50%;
  content: "";
  transform: rotate(24deg);
}

.access-panel {
  position: relative;
  z-index: 3;
  padding: 25px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(19, 42, 69, 0.62), rgba(7, 16, 30, 0.76)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px) saturate(125%);
  transform: rotate(-1.1deg);
  transition: border-color 220ms ease, transform 300ms ease;
}

.access-panel:hover {
  border-color: rgba(125, 211, 252, 0.36);
  transform: rotate(0deg);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.panel-label {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel-index {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.order-form {
  display: grid;
  gap: 10px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(4, 12, 24, 0.65);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-wrap:focus-within {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.input-wrap svg {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--cyan);
}

.text-input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.text-input::placeholder {
  color: #4f657c;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 21px;
  border: 1px solid rgba(125, 211, 252, 0.55);
  border-radius: 12px;
  color: #03111e;
  background: linear-gradient(120deg, #b9e7ff, #38bdf8 60%, #3b82f6);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(56, 189, 248, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled,
.ghost-btn:disabled,
.icon-btn:disabled,
.counter-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.primary-btn svg,
.ghost-btn svg {
  width: 16px;
  height: 16px;
}

.primary-btn.wide {
  width: 100%;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(125, 211, 252, 0.035);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ghost-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(125, 211, 252, 0.075);
}

.ghost-btn.danger {
  color: var(--red);
  border-color: rgba(251, 113, 133, 0.22);
  background: var(--red-soft);
}

.ghost-btn.danger:hover {
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.19);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  color: var(--cyan);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.text-btn:hover {
  color: #d9f5ff;
}

.text-btn.danger {
  color: var(--red);
}

.quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: color 160ms ease;
}

.quiet-link:hover {
  color: var(--cyan);
}

.quiet-link svg {
  width: 14px;
  height: 14px;
}

.access-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 15px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.access-divider::before,
.access-divider::after {
  flex: 1;
  height: 1px;
  background: var(--line);
  content: "";
}

.access-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.entry-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.6;
}

.field-error {
  min-height: 16px;
  margin: 8px 0 0;
  color: var(--red);
  font-size: 11px;
  line-height: 1.4;
}

.catalog {
  padding-top: 18px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-count {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.13);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: transform 260ms ease, border-color 220ms ease, box-shadow 260ms ease;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--game-color) 55%, transparent);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3);
}

.game-card:active {
  transform: translateY(-2px);
}

.theme-blue {
  --game-color: #38bdf8;
  --game-color-2: #2563eb;
}

.theme-green {
  --game-color: #4ade80;
  --game-color-2: #0f766e;
}

.theme-red {
  --game-color: #fb7185;
  --game-color-2: #9f1239;
}

.game-art {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background:
    radial-gradient(circle at 88% 16%, color-mix(in srgb, var(--game-color) 33%, transparent), transparent 43%),
    linear-gradient(135deg, color-mix(in srgb, var(--game-color-2) 28%, transparent), rgba(6, 15, 28, 0.42));
}

.game-art::before {
  position: absolute;
  right: -14%;
  bottom: -78%;
  width: 86%;
  height: 170%;
  border: 1px solid color-mix(in srgb, var(--game-color) 28%, transparent);
  border-radius: 50%;
  content: "";
  transform: rotate(27deg);
}

.game-art::after {
  position: absolute;
  top: 17%;
  right: 20%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--game-color);
  box-shadow:
    48px 32px 0 color-mix(in srgb, var(--game-color) 48%, transparent),
    -35px 56px 0 color-mix(in srgb, var(--game-color) 35%, transparent),
    28px 76px 0 color-mix(in srgb, var(--game-color) 25%, transparent);
  content: "";
}

.game-code {
  position: absolute;
  top: 18px;
  left: 20px;
  color: color-mix(in srgb, var(--game-color) 82%, white);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.game-watermark {
  position: absolute;
  right: 15px;
  bottom: -25px;
  width: 132px;
  opacity: 0.11;
  filter: grayscale(1) brightness(2);
}

.game-kicker {
  position: absolute;
  left: 20px;
  bottom: 19px;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--mono);
  font-size: clamp(18px, 2.3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.game-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--game-color) 35%, transparent);
  border-radius: 999px;
  color: var(--game-color);
  background: rgba(5, 12, 22, 0.35);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.game-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px 18px;
}

.game-title {
  display: block;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.game-meta {
  display: flex;
  gap: 9px;
  margin-top: 6px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.game-meta span + span::before {
  margin-right: 9px;
  color: #34475c;
  content: "/";
}

.game-arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--game-color);
  background: rgba(4, 12, 23, 0.58);
  transition: background 180ms ease, transform 180ms ease;
}

.game-card:hover .game-arrow {
  background: color-mix(in srgb, var(--game-color) 15%, transparent);
  transform: rotate(-42deg);
}

.game-arrow svg {
  width: 15px;
  height: 15px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 58px;
  padding: 20px 2px 0;
  border-top: 1px solid rgba(125, 211, 252, 0.07);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-brand img {
  width: 22px;
  height: 19px;
  object-fit: contain;
  opacity: 0.6;
}

/* Loading and empty */
.loading {
  display: grid;
  place-items: center;
  min-height: 58vh;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(125, 211, 252, 0.15);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 13px;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
}

.empty-state p {
  max-width: 330px;
  font-size: 12px;
  line-height: 1.7;
}

/* Modal */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(1, 6, 13, 0.72);
  backdrop-filter: blur(12px);
}

.overlay[hidden] {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  width: min(820px, 100%);
  max-height: min(820px, 92vh);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(18, 41, 68, 0.96), rgba(6, 15, 28, 0.98)),
    var(--panel-solid);
  box-shadow: 0 45px 110px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: modal-in 220ms ease both;
}

.modal.narrow {
  width: min(520px, 100%);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 25px 15px;
  background: linear-gradient(to bottom, rgba(13, 29, 50, 0.98) 65%, transparent);
}

.modal-eyebrow {
  margin: 0 0 7px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal-title {
  margin: 0;
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 850;
  letter-spacing: -0.045em;
}

.modal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(4, 12, 23, 0.5);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(125, 211, 252, 0.1);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  padding: 5px 25px 24px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 25px 22px;
  border-top: 1px solid rgba(125, 211, 252, 0.08);
}

.modal-foot.split {
  justify-content: space-between;
}

.modal-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 23px 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-intro {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.detail-tasks {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.detail-note {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.55;
}

.detail-task {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 8px 13px;
  background: rgba(5, 14, 26, 0.86);
}

.detail-no {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
}

.detail-title {
  min-width: 0;
  color: #d7e5f4;
  font-size: 12px;
  line-height: 1.48;
}

.detail-type {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.detail-type.cumulative {
  color: var(--cyan);
}

.detail-type.single {
  color: var(--green);
}

/* Forms */
.form-grid {
  display: grid;
  gap: 14px;
}

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

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

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.form-field > label,
.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.form-field .hint {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.55;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background: rgba(3, 10, 20, 0.58);
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.textarea {
  min-height: 86px;
  padding-top: 11px;
  resize: vertical;
  line-height: 1.6;
}

.select {
  cursor: pointer;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.input::placeholder,
.textarea::placeholder {
  color: #4e6378;
}

.input:disabled {
  opacity: 0.55;
}

.form-error {
  margin: 0;
  color: var(--red);
  font-size: 11px;
  line-height: 1.5;
}

.form-success {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  line-height: 1.5;
}

/* Room */
.room-page {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  transition: color 160ms ease;
}

.back-link:hover {
  color: var(--text);
}

.back-link svg {
  width: 14px;
  height: 14px;
}

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 19px;
}

.room-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.room-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-logo {
  position: absolute;
  top: 50%;
  right: 2%;
  width: min(32vw, 350px);
  max-height: 78%;
  object-fit: contain;
  opacity: 0.055;
  pointer-events: none;
  transform: translateY(-50%) rotate(-4deg);
}

.room-banner {
  position: relative;
  overflow: hidden;
  padding: clamp(23px, 3.2vw, 37px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 84% 10%, rgba(56, 189, 248, 0.1), transparent 26rem),
    linear-gradient(125deg, rgba(13, 31, 54, 0.9), rgba(6, 15, 27, 0.94));
  box-shadow: var(--shadow);
}

.room-banner::after {
  position: absolute;
  right: -40px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 50%;
  content: "";
  transform: rotate(28deg);
  pointer-events: none;
}

.room-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.room-kicker .order-code {
  color: var(--muted-2);
}

.room-mainline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.room-title-wrap {
  min-width: 0;
}

.room-title {
  margin: 0;
  max-width: 780px;
  font-size: clamp(34px, 5vw, 61px);
  font-weight: 880;
  line-height: 1.02;
  letter-spacing: -0.065em;
  overflow-wrap: anywhere;
}

.room-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 18px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
}

.room-sub strong {
  color: var(--text);
  font-weight: 650;
}

.room-sub .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.room-progress-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}

.progress-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--p, 0) * 1%), rgba(125, 211, 252, 0.11) 0);
  box-shadow: 0 0 34px rgba(56, 189, 248, 0.08);
}

.progress-ring::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(125, 211, 252, 0.1);
  border-radius: inherit;
  background: #081728;
  content: "";
}

.progress-ring-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  line-height: 1;
}

.progress-ring-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.08em;
}

.progress-ring-label {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.room-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(4, 12, 23, 0.38);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pill.live {
  color: var(--green);
  border-color: rgba(74, 222, 128, 0.2);
  background: rgba(74, 222, 128, 0.07);
}

.pill.live::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  content: "";
  animation: pulse-dot 2.4s ease-in-out infinite;
}

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

.pill.closed {
  color: var(--red);
  border-color: rgba(251, 113, 133, 0.22);
  background: var(--red-soft);
}

.players {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(3, 10, 20, 0.38);
  font-size: 10px;
  max-width: 100%;
}

.player-chip.is-self {
  border-color: rgba(56, 189, 248, 0.35);
  color: #dff5ff;
  background: rgba(56, 189, 248, 0.08);
}

.player-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  overflow: hidden;
  border-radius: 50%;
  color: #03111e;
  background: linear-gradient(135deg, #b9e7ff, #38bdf8);
  font-size: 10px;
  font-weight: 900;
}

.player-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-content {
  margin-top: 23px;
}

.room-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.room-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.room-section-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.task-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 185px;
  padding: 15px 15px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(150deg, rgba(15, 32, 54, 0.7), rgba(6, 15, 27, 0.74)),
    var(--panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
}

.task-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  content: "";
}

.task-card.is-open {
  border-color: rgba(251, 113, 133, 0.14);
}

.task-card.is-done {
  border-color: rgba(74, 222, 128, 0.27);
  background:
    linear-gradient(150deg, rgba(18, 53, 42, 0.34), rgba(6, 20, 25, 0.78)),
    var(--panel);
  box-shadow: 0 0 32px rgba(74, 222, 128, 0.035), inset 0 1px 0 rgba(74, 222, 128, 0.1);
}

.task-card.is-done::after {
  position: absolute;
  top: 50%;
  right: -50px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(74, 222, 128, 0.12);
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
  pointer-events: none;
}

.task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 13px;
}

.task-no {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.task-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px rgba(251, 113, 133, 0.55);
}

.is-done .status-dot {
  background: var(--green);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
}

.is-done .task-state {
  color: var(--green);
}

.task-title {
  margin: 0 0 16px;
  color: #eaf4ff;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.42;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.task-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.task-number-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  font-family: var(--mono);
}

.task-number {
  color: var(--text);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.09em;
  line-height: 1;
}

.is-done .task-number {
  color: var(--green);
}

.task-target {
  color: var(--muted-2);
  font-size: 10px;
}

.task-unit {
  color: var(--muted-2);
  font-size: 9px;
}

.task-bar {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.09);
}

.task-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 280ms ease;
}

.is-done .task-bar span {
  background: linear-gradient(90deg, #22c55e, #a3e635);
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.counter-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(4, 12, 23, 0.5);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.counter-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(125, 211, 252, 0.075);
}

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

.counter-btn.plus {
  color: #04121e;
  border-color: rgba(125, 211, 252, 0.55);
  background: linear-gradient(135deg, #b9e7ff, #38bdf8);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.16);
}

.counter-btn.plus:hover {
  color: #04121e;
  background: linear-gradient(135deg, #d6f4ff, #7dd3fc);
}

.counter-btn svg {
  width: 17px;
  height: 17px;
}

.complete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 9px;
  color: var(--green);
  background: rgba(74, 222, 128, 0.08);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.complete-btn:hover {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(74, 222, 128, 0.14);
}

.complete-btn.is-done {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(4, 12, 23, 0.4);
}

.complete-btn.is-done:hover {
  color: var(--red);
  border-color: rgba(251, 113, 133, 0.28);
  background: var(--red-soft);
}

.complete-btn svg {
  width: 14px;
  height: 14px;
}

.task-card.readonly {
  min-height: 174px;
}

.task-card.readonly .task-title {
  margin-bottom: 20px;
}

/* Info tooltip */
.info-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-2);
  background: transparent;
  cursor: pointer;
}

.info-btn:hover,
.info-btn:focus-visible,
.info-btn.is-open {
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.35);
}

.info-btn svg {
  width: 12px;
  height: 12px;
}

.tip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: min(230px, 62vw);
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #cfe4f5;
  background: #0b1a2d;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.55;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.info-btn:hover .tip,
.info-btn:focus-visible .tip,
.info-btn.is-open .tip {
  opacity: 1;
  transform: translateY(0);
}

.tooltip {
  position: fixed;
  z-index: 120;
  width: min(250px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: #d7eaf9;
  background: rgba(6, 17, 31, 0.98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 130ms ease, transform 130ms ease;
}

.tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Player entry / auth */
.auth-page {
  display: grid;
  place-items: center;
  width: min(100% - 36px, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0;
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.auth-brand img {
  width: 76px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(56, 189, 248, 0.24));
}

.auth-card {
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background:
    linear-gradient(150deg, rgba(17, 38, 64, 0.85), rgba(6, 15, 28, 0.94)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.auth-title {
  margin: 0 0 5px;
  font-size: 31px;
  font-weight: 850;
  letter-spacing: -0.05em;
}

.auth-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.prefix-input {
  display: flex;
  align-items: stretch;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 10, 20, 0.58);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.prefix-input:focus-within {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.prefix-label {
  display: flex;
  align-items: center;
  flex: none;
  padding: 0 10px 0 13px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.prefix-input .input {
  min-height: 44px;
  padding-left: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.prefix-input .input:focus {
  box-shadow: none;
}

.auth-back {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* Manager */
.manager-page {
  width: min(1400px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.manager-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  margin-bottom: 18px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(6, 15, 28, 0.72);
  backdrop-filter: blur(20px);
}

.manager-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.manager-shell {
  display: grid;
  grid-template-columns: 315px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}

.manager-sidebar,
.manager-main {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(7, 16, 30, 0.68);
  backdrop-filter: blur(16px);
}

.manager-sidebar {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: hidden;
}

.manager-shell.is-empty {
  grid-template-columns: minmax(0, 1fr);
}

.manager-shell.is-empty .manager-sidebar {
  display: none;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 16px 12px;
}

.sidebar-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sidebar-count {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
}

.room-list {
  max-height: calc(100vh - 150px);
  padding: 0 8px 9px;
  overflow: auto;
}

.room-list::-webkit-scrollbar,
.manager-main::-webkit-scrollbar,
.modal::-webkit-scrollbar {
  width: 7px;
}

.room-list::-webkit-scrollbar-thumb,
.manager-main::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.16);
  background-clip: padding-box;
}

.room-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  width: 100%;
  margin: 3px 0;
  padding: 11px 11px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.room-item:hover {
  background: rgba(125, 211, 252, 0.04);
}

.room-item.is-active {
  border-color: rgba(56, 189, 248, 0.22);
  background: linear-gradient(105deg, rgba(56, 189, 248, 0.1), rgba(56, 189, 248, 0.025));
}

.room-item-title {
  overflow: hidden;
  color: #dbeaff;
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-item-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.room-item-status::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.room-item-status.closed::before {
  background: var(--red);
}

.room-item-meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 9px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.room-item-meta span + span::before {
  margin-right: 9px;
  color: #33475c;
  content: "/";
}

.manager-main {
  min-height: 640px;
  overflow: hidden;
}

.manager-empty {
  display: grid;
  place-items: center;
  min-height: 620px;
  padding: 30px;
}

.manager-room-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.manager-room-code {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.manager-room-title {
  margin: 0;
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -0.045em;
}

.manager-room-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 10px;
}

.manager-room-sub strong {
  color: var(--muted);
  font-weight: 650;
}

.manager-room-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.manager-body {
  display: grid;
  gap: 24px;
  padding: 22px 24px 27px;
}

.manager-section {
  min-width: 0;
}

.manager-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.manager-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.manager-section-count {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 12, 23, 0.35);
}

.member-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #03111e;
  background: linear-gradient(135deg, #b9e7ff, #38bdf8);
  font-size: 12px;
  font-weight: 900;
}

.member-card.boss .member-avatar {
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
}

.member-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.member-name {
  overflow: hidden;
  color: #dceaf9;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-role {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.member-actions {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.mini-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted-2);
  background: transparent;
  cursor: pointer;
}

.mini-btn:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(125, 211, 252, 0.06);
}

.mini-btn.danger:hover {
  color: var(--red);
  border-color: rgba(251, 113, 133, 0.2);
  background: var(--red-soft);
}

.mini-btn svg {
  width: 13px;
  height: 13px;
}

.manager-task-list {
  display: grid;
  gap: 5px;
}

.manager-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 12, 23, 0.32);
}

.manager-task.is-done {
  border-color: rgba(74, 222, 128, 0.16);
  background: rgba(74, 222, 128, 0.035);
}

.manager-task-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.manager-task .status-dot {
  width: 6px;
  height: 6px;
}

.manager-task-copy {
  min-width: 0;
}

.manager-task-title {
  overflow: hidden;
  color: #d9e8f7;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.manager-task-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.manager-task-actions .mini-btn {
  width: 28px;
  height: 28px;
}

.manager-footer-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
  border-top: 1px solid rgba(125, 211, 252, 0.07);
}

.danger-zone {
  display: flex;
  align-items: center;
  gap: 9px;
}

.confirm-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.confirm-copy strong {
  color: var(--text);
  font-weight: 700;
}

.confirm-code {
  color: var(--red);
  font-family: var(--mono);
  font-weight: 600;
}

/* Toast */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 130;
  max-width: min(370px, calc(100vw - 32px));
  padding: 11px 15px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 10px;
  color: #e4f4ff;
  background: rgba(7, 20, 35, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(9px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(251, 113, 133, 0.32);
  color: #ffe0e5;
}

/* 6 × 6 Bingo board */
.bingo-scroll {
  overflow: visible;
}

.bingo-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.bingo-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 132px;
  padding: 12px;
  overflow: hidden;
  color: var(--text);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(150deg, rgba(15, 32, 54, 0.74), rgba(6, 15, 27, 0.82)),
    var(--panel);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.bingo-cell::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.11), transparent);
  content: "";
}

.bingo-cell:hover {
  z-index: 1;
  border-color: rgba(125, 211, 252, 0.34);
  background:
    linear-gradient(150deg, rgba(20, 43, 70, 0.86), rgba(7, 18, 32, 0.9)),
    var(--panel);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  transform: translateY(-3px);
}

.bingo-cell:active {
  transform: translateY(-1px) scale(0.995);
}

.bingo-cell:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.bingo-cell.is-done {
  border-color: rgba(74, 222, 128, 0.28);
  background:
    linear-gradient(150deg, rgba(16, 56, 43, 0.38), rgba(5, 20, 24, 0.86)),
    var(--panel);
  box-shadow: 0 0 30px rgba(74, 222, 128, 0.035), inset 0 1px 0 rgba(74, 222, 128, 0.08);
}

.bingo-cell.is-done::after {
  position: absolute;
  right: -36px;
  bottom: -50px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(74, 222, 128, 0.13);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.bingo-cell-top,
.bingo-cell-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.bingo-cell-top {
  position: relative;
  z-index: 1;
}

.bingo-no {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.bingo-type {
  padding: 2px 5px;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.bingo-title {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  flex: 1;
  margin: 8px 0 10px;
  overflow: hidden;
  color: #e8f3ff;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.45;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.bingo-cell.is-done .bingo-title {
  color: #e7fff1;
}

.bingo-cell-bottom {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.bingo-progress {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bingo-cell.is-done .bingo-progress {
  color: var(--green);
}

.bingo-cell .status-dot {
  width: 6px;
  height: 6px;
}

.task-detail {
  display: grid;
  gap: 14px;
  padding: 6px 0 4px;
}

.detail-count-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.detail-count-line .status-dot {
  width: 8px;
  height: 8px;
}

.detail-value {
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(40px, 7vw, 58px);
  font-weight: 500;
  letter-spacing: -0.1em;
  line-height: 0.95;
}

.task-detail.is-done .detail-value {
  color: var(--green);
}

.detail-target {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 12px;
}

.detail-single-status {
  color: var(--text);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 820;
  letter-spacing: -0.04em;
}

.task-detail.is-done .detail-single-status {
  color: var(--green);
}

.detail-state {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.task-detail.is-done .detail-state {
  color: var(--green);
}

.detail-bar {
  height: 5px;
}

.task-detail .detail-note {
  margin: 0;
  padding: 11px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 12, 23, 0.36);
  font-size: 12px;
  line-height: 1.65;
}

.task-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.task-detail-actions .counter-btn {
  width: 56px;
  height: 48px;
  border-radius: 12px;
}

.task-detail-actions .counter-btn svg {
  width: 20px;
  height: 20px;
}

.task-detail-actions .complete-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 12px;
}

.detail-closed {
  justify-self: start;
}

/* First paint */
.boot-screen {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100vh;
  place-items: center;
  align-content: center;
  gap: 22px;
}

.boot-screen img {
  width: clamp(128px, 18vw, 180px);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(125, 211, 252, 0.16));
  animation: boot-breathe 1.8s ease-in-out infinite;
}

.boot-line {
  width: 132px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.12);
}

.boot-line::after {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  content: "";
  animation: boot-scan 1.2s ease-in-out infinite;
}

/* Utilities */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mono {
  font-family: var(--mono);
}

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

.stack {
  display: grid;
  gap: 10px;
}

.row {
  display: flex;
  align-items: center;
  gap: 9px;
}

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

.hide-mobile {
  display: initial;
}

/* Desktop/mobile */
@media (max-width: 1020px) {
  .page {
    width: min(100% - 36px, 880px);
  }

  .room-page {
    width: min(100% - 36px, 920px);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
    gap: 28px;
    min-height: 520px;
  }

  .hero-title {
    font-size: clamp(78px, 10vw, 120px);
  }

  .hero-mark-wrap {
    width: 57vw;
  }

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

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

  .manager-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .manager-page {
    width: min(100% - 26px, 1100px);
  }
}

@media (max-width: 760px) {
  .page,
  .room-page {
    width: calc(100% - 28px);
    padding-top: 12px;
  }

  .site-header {
    top: 9px;
    min-height: 58px;
    padding: 7px 8px 7px 10px;
    border-radius: 16px;
  }

  .brand-mark {
    width: 40px;
    height: 34px;
  }

  .brand-name {
    font-size: 14px;
  }

  .brand-tag {
    font-size: 8px;
  }

  .header-link {
    min-height: 34px;
    padding: 0 9px;
    font-size: 10px;
  }

  .player-name-pill {
    display: none;
  }

  .hero {
    display: block;
    min-height: 0;
    padding: 50px 0 29px;
    overflow: clip;
  }

  .hero-eyebrow {
    margin-bottom: 18px;
    font-size: 9px;
  }

  .hero-title {
    font-size: clamp(84px, 24.7vw, 136px);
    line-height: 0.96;
  }

  .hero-title .title-line {
    white-space: normal;
  }

  .hero-foot {
    margin-top: 23px;
  }

  .hero-mark-wrap {
    top: 31%;
    right: 0;
    width: 78vw;
    opacity: 0.09;
  }

  .access-panel {
    margin-top: 39px;
    padding: 18px;
    border-radius: 22px;
    transform: none;
  }

  .access-panel:hover {
    transform: none;
  }

  .game-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .game-art {
    min-height: 137px;
  }

  .game-body {
    padding: 15px 16px;
  }

  .game-title {
    font-size: 18px;
  }

  .site-footer {
    margin-top: 37px;
    padding-top: 17px;
    font-size: 8px;
  }

  .room-header {
    margin-bottom: 13px;
  }

  .room-header-actions .ghost-btn {
    min-height: 34px;
    font-size: 10px;
  }

  .room-banner {
    padding: 20px 18px;
    border-radius: 22px;
  }

  .room-mainline {
    display: block;
  }

  .room-title {
    font-size: clamp(31px, 9.5vw, 46px);
  }

  .room-sub {
    gap: 7px 11px;
    margin-top: 12px;
    font-size: 11px;
  }

  .room-progress-wrap {
    justify-content: space-between;
    margin-top: 20px;
  }

  .progress-ring {
    width: 86px;
    height: 86px;
  }

  .progress-ring-value {
    font-size: 20px;
  }

  .room-badges {
    margin-top: 16px;
  }

  .players {
    margin-top: 15px;
  }

  .room-content {
    margin-top: 19px;
  }

  .room-toolbar {
    margin-bottom: 10px;
  }

  .bingo-scroll {
    margin: 0 -14px;
    padding: 0 14px 5px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .bingo-board {
    min-width: 690px;
    gap: 6px;
  }

  .bingo-cell {
    min-height: 108px;
    padding: 10px 9px;
    border-radius: 13px;
  }

  .bingo-cell-top {
    gap: 4px;
  }

  .bingo-no {
    font-size: 10px;
  }

  .bingo-type {
    display: none;
  }

  .bingo-title {
    margin: 7px 0 6px;
    font-size: 11px;
    line-height: 1.4;
    -webkit-line-clamp: 3;
  }

  .bingo-progress {
    font-size: 9px;
  }

  .bingo-cell .status-dot {
    width: 5px;
    height: 5px;
  }

  .detail-count-line {
    flex-wrap: wrap;
  }

  .detail-state {
    margin-left: 0;
  }

  .task-detail-actions .counter-btn {
    flex: 1;
    width: auto;
  }

  .task-detail-actions .complete-btn {
    width: 100%;
  }

  .task-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .task-card {
    min-height: 160px;
    padding: 13px 14px;
  }

  .task-title {
    margin-bottom: 12px;
    font-size: 14px;
  }

  .task-card.readonly {
    min-height: 156px;
  }

  .form-grid.two,
  .form-grid.three,
  .member-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    max-height: 92vh;
    border-radius: 20px;
  }

  .overlay {
    align-items: end;
    padding: 0;
  }

  .modal,
  .modal.narrow {
    width: 100%;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
  }

  .modal-head {
    padding: 20px 18px 12px;
  }

  .modal-body {
    padding: 4px 18px 20px;
  }

  .modal-foot {
    padding: 13px 18px 18px;
  }

  .auth-page {
    width: calc(100% - 28px);
    padding: 28px 0;
  }

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

  .auth-title {
    font-size: 28px;
  }

  .manager-page {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .manager-header {
    min-height: 56px;
    padding: 6px;
    border-radius: 15px;
  }

  .manager-header .brand-name {
    font-size: 13px;
  }

  .manager-shell {
    display: block;
  }

  .manager-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 10px;
  }

  .room-list {
    display: flex;
    max-height: none;
    padding: 0 8px 9px;
    overflow-x: auto;
  }

  .room-item {
    flex: 0 0 205px;
    margin: 3px 0;
  }

  .manager-main {
    min-height: 500px;
  }

  .manager-empty {
    min-height: 420px;
  }

  .manager-room-head {
    display: block;
    padding: 17px 16px 14px;
  }

  .manager-room-title {
    font-size: 23px;
  }

  .manager-room-actions {
    justify-content: flex-start;
    margin-top: 13px;
  }

  .manager-body {
    gap: 20px;
    padding: 16px;
  }

  .manager-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .manager-section-head .section-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .section-actions .ghost-btn {
    min-width: 0;
    padding: 0 8px;
    gap: 5px;
    white-space: nowrap;
    font-size: 11px;
  }

  .section-actions .ghost-btn svg {
    flex: none;
    width: 14px;
    height: 14px;
  }

  .manager-footer-zone {
    display: grid;
    gap: 12px;
  }

  .manager-task {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px;
  }

  .manager-task-actions .mini-btn {
    width: 27px;
    height: 27px;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    left: 14px;
    max-width: none;
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 390px) {
  .hero-title {
    font-size: 87px;
  }

  .brand-copy {
    gap: 6px;
  }

  .brand-tag {
    display: none;
  }

  .access-panel {
    margin-top: 31px;
  }

  .section-title {
    font-size: 17px;
  }

  .room-title {
    font-size: 31px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #particles {
    display: none;
  }
}

@keyframes boot-scan {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

@keyframes boot-breathe {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@keyframes float-orb {
  from {
    transform: translate3d(0, -14px, 0) scale(1);
  }
  to {
    transform: translate3d(23px, 22px, 0) scale(1.04);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
