/* ============================================================
   OKOKA v3 — Design System (Inspired by Dekins.info + Okoka Style)
   ============================================================ */

:root {
  /* Dark Theme (Default) */
  --bg: #090A10;
  --wall-shade: rgba(9, 10, 16, 0.82);
  --ink: #F8FAFC;
  --ink-soft: #94A3B8;
  --ink-muted: #64748B;
  --accent: #A855F7;
  --accent-cyan: #06B6D4;
  --accent-gold: #F59E0B;
  --accent-emerald: #10B981;
  --card: rgba(18, 20, 32, 0.88);
  --card-border: rgba(168, 85, 247, 0.22);
  --shadow: rgba(0, 0, 0, 0.6);
  --glow: rgba(168, 85, 247, 0.25);
  --pill: rgba(168, 85, 247, 0.14);
  --pill-text: #D8B4FE;
  --field: rgba(12, 14, 24, 0.7);
  --dash: rgba(148, 163, 184, 0.22);
  
  /* 3D Tactile Buttons */
  --btn1-bg: #8B5CF6;
  --btn1-fg: #FFFFFF;
  --btn1-edge: #5B21B6;

  --btn2-bg: #06B6D4;
  --btn2-fg: #082F49;
  --btn2-edge: #0E7490;

  --btn-ton-bg: #0098EA;
  --btn-ton-fg: #FFFFFF;
  --btn-ton-edge: #006FB0;

  --ico-bg: rgba(168, 85, 247, 0.14);
  --ico-line: rgba(168, 85, 247, 0.4);
  --ico-stroke: #C084FC;

  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Onest', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F1F4F9;
  --wall-shade: rgba(241, 244, 249, 0.6);
  --ink: #0F172A;
  --ink-soft: #475569;
  --ink-muted: #94A3B8;
  --accent: #7C3AED;
  --accent-cyan: #0284C7;
  --accent-gold: #D97706;
  --accent-emerald: #059669;
  --card: rgba(255, 255, 255, 0.94);
  --card-border: rgba(124, 58, 237, 0.18);
  --shadow: rgba(100, 116, 139, 0.18);
  --glow: rgba(124, 58, 237, 0.15);
  --pill: rgba(124, 58, 237, 0.1);
  --pill-text: #6D28D9;
  --field: rgba(248, 250, 252, 0.95);
  --dash: rgba(148, 163, 184, 0.35);

  --btn1-bg: #7C3AED;
  --btn1-fg: #FFFFFF;
  --btn1-edge: #4C1D95;

  --btn2-bg: #0284C7;
  --btn2-fg: #FFFFFF;
  --btn2-edge: #0369A1;

  --btn-ton-bg: #0098EA;
  --btn-ton-fg: #FFFFFF;
  --btn-ton-edge: #006FB0;

  --ico-bg: rgba(124, 58, 237, 0.08);
  --ico-line: rgba(124, 58, 237, 0.25);
  --ico-stroke: #7C3AED;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Wallpaper Backdrop with Topographic Glow */
.wall {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: 
    radial-gradient(circle at 18% 18%, rgba(168, 85, 247, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 82% 70%, rgba(6, 182, 212, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 50% 95%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    var(--bg);
  pointer-events: none;
  overflow: hidden;
}

.wall::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Main Container */
.page {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 20px;
}

/* Topbar Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.badge-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--pill);
  color: var(--pill-text);
  border: 1px solid var(--card-border);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Switcher Toggle */
.theme-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 12px var(--shadow);
}

.theme-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 2px 6px var(--glow);
}

.theme-switch button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Cards Base with 1px border, top highlight & spotlight */
.card {
  position: relative;
  background: var(--card);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 12px 32px var(--shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(
    380px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(168, 85, 247, 0.14),
    transparent 50%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.card:hover::before {
  opacity: 1;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.15), 0 16px 40px var(--shadow), 0 0 25px var(--glow);
}

/* Desktop 2-column Grid */
@media (min-width: 900px) {
  .page {
    grid-template-columns: 370px minmax(0, 1fr);
    align-items: start;
    padding: 28px 24px 60px;
    gap: 24px;
  }
  .topbar {
    grid-column: 1 / -1;
  }
  .hero-card {
    position: sticky;
    top: 24px;
  }
  .content-col {
    min-height: 640px;
  }
  .hero-profile-row {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .btn-text-mobile {
    display: none !important;
  }
  .clock-box--mobile {
    display: none !important;
  }
  .badge-artist {
    display: none;
  }
}

/* Left Column: Hero Card */
.hero-card {
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 16px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 8px 24px var(--glow);
}

.status-indicator {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #10B981;
  color: #FFFFFF;
  border: 3px solid var(--bg);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  animation: pulseDot 2.4s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 16px rgba(16, 185, 129, 1);
  }
}

h1.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ink) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-handle {
  margin: 4px 0 0;
  font-weight: 600;
  color: var(--accent-cyan);
  font-size: 1rem;
}

.hero-tagline {
  margin: 12px auto 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
  max-width: 32ch;
  line-height: 1.45;
}

/* Pills / Badges */
.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.pills li {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-text);
  border: 1px solid var(--card-border);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* Live Clock */
.clock-box {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--field);
  border: 1px dashed var(--dash);
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.clock-box b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

/* Hero 3D Buttons */
.hero-actions {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 18px;
  border: 0;
  border-radius: 16px;
  font-family: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.25;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
  text-align: left;
}

.btn .btn-text {
  display: block;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.btn .btn-text-mobile {
  display: none;
}

.btn svg.btn-ico-mobile {
  display: none;
}

.btn svg.btn-arrow {
  flex: none;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.btn small {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  opacity: 0.85;
}

.btn svg {
  flex: none;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}
  stroke-width: 2.2;
  fill: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(3px) !important;
}

.btn--primary {
  background: var(--btn1-bg);
  color: var(--btn1-fg);
  box-shadow: 0 5px 0 var(--btn1-edge);
}
.btn--primary:active {
  box-shadow: 0 2px 0 var(--btn1-edge);
}

.btn--cyan {
  background: var(--btn2-bg);
  color: var(--btn2-fg);
  box-shadow: 0 5px 0 var(--btn2-edge);
}
.btn--cyan:active {
  box-shadow: 0 2px 0 var(--btn2-edge);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.btn--ghost:hover {
  background: var(--pill);
}

/* Version Archive Switcher in Hero */
.archive-switcher {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--dash);
}

.archive-label {
  font-size: 0.78rem;
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.archive-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.ver-pill {
  padding: 5px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--field);
  color: var(--ink-soft);
  border: 1px solid var(--card-border);
  transition: all 0.15s ease;
}

.ver-pill:hover {
  border-color: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
}

.ver-pill.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
  box-shadow: 0 2px 8px var(--glow);
}

/* ============================================================
   Right Column: Tabs & Dynamic Content
   ============================================================ */

.content-col {
  display: grid;
  gap: 20px;
}

/* Navigation Tabs Header */
.tabs-nav-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.tabs-nav-wrap::-webkit-scrollbar {
  display: none;
}

.tabs-nav {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 6px 20px var(--shadow);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.tab-btn:hover {
  color: var(--ink);
  background: var(--pill);
}

.tab-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 3px 10px var(--glow);
}

.tab-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-panel.active {
  display: grid;
  gap: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Headings */
h2.sec-title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

h2.sec-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--dash);
}

/* Topics / Features List */
.topic-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.topic-ico {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--ico-bg);
  border: 1.5px solid var(--ico-line);
  flex-shrink: 0;
}

.topic-ico svg {
  width: 22px;
  height: 22px;
  stroke: var(--ico-stroke);
  stroke-width: 2;
  fill: none;
}

.topic-body {
  min-width: 0;
  overflow: hidden;
}

.topic-body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.topic-body p {
  margin: 4px 0 0;
  font-size: 0.93rem;
  color: var(--ink-soft);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Tech Stack Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.tech-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--field);
  border: 1px solid var(--card-border);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.tech-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* Services Price Cards */
.services-grid {
  display: grid;
  gap: 14px;
}

.service-card {
  padding: 18px;
  border-radius: 16px;
  background: var(--field);
  border: 1px solid var(--card-border);
  display: grid;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
}

.service-badge {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--pill);
  color: var(--accent-cyan);
  border: 1px solid var(--card-border);
}

.service-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* Donate Section */
.ton-address-box {
  margin: 12px 0 16px;
  padding: 14px;
  border: 1.5px dashed var(--dash);
  border-radius: 16px;
  background: var(--field);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ton-addr-text {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-cyan);
  word-break: break-all;
}

.btn-copy {
  padding: 8px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #FFFFFF;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.btn-copy:hover {
  transform: translateY(-1px);
}

/* Amount Chips */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 18px;
}

.donate-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--card-border);
  border-radius: 999px;
  background: var(--pill);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.donate-chip[aria-pressed="true"] {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--glow);
}

/* Pay Options Grid */
.pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.pay-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--field);
  border: 1px solid var(--card-border);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}

.pay-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Fragment Section */
.search-box {
  position: relative;
  margin-bottom: 14px;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 14px;
  background: var(--field);
  border: 1px solid var(--card-border);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--accent);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--ink-soft);
  fill: none;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.frag-filter {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--field);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.frag-filter.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

/* Fragment Card Layout - No price wrapping & crisp typography */
.fragment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.fragment-card {
  padding: 16px;
  border-radius: 14px;
  background: var(--field);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.fragment-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.frag-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.frag-type {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.frag-price {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-gold);
  white-space: nowrap !important;
  flex-shrink: 0;
  text-align: right;
  letter-spacing: -0.01em;
}

.frag-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.frag-name:hover {
  color: var(--accent);
}

.frag-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
}

.frag-filter svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.pills li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pills li svg {
  stroke: var(--accent);
  flex-shrink: 0;
}


/* Audio Player Card (ps) */
.audio-card {
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.audio-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.audio-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #FFFFFF;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px var(--glow);
  transition: transform 0.15s;
}

.audio-btn:hover {
  transform: scale(1.06);
}

.audio-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Spotify Card */
.spotify-playing {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.spotify-cover-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}

.spotify-cover {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.spotify-eq {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 16px;
  padding: 3px;
  background: rgba(0,0,0,0.7);
  border-radius: 4px;
}

.spotify-eq span {
  width: 3px;
  background: #1DB954;
  border-radius: 2px;
  animation: eq 1s ease-in-out infinite alternate;
}
.spotify-eq span:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.spotify-eq span:nth-child(2) { height: 16px; animation-delay: 0.3s; }
.spotify-eq span:nth-child(3) { height: 8px;  animation-delay: 0.2s; }
.spotify-eq span:nth-child(4) { height: 14px; animation-delay: 0.4s; }

@keyframes eq {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.spotify-badge {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #1DB954;
  font-weight: 700;
  text-transform: uppercase;
}

.spotify-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 2px 0;
}

.spotify-artist {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.spotify-offline {
  padding: 16px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.spotify-badge-offline {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--pill);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #10B981;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
.foot {
  width: 100%;
  max-width: 1140px;
  margin: 16px auto 40px;
  padding: 24px 24px 16px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--dash);
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

.foot-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.foot a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.foot a:hover {
  text-decoration: underline;
}

/* Smooth Theme Switching */
:root.theming *, :root.theming *::before, :root.theming *::after {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
}


/* Polished Fragment Card Typography & Zero-Wrap Guarantee */
.btn-copy-card {
  padding: 4px 10px;
  font-size: 0.76rem;
  font-family: var(--font-base);
  font-weight: 600;
  border-radius: 6px;
  background: var(--pill);
  border: 1px solid var(--border-subtle);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
}

.btn-copy-card:hover {
  background: var(--surface-sunken);
  color: var(--ink);
  border-color: var(--accent);
}

.fragment-card a[target="_blank"] {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.15s;
}

.fragment-card a[target="_blank"]:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.frag-price {
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ============================================================
   Accounts Grid Base (Desktop & Default)
   ============================================================ */
.accounts-subheading {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  font-family: var(--mono);
  margin: 22px 0 10px;
}

.accounts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 1120px) {
  .accounts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--field);
  border: 1px solid var(--card-border);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.account-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

a.account-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--glow);
}

.account-link-ico {
  flex-shrink: 0;
  stroke: var(--accent);
  transition: transform 0.15s ease;
}

a.account-card:hover .account-link-ico {
  transform: translateX(3px);
}

.account-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.account-avatar-ico {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: var(--ico-bg);
  border: 1.5px solid var(--ico-line);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

.account-avatar-ico svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.account-meta {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.account-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

.account-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-cyan);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

a.account-name:hover {
  text-decoration: underline;
}

.account-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--pill);
  color: var(--pill-text);
  font-weight: 700;
  white-space: nowrap;
  font-family: var(--mono);
  flex-shrink: 0;
}

.account-badge--main {
  background: var(--accent);
  color: #FFFFFF;
}

.account-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Floating Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 16px;
  z-index: 99;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--accent);
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 4px 18px var(--shadow), 0 0 14px var(--glow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.back-to-top:active {
  transform: translateY(1px) scale(0.96) !important;
}

.back-to-top svg {
  stroke: var(--accent);
  flex-shrink: 0;
}

/* Mobile Pagination Controls in Fragment */
.frag-pagination-wrap {
  display: flex;
  gap: 10px;
  margin: 16px 0 6px;
}
.frag-pagination-wrap .btn {
  flex: 1;
}

/* ============================================================
   Mobile Ergonomics & Responsive Architecture (< 900px)
   Eliminates endless scrolling, compacts hero & tab content
   ============================================================ */
@media (max-width: 899px) {
  html, body {
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .page {
    padding: 8px 10px 48px;
    gap: 12px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    padding: 2px 4px 6px;
  }

  .brand-badge {
    font-size: 1rem;
  }

  /* Compact Hero Profile Card */
  .hero-card {
    padding: 14px 14px 12px;
    border-radius: 20px;
    text-align: left;
    box-shadow: 0 4px 20px var(--shadow);
  }

  .hero-profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }

  .avatar-wrap {
    width: 54px;
    height: 54px;
    min-width: 54px;
    margin: 0;
  }

  .avatar-img {
    border-radius: 16px;
    border-width: 1.5px;
    box-shadow: 0 4px 12px var(--glow);
  }

  .status-indicator {
    width: 15px;
    height: 15px;
    border-width: 2px;
    bottom: -2px;
    right: -2px;
  }

  .hero-identity {
    flex: 1;
    min-width: 0;
  }

  .hero-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  h1.hero-title {
    font-size: 1.35rem;
    line-height: 1.1;
    margin: 0;
  }

  .badge-artist {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent);
    border: 1px solid rgba(168, 85, 247, 0.3);
    font-weight: 700;
    white-space: nowrap;
  }

  .hero-handle {
    margin: 2px 0 0;
    font-size: 0.86rem;
  }

  .hero-handle a {
    color: var(--accent-cyan);
    text-decoration: none;
  }

  .clock-box--desktop {
    display: none !important;
  }

  .clock-box--mobile {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    background: var(--field);
    border: 1px dashed var(--dash);
    color: var(--ink-soft);
  }

  .clock-box--mobile svg {
    stroke: var(--accent-cyan);
    flex-shrink: 0;
  }

  .clock-box--mobile b {
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.8rem;
  }

  .hero-tagline {
    font-size: 0.84rem;
    margin: 10px 0 6px;
    text-align: left;
    max-width: 100%;
    line-height: 1.35;
    color: var(--ink-soft);
  }

  /* Horizontal swipeable pills on mobile */
  .pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    margin: 6px 0 0;
    padding: 2px 0 4px;
    justify-content: flex-start;
  }
  .pills::-webkit-scrollbar {
    display: none;
  }
  .pills li {
    flex-shrink: 0;
    padding: 3px 9px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  /* Compact 3-Column Hero Action Bar */
  .hero-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
  }

  .btn {
    min-height: 40px;
    padding: 6px 8px;
    border-radius: 12px;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
  }
  .btn--primary {
    box-shadow: 0 3px 0 var(--btn1-edge);
  }
  .btn--cyan {
    box-shadow: 0 3px 0 var(--btn2-edge);
  }
  .btn--ghost {
    box-shadow: inset 0 0 0 1px var(--accent);
  }

  .btn svg.btn-ico-mobile {
    display: inline-block !important;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .btn svg.btn-arrow {
    display: none !important;
  }

  .btn-text {
    display: none !important;
  }

  .btn-text-mobile {
    display: inline-block !important;
    font-weight: 700;
    white-space: nowrap;
  }

  /* Version Switcher Compact */
  .archive-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--dash);
  }

  .archive-label {
    margin-bottom: 0;
    font-size: 0.7rem;
  }

  .archive-pills {
    gap: 6px;
  }

  .ver-pill {
    padding: 3px 8px;
    font-size: 0.74rem;
    border-radius: 6px;
  }

  /* Sticky Navigation Tabs Bar */
  .tabs-nav-wrap {
    position: sticky;
    top: 8px;
    z-index: 90;
    margin: 2px 0 6px;
    padding: 0;
    background: transparent;
  }

  .tabs-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px var(--shadow);
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 4px;
    font-size: 0.74rem;
    border-radius: 10px;
    min-height: 38px;
    gap: 4px;
  }

  .tab-btn svg {
    width: 15px;
    height: 15px;
  }

  /* Content Cards & Sections Compactness */
  .content-col {
    gap: 12px;
  }

  .tab-panel.active {
    gap: 12px;
  }

  .card {
    padding: 16px 14px;
    border-radius: 18px;
  }

  h2.sec-title {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }

  .topic-list {
    gap: 10px;
  }

  .topic-item {
    grid-template-columns: 36px 1fr;
    gap: 10px;
  }

  .topic-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .topic-ico svg {
    width: 18px;
    height: 18px;
  }

  .topic-body h3 {
    font-size: 0.94rem;
  }

  .topic-body p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 10px;
  }

  .tech-tag {
    padding: 6px 8px;
    font-size: 0.74rem;
    border-radius: 8px;
  }

  /* Accounts Bento Grid & Contact Chips */
  .accounts-subheading {
    font-size: 0.78rem !important;
    margin: 16px 0 8px !important;
  }

  .accounts-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .account-card {
    padding: 8px 10px;
  }

  .account-name {
    font-size: 0.9rem;
  }

  .account-sub {
    font-size: 0.72rem;
  }

  /* Spotify Card on Mobile */
  .spotify-playing {
    gap: 12px;
  }

  .spotify-cover-wrap {
    width: 60px;
    height: 60px;
  }

  .spotify-title {
    font-size: 1rem;
  }

  .spotify-artist {
    font-size: 0.86rem;
  }

  /* Services Grid on Mobile */
  .services-grid {
    gap: 10px;
  }

  .service-card {
    padding: 14px;
    border-radius: 14px;
    gap: 8px;
  }

  .service-title {
    font-size: 0.95rem;
  }

  .service-desc {
    font-size: 0.86rem;
  }

  /* Fragment Grid Compact Rows on Mobile (No 7000px scroll!) */
  .fragment-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fragment-card {
    padding: 10px 12px;
    border-radius: 12px;
    gap: 6px;
  }

  .frag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .frag-type {
    font-size: 0.68rem;
  }

  .frag-price {
    font-size: 0.84rem;
  }

  .frag-name {
    font-size: 0.96rem;
    margin: 1px 0;
  }

  .filter-pills {
    gap: 5px;
    margin-bottom: 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .frag-filter {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .search-input {
    padding: 10px 14px 10px 38px;
    font-size: 0.88rem;
    border-radius: 12px;
  }
  .search-icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  .frag-pagination-wrap {
    flex-direction: column;
  }
}

@media (min-width: 480px) and (max-width: 899px) {
  .fragment-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .frag-pagination-wrap {
    flex-direction: row;
  }
}

@media (min-width: 680px) and (max-width: 899px) {
  .accounts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
