:root {
  color-scheme: light;
  --paper: #f3f5f7;
  --surface: #ffffff;
  --ink: #101820;
  --muted: #66717d;
  --line: #d8dde5;
  --field: #f5f7fa;
  --brand-yellow: #ffd21c;
  --brand-red: #d71920;
  --album-navy: #12233f;
  --album-blue: #2156a4;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --blue: #2457a6;
  --gold: #be7f00;
  --red: #b91f27;
  --green: #2f7d32;
  --shadow: 0 16px 44px rgba(16, 24, 32, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255, 210, 28, 0.22) 0 16px, transparent 16px 32px),
    radial-gradient(circle at 15% 10%, rgba(215, 25, 32, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(33, 86, 164, 0.10), transparent 42%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

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

button,
label.file-label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(36, 87, 166, 0.28);
  outline-offset: 2px;
}

.app-header,
main,
.source-footer {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
}

.auth-required {
  overflow: hidden;
}

.auth-required .app-header,
.auth-required main,
.auth-required .source-footer {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(255, 210, 28, 0.20) 0 16px, transparent 16px 32px),
    radial-gradient(circle at 15% 10%, rgba(215, 25, 32, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(18, 35, 63, 0.78), rgba(18, 35, 63, 0.52)),
    rgba(243, 245, 247, 0.92);
  backdrop-filter: blur(5px);
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 0;
  width: min(1080px, 100%);
  padding: 20px;
  border: 1px solid rgba(16, 24, 32, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.auth-intro-panel,
.auth-action-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.auth-intro-panel {
  padding: 6px 24px 6px 6px;
  border-right: 1px solid var(--line);
}

.auth-action-panel {
  padding-left: 24px;
}

.auth-logo {
  width: 144px;
  min-height: 78px;
}

.auth-card h2 {
  margin-bottom: 8px;
  color: var(--album-navy);
  font-size: 30px;
}

.auth-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

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

.auth-collection-option {
  display: grid;
  gap: 6px;
  min-height: 130px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 210, 28, 0.16), transparent 60%),
    #ffffff;
  color: var(--album-navy);
  text-align: left;
}

.auth-collection-option span {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.auth-collection-option strong {
  font-size: 22px;
  line-height: 1.05;
}

.auth-collection-option em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.auth-collection-option.active {
  border-color: var(--brand-red);
  box-shadow: inset 0 -4px 0 var(--brand-red);
}

.auth-collection-option[data-start-collection="adrenalyn"].active {
  border-color: var(--album-blue);
  box-shadow: inset 0 -4px 0 var(--album-blue);
}

.auth-benefit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-benefit-row span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--album-navy);
  font-size: 12px;
  font-weight: 900;
}

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

.auth-submit {
  width: 100%;
}

.demo-start-panel {
  display: grid;
  gap: 8px;
}

.auth-demo-button {
  width: 100%;
  min-height: 46px;
}

.auth-consent {
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.google-button-wrap {
  min-height: 42px;
}

.google-fallback-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.google-fallback-button:disabled {
  opacity: 0.78;
  cursor: not-allowed;
}

.google-g {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--album-navy);
  font-weight: 1000;
}

.auth-note {
  font-size: 13px;
}

.auth-language {
  display: grid;
  gap: 6px;
}

.consent-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 80;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.auth-required .consent-banner {
  display: none;
  top: auto;
  bottom: 16px;
}

.auth-required .consent-card {
  width: min(760px, 100%);
}

.consent-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  width: min(980px, 100%);
  padding: 16px;
  border: 1px solid rgba(18, 35, 63, 0.20);
  border-top: 5px solid var(--brand-yellow);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 210, 28, 0.15), transparent 56%),
    rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.consent-card h2 {
  margin-bottom: 4px;
  color: var(--album-navy);
  font-size: 22px;
}

.consent-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.consent-actions,
.analytics-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.consent-actions {
  justify-content: flex-end;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1500px, calc(100% - 32px));
  margin-top: 16px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(16, 24, 32, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(18, 35, 63, 0.96), rgba(18, 35, 63, 0.88)),
    repeating-linear-gradient(135deg, var(--brand-red) 0 14px, var(--brand-yellow) 14px 26px);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand-yellow);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: #ffffff;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-lockup {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 156px;
  min-height: 86px;
  padding: 10px;
  border: 3px solid var(--brand-red);
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 18%, rgba(255, 255, 255, 0.35) 18% 30%, transparent 30% 100%),
    var(--brand-yellow);
  box-shadow:
    0 8px 0 rgba(215, 25, 32, 0.18),
    var(--shadow);
  color: var(--album-navy);
  text-align: center;
  transform: rotate(-1deg);
}

.brand-lockup::before,
.brand-lockup::after {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  background: var(--brand-red);
  content: "";
}

.brand-lockup::before {
  top: 8px;
}

.brand-lockup::after {
  bottom: 8px;
}

.brand-mark-main {
  display: block;
  font-size: 30px;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
}

.brand-mark-sub {
  display: block;
  margin-top: 5px;
  color: var(--red);
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.brand-subtitle {
  margin: 8px 0 0;
  color: #e8eef8;
  font-weight: 700;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-badge {
  display: inline-flex;
  max-width: 260px;
  min-height: 38px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 210, 28, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  white-space: nowrap;
}

.save-status::before {
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--brand-yellow);
  box-shadow: 0 0 0 3px rgba(255, 210, 28, 0.18);
  content: "";
}

.save-status.saved::before {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.20);
}

.save-status.cloud.synced::before,
.save-status.cloud.idle::before {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.20);
}

.save-status.cloud.syncing::before,
.save-status.cloud.loading::before {
  background: var(--brand-yellow);
  box-shadow: 0 0 0 3px rgba(255, 210, 28, 0.18);
}

.save-status.browser::before,
.save-status.error::before {
  background: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.18);
}

.tool-button,
.primary-button,
.text-button,
.tab,
.qty-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  min-height: 38px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 120ms ease;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  font-weight: 800;
  white-space: nowrap;
}

#copyWhatsappButton {
  border-color: rgba(37, 211, 102, 0.46);
  background: rgba(37, 211, 102, 0.12);
  color: var(--album-navy);
}

#copyWhatsappButton:hover {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.20);
}

.whatsapp-logo {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
}

.whatsapp-logo svg {
  display: block;
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 3px rgba(16, 24, 32, 0.18));
}

.whatsapp-bubble {
  fill: #25d366;
}

.whatsapp-phone {
  fill: #ffffff;
}

.sign-in-button {
  border-color: rgba(255, 210, 28, 0.72);
  background: var(--brand-yellow);
  color: var(--album-navy);
}

.demo-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(1500px, calc(100% - 32px));
  margin: -2px auto 14px;
  padding: 12px 14px;
  border: 1px solid rgba(18, 35, 63, 0.24);
  border-left: 6px solid var(--brand-yellow);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 210, 28, 0.18), transparent 48%),
    #ffffff;
  box-shadow: 0 10px 24px rgba(16, 24, 32, 0.10);
}

.demo-banner div {
  display: grid;
  gap: 2px;
}

.demo-banner .album-kicker {
  margin-bottom: 2px;
}

.demo-banner strong {
  color: var(--album-navy);
  font-size: 18px;
  font-weight: 1000;
}

.demo-banner span:last-child {
  color: var(--muted);
  font-weight: 800;
}

.album-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  min-height: 164px;
  margin-bottom: 14px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 32, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(18, 35, 63, 0.94), rgba(18, 35, 63, 0.82)),
    repeating-linear-gradient(135deg, var(--brand-yellow) 0 18px, var(--brand-red) 18px 28px, var(--brand-yellow) 28px 44px);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.album-hero::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 78%, rgba(255, 210, 28, 0.92) 78% 82%, transparent 82%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 12px);
  content: "";
  pointer-events: none;
}

.album-copy,
.album-stack {
  position: relative;
  z-index: 1;
}

.album-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--album-navy);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.album-copy h2 {
  max-width: 760px;
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
}

.album-stack {
  height: 128px;
}

.mock-sticker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 94px;
  height: 124px;
  border: 6px solid #ffffff;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.18)),
    var(--brand-yellow);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
  color: var(--album-navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 1000;
  text-align: center;
}

.mock-sticker::after {
  position: absolute;
  inset: 13px;
  border: 2px dashed rgba(18, 35, 63, 0.28);
  border-radius: 6px;
  content: "";
}

.sticker-one {
  right: 154px;
  top: 5px;
  transform: rotate(-8deg);
}

.sticker-two {
  right: 86px;
  top: 0;
  background-color: #ffffff;
  transform: rotate(4deg);
}

.sticker-three {
  right: 20px;
  top: 10px;
  background-color: var(--brand-red);
  color: #ffffff;
  transform: rotate(11deg);
}

.sponsor-strip {
  margin-bottom: 14px;
}

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

.sponsor-side-slot {
  border-top: 1px solid var(--line);
}

.sponsor-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 92px;
  padding: 13px;
  border: 1px solid rgba(33, 86, 164, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 210, 28, 0.18), transparent 58%),
    #ffffff;
  box-shadow: var(--shadow);
  color: var(--ink);
  overflow: hidden;
  text-align: left;
  text-decoration: none;
}

.sponsor-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--brand-red), var(--brand-yellow), var(--album-blue));
  content: "";
}

.sponsor-card:hover,
.sponsor-card:focus-visible {
  border-color: var(--brand-red);
  background:
    linear-gradient(135deg, rgba(255, 210, 28, 0.24), transparent 62%),
    #ffffff;
  transform: translateY(-1px);
}

.sponsor-card.disabled {
  opacity: 0.82;
  box-shadow: none;
}

.sponsor-card.disabled:hover {
  border-color: rgba(33, 86, 164, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 210, 28, 0.18), transparent 58%),
    #ffffff;
  transform: none;
}

.sponsor-logo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid var(--brand-yellow);
  border-radius: 8px;
  background: var(--album-navy);
  color: var(--brand-yellow);
  font-size: 18px;
  font-weight: 1000;
  overflow: hidden;
}

.sponsor-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sponsor-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sponsor-label {
  color: var(--brand-red);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.sponsor-content strong {
  color: var(--album-navy);
  font-size: 18px;
  line-height: 1.15;
}

.sponsor-content span:last-child {
  color: var(--muted);
  font-weight: 700;
}

.sponsor-cta {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--album-navy);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  white-space: nowrap;
}

.sponsor-card.disabled .sponsor-cta {
  background: #eef1f5;
  color: var(--muted);
}

.sponsor-card-side {
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 0;
  padding: 13px 14px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(255, 210, 28, 0.18), transparent 72%),
    #ffffff;
  box-shadow: none;
}

.sponsor-card-side::before {
  width: 4px;
}

.sponsor-card-side .sponsor-logo {
  width: 44px;
  height: 44px;
  font-size: 14px;
}

.sponsor-card-side .sponsor-cta {
  grid-column: 2;
  justify-self: start;
  margin-top: 4px;
}

.sponsor-card-shop {
  min-height: 118px;
}

.tool-button:hover,
.text-button:hover,
.tab:hover,
.qty-button:hover {
  border-color: var(--album-blue);
  background: #eef4ff;
}

.tool-button:active,
.primary-button:active,
.text-button:active,
.tab:active,
.qty-button:active {
  transform: translateY(1px);
}

.tool-button.danger {
  color: var(--red);
}

.file-label {
  position: relative;
  overflow: hidden;
}

.file-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.primary-button {
  border-color: var(--brand-red);
  background: var(--brand-red);
  color: #ffffff;
  padding: 10px 14px;
  font-weight: 900;
}

.primary-button:hover {
  background: #a51218;
}

.text-button {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--blue);
  font-weight: 800;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.collection-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: -2px 0 14px;
}

.collection-option {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 210, 28, 0.18), transparent 58%),
    #ffffff;
  color: var(--album-navy);
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.collection-option strong {
  font-size: 22px;
  line-height: 1.05;
}

.collection-option span:last-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.collection-option.active {
  border-color: var(--brand-red);
  background:
    linear-gradient(135deg, rgba(255, 210, 28, 0.34), rgba(255, 255, 255, 0.92) 62%),
    #ffffff;
  box-shadow: inset 0 -4px 0 var(--brand-red), var(--shadow);
}

.collection-option[data-collection="adrenalyn"].active {
  box-shadow: inset 0 -4px 0 var(--album-blue), var(--shadow);
}

.summary-card,
.entry-strip,
.filter-bar,
.teams-panel,
.stickers-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.summary-card {
  position: relative;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
}

.summary-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--brand-yellow);
  content: "";
}

.summary-card:nth-child(2)::before {
  background: var(--brand-red);
}

.summary-card:nth-child(3)::before {
  background: var(--album-blue);
}

.summary-card:nth-child(4)::before {
  background: var(--teal);
}

.summary-label,
label > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin: 4px 0;
  color: var(--album-navy);
  font-size: 26px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.summary-note {
  color: var(--muted);
  font-size: 13px;
}

.entry-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border-top: 5px solid var(--brand-yellow);
}

.entry-strip p {
  margin-bottom: 0;
  color: var(--muted);
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--album-blue);
  background: #ffffff;
}

textarea {
  min-height: 74px;
  padding: 10px 11px;
  resize: vertical;
}

input,
select {
  min-height: 40px;
  padding: 8px 10px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(250px, 1.4fr) repeat(3, minmax(150px, 0.7fr));
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tab {
  padding: 8px 13px;
  font-weight: 900;
}

.tab.active {
  border-color: var(--brand-red);
  background: var(--brand-yellow);
  color: var(--album-navy);
  box-shadow: inset 0 -3px 0 var(--brand-red);
}

.workspace {
  --workspace-panel-height: calc(100vh - 28px);
  display: grid;
  grid-template-columns: 295px minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: stretch;
}

.map-dashboard {
  display: grid;
  gap: 14px;
}

.settings-dashboard {
  display: grid;
  gap: 14px;
}

.affiliate-dashboard {
  display: grid;
  gap: 14px;
}

.settings-heading,
.settings-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.settings-heading {
  padding: 18px;
  border-top: 5px solid var(--brand-yellow);
}

.settings-heading h2 {
  margin: 5px 0 6px;
  color: var(--album-navy);
  font-size: 28px;
}

.settings-heading p,
.settings-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.settings-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
}

.account-panel .tool-button {
  justify-self: start;
}

.analytics-panel {
  border-top: 5px solid var(--brand-yellow);
}

.analytics-actions {
  align-items: stretch;
}

.settings-fineprint {
  font-size: 13px;
}

.analytics-dashboard-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand-red);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.analytics-dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.analytics-dashboard-heading h3 {
  margin: 4px 0 6px;
  color: var(--album-navy);
  font-size: 24px;
}

.analytics-dashboard-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.analytics-dashboard-controls {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.analytics-dashboard-controls label {
  display: grid;
  gap: 5px;
  min-width: 120px;
}

.analytics-dashboard-body {
  display: grid;
  gap: 14px;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.analytics-kpi {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(33, 86, 164, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 210, 28, 0.14), transparent 60%),
    #ffffff;
}

.analytics-kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-kpi strong {
  display: block;
  margin-top: 4px;
  color: var(--album-navy);
  font-size: 26px;
  line-height: 1.05;
}

.analytics-events-panel,
.analytics-empty-state {
  padding: 12px;
  border: 1px solid rgba(33, 86, 164, 0.14);
  border-radius: 8px;
  background: #ffffff;
}

.analytics-events-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.analytics-events-heading h4 {
  margin: 0;
  color: var(--album-navy);
  font-size: 18px;
}

.analytics-events-heading span,
.analytics-empty-state span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.analytics-event-list {
  display: grid;
  gap: 8px;
}

.analytics-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.35fr);
  gap: 12px;
  align-items: center;
}

.analytics-event-row strong,
.analytics-event-row small,
.analytics-empty-state strong {
  display: block;
}

.analytics-event-row strong {
  color: var(--ink);
  font-weight: 900;
}

.analytics-event-row small {
  color: var(--muted);
  font-weight: 800;
}

.analytics-empty-state {
  display: grid;
  gap: 6px;
}

.sync-status {
  padding: 10px 12px;
  border: 1px solid rgba(33, 86, 164, 0.14);
  border-radius: 8px;
  background: rgba(33, 86, 164, 0.06);
}

.affiliate-heading,
.affiliate-disclosure {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.affiliate-heading {
  padding: 18px;
  border-top: 5px solid var(--brand-yellow);
  background:
    linear-gradient(135deg, rgba(255, 210, 28, 0.22), transparent 62%),
    rgba(255, 255, 255, 0.96);
}

.affiliate-heading h2 {
  margin: 5px 0 6px;
  color: var(--album-navy);
  font-size: 28px;
}

.affiliate-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.affiliate-disclosure {
  margin: 0;
  padding: 12px 14px;
  border-color: rgba(215, 25, 32, 0.20);
  background:
    linear-gradient(90deg, rgba(215, 25, 32, 0.08), transparent 60%),
    #ffffff;
  color: var(--album-navy);
  font-size: 13px;
  font-weight: 800;
}

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

.affiliate-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 11px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(33, 86, 164, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc),
    #ffffff;
  box-shadow: var(--shadow);
  color: var(--ink);
  overflow: hidden;
  text-decoration: none;
}

.affiliate-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow), var(--album-blue));
  content: "";
}

.affiliate-card:hover,
.affiliate-card:focus-visible {
  border-color: var(--brand-red);
  background:
    linear-gradient(135deg, rgba(255, 210, 28, 0.18), transparent 68%),
    #ffffff;
  transform: translateY(-1px);
}

.affiliate-card.disabled {
  opacity: 0.76;
  box-shadow: none;
}

.affiliate-card.disabled:hover {
  border-color: rgba(33, 86, 164, 0.18);
  background:
    linear-gradient(180deg, #ffffff, #f8fafc),
    #ffffff;
  transform: none;
}

.affiliate-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-top: 4px;
  border: 2px solid var(--brand-yellow);
  border-radius: 8px;
  background: var(--album-navy);
  color: var(--brand-yellow);
  font-size: 22px;
  font-weight: 1000;
  line-height: 1;
}

.affiliate-body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 7px;
  min-width: 0;
}

.affiliate-body strong {
  color: var(--album-navy);
  font-size: 18px;
  line-height: 1.15;
}

.affiliate-body span {
  color: var(--muted);
  font-weight: 700;
}

.affiliate-body em {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--album-navy);
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
  text-transform: uppercase;
}

.affiliate-card.disabled .affiliate-body em {
  background: #eef1f5;
  color: var(--muted);
}

.map-heading,
.world-map-card,
.map-inspector,
.leaderboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.map-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-top: 5px solid var(--brand-yellow);
}

.map-heading h2 {
  margin: 5px 0 6px;
  color: var(--album-navy);
  font-size: 28px;
}

.map-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: stretch;
}

.world-map-card {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(18, 35, 63, 0.94), rgba(18, 35, 63, 0.86)),
    repeating-linear-gradient(135deg, rgba(255, 210, 28, 0.16) 0 18px, transparent 18px 38px);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8eef8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #96a0ad;
}

.legend-dot.low {
  background: var(--brand-red);
}

.legend-dot.mid {
  background: var(--brand-yellow);
}

.legend-dot.done {
  background: var(--teal);
}

.world-map {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.world-silhouette {
  position: absolute;
  inset: 24px;
  width: calc(100% - 48px);
  height: calc(100% - 48px);
  opacity: 0.34;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.26));
  pointer-events: none;
}

.world-silhouette path {
  fill: #dce7f3;
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 3;
}

.world-map::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 49.9%, rgba(255, 255, 255, 0.10) 49.9% 50.1%, transparent 50.1%),
    linear-gradient(0deg, transparent 0 49.9%, rgba(255, 255, 255, 0.10) 49.9% 50.1%, transparent 50.1%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 9.09%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 12.5%);
  content: "";
  pointer-events: none;
}

.map-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background:
    conic-gradient(var(--marker-color) 0 var(--completion), rgba(255, 255, 255, 0.25) var(--completion) 360deg),
    rgba(255, 255, 255, 0.88);
  box-shadow:
    0 0 0 2px rgba(18, 35, 63, 0.30),
    0 8px 18px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.map-marker:hover,
.map-marker:focus-visible,
.map-marker.selected {
  z-index: 5;
  transform: translate(-50%, -50%) scale(1.25);
}

.map-marker.selected {
  box-shadow:
    0 0 0 4px var(--brand-yellow),
    0 10px 24px rgba(0, 0, 0, 0.32);
}

.marker-dot {
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: var(--album-navy);
}

.map-marker.done .marker-dot {
  background: var(--teal);
}

.map-marker.mid .marker-dot {
  background: var(--gold);
}

.map-marker.low .marker-dot {
  background: var(--brand-red);
}

.marker-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  display: none;
  min-width: max-content;
  max-width: 220px;
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--brand-yellow);
  color: var(--album-navy);
  font-size: 11px;
  font-weight: 1000;
  text-align: center;
  transform: translateX(-50%);
  white-space: nowrap;
}

.map-marker:hover .marker-label,
.map-marker:focus-visible .marker-label,
.map-marker.selected .marker-label {
  display: block;
}

.map-inspector {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.map-overview,
.selected-nation-card,
.missing-player-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.map-overview {
  border-color: rgba(215, 25, 32, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 210, 28, 0.22), transparent 70%),
    #ffffff;
}

.map-overview strong {
  display: block;
  color: var(--album-navy);
  font-size: 34px;
  line-height: 1;
}

.map-overview span:last-child {
  color: var(--muted);
  font-weight: 800;
}

.selected-nation-card {
  position: relative;
  overflow: hidden;
}

.selected-nation-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow));
  content: "";
}

.selected-nation-card h3,
.missing-player-card h3,
.leaderboard-panel h3 {
  margin: 0 0 10px;
  color: var(--album-navy);
  font-size: 18px;
}

.map-region {
  display: inline-flex;
  margin: 5px 0 8px;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.completion-ring {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 6px auto 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #ffffff 0 56%, transparent 57%),
    conic-gradient(var(--marker-color) 0 var(--completion), #e5eaf0 var(--completion) 360deg);
}

.completion-ring span {
  color: var(--album-navy);
  font-size: 26px;
  font-weight: 1000;
}

.selected-nation-card p,
.missing-player-card p,
.map-muted {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.map-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.missing-player-card ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.missing-player-card li {
  color: var(--ink);
  font-weight: 800;
}

.missing-player-card li span {
  display: inline-flex;
  min-width: 48px;
  margin-right: 6px;
  color: var(--brand-red);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 1000;
}

.map-leaderboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.leaderboard-panel {
  padding: 14px;
}

.leader-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.leader-row:hover {
  border-color: var(--brand-red);
  background: #fff8d6;
}

.leader-row small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.leader-percent {
  color: var(--album-navy);
  font-size: 18px;
  font-weight: 1000;
}

.leader-row .progress-track {
  grid-column: 1 / -1;
  margin-top: 0;
}

.teams-panel,
.stickers-panel,
.detail-panel {
  min-width: 0;
}

.stickers-panel {
  align-self: stretch;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: var(--workspace-panel-height);
  min-height: var(--workspace-panel-height);
  overflow: hidden;
}

.teams-panel,
.detail-panel {
  position: sticky;
  top: 14px;
  max-height: var(--workspace-panel-height);
  overflow: auto;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 210, 28, 0.18), transparent 55%),
    #ffffff;
}

.panel-heading h2 {
  color: var(--album-navy);
}

.panel-heading p {
  margin: 0;
  color: var(--muted);
}

.teams-list {
  padding: 10px;
}

.group-heading {
  margin: 12px 4px 6px;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-button {
  width: 100%;
  min-height: 58px;
  margin-bottom: 6px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.team-button:hover,
.team-button.active {
  border-color: var(--line);
  background: #fff8d6;
}

.team-button.active {
  border-color: var(--brand-red);
  box-shadow: inset 4px 0 0 var(--brand-red);
}

.team-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-name {
  min-width: 0;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-progress {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-track {
  height: 6px;
  margin-top: 7px;
  border-radius: 999px;
  background: #e5eaf0;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow), var(--teal));
}

.sticker-list-header,
.sticker-row {
  display: grid;
  grid-template-columns: 96px minmax(180px, 1.25fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) 106px;
  gap: 10px;
  align-items: center;
}

.sticker-list-header {
  padding: 10px 14px;
  border-bottom: 1px solid #263b63;
  background: var(--album-navy);
  color: #d8e3f0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sticker-list {
  min-height: 0;
  overflow: auto;
}

.sticker-row {
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #e4e8ee;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.sticker-row:hover,
.sticker-row.selected {
  background: #fff8d6;
}

.sticker-row:focus-visible {
  outline: 3px solid rgba(36, 87, 166, 0.28);
  outline-offset: -3px;
}

.sticker-row.missing .code-pill {
  border-color: #d8dde5;
  background: #eef1f5;
  color: #5b6570;
}

.code-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid rgba(215, 25, 32, 0.35);
  border-radius: 6px;
  background: var(--brand-yellow);
  color: var(--album-navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.sticker-main,
.sticker-team,
.sticker-meta {
  min-width: 0;
}

.sticker-main {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.sticker-copy {
  min-width: 0;
}

.face-card {
  position: relative;
  display: grid;
  width: 58px;
  height: 70px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 210, 28, 0.94);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 210, 28, 0.92), rgba(255, 255, 255, 0.58) 43%, rgba(215, 25, 32, 0.16)),
    #f8fafc;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 7px 14px rgba(16, 24, 32, 0.14);
  color: var(--album-navy);
  flex: 0 0 auto;
}

.face-card::before {
  position: absolute;
  inset: 6px 6px 18px;
  border: 1px solid rgba(18, 35, 63, 0.14);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 34%, rgba(18, 35, 63, 0.12), transparent 0 18px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(18, 35, 63, 0.05));
  content: "";
}

.face-card.has-image::before {
  content: none;
}

.face-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.face-card.special {
  background:
    linear-gradient(160deg, rgba(18, 35, 63, 0.96), rgba(33, 86, 164, 0.86)),
    var(--album-navy);
  color: #ffffff;
}

.face-card-head {
  position: absolute;
  top: 16px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(18, 35, 63, 0.78);
}

.face-card-head::after {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 36px;
  height: 28px;
  border-radius: 999px 999px 8px 8px;
  background: rgba(18, 35, 63, 0.72);
  content: "";
  transform: translateX(-50%);
}

.face-card.special .face-card-head,
.face-card.special .face-card-head::after {
  background: rgba(255, 210, 28, 0.88);
}

.face-card-initials {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  padding: 2px 4px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--album-navy);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

.face-card-code,
.face-card-position {
  position: absolute;
  z-index: 3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
}

.face-card-code {
  left: 5px;
  top: 5px;
  padding: 2px 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--album-navy);
}

.face-card-position {
  right: 5px;
  bottom: 5px;
  color: inherit;
}

.face-card.has-image .face-card-code {
  background: rgba(18, 35, 63, 0.86);
  color: #ffffff;
}

.sticker-name {
  display: block;
  min-width: 0;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticker-sub,
.sticker-team,
.sticker-meta {
  color: var(--muted);
  font-size: 13px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef1f5;
  color: #4a5562;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chip.rare,
.chip.legendary {
  background: var(--brand-yellow);
  color: var(--album-navy);
}

.chip.epic {
  background: #e8f1ff;
  color: var(--blue);
}

.chip.common {
  background: #e6f3e6;
  color: var(--green);
}

.quantity-control {
  display: grid;
  grid-template-columns: 32px minmax(28px, 1fr) 32px;
  align-items: center;
  gap: 4px;
}

.qty-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
}

.qty-value {
  min-width: 0;
  text-align: center;
  font-weight: 900;
}

.detail-content {
  padding: 14px;
}

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

.detail-code .code-pill {
  font-size: 15px;
}

.detail-title {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.meta-box {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.meta-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-box strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

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

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.source-footer {
  padding: 18px 0 26px;
  color: var(--muted);
  font-size: 13px;
}

.source-footer a {
  color: var(--blue);
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 36px));
  padding: 11px 13px;
  border: 1px solid #c9c2b6;
  border-radius: 8px;
  background: #17211d;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  padding: 40px 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

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

  .sponsor-card-wide {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .sponsor-card-wide .sponsor-cta {
    grid-column: 2;
    justify-self: start;
  }

  .demo-banner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .demo-banner .primary-button {
    justify-self: start;
  }

  .album-hero {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .map-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .world-map {
    min-height: 470px;
  }

  .detail-panel {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
}

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

  .auth-intro-panel {
    padding: 0 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-action-panel {
    padding: 16px 0 0;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .view-tabs {
    flex-wrap: nowrap;
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .tab {
    flex: 0 0 auto;
  }

  .summary-grid,
  .collection-switcher,
  .album-hero,
  .entry-strip,
  .filter-bar,
  .affiliate-grid,
  .sponsor-shop-grid,
  .settings-grid,
  .map-heading,
  .map-leaderboard,
  .workspace {
    grid-template-columns: 1fr;
  }

  .map-heading {
    display: grid;
  }

  .analytics-dashboard-heading {
    display: grid;
  }

  .analytics-dashboard-controls {
    justify-content: flex-start;
  }

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

  .world-map {
    min-height: 390px;
  }

  .map-actions {
    grid-template-columns: 1fr;
  }

  .album-hero {
    min-height: auto;
  }

  .album-copy h2 {
    font-size: 24px;
  }

  .album-stack {
    height: 104px;
  }

  .mock-sticker {
    width: 78px;
    height: 102px;
  }

  .sticker-one {
    left: 10px;
    right: auto;
  }

  .sticker-two {
    left: 82px;
    right: auto;
  }

  .sticker-three {
    left: 154px;
    right: auto;
  }

  .teams-panel {
    position: static;
    max-height: 320px;
  }

  .stickers-panel {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .sticker-list-header {
    display: none;
  }

  .sticker-row {
    grid-template-columns: 84px minmax(0, 1fr) 96px;
    gap: 8px;
  }

  .sticker-team,
  .sticker-meta {
    grid-column: 2 / -1;
  }

  .quantity-control {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 620px) {
  .consent-card {
    grid-template-columns: 1fr;
  }

  .consent-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .app-header,
  .demo-banner,
  main,
  .source-footer {
    width: min(100% - 20px, 1500px);
  }

  h1 {
    font-size: 25px;
  }

  .brand-area {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-lockup {
    width: 136px;
    min-height: 74px;
  }

  .brand-mark-main {
    font-size: 24px;
  }

  .tool-button {
    flex: 1 1 calc(50% - 8px);
  }

  .header-actions .tool-button {
    min-width: 0;
    white-space: normal;
  }

  .save-status {
    flex: 1 1 100%;
    justify-content: center;
  }

  .sign-in-button {
    flex: 1 1 100%;
  }

  .user-badge {
    flex: 1 1 100%;
    max-width: none;
    justify-content: center;
  }

  .world-map {
    min-height: 320px;
  }

  .map-marker {
    width: 20px;
    height: 20px;
  }

  .marker-dot {
    inset: 4px;
  }

  .sticker-row {
    grid-template-columns: 1fr;
    padding: 13px 12px;
  }

  .quantity-control,
  .sticker-team,
  .sticker-meta {
    grid-column: auto;
    grid-row: auto;
  }

  .quantity-control {
    width: min(100%, 150px);
  }

  .settings-heading,
  .affiliate-heading,
  .affiliate-disclosure,
  .settings-panel,
  .sponsor-card,
  .entry-strip,
  .filter-bar {
    padding: 12px;
  }

  .sponsor-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .sponsor-logo {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .sponsor-cta {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }

  .affiliate-card {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 0;
    padding: 12px;
  }

  .analytics-kpi-grid,
  .analytics-event-row {
    grid-template-columns: 1fr;
  }

  .affiliate-icon {
    width: 42px;
    height: 42px;
  }

  .auth-gate {
    align-items: start;
    padding: 12px;
  }

  .auth-card {
    padding: 14px;
  }

  .auth-collection-grid {
    grid-template-columns: 1fr;
  }

  .auth-collection-option {
    min-height: 0;
  }

  .auth-card h2 {
    font-size: 25px;
  }

  .consent-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .consent-card {
    padding: 12px;
  }

  .consent-card h2 {
    font-size: 20px;
  }
}
