/* ============================================================
   FELIX-CORP — Retro PS1/Hacker Aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323:wght@400&display=swap');

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #0a0a0a;
  --bg-card:   #0f0f0f;
  --bg-card2:  #111411;
  --green:     #00ff41;
  --orange:    #ff6600;
  --cyan:      #00ffff;
  --dim:       #1a1a1a;
  --border:    #1e3a1e;
  --text-dim:  #5aaa5a;

  /* Brand primary — overridden per brand via body class */
  --primary:   #00ff41;

  --font-head: 'Press Start 2P', monospace;
  --font-body: 'VT323', monospace;
}

/* ── Alt font mode ───────────────────────────────────────────── */
body.font-alt {
  --font-head: 'Share Tech Mono', monospace;
  --font-body: 'Space Mono', monospace;
}
body.font-alt .ascii-logo {
  font-family: 'Share Tech Mono', monospace;
}

/* Tier 1 — tiny labels/badges (0.38–0.42rem) → 0.65rem */
body.font-alt .ticker-label,
body.font-alt .role-badge,
body.font-alt .app-featured-badge,
body.font-alt .lore-terminal-title,
body.font-alt .lore-prompt,
body.font-alt .lore-msg-who,
body.font-alt .log-card-badge,
body.font-alt .log-badge,
body.font-alt .file-dl-table th,
body.font-alt .file-type-badge,
body.font-alt .license-badge,
body.font-alt .profile-label,
body.font-alt .reply-earn,
body.font-alt .btn-new-thread,
body.font-alt .btn-sm {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
}

/* Tier 2 — small labels (0.45–0.5rem) → 0.75rem */
body.font-alt .status-label,
body.font-alt .nav-username,
body.font-alt .nav-tokens,
body.font-alt .nav-link--auth,
body.font-alt .btn-nav-logout,
body.font-alt .card-category,
body.font-alt .card-cta,
body.font-alt .meta-label,
body.font-alt .profile-section-title,
body.font-alt .profile-post-thread,
body.font-alt .reply-form-title,
body.font-alt .forum-cat-title,
body.font-alt .db-section-label,
body.font-alt .update-card-title,
body.font-alt .lore-send,
body.font-alt .auth-icon,
body.font-alt .sys-modal-header,
body.font-alt .panel-cta,
body.font-alt .breadcrumb,
body.font-alt .form-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

/* Tier 3 — medium heads (0.55–0.65rem) → 0.9rem */
body.font-alt .nav-link,
body.font-alt .btn,
body.font-alt .btn-download,
body.font-alt .btn-full,
body.font-alt .card-title,
body.font-alt .cat-tile-icon,
body.font-alt .cat-tile-name,
body.font-alt .product-name,
body.font-alt .design-files-heading,
body.font-alt .log-card-title,
body.font-alt .log-post-body h2,
body.font-alt .profile-username {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* Tier 4 — large heads (0.7–0.9rem) → 1.1rem */
body.font-alt .status-value,
body.font-alt .auth-title,
body.font-alt .detail-title,
body.font-alt .error-title,
body.font-alt .panel-title,
body.font-alt .product-price,
body.font-alt .log-post-title,
body.font-alt .log-post-body h3 {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

/* Tier 5 — page-level titles (1rem) → 1.5rem */
body.font-alt .page-title {
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

/* ── Scanline toggle ─────────────────────────────────────────── */
body.crt-off .scanlines { display: none; }

/* ── Brand themes ────────────────────────────────────────────── */
body.brand-sean-hodgins {
  --primary:  #c8c8c8;
  --border:   #2a2a2a;
  --text-dim: #8a8a8a;
  --bg-card2: #111111;
}
body.brand-idle-hands-dev {
  --primary:  #ff6600;
  --border:   #2a1400;
  --text-dim: #aa6600;
  --bg-card2: #110800;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1.2rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--primary); }

/* ── CRT Wrapper ────────────────────────────────────────────── */
@keyframes grid-scroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(40px); }
}

.crt-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: flicker 8s infinite;
}

/* Grid lives on its own composited layer — transform only, no repaint */
.crt-wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--primary) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 4%, transparent) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-scroll 6s linear infinite;
  will-change: transform;
  pointer-events: none;
  z-index: 0;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    color-mix(in srgb, var(--primary) 3%, transparent) 2px,
    color-mix(in srgb, var(--primary) 3%, transparent) 4px
  );
}

.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 101;
  background: radial-gradient(ellipse at center,
    transparent 75%,
    rgba(0,0,0,0.4) 100%
  );
}

/* ── Flicker animation ──────────────────────────────────────── */
@keyframes flicker {
  0%   { opacity: 1; }
  92%  { opacity: 1; }
  93%  { opacity: 0.85; }
  94%  { opacity: 1; }
  97%  { opacity: 0.9; }
  100% { opacity: 1; }
}

/* ── Glitch hover effect ────────────────────────────────────── */
@keyframes glitch-anim {
  0%   { clip-path: inset(0 0 95% 0); transform: translate(-2px,0); }
  20%  { clip-path: inset(30% 0 50% 0); transform: translate(2px,0); }
  40%  { clip-path: inset(60% 0 20% 0); transform: translate(-2px,0); }
  60%  { clip-path: inset(10% 0 80% 0); transform: translate(2px,0); }
  80%  { clip-path: inset(80% 0 5% 0); transform: translate(-2px,0); }
  100% { clip-path: inset(0 0 0 0); transform: translate(0,0); }
}

.glitch-hover {
  position: relative;
}
.glitch-hover::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--cyan);
  clip-path: inset(0 0 100% 0);
  display: flex;
  align-items: center;
  justify-content: center;
}
.glitch-hover:hover::before {
  animation: glitch-anim 0.4s steps(1) infinite;
}

/* ── Blinking cursor ────────────────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.blinking-cursor { animation: blink 1s step-end infinite; }

/* ── Glow helpers ───────────────────────────────────────────── */
.accent-green  { color: var(--green);  text-shadow: 0 0 7px color-mix(in srgb, var(--green) 80%, transparent), 0 0 20px color-mix(in srgb, var(--green) 40%, transparent), 0 0 40px color-mix(in srgb, var(--green) 20%, transparent); }
.accent-orange { color: var(--orange); text-shadow: 0 0 7px color-mix(in srgb, var(--orange) 80%, transparent), 0 0 20px color-mix(in srgb, var(--orange) 40%, transparent), 0 0 40px color-mix(in srgb, var(--orange) 20%, transparent); }
.accent-cyan   { color: var(--cyan);   text-shadow: 0 0 7px color-mix(in srgb, var(--cyan) 80%, transparent), 0 0 20px color-mix(in srgb, var(--cyan) 40%, transparent), 0 0 40px color-mix(in srgb, var(--cyan) 20%, transparent); }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.header-top {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1rem;
}
.logo-block { flex-shrink: 0; }
.header-ticker {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.ticker-label {
  font-family: var(--font-head);
  font-size: 0.4rem;
  color: var(--text-dim);
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.08em;
}
.ticker-body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--primary);
  gap: 0.5rem;
  overflow: hidden;
}
.ticker-ts {
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-text {
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker-cursor {
  color: var(--primary);
  animation: blink 1s step-end infinite;
  flex-shrink: 0;
}

.ascii-logo {
  font-family: monospace;
  font-size: clamp(0.25rem, 1.1vw, 0.6rem);
  color: var(--primary);
  line-height: 1.2;
  white-space: pre;
  overflow: hidden;
  text-shadow: 0 0 8px color-mix(in srgb, var(--primary) 80%, transparent), 0 0 24px color-mix(in srgb, var(--primary) 35%, transparent);
}

.tagline {
  font-family: var(--font-body);
  color: var(--text-dim);
  font-size: 1rem;
  margin-top: 0.5rem;
}

.site-nav {
  display: flex;
  gap: 2rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--dim);
}

.nav-link {
  font-family: var(--font-head);
  font-size: 0.6rem;
  color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
  letter-spacing: 0.1em;
  padding: 0.3rem 0.5rem;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.nav-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
}

/* ── Main ────────────────────────────────────────────────────── */
.site-main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ── Nav auth block ──────────────────────────────────────────── */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  padding-left: 1.5rem;
  border-left: 1px solid var(--dim);
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}
.nav-username {
  font-family: var(--font-head);
  font-size: 0.45rem;
}
.nav-tokens {
  font-family: var(--font-head);
  font-size: 0.45rem;
}
.nav-link--auth {
  font-size: 0.5rem;
  padding: 0.2rem 0.4rem;
}
.nav-link--register {
  color: var(--orange);
  text-shadow: 0 0 6px var(--orange);
  border-color: transparent;
}
.nav-link--register:hover { color: var(--orange); border-color: var(--orange); }
.btn-nav-logout {
  background: transparent;
  border: 1px solid var(--text-dim);
  color: var(--text-dim);
  font-family: var(--font-head);
  font-size: 0.42rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-nav-logout:hover { color: var(--orange); border-color: var(--orange); }

/* ── Flash messages ──────────────────────────────────────────── */
/* ── System modal ────────────────────────────────────────────── */
.sys-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modal-fade 0.15s ease;
}
@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.sys-modal-box {
  background: var(--bg-card);
  min-width: 300px;
  max-width: 480px;
  width: 90%;
  animation: modal-scale 0.15s ease;
}
@keyframes modal-scale {
  from { transform: scale(0.95); }
  to   { transform: scale(1); }
}
.sys-modal-box--error {
  border: 1px solid var(--orange);
  box-shadow: 0 0 32px rgba(255,102,0,0.3);
}
.sys-modal-box--success {
  border: 1px solid var(--green);
  box-shadow: 0 0 32px rgba(0,255,65,0.2);
}
.sys-modal-header {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-head);
  font-size: 0.5rem;
}
.sys-modal-box--error .sys-modal-header {
  color: var(--orange);
  border-bottom: 1px solid var(--orange);
  background: rgba(255,102,0,0.07);
  text-shadow: 0 0 8px var(--orange);
}
.sys-modal-box--success .sys-modal-header {
  color: var(--green);
  border-bottom: 1px solid var(--green);
  background: rgba(0,255,65,0.05);
  text-shadow: 0 0 8px var(--green);
}
.sys-modal-body {
  padding: 1.5rem;
  font-family: var(--font-body);
  font-size: 1.2rem;
  line-height: 1.5;
}
.sys-modal-box--error .sys-modal-body { color: var(--orange); }
.sys-modal-box--success .sys-modal-body { color: var(--green); }
.sys-modal-footer {
  padding: 0.75rem 1.5rem 1rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

/* ── P.E.N. Tool modal ───────────────────────────────────────── */
.pen-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.pen-modal.is-open {
  opacity: 1;
  pointer-events: all;
}
.pen-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
}
/* blur site content but NOT the modal itself */
body.pen-modal-active .site-header,
body.pen-modal-active .site-main,
body.pen-modal-active .site-footer {
  filter: blur(5px);
  transition: filter 0.3s ease;
}
.site-header, .site-main, .site-footer { transition: filter 0.3s ease; }

.pen-modal-frame {
  position: relative;
  z-index: 1;
  width: 90vw;
  height: 88vh;
  max-width: 1200px;
  background: #060c06;
  border: 1px solid rgba(0,255,65,0.35);
  box-shadow: 0 0 60px rgba(0,255,65,0.15), 0 0 120px rgba(0,255,65,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}
.pen-modal.is-open .pen-modal-frame {
  transform: scale(1);
}
.pen-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  background: rgba(6,12,6,0.9);
  border: 1px solid rgba(0,255,65,0.25);
  color: rgba(0,255,65,0.6);
  font-family: var(--font-head);
  font-size: 0.4rem;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: color 0.15s, border-color 0.15s;
}
.pen-modal-close:hover { color: #00ff41; border-color: #00ff41; }

.pen-modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060c06;
  z-index: 5;
  transition: opacity 0.3s ease;
}
.pen-modal-loading.is-hidden { opacity: 0; pointer-events: none; }
.pen-modal-loading-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  color: #00ff41;
  text-shadow: 0 0 10px rgba(0,255,65,0.7);
  letter-spacing: 0.2em;
  animation: pen-loading-fade 0.4s ease;
}
@keyframes pen-loading-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pen-modal-iframe {
  width: 100%;
  flex: 1;
  border: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.pen-modal-iframe.is-loaded { opacity: 1; }

/* ── Auth pages ──────────────────────────────────────────────── */
.auth-page {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}
.auth-card {
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.auth-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.auth-icon {
  font-family: var(--font-head);
  font-size: 0.5rem;
  color: var(--text-dim);
}
.auth-title {
  font-family: var(--font-head);
  font-size: 0.7rem;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
}
.auth-sub { color: var(--text-dim); font-size: 1rem; }

.auth-errors {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--orange);
  background: rgba(255,102,0,0.05);
}
.auth-error {
  color: var(--orange);
  font-size: 1rem;
  text-shadow: 0 0 4px var(--orange);
}

.auth-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-family: var(--font-head);
  font-size: 0.42rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.form-optional { color: var(--dim); }
.form-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1.2rem;
  padding: 0.6rem 0.9rem;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 8px rgba(0,255,65,0.1); }
.form-input::placeholder { color: var(--text-dim); }
.form-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px var(--bg) inset;
  -webkit-text-fill-color: var(--primary);
}

.auth-token-notice { margin-top: 0.25rem; }
.btn-full { width: 100%; text-align: center; padding: 0.9rem; font-size: 0.6rem; }

.auth-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 1rem;
}
.auth-footer a { color: var(--cyan); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ── Page Header ─────────────────────────────────────────────── */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--primary);
  text-shadow: 0 0 7px color-mix(in srgb, var(--primary) 80%, transparent), 0 0 20px color-mix(in srgb, var(--primary) 40%, transparent), 0 0 40px color-mix(in srgb, var(--primary) 20%, transparent);
  margin-bottom: 0.5rem;
}
.page-subtitle {
  color: var(--text-dim);
  font-size: 1rem;
}
.breadcrumb {
  font-family: var(--font-head);
  font-size: 0.5rem;
  color: var(--text-dim);
  text-shadow: none;
}
.breadcrumb:hover { color: var(--cyan); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.55rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.05em;
  transition: all 0.15s;
  text-decoration: none;
  background: transparent;
}
.btn-primary {
  color: var(--primary);
  border-color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
}
.btn-primary:hover {
  background: var(--primary);
  color: var(--bg);
  text-shadow: none;
}
.btn-download {
  color: var(--orange);
  border-color: var(--orange);
  text-shadow: 0 0 6px var(--orange);
  font-size: 0.6rem;
  padding: 1rem 1.5rem;
}
.btn-download:hover {
  background: var(--orange);
  color: var(--bg);
  text-shadow: none;
}
.btn-ghost {
  color: var(--text-dim);
  border-color: var(--text-dim);
}
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ── Terminal block ──────────────────────────────────────────── */
.terminal-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.terminal-line {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-dim);
}
.terminal-line:last-child { color: var(--primary); }

/* ── Home page ───────────────────────────────────────────────── */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  box-shadow: 0 0 8px color-mix(in srgb, var(--primary) 15%, transparent), inset 0 0 8px color-mix(in srgb, var(--primary) 4%, transparent);
  /* corner brackets */
  background-image:
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary));
  background-size: 2px 10px, 10px 2px, 2px 10px, 10px 2px,
                   2px 10px, 10px 2px, 2px 10px, 10px 2px;
  background-position:
    top left, top left,
    top right, top right,
    bottom left, bottom left,
    bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.status-card::before {
  content: '';
  position: absolute;
  inset: -1rem;
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  filter: blur(24px);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}
.status-label {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.status-value {
  font-family: var(--font-head);
  font-size: 1.5rem;
}

/* ── Product Tiles (BRN3R / PEN / SPECTRALBURN) ──────────────── */
.product-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.product-tile {
  border: 1px solid var(--border);
  background: var(--bg-card);
  position: relative;
  cursor: default;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
  transition: border-color 0.25s, box-shadow 0.25s;
  background-image:
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary));
  background-size: 2px 10px, 10px 2px, 2px 10px, 10px 2px,
                   2px 10px, 10px 2px, 2px 10px, 10px 2px;
  background-position:
    top left, top left,
    top right, top right,
    bottom left, bottom left,
    bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.product-tile::before {
  content: '';
  position: absolute;
  inset: -1rem;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  filter: blur(20px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}
.product-tile:hover {
  border-color: var(--primary);
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary) 25%, transparent), inset 0 0 10px color-mix(in srgb, var(--primary) 5%, transparent);
}
.product-tile-icon {
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: #ff3333;
  text-shadow: 0 0 8px #ff3333;
  position: relative;
  z-index: 1;
}
.product-tile-name {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: #ff3333;
  text-shadow: 0 0 7px rgba(255,51,51,0.8), 0 0 20px rgba(255,51,51,0.4);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.product-tile-desc {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.6;
  flex: 1;
  position: relative;
  z-index: 1;
}
.product-tile-eta {
  font-family: var(--font-head);
  font-size: 0.48rem;
  color: #ff3333;
  text-shadow: 0 0 6px rgba(255,51,51,0.8), 0 0 16px rgba(255,51,51,0.35);
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
  display: block;
}
/* Glitch pseudo-layers */
.product-tile-eta::before,
.product-tile-eta::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0;
}
.product-tile-eta::before {
  color: #ff3333;
  text-shadow: -2px 0 #00ffff;
  animation: eta-glitch-top 4s infinite linear;
}
.product-tile-eta::after {
  color: #ff3333;
  text-shadow: 2px 0 #ff00ff;
  animation: eta-glitch-bot 4s infinite linear;
  animation-delay: 0.15s;
}
@keyframes eta-glitch-top {
  0%,60%,100%  { opacity: 0; transform: none; clip-path: none; }
  62%          { opacity: 1;   transform: translateX(-4px) skewX(-8deg); clip-path: inset(0 0 60% 0); }
  64%          { opacity: 0; }
  70%          { opacity: 0.9; transform: translateX(5px) skewX(6deg);  clip-path: inset(5% 0 45% 0); }
  72%          { opacity: 0; }
  80%          { opacity: 0.8; transform: translateX(-6px) skewX(-5deg); clip-path: inset(0 0 70% 0); }
  82%          { opacity: 0; }
}
@keyframes eta-glitch-bot {
  0%,63%,100%  { opacity: 0; transform: none; clip-path: none; }
  65%          { opacity: 0.9; transform: translateX(4px) skewX(8deg);  clip-path: inset(50% 0 0 0); }
  67%          { opacity: 0; }
  75%          { opacity: 0.8; transform: translateX(-5px);              clip-path: inset(65% 0 0 0); }
  77%          { opacity: 0; }
  85%          { opacity: 0.7; transform: translateX(6px) skewX(-4deg); clip-path: inset(55% 0 0 0); }
  87%          { opacity: 0; }
}

.product-tile-cta {
  font-family: var(--font-head);
  font-size: 0.42rem;
  color: #ff3333;
  text-shadow: 0 0 5px #ff3333;
  opacity: 0.7;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

/* ── TMLN Tile ───────────────────────────────────────────────── */
.tmln-tile-section {
  margin-bottom: 2rem;
}
.tmln-tile {
  border: 1px solid rgba(0,255,65,0.25);
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
  /* corner brackets */
  background-image:
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary));
  background-size: 2px 14px, 14px 2px, 2px 14px, 14px 2px,
                   2px 14px, 14px 2px, 2px 14px, 14px 2px;
  background-position: top left, top left, top right, top right,
                        bottom left, bottom left, bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.tmln-tile:hover {
  border-color: var(--primary);
  box-shadow: 0 0 16px color-mix(in srgb, var(--primary) 12%, transparent),
              inset 0 0 16px color-mix(in srgb, var(--primary) 3%, transparent);
}
.tmln-tile-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
}
.tmln-tile-icon {
  font-family: var(--font-head);
  font-size: 0.55rem;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.tmln-tile-name {
  font-family: var(--font-head);
  font-size: 0.6rem;
  color: var(--primary);
  text-shadow: 0 0 6px color-mix(in srgb, var(--primary) 60%, transparent);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.tmln-tile-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 480px;
}
.tmln-tile-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}
.tmln-tile-code {
  font-family: var(--font-head);
  font-size: 0.7rem;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
  letter-spacing: 0.12em;
}
.tmln-tile-cta {
  font-family: var(--font-head);
  font-size: 0.42rem;
  color: var(--cyan);
  text-shadow: 0 0 5px var(--cyan);
  opacity: 0.8;
}

@media (max-width: 640px) {
  .tmln-tile { flex-direction: column; align-items: flex-start; }
  .tmln-tile-right { align-items: flex-start; }
}

.home-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  position: relative;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  /* corner brackets */
  background-image:
    linear-gradient(var(--border), var(--border)),
    linear-gradient(var(--border), var(--border)),
    linear-gradient(var(--border), var(--border)),
    linear-gradient(var(--border), var(--border)),
    linear-gradient(var(--border), var(--border)),
    linear-gradient(var(--border), var(--border)),
    linear-gradient(var(--border), var(--border)),
    linear-gradient(var(--border), var(--border));
  background-size: 2px 12px, 12px 2px, 2px 12px, 12px 2px,
                   2px 12px, 12px 2px, 2px 12px, 12px 2px;
  background-position:
    top left, top left,
    top right, top right,
    bottom left, bottom left,
    bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.panel-files:hover  {
  border-color: var(--primary);
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 25%, transparent), inset 0 0 10px color-mix(in srgb, var(--primary) 5%, transparent);
  background-image:
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary)),
    linear-gradient(var(--primary), var(--primary));
  background-size: 2px 12px, 12px 2px, 2px 12px, 12px 2px,
                   2px 12px, 12px 2px, 2px 12px, 12px 2px;
  background-position: top left, top left, top right, top right, bottom left, bottom left, bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.panel-forum:hover  {
  border-color: var(--cyan);
  box-shadow: 0 0 12px color-mix(in srgb, var(--cyan) 25%, transparent), inset 0 0 10px color-mix(in srgb, var(--cyan) 5%, transparent);
  background-image:
    linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan));
  background-size: 2px 12px, 12px 2px, 2px 12px, 12px 2px,
                   2px 12px, 12px 2px, 2px 12px, 12px 2px;
  background-position: top left, top left, top right, top right, bottom left, bottom left, bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.panel-shop:hover   {
  border-color: var(--orange);
  box-shadow: 0 0 12px color-mix(in srgb, var(--orange) 25%, transparent), inset 0 0 10px color-mix(in srgb, var(--orange) 5%, transparent);
  background-image:
    linear-gradient(var(--orange), var(--orange)),
    linear-gradient(var(--orange), var(--orange)),
    linear-gradient(var(--orange), var(--orange)),
    linear-gradient(var(--orange), var(--orange)),
    linear-gradient(var(--orange), var(--orange)),
    linear-gradient(var(--orange), var(--orange)),
    linear-gradient(var(--orange), var(--orange)),
    linear-gradient(var(--orange), var(--orange));
  background-size: 2px 12px, 12px 2px, 2px 12px, 12px 2px,
                   2px 12px, 12px 2px, 2px 12px, 12px 2px;
  background-position: top left, top left, top right, top right, bottom left, bottom left, bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}

.panel-instagram:hover {
  border-color: #e1306c;
  box-shadow: 0 0 12px color-mix(in srgb, #e1306c 25%, transparent), inset 0 0 10px color-mix(in srgb, #e1306c 5%, transparent);
  background-image:
    linear-gradient(#e1306c, #e1306c), linear-gradient(#e1306c, #e1306c),
    linear-gradient(#e1306c, #e1306c), linear-gradient(#e1306c, #e1306c),
    linear-gradient(#e1306c, #e1306c), linear-gradient(#e1306c, #e1306c),
    linear-gradient(#e1306c, #e1306c), linear-gradient(#e1306c, #e1306c);
  background-size: 2px 12px, 12px 2px, 2px 12px, 12px 2px,
                   2px 12px, 12px 2px, 2px 12px, 12px 2px;
  background-position: top left, top left, top right, top right, bottom left, bottom left, bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.panel-twitter:hover {
  border-color: #ffffff;
  box-shadow: 0 0 12px color-mix(in srgb, #ffffff 15%, transparent), inset 0 0 10px color-mix(in srgb, #ffffff 3%, transparent);
  background-image:
    linear-gradient(#ffffff, #ffffff), linear-gradient(#ffffff, #ffffff),
    linear-gradient(#ffffff, #ffffff), linear-gradient(#ffffff, #ffffff),
    linear-gradient(#ffffff, #ffffff), linear-gradient(#ffffff, #ffffff),
    linear-gradient(#ffffff, #ffffff), linear-gradient(#ffffff, #ffffff);
  background-size: 2px 12px, 12px 2px, 2px 12px, 12px 2px,
                   2px 12px, 12px 2px, 2px 12px, 12px 2px;
  background-position: top left, top left, top right, top right, bottom left, bottom left, bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.panel-twitch:hover {
  border-color: #9147ff;
  box-shadow: 0 0 12px color-mix(in srgb, #9147ff 25%, transparent), inset 0 0 10px color-mix(in srgb, #9147ff 5%, transparent);
  background-image:
    linear-gradient(#9147ff, #9147ff), linear-gradient(#9147ff, #9147ff),
    linear-gradient(#9147ff, #9147ff), linear-gradient(#9147ff, #9147ff),
    linear-gradient(#9147ff, #9147ff), linear-gradient(#9147ff, #9147ff),
    linear-gradient(#9147ff, #9147ff), linear-gradient(#9147ff, #9147ff);
  background-size: 2px 12px, 12px 2px, 2px 12px, 12px 2px,
                   2px 12px, 12px 2px, 2px 12px, 12px 2px;
  background-position: top left, top left, top right, top right, bottom left, bottom left, bottom right, bottom right;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.live-status-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.live-status-platform {
  font-family: var(--font-head);
  font-size: 0.55rem;
  white-space: nowrap;
}
.live-status-val {
  font-family: var(--font-head);
  font-size: 0.55rem;
  color: var(--text-dim);
  position: relative;
}

.sh-live-status {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: #9147ff;
  margin-top: 0.3rem;
  display: block;
}

.panel-icon {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--text-dim);
}
.panel-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: var(--primary);
  text-shadow: 0 0 7px color-mix(in srgb, var(--primary) 80%, transparent), 0 0 20px color-mix(in srgb, var(--primary) 40%, transparent), 0 0 40px color-mix(in srgb, var(--primary) 20%, transparent);
}
.panel-forum .panel-title { color: var(--cyan);   text-shadow: 0 0 7px color-mix(in srgb, var(--cyan) 80%, transparent), 0 0 20px color-mix(in srgb, var(--cyan) 40%, transparent), 0 0 40px color-mix(in srgb, var(--cyan) 20%, transparent); }
.panel-shop .panel-title  { color: var(--orange); text-shadow: 0 0 7px color-mix(in srgb, var(--orange) 80%, transparent), 0 0 20px color-mix(in srgb, var(--orange) 40%, transparent), 0 0 40px color-mix(in srgb, var(--orange) 20%, transparent); }
.panel-desc { color: var(--text-dim); font-size: 1.1rem; flex: 1; }
.panel-cta {
  font-family: var(--font-head);
  font-size: 0.5rem;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan);
  margin-top: auto;
}

/* ── SH YouTube next-video ETA ───────────────────────────────── */
.sh-video-eta {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: #ff3333;
  text-shadow: 0 0 6px rgba(255,51,51,0.8), 0 0 16px rgba(255,51,51,0.3);
  letter-spacing: 0.06em;
  display: block;
  position: relative;
}
.sh-video-eta::before,
.sh-video-eta::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0;
}
.sh-video-eta::before {
  color: #ff3333;
  text-shadow: -2px 0 #00ffff;
  animation: sh-eta-top 3.5s infinite linear;
}
.sh-video-eta::after {
  color: #ff3333;
  text-shadow: 2px 0 #ff00ff;
  animation: sh-eta-bot 3.5s infinite linear;
  animation-delay: 0.2s;
}
@keyframes sh-eta-top {
  0%,58%,100%  { opacity: 0; transform: none; clip-path: none; }
  60%          { opacity: 1;   transform: translateX(-4px) skewX(-8deg); clip-path: inset(0 0 60% 0); }
  62%          { opacity: 0; }
  68%          { opacity: 0.9; transform: translateX(5px) skewX(6deg);   clip-path: inset(5% 0 45% 0); }
  70%          { opacity: 0; }
  78%          { opacity: 0.8; transform: translateX(-6px) skewX(-5deg); clip-path: inset(0 0 70% 0); }
  80%          { opacity: 0; }
}
@keyframes sh-eta-bot {
  0%,61%,100%  { opacity: 0; transform: none; clip-path: none; }
  63%          { opacity: 0.9; transform: translateX(4px) skewX(8deg);   clip-path: inset(50% 0 0 0); }
  65%          { opacity: 0; }
  73%          { opacity: 0.8; transform: translateX(-5px);               clip-path: inset(65% 0 0 0); }
  75%          { opacity: 0; }
  83%          { opacity: 0.7; transform: translateX(6px) skewX(-4deg);  clip-path: inset(55% 0 0 0); }
  85%          { opacity: 0; }
}

/* ── Boot Sequence ───────────────────────────────────────────── */
.boot-sequence {
  background: var(--bg);
  padding: 2rem;
  min-height: 300px;
  display: flex;
  align-items: flex-start;
}
.boot-text {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--primary);
  white-space: pre-wrap;
  line-height: 1.7;
  width: 100%;
}

/* ── Search form ─────────────────────────────────────────────── */
.search-form { margin-bottom: 2rem; }
.search-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.search-input, .search-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1.1rem;
  padding: 0.6rem 1rem;
  outline: none;
  transition: border-color 0.15s;
}
.search-input { flex: 1; min-width: 200px; }
.search-input:focus, .search-select:focus { border-color: var(--primary); }
.search-select option { background: var(--bg); color: var(--primary); }

/* ── File Cards (Memory Card style) ─────────────────────────── */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.memory-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.memory-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0.4;
}
.memory-card:hover {
  border-color: var(--cyan);
  border-top-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0,255,255,0.1);
  color: inherit;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-category {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--text-dim);
}
.card-downloads {
  font-size: 0.9rem;
  color: var(--orange);
  text-shadow: 0 0 4px var(--orange);
}
.card-date { color: var(--text-dim); font-size: 0.9rem; }
.card-title {
  font-family: var(--font-head);
  font-size: 0.6rem;
  color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
  line-height: 1.5;
}
.card-desc { color: var(--text-dim); font-size: 1rem; flex: 1; }
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--dim);
}
.card-size { color: var(--text-dim); font-size: 0.95rem; }
.card-cta {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--cyan);
  text-shadow: 0 0 5px var(--cyan);
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.tag {
  font-size: 0.85rem;
  color: var(--text-dim);
  border: 1px solid var(--dim);
  padding: 0.1rem 0.4rem;
}

/* ── Product Cards (Arcade Panel style) ─────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.arcade-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-top: 4px solid var(--orange);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.arcade-panel::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0.3;
}
.arcade-panel:hover {
  border-color: var(--orange);
  box-shadow: 0 0 20px rgba(255,102,0,0.15);
  color: inherit;
}

.product-image-wrap {
  background: var(--dim);
  border-bottom: 1px solid var(--border);
}
.product-image-placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text-dim);
}
.product-image-placeholder.large { height: 240px; font-size: 1.5rem; }

.product-info { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.6rem; }
.product-name {
  font-family: var(--font-head);
  font-size: 0.55rem;
  color: var(--primary);
  line-height: 1.6;
}
.product-desc { color: var(--text-dim); font-size: 1rem; flex: 1; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.product-price {
  font-family: var(--font-head);
  font-size: 0.9rem;
}
.product-stock { font-size: 0.9rem; }
.in-stock  { color: var(--green);  text-shadow: 0 0 4px var(--green); }
.out-stock { color: var(--orange); text-shadow: 0 0 4px var(--orange); }

/* ── Detail pages ────────────────────────────────────────────── */
.detail-layout { max-width: 800px; }
.detail-card { padding: 2rem; }
.detail-title {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.product-detail-card .detail-title { color: var(--orange); text-shadow: 0 0 10px var(--orange); }
.detail-desc { color: var(--text-dim); font-size: 1.15rem; line-height: 1.7; margin-bottom: 1.5rem; }
.detail-meta { border-top: 1px solid var(--dim); padding-top: 1rem; margin-bottom: 1.5rem; }
.meta-row { display: flex; gap: 1.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--dim); align-items: center; }
.meta-label {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--text-dim);
  min-width: 100px;
}
.meta-value { font-size: 1.1rem; }
.price-large { font-family: var(--font-head); font-size: 1.4rem; }

.download-action { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.download-hint { color: var(--text-dim); font-size: 0.95rem; }

.product-detail-image { margin-bottom: 1.5rem; }

/* ── Shop notice ─────────────────────────────────────────────── */
.shop-notice { margin-bottom: 2rem; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  padding: 3rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 1.2rem;
  border: 1px dashed var(--dim);
  grid-column: 1 / -1;
}

/* ── Error page ──────────────────────────────────────────────── */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem 0;
}
.error-ascii {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--orange);
  text-shadow: 0 0 8px var(--orange);
}
.error-title {
  font-family: var(--font-head);
  font-size: 0.7rem;
  color: var(--orange);
  text-shadow: 0 0 10px var(--orange);
}

/* ── Role badge [M] ─────────────────────────────────────────── */
.role-badge {
  font-family: var(--font-head);
  font-size: 0.38rem;
  padding: 0.1rem 0.3rem;
  border: 1px solid;
  vertical-align: middle;
  margin-left: 0.3rem;
}
.role-badge--mod    { color: #ff3333; border-color: #ff3333; text-shadow: 0 0 6px #ff3333; }
.role-badge--banned { color: #ff3333; border-color: #ff3333; opacity: 0.8; }
.banned-author { color: #ff3333; opacity: 0.6; font-size: 0.55rem; }
.banned-post   { color: #ff3333; opacity: 0.5; font-style: italic; }

/* ── Forum author links ──────────────────────────────────────── */
.forum-author-link { color: var(--primary); }
.forum-author-link:hover { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }

/* ── Nav username as link ────────────────────────────────────── */
a.nav-username { text-decoration: none; }
a.nav-username:hover { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }

/* ── Profile page ────────────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.profile-card {
  padding: 1.5rem;
}
.profile-username {
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
  margin-bottom: 1.25rem;
  word-break: break-all;
}
.profile-meta { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.profile-meta-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; }
.profile-meta-label { color: var(--text-dim); flex-shrink: 0; }
.profile-meta-value { text-align: right; }
.profile-bio {
  font-size: 0.95rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  line-height: 1.6;
}
.profile-right { display: flex; flex-direction: column; gap: 1.5rem; }
.profile-posts-panel, .profile-edit-panel { padding: 1.25rem; }
.profile-section-title {
  font-family: var(--font-head);
  font-size: 0.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.profile-post-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.profile-post-row:last-child { border-bottom: none; }
.profile-post-thread {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--primary);
  display: block;
  margin-bottom: 0.3rem;
}
.profile-post-thread:hover { color: var(--cyan); }
.profile-post-snippet { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.25rem; }
.profile-post-date { font-size: 0.8rem; color: var(--dim); }
.profile-empty { color: var(--text-dim); font-size: 0.9rem; }

/* Profile edit form */
.profile-form { display: flex; flex-direction: column; gap: 0.85rem; }
.profile-form-row { display: flex; flex-direction: column; gap: 0.3rem; }
.profile-label {
  font-family: var(--font-head);
  font-size: 0.38rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.profile-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  width: 100%;
  box-sizing: border-box;
}
.profile-input:focus { outline: none; border-color: var(--primary); }
.profile-textarea { resize: vertical; min-height: 80px; }

@media (max-width: 600px) {
  .profile-layout { grid-template-columns: 1fr; }
}

/* ── L.O.R.E. nav link ───────────────────────────────────────── */
.nav-link--lore {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
  animation: lore-pulse 3s ease-in-out infinite;
}
@keyframes lore-pulse {
  0%, 100% { text-shadow: 0 0 6px var(--cyan); }
  50%       { text-shadow: 0 0 16px var(--cyan), 0 0 30px var(--cyan); }
}
.nav-link--lore:hover { color: var(--cyan); }

/* ── Discord nav link ────────────────────────────────────────── */
.nav-link--discord { color: #5865f2; text-shadow: 0 0 6px #5865f2; }
.nav-link--discord:hover { color: #5865f2; border-color: #5865f2; text-shadow: 0 0 12px #5865f2; }

/* ── L.O.R.E. page ───────────────────────────────────────────── */
.lore-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 900px;
}

.lore-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.lore-ascii {
  font-family: monospace;
  font-size: clamp(0.35rem, 1.4vw, 0.65rem);
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
  line-height: 1.2;
  white-space: pre;
  animation: lore-pulse 4s ease-in-out infinite;
}

.lore-header-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.lore-subtitle {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan);
  letter-spacing: 0.12em;
}

.lore-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

@keyframes status-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--primary); }
  50%       { opacity: 0.4; box-shadow: none; }
}
.lore-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: status-blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

.lore-stat   { color: var(--text-dim); font-size: 0.9rem; }
.lore-divider { color: var(--dim); }

/* ── Terminal window ─────────────────────────────────────────── */
.lore-terminal {
  border: 1px solid var(--cyan);
  box-shadow: 0 0 20px rgba(0,255,255,0.06);
  display: flex;
  flex-direction: column;
  height: 60vh;
  min-height: 420px;
  background: var(--bg-card);
}

.lore-terminal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--dim);
  border-bottom: 1px solid var(--cyan);
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.lore-terminal-title {
  font-family: var(--font-head);
  font-size: 0.4rem;
  color: var(--cyan);
  text-shadow: 0 0 5px var(--cyan);
}
.lore-terminal-hint { color: var(--text-dim); font-size: 0.85rem; }

.lore-chat {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  scroll-behavior: smooth;
}
.lore-chat::-webkit-scrollbar { width: 4px; }
.lore-chat::-webkit-scrollbar-track { background: var(--bg); }
.lore-chat::-webkit-scrollbar-thumb { background: var(--border); }

.lore-msg {
  display: flex;
  gap: 0.75rem;
  font-size: 1.1rem;
  line-height: 1.6;
  align-items: baseline;
}
.lore-msg-who {
  font-family: var(--font-head);
  font-size: 0.38rem;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.2rem;
}
.lore-msg-text { word-break: break-word; white-space: pre-wrap; }

.lore-msg--lore .lore-msg-who { color: var(--cyan); text-shadow: 0 0 5px var(--cyan); }
.lore-msg--lore .lore-msg-text { color: var(--text-dim); }
.lore-msg--user .lore-msg-who { color: var(--primary); text-shadow: 0 0 5px var(--primary); }
.lore-msg--user .lore-msg-text { color: var(--primary); }
.lore-msg--thinking .lore-msg-text { color: var(--text-dim); font-style: italic; }
.lore-msg--offline .lore-msg-text { color: #ff4444; }
.lore-msg--waiting .lore-msg-text::after { content: '▋'; color: var(--green); animation: lore-blink 0.7s step-start infinite; }
@keyframes lore-blink { 50% { opacity: 0; } }

.lore-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--cyan);
  flex-shrink: 0;
  background: var(--bg);
}
.lore-prompt {
  font-family: var(--font-head);
  font-size: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.lore-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1.2rem;
  outline: none;
  caret-color: var(--primary);
}
.lore-input::placeholder { color: var(--text-dim); }
.lore-input:disabled { opacity: 0.4; }
.lore-send { flex-shrink: 0; font-size: 0.45rem; padding: 0.5rem 1rem; }

@media (max-width: 600px) {
  .lore-header { flex-direction: column; gap: 1rem; }
  .lore-terminal { height: 70vh; }
}

/* ── Checkbox inputs ─────────────────────────────────────────── */
.form-checkboxes { gap: 0.6rem; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.4;
}
.checkbox-label:hover { color: var(--primary); }
.checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  margin-top: 0.2rem;
  position: relative;
  transition: border-color 0.15s;
}
.checkbox-input:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}
.checkbox-input:checked::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--bg);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.checkbox-text { flex: 1; }

/* ── Forum new thread + reply ────────────────────────────────── */
.btn-new-thread {
  font-family: var(--font-head);
  font-size: 0.38rem;
  color: var(--cyan);
  text-shadow: 0 0 5px var(--cyan);
  border: 1px solid var(--cyan);
  padding: 0.2rem 0.5rem;
  text-decoration: none;
  transition: all 0.15s;
  margin-left: 0.5rem;
}
.btn-new-thread:hover {
  background: var(--cyan);
  color: var(--bg);
  text-shadow: none;
}

.reply-form-wrap {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  background: var(--bg-card);
}
.reply-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: var(--dim);
  border-bottom: 1px solid var(--border);
}
.reply-form-title {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
}
.reply-earn {
  font-family: var(--font-head);
  font-size: 0.38rem;
}
.reply-form {
  display: flex;
  align-items: flex-start;
}
.reply-sidebar {
  width: 140px;
  min-width: 140px;
  padding: 1rem;
  border-right: 1px solid var(--dim);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.reply-body {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.reply-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1.15rem;
  padding: 0.75rem 1rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  line-height: 1.6;
}
.reply-textarea:focus { border-color: var(--primary); box-shadow: 0 0 8px rgba(0,255,65,0.08); }
.reply-textarea::placeholder { color: var(--text-dim); }

@media (max-width: 600px) {
  .reply-form { flex-direction: column; }
  .reply-sidebar { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid var(--dim); flex-direction: row; gap: 1rem; }
}

/* ── Updates ─────────────────────────────────────────────────── */
.updates-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 780px;
}

.update-card {
  display: grid;
  grid-template-columns: 11rem 1fr;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.update-card:hover {
  border-left-color: var(--cyan);
  background: rgba(0,255,255,0.03);
  color: inherit;
}

.update-card-date {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.update-card-time {
  color: var(--dim);
  font-size: 0.85rem;
}
.update-card-title {
  font-family: var(--font-head);
  font-size: 0.5rem;
  color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
  line-height: 1.4;
}

.update-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.update-meta-sep { color: var(--dim); }

.update-body { max-width: 700px; }

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

/* ── Database of Everything ──────────────────────────────────── */
.database-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.database-cats--sub {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.database-cat-tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  padding: 1.5rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.database-cat-tile:hover {
  border-color: var(--cyan);
  border-top-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0,255,255,0.08);
  color: inherit;
}
.database-cat-tile--sub {
  border-top-color: var(--border);
  padding: 1rem 1.1rem;
}
.database-cat-tile--sub:hover {
  border-top-color: var(--cyan);
}

.cat-tile-icon {
  font-family: var(--font-head);
  font-size: 0.55rem;
  color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
}
.cat-tile-name {
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: var(--text);
  line-height: 1.4;
}
.cat-tile-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  flex: 1;
}
.cat-tile-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--dim);
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.design-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.design-card:hover {
  border-color: var(--orange);
  box-shadow: 0 0 16px rgba(255,102,0,0.12);
  color: inherit;
}

.license-badge {
  font-family: var(--font-head);
  font-size: 0.38rem;
  padding: 0.15em 0.5em;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.license-cc0   { color: var(--primary); }
.license-cc-by { color: var(--cyan); }
.license-cc-by-sa { color: var(--cyan); }

.db-section-label {
  font-family: var(--font-head);
  font-size: 0.5rem;
  color: var(--text-dim);
  margin: 1.5rem 0 0.75rem;
}

.db-search-meta {
  margin: 1rem 0 1.5rem;
  font-size: 1rem;
}

/* Design detail */
.design-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 700px) {
  .design-detail { grid-template-columns: 1fr; }
}

.design-thumb-img {
  width: 100%;
  border: 1px solid var(--border);
  display: block;
}
.design-thumb-placeholder {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1rem;
  text-align: center;
}
.design-ascii-placeholder {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.4;
}
.design-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}
.design-description {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.7;
}
.design-files-heading {
  font-family: var(--font-head);
  font-size: 0.6rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.file-dl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.file-dl-table th {
  font-family: var(--font-head);
  font-size: 0.4rem;
  color: var(--text-dim);
  text-align: left;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.file-dl-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--dim);
  vertical-align: middle;
}
.file-dl-table tr:last-child td { border-bottom: none; }

.file-type-badge {
  font-family: var(--font-head);
  font-size: 0.38rem;
  padding: 0.15em 0.5em;
  border-radius: 2px;
  border: 1px solid currentColor;
}
.type-stl   { color: var(--primary); }
.type-step  { color: var(--cyan); }
.type-f3d   { color: var(--orange); }
.type-dxf   { color: #ffdd00; }
.type-kicad { color: #b47aff; }
.type-zip   { color: var(--text-dim); }
.type-other { color: var(--text-dim); }

.btn-sm { font-size: 0.38rem; padding: 0.4em 0.8em; }

/* Breadcrumb trail */
.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.breadcrumb-sep { color: var(--text-dim); }
.breadcrumb--active { color: var(--primary); }

/* ── Apps Grid ───────────────────────────────────────────────── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--cyan);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0.4;
}
.app-card:hover {
  border-color: var(--primary);
  border-top-color: var(--primary);
  box-shadow: 0 0 16px rgba(0,255,65,0.1);
  color: inherit;
}

.app-featured-badge {
  font-family: var(--font-head);
  font-size: 0.4rem;
  color: var(--orange);
  text-shadow: 0 0 5px var(--orange);
}

/* ── Log (Devlog/Blog) ───────────────────────────────────────── */
.log-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.log-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.log-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  height: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.log-card:hover .log-card-inner {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0,255,255,0.08);
}

.log-card-badge {
  font-family: var(--font-head);
  font-size: 0.4rem;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan);
  letter-spacing: 0.1em;
}
.log-card-badge--text { color: var(--primary); text-shadow: 0 0 6px var(--primary); }

.log-card-title {
  font-family: var(--font-head);
  font-size: 0.6rem;
  color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
  line-height: 1.6;
}
.log-card-summary { color: var(--text-dim); font-size: 1.05rem; line-height: 1.6; flex: 1; }
.log-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--dim);
  margin-top: auto;
}
.log-card-date { color: var(--text-dim); font-size: 0.9rem; }

/* Log post */
.log-post { max-width: 780px; }
.log-post-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.log-post-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.log-post-date { color: var(--text-dim); font-size: 0.95rem; }
.log-badge {
  font-family: var(--font-head);
  font-size: 0.4rem;
  color: var(--cyan);
  text-shadow: 0 0 5px var(--cyan);
  border: 1px solid var(--cyan);
  padding: 0.2rem 0.5rem;
}
.log-post-title {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.log-post-summary {
  color: var(--text-dim);
  font-size: 1.2rem;
  line-height: 1.6;
  font-style: italic;
}

.log-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}
.log-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.log-post-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-dim);
}
.log-post-body h2 {
  font-family: var(--font-head);
  font-size: 0.6rem;
  color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.log-post-body h3 {
  font-family: var(--font-head);
  font-size: 0.5rem;
  color: var(--cyan);
  margin: 1.5rem 0 0.5rem;
}
.log-post-body p { margin-bottom: 1rem; color: var(--text-dim); }
.log-post-body strong { color: var(--primary); font-weight: normal; }
.log-post-body a { color: var(--cyan); text-decoration: underline; }
.log-post-body a:hover { color: var(--primary); }
.log-post-body ul, .log-post-body ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
.log-post-body li { margin-bottom: 0.4rem; }
.log-post-body code {
  font-family: monospace;
  background: var(--dim);
  color: var(--orange);
  padding: 0.15rem 0.4rem;
  font-size: 0.95rem;
}
.log-post-body pre {
  background: var(--dim);
  border: 1px solid var(--border);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.log-post-body pre code {
  background: none;
  padding: 0;
}
.log-post-body blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
  color: var(--text-dim);
  margin: 1rem 0;
}

/* ── Forum ───────────────────────────────────────────────────── */
.forum-board { display: flex; flex-direction: column; gap: 1.5rem; }

.forum-category {
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.forum-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: var(--dim);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.forum-cat-title {
  font-family: var(--font-head);
  font-size: 0.5rem;
  color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
  text-decoration: none;
}
.forum-cat-title:hover {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}
.forum-cat-counts {
  font-size: 0.9rem;
  color: var(--text-dim);
  display: flex;
  gap: 0.5rem;
}
.forum-divider { color: var(--border); }
.forum-cat-desc {
  padding: 0.5rem 1.25rem;
  color: var(--text-dim);
  font-size: 1rem;
  border-bottom: 1px solid var(--dim);
}

.forum-thread-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.forum-thread-table th {
  font-family: var(--font-head);
  font-size: 0.38rem;
  color: var(--text-dim);
  text-align: left;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--dim);
  letter-spacing: 0.08em;
}
.th-views, .th-date { text-align: right; }
.forum-thread-row { border-bottom: 1px solid var(--dim); }
.forum-thread-row:last-child { border-bottom: none; }
.forum-thread-row:hover { background: rgba(0,255,65,0.03); }

.forum-thread-row td { padding: 0.6rem 1.25rem; vertical-align: middle; }
.forum-thread-link {
  color: var(--cyan);
  text-decoration: none;
  font-size: 1.05rem;
}
.forum-thread-link:hover { color: var(--primary); text-shadow: 0 0 6px var(--primary); }
.td-author { color: var(--text-dim); font-size: 0.95rem; white-space: nowrap; }
.td-views { text-align: right; font-size: 0.95rem; white-space: nowrap; }
.td-date { text-align: right; color: var(--text-dim); font-size: 0.9rem; white-space: nowrap; }

.forum-empty { padding: 1rem 1.25rem; color: var(--text-dim); font-size: 1rem; }

/* ── Forum search ────────────────────────────────────────────── */
.forum-search-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.forum-search-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1.1rem;
  padding: 0.5rem 0.75rem;
}
.forum-search-input::placeholder { color: var(--text-dim); }
.forum-search-input:focus { outline: none; border-color: var(--primary); }
.forum-search-meta {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.search-result-category {
  font-family: var(--font-head);
  font-size: 0.35rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.2rem;
}
.search-snippet {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
  line-height: 1.4;
}

.forum-view-all {
  display: block;
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--text-dim);
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.forum-view-all:hover { color: var(--primary); }

.forum-cat-actions { margin-bottom: 1rem; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.page-btn {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--text-dim);
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  letter-spacing: 0.05em;
}
.page-btn:hover { color: var(--primary); border-color: var(--primary); }
.page-btn--active {
  color: var(--bg);
  background: var(--primary);
  border-color: var(--primary);
}

/* Forum thread view */
.forum-thread-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.forum-thread-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.forum-thread-badges { display: flex; gap: 0.4rem; align-items: center; flex-shrink: 0; }
.forum-thread-title {
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
  line-height: 1.5;
  margin: 0;
}
.forum-thread-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--text-dim);
}

/* ── Mod badges ──────────────────────────────────────────────── */
.mod-badge {
  font-family: var(--font-head);
  font-size: 0.38rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid;
  white-space: nowrap;
}
.mod-badge--pin  { color: var(--cyan);   border-color: var(--cyan);   text-shadow: 0 0 6px var(--cyan); }
.mod-badge--lock { color: var(--orange); border-color: var(--orange); text-shadow: 0 0 6px var(--orange); }

/* Pinned thread row highlight */
.thread-row--pinned { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.thread-row--pinned .forum-thread-link { color: var(--primary); }

/* ── Mod controls strip ──────────────────────────────────────── */
.mod-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  flex-wrap: wrap;
}
.mod-controls-label {
  font-family: var(--font-head);
  font-size: 0.38rem;
  color: var(--orange);
  text-shadow: 0 0 6px var(--orange);
  margin-right: 0.25rem;
}
.mod-btn {
  font-family: var(--font-head);
  font-size: 0.38rem;
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: 1px solid;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.mod-btn--pin  { color: var(--cyan);   border-color: var(--cyan); }
.mod-btn--pin:hover  { background: var(--cyan);   color: var(--bg); }
.mod-btn--lock { color: var(--orange); border-color: var(--orange); }
.mod-btn--lock:hover { background: var(--orange); color: var(--bg); }
.mod-btn--delete { color: #ff3333; border-color: #ff3333; }
.mod-btn--delete:hover { background: #ff3333; color: var(--bg); }
.mod-btn--sm { font-size: 0.33rem; padding: 0.15rem 0.4rem; }

/* Post date row with inline delete */
.forum-post-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.forum-posts { display: flex; flex-direction: column; gap: 0; }

.forum-post {
  display: flex;
  border: 1px solid var(--border);
  border-bottom: none;
}
.forum-post:last-child { border-bottom: 1px solid var(--border); }
.forum-post:nth-child(odd) { background: var(--bg-card); }
.forum-post:nth-child(even) { background: var(--bg-card2); }

.forum-post-sidebar {
  width: 140px;
  min-width: 140px;
  padding: 1rem;
  border-right: 1px solid var(--dim);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.forum-post-author {
  font-family: var(--font-head);
  font-size: 0.42rem;
  color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
  word-break: break-all;
  margin-bottom: 0.25rem;
}
.forum-post-num { font-size: 0.85rem; color: var(--orange); }
.forum-post-join, .forum-post-count { font-size: 0.8rem; color: var(--text-dim); }

.forum-post-content { flex: 1; padding: 1rem 1.25rem; }
.forum-post-date-row {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--dim);
}
.forum-post-date {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.forum-post-body { font-size: 1.1rem; line-height: 1.7; color: var(--text-dim); white-space: pre-wrap; }

@media (max-width: 600px) {
  .forum-post { flex-direction: column; }
  .forum-post-sidebar { width: 100%; min-width: unset; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--dim); }
  .th-views, .th-date, .td-views, .td-date { display: none; }
}

/* ── Product images ──────────────────────────────────────────── */
.product-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.product-image--detail {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* ── Cart icon in nav ────────────────────────────────────────── */
.cart-icon-btn {
  font-family: var(--font-head);
  font-size: 0.48rem;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.cart-icon-btn:hover { background: var(--primary); color: var(--bg); text-shadow: none; }
#cartCount { color: var(--orange); }
.cart-icon-btn:hover #cartCount { color: var(--bg); }

/* ── Cart Drawer ─────────────────────────────────────────────── */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}
.cart-drawer.cart-open { pointer-events: auto; }

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  opacity: 0;
  transition: opacity 0.3s;
}
.cart-drawer.cart-open .cart-overlay { opacity: 1; }

.cart-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.cart-drawer.cart-open .cart-panel { transform: translateX(0); }

.cart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--dim);
  flex-shrink: 0;
}
.cart-panel-title {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
}
.cart-close {
  background: transparent;
  border: 1px solid var(--text-dim);
  color: var(--text-dim);
  font-family: var(--font-head);
  font-size: 0.4rem;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  transition: all 0.15s;
}
.cart-close:hover { color: var(--orange); border-color: var(--orange); }

.cart-panel-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cart-panel-items::-webkit-scrollbar { width: 4px; }
.cart-panel-items::-webkit-scrollbar-thumb { background: var(--border); }

.cart-empty {
  color: var(--text-dim);
  font-size: 1.1rem;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg);
}
.cart-item-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-item-img-placeholder {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dim);
  color: var(--text-dim);
  font-size: 0.75rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.cart-item-title {
  font-family: var(--font-head);
  font-size: 0.35rem;
  color: var(--primary);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-variant { color: var(--text-dim); font-size: 0.9rem; }
.cart-item-price   { font-size: 1rem; }

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.cart-qty-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 1rem;
  width: 1.4rem;
  height: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
}
.cart-qty-btn:hover { color: var(--primary); border-color: var(--primary); }
.cart-qty { font-size: 1rem; min-width: 1.2rem; text-align: center; }
.cart-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem;
  transition: color 0.15s;
  margin-left: 0.1rem;
}
.cart-remove-btn:hover { color: var(--orange); }

.cart-panel-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
  background: var(--bg);
}
.cart-subtotal {
  font-family: var(--font-head);
  font-size: 0.5rem;
  text-align: right;
}

/* ── Variant selector ────────────────────────────────────────── */
.variant-select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1.15rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s;
}
.variant-select:focus { border-color: var(--primary); }
.variant-select option { background: var(--bg); color: var(--primary); }

/* ── Brand switcher strip ────────────────────────────────────── */
.brand-switcher {
  display: flex;
  gap: 0;
  background: #050505;
  border-bottom: 1px solid #1a1a1a;
  padding: 0 1.5rem;
  z-index: 10;
  position: relative;
  align-items: center;
}
.switcher-toggles {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.switcher-toggle-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.2);
  font-family: var(--font-head);
  font-size: 0.4rem;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
  letter-spacing: 0.05em;
}
.switcher-toggle-btn:hover { color: rgba(255,255,255,0.5); }
.brand-tab {
  font-family: var(--font-head);
  font-size: 0.55rem;
  padding: 0.4rem 1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  letter-spacing: 0.05em;
}

/* Inactive — show each brand's color at low opacity */
.brand-tab--felix-corp     { color: rgba(0,255,65,0.35); }
.brand-tab--sean-hodgins   { color: rgba(200,200,200,0.35); }
.brand-tab--idle-hands-dev { color: rgba(255,102,0,0.35); }

/* Hover — full brand color */
.brand-tab--felix-corp:hover     { color: #00ff41; }
.brand-tab--sean-hodgins:hover   { color: #c8c8c8; }
.brand-tab--idle-hands-dev:hover { color: #ff6600; }

/* Active — inverted: filled background, dark text */
.brand-tab--felix-corp.brand-tab--active     { background: #00ff41; color: #0a0a0a; border-color: #00ff41; }
.brand-tab--sean-hodgins.brand-tab--active   { background: #c8c8c8; color: #0a0a0a; border-color: #c8c8c8; }
.brand-tab--idle-hands-dev.brand-tab--active { background: #ff6600; color: #0a0a0a; border-color: #ff6600; }


/* ── Mobile directory dropdown button (hidden on desktop) ───── */
.nav-directory-btn { display: none; }
/* On desktop, nav-items is transparent to flex so links flow normally */
.nav-items { display: contents; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-main { padding: 1.25rem; }
  .site-header { padding: 1rem; }
  .ascii-logo { font-size: 0.2rem; }
  .header-ticker { display: none; }
  .home-panels { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; }
  .search-input { min-width: unset; width: 100%; }

  /* Nav: shrink to just the directory button, dropdown below */
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-top: 0.75rem;
  }

  /* Directory button — styled exactly like a nav-link */
  .nav-directory-btn {
    display: block;
    font-family: var(--font-head);
    font-size: 0.6rem;
    color: var(--primary);
    text-shadow: 0 0 6px var(--primary);
    letter-spacing: 0.1em;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--primary);
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
  }
  .nav-directory-btn:hover {
    color: var(--cyan);
    border-color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan);
  }

  /* Dropdown panel — hidden until nav-open */
  .nav-items {
    display: none;
    flex-direction: column;
    width: 100%;
    border: 1px solid var(--border);
    border-top: none;
    background: var(--bg);
  }
  .site-nav.nav-open .nav-items {
    display: flex;
  }

  /* Each nav link in dropdown */
  .nav-items .nav-link {
    font-size: 0.6rem;
    padding: 0.9rem 1rem;
    border: none;
    border-bottom: 1px solid var(--border);
    display: block;
    width: 100%;
  }

  /* Auth rows at bottom of dropdown */
  .nav-items .nav-auth {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin-left: 0;
  }
  .nav-items .nav-auth .nav-link,
  .nav-items .nav-auth .cart-icon-btn,
  .nav-items .nav-auth .btn-nav-logout {
    font-size: 0.6rem;
    padding: 0.9rem 1rem;
    border: none;
    border-bottom: 1px solid var(--border);
    width: 100%;
    text-align: left;
    display: block;
  }
  .nav-items .nav-auth .nav-user {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
  }
  .nav-items .nav-auth form { width: 100%; }
}
