:root {
  --font-title: 'Playfair Display', Georgia, serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --accent: #dc2626;
  --accent-light: #f87171;
  --accent-glow: rgba(220, 38, 38, 0.45);
  --accent-dark: #450a0a;
  --gold-ornament: #ef4444;
  --gold-glow: rgba(239, 68, 68, 0.35);

  --bg-dark: #070709;
  --card-bg: rgba(13, 11, 15, 0.94);
  --card-border: rgba(239, 68, 68, 0.35);
  --inner-border: rgba(220, 38, 38, 0.35);
  --card-hover: rgba(220, 38, 38, 0.16);

  --text-main: #f4f4f6;
  --text-muted: #b3b3b8;
  --text-subtle: #82828a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 18px;
  position: relative;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 50% 20%, #151119 0%, #060508 80%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.cyber-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;  background-size: 56px 56px, 56px 56px, 224px 224px, 224px 224px;
  background-image:
    linear-gradient(to right, rgba(239, 68, 68, 0.45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(239, 68, 68, 0.45) 1px, transparent 1px),
    linear-gradient(to right, rgba(220, 38, 38, 0.9) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(220, 38, 38, 0.9) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 35%, rgba(0, 0, 0, 0.2) 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 35%, rgba(0, 0, 0, 0.2) 90%);
}

.ember-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.mist-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
  z-index: 2;
}

.vignette {
  position: fixed;
  inset: 0;
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  z-index: 4;
}

.candle-glow {
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  animation: candle-flicker 6s infinite alternate ease-in-out;
}

.candle-left {
  top: 5%;
  left: -80px;
  background: var(--accent);
}

.candle-right {
  bottom: 5%;
  right: -80px;
  background: var(--accent-dark);
}

@keyframes candle-flicker {
  0% { transform: scale(1) translate(0, 0); opacity: 0.28; }
  35% { transform: scale(1.08) translate(-10px, 15px); opacity: 0.42; }
  70% { transform: scale(0.95) translate(8px, -10px); opacity: 0.3; }
  100% { transform: scale(1.04) translate(0, 5px); opacity: 0.38; }
}

.page-container {
  width: 100%;
  max-width: 640px;
  position: relative;
  z-index: 10;
  perspective: 1200px;
}

.gothic-frame {
  position: relative;
  padding: 6px;
  border: 1px solid var(--card-border);
  background: rgba(10, 9, 14, 0.4);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.8), 0 0 45px var(--accent-glow);
}

.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold-ornament);
  pointer-events: none;
  z-index: 12;
  transition: all 0.3s ease;
}

.corner-tl { top: -2px; left: -2px; border-top: 3px double var(--gold-ornament); border-left: 3px double var(--gold-ornament); }
.corner-tr { top: -2px; right: -2px; border-top: 3px double var(--gold-ornament); border-right: 3px double var(--gold-ornament); }
.corner-bl { bottom: -2px; left: -2px; border-bottom: 3px double var(--gold-ornament); border-left: 3px double var(--gold-ornament); }
.corner-br { bottom: -2px; right: -2px; border-bottom: 3px double var(--gold-ornament); border-right: 3px double var(--gold-ornament); }

.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--inner-border);
  padding: 36px 32px;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.65);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--inner-border);
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-light);
  cursor: default;
  transition: all 0.25s ease;
}

.status-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.status-dot.awake {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444, 0 0 14px var(--accent-glow);
  animation: pulse-dot 2s infinite ease-in-out;
}

.status-dot.sleep {
  background: #818cf8;
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.7);
  animation: pulse-dot 3.5s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.tz-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #fff;
  background: rgba(220, 38, 38, 0.35);
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.candle-flame {
  font-size: 0.95rem;
  filter: drop-shadow(0 0 6px var(--accent));
  animation: flame-pulse 2s infinite ease-in-out;
}

@keyframes flame-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px var(--accent)); }
  50% { transform: scale(1.15) rotate(-3deg); filter: drop-shadow(0 0 9px var(--accent-light)); }
}

.header-sigil {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--accent-light);
  letter-spacing: 0.25em;
  opacity: 0.85;
  text-shadow: 0 0 10px var(--accent-glow);
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 24px;
}

.avatar-arch-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.avatar-arch {
  position: relative;
  width: 136px;
  height: 170px;
  border-radius: 68px 68px 8px 8px;
  background: linear-gradient(180deg, #181520 0%, #0a090e 100%);
  border: 2px solid var(--accent);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.85), 0 0 20px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.avatar-img,
.avatar-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.avatar-arch:hover .avatar-img,
.avatar-arch:hover .avatar-video {
  transform: scale(1.06);
  filter: brightness(1.1);
}

.avatar-arch:hover {
  border-color: var(--accent-light);
  box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-2px);
}

.avatar-inner {
  font-size: 2.8rem;
  user-select: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}

.arch-pedestal {
  margin-top: 10px;
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.18em;
  text-shadow: 0 0 10px var(--accent-glow);
  white-space: nowrap;
  opacity: 0.95;
}

.profile-titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crest-ornament {
  font-size: 0.88rem;
  color: var(--gold-ornament);
  letter-spacing: 0.3em;
  opacity: 0.75;
}

.name {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 0 20px var(--accent-glow);
}

.tagline {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.gothic-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--gold-ornament);
  opacity: 0.6;
}

.gothic-divider::before,
.gothic-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--card-border);
}

.gothic-divider span {
  padding: 0 14px;
  font-size: 1.1rem;
}

.card-section {
  margin-top: 26px;
}

.section-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f87171;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--card-border) 0%, transparent 100%);
}

.bio-text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #e4e4e7;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.meta-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.tome-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.skill-highlight {
  border-color: var(--gold-ornament);
  background: rgba(212, 175, 55, 0.1);
  color: #fff;
}

.relic-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.tome-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--card-border);
  padding: 12px 10px;
  text-align: center;
  position: relative;
  transition: all 0.25s ease;
}

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

.tome-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-light);
  text-shadow: 0 0 12px var(--accent-glow);
}

.tome-label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background: rgba(18, 15, 22, 0.85);
  border: 1px solid rgba(220, 38, 38, 0.35);
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f4f4f6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  transition: all 0.25s ease;
  user-select: none;
}

.skill-tag:hover {
  background: rgba(220, 38, 38, 0.22);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 0 14px var(--accent-glow);
  color: #fff;
}

.skill-tag .skill-svg {
  width: 16px;
  height: 16px;
  display: block;
  color: var(--accent-light);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.skill-tag:hover .skill-svg {
  color: #ffffff;
}

.skill-highlight {
  border-color: var(--accent);
  background: rgba(220, 38, 38, 0.2);
  color: #fff;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.25);
}

.relic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.relic-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(18, 16, 24, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 14px 16px;
  transition: all 0.25s ease;
}

.relic-item:hover {
  background: var(--card-hover);
  border-color: var(--accent-light);
  transform: translateX(4px);
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

.relic-rune {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
}

.relic-item:hover .relic-rune {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.svg-icon {
  width: 24px;
  height: 24px;
  display: block;
  color: var(--accent-light);
  flex-shrink: 0;
  background: transparent;
  transition: color 0.2s ease, transform 0.2s ease;
}

.relic-item:hover .svg-icon,
.gothic-btn:hover .svg-icon {
  color: #ffffff;
  transform: scale(1.12);
}

.btn-sigil {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: transparent;
}

.relic-info h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  color: #ffffff;
}

.relic-info p {
  font-size: 0.94rem;
  color: #d4d4d8;
  line-height: 1.5;
  font-weight: 400;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contacts-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.gothic-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 16, 24, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.25s ease;
  min-width: 0;
  width: 100%;
}

.gothic-btn:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: translateY(-2px);
}

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

.btn-desc {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.btn-title {
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-sub {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rune-arrow {
  font-family: var(--font-heading);
  color: var(--gold-ornament);
  font-weight: 700;
}

.copy-seal {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-seal:hover {
  background: var(--accent-dark);
  border-color: var(--accent-light);
  color: #fff;
}

.card-footer {
  margin-top: 36px;
  text-align: center;
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
}

.footer-filigree {
  font-size: 1.1rem;
  color: var(--gold-ornament);
  margin-bottom: 6px;
  letter-spacing: 0.2em;
}

.epitaph {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.year-seal {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--gold-ornament);
  opacity: 0.6;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #09080c;
  color: var(--gold-ornament);
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 24px;
  font-size: 0.82rem;
  border: 1px solid var(--accent);
  box-shadow: 0 0 25px rgba(0,0,0,0.9), 0 0 15px var(--accent-glow);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s ease;
  z-index: 1000;
}

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

.music-player-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.music-player-pill {
  pointer-events: auto;
}

.playlist-drawer {
  display: none;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: rgba(13, 11, 15, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--accent);
  border-radius: 18px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.9), 0 0 30px var(--accent-glow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.playlist-drawer.open {
  display: flex;
  flex-direction: column;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.06);
}

.playlist-title {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  font-weight: 700;
}

.playlist-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.playlist-close-btn:hover {
  color: #fff;
}

.playlist-list {
  padding: 8px;
  max-height: 230px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.playlist-list::-webkit-scrollbar {
  width: 4px;
}

.playlist-list::-webkit-scrollbar-thumb {
  background: var(--accent-dark);
  border-radius: 2px;
}

.playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.playlist-item:hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.25);
}

.playlist-item.active {
  background: rgba(220, 38, 38, 0.22);
  border-color: var(--accent);
}

.playlist-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.playlist-item-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-light);
  min-width: 18px;
}

.playlist-item-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.playlist-item-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.playlist-item-status {
  font-size: 0.8rem;
  color: var(--accent-light);
}

.music-player-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 11, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85), 0 0 25px var(--accent-glow);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.music-player-pill:hover {
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 35px var(--accent-glow);
  border-color: var(--accent-light);
}

.player-nav-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.music-nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.music-nav-btn:hover {
  color: #fff;
  transform: scale(1.15);
}

.ctrl-svg {
  width: 14px;
  height: 14px;
  display: block;
}

.play-svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
}

.playlist-svg {
  width: 13px;
  height: 13px;
  display: block;
  color: var(--accent-light);
}

.vol-svg {
  width: 17px;
  height: 17px;
  display: block;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.music-vol-btn:hover .vol-svg {
  color: #fff;
}

.copy-svg {
  width: 13px;
  height: 13px;
  display: block;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.copy-seal:hover .copy-svg {
  color: #fff;
}

.music-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 0 14px var(--accent-glow);
}

.music-play-btn:hover {
  transform: scale(1.1);
  background: var(--accent-light);
  box-shadow: 0 0 22px var(--accent);
}

.play-icon {
  font-size: 0.92rem;
  margin-left: 2px;
}

.music-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 145px;
  max-width: 220px;
}

.music-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-track-name {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.equalizer .bar {
  width: 3px;
  height: 3px;
  background: var(--accent-light);
  border-radius: 1px;
  transition: height 0.2s ease;
}

.music-player-pill.playing .equalizer .bar-1 { animation: eqBounce 0.6s infinite ease-in-out alternate; }
.music-player-pill.playing .equalizer .bar-2 { animation: eqBounce 0.45s infinite 0.15s ease-in-out alternate; }
.music-player-pill.playing .equalizer .bar-3 { animation: eqBounce 0.75s infinite 0.3s ease-in-out alternate; }
.music-player-pill.playing .equalizer .bar-4 { animation: eqBounce 0.5s infinite 0.1s ease-in-out alternate; }

@keyframes eqBounce {
  0% { height: 3px; }
  100% { height: 14px; }
}

.music-seek-bar-container {
  width: 100%;
  padding: 7px 0;
  margin: 1px 0;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  user-select: none;
  touch-action: none;
}

.music-seek-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  position: relative;
  overflow: visible;
  transition: height 0.15s ease, background 0.2s ease;
}

.music-seek-bar-container:hover .music-seek-bar,
.music-seek-bar-container.scrubbing .music-seek-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.22);
}

.music-seek-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 75%, #f87171 100%);
  border-radius: 999px;
  position: relative;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.65);
  transition: width 0.06s linear;
}

.music-seek-knob {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #ef4444;
  box-shadow: 0 0 8px #ef4444;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.music-seek-bar-container:hover .music-seek-knob,
.music-seek-bar-container.scrubbing .music-seek-knob {
  transform: translateY(-50%) scale(1);
}

.music-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 10px;
}

.playlist-toggle-btn {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 999px;
  padding: 3px 8px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  transition: all 0.2s ease;
}

.playlist-toggle-btn:hover {
  background: rgba(220, 38, 38, 0.28);
  border-color: var(--accent-light);
  transform: scale(1.05);
}

.playlist-icon {
  font-size: 0.85rem;
}

.music-vol-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.music-vol-slider {
  width: 55px;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
}

.music-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-light);
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent);
}

.grimoire-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 20;
}

.grimoire-tab-btn {
  background: rgba(13, 11, 15, 0.85);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: var(--text-muted);
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.grimoire-tab-btn:hover {
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 15px var(--accent-glow);
}

.grimoire-tab-btn.active {
  color: #fff;
  background: rgba(220, 38, 38, 0.22);
  border-color: var(--accent-light);
  box-shadow: 0 0 18px var(--accent-glow), inset 0 0 12px rgba(220, 38, 38, 0.25);
}

.tab-sigil {
  font-size: 0.95rem;
}

.tab-separator {
  color: var(--accent);
  font-size: 1rem;
  opacity: 0.6;
}

.tab-glow-badge {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  box-shadow: 0 0 8px var(--accent);
  letter-spacing: 0.05em;
}

.grimoire-page {
  animation: pageFadeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

.page-portal-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(220, 38, 38, 0.25);
  display: flex;
  justify-content: center;
}

.portal-cta-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.18) 0%, rgba(13, 11, 15, 0.9) 100%);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 0 16px rgba(220, 38, 38, 0.2);
}

.portal-cta-btn:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.32) 0%, rgba(30, 15, 20, 0.95) 100%);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 25px var(--accent-glow);
}

.portal-icon {
  font-size: 1.5rem;
}

.portal-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
  text-align: left;
}

.portal-head {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #fff;
}

.portal-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-light);
}

.portal-arrow {
  font-size: 1.3rem;
  color: var(--accent-light);
  transition: transform 0.2s ease;
}

.portal-cta-btn:hover .portal-arrow {
  transform: translateX(5px);
  color: #fff;
}

.portal-cta-btn.return-btn:hover .portal-arrow {
  transform: translateX(-5px);
}

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

.back-pill-btn {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.back-pill-btn:hover {
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  transform: scale(1.04);
}

.dossier-header-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dossier-hero-badge {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.22) 0%, rgba(13, 11, 15, 0.9) 100%);
  border: 1px solid var(--accent);
  padding: 14px 18px;
  margin-bottom: 22px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(220, 38, 38, 0.15);
}

.badge-row-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.canyon-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 4px 0 2px;
}

.canyon-brand-logo {
  height: 28px;
  width: auto;
  max-width: 240px;
  color: #f5f5f5;
  filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.45));
  transition: filter 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.canyon-logo-wrap:hover .canyon-brand-logo {
  color: #ffffff;
  filter: drop-shadow(0 0 16px rgba(220, 38, 38, 0.85));
  transform: scale(1.03);
}

.bike-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bike-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  user-select: none;
}

.bike-model {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
}

.travel-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-light);
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(220, 38, 38, 0.5);
  padding: 5px 12px;
  border-radius: 4px;
  box-shadow: 0 0 12px var(--accent-glow);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.badge-row-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.bike-spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.bike-spec-pill.cat-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-main);
}

.bike-spec-pill.mullet-pill {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 8px var(--accent-glow);
}

.bike-spec-pill.turmeric-pill {
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.5);
  color: #fde047;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.25);
}

.bike-spec-pill.cbf-pill {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-muted);
}

.color-dot.turmeric {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #eab308;
  box-shadow: 0 0 8px #eab308;
  display: inline-block;
  flex-shrink: 0;
}

.bike-showcase-frame {
  margin-bottom: 22px;
  position: relative;
  border: 1px solid var(--accent);
  background: rgba(10, 9, 14, 0.6);
  padding: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px var(--accent-glow);
}

.bike-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 480px;
  background: #09080c;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bike-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bike-showcase-frame:hover .bike-image {
  transform: scale(1.04);
}

.bike-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, 0.88) 100%);
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  padding: 12px 16px;
}

.bike-overlay-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-light);
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(220, 38, 38, 0.5);
  padding: 3px 10px;
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent-glow);
  letter-spacing: 0.06em;
}

.bike-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 20px;
  text-align: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.12) 0%, rgba(10, 9, 14, 0.95) 75%);
}

.bike-placeholder-svg {
  width: 48px;
  height: 48px;
  color: var(--accent-light);
  filter: drop-shadow(0 0 10px var(--accent));
  transition: transform 0.3s ease;
}

.bike-showcase-frame:hover .bike-placeholder-svg {
  transform: scale(1.1);
  color: #fff;
}

.placeholder-text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.placeholder-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.placeholder-sub code {
  color: var(--accent-light);
  background: rgba(220, 38, 38, 0.2);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.bike-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.spec-card {
  background: rgba(13, 11, 15, 0.65);
  border: 1px solid rgba(220, 38, 38, 0.22);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.spec-card:hover {
  border-color: var(--accent);
  background: rgba(220, 38, 38, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.spec-card.highlight-spec {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: inset 0 0 16px rgba(220, 38, 38, 0.15);
}

.spec-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.spec-svg {
  width: 16px;
  height: 16px;
  color: var(--accent-light);
  flex-shrink: 0;
}

.spec-category {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.spec-value {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.spec-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.tech-stack-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tech-card {
  background: rgba(13, 11, 15, 0.65);
  border: 1px solid rgba(220, 38, 38, 0.22);
  padding: 18px 20px;
  transition: all 0.25s ease;
}

.tech-card:hover {
  border-color: var(--accent);
  background: rgba(220, 38, 38, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.tech-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tech-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-badge-level {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--accent-light);
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.tech-name {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
}

.tech-icon-brand {
  font-size: 1.25rem;
}

.tech-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 3px;
}

.projects-showcase {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-item {
  background: rgba(13, 11, 15, 0.75);
  border: 1px solid rgba(220, 38, 38, 0.25);
  padding: 18px 20px;
  transition: all 0.25s ease;
}

.project-item:hover {
  border-color: var(--accent-light);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.project-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.project-github-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.project-github-link:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  transform: scale(1.1);
}

.project-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-light);
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 2px 7px;
  border-radius: 3px;
}

.music-hero-header {
  text-align: center;
  margin: 10px 0 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.music-hero-header .crest-ornament {
  font-size: 0.88rem;
  color: var(--gold-ornament);
  letter-spacing: 0.35em;
  opacity: 0.8;
  white-space: nowrap;
}

.music-page-title {
  font-family: var(--font-title);
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-shadow: 0 0 20px var(--accent-glow);
  margin: 0;
  text-align: center;
}

.music-page-subtitle {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ornament);
  opacity: 0.85;
  text-align: center;
}

.projects-hero-badge {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12) 0%, rgba(13, 11, 15, 0.9) 100%);
  border: 1px solid rgba(220, 38, 38, 0.45);
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 22px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(220, 38, 38, 0.1);
}

.projects-hero-badge .bio-text {
  margin-bottom: 0;
  text-align: center;
}

.vk-profile-banner {
  background: linear-gradient(135deg, rgba(39, 135, 245, 0.15) 0%, rgba(13, 11, 15, 0.95) 100%);
  border: 1px solid rgba(39, 135, 245, 0.45);
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(39, 135, 245, 0.1);
  transition: all 0.3s ease;
}

.vk-profile-banner:hover {
  border-color: #2787f5;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(39, 135, 245, 0.25);
}

.vk-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vk-banner-icon {
  color: #2787f5;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(39, 135, 245, 0.6));
}

.vk-banner-title {
  font-family: var(--font-title);
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  display: block;
}

.vk-banner-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.vk-banner-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: #2787f5;
  border: 1px solid #519df7;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 15px rgba(39, 135, 245, 0.4);
  transition: all 0.25s ease;
}

.vk-banner-btn:hover {
  background: #3992fa;
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(39, 135, 245, 0.7);
}

.album-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.album-type-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-ornament);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.album-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.album-title-group {
  flex: 1;
  min-width: 0;
}

.album-title-group .project-title {
  font-size: 1.05rem;
  line-height: 1.25;
  margin-bottom: 2px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.album-cover-thumb {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
}

.album-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(220, 38, 38, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.album-vinyl-peek {
  position: absolute;
  top: 4px;
  right: -4px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a2433 22%, #110e17 23%, #1e1826 42%, #0d0a12 62%, #1e1826 82%, #08060b 100%);
  border: 1px solid rgba(220, 38, 38, 0.35);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.85);
  z-index: 1;
  opacity: 0.85;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease, border-color 0.3s ease;
}

.album-vinyl-peek::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.album-card:hover .album-thumb-img {
  border-color: var(--accent-light);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: scale(1.03);
}

.album-card:hover .album-vinyl-peek {
  transform: translateX(14px) rotate(60deg);
  opacity: 1;
  border-color: var(--accent-light);
  box-shadow: 0 0 15px var(--accent-glow);
}

.album-vinyl-icon {
  position: relative;
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #2a2433 20%, #110e17 21%, #1e1826 40%, #0d0a12 60%, #1e1826 80%, #08060b 100%);
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  transition: transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.album-card:hover .album-vinyl-icon {
  transform: rotate(45deg) scale(1.08);
  border-color: var(--accent-light);
  box-shadow: 0 0 16px var(--accent-glow);
}

.album-sigil {
  font-size: 1.15rem;
  line-height: 1;
}

.album-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 6px;
}

.album-meta-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold-ornament);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 2px 7px;
  border-radius: 3px;
}

.album-track-highlights {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(0, 0, 0, 0.4);
  border-left: 2px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  margin-top: 4px;
}

.track-highlight-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.highlight-item {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #f3f4f6;
  letter-spacing: 0.02em;
}

.vk-play-btn {
  background: rgba(39, 135, 245, 0.18) !important;
  border-color: rgba(39, 135, 245, 0.5) !important;
  color: #70b1fa !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.vk-play-btn:hover {
  background: rgba(39, 135, 245, 0.38) !important;
  border-color: #2787f5 !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(39, 135, 245, 0.5) !important;
  transform: translateY(-1px);
}

.project-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-pill {
  background: rgba(13, 11, 15, 0.85);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.filter-pill:hover {
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}

.filter-pill.active {
  background: rgba(220, 38, 38, 0.25);
  border-color: var(--accent-light);
  color: #fff;
  box-shadow: 0 0 15px var(--accent-glow);
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--accent-light);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.project-card {
  background: linear-gradient(135deg, rgba(20, 16, 24, 0.88) 0%, rgba(10, 8, 14, 0.95) 100%);
  border: 1px solid rgba(220, 38, 38, 0.32);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 20px rgba(220, 38, 38, 0.3);
}

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

.project-card-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.project-icon-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.project-sigil {
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.project-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.project-sub {
  font-size: 0.74rem;
  color: var(--gold-ornament);
  letter-spacing: 0.04em;
  display: block;
  margin-top: 2px;
}

.project-status-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.project-status-badge.live {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #4ade80;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
}

.project-status-badge.prod {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: var(--accent-light);
  box-shadow: 0 0 10px var(--accent-glow);
}

.project-status-badge.available {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.5);
  color: #facc15;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
}

.project-status-badge.utility {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #c084fc;
}

.project-desc {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-body);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.p-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.project-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.45);
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.project-btn:hover {
  background: rgba(220, 38, 38, 0.45);
  border-color: var(--accent-light);
  box-shadow: 0 0 14px var(--accent-glow);
  transform: translateY(-1px);
}

.project-btn-sec {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--gold-ornament);
  font-size: 0.74rem;
}

.page-portal-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.allies-hero-header {
  text-align: center;
  margin: 10px 0 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.allies-hero-header .crest-ornament {
  font-size: 0.88rem;
  color: var(--gold-ornament);
  letter-spacing: 0.35em;
  opacity: 0.8;
  white-space: nowrap;
}

.allies-page-title {
  font-family: var(--font-title);
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-shadow: 0 0 20px var(--accent-glow);
  margin: 0;
  text-align: center;
}

.allies-page-subtitle {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ornament);
  opacity: 0.85;
  text-align: center;
}

.allies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.ally-card {
  background: linear-gradient(135deg, rgba(20, 16, 24, 0.88) 0%, rgba(10, 8, 14, 0.95) 100%);
  border: 1px solid rgba(220, 38, 38, 0.32);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.ally-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 20px rgba(220, 38, 38, 0.3);
}

.ally-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.ally-category-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-ornament);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ally-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.ally-sigil-icon {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
}

.ally-title-group {
  flex: 1;
  min-width: 0;
}

.ally-group-name {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin-bottom: 2px;
  word-wrap: break-word;
}

.ally-group-sub {
  font-size: 0.74rem;
  color: var(--gold-ornament);
  letter-spacing: 0.04em;
  display: block;
}

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

.ally-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 3px;
}

.ally-desc {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-body);
  margin: 0;
}

.ally-roster-box {
  background: rgba(0, 0, 0, 0.4);
  border-left: 2px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
}

.roster-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.roster-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.roster-chip {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  color: #fff;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.ally-add-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.ally-add-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.ally-add-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 4px;
}

.ally-add-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}


.friend-card {
  padding: 18px;
}

.friend-card-footer {
  margin-top: 4px;
}

.friend-tg-btn {
  background: rgba(39, 135, 245, 0.12);
  border: 1px solid rgba(39, 135, 245, 0.45);
  color: #60a5fa;
  box-shadow: 0 0 10px rgba(39, 135, 245, 0.15);
}

.friend-tg-btn:hover {
  background: rgba(39, 135, 245, 0.25);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 0 18px rgba(39, 135, 245, 0.4);
  transform: translateY(-2px);
}

.friend-phantom-btn {
  background: rgba(220, 38, 38, 0.08);
  border: 1px dashed rgba(220, 38, 38, 0.45);
  color: #f87171;
}

.friend-phantom-btn:hover {
  background: rgba(220, 38, 38, 0.18);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 14px var(--accent-glow);
  transform: translateY(-2px);
}

.phantom-badge {
  color: #f87171 !important;
  background: rgba(220, 38, 38, 0.1) !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
}

.phantom-status {
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
  color: #f87171 !important;
}

.phantom-icon {
  border-color: rgba(220, 38, 38, 0.35) !important;
}

.reserve-card {
  border-style: dashed;
  border-color: rgba(234, 179, 8, 0.35);
  background: linear-gradient(135deg, rgba(20, 18, 14, 0.75) 0%, rgba(10, 9, 8, 0.88) 100%);
}

.reserve-card:hover {
  border-color: rgba(234, 179, 8, 0.65);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 20px rgba(234, 179, 8, 0.2);
}

.reserve-btn {
  background: rgba(234, 179, 8, 0.08);
  border: 1px dashed rgba(234, 179, 8, 0.45);
  color: #facc15;
}

.reserve-btn:hover {
  background: rgba(234, 179, 8, 0.18);
  border-color: #facc15;
  color: #fff;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.3);
  transform: translateY(-2px);
}


.tab-sigil svg {
  width: 15px;
  height: 15px;
  display: block;
}

.candle-flame svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-pill svg {
  width: 13px;
  height: 13px;
  display: inline-block;
  flex-shrink: 0;
}

.gothic-divider svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

.portal-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.sigil-icon svg {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: -3px;
}

.filter-pill svg {
  width: 13px;
  height: 13px;
  display: inline-block;
  flex-shrink: 0;
}

.album-type-badge svg {
  width: 11px;
  height: 11px;
  display: inline-block;
  flex-shrink: 0;
}

.ally-sigil-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.project-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.project-status-badge svg {
  width: 10px;
  height: 10px;
  display: inline-block;
  flex-shrink: 0;
}

.friend-phantom-btn svg,
.reserve-btn svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
}


.grimoire-tab-btn,
.portal-cta-btn,
.gothic-btn,
.project-btn,
.friend-tg-btn,
.friend-phantom-btn,
.reserve-btn,
.filter-pill,
.copy-seal,
.relic-item-link,
.back-pill-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(220, 38, 38, 0.15);
}

.views-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 11, 15, 0.75);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: all 0.25s ease;
  margin: 6px 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.views-counter-badge:hover {
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 14px var(--accent-glow);
  transform: translateY(-1px);
}

.views-counter-badge svg {
  color: var(--accent-light);
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.views-count-num {
  color: var(--accent-light);
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-block;
  transition: transform 0.25s ease, color 0.25s ease, text-shadow 0.25s ease;
}

@media (max-width: 680px) {
  body {
    padding-bottom: 110px;
  }

  .card {
    padding: 24px 18px;
  }

  .grimoire-tabs-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .grimoire-tab-btn {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .tab-separator {
    display: none;
  }

  .page-portal-dual {
    grid-template-columns: 1fr;
  }

  .music-page-title {
    font-size: 1.25rem;
  }

  .allies-page-title {
    font-size: 1.25rem;
  }

  .allies-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .bike-specs-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .tome-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .music-player-container {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }

  .playlist-drawer {
    width: 100%;
  }

  .music-player-pill {
    width: 100%;
    justify-content: space-between;
  }

  .music-vol-slider {
    display: none;
  }
}
