:root {
  color-scheme: dark;
  --page: #16072f;
  --page-deep: #100721;
  --card: #2c1451;
  --panel: #24113f;
  --orange: #ff7a29;
  --pink: #ff367e;
  --violet: #9d2aff;
  --gold: #ffbf3d;
  --text: #fff;
  --muted: #cbb9e8;
  --line: rgba(255, 126, 69, .35);
  --shadow: 0 12px 28px rgba(5, 0, 20, .3);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #d9dbe3;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.62;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, var(--page), var(--page-deep));
  box-shadow: 0 0 48px rgba(22, 7, 47, .25);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(16, 7, 33, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand {
  font-size: 1.55rem;
  font-weight: 1000;
  letter-spacing: -.05em;
  background: linear-gradient(90deg, var(--gold), var(--orange), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-links { display: flex; gap: 6px; }
.auth-links a,
.hero-button,
.home-cta a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 164, 91, .3);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 900;
}
.auth-links a { background: #36205b; }
.auth-links .primary,
.hero-button,
.home-cta a {
  background: linear-gradient(90deg, var(--orange), var(--pink));
  border: 0;
}
.category-hero {
  min-height: 320px;
  display: flex;
  align-items: end;
  padding: 22px 15px;
  background:
    linear-gradient(0deg, rgba(16, 7, 33, .99), rgba(22, 7, 47, .25)),
    linear-gradient(90deg, rgba(22, 7, 47, .93), rgba(22, 7, 47, .18)),
    var(--hero-image) center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero-copy { max-width: 420px; }
.breadcrumb { margin: 0 0 8px; color: #e8ddf7; font-size: .67rem; }
.breadcrumb span { color: var(--gold); }
.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: .62rem;
  font-weight: 950;
  letter-spacing: .12em;
}
h1 {
  margin: 0;
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.lead { margin: 10px 0 14px; color: #e5d9f3; font-size: .78rem; }
.category-nav {
  display: flex;
  gap: 7px;
  padding: 11px 12px;
  overflow-x: auto;
  background: #1c0b36;
  border-bottom: 1px solid rgba(157, 42, 255, .3);
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  background: #2b1550;
  border: 1px solid rgba(157, 42, 255, .55);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 850;
}
.category-nav a[aria-current="page"] {
  background: linear-gradient(90deg, var(--orange), var(--pink));
  border-color: transparent;
}
.recommendations,
.faq-section,
.related-categories { padding: 19px 12px; }
.section-heading h2,
.faq-section h2,
.related-categories h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.2;
}
.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.recommendation-card {
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #381869, var(--card));
  border: 1px solid rgba(255, 126, 69, .42);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.recommendation-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #210d3f;
}
.recommendation-copy { padding: 8px; }
.recommendation-copy span { color: var(--gold); font-size: .52rem; font-weight: 950; }
.recommendation-copy h3 {
  display: -webkit-box;
  margin: 3px 0;
  overflow: hidden;
  font-size: .72rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.recommendation-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .58rem;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.page-toc {
  margin: 0 12px 18px;
  padding: 13px;
  background: #2b1550;
  border: 1px solid rgba(157, 42, 255, .35);
  border-radius: 13px;
}
.page-toc strong { display: block; margin-bottom: 7px; color: var(--gold); font-size: .78rem; }
.page-toc div { display: grid; gap: 5px; }
.page-toc a { font-size: .7rem; text-decoration: underline; text-underline-offset: 3px; }
.category-content { padding: 0 12px; }
.content-section {
  position: relative;
  margin-bottom: 12px;
  padding: 16px 14px;
  background:
    radial-gradient(circle at 95% 5%, rgba(157, 42, 255, .14), transparent 28%),
    var(--panel);
  border: 1px solid rgba(255, 126, 69, .25);
  border-radius: 15px;
}
.section-index {
  position: absolute;
  top: 12px;
  right: 13px;
  color: rgba(255, 191, 61, .35);
  font-size: 1.2rem;
  font-weight: 1000;
}
.content-section h2 { margin: 0 34px 9px 0; font-size: 1.15rem; line-height: 1.3; }
.content-section p { margin: 9px 0; color: #eee6f8; font-size: .78rem; }
.check-list { margin: 12px 0 0; padding: 0; list-style: none; }
.check-list li {
  position: relative;
  margin-top: 7px;
  padding-left: 20px;
  color: #e4d8f1;
  font-size: .73rem;
}
.check-list li::before {
  position: absolute;
  left: 0;
  color: var(--gold);
  content: "✓";
  font-weight: 950;
}
.table-scroll { margin-top: 13px; overflow-x: auto; border-radius: 10px; }
table { width: 100%; min-width: 390px; border-collapse: collapse; background: #1c0c34; }
th, td { padding: 9px; border: 1px solid rgba(255, 126, 69, .28); text-align: left; font-size: .7rem; }
th { color: var(--gold); background: #35175f; }
.faq-item {
  margin-top: 8px;
  overflow: hidden;
  background: #291349;
  border: 1px solid rgba(157, 42, 255, .35);
  border-radius: 12px;
}
.faq-item button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: #fff;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: .75rem;
  font-weight: 850;
  text-align: left;
}
.faq-item b { color: var(--gold); font-size: 1rem; }
.faq-answer { padding: 0 12px 11px; }
.faq-answer p { margin: 0; color: var(--muted); font-size: .72rem; }
.responsible-card {
  margin: 0 12px 19px;
  padding: 15px;
  background:
    radial-gradient(circle at 88% 15%, rgba(255, 191, 61, .13), transparent 30%),
    #291349;
  border: 1px solid rgba(255, 191, 61, .4);
  border-radius: 14px;
}
.responsible-card h2 { margin: 0 0 7px; color: var(--gold); font-size: 1.13rem; }
.responsible-card p:last-child { margin: 0; color: var(--muted); font-size: .74rem; }
.related-categories > div { display: grid; gap: 8px; }
.related-categories a {
  min-height: 65px;
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  background: #251143;
  border: 1px solid rgba(255, 126, 69, .24);
  border-radius: 12px;
}
.related-categories a > span {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--orange), var(--pink));
  border-radius: 10px;
  font-size: .6rem;
  font-weight: 950;
}
.related-categories strong { font-size: .82rem; }
.related-categories small { color: var(--gold); font-size: .61rem; }
.home-cta { margin: 0 12px 12px; padding: 16px; background: #31165b; border-radius: 14px; text-align: center; }
.home-cta strong { font-size: 1rem; }
.home-cta p { margin: 5px 0 12px; color: var(--muted); font-size: .7rem; }
.back-to-top {
  min-height: 44px;
  display: block;
  margin: 0 auto 24px;
  padding: 8px 15px;
  color: #fff;
  background: #2c1451;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 850;
}
.site-footer { padding: 17px 14px 86px; color: var(--muted); background: #100721; text-align: center; font-size: .66rem; }
.site-footer strong { display: block; color: var(--gold); font-size: .95rem; }
.site-footer p { margin: 4px 0 0; }
.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  width: min(100%, 480px);
  min-height: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  padding: 6px 7px max(6px, env(safe-area-inset-bottom));
  background: rgba(16, 7, 33, .97);
  border-top: 1px solid rgba(255, 126, 69, .48);
  backdrop-filter: blur(12px);
}
.bottom-nav a {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #d7c9e9;
  font-size: .58rem;
  font-weight: 850;
}
.bottom-nav b { color: var(--gold); font-size: .95rem; line-height: 1; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
@media (max-width: 350px) {
  .topbar { padding-inline: 9px; }
  .auth-links a { padding-inline: 8px; font-size: .64rem; }
  .category-hero { padding-inline: 12px; }
  .recommendation-grid { gap: 6px; }
  .recommendation-copy { padding: 6px; }
}
@media (hover: hover) {
  a, button { transition: filter .18s ease; }
  a:hover, button:hover { filter: brightness(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
