@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&family=Segoe+UI:wght@400;600;700&display=swap');

:root {
  --f-d: 'Rajdhani', 'Bahnschrift SemiCondensed', 'Bahnschrift', 'DIN Condensed', 'Arial Narrow', system-ui, sans-serif;
  --f-b: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --f-m: 'JetBrains Mono', 'Cascadia Mono', Consolas, 'SF Mono', Menlo, monospace;

  --neon: #00f0ff;
  --mag: #ff2bd1;
  --acid: #d6ff3f;
  --amber: #ffb02e;
  --red: #ff5470;

  --bg0: #04060c;
  --bg1: #080d18;
  --ink: #e6f1ff;
  --body: #c6d4e6;
  --dim: #8fa3bd;

  --edge: color-mix(in oklab, var(--neon) 24%, transparent);
  --edge-hot: color-mix(in oklab, var(--neon) 75%, transparent);
  --glow: color-mix(in oklab, var(--neon) 30%, transparent);
  --wash: color-mix(in oklab, var(--neon) 9%, transparent);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  background-color: var(--bg0);
  color: var(--ink);
  font-family: var(--f-b);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* Background Grid Pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-color: #04060c;
  background-image: 
    linear-gradient(color-mix(in oklab, var(--neon) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--neon) 5%, transparent) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
}

/* Radial Glow Orbs */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: 
    radial-gradient(90% 60% at 12% -10%, color-mix(in oklab, var(--neon) 14%, transparent), transparent 60%),
    radial-gradient(70% 50% at 100% 0%, rgba(255, 43, 209, 0.1), transparent 60%),
    radial-gradient(120% 90% at 50% 100%, rgba(4, 6, 12, 0.9), transparent 70%);
}

/* Scanlines overlay */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0 1px, transparent 1px 3px);
}

::selection {
  background: var(--neon);
  color: var(--bg0);
}

a {
  color: var(--neon);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--mag);
}

input::placeholder {
  color: #6f829b;
  letter-spacing: .14em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg0);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.2);
  border: 1px solid var(--edge);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon);
}

/* Animations */
@keyframes vaultGlitch {
  0% { text-shadow: none; transform: translate3d(0, 0, 0); }
  22% { text-shadow: 3px 0 rgba(255, 43, 209, 0.95), -3px 0 rgba(0, 240, 255, 0.95); transform: translate3d(-2px, 0, 0); }
  48% { text-shadow: -2px 0 rgba(255, 43, 209, 0.9), 2px 0 rgba(0, 240, 255, 0.9); transform: translate3d(2px, 0, 0); }
  74% { text-shadow: 1px 0 rgba(255, 43, 209, 0.7), -1px 0 rgba(0, 240, 255, 0.7); transform: translate3d(-1px, 0, 0); }
  100% { text-shadow: none; transform: translate3d(0, 0, 0); }
}

@keyframes vaultSweep {
  from { transform: translate3d(-140%, 0, 0); }
  to { transform: translate3d(260%, 0, 0); }
}

@keyframes vaultFlash {
  0% { opacity: 0.2; transform: scale(0.94); }
  35% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

/* Layout Wrappers */
.wrap {
  position: relative;
  min-height: 100vh;
}

.main-content {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 24px 32px;
}

/* Sticky Cyber Header */
.vault-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(4, 6, 12, 0.97), rgba(4, 6, 12, 0.78));
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px 24px;
  flex-wrap: wrap;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sys-tag {
  font-family: var(--f-m);
  font-size: 10px;
  letter-spacing: .32em;
  color: var(--neon);
}

.vault-title {
  margin: 0;
  font-family: var(--f-d);
  font-weight: 600;
  font-size: 27px;
  line-height: 1;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: #fff;
}

.vault-title a {
  color: #fff;
  text-decoration: none;
}

.count-badge {
  font-family: var(--f-m);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--neon);
  padding: 7px 13px;
  background: rgba(6, 10, 18, 0.8);
  box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.header-spacer {
  flex: 1 1 40px;
}

/* Skewed Navigation */
.vault-nav {
  display: flex;
  gap: 6px;
  transform: skewX(-11deg);
}

.nav-btn {
  position: relative;
  overflow: hidden;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 11px 24px;
  background: rgba(8, 13, 24, 0.85);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--neon) 18%, transparent);
  color: #e6f1ff;
  font-family: var(--f-d);
  font-size: 14px;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.nav-btn:hover {
  box-shadow: inset 0 0 0 1px var(--edge-hot);
  color: #fff;
}

.nav-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.nav-btn span {
  position: relative;
  display: block;
  transform: skewX(11deg);
}

.nav-btn.active {
  background: color-mix(in oklab, var(--neon) 13%, transparent);
  box-shadow: inset 0 0 0 1px var(--neon);
  color: #fff;
}

.nav-btn.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--neon) 13%, transparent);
  box-shadow: inset 0 0 0 1px var(--neon);
}

.nav-btn.active::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 34%;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
  animation: vaultSweep 720ms cubic-bezier(.3, .8, .2, 1) 1 both;
}

/* Search and Filter Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
}

.search-box {
  position: relative;
  flex: 1 1 280px;
  min-width: 0;
}

.search-prompt {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-m);
  font-size: 13px;
  color: var(--neon);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 13px 14px 13px 34px;
  background: rgba(6, 10, 18, 0.85);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--edge);
  color: #eaf7ff;
  font-family: var(--f-m);
  font-size: 14px;
  letter-spacing: .06em;
  transition: box-shadow 0.2s ease, outline 0.2s ease;
}

.search-input:focus {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 1px var(--edge-hot), 0 0 18px var(--glow);
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  position: relative;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 11px 16px;
  background: rgba(8, 13, 24, 0.8);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--neon) 16%, transparent);
  color: #e6f1ff;
  font-family: var(--f-d);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.filter-btn:hover {
  box-shadow: inset 0 0 0 1px var(--edge-hot);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.filter-btn.active {
  box-shadow: inset 0 0 0 1px var(--neon);
  background: color-mix(in oklab, var(--neon) 12%, transparent);
}

.filter-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--neon);
  box-shadow: 0 0 10px var(--glow);
}

/* Status Bar */
.records-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
}

.records-count {
  font-family: var(--f-m);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--dim);
  white-space: nowrap;
}

.records-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--edge), transparent);
}

/* Game Library Grid */
.vault-grid {
  display: grid;
  gap: 20px 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.game-card {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: block;
  position: relative;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(.2, .7, .2, 1);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.game-card:hover, .game-card:focus-visible {
  transform: translate3d(0, -5px, 0);
}

.game-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}

.cover-frame {
  position: relative;
  aspect-ratio: 616 / 353;
  overflow: hidden;
  background: #060a12;
  box-shadow: inset 0 0 0 1px var(--edge);
  transition: box-shadow 180ms ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.game-card:hover .cover-frame {
  box-shadow: inset 0 0 0 1px var(--edge-hot), 0 0 26px var(--glow), 0 18px 36px rgba(0, 0, 0, 0.65);
}

/* GFN Red Warning Card Glow */
.game-card.gfn-red .cover-frame {
  box-shadow: inset 0 0 0 1px rgba(255, 84, 112, 0.55), 0 0 18px rgba(255, 84, 112, 0.25);
}

.game-card.gfn-red:hover .cover-frame {
  box-shadow: inset 0 0 0 1px var(--red), 0 0 30px rgba(255, 84, 112, 0.55), 0 18px 36px rgba(0, 0, 0, 0.75);
}

.game-card.gfn-red .corner-bracket {
  border-color: var(--red);
}

.cover-frame .art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .art {
  transform: scale(1.05);
}

.cover-frame .scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scrim.top { background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 55%); }
.scrim.bottom { background: linear-gradient(to top, rgba(0,0,0,.7), transparent 55%); }
.scrim.left { background: linear-gradient(to right, rgba(0,0,0,.65), transparent 60%); }
.scrim.top-left { background: linear-gradient(to bottom right, rgba(0,0,0,.6), transparent 55%); }
.scrim.top-right { background: linear-gradient(to bottom left, rgba(0,0,0,.55), transparent 55%); }

.cover-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(110% 80% at 18% 12%, var(--wash), transparent 62%), linear-gradient(180deg, rgba(4, 6, 12, 0) 40%, rgba(4, 6, 12, 0.72));
}

.glitch-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 2;
}

.game-card:hover .glitch-title {
  animation: vaultGlitch 240ms steps(4, end) 1 both;
}

.card-title-text {
  font-family: var(--f-d);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.cover-frame .logo {
  position: absolute;
  height: auto;
  z-index: 3;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
  transition: transform 0.3s ease;
}

.cover-frame .logo.glow-light { filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.75)); }
.cover-frame .logo.glow-none { filter: none; }

.logo.top-left { left: 6%; top: 9%; }
.logo.top-center { left: 50%; top: 8%; transform: translateX(-50%); }
.logo.top-right { right: 5%; top: 9%; }
.logo.left { left: 6%; top: 50%; transform: translateY(-50%); }
.logo.center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.logo.bottom-left { left: 4%; bottom: 6%; }
.logo.bottom-center { left: 50%; bottom: 5%; transform: translateX(-50%); }
.logo.bottom-right { right: 4%; bottom: 7%; }

/* Corner Brackets */
.corner-bracket {
  position: absolute;
  width: 13px;
  height: 13px;
  pointer-events: none;
  opacity: .85;
  z-index: 4;
}

.corner-tl { left: 0; top: 0; border-left: 1px solid var(--neon); border-top: 1px solid var(--neon); }
.corner-tr { right: 0; top: 0; border-right: 1px solid var(--neon); border-top: 1px solid var(--neon); }
.corner-bl { left: 0; bottom: 0; border-left: 1px solid var(--neon); border-bottom: 1px solid var(--neon); }
.corner-br { right: 0; bottom: 0; border-right: 1px solid var(--neon); border-bottom: 1px solid var(--neon); }

.card-footer {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
  padding: 11px 2px 0;
}

.card-name {
  font-family: var(--f-d);
  font-size: 16px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #e6f1ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-code {
  font-family: var(--f-m);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--dim);
  white-space: nowrap;
}

/* Empty State */
.empty-state {
  margin-top: 8px;
  padding: 48px 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.9), rgba(6, 10, 18, 0.92));
  box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.empty-title {
  font-family: var(--f-d);
  font-size: 26px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mag);
}

.empty-detail {
  margin-top: 12px;
  font-family: var(--f-m);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--dim);
}

.reset-btn {
  margin-top: 22px;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 12px 20px;
  background: rgba(6, 10, 18, 0.85);
  box-shadow: inset 0 0 0 1px var(--edge-hot);
  color: var(--neon);
  font-family: var(--f-d);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: background 0.2s ease;
}

.reset-btn:hover {
  background: color-mix(in oklab, var(--neon) 14%, transparent);
}

.reset-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

/* Game Detail Page */
.back-btn {
  display: inline-block;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 9px 14px 9px 10px;
  background: rgba(6, 10, 18, 0.8);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--neon);
  font-family: var(--f-d);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 18px;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.back-btn:hover {
  box-shadow: inset 0 0 0 1px var(--edge-hot);
  background: color-mix(in oklab, var(--neon) 12%, transparent);
  color: var(--neon);
}

.back-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 26px;
  background: #070b14;
  box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
}

.hero-backdrop {
  position: absolute;
  inset: -12%;
  background-size: cover;
  background-position: center;
  filter: blur(44px) saturate(1.25) brightness(.5);
  transform: scale(1.12);
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(4, 6, 12, 0.92), rgba(4, 6, 12, 0.62) 55%, rgba(4, 6, 12, 0.9));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.detail-cover {
  flex: 1 1 320px;
  max-width: 460px;
  min-width: 0;
}

.detail-cover .cover-frame {
  box-shadow: inset 0 0 0 1px var(--edge-hot), 0 0 30px var(--glow);
}

.detail-cover .card-title-text {
  font-size: 34px;
}

.hero-info {
  flex: 2 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.record-tag {
  font-family: var(--f-m);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--neon);
}

.detail-title {
  margin: 0;
  font-family: var(--f-d);
  font-weight: 600;
  font-size: 42px;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  text-wrap: balance;
}

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

.tag-pill {
  font-family: var(--f-m);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--neon);
  padding: 7px 12px;
  background: rgba(6, 10, 18, 0.82);
  box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.warning-box {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(40, 26, 4, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 46, 0.45);
}

.warning-icon {
  font-family: var(--f-d);
  font-size: 16px;
  letter-spacing: .1em;
  color: var(--amber);
  flex: 0 0 auto;
}

.warning-header {
  font-family: var(--f-d);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--amber);
}

.warning-text {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #ffdca8;
  text-wrap: pretty;
}

/* Account Sections */
.account-section {
  position: relative;
  margin-top: 22px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.9), rgba(6, 10, 18, 0.93));
  box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.account-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.account-title {
  margin: 0;
  font-family: var(--f-d);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}

.account-tag {
  font-family: var(--f-m);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--dim);
}

.account-lead {
  margin: 14px 0 0;
  max-width: 74ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}

/* Chips / Metadata Row */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chip-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  background: rgba(6, 10, 18, 0.85);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.chip-label {
  font-family: var(--f-d);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--dim);
}

.chip-val {
  font-family: var(--f-m);
  font-size: 13px;
  color: #eaf7ff;
  overflow-wrap: anywhere;
}

.chip-link {
  font-family: var(--f-d);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--neon);
}

.chip-link:hover {
  color: var(--mag);
}

/* Credentials Grid & Sets */
.sets-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  margin-top: 20px;
}

.set-card {
  position: relative;
  padding: 16px;
  background: rgba(7, 11, 20, 0.9);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.set-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in oklab, var(--neon) 16%, transparent);
}

.set-name {
  font-family: var(--f-d);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
}

.set-readout {
  font-family: var(--f-m);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--mag);
}

.group-label {
  font-family: var(--f-d);
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--neon);
  padding: 6px 0 8px;
}

.cred-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.cred-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(4, 7, 14, 0.8);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--neon) 14%, transparent);
}

.cred-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cred-k {
  font-family: var(--f-d);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--dim);
}

.cred-v {
  font-family: var(--f-m);
  font-size: 14px;
  line-height: 1.45;
  color: #eaf7ff;
  overflow-wrap: anywhere;
  user-select: all;
}

.cred-v.missing {
  color: var(--amber);
  font-size: 13px;
  user-select: auto;
}

.copy-btn {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 0 0 1px var(--edge-hot);
  color: var(--neon);
  font-family: var(--f-m);
  font-size: 10px;
  letter-spacing: .18em;
  transition: background 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  background: color-mix(in oklab, var(--neon) 16%, transparent);
}

.copy-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

.copy-btn.done {
  color: var(--acid);
  text-shadow: 0 0 10px rgba(214, 255, 63, 0.8);
  animation: vaultFlash 260ms ease-out 1 both;
}

.set-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #a9bad0;
  text-wrap: pretty;
}

/* Also on this account */
.also-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in oklab, var(--neon) 16%, transparent);
}

.also-lbl {
  font-family: var(--f-d);
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--dim);
}

.also-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.also-pill {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 8px 12px;
  background: rgba(6, 10, 18, 0.85);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--neon);
  font-family: var(--f-d);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.also-pill:hover {
  background: color-mix(in oklab, var(--neon) 14%, transparent);
  box-shadow: inset 0 0 0 1px var(--edge-hot);
  color: var(--neon);
}

.also-pill:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

/* Instructions Page Styles */
.jump-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.jump-lbl {
  font-family: var(--f-m);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--neon);
}

.jump-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 9px 13px;
  background: rgba(6, 10, 18, 0.85);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--neon);
  font-family: var(--f-d);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease;
}

.jump-btn:hover {
  background: color-mix(in oklab, var(--neon) 14%, transparent);
  color: var(--neon);
}

.jump-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.notice-amber {
  margin-top: 22px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(40, 26, 4, 0.55), rgba(14, 11, 6, 0.8));
  box-shadow: inset 0 0 0 1px rgba(255, 176, 46, 0.42);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.notice-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notice-title-amber {
  margin: 0;
  font-family: var(--f-d);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
}

.notice-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.notice-item {
  display: flex;
  gap: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: #ffdca8;
  text-wrap: pretty;
}

.notice-prefix-amber {
  font-family: var(--f-m);
  font-size: 12px;
  color: var(--amber);
  flex: 0 0 auto;
  padding-top: 3px;
}

.notice-red {
  margin-top: 16px;
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(52, 8, 20, 0.6), rgba(16, 6, 10, 0.85));
  box-shadow: inset 0 0 0 1px rgba(255, 84, 112, 0.5);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.notice-tag-red {
  font-family: var(--f-m);
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--red);
}

.notice-title-red {
  margin: 0;
  font-family: var(--f-d);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
}

.notice-text-red {
  margin: 12px 0 0;
  max-width: 80ch;
  font-size: 15px;
  line-height: 1.6;
  color: #ffc9d3;
  text-wrap: pretty;
}

.guide-card {
  position: relative;
  margin-top: 22px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.9), rgba(6, 10, 18, 0.93));
  box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.guide-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}

.guide-num {
  font-family: var(--f-m);
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--mag);
}

.guide-title {
  margin: 0;
  font-family: var(--f-d);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}

.guide-ru {
  font-family: var(--f-m);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--dim);
}

.step-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-badge {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-m);
  font-size: 12px;
  color: var(--neon);
  background: rgba(4, 7, 14, 0.85);
  box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.step-content {
  min-width: 0;
  padding-top: 5px;
}

.step-text {
  margin: 0;
  max-width: 78ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}

.step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  align-items: center;
}

.key-pill {
  font-family: var(--f-m);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--acid);
  padding: 5px 9px;
  background: rgba(4, 7, 14, 0.9);
  box-shadow: inset 0 0 0 1px rgba(214, 255, 63, 0.4);
}

.path-pill {
  font-family: var(--f-m);
  font-size: 12px;
  color: #eaf7ff;
  padding: 5px 9px;
  background: rgba(4, 7, 14, 0.9);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.subtext-tag {
  font-family: var(--f-m);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--dim);
}

code {
  background: rgba(4, 7, 14, 0.9);
  border: 1px solid var(--edge);
  padding: 2px 6px;
  font-family: var(--f-m);
  font-size: 13px;
  color: var(--neon);
}

/* Footer */
.vault-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--edge);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-family: var(--f-m);
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--dim);
}

/* Global Overflow Protection */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.wrap {
  overflow-x: hidden;
  width: 100%;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px;
    gap: 12px;
  }
  .vault-title {
    font-size: 20px;
    letter-spacing: .12em;
  }
  .count-badge {
    font-size: 11px;
    padding: 5px 9px;
  }
  .main-content {
    padding: 16px 14px 24px;
  }
  .vault-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
    width: 100%;
  }
  .detail-hero {
    padding: 18px;
  }
  .hero-content {
    gap: 16px;
  }
  .detail-title {
    font-size: 28px;
  }
  .sets-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .vault-header {
    top: 0;
  }
  .header-inner {
    padding: 10px 12px;
    gap: 8px 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  .brand-block {
    flex: 1 1 auto;
    min-width: 0;
  }
  .sys-tag {
    font-size: 9px;
    letter-spacing: .2em;
  }
  .vault-title {
    font-size: 17px;
    letter-spacing: .08em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .count-badge {
    font-size: 10px;
    padding: 4px 8px;
    letter-spacing: .1em;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .header-spacer {
    display: none;
  }
  .vault-nav {
    transform: none;
    gap: 4px;
    flex-shrink: 0;
  }
  .nav-btn {
    padding: 7px 12px;
    font-size: 12px;
    letter-spacing: .12em;
  }
  .nav-btn span {
    transform: none;
  }

  /* Compact 2-column mobile game grid */
  .vault-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
    width: 100%;
  }
  .card-title-text {
    font-size: 14px;
    letter-spacing: .06em;
  }
  .card-footer {
    padding: 6px 1px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }
  .card-name {
    font-size: 12px;
    letter-spacing: .04em;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .card-code {
    font-size: 9px;
    letter-spacing: .06em;
    min-width: 0;
  }

  /* Compact toolbar */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }
  .search-box {
    flex: none;
    width: 100%;
    min-width: 0;
  }
  .search-input {
    font-size: 16px;
    padding: 10px 12px 10px 30px;
  }
  .filter-group {
    display: flex;
    width: 100%;
    min-width: 0;
    gap: 4px;
  }
  .filter-btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 8px 2px;
    font-size: 11px;
    letter-spacing: .04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Lock overlay dialog mobile optimization */
  .lock-box {
    padding: 22px 18px;
    max-width: 92vw;
  }
  .lock-title {
    font-size: 22px;
  }

  /* Detail hero & account blocks */
  .detail-hero {
    padding: 14px;
  }
  .detail-title {
    font-size: 24px;
  }
  .account-section {
    padding: 16px 14px;
    margin-top: 14px;
  }
  .account-title {
    font-size: 20px;
  }
  .cred-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .chip-box {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
  }
}

@media (max-width: 360px) {
  .vault-title {
    font-size: 15px;
  }
  .vault-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 8px;
  }
  .card-name {
    font-size: 11px;
  }
}

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

/* Security Lock Screen Overlay */
.lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(4, 6, 12, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lock-overlay.unlock-anim {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.lock-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.96), rgba(6, 10, 18, 0.98));
  box-shadow: inset 0 0 0 1px var(--edge), 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px var(--glow);
  clip-path: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lock-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  appearance: none;
  border: 0;
  background: rgba(8, 13, 24, 0.8);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--dim);
  font-family: var(--f-m);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lock-close-btn:hover {
  color: var(--neon);
  box-shadow: inset 0 0 0 1px var(--edge-hot);
  background: color-mix(in oklab, var(--neon) 12%, transparent);
}

.lock-close-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

.lock-box.glitch-shake {
  animation: lockShake 0.4s ease 1;
}

@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); border-color: var(--red); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.lock-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.1);
  box-shadow: inset 0 0 0 1px var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-m);
  font-size: 20px;
  color: var(--neon);
}

.lock-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lock-sys-tag {
  font-family: var(--f-m);
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--neon);
}

.lock-title {
  margin: 0;
  font-family: var(--f-d);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}

.lock-subtitle {
  margin: 0;
  font-size: 13.5px;
  color: var(--dim);
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lock-input-group {
  position: relative;
  width: 100%;
}

.lock-input-prompt {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-m);
  font-size: 13px;
  color: var(--neon);
  pointer-events: none;
}

.lock-input {
  width: 100%;
  padding: 13px 14px 13px 34px;
  background: rgba(4, 7, 14, 0.9);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--edge);
  color: #eaf7ff;
  font-family: var(--f-m);
  font-size: 15px;
  letter-spacing: .1em;
  transition: box-shadow 0.2s ease;
}

.lock-input:focus {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 1px var(--edge-hot), 0 0 18px var(--glow);
}

.lock-submit-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 13px 24px;
  background: var(--neon);
  color: var(--bg0);
  font-family: var(--f-d);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.lock-submit-btn:hover {
  background: var(--acid);
  box-shadow: 0 0 20px rgba(214, 255, 63, 0.6);
}

.lock-error {
  display: none;
  padding: 10px 12px;
  background: rgba(52, 8, 20, 0.85);
  box-shadow: inset 0 0 0 1px var(--red);
  color: var(--red);
  font-family: var(--f-m);
  font-size: 12px;
  letter-spacing: .12em;
  text-align: center;
}

/* Inline Credential Unlock Banner */
.cred-unlock-banner {
  margin-top: 18px;
  padding: 16px 20px;
  background: rgba(6, 10, 18, 0.95);
  box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.unlock-banner-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unlock-banner-title {
  font-family: var(--f-d);
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
}

.unlock-inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-pass-group {
  max-width: 180px;
}

.inline-lock-input {
  padding-block: 7px;
  font-size: 14px;
}

.unlock-submit-btn {
  padding: 7px 12px;
  background: var(--neon);
  color: var(--bg0);
  font-weight: 700;
}

.locked-val {
  color: var(--dim);
  letter-spacing: .2em;
  user-select: none;
}

.cred-unlocked-banner {
  margin-top: 18px;
  padding: 12px 18px;
  background: rgba(214, 255, 63, 0.06);
  box-shadow: inset 0 0 0 1px rgba(214, 255, 63, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Stop zoom gestures on mobile across the vault */
html, body {
  touch-action: pan-x pan-y;
}

/* Prevent iOS Safari from auto-zooming on search and passcode inputs */
@media (max-width: 768px) {
  .search-input,
  .lock-input,
  .inline-lock-input,
  #inlinePassInput,
  #passInput {
    font-size: 16px !important;
  }
}

@media (max-width: 540px) {
  .cred-unlock-banner {
    padding: 14px;
    gap: 12px;
  }
  .unlock-inline-form {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 8px;
  }
  .unlock-inline-form .inline-pass-group {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }
  .unlock-submit-btn {
    flex: 0 0 auto;
    padding-inline: 14px;
  }
}


