@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-900-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --life-bg: #050505;
  --life-panel: #0b0b0b;
  --life-paper: #efeee8;
  --life-muted: #a6a49d;
  --life-dim: #74736e;
  --life-line: #2b2b2a;
  --life-line-strong: #555550;
  --life-acid: #caff00;
  --life-violet: #8d3cff;
  --life-gold: #f1c55b;
  --life-copper: #ae6534;
  --life-danger: #ff6e50;
  --display: "Barlow Condensed", "Bahnschrift Condensed", "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Bahnschrift", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--life-bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(141, 60, 255, .08), transparent 35%),
    var(--life-bg);
  color: var(--life-paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--life-acid);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--life-acid);
  color: #090b00;
  font-weight: 900;
}
.skip-link:focus { transform: none; }

.life-shell {
  min-height: 100vh;
  overflow-x: clip;
}
.life-nav {
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  padding: 0 clamp(20px, 3vw, 48px);
  border-bottom: 1px solid var(--life-line);
  background: rgba(5, 5, 5, .94);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
}
.life-brand {
  width: max-content;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--life-paper);
  text-decoration: none;
}
.life-brand span {
  font: 900 25px/.8 var(--display);
  letter-spacing: .04em;
}
.life-brand small {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.view-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 30px;
}
.view-tab {
  min-width: 54px;
  padding: 3px 4px 0;
  border: 0;
  border-bottom: 4px solid transparent;
  background: transparent;
  color: #b7b6b0;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.view-tab:hover { color: var(--life-paper); }
.view-tab.is-active {
  border-bottom-color: var(--life-acid);
  color: var(--life-paper);
}
.new-card-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid var(--life-acid);
  background: var(--life-acid);
  color: #0b0d00;
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.life-nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}
.life-lang-switcher {
  min-width: 46px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--life-line);
  background: transparent;
  color: var(--life-paper);
  font: 900 12px/1 var(--mono);
  letter-spacing: .08em;
  cursor: pointer;
}
.life-lang-switcher:hover,
.life-lang-switcher:focus-visible {
  border-color: var(--life-acid);
  color: var(--life-acid);
}
.new-card-button:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(202,255,0,.18); }
.new-card-button svg, .story-pagination svg, .story-block svg, .close-creator svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.loading-state {
  min-height: calc(100vh - 64px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--life-muted);
  font: 500 12px var(--mono);
  letter-spacing: .08em;
}
.loading-mark {
  width: 70px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid var(--life-acid);
  color: var(--life-acid);
  font: 900 34px var(--display);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  animation: pulse 1.1s ease-in-out infinite alternate;
}
.life-shell[data-app-state="ready"] .loading-state { display: none; }
.life-shell[data-app-state="loading"] .app-view { display: none; }

.collection-view {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: clamp(32px, 5vh, 66px) clamp(20px, 3vw, 48px) 46px;
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(330px, 1fr) minmax(300px, .92fr);
  grid-template-areas:
    "copy card story"
    "deck deck deck"
    "method method method";
  gap: 30px clamp(28px, 4vw, 72px);
  align-items: center;
}
.hero-copy { grid-area: copy; align-self: stretch; padding-top: clamp(16px, 5vh, 58px); }
.hero-copy h1 {
  margin: 0;
  font: 900 clamp(50px, 4.2vw, 68px)/.9 var(--display);
  letter-spacing: -.055em;
  text-wrap: balance;
}
.hero-copy h1 span { display: block; white-space: nowrap; }
.hero-copy > p {
  max-width: 25em;
  margin: 27px 0 34px;
  color: #c7c5bd;
  font-size: 14px;
  line-height: 1.8;
}
.week-window {
  width: min(100%, 330px);
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-block: 1px solid var(--life-line);
}

.checkin-panel {
  width: min(100%, 330px);
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding: 14px;
  border: 1px solid var(--life-line-strong);
  background:
    linear-gradient(125deg, rgba(202, 255, 0, .07), transparent 55%),
    #080808;
}
.checkin-panel > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.checkin-panel > header div { display: grid; gap: 4px; }
.checkin-panel > header span,
.checkin-panel > small {
  color: var(--life-muted);
  font: 500 8px/1.4 var(--mono);
  letter-spacing: .1em;
}
.checkin-panel h2 { margin: 0; font: 900 22px/.9 var(--display); }
.checkin-panel > header strong { color: var(--life-acid); font: 900 24px/.9 var(--display); }
.checkin-track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.checkin-track li {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--life-line);
  color: var(--life-dim);
  font: 500 9px var(--mono);
}
.checkin-track li.is-complete {
  border-color: var(--life-acid);
  background: var(--life-acid);
  color: #090b00;
}
.checkin-track li.is-reward { box-shadow: inset 0 -3px 0 var(--life-violet); }
.checkin-panel > p {
  min-height: 32px;
  margin: 0;
  color: #c9c7c0;
  font-size: 11px;
  line-height: 1.5;
}
.checkin-button,
.checkin-account-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--life-acid);
  background: var(--life-acid);
  color: #0b0d00;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.checkin-button:disabled { border-color: var(--life-line-strong); background: #151515; color: var(--life-dim); cursor: default; }
.checkin-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.checkin-account-actions a:last-child { background: transparent; color: var(--life-paper); border-color: var(--life-line-strong); }
.checkin-panel[data-checkin-state="reward"] { border-color: var(--life-acid); }
.checkin-panel[data-checkin-state="reward"] > p { color: var(--life-acid); font-weight: 900; }
.checkin-panel + .week-window { margin-top: 18px; }
.week-window span {
  color: var(--life-acid);
  font: 500 10px var(--mono);
  letter-spacing: .08em;
}
.week-window strong {
  color: var(--life-paper);
  font: 900 22px var(--display);
  letter-spacing: .04em;
}
.week-window small { color: var(--life-muted); font: 500 10px var(--mono); }
.weekly-goal {
  width: min(100%, 330px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 16px;
  color: var(--life-muted);
}
.weekly-goal div:first-child { display: grid; gap: 6px; }
.weekly-goal span {
  color: var(--life-acid);
  font: 500 11px var(--mono);
}
.weekly-goal strong { color: var(--life-paper); font-size: 13px; }
.weekly-goal > b {
  align-self: end;
  color: var(--life-acid);
  font: 500 11px var(--mono);
}
.goal-track {
  grid-column: 1 / -1;
  height: 5px;
  background: #30302f;
  overflow: hidden;
}
.goal-track i {
  width: 66.666%;
  height: 100%;
  display: block;
  background: var(--life-acid);
  transition: width .6s var(--ease);
}
.text-action {
  margin-top: 26px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  color: var(--life-paper);
  text-decoration: none;
  cursor: pointer;
}
.text-action span { margin-left: 12px; color: var(--life-acid); font-size: 20px; }

.selected-card-stage {
  grid-area: card;
  display: grid;
  place-items: center;
  min-width: 0;
  perspective: 1200px;
}
.life-card {
  --rarity: #c8c8c0;
  --rarity-rgb: 200, 200, 192;
  --grade-color: #c8c8c0;
  position: relative;
  color: var(--life-paper);
  background: #080808;
  border: 1px solid rgba(var(--rarity-rgb), .72);
  clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px);
  isolation: isolate;
}
.life-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(var(--rarity-rgb), .38);
  clip-path: inherit;
}
.rarity-common { --rarity: #c5c5be; --rarity-rgb: 197, 197, 190; }
.rarity-uncommon { --rarity: #f1c55b; --rarity-rgb: 241, 197, 91; }
.rarity-rare { --rarity: #9b55ff; --rarity-rgb: 155, 85, 255; }
.rarity-icon { --rarity: #d9d9d1; --rarity-rgb: 217, 217, 209; }
.grade-base { --grade-color: #9a9993; }
.grade-featured { --grade-color: #58bfff; }
.grade-special { --grade-color: #caff00; }
.grade-landmark { --grade-color: #f1c55b; }
.entity-event { --rarity: #caff00; --rarity-rgb: 202, 255, 0; }
.entity-dj { --rarity: #a662ff; --rarity-rgb: 166, 98, 255; }
.entity-venue { --rarity: #58bfff; --rarity-rgb: 88, 191, 255; }
.entity-genre { --rarity: #c8c8c0; --rarity-rgb: 200, 200, 192; }
.life-card--hero {
  width: min(100%, 430px);
  aspect-ratio: 3 / 3.65;
  padding: 7px;
  filter: drop-shadow(0 28px 35px rgba(0,0,0,.56));
  transform: rotateY(-1.5deg);
  transition: transform .5s var(--ease), filter .5s var(--ease);
}
.life-card--hero:hover { transform: rotateY(1deg) translateY(-5px); filter: drop-shadow(0 34px 46px rgba(141,60,255,.2)); }
.card-foil {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  mix-blend-mode: color-dodge;
  background:
    linear-gradient(115deg, transparent 15%, rgba(108,225,255,.45) 29%, rgba(255,116,213,.45) 42%, transparent 58%),
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(255,255,255,.1) 18px, transparent 19px 34px);
  background-size: 180% 180%, 100% 100%;
  animation: foil-shift 8s ease-in-out infinite alternate;
}
.rarity-common .card-foil { opacity: .08; }
.rarity-uncommon .card-foil { opacity: .18; filter: sepia(1); }
.rarity-rare .card-foil { opacity: .28; }
.card-art {
  height: 72%;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(var(--rarity-rgb), .75);
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--rarity-rgb), .25), transparent 42%),
    #161616;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px);
}
.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #080808 0, transparent 36%),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(255,255,255,.025) 5px);
  pointer-events: none;
}
.card-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 25%;
  filter: saturate(.76) contrast(1.06);
}
.generated-art {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 24%, rgba(var(--rarity-rgb), .34), transparent 18%),
    repeating-radial-gradient(circle at 20% 90%, transparent 0 13px, rgba(var(--rarity-rgb), .09) 14px 15px),
    linear-gradient(145deg, #252525, #090909 54%, rgba(var(--rarity-rgb), .26));
}
.generated-art span {
  color: rgba(255,255,255,.8);
  font: 900 clamp(88px, 12vw, 150px)/1 var(--display);
  filter: drop-shadow(8px 8px 0 rgba(var(--rarity-rgb), .24));
  transform: rotate(-7deg);
}
.card-rating {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 24px;
  display: grid;
}
.card-rating strong { color: #f7f5e8; font: 900 72px/.72 var(--display); letter-spacing: -.04em; text-shadow: 0 1px 12px #000; }
.card-rating strong { color: var(--rarity); }
.card-rating strong.marker--compact { font-size: 58px; }
.card-rating strong.marker--wide { font-size: 45px; letter-spacing: -.02em; }
.card-rating span { margin-top: 8px; color: #fff; font: 700 9px/1.15 var(--mono); text-shadow: 0 1px 8px #000; }
.card-type {
  position: absolute;
  z-index: 2;
  top: 23px;
  right: 22px;
  display: grid;
  justify-items: end;
  color: white;
  text-shadow: 0 1px 8px #000;
}
.card-type span { font-size: 13px; font-weight: 900; }
.card-type small { margin-top: 4px; font: 500 9px var(--mono); }
.card-serial-side {
  position: absolute;
  z-index: 2;
  right: 5px;
  top: 40%;
  color: var(--rarity);
  font: 500 8px var(--mono);
  writing-mode: vertical-rl;
  letter-spacing: .16em;
}
.card-grade-seal {
  position: absolute;
  z-index: 7;
  right: 18px;
  bottom: 14px;
  padding: 5px 8px 4px;
  border: 1px solid var(--grade-color);
  background: rgba(5, 5, 5, .86);
  color: var(--grade-color);
  font: 500 8px/1 var(--mono);
  letter-spacing: .1em;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .34);
  pointer-events: none;
}
.life-card--hero > .card-grade-seal {
  top: 18px;
  bottom: auto;
  right: 18px;
}
.card-identity {
  height: 28%;
  display: grid;
  align-content: end;
  padding: 0 26px 20px;
  position: relative;
  background:
    linear-gradient(115deg, rgba(var(--rarity-rgb), .12), transparent 55%),
    #080808;
}
.card-identity::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 20px;
  width: 57%;
  height: 13px;
  background: #080808;
  border: 1px solid rgba(var(--rarity-rgb), .7);
  border-bottom: 0;
  clip-path: polygon(12px 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
}
.card-identity h2 {
  margin: 0;
  overflow: hidden;
  color: white;
  font: 900 clamp(26px, 2.2vw, 38px)/.92 var(--display);
  letter-spacing: -.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.card-stats {
  height: 17%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: stretch;
  padding: 0 18px 10px;
}
.card-stats div {
  display: grid;
  align-content: center;
  justify-items: center;
  border-left: 1px solid var(--life-line);
}
.card-stats div:first-child { border-left: 0; }
.card-stats dt { color: #d2d0c7; font-size: 9px; }
.card-stats dd { margin: 5px 0 0; color: var(--rarity); font: 500 18px/1 var(--mono); }

.selected-story { grid-area: story; align-self: stretch; min-width: 0; padding-top: 2px; }
.story-pagination {
  height: 43px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 20px;
  border-bottom: 1px solid var(--life-line);
}
.story-pagination button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--life-muted);
  font: 500 11px var(--mono);
  cursor: pointer;
}
.story-pagination button:last-child { justify-self: end; }
.story-pagination button:hover { color: var(--life-acid); }
.story-pagination span { color: var(--life-muted); font: 500 10px var(--mono); letter-spacing: .14em; }
.story-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--life-line);
}
.story-block h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--life-paper);
  font: 900 12px var(--body);
}
.story-block h3 svg { color: var(--life-acid); }
.story-block p { margin: 0; color: #c9c7c0; font-size: 13px; line-height: 1.85; white-space: pre-line; }
.story-facts { display: grid; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--life-line); }
.story-facts > div { display: grid; gap: 7px; }
.story-facts span { color: var(--life-muted); font: 500 10px var(--mono); }
.story-facts strong { font-size: 12px; font-weight: 700; }
.story-facts ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.story-facts li {
  padding: 5px 8px;
  border: 1px solid rgba(141,60,255,.6);
  color: #b778ff;
  font: 500 9px var(--mono);
}
.grade-panel {
  display: grid;
  grid-template-columns: 126px 1fr;
  margin-top: 14px;
  border: 1px solid var(--life-line-strong);
  background:
    linear-gradient(125deg, rgba(202, 255, 0, .055), transparent 46%),
    #080808;
}
.grade-panel > header {
  min-height: 82px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 12px 14px;
  border-right: 1px solid var(--life-line);
}
.grade-panel > header div { display: grid; gap: 5px; }
.grade-panel > header span,
.grade-panel > header small {
  margin-top: 7px;
  color: var(--life-muted);
  font: 500 9px var(--mono);
  letter-spacing: .08em;
}
.grade-panel > header h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}
.grade-panel > header h3 strong {
  color: var(--life-acid);
  font: 900 25px/.9 var(--display);
}
.grade-panel > header h3 b {
  color: var(--life-paper);
  font: 500 12px var(--mono);
}
.grade-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.grade-metrics > div {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px 10px;
  border-left: 1px solid var(--life-line);
}
.grade-metrics > div:first-child { border-left: 0; }
.grade-metrics span { color: var(--life-muted); font: 500 8px var(--mono); }
.grade-metrics strong {
  overflow: hidden;
  color: var(--life-paper);
  font: 900 16px/1 var(--display);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.grade-reasons {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 9px 12px 5px;
  border-top: 1px solid var(--life-line);
  list-style: none;
}
.grade-reasons li {
  padding: 4px 7px;
  border: 1px solid rgba(202, 255, 0, .32);
  color: #d5f67e;
  font: 500 8px var(--mono);
}
.grade-panel > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 3px 12px 9px;
  color: var(--life-muted);
  font-size: 10px;
  line-height: 1.6;
}
.collection-action-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--life-line);
}
.collection-action-row > div { display: grid; gap: 5px; }
.collection-action-row > div > span { font-size: 12px; font-weight: 900; }
.collection-action-row > div > small { color: var(--life-muted); font-size: 9px; line-height: 1.45; }
#selected-collection-mount { flex: 0 0 auto; }
.card-collection-target--selected .entity-like-control { position: static; }
.card-collection-target--selected .entity-like-button {
  min-width: 94px;
  border-radius: 0;
  border-color: var(--life-acid);
  color: var(--life-acid);
}
.story-footer { display: grid; gap: 7px; padding-top: 17px; color: #65645f; font: 500 9px var(--mono); }
.story-footer b { color: #8d8b84; font-weight: 500; }
.detail-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  border-bottom: 1px solid var(--life-acid);
  color: var(--life-acid);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
.detail-link:hover { color: var(--life-paper); }

.deck-section {
  grid-area: deck;
  min-width: 0;
  padding-top: 20px;
  border-top: 1px solid var(--life-line);
}
.deck-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 0 6px 18px;
}
.deck-header h2 { margin: 0; font: 900 26px var(--display); letter-spacing: .01em; }
.deck-header h2 span { color: var(--life-muted); font: 500 13px var(--mono); }
.deck-filters { display: flex; align-items: center; }
.deck-filters button {
  min-width: 72px;
  padding: 8px 14px;
  border: 0;
  border-left: 1px solid var(--life-line);
  background: transparent;
  color: var(--life-muted);
  font-size: 12px;
  cursor: pointer;
}
.deck-filters button:first-child { border-left: 0; }
.deck-filters button:hover { color: var(--life-paper); }
.deck-filters button.is-active {
  box-shadow: inset 0 0 0 1px var(--life-acid);
  color: var(--life-acid);
}
.weekly-score { display: flex; align-items: center; gap: 13px; }
.weekly-score span { color: var(--life-muted); font-size: 11px; }
.weekly-score strong { color: var(--life-acid); font: 500 31px var(--mono); }
.score-bars { height: 22px; display: flex; align-items: end; gap: 2px; }
.score-bars i { width: 2px; height: 40%; background: var(--life-acid); }
.score-bars i:nth-child(2n) { height: 75%; }
.score-bars i:nth-child(3n) { height: 100%; }
.score-bars i:nth-child(5n) { height: 55%; }
.content-mix {
  display: grid;
  grid-template-columns: auto repeat(4, auto auto);
  align-items: center;
  gap: 5px 8px;
  color: var(--life-muted);
  font: 500 8px var(--mono);
}
.content-mix > span { margin-right: 4px; color: var(--life-muted); }
.content-mix i { width: 20px; height: 4px; background: var(--mix-color); }
.content-mix b { font-weight: 500; white-space: nowrap; }
.content-mix .mix-event { --mix-color: var(--life-acid); }
.content-mix .mix-dj { --mix-color: var(--life-violet); }
.content-mix .mix-venue { --mix-color: #58bfff; }
.content-mix .mix-genre { --mix-color: #9b9a94; }
.deck-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 232px;
  gap: clamp(16px, 2vw, 28px);
  overflow-x: auto;
  padding: 2px 6px 24px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--life-line-strong) transparent;
}
.deck-rail::-webkit-scrollbar { height: 4px; }
.deck-rail::-webkit-scrollbar-track { background: transparent; }
.deck-rail::-webkit-scrollbar-thumb { background: var(--life-line-strong); }
.deck-card {
  width: 100%;
  aspect-ratio: 3 / 3.7;
  padding: 5px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform .35s var(--ease), filter .35s var(--ease), opacity .35s ease;
}
.deck-card-select {
  position: absolute;
  z-index: 6;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.deck-card-select:focus-visible {
  outline: 2px solid var(--life-acid);
  outline-offset: -7px;
}
.deck-card:hover, .deck-card.is-selected { transform: translateY(-8px); filter: drop-shadow(0 14px 20px rgba(var(--rarity-rgb), .16)); }
.deck-card.is-selected { box-shadow: 0 0 0 2px var(--life-acid); }
.deck-card .card-art { height: 72%; }
.deck-card .card-art img { filter: grayscale(.15) saturate(.8) contrast(1.06); }
.deck-card .generated-art span { font-size: 76px; }
.deck-card .card-rating { top: 15px; left: 15px; }
.deck-card .card-rating strong { font-size: 49px; }
.deck-card .card-rating strong.marker--compact { font-size: 39px; }
.deck-card .card-rating strong.marker--wide { font-size: 31px; }
.deck-card .card-rating span { margin-top: 5px; font-size: 7px; }
.deck-card .card-type { top: 15px; right: 14px; }
.deck-card .card-type span { font-size: 9px; }
.deck-card .card-type small { font-size: 7px; }
.deck-card .card-identity { height: 28%; gap: 8px; padding: 0 15px 13px; }
.deck-card .card-identity h2 { font-size: clamp(18px, 1.8vw, 25px); }
.deck-card .card-stats { display: none; }
.deck-card .card-grade-seal {
  right: 10px;
  bottom: 9px;
  padding: 4px 6px 3px;
  font-size: 6px;
}
.deck-card .card-collection-target {
  position: absolute;
  z-index: 9;
  right: 9px;
  top: 10px;
}
.deck-card .card-collection-target .entity-like-control { position: static; }
.deck-card .card-collection-target .entity-like-button {
  min-width: 42px;
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 0;
  background: rgba(5, 5, 5, .9);
  font-size: 9px;
}
.deck-card .card-collection-target .entity-like-button::after { display: none; }
.empty-deck {
  min-height: 290px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  border: 1px dashed var(--life-line-strong);
}

.rating-method {
  grid-area: method;
  display: grid;
  grid-template-columns: minmax(250px, .75fr) minmax(520px, 1.6fr);
  gap: clamp(32px, 6vw, 90px);
  padding: clamp(38px, 6vw, 76px) 6px 20px;
  border-top: 1px solid var(--life-line);
}
.rating-method header > span {
  color: var(--life-acid);
  font: 500 9px var(--mono);
  letter-spacing: .16em;
}
.rating-method h2 {
  margin: 10px 0 16px;
  font: 900 clamp(34px, 3.6vw, 54px)/.92 var(--display);
}
.rating-method header p,
.rating-method li p,
.rating-gates {
  margin: 0;
  color: var(--life-muted);
  font-size: 12px;
  line-height: 1.75;
}
.rating-method ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--life-line);
  border: 1px solid var(--life-line);
  list-style: none;
}
.rating-method li {
  min-height: 180px;
  display: grid;
  align-content: space-between;
  gap: 30px;
  padding: 22px;
  background: #080808;
}
.rating-method li > strong {
  color: var(--life-acid);
  font: 900 42px/.9 var(--display);
}
.rating-method li h3 { margin: 0 0 8px; font: 900 18px var(--display); }
.rating-gates {
  grid-column: 2;
  padding: 16px 2px 0;
}
.rating-gates b { margin-right: 10px; color: var(--life-paper); }
.empty-deck > span { color: var(--life-acid); font: 500 11px var(--mono); }
.empty-deck h3 { margin: 14px 0 7px; font: 900 34px var(--display); }
.empty-deck p { max-width: 31em; margin: 0 0 20px; color: var(--life-muted); font-size: 13px; line-height: 1.6; }
.empty-deck button { padding: 10px 14px; border: 1px solid var(--life-acid); background: transparent; color: var(--life-acid); font-weight: 900; cursor: pointer; }
.empty-deck a {
  padding: 10px 14px;
  border: 1px solid var(--life-acid);
  color: var(--life-acid);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.timeline-view, .data-view {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 110px) 0 80px;
}
.section-heading { display: grid; grid-template-columns: 1fr auto; gap: 8px 30px; padding-bottom: 30px; border-bottom: 1px solid var(--life-line); }
.section-heading p { grid-column: 1; margin: 0; color: var(--life-acid); font-size: 13px; font-weight: 800; }
.section-heading h1 { grid-column: 1; margin: 0; font: 900 clamp(54px, 8vw, 96px)/.9 var(--display); letter-spacing: -.04em; }
.section-heading > span { grid-column: 2; grid-row: 1 / 3; align-self: end; color: var(--life-muted); font: 500 11px var(--mono); }
.life-timeline { margin: 0; padding: 36px 0; list-style: none; }
.timeline-entry {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 26px;
  align-items: center;
  min-height: 88px;
  border-bottom: 1px solid var(--life-line);
}
.timeline-entry time { color: var(--life-muted); font: 500 11px var(--mono); }
.timeline-entry div { display: grid; gap: 6px; }
.timeline-entry h2 { margin: 0; font: 900 25px var(--display); }
.timeline-entry p { margin: 0; color: var(--life-muted); font-size: 12px; }
.timeline-entry strong { color: var(--life-acid); font: 500 30px var(--mono); }
.data-view { display: grid; grid-template-columns: 230px 1fr; gap: 46px 70px; }
.data-view .section-heading { grid-column: 1 / -1; }
.data-score { min-height: 240px; display: grid; place-content: center; justify-items: center; border: 1px solid var(--life-line-strong); }
.data-score > span { color: var(--life-muted); font: 500 10px var(--mono); }
.data-score strong { color: var(--life-acid); font: 900 116px/.9 var(--display); letter-spacing: -.04em; }
.data-score small { color: var(--life-paper); font-size: 12px; font-weight: 900; }
.attribute-report { display: grid; gap: 16px; align-content: center; }
.attribute-row { display: grid; grid-template-columns: 76px 1fr 58px; gap: 14px; align-items: center; }
.attribute-row span { font-size: 12px; }
.attribute-row i { height: 5px; background: var(--life-line); overflow: hidden; }
.attribute-row i::after { content: ""; display: block; width: var(--score); height: 100%; background: var(--life-acid); }
.attribute-row.entity-event i::after { background: var(--life-acid); }
.attribute-row.entity-dj i::after { background: var(--life-violet); }
.attribute-row.entity-venue i::after { background: #58bfff; }
.attribute-row.entity-genre i::after { background: #9b9a94; }
.attribute-row strong { color: var(--life-acid); font: 500 13px var(--mono); }
.rarity-report { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--life-line); }
.rarity-report h2 { margin: 0 0 20px; font: 900 28px var(--display); }
#coverage-report { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--life-line); border: 1px solid var(--life-line); }
.rarity-stat { min-height: 100px; display: grid; align-content: center; padding: 18px; background: var(--life-bg); }
.rarity-stat span { color: var(--life-muted); font-size: 10px; }
.rarity-stat strong { margin-top: 6px; color: var(--grade-color); font: 900 34px var(--display); }
.grading-method-note {
  max-width: 66em;
  margin: 16px 0 0;
  color: var(--life-muted);
  font-size: 11px;
  line-height: 1.7;
}

.card-creator {
  width: min(760px, calc(100% - 24px));
  max-height: min(860px, calc(100svh - 24px));
  padding: 0;
  border: 1px solid var(--life-line-strong);
  background: #0a0a0a;
  color: var(--life-paper);
  box-shadow: 0 30px 90px #000;
}
.card-creator::backdrop { background: rgba(0,0,0,.84); backdrop-filter: blur(6px); }
.card-creator[open] { animation: dialog-in .32s var(--ease); }
#card-form { display: grid; }
.creator-head {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  border-bottom: 1px solid var(--life-line);
}
.creator-head span { color: var(--life-acid); font: 500 9px var(--mono); letter-spacing: .14em; }
.creator-head h2 { margin: 5px 0 0; font: 900 31px var(--display); }
.close-creator {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--life-line-strong);
  background: transparent;
  cursor: pointer;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px 26px 20px;
}
.field { display: grid; gap: 7px; }
.field--wide { grid-column: 1 / -1; }
.field > span, .stat-editor legend { color: var(--life-muted); font: 500 10px var(--mono); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--life-line-strong);
  border-radius: 0;
  background: #101010;
  color: var(--life-paper);
  font-size: 13px;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #595854; }
.stat-editor { margin: 0; padding: 20px 26px 22px; border: 0; border-top: 1px solid var(--life-line); }
.stat-editor legend { padding: 0 8px 0 0; }
#stat-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 28px; }
.stat-input { display: grid; grid-template-columns: 44px 1fr 28px; gap: 10px; align-items: center; }
.stat-input label { font-size: 11px; }
.stat-input output { color: var(--life-acid); font: 500 11px var(--mono); text-align: right; }
.stat-input input { width: 100%; accent-color: var(--life-acid); }
.creator-footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-top: 1px solid var(--life-line);
}
.live-rating { display: grid; margin-right: auto; }
.live-rating span { color: var(--life-muted); font: 500 9px var(--mono); }
.live-rating strong { color: var(--life-acid); font: 900 30px var(--display); }
.secondary-button, .save-card-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--life-line-strong);
  background: transparent;
  color: var(--life-paper);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.save-card-button { border-color: var(--life-acid); background: var(--life-acid); color: #090b00; }

.app-toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100% - 48px));
  padding: 13px 16px;
  transform: translateY(calc(100% + 48px));
  opacity: 0;
  visibility: hidden;
  border-left: 3px solid var(--life-acid);
  background: var(--life-paper);
  color: #111;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  transition: transform .3s var(--ease), opacity .2s ease, visibility 0s linear .3s;
}
.app-toast.is-visible {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.app-toast.is-error { border-left-color: var(--life-danger); }

@keyframes foil-shift {
  to { background-position: 100% 100%, 0 0; }
}
@keyframes pulse {
  to { opacity: .45; transform: scale(.96); }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
}

@media (max-width: 1060px) {
  .collection-view {
    grid-template-columns: minmax(220px, .7fr) minmax(330px, 1fr);
    grid-template-areas:
      "copy card"
      "story story"
      "deck deck";
  }
  .selected-story {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 0 34px;
    padding-top: 10px;
    border-top: 1px solid var(--life-line);
  }
  .story-pagination { grid-column: 1 / -1; }
  .story-footer { grid-column: 2; }
  .deck-header { grid-template-columns: auto 1fr; }
  .weekly-score { display: none; }
}

@media (max-width: 720px) {
  .life-nav {
    height: 58px;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 0 14px;
    background: #050505;
    backdrop-filter: none;
  }
  .life-brand small { display: none; }
  .view-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    height: max(58px, calc(50px + env(safe-area-inset-bottom)));
    justify-content: space-around;
    padding: 0 12px env(safe-area-inset-bottom);
    border-top: 1px solid var(--life-line);
    background: rgba(5,5,5,.96);
    backdrop-filter: blur(14px);
  }
  .view-tab { width: 30%; border-top: 3px solid transparent; border-bottom: 0; font-size: 12px; }
  .view-tab.is-active { border-top-color: var(--life-acid); border-bottom-color: transparent; }
  .new-card-button { min-height: 38px; padding: 0 13px; font-size: 12px; }
  .new-card-button svg { width: 15px; }
  .collection-view {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "card" "story" "deck" "method";
    gap: 28px;
    padding: 30px 16px 100px;
  }
  .hero-copy { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 0; }
  .hero-copy h1 { grid-column: 1 / -1; font-size: clamp(40px, 13.6vw, 56px); }
  html[data-lang="en"] .hero-copy h1 {
    font-size: clamp(34px, 10.4vw, 44px);
    letter-spacing: -.035em;
  }
  .hero-copy h1 span:last-child { white-space: normal; }
  .checkin-panel { grid-column: 1 / -1; width: 100%; margin-top: 8px; }
  .checkin-panel + .week-window { margin-top: 0; }
  .hero-copy > p { grid-column: 1 / -1; margin: 7px 0 6px; font-size: 13px; }
  .weekly-goal { align-self: end; }
  .text-action { align-self: end; margin: 0; white-space: nowrap; }
  .life-card--hero { width: min(100%, 390px); }
  .selected-story { display: block; padding-top: 0; }
  .story-footer { padding-bottom: 4px; }
  .deck-section { padding-top: 14px; }
  .deck-header { grid-template-columns: 1fr; gap: 14px; }
  .deck-filters { overflow-x: auto; }
  .deck-filters button { flex: 1 0 auto; }
  .deck-rail { grid-auto-columns: minmax(190px, 72vw); }
  .rating-method { grid-template-columns: 1fr; gap: 24px; padding-top: 42px; }
  .rating-method ol { grid-template-columns: 1fr; }
  .rating-method li { min-height: 132px; }
  .rating-gates { grid-column: 1; }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading h1, .section-heading p, .section-heading > span { grid-column: 1; grid-row: auto; }
  .timeline-view, .data-view { width: calc(100% - 32px); padding: 46px 0 100px; }
  .timeline-entry { grid-template-columns: 88px 1fr auto; gap: 12px; }
  .data-view { grid-template-columns: 1fr; gap: 28px; }
  .data-view .section-heading, .rarity-report { grid-column: 1; }
  .data-score { min-height: 190px; }
  #coverage-report { grid-template-columns: 1fr 1fr; }
  .grade-metrics strong { font-size: 16px; }
  .grade-panel { grid-template-columns: 1fr; }
  .grade-panel > header {
    min-height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--life-line);
  }
  .grade-panel > header small { margin-top: 0; }
  .collection-action-row { align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; padding-inline: 18px; }
  .field--wide { grid-column: 1; }
  .creator-head, .creator-footer, .stat-editor { padding-inline: 18px; }
  #stat-inputs { grid-template-columns: 1fr; }
  .creator-footer { flex-wrap: wrap; }
  .live-rating { width: 100%; grid-template-columns: auto auto; justify-content: start; align-items: baseline; gap: 10px; }
  .secondary-button, .save-card-button { flex: 1; }
}

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