:root {
  --midnight: #0B1123;
  --deep: #1A2137;
  --deeper: #131A2C;
  --border-dark: #2A3149;
  --moonlight: #C9A96E;
  --moonlight-soft: rgba(201, 169, 110, 0.15);
  --cream: #F0EAD6;
  --ash: #A0A5B8;
  --dim: #6B7089;
  --danger: #E6857A;
  --serif: Georgia, "Times New Roman", "Yu Mincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--midnight);
  color: var(--cream);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body { overscroll-behavior-y: contain; }

a { color: inherit; text-decoration: none; }
button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }

.serif { font-family: var(--serif); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--midnight);
  position: relative;
  padding-bottom: 82px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 17, 35, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 0.5px solid var(--border-dark);
}
.brand { display: flex; align-items: center; gap: 8px; flex: 1; text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 19px; letter-spacing: 0.1em; color: var(--cream); }
.icon-btn {
  width: 40px; height: 40px;
  background: var(--deep);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--cream); position: relative;
}
.icon-btn i { font-size: 18px; }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--moonlight); border-radius: 50%; }

.tabs {
  position: sticky;
  top: 62px;
  z-index: 19;
  background: var(--midnight);
  padding: 12px 16px 10px;
  display: flex;
  gap: 20px;
  border-bottom: 0.5px solid var(--border-dark);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font-size: 13px;
  color: var(--ash);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.tab.active { color: var(--cream); font-weight: 500; border-bottom-color: var(--moonlight); }

.hero {
  background: linear-gradient(180deg, var(--deep) 0%, var(--deeper) 100%);
  padding: 24px 18px;
}
.hero-label { font-size: 11px; color: var(--moonlight); letter-spacing: 0.28em; margin-bottom: 12px; }
.hero-title { font-family: var(--serif); font-size: 22px; line-height: 1.5; margin-bottom: 10px; }
.hero-text { font-size: 12px; color: var(--ash); line-height: 1.7; margin-bottom: 18px; }
.hero-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--moonlight); color: var(--midnight);
  padding: 13px 16px; border-radius: 6px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.05em;
}
.hero-cta:active { opacity: 0.85; }

.section { padding: 22px 16px; border-top: 0.5px solid var(--border-dark); }
.section:first-of-type { border-top: none; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-title { font-family: var(--serif); font-size: 17px; color: var(--cream); }
.section-meta { font-size: 11px; color: var(--dim); }
.section-more { font-size: 12px; color: var(--moonlight); }

.filter-bar {
  display: flex; gap: 6px; margin-bottom: 14px;
  padding: 0;
}
.filter-btn {
  font-size: 12px; padding: 6px 14px;
  border-radius: 999px;
  border: 0.5px solid var(--border-dark);
  color: var(--ash);
  background: transparent;
}
.filter-btn.active {
  background: var(--moonlight); color: var(--midnight);
  border-color: var(--moonlight); font-weight: 500;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.card {
  background: var(--deep);
  border-radius: 8px;
  padding: 8px;
  position: relative;
  display: block;
  color: inherit;
}
.card:active { opacity: 0.9; }
.rank {
  position: absolute; top: 12px; left: 12px;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; font-family: var(--serif);
  z-index: 1;
}
.rank-1 { background: var(--moonlight); color: var(--midnight); }
.rank-2 { background: var(--ash); color: var(--midnight); }
.rank-3 { background: var(--dim); color: var(--cream); }
.rank-n { background: var(--border-dark); color: var(--ash); }
.thumb {
  aspect-ratio: 3/4;
  background: var(--midnight);
  border-radius: 4px;
  margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--dim);
  overflow: hidden;
  position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.thumb-placeholder i { font-size: 22px; }
.thumb-placeholder span { font-size: 10px; }
.thumb-badges { position: absolute; bottom: 4px; left: 4px; right: 4px; display: flex; gap: 3px; flex-wrap: wrap; }
.thumb-badge {
  background: rgba(0,0,0,0.7); color: var(--moonlight);
  font-size: 9px; padding: 2px 5px; border-radius: 3px; letter-spacing: 0.05em;
}
.card-title {
  font-size: 12px; font-weight: 500; line-height: 1.4;
  margin-bottom: 4px; color: var(--cream);
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  min-height: 33px;
}
.card-maker { font-size: 11px; color: var(--ash); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-price-row { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.card-price { font-size: 14px; font-weight: 500; font-family: var(--serif); color: var(--cream); }
.card-price.sale { color: var(--moonlight); }
.card-strike { font-size: 10px; color: var(--dim); text-decoration: line-through; }
.card-review { display: flex; align-items: center; gap: 3px; font-size: 10px; color: var(--ash); margin-top: 4px; }
.card-review i { font-size: 11px; color: var(--moonlight); }

.chip-row {
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 2px;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 8px 14px; border-radius: 999px;
  font-size: 12px; white-space: nowrap;
  background: var(--deep); border: 0.5px solid var(--border-dark);
  color: var(--cream);
}
.chip.active { border-color: var(--moonlight); color: var(--moonlight); }

.editorial { background: var(--deep); border-radius: 8px; padding: 12px; display: flex; gap: 12px; margin-bottom: 10px; }
.editorial-thumb {
  width: 76px; height: 76px; background: var(--midnight);
  border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--moonlight);
}
.editorial-cat { font-size: 11px; color: var(--moonlight); letter-spacing: 0.2em; margin-bottom: 6px; }
.editorial-title { font-size: 13px; font-weight: 500; line-height: 1.5; margin-bottom: 6px; color: var(--cream); }
.editorial-meta { font-size: 11px; color: var(--dim); }

.see-more { text-align: center; margin-top: 14px; }
.see-more a { font-size: 12px; color: var(--moonlight); }

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px; margin: 0 auto;
  background: rgba(11, 17, 35, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 0.5px solid var(--border-dark);
  padding: 8px 4px calc(env(safe-area-inset-bottom) + 8px);
  display: flex; justify-content: space-around;
  z-index: 30;
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 10px; min-width: 56px;
  color: var(--ash);
}
.bn-item i { font-size: 22px; }
.bn-item span { font-size: 10px; }
.bn-item.active { color: var(--moonlight); }
.bn-item.active span { font-weight: 500; }

.detail-hero { padding: 20px 16px 24px; background: var(--deeper); }
.detail-main-thumb {
  aspect-ratio: 3/4; max-width: 220px; margin: 0 auto 16px;
  background: var(--midnight); border-radius: 8px;
  border: 0.5px solid var(--border-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--dim); position: relative;
}
.play-tag {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,0.7); color: var(--moonlight);
  font-size: 10px; padding: 4px 8px; border-radius: 4px;
  display: flex; align-items: center; gap: 4px;
}
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-tag { font-size: 10px; padding: 3px 8px; border-radius: 4px; font-weight: 500; letter-spacing: 0.05em; }
.tag-sale { background: rgba(230, 133, 122, 0.2); color: #F5C4B3; }
.tag-4k { background: rgba(133, 183, 235, 0.2); color: #85B7EB; }
.tag-svod { background: rgba(93, 202, 165, 0.2); color: #9FE1CB; }
.detail-title { font-family: var(--serif); font-size: 20px; font-weight: 400; line-height: 1.5; margin-bottom: 12px; }
.detail-review { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 12px; color: var(--ash); }
.stars { display: flex; gap: 2px; }
.stars i { color: var(--moonlight); font-size: 13px; }
.stars i.empty { color: var(--dim); }

.price-box {
  background: var(--deep); border-radius: 8px; padding: 14px; margin-bottom: 14px;
}
.price-deadline { font-size: 11px; color: #F5C4B3; font-weight: 500; margin-bottom: 4px; }
.price-line { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.price-main { font-size: 26px; font-weight: 500; color: var(--moonlight); font-family: var(--serif); }
.price-strike { font-size: 12px; color: var(--dim); text-decoration: line-through; }
.price-off { background: rgba(230, 133, 122, 0.2); color: #F5C4B3; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.price-note { font-size: 11px; color: var(--ash); }

.cta-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--moonlight); color: var(--midnight);
  padding: 15px; border-radius: 8px;
  font-size: 15px; font-weight: 500; letter-spacing: 0.03em;
  margin-bottom: 10px;
}
.cta-primary:active { opacity: 0.85; }
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.cta-sub {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 0.5px solid var(--border-dark);
  padding: 11px; border-radius: 8px;
  font-size: 13px; color: var(--ash);
}
.cta-sub.active { color: var(--moonlight); border-color: var(--moonlight); }
.trust-note { font-size: 11px; color: var(--dim); display: flex; align-items: center; gap: 4px; }

.info-list { background: var(--deep); border-radius: 8px; padding: 14px 16px; font-size: 13px; }
.info-row { display: grid; grid-template-columns: 88px 1fr; gap: 6px 14px; padding: 6px 0; }
.info-label { color: var(--ash); }
.info-value.link { color: var(--moonlight); }
.info-genres { display: flex; flex-wrap: wrap; gap: 5px; }
.info-genre { padding: 3px 9px; border-radius: 999px; font-size: 11px; background: rgba(133, 183, 235, 0.15); color: #85B7EB; }

.review-box {
  background: var(--deep); border-left: 2px solid var(--moonlight);
  border-radius: 0 8px 8px 0; padding: 14px 16px;
  font-family: var(--serif); font-size: 13px; line-height: 1.8; color: var(--cream);
}
.review-box .signature { margin-top: 10px; font-size: 11px; color: var(--dim); font-family: var(--sans); }

.review-summary {
  background: var(--deep); border-radius: 8px; padding: 14px;
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  margin-bottom: 14px;
}
.review-big { text-align: center; }
.review-big-num { font-size: 30px; font-family: var(--serif); font-weight: 500; line-height: 1; }
.review-big-stars { display: flex; justify-content: center; gap: 1px; margin-top: 4px; }
.review-big-stars i { font-size: 11px; color: var(--moonlight); }
.review-big-count { font-size: 10px; color: var(--dim); margin-top: 3px; }
.review-bars { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.rbar { display: flex; align-items: center; gap: 8px; }
.rbar-lbl { width: 10px; color: var(--ash); }
.rbar-track { flex: 1; height: 5px; background: var(--midnight); border-radius: 3px; overflow: hidden; }
.rbar-fill { height: 100%; background: var(--moonlight); }
.rbar-cnt { color: var(--ash); width: 28px; text-align: right; }

.footer-note { padding: 16px; font-size: 10px; color: var(--dim); text-align: center; line-height: 1.7; }

.age-gate-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 17, 35, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.age-modal {
  background: var(--deep); border-radius: 16px;
  padding: 30px 22px 22px;
  width: 100%; max-width: 340px;
  border: 0.5px solid var(--border-dark);
}
.age-brand { text-align: center; margin-bottom: 24px; }
.age-name { font-family: var(--serif); font-size: 18px; letter-spacing: 0.14em; margin-top: 10px; }
.age-domain { font-size: 11px; letter-spacing: 0.24em; color: var(--moonlight); margin-top: 4px; }
.age-title { text-align: center; font-family: var(--serif); font-size: 20px; line-height: 1.5; margin-bottom: 12px; }
.age-desc { text-align: center; font-size: 12px; color: var(--ash); line-height: 1.8; margin-bottom: 22px; }
.age-yes {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--moonlight); color: var(--midnight);
  padding: 14px; border-radius: 6px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.03em;
  width: 100%; margin-bottom: 10px;
}
.age-no {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 0.5px solid var(--border-dark);
  color: var(--ash); padding: 14px; border-radius: 6px;
  font-size: 14px; width: 100%; margin-bottom: 18px;
}
.age-remember {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--moonlight-soft);
  border-radius: 6px; margin-bottom: 18px;
  cursor: pointer;
}
.age-check {
  width: 16px; height: 16px; border: 1px solid var(--moonlight);
  border-radius: 3px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.age-check i { font-size: 11px; color: var(--moonlight); opacity: 1; }
.age-check.unchecked i { opacity: 0; }
.age-remember-text { font-size: 11px; color: var(--ash); line-height: 1.5; }
.age-legal {
  text-align: center; font-size: 10px; color: var(--dim);
  line-height: 1.7; border-top: 0.5px solid var(--border-dark);
  padding-top: 14px;
}
.age-legal a { color: var(--moonlight); text-decoration: underline; }

.pagination { text-align: center; padding: 20px 16px; }
.load-more {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0.5px solid var(--moonlight); color: var(--moonlight);
  padding: 12px 24px; border-radius: 999px; font-size: 13px;
  background: transparent;
}

.empty-state { padding: 60px 20px; text-align: center; }
.empty-state i { font-size: 40px; color: var(--dim); margin-bottom: 12px; }
.empty-state p { color: var(--ash); font-size: 13px; }

@media (max-width: 380px) {
  .hero-title { font-size: 20px; }
  .section-title { font-size: 16px; }
}
