/* ✦ builtbybrayden — y2k chrome / aqua-gel / holo ✦ */
/* self-hosted fonts (no third-party requests) */
@font-face { font-family: "Silkscreen"; src: url("fonts/silkscreen-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "VT323"; src: url("fonts/vt323-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Syne"; src: url("fonts/syne-var.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/spacegrotesk-var.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --ink: #1d1747;
  --ink-2: #4b4578;
  --muted: #8a86ad;
  --blue: #3d6bff;
  --lime: #c6ff3d;
  --pink: #ff8ad8;
  --violet: #8a7bff;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --term: "VT323", ui-monospace, monospace;
  --display: "Syne", system-ui, sans-serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --glass: rgba(250, 248, 255, 0.72);
  --edge: rgba(255, 255, 255, 0.95);
  --ring: 0 0 0 1px rgba(70, 50, 170, 0.22);
  --shadow: var(--ring), 0 24px 60px -18px rgba(60, 40, 160, 0.5);
  --taskbar: 48px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  padding-bottom: var(--taskbar);
  font-family: var(--sans);
  color: var(--ink);
  background: #ece7ff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lime); color: var(--ink); }
a { color: inherit; }
:focus-visible { outline: 2px dashed var(--blue); outline-offset: 3px; }
button { font: inherit; color: inherit; }

/* ───────── background: blobs, perspective grid, twinkles ───────── */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 85% -10%, #d6f2ff 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 110%, #ffd6f1 0%, transparent 60%),
    #ece7ff;
}
.bg::before {
  content: ""; position: absolute; z-index: 1; left: -50%; right: -50%; bottom: -10%; height: 60%;
  background-image:
    linear-gradient(rgba(90, 70, 200, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 70, 200, 0.16) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 15%, transparent 85%);
  mask-image: linear-gradient(to top, #000 15%, transparent 85%);
  animation: gridmove 3s linear infinite;
}
@keyframes gridmove { to { background-position: 0 48px, 0 0; } }
.blob {
  position: absolute; width: 44vmax; height: 44vmax; border-radius: 50%;
  filter: blur(70px); opacity: 0.5; animation: drift 22s ease-in-out infinite alternate;
}
.b1 { background: #b9a4ff; top: -14vmax; left: -10vmax; }
.b2 { background: #8fe3ff; top: 6vmax; right: -16vmax; animation-duration: 28s; }
.b3 { background: #ffa6dc; bottom: -20vmax; left: 30vw; animation-duration: 25s; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.15); } }
.star {
  position: absolute; color: #fff;
  text-shadow: 0 0 6px #b9a4ff, 0 0 14px #8fe3ff;
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.1) rotate(45deg); }
}
.sparkle {
  position: fixed; z-index: 9999; pointer-events: none; font-size: 14px;
  transform: translate(-50%, -50%); text-shadow: 0 0 6px currentColor;
  animation: spark 0.8s ease-out forwards;
}
@keyframes spark {
  to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + 30px)) scale(0.3) rotate(140deg); }
}

/* ───────── chrome wordmark ───────── */
.chrome {
  margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.4rem, 4.2vw, 5.6rem);
  letter-spacing: -0.045em; line-height: 0.95;
  background:
    linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.95) 50%, transparent 58%),
    linear-gradient(180deg, #ffffff 0%, #d4dcef 30%, #6b7799 49%, #2e3656 51%, #9aa7c6 70%, #e9eef9 88%, #ffffff 100%);
  background-size: 260% 100%, 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.7);
  filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 10px 18px rgba(70, 50, 160, 0.35));
  animation: shine 5s ease-in-out infinite;
}
@keyframes shine {
  0%, 55% { background-position: 130% 0, 0 0; }
  100% { background-position: -30% 0, 0 0; }
}
.kicker {
  margin: 0 0 10px; font-family: var(--pixel); font-size: 12px; letter-spacing: 0.12em; color: var(--ink-2);
}

/* ───────── aqua gel tiles + buttons ───────── */
.tile {
  --c1: #eee; --c2: #999;
  position: relative; flex: none; display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow:
    inset 0 -8px 14px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 10px 18px -8px var(--c2),
    0 2px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.tile::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 4%; height: 46%;
  border-radius: 14px 14px 45% 45% / 14px 14px 20px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.08));
}
.glyph {
  position: relative; font-family: var(--display); font-weight: 800; font-size: 22px; color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35), 0 0 12px rgba(255, 255, 255, 0.5);
}
.tile.mini { width: 20px; height: 20px; border-radius: 6px; }
.tile.mini .glyph { font-size: 10px; }
.tile.mini::before { border-radius: 4px 4px 40% 40%; }

.gel-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-family: var(--pixel); font-size: 12px; color: var(--ink);
  background: linear-gradient(180deg, #f4ffc6 0%, #c3f43a 49%, #9ed11c 51%, #d2ff5c 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(60, 90, 0, 0.35), 0 8px 16px -8px #5f8f00;
  transition: transform 0.15s, filter 0.15s;
}
.gel-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.gel-btn:active { transform: translateY(1px); }
.gel-btn.small { padding: 6px 12px; font-size: 10px; }
.gel-btn.blue {
  color: #fff;
  background: linear-gradient(180deg, #b8ccff 0%, #5a82ff 49%, #3d6bff 51%, #7fa0ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 1px rgba(20, 40, 140, 0.4), 0 8px 16px -8px #2448c9;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.chip {
  display: inline-block; margin: 0 6px 6px 0; padding: 4px 9px; border-radius: 999px;
  font-family: var(--pixel); font-size: 10px; background: #fff; box-shadow: var(--ring);
}

/* ───────── panels (windows + widget) ───────── */
.panel {
  border-radius: 16px; background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--edge); box-shadow: var(--shadow), inset 0 1px 0 #fff;
}
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 34px; padding: 0 10px 0 10px; border-radius: 15px 15px 0 0;
  font-family: var(--pixel); font-size: 11px;
  background: linear-gradient(180deg, #fdfdff 0%, #dfe2f2 48%, #c9cee6 52%, #e9ebf7 100%);
  border-bottom: 1px solid rgba(80, 60, 180, 0.2);
  user-select: none; -webkit-user-select: none;
}
.bar-title { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── desktop layout ───────── */
.desktop {
  display: grid; grid-template-columns: auto minmax(0, 1fr) 250px; gap: 24px; align-items: start;
  min-height: calc(100vh - var(--taskbar)); padding: 24px;
}
.hero { text-align: center; padding-top: 7vh; }
.tagline { margin: 0.6em 0 1.4em; font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--ink-2); }
.marquee {
  max-width: 620px; margin: 0 auto; overflow: hidden; border-radius: 999px; padding: 3px 0;
  background: linear-gradient(180deg, #1f1a4d, #352c7a); color: var(--lime);
  font-family: var(--term); font-size: 20px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 2px #fff, 0 0 0 3px rgba(70, 50, 170, 0.3);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { white-space: nowrap; padding-right: 3rem; text-shadow: 0 0 8px rgba(198, 255, 61, 0.5); }
@keyframes marquee { to { transform: translateX(-50%); } }

.icons {
  display: grid; grid-template-rows: repeat(5, auto); grid-auto-flow: column; gap: 10px 6px;
}
.icon {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100px; padding: 8px 4px; border: 0; border-radius: 12px; background: none; cursor: pointer;
}
.icon:hover .tile, .icon:focus-visible .tile { transform: translateY(-3px) scale(1.06) rotate(-4deg); }
.icon-label {
  padding: 2px 6px; border-radius: 4px; line-height: 1.35;
  font-family: var(--pixel); font-size: 10.5px; background: rgba(255, 255, 255, 0.65);
}
.icon:hover .icon-label, .icon:focus-visible .icon-label { background: var(--blue); color: #fff; }

.hint { margin-top: 2.2em; font-family: var(--pixel); font-size: 10px; color: var(--muted); }

/* status widget */
.widget-body { padding: 14px; display: grid; gap: 12px; font-size: 14px; }
.np {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  background: #1f1a4d; color: var(--lime); font-family: var(--term); font-size: 18px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}
.np-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; flex: none; }
.eq i { width: 3px; height: 40%; background: var(--lime); animation: eq 0.8s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.3s; } .eq i:nth-child(3) { animation-delay: -0.6s; } .eq i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { from { height: 15%; } to { height: 100%; } }
.label { font-family: var(--pixel); font-size: 9px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.mood { font-family: var(--display); font-weight: 800; font-size: 20px; }
.currently { margin: 4px 0 0; padding: 0; list-style: none; }
.currently li::before { content: "▸ "; color: var(--violet); }
.currently li { padding: 2px 0; }

/* ───────── windows ───────── */
.win {
  position: fixed; top: 120px; left: 30vw; width: min(440px, 92vw); z-index: 20;
  animation: pop 0.32s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.win[hidden] { display: none; }
.win.closing { animation: shrink 0.18s ease-in forwards; }
@keyframes pop { from { opacity: 0; transform: scale(0.88) translateY(10px); filter: blur(6px); } }
@keyframes shrink { to { opacity: 0; transform: scale(0.9) translateY(12px); } }
.win .bar { cursor: grab; touch-action: none; }
.win.dragging { box-shadow: var(--ring), 0 40px 80px -20px rgba(60, 40, 160, 0.6); }
.win.dragging .bar { cursor: grabbing; }
.win:not(.active) .bar { background: linear-gradient(180deg, #f8f8fc, #e9e9f2); color: var(--muted); }
.wbtns { display: flex; gap: 7px; flex: none; }
.wb {
  width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: inset 0 -3px 4px rgba(0, 0, 0, 0.2), inset 0 2px 1px rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.wb.close { background: radial-gradient(circle at 50% 30%, #ffd6ee, #ff4fae); }
.wb.min { background: radial-gradient(circle at 50% 30%, #f4ffc4, #9ed11c); }
.wb:hover { filter: brightness(1.12); }
.win-body { padding: 18px 20px 20px; max-height: min(62vh, 540px); overflow: auto; line-height: 1.55; }
.win-body p { margin: 0 0 0.8em; }

.loadbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-family: var(--term); font-size: 16px; color: var(--muted); }
.loadbar .track { flex: 1; height: 10px; padding: 2px; border-radius: 999px; background: #fff; box-shadow: inset 0 1px 3px rgba(40, 30, 120, 0.3); }
.loadbar i { display: block; height: 100%; border-radius: 999px; background: repeating-linear-gradient(90deg, var(--blue) 0 8px, #8ea8ff 8px 10px); animation: load 0.9s steps(12) both; }
@keyframes load { from { width: 0; } to { width: 100%; } }
.linkcard { display: flex; align-items: center; gap: 16px; }
.linkcard h2 { margin: 0 0 4px; font-family: var(--display); font-size: 1.7rem; letter-spacing: -0.03em; }
.linkcard p { margin: 0; color: var(--ink-2); }
.addr {
  display: flex; align-items: center; gap: 8px; margin: 18px 0; padding: 6px 10px; border-radius: 10px;
  background: #fff; box-shadow: inset 0 1px 3px rgba(40, 30, 120, 0.3);
  font-family: var(--term); font-size: 18px;
}
.addr .label { flex: none; }
.addr code { flex: 1; min-width: 0; font: inherit; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.badge { display: block; max-width: 100%; margin-top: 14px; border-radius: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mini-cards { display: flex; gap: 8px; margin: 14px 0 18px; }
.mini-cards span {
  flex: 1; aspect-ratio: 5 / 7; border-radius: 8px;
  background: conic-gradient(from 200deg, #ff8ad8, #ffd36e, #c6ff3d, #6ee7ff, #8a7bff, #ff8ad8);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.8), 0 8px 14px -8px rgba(60, 40, 160, 0.6);
  animation: bob 2.4s ease-in-out infinite alternate;
}
.mini-cards span:nth-child(2) { animation-delay: -0.6s; } .mini-cards span:nth-child(3) { animation-delay: -1.2s; } .mini-cards span:nth-child(4) { animation-delay: -1.8s; }
@keyframes bob { to { transform: translateY(-6px) rotate(2deg); } }

/* ───────── taskbar + start menu ───────── */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; height: var(--taskbar);
  display: flex; align-items: center; gap: 8px; padding: 0 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(218, 220, 240, 0.88));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid #fff;
  box-shadow: 0 -1px 0 rgba(70, 50, 170, 0.2), 0 -10px 30px -10px rgba(60, 40, 160, 0.25);
}
.start { height: 34px; padding: 0 16px; font-size: 12px; }
.tasks { display: flex; flex: 1; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.task {
  display: flex; align-items: center; gap: 6px; height: 32px; max-width: 170px; padding: 0 12px;
  border: 0; border-radius: 8px; cursor: pointer; white-space: nowrap;
  font-family: var(--pixel); font-size: 10px; text-decoration: none;
  background: rgba(255, 255, 255, 0.6); box-shadow: var(--ring);
}
.task.active { background: #fff; box-shadow: inset 0 2px 4px rgba(40, 30, 120, 0.25), var(--ring); }
.tray {
  display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 1px 3px rgba(40, 30, 120, 0.25);
  font-family: var(--term); font-size: 19px; white-space: nowrap;
}
.tray .label { font-size: 8px; }
.start-menu {
  position: fixed; left: 8px; bottom: calc(var(--taskbar) + 8px); z-index: 1001; width: 270px; overflow: hidden;
  animation: pop 0.25s cubic-bezier(0.2, 1.4, 0.4, 1); transform-origin: bottom left;
}
.start-menu[hidden] { display: none; }
.sm-head {
  padding: 16px; color: #fff; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #3d6bff, #b07cff 60%, #ff8ad8);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.sm-head small { display: block; font-family: var(--pixel); font-size: 9px; font-weight: 400; letter-spacing: 0.05em; opacity: 0.9; }
.sm-list { margin: 0; padding: 6px; list-style: none; }
.sm-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; font-size: 14px; }
.sm-list a:hover, .sm-list a:focus-visible { background: var(--blue); color: #fff; outline: none; }
.sm-list hr { margin: 6px; border: 0; border-top: 1px dashed rgba(70, 50, 170, 0.3); }

/* ───────── boot screen ───────── */
.boot { display: none; }
.js .boot {
  position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; cursor: pointer;
  background: #07061a; font-family: var(--term); font-size: clamp(17px, 2.4vw, 22px);
  transition: opacity 0.5s, filter 0.5s;
}
.js.booted .boot { display: none; }
.boot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 3px);
}
.boot.off { opacity: 0; filter: blur(8px); pointer-events: none; }
.boot-inner { width: min(640px, 88vw); }
.boot pre { min-height: 9em; margin: 0 0 18px; font: inherit; white-space: pre-wrap; color: var(--lime); text-shadow: 0 0 8px rgba(198, 255, 61, 0.5); }
.boot-bar { height: 20px; padding: 2px; border: 2px solid var(--lime); }
.boot-bar span { display: block; width: 0; height: 100%; background: repeating-linear-gradient(90deg, var(--lime) 0 12px, transparent 12px 15px); transition: width 0.25s steps(4); }
.boot-hint { margin-top: 14px; font-family: var(--pixel); font-size: 10px; color: var(--muted); }

/* ───────── cert binder ───────── */
.certs-main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
.certs-hero { text-align: center; }
.certs-hero .chrome { font-size: clamp(2.6rem, 8vw, 5.4rem); }
.back-link {
  display: inline-flex; gap: 6px; margin-bottom: 18px; padding: 6px 12px; border-radius: 999px; text-decoration: none;
  font-family: var(--pixel); font-size: 10px; background: rgba(255, 255, 255, 0.65); box-shadow: var(--ring);
}
.back-link:hover { background: var(--blue); color: #fff; }
.sub { margin: 0.8em 0 0; color: var(--ink-2); }
.stats { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; margin: 22px 0; font-family: var(--pixel); font-size: 10px; }
.stats b { margin-right: 4px; font-family: var(--display); font-size: 24px; }
.meter { width: 200px; height: 14px; padding: 2px; border-radius: 999px; background: #fff; box-shadow: inset 0 1px 3px rgba(40, 30, 120, 0.3); }
.meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), #b07cff, var(--pink)); }
.sample-banner {
  max-width: 560px; margin: 0 auto 20px; padding: 8px 14px; border-radius: 12px; text-align: center;
  font-family: var(--term); font-size: 18px; background: #fffbd1; border: 1px dashed #c9a400;
}
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 34px; }
.filter {
  padding: 7px 14px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--pixel); font-size: 10px; background: rgba(255, 255, 255, 0.7); box-shadow: var(--ring);
}
.filter[aria-pressed="true"] { background: var(--ink); color: var(--lime); }

.binder { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 26px; }
.card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; aspect-ratio: 5 / 7; border-radius: 18px; cursor: pointer;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d; transition: transform 0.2s ease-out;
  animation: deal 0.7s cubic-bezier(0.2, 1.2, 0.4, 1) backwards; animation-delay: calc(var(--i) * 80ms);
}
.card[hidden] { display: none; }
.card:focus-visible { outline-offset: 6px; }
@keyframes deal { from { opacity: 0; transform: perspective(900px) translateY(40px) rotateZ(-6deg) rotateY(-30deg); } }
.card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(0.3, 1.3, 0.4, 1); }
.card.flipped .card-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.front {
  padding: 9px; background: var(--frame);
  box-shadow: 0 22px 40px -18px rgba(50, 30, 140, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.r-common { --frame: linear-gradient(160deg, #f6f3ff, #c9c1f0); }
.r-rare { --frame: linear-gradient(160deg, #ffffff, #b8c2da 28%, #f2f5fb 50%, #8e9ab8 72%, #f3f5fb); }
.r-legendary { --frame: conic-gradient(from 0deg, #ff8ad8, #ffd36e, #c6ff3d, #6ee7ff, #8a7bff, #ff8ad8); }
.card.loading { --frame: repeating-linear-gradient(45deg, #e6e3f4 0 8px, #d3cee9 8px 16px); }
.frame {
  position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 10px;
  border-radius: 12px; background: #fcfbff; box-shadow: inset 0 0 0 1px rgba(70, 50, 170, 0.2);
}
.card-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--pixel); font-size: 9px; text-transform: uppercase; }
.rarity { padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; }
.r-legendary .rarity { background: linear-gradient(90deg, #ff4fae, #8a7bff, #3d6bff); }
.r-rare .rarity { background: linear-gradient(180deg, #9aa7c6, #2e3656); }
.art {
  position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; border-radius: 10px;
  background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.9) 0, transparent 40%), linear-gradient(160deg, var(--a1), var(--a2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), inset 0 -12px 24px rgba(0, 0, 0, 0.15);
}
.art::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1.5px); background-size: 10px 10px;
}
.art-text {
  position: relative; z-index: 1;
  font-family: var(--display); font-weight: 800; letter-spacing: -0.05em;
  font-size: min(48px, calc(240px / var(--len)));
  background: linear-gradient(180deg, #fff 0%, #dfe5f3 40%, #7b87a8 50%, #fff 52%, #c7d0e6 80%, #fff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(30, 20, 80, 0.35);
  filter: drop-shadow(0 4px 6px rgba(30, 20, 80, 0.35));
}
.art-stars { position: absolute; top: 8px; right: 10px; z-index: 1; color: #fff; font-size: 12px; letter-spacing: 3px; text-shadow: 0 0 6px #fff; }
.card h3 { margin: 4px 0 0; font-family: var(--display); font-size: 18px; line-height: 1.1; letter-spacing: -0.02em; }
.issuer { margin: 0; font-family: var(--pixel); font-size: 9px; color: var(--ink-2); }
.types { display: flex; flex-wrap: wrap; gap: 4px; }
.types .chip { margin: 0; padding: 2px 7px; font-size: 8px; }
.card-foot { display: flex; justify-content: space-between; padding-top: 4px; border-top: 1px dashed rgba(70, 50, 170, 0.25); font-family: var(--term); font-size: 15px; color: var(--muted); }
.dl { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; font-family: var(--term); font-size: 15px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.dl-bar { height: 8px; margin-top: 3px; padding: 1px; border-radius: 99px; background: rgba(255, 255, 255, 0.45); }
.dl-bar i { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.dl-bar.indet i { animation: indet 1.6s ease-in-out infinite alternate; }
@keyframes indet { from { transform: translateX(0); } to { transform: translateX(185%); } }

.foil, .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.foil {
  background: repeating-linear-gradient(115deg, #ff8ad8 0%, #ffd36e 6%, #c6ff3d 12%, #6ee7ff 18%, #8a7bff 24%, #ff8ad8 30%);
  background-size: 300% 300%; background-position: var(--mx) var(--my);
  mix-blend-mode: color-dodge;
}
.glare { background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.8), transparent 48%); mix-blend-mode: overlay; }
.card.hover .glare { opacity: 1; }
.card.hover .foil { opacity: 0.3; }
.r-rare.hover .foil { opacity: 0.45; }
.r-legendary .foil { opacity: 0.28; animation: holo 7s linear infinite; }
.r-legendary.hover .foil { opacity: 0.65; animation: none; }
@keyframes holo { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

.back {
  transform: rotateY(180deg); display: flex; flex-direction: column; gap: 10px; padding: 18px;
  color: #e9e6ff; background: linear-gradient(160deg, #1f1a4d, #2e2470 60%, #47309a);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 22px 40px -18px rgba(50, 30, 140, 0.6);
}
.back-head { margin: 0; padding-bottom: 6px; border-bottom: 1px dashed rgba(198, 255, 61, 0.4); font-family: var(--term); font-size: 22px; color: var(--lime); }
.back dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-family: var(--term); font-size: 17px; }
.back dt { color: #a49ce0; }
.back dd { margin: 0; overflow-wrap: anywhere; }
.back .chip { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.flip-hint { margin: auto 0 0; font-family: var(--pixel); font-size: 9px; color: #a49ce0; }
.made { margin-top: 60px; text-align: center; font-family: var(--pixel); font-size: 10px; color: var(--muted); }

/* ───────── responsive ───────── */
@media (max-width: 1100px) {
  .desktop { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero { order: 1; padding-top: 3vh; }
  .hero .chrome { font-size: calc((100vw - 60px) / 13); }
  .icons { order: 2; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); justify-items: center; }
  .widget { order: 3; width: 100%; max-width: 520px; margin: 0 auto; }
  .hint { display: none; }
}
@media (max-width: 720px) {
  .win { left: 3vw !important; right: 3vw; top: auto !important; bottom: calc(var(--taskbar) + 10px); width: auto !important; }
  .win .bar { cursor: default; }
  .win-body { max-height: 58vh; }
  .tray .visits, .task .t-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
