:root {
  color-scheme: dark;
  --bg: #050814;
  --bg-2: #091021;
  --panel: rgba(15, 23, 42, .76);
  --panel-2: rgba(20, 30, 55, .64);
  --line: rgba(148, 163, 184, .18);
  --line-bright: rgba(125, 211, 252, .42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #38bdf8;
  --indigo: #6366f1;
  --purple: #a855f7;
  --green: #34d399;
  --gold: #fbbf24;
  --coral: #fb5d4a;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .52);
  --glow: 0 0 28px rgba(96, 165, 250, .28), 0 0 70px rgba(168, 85, 247, .16);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  font-size: 16pt;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 2%, rgba(56, 189, 248, .42), transparent 24rem),
    radial-gradient(circle at 16% 8%, rgba(37, 99, 235, .56), transparent 30rem),
    radial-gradient(circle at 84% 10%, rgba(168, 85, 247, .46), transparent 28rem),
    radial-gradient(circle at 52% 40%, rgba(99, 102, 241, .24), transparent 26rem),
    radial-gradient(circle at 58% 62%, rgba(59, 130, 246, .12), transparent 20rem),
    radial-gradient(circle at 50% 102%, rgba(45, 212, 191, .3), transparent 26rem),
    radial-gradient(circle at 22% 84%, rgba(20, 184, 166, .16), transparent 24rem),
    linear-gradient(156deg, #030814 0%, #0a1330 26%, #171734 56%, #081726 100%);
  background-size: 132% 132%, 146% 146%, 150% 150%, 136% 136%, 122% 122%, 142% 142%, 126% 126%, 100% 100%;
  background-position: 10% 2%, 16% 8%, 84% 10%, 52% 40%, 58% 62%, 50% 102%, 22% 84%, 50% 50%;
  animation: ambient-breathe 18s ease-in-out infinite alternate;
  color: var(--text);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .12;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .08) 0 1px, transparent 1.4px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .06) 0 1px, transparent 1.6px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 4px);
  background-size: 180px 180px, 220px 220px, 100% 5px, 6px 100%;
  mix-blend-mode: soft-light;
  animation: ambient-grain 10s steps(6) infinite;
}

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

button {
  cursor: pointer;
}

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

svg {
  width: 1.35em;
  height: 1.35em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  left: -999px;
  top: 1rem;
  background: #fff;
  color: #000;
  padding: .75rem 1rem;
  z-index: 99;
  border-radius: 999px;
}

.skip-link:focus {
  left: 1rem;
}

.app-root {
  min-height: 100vh;
}

.view-exit {
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.view-enter {
  opacity: 0;
  transition: opacity .3s ease;
}

.view-enter.view-enter-active {
  opacity: 1;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(460px, 100%);
  padding: 1.15rem;
}

.brand-stack {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.2rem;
}

.brand-orb {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: var(--glow);
  font-size: 1.65rem;
}

.brand-stack strong {
  display: block;
  letter-spacing: .16em;
  font-size: .8rem;
  color: #e0f2fe;
}

.brand-stack span {
  display: block;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: .66rem;
  margin-top: .15rem;
}

.auth-card h1 {
  font-size: clamp(2.1rem, 10vw, 3.7rem);
  line-height: .94;
  letter-spacing: -.08em;
  margin: 0 0 1rem;
}

p {
  color: var(--soft);
  line-height: 1.52;
  margin: 0;
  font-weight: 300;
}

.glass-card {
  background: linear-gradient(180deg, rgba(3, 7, 18, .96), rgba(2, 6, 23, .98));
  box-shadow: 0 18px 54px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(22px);
  border-radius: var(--radius-lg);
}

.form {
  display: grid;
  gap: .85rem;
  margin-top: 1.15rem;
}

.form label {
  display: grid;
  gap: .45rem;
  color: #dbeafe;
  font-weight: 300;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 16px;
  background: rgba(2, 6, 23, .72);
  color: var(--text);
  font-weight: 300;
  padding: .92rem .95rem;
  outline: none;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  height: 56px;
}

textarea {
  min-height: 98px;
  resize: vertical;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f8fafc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4-4 4 4'/%3E%3Cpath d='m4 10 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 1rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 3rem;
  line-height: 1.2;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(96, 165, 250, .85);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .18);
}

.primary-button,
.secondary-button,
.icon-button,
.round-arrow,
.edit-float,
.tab,
.mini-card,
.planner-head button,
.file-fallback {
  -webkit-tap-highlight-color: transparent;
}

.primary-button {
  border: 0;
  min-height: 48px;
  border-radius: 17px;
  padding: .9rem 1rem;
  color: #fff;
  font-weight: 860;
  background: linear-gradient(135deg, #2563eb, #8b5cf6 55%, #fb5d4a);
  box-shadow: 0 14px 36px rgba(37, 99, 235, .28);
}

.secondary-button,
.planner-head button {
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .76);
  color: #bfdbfe;
  border-radius: 15px;
  padding: .78rem .9rem;
  font-weight: 780;
}

.app-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: .65rem 1.35rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mobile-header.compact {
  justify-content: space-between;
}

.playmaker-header {
  min-height: 106px;
}

.avatar-ring {
  width: 72px;
  height: 72px;
  border-radius: 25px;
  border: 2px solid rgba(96, 165, 250, .92);
  box-shadow: var(--glow);
  object-fit: cover;
  background: #111827;
}

.header-copy {
  min-width: 0;
  flex: 1;
}

.header-copy h1 {
  margin: 0;
  font-size: 2.45rem;
  line-height: .95;
  letter-spacing: -.065em;
}

.header-copy p {
  margin-top: .35rem;
  color: #8b7cff;
  font-weight: 740;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wordmark {
  display: block;
  letter-spacing: .20em;
  color: #7dd3fc;
  font-weight: 860;
  font-size: .82rem;
}

.guide-head p {
  margin-top: .3rem;
  color: var(--muted);
  font-size: .84rem;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .22);
  color: #cbd5e1;
  background: rgba(2, 6, 23, .45);
  position: relative;
}

.icon-button i {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  background: #8b5cf6;
  border-radius: 50%;
}

.screen-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 1.15rem 1rem;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
}

.screen-body.has-edit-rail {
  padding-bottom: calc(200px + env(safe-area-inset-bottom));
}

.screen-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.bottom-tabs {
  flex-shrink: 0;
  height: calc(92px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .2rem;
  padding: .65rem .65rem calc(.65rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(148, 163, 184, .18);
  background: linear-gradient(180deg, rgba(5, 8, 20, .74), rgba(5, 8, 20, .98));
  backdrop-filter: blur(20px);
}

.tab {
  color: #8d96a8;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  gap: .25rem;
  font-size: .72rem;
  font-weight: 740;
}

.tab svg {
  width: 1.75rem;
  height: 1.75rem;
}

.tab.active {
  color: #7dd3fc;
  text-shadow: 0 0 24px rgba(125, 211, 252, .6);
}

.tab.active svg {
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, .7));
}

.eyebrow {
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 900;
}

.eyebrow.gold {
  color: var(--gold);
}

.eyebrow.green {
  color: var(--green);
}

.section-head {
  padding: .25rem .2rem 1rem;
}

.section-head.split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.section-head h2 {
  font-size: 2.55rem;
  line-height: .96;
  letter-spacing: -.065em;
  margin: .3rem 0 .55rem;
}

.section-head p {
  color: var(--muted);
  font-size: .95rem;
}

.section-action {
  flex-shrink: 0;
  margin-top: .2rem;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.title-row h2 {
  margin-bottom: 0;
}

.inline-icon-button {
  flex-shrink: 0;
}

.edit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  margin-bottom: .75rem;
}

.edit-toolbar-spacer {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.loading-card {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

.passport-cover,
.game-hero,
.event-hero {
  position: relative;
  overflow: hidden;
  min-height: 350px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.cover-art,
.game-hero-art,
.event-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .88;
}

.cover-art:after,
.game-hero-art:after,
.event-art:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 20, .2), rgba(5, 8, 20, .78) 65%, rgba(5, 8, 20, .94));
}

.cover-content,
.game-hero-copy,
.event-copy {
  position: relative;
  z-index: 1;
}

.cover-content h2,
.game-hero-copy h2,
.event-copy h2 {
  margin: .35rem 0 .5rem;
  font-size: 2.55rem;
  line-height: .9;
  letter-spacing: -.07em;
}

.cover-content p,
.game-hero-copy p,
.event-copy p {
  font-size: 1.05rem;
  color: #e5e7eb;
  max-width: 14rem;
}

.build-state {
  margin-top: 1rem;
  display: grid;
  gap: .22rem;
  color: #a78bfa;
  font-weight: 840;
}

.build-state small {
  color: #cbd5e1;
  font-size: .95rem;
  font-weight: 600;
}

.round-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(2, 6, 23, .52);
  color: #fff;
  display: grid;
  place-items: center;
}

.round-arrow svg {
  width: 2rem;
  height: 2rem;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin: .85rem 0;
}

.mini-card {
  background: rgba(15, 23, 42, .68);
  color: #fff;
  border-radius: 22px;
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: .2rem;
  padding: .9rem;
  text-align: left;
}

.mini-card b {
  font-size: 1.65rem;
  letter-spacing: -.05em;
}

.mini-card span {
  color: var(--muted);
  font-size: .83rem;
  font-weight: 700;
}

.info-row,
.guide-contact {
  margin-top: .85rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .85rem;
  align-items: center;
}

.info-row h3,
.guide-contact h3 {
  margin: .12rem 0 .15rem;
  font-size: 1.08rem;
}

.info-row p,
.guide-contact p {
  font-size: .88rem;
  color: var(--muted);
}

.hex-icon {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, .17);
  color: #a78bfa;
  font-size: 1.45rem;
}

.hex-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.hex-icon.blue {
  color: var(--blue);
  background: rgba(14, 165, 233, .15);
}

.hex-icon.purple {
  color: var(--purple);
  background: rgba(168, 85, 247, .16);
}

.chev {
  color: var(--muted);
  font-size: 2rem;
}

.checkpoint-feature {
  padding: .85rem;
  overflow: hidden;
}

.checkpoint-image {
  height: 190px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.checkpoint-image:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, .68));
}

.checkpoint-image span {
  position: absolute;
  left: .8rem;
  top: .8rem;
  z-index: 1;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  color: white;
  padding: .42rem .62rem;
  border-radius: 999px;
  font-size: .68rem;
  text-transform: uppercase;
  font-weight: 890;
  letter-spacing: .07em;
}

.checkpoint-copy {
  padding: .9rem .2rem .1rem;
}

.checkpoint-copy h3 {
  margin: .45rem 0 .45rem;
  font-size: 1.35rem;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.checkpoint-copy p {
  font-size: .92rem;
  color: var(--soft);
}

.checkpoint-copy small,
.timeline-card small {
  display: inline-block;
  margin-top: .55rem;
  color: var(--muted);
}

.stamp {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  padding: .35rem .58rem;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(168, 85, 247, .18);
  color: #d8b4fe;
}

.stamp.blue {
  background: rgba(14, 165, 233, .17);
  color: #7dd3fc;
}

.stamp.green {
  background: rgba(52, 211, 153, .16);
  color: #86efac;
}

.stamp.gold {
  background: rgba(251, 191, 36, .16);
  color: #fde68a;
}

.stamp.purple {
  background: rgba(168, 85, 247, .18);
  color: #d8b4fe;
}

.timeline {
  position: relative;
  display: grid;
  gap: .85rem;
  padding-bottom: 1rem;
}

.timeline:before {
  content: "";
  position: absolute;
  left: 38px;
  top: 12px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(var(--blue), var(--purple), transparent);
  opacity: .55;
}

.timeline-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: .6rem;
  align-items: center;
  position: relative;
}

.timeline-dot {
  width: 58px;
  min-height: 58px;
  margin-left: 9px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  color: #dbeafe;
  background: rgba(2, 6, 23, .85);
  border: 1px solid var(--line-bright);
  box-shadow: 0 0 22px rgba(59, 130, 246, .24);
  z-index: 1;
  text-align: center;
}

.timeline-dot b {
  font-size: .75rem;
  line-height: 1.1;
}

.timeline-card {
  padding: .9rem;
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: .8rem;
  align-items: center;
}

.timeline-card h3 {
  margin: .45rem 0 .35rem;
  font-size: 1.05rem;
  line-height: 1.08;
}

.timeline-card p {
  font-size: .84rem;
  color: var(--soft);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 17px;
}

.game-hero {
  min-height: 420px;
}

.edit-float {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(2, 6, 23, .5);
  color: #fff;
  display: grid;
  place-items: center;
}

.game-meta-row {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 19px;
  background: rgba(2, 6, 23, .6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.game-meta-row div {
  padding: .75rem .62rem;
  border-right: 1px solid rgba(148, 163, 184, .18);
}

.game-meta-row div:last-child {
  border-right: 0;
}

.game-meta-row span {
  display: block;
  color: var(--muted);
  font-size: .68rem;
}

.game-meta-row b {
  display: block;
  margin-top: .18rem;
  font-size: .88rem;
}

.planner {
  padding: 1rem;
  margin-top: .85rem;
}

.planner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

.planner-head h3 {
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .84rem;
  margin: 0;
}

.planner-head button {
  color: #c084fc;
  padding: .5rem .6rem;
  font-size: .78rem;
}

.planner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.planner-cell {
  min-height: 104px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 18px;
  background: rgba(15, 23, 42, .56);
  padding: .82rem;
  display: grid;
  align-content: center;
  gap: .25rem;
}

.planner-cell i {
  color: #a78bfa;
  font-style: normal;
  font-size: 1.5rem;
}

.planner-cell span {
  color: #9d7cff;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .68rem;
  font-weight: 900;
}

.planner-cell b {
  font-size: .98rem;
  line-height: 1.18;
}

.two-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-top: .85rem;
}

.checkpoint-small,
.next-step {
  min-height: 160px;
  padding: .9rem;
  display: grid;
  align-content: start;
  gap: .65rem;
  overflow: hidden;
}

.checkpoint-small {
  grid-template-columns: auto 1fr;
  position: relative;
}

.checkpoint-small img {
  position: absolute;
  right: .72rem;
  bottom: .72rem;
  width: 88px;
  height: 72px;
  object-fit: cover;
  border-radius: 15px;
  opacity: .92;
}

.checkpoint-small h3,
.next-step h3 {
  font-size: 1rem;
  line-height: 1.1;
  margin: .28rem 0;
}

.checkpoint-small p,
.next-step p {
  color: var(--muted);
  font-size: .8rem;
}

.next-step {
  grid-template-columns: auto 1fr;
}

.event-hero {
  min-height: 340px;
}

.event-facts {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .55rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, .22);
  color: #dbeafe;
  font-size: .84rem;
  font-weight: 700;
}

.agenda-card {
  padding: 1rem;
  margin-top: .85rem;
}

.day-rail {
  display: grid;
  grid-template-columns: repeat(5, 112px);
  gap: .6rem;
  overflow-x: auto;
  padding-bottom: .25rem;
}

.day-rail::-webkit-scrollbar {
  height: 0;
}

.day-pill {
  min-height: 132px;
  padding: .75rem;
  border-radius: 19px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(2, 6, 23, .38);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: .2rem;
  color: var(--muted);
}

.day-pill.active {
  border-color: rgba(99, 102, 241, .9);
  color: #dbeafe;
  box-shadow: inset 0 0 24px rgba(99, 102, 241, .15);
}

.day-pill b {
  color: #7dd3fc;
}

.day-pill small {
  text-transform: uppercase;
}

.day-pill i {
  font-style: normal;
  font-size: 1.7rem;
  margin: .15rem 0;
}

.showcase-card,
.bring-card {
  padding: 1rem;
  min-height: 170px;
}

.showcase-card h3 {
  font-size: 1.1rem;
  margin: .45rem 0 .4rem;
}

.bring-card p {
  margin-top: .42rem;
  font-size: .84rem;
  color: #d1fae5;
}

.claim-card {
  padding: 1.2rem;
  margin-top: 1rem;
}

.claim-code-field input.claim-code-input {
  font-size: 2.7rem;
  line-height: 1;
  font-weight: 860;
  letter-spacing: -.04em;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.claim-relationship-field {
  margin-top: .85rem;
}

.claim-label-field {
  transition: opacity .18s ease;
}

.claim-label-field.is-hidden {
  opacity: 0;
}

.empty-state {
  padding: 1.1rem;
}

.empty-state h2,
.empty-state h3 {
  margin: 0 0 .45rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 100;
  width: min(390px, calc(100% - 2rem));
  padding: .85rem 1rem;
  border-radius: 18px;
  color: white;
  background: rgba(15, 23, 42, .94);
  border: 1px solid rgba(148, 163, 184, .25);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 780;
}

.toast.error {
  background: rgba(127, 29, 29, .95);
}

.capture-card {
  padding: 1.1rem;
  display: grid;
  gap: 3rem;
}

.camera-box {
  min-height: 280px;
  background: rgba(2, 6, 23, .86);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.camera-box video,
.camera-box img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.camera-empty {
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: .25rem;
}

.camera-empty b {
  color: #fff;
}

.capture-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.edit-action-rail {
  position: fixed;
  left: 1.15rem;
  right: 1.15rem;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 12;
  margin: 0;
  padding: 1rem 0 .7rem;
  background: transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .42s ease, transform .42s ease;
}

.edit-action-rail.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.edit-screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.edit-head {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 -1.15rem .7rem;
  padding: 0 1.15rem .65rem;
  background: transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.edit-head .back-button {
  margin-bottom: 0;
}

.edit-screen .detail-form.is-editing {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.detail-form-body {
  display: grid;
  gap: .95rem;
}

.game-detail-form {
  margin-top: 1rem;
  display: grid;
  gap: .95rem;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.playmaker-detail-form {
  margin-top: 1rem;
  display: grid;
  gap: .95rem;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.detail-group-card {
  padding: 0;
  overflow: hidden;
}

.detail-group-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.detail-group-row:last-child {
  border-bottom: 0;
}

.detail-group-label {
  color: #94a3b8;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding-top: .18rem;
}

.detail-group-label .field-note {
  display: block;
  margin-top: .18rem;
}

.detail-group-control {
  min-width: 0;
}

.detail-group-row.is-compact .detail-group-control {
  max-width: 12rem;
}

.detail-group-control input,
.detail-group-control select,
.detail-group-control textarea,
.detail-group-control .detail-value {
  width: 100%;
  transition: background-color .42s ease, border-color .42s ease, box-shadow .42s ease, color .42s ease, opacity .36s ease, transform .42s ease, border-radius .42s ease, padding .42s ease;
}

.detail-select-control {
  display: grid;
  align-items: center;
}

.detail-select-control .detail-value,
.detail-select-control select {
  grid-area: 1 / 1;
  transition: background-color .42s ease, border-color .42s ease, box-shadow .42s ease, color .42s ease, opacity .36s ease, transform .42s ease, border-radius .42s ease, padding .42s ease;
}

.game-detail-form .detail-group-control input,
.game-detail-form .detail-group-control select,
.game-detail-form .detail-group-control textarea {
  padding-left: .85rem;
  padding-right: .85rem;
}

.game-detail-form.is-editing .detail-group-control input,
.game-detail-form.is-editing .detail-group-control select,
.game-detail-form.is-editing .detail-group-control textarea {
  background: rgba(226, 232, 240, .12);
  border-radius: 12px;
  border-bottom-color: transparent;
  transform: translateY(0);
}

.game-detail-form.is-editing .detail-group-control input:focus,
.game-detail-form.is-editing .detail-group-control select:focus,
.game-detail-form.is-editing .detail-group-control textarea:focus {
  background: rgba(226, 232, 240, .16);
  border-bottom-color: transparent;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, .22);
}

.edit-screen .detail-form-body {
  align-content: start;
}

.edit-screen .detail-form.is-editing {
  padding-bottom: 0;
}

.edit-screen .detail-form.is-editing .detail-form-body,
.edit-screen .playmaker-profile-form.is-editing .detail-form-body {
  padding-bottom: 0;
}

.ghost-button {
  min-height: 48px;
  border-radius: 17px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: transparent;
  color: var(--soft);
  padding: .9rem 1rem;
  font-weight: 700;
}

.detail-form label,
.playmaker-profile-form label {
  gap: .22rem;
  color: #94a3b8;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
}

.detail-form,
.playmaker-profile-form,
.detail-panel {
  margin-top: 1rem;
  background: #020617;
}

.game-detail-form.detail-form {
  margin-top: 1rem;
  background: transparent;
}

.playmaker-detail-form.detail-form {
  margin-top: 1rem;
  background: transparent;
}

.playmaker-linked-game {
  margin-top: 1rem;
}

.detail-form input,
.detail-form select,
.detail-form textarea,
.detail-form .detail-value,
.playmaker-profile-form input,
.playmaker-profile-form select {
  display: block;
  height: 56px;
  min-height: 0;
  padding: .45rem 0 .3rem;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.15;
  transition: background-color .42s ease, border-color .42s ease, box-shadow .42s ease, color .42s ease, opacity .36s ease, transform .42s ease, border-radius .42s ease, padding .42s ease;
}

.detail-form .detail-value {
  display: flex;
  align-items: center;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 300;
  /* border-bottom: 1px solid transparent; */
}

.playmaker-profile-form .detail-select-control .detail-value {
  display: flex;
  align-items: center;
  height: 56px;
  min-height: 0;
  padding: .45rem 0 .3rem;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 300;
  line-height: 1.15;
}

.detail-form textarea {
  height: auto;
  min-height: 5.5rem;
}

.detail-group-control textarea {
  min-height: 4.5rem;
}

.detail-form.is-editing input,
.detail-form.is-editing select,
.detail-form.is-editing textarea,
.playmaker-profile-form.is-editing input,
.playmaker-profile-form.is-editing select {
  border-bottom-color: rgba(148, 163, 184, .28);
  transform: translateY(0);
}

.detail-form input:focus,
.detail-form select:focus,
.detail-form textarea:focus,
.playmaker-profile-form input:focus,
.playmaker-profile-form select:focus {
  border-bottom-color: rgba(96, 165, 250, .85);
  box-shadow: none;
}

.detail-form input:disabled,
.detail-form select:disabled,
.detail-form textarea:disabled,
.playmaker-profile-form input:disabled,
.playmaker-profile-form select:disabled {
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 300;
  opacity: 1;
  -webkit-text-fill-color: var(--text);
  resize: none;
}

.detail-form.is-editing input,
.detail-form.is-editing select,
.detail-form.is-editing textarea,
.playmaker-profile-form.is-editing input,
.playmaker-profile-form.is-editing select {
  font-size: 1.18rem;
}

.playmaker-profile-form.is-editing input,
.playmaker-profile-form.is-editing select {
  background: rgba(226, 232, 240, .08);
  border-radius: 10px;
  padding-left: .6rem;
  padding-right: .6rem;
}

.playmaker-profile-form.is-editing .detail-select-control .detail-value {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.playmaker-profile-form.is-editing .detail-select-control select {
  background: rgba(226, 232, 240, .08);
  border-radius: 10px;
  padding-left: .6rem;
  padding-right: .6rem;
  opacity: 1;
  transform: translateY(0);
}

.playmaker-profile-form.is-readonly .detail-select-control .detail-value {
  opacity: 1;
  transform: translateY(0);
}

.playmaker-profile-form.is-readonly .detail-select-control select {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .24s;
  animation-timing-function: ease;
}

.detail-form .field-note,
.playmaker-profile-form .field-note {
  color: #64748b;
  font-size: .72rem;
}

.detail-form.is-readonly select,
.playmaker-profile-form.is-readonly select {
  background-image: none;
  padding-right: 0;
}

@media (max-width: 720px) {
  .detail-group-row {
    grid-template-columns: minmax(92px, 128px) minmax(0, 1fr);
    gap: .75rem;
  }

  .detail-group-label {
    padding-top: .18rem;
  }
}

.detail-form.is-readonly textarea {
  overflow: hidden;
}

@keyframes ambient-breathe {
  0% {
    background-position: 10% 2%, 16% 8%, 84% 10%, 52% 40%, 58% 62%, 50% 102%, 22% 84%, 50% 50%;
    background-size: 132% 132%, 146% 146%, 150% 150%, 136% 136%, 122% 122%, 142% 142%, 126% 126%, 100% 100%;
  }
  50% {
    background-position: 14% 5%, 22% 12%, 78% 16%, 46% 46%, 52% 56%, 46% 98%, 28% 80%, 50% 50%;
    background-size: 138% 138%, 154% 154%, 158% 158%, 144% 144%, 128% 128%, 148% 148%, 132% 132%, 100% 100%;
  }
  100% {
    background-position: 8% 0%, 12% 4%, 88% 8%, 56% 36%, 62% 68%, 54% 106%, 18% 88%, 50% 50%;
    background-size: 136% 136%, 150% 150%, 154% 154%, 140% 140%, 126% 126%, 145% 145%, 129% 129%, 100% 100%;
  }
}

@keyframes ambient-grain {
  0% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(-1%, 1%, 0);
  }
  50% {
    transform: translate3d(1%, -1%, 0);
  }
  75% {
    transform: translate3d(1%, 1%, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

.file-fallback {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px dashed rgba(148, 163, 184, .28);
  border-radius: 16px;
  color: var(--muted);
  font-weight: 760;
}

.file-fallback input {
  display: none;
}

.roster-list {
  display: grid;
  gap: .75rem;
}

.roster-card {
  width: 100%;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
  align-items: center;
  text-align: left;
  background: #020617;
  border: none;
}

.roster-card h3 {
  margin: 0 0 .15rem;
}

.roster-card p {
  color: var(--soft);
  font-size: .86rem;
}

.roster-card small {
  color: var(--muted);
}

.roster-open {
  cursor: pointer;
}

/* Auth toggle */
.auth-toggle {
  text-align: center;
  margin-top: .95rem;
  font-size: .88rem;
  color: var(--muted);
}

.auth-toggle button {
  background: none;
  border: none;
  color: var(--blue);
  font-weight: 760;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

/* Account screen */
.account-body {
  padding-top: .5rem;
  display: grid;
  gap: .85rem;
  align-content: start;
}

.account-profile {
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.account-initial {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  box-shadow: var(--glow);
}

.account-info {
  flex: 1;
  min-width: 0;
}

.account-info h2 {
  margin: 0 0 .22rem;
  font-size: 1.2rem;
}

.account-info p {
  color: var(--muted);
  font-size: .88rem;
}

.account-actions {
  overflow: hidden;
  padding: 0;
}

.account-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.15rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: .97rem;
  font-weight: 760;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.account-row:last-child {
  border-bottom: 0;
}

.account-row b {
  display: block;
}

.account-row p {
  margin: .1rem 0 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
}

.account-row.danger {
  color: var(--coral);
}

.account-row-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .7);
  border: 1px solid var(--line);
  font-size: 1rem;
}

.account-row-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.account-row-icon.danger-icon {
  background: rgba(127, 29, 29, .3);
  border-color: rgba(251, 93, 74, .25);
  color: var(--coral);
}

.avatar-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: block;
  flex-shrink: 0;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .48rem .72rem;
  background: rgba(15, 23, 42, .7);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 760;
  margin-bottom: .65rem;
}

.back-button svg {
  width: 1.1rem;
  height: 1.1rem;
}

.edit-badge {
  pointer-events: none;
  opacity: .5;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.form-group-label {
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  font-weight: 900;
  margin-top: .3rem;
  padding-bottom: .1rem;
  border-bottom: 1px solid rgba(125, 211, 252, .14);
}

.field-note {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.roster-actions {
  display: flex;
  flex-direction: column;
  gap: .38rem;
}

.roster-actions .secondary-button {
  font-size: .8rem;
  padding: .55rem .65rem;
  white-space: nowrap;
}

.playmaker-switcher {
  color: #dbeafe;
  font-weight: 760;
  display: grid;
  gap: .4rem;
  margin-top: .2rem;
}

.playmaker-switcher select {
  padding: .6rem .85rem;
  border-radius: 14px;
}

@media (max-width: 520px) {
  .mobile-header {
    padding-top: max(.65rem, env(safe-area-inset-top));
  }

  .claim-code-field input.claim-code-input {
    font-size: 2.1rem;
  }

  .section-head.split {
    display: grid;
  }
}
