:root {
  --red: #ff3b3b;
  --orange: #ff8a00;
  --yellow: #ffd600;
  --green: #22c55e;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --purple: #7c3aed;
  --black: #111;
  --white: #fff;
  --grey: #f4f4f4;
  --font-main: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Courier New", monospace;
  --rainbow: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--cyan), var(--blue), var(--purple));
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3 { font-weight: 900; letter-spacing: -0.02em; }
img { display: block; max-width: 100%; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: 60px; background: var(--white);
  border-bottom: 2px solid; border-image: var(--rainbow) 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.2rem; }
.brand img { height: 32px; border-radius: 4px; }
.nav-desk { display: flex; gap: 15px; font-size: 0.9rem; font-weight: bold; }
.nav-desk a:hover { opacity: 0.7; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-download {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 44px; padding: 0 18px;
  background: var(--black); color: var(--white); font-weight: bold; font-size: 0.95rem;
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 30px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--black); /* fallback */
}
.btn-download::before {
  content: ''; position: absolute; inset: -3px; z-index: -1;
  background: var(--rainbow); border-radius: 30px;
}
.btn-download svg { width: 16px; height: 16px; fill: currentColor; }
.btn-download:hover .qr-popup { display: block; }
.qr-popup {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 10px;
  background: var(--white); padding: 10px; border: 1px solid #ddd; border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1); z-index: 1001;
}
.qr-popup::after { content: ''; position: absolute; top: -8px; right: 20px; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid var(--white); }
.qr-box { width: 100px; height: 100px; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #888; text-align: center; border: 1px dashed #ccc; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Sections Common */
section { padding: 80px 20px; position: relative; }
.container { max-width: 1200px; margin: 0 auto; }
.sec-title { font-size: 2.5rem; margin-bottom: 10px; line-height: 1.1; }
.sec-desc { font-size: 1.1rem; margin-bottom: 40px; opacity: 0.8; }
.btn-group { display: flex; flex-wrap: wrap; gap: 15px; padding-top: 20px; }

/* Hero */
.sec-hero { background: var(--white); padding-top: 100px; overflow: hidden; }
.hero-bg-wall { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; opacity: 0.15; pointer-events: none; }
.hero-col { width: 15%; display: flex; flex-direction: column; gap: 10px; }
.hero-col img { aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; filter: grayscale(100%); }
.hero-col:nth-child(1) img { background: var(--red); }
.hero-col:nth-child(2) img { background: var(--orange); }
.hero-col:nth-child(3) img { background: var(--yellow); }
.hero-col:nth-child(4) img { background: var(--green); }
.hero-col:nth-child(5) img { background: var(--cyan); }
.hero-col:nth-child(6) img { background: var(--blue); }
.hero-col:nth-child(7) img { background: var(--purple); }
.hero-content { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; }
.hero-text h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; margin-bottom: 20px; }
.hero-text p { font-size: 1.1rem; margin-bottom: 30px; color: #444; }
.hero-stats { display: flex; gap: 20px; margin-top: 30px; font-family: var(--font-mono); font-size: 0.9rem; }
.hero-stats span strong { display: block; font-size: 1.5rem; font-family: var(--font-main); }

.hero-visuals { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.main-cards { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 20px; }
.m-card { flex: 0 0 160px; border-radius: 8px; overflow: hidden; position: relative; }
.m-card img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.m-card .tag { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.9rem; }
.rank-board { background: var(--white); border: 1px solid #eee; border-radius: 8px; padding: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.rank-item { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.rank-item img { width: 40px; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; }
.rank-info { flex: 1; font-size: 0.85rem; }
.rank-info strong { display: block; }
.rank-num { font-family: var(--font-mono); font-weight: bold; font-size: 1.1rem; width: 20px; }
.color-bar-shortcuts { display: flex; gap: 10px; margin-top: 40px; position: relative; z-index: 2; flex-wrap: wrap; }
.c-shortcut { flex: 1; min-width: 80px; height: 8px; border-radius: 4px; position: relative; cursor: pointer; }
.c-shortcut span { position: absolute; top: 15px; left: 0; font-size: 0.8rem; font-weight: bold; }
.c-red { background: var(--red); } .c-orange { background: var(--orange); } .c-yellow { background: var(--yellow); }
.c-green { background: var(--green); } .c-cyan { background: var(--cyan); } .c-blue { background: var(--blue); } .c-purple { background: var(--purple); }

/* Prism Section */
.sec-prism { background: var(--grey); }
.prism-wrap { display: flex; align-items: center; justify-content: space-between; height: 400px; position: relative; }
.prism-svg { width: 200px; height: 200px; flex-shrink: 0; }
.prism-bars { display: flex; gap: 10px; height: 100%; align-items: flex-end; }
.p-bar { width: 30px; border-radius: 4px 4px 0 0; transition: height 0.3s; position: relative; cursor: pointer; }
.p-bar.active { height: 80% !important; box-shadow: 0 0 15px currentColor; }
.p-bar:hover { height: 90% !important; }
.p-bar span { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%) rotate(-90deg); white-space: nowrap; font-size: 0.8rem; font-weight: bold; color: #111; }

/* Color Chapters */
.chapter { padding: 100px 20px; overflow: hidden; }
.chapter-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 2; }
.chap-header { margin-bottom: 50px; }
.chap-header h2 { font-size: 4rem; margin-bottom: 10px; line-height: 1; color: currentColor; text-transform: uppercase; }
.chap-header p { font-size: 1.2rem; max-width: 600px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
.d-card { background: var(--white); border-radius: 8px; overflow: hidden; color: #111; transition: transform 0.2s; }
.d-card:hover { transform: translateY(-5px); }
.d-card img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.d-info { padding: 10px; }
.d-info h3 { font-size: 1rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-meta { font-size: 0.75rem; color: #666; display: flex; justify-content: space-between; margin-bottom: 4px; }
.d-hook { font-size: 0.8rem; color: #333; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Layouts per color */
/* Red: Diagonal split */
.sec-red { background: var(--red); color: var(--white); }
.sec-red::before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 50%; background: rgba(0,0,0,0.1); clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%); z-index: 1; }
.sec-red .d-card { border-bottom: 4px solid var(--red); }

/* Orange: Large arc */
.sec-orange { background: var(--orange); color: var(--white); }
.sec-orange::after { content: ''; position: absolute; top: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; border: 20px solid rgba(255,255,255,0.2); z-index: 1; }
.sec-orange .d-card { border-bottom: 4px solid var(--orange); }

/* Yellow: Radial lines */
.sec-yellow { background: var(--yellow); color: var(--black); }
.sec-yellow::before { content: ''; position: absolute; inset: 0; background: repeating-radial-gradient(circle at center, transparent 0, transparent 50px, rgba(0,0,0,0.05) 50px, rgba(0,0,0,0.05) 52px); z-index: 1; }
.sec-yellow .d-card { border-bottom: 4px solid var(--yellow); }

/* Green: Branching lines */
.sec-green { background: var(--green); color: var(--white); }
.sec-green .card-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.sec-green .d-card { margin: 10px; }
.sec-green .d-card { border-bottom: 4px solid var(--green); }

/* Cyan: Staggered waterfall */
.sec-cyan { background: var(--cyan); color: var(--black); }
.sec-cyan .card-grid { column-count: 4; column-gap: 20px; display: block; }
.sec-cyan .d-card { margin-bottom: 20px; break-inside: avoid; }
.sec-cyan .d-card { border-bottom: 4px solid var(--cyan); }

/* Blue: Night window */
.sec-blue { background: var(--blue); color: var(--white); }
.sec-blue::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px); background-size: 50px 50px; z-index: 1; }
.sec-blue .d-card { border-bottom: 4px solid var(--blue); }

/* Purple: Symmetrical radial */
.sec-purple { background: var(--purple); color: var(--white); }
.sec-purple::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 150%; height: 150%; background: repeating-conic-gradient(from 0deg, transparent 0deg, transparent 15deg, rgba(255,255,255,0.05) 15deg, rgba(255,255,255,0.05) 30deg); border-radius: 50%; z-index: 1; }
.sec-purple .d-card { border-bottom: 4px solid var(--purple); }

/* Merge Section */
.sec-merge { background: var(--white); color: var(--black); }
.merge-rank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 50px; }
.rank-list h3 { font-size: 1.5rem; margin-bottom: 20px; font-family: var(--font-mono); border-bottom: 2px solid var(--black); padding-bottom: 10px; }
.m-item { display: flex; gap: 15px; margin-bottom: 15px; }
.m-item img { width: 60px; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; }
.m-detail { flex: 1; }
.m-detail strong { display: block; font-size: 1rem; margin-bottom: 5px; }
.m-detail span { font-size: 0.8rem; color: #666; display: block; }
.m-detail p { font-size: 0.85rem; margin-top: 5px; color: #444; }

/* Reviews */
.sec-reviews { background: var(--grey); }
.review-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-top: 30px; }
.rev-card { background: var(--white); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.rev-top { height: 120px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 1.2rem; }
.rev-bot { padding: 15px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.rev-text { font-size: 0.9rem; margin-bottom: 10px; }
.rev-user { font-size: 0.8rem; color: #888; text-align: right; }

/* FAQ */
.sec-faq { background: var(--white); }
.faq-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.faq-title { writing-mode: vertical-rl; font-size: 3rem; font-family: var(--font-mono); height: 300px; }
.faq-list details { border-bottom: 1px solid #ddd; padding: 15px 0; }
.faq-list summary { font-weight: bold; font-size: 1.1rem; cursor: pointer; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 0; top: 0; font-weight: bold; }
.faq-list details[open] summary::after { content: '-'; }
.faq-list p { margin-top: 10px; color: #555; font-size: 0.95rem; }

/* Final */
.sec-final { background: var(--black); color: var(--white); text-align: center; padding: 150px 20px; }
.rainbow-arcs { display: flex; flex-direction: column; align-items: center; margin-bottom: 40px; }
.arc { border-radius: 50% 50% 0 0; border: 4px solid; border-bottom: none; margin-bottom: -10px; display: flex; justify-content: center; align-items: flex-end; overflow: hidden; }
.arc-red { width: 300px; height: 150px; border-color: var(--red); }
.arc-orange { width: 260px; height: 130px; border-color: var(--orange); }
.arc-yellow { width: 220px; height: 110px; border-color: var(--yellow); }
.arc-green { width: 180px; height: 90px; border-color: var(--green); }
.arc-cyan { width: 140px; height: 70px; border-color: var(--cyan); }
.arc-blue { width: 100px; height: 50px; border-color: var(--blue); }
.arc-purple { width: 60px; height: 30px; border-color: var(--purple); }

/* Footer */
.site-footer { background: var(--black); color: #888; font-size: 0.85rem; padding: 60px 20px 20px; border-top: 1px solid #333; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.f-col h4 { color: var(--white); margin-bottom: 15px; font-size: 1rem; }
.f-col a { display: block; margin-bottom: 8px; color: #aaa; }
.f-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; text-align: center; line-height: 1.8; }
.about-details { margin: 20px auto; max-width: 800px; text-align: left; font-size: 0.85rem; }
.about-details summary { cursor: pointer; color: var(--white); margin-bottom: 10px; outline: none; }
.about-links { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; }
.about-links a { color: #aaa; }
.about-links a:hover { color: var(--white); }

/* Mobile */
@media (max-width: 767px) {
  .nav-desk { display: none; }
  .mobile-menu-btn { display: block; }
  .hero-content { grid-template-columns: 1fr; }
  .hero-bg-wall { display: none; }
  .hero-visuals { grid-template-columns: 1fr; }
  .prism-wrap { flex-direction: column; height: auto; gap: 20px; }
  .prism-bars { height: 200px; width: 100%; }
  .sec-cyan .card-grid { column-count: 2; }
  .merge-rank-grid { grid-template-columns: 1fr; }
  .faq-wrap { grid-template-columns: 1fr; }
  .faq-title { writing-mode: horizontal-tb; height: auto; }
  .mobile-fixed-btn { position: fixed; bottom: 0; left: 0; width: 100%; padding: 10px; background: var(--white); border-top: 1px solid #eee; z-index: 1000; display: flex; justify-content: center; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-content { grid-template-columns: 1fr 1fr; }
  .sec-cyan .card-grid { column-count: 3; }
}