/* ============================================================
   VICOLOGY — Apple-style product site
   Light, spacious, product imagery leads.
   ============================================================ */

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

:root {
  --sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;

  --bg:      #ffffff;
  --bg-alt:  #f5f5f7;
  --card:    #ffffff;
  --fg:      #1d1d1f;
  --fg-2:    #6e6e73;
  --fg-3:    #86868b;
  --line:    #d2d2d7;
  --line-soft: rgba(0,0,0,0.07);
  --blue:    #0071e3;
  --blue-hi: #0077ed;
  --ok:      #1f9c54;
  --wait:    #b4750d;
  --maxw:    1120px;
  --ease:    cubic-bezier(0.28, 0.11, 0.32, 1);
}

:root[data-theme="dark"] {
  --bg:      #000000;
  --bg-alt:  #101012;
  --card:    #1c1c1e;
  --fg:      #f5f5f7;
  --fg-2:    #a1a1a6;
  --fg-3:    #86868b;
  --line:    #38383d;
  --line-soft: rgba(255,255,255,0.10);
  --blue:    #2997ff;
  --blue-hi: #47a6ff;
  --ok:      #41d07f;
  --wait:    #f5be3f;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── FLOATING PILL NAV ───────────────────────────── */
.navwrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; }
.pill {
  position: relative; display: flex; align-items: center; gap: 4px; height: 52px;
  padding: 0 8px 0 12px; overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(0,0,0,0.13);
  transition: width .5s var(--ease), padding .45s var(--ease), box-shadow .3s;
  will-change: width;
}
.pill > * { transition: opacity .28s var(--ease); }

.pill-brand { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600;
  letter-spacing: -0.02em; white-space: nowrap; flex-shrink: 0; padding-right: 4px; }
.pill-mark { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; display: block; }

.pill-links { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.pill-links .nav-link { font-size: 13.5px; color: var(--fg-2); padding: 7px 11px; border-radius: 9px;
  transition: color .2s, background .2s; }
.pill-links .nav-link:hover { color: var(--fg); background: var(--bg-alt); }

.pill-ctrl { display: flex; align-items: center; gap: 2px; padding-left: 4px; }
.mini-btn { font-size: 12.5px; color: var(--fg-2); padding: 7px 9px; border-radius: 9px; white-space: nowrap;
  transition: color .2s, background .2s; }
.mini-btn:hover { color: var(--fg); background: var(--bg-alt); }
#theme-btn { display: grid; place-items: center; padding: 7px; }
#theme-btn svg { width: 18px; height: 18px; display: block; }
#lang-btn { font-weight: 600; letter-spacing: 0.02em; min-width: 30px; }

.pill-menu { display: none; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 9px; color: var(--fg); }
.pill-menu:hover { background: var(--bg-alt); }
.pill-menu svg, .pill-burger svg { width: 20px; height: 20px; }

/* collapsed-to-circle mark, centred, revealed only when collapsed */
.pill-burger { position: absolute; inset: 0; display: grid; place-items: center; color: var(--fg);
  opacity: 0; pointer-events: none; }
.pill-burger img { width: 30px; height: 30px; object-fit: contain; display: block; }

.pill.collapsed { width: 52px !important; padding: 0; cursor: pointer; }
.pill.collapsed > *:not(.pill-burger) { opacity: 0; pointer-events: none; }
.pill.collapsed .pill-burger { opacity: 1; }

/* mobile dropdown sheet — sibling of the pill so it isn't clipped */
.pill-sheet { display: none; }
@media (max-width: 720px) {
  .pill-name { display: none; }
  .pill-links { display: none; }
  .pill-ctrl { padding-left: 0; }
  .pill-menu { display: flex; }
  .pill-sheet {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 62px; left: 50%; transform: translateX(-50%) translateY(-8px);
    width: 220px; padding: 8px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 34px rgba(0,0,0,0.16);
    opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .pill-sheet.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
  .pill-sheet .nav-link { font-size: 15px; color: var(--fg-2); padding: 11px 12px; border-radius: 10px; }
  .pill-sheet .nav-link:hover { color: var(--fg); background: var(--bg-alt); }
}

/* ── TYPE ────────────────────────────────────────── */
.display {
  font-size: clamp(40px, 7vw, 80px); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.035em;
}
.headline {
  font-size: clamp(32px, 4.6vw, 56px); font-weight: 700;
  line-height: 1.07; letter-spacing: -0.03em;
}
.subhead { font-size: clamp(19px, 2vw, 26px); font-weight: 500; line-height: 1.35; letter-spacing: -0.02em; color: var(--fg-2); }
.eyebrow { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg-2); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 17px; font-weight: 400; letter-spacing: -0.01em;
  padding: 12px 23px; border-radius: 980px;
  background: var(--blue); color: #fff;
  transition: background .2s, transform .2s var(--ease), opacity .2s;
}
.btn:hover { background: var(--blue-hi); }
.btn:active { transform: scale(0.975); }
.btn-ghost { background: transparent; color: var(--blue); padding: 12px 8px; }
.btn-ghost:hover { background: transparent; text-decoration: underline; }
.btn-outline { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-sm { font-size: 14px; padding: 8px 16px; }
.btn[aria-disabled="true"] { background: var(--fg-3); pointer-events: none; }
.link-arrow { color: var(--blue); font-size: 17px; display: inline-flex; align-items: center; gap: 4px; }
.link-arrow:hover { text-decoration: underline; }

/* ── HERO ────────────────────────────────────────── */
.hero { text-align: center; padding: 100px 0 0; }
.hero-below { position: relative; z-index: 10; margin-top: -108px; }
@media (max-width: 1023px) { .hero { padding-top: 90px; } .hero-below { margin-top: -88px; } }
@media (max-width: 639px) { .hero { padding-top: 92px; } .hero-below { margin-top: -60px; } }
.hero .display { max-width: 15ch; margin: 0 auto; }
.hero .subhead { max-width: 30ch; margin: 20px auto 0; }
.hero-cta { display: flex; gap: 26px; justify-content: center; align-items: center; margin-top: 30px; flex-wrap: wrap; }

/* ── ARC ICON GALLERY (hero) ────────────────────── */
.arc { position: relative; width: 100%; margin: 0 auto; pointer-events: none; }
.arc-pivot { position: absolute; left: 50%; bottom: 0; }
.arc-card {
  position: absolute; pointer-events: auto;
  opacity: 0; animation: arc-in .7s var(--ease) forwards;
}
.arc-float { display: block; width: 100%; height: 100%; animation: arc-bob 5s ease-in-out infinite; will-change: transform; }
.arc-rot {
  display: block; width: 100%; height: 100%;
  border-radius: 24%; overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.16);
  transition: transform .3s var(--ease); will-change: transform;
}
.arc-rot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.arc-mono {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: var(--bg-alt); border: 1px solid var(--line);
  color: var(--fg-3); font-weight: 600; letter-spacing: -0.02em;
}
.arc-badge {
  position: absolute; right: 4px; bottom: 4px; z-index: 3;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 980px;
  background: var(--blue); color: #fff; border: 2px solid var(--bg);
  font-size: 10.5px; font-weight: 600; line-height: 16px; text-align: center;
}
@media (hover: hover) {
  .arc-card:hover { z-index: 60 !important; }
  .arc-card:hover .arc-rot { transform: scale(1.14) rotate(0deg) !important; box-shadow: 0 20px 44px rgba(0,0,0,0.24); }
}
@keyframes arc-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes arc-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  .arc-card { animation: none; opacity: 1; }
  .arc-float { animation: none; }
}

/* icon ticker under hero — seamless marquee */
.ticker {
  position: relative; overflow: hidden; margin-top: 56px; padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.ticker-track {
  display: flex; width: max-content;
  animation: ticker-scroll var(--dur, 44s) linear infinite;
  will-change: transform;
}
/* Exactly two copies + margin-based spacing (not flex gap), so -50% lands
   pixel-perfectly on the start of copy two and the loop is seamless. */
@keyframes ticker-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.ticker-item { flex: 0 0 auto; margin-right: 16px; display: block; position: relative; }
.ticker-badge {
  position: absolute; right: -5px; bottom: -4px;
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 980px;
  background: var(--blue); color: #fff; border: 2px solid var(--bg);
  font-size: 11px; font-weight: 600; line-height: 17px; text-align: center;
  letter-spacing: 0; pointer-events: none;
}
.ticker-item img {
  width: 68px; height: 68px; border-radius: 15px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
@media (hover: hover) {
  .ticker:hover .ticker-track { animation-play-state: paused; }
  .ticker-item:hover img { transform: translateY(-6px) scale(1.06); box-shadow: 0 12px 26px rgba(0,0,0,0.18); }
}
.ticker-track:focus-within { animation-play-state: paused; }
@media (max-width: 640px) {
  .ticker-item { margin-right: 12px; }
  .ticker-item img { width: 56px; height: 56px; border-radius: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* ── ROTATING SPOTLIGHT ─────────────────────────── */
.spotlight { padding: 84px 0 70px; text-align: center; overflow: hidden; }
.spot-stage { position: relative; }
.spot-slide { opacity: 0; transition: opacity .5s var(--ease); }
.spot-slide.in { opacity: 1; }
.spot-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 18px; }
.spot-nav {
  position: absolute; top: 190px; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line);
  color: var(--fg); box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.spot-nav:hover { transform: scale(1.08); border-color: var(--line-2); }
.spot-nav:active { transform: scale(0.96); }
.spot-nav svg { width: 20px; height: 20px; }
.spot-nav.prev { left: 8px; }
.spot-nav.next { right: 8px; }
@media (max-width: 560px) { .spot-nav { top: auto; bottom: 66px; width: 40px; height: 40px; } .spot-nav.prev { left: 14px; } .spot-nav.next { right: 14px; } }
.spot-dots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 40px; max-width: 420px; margin-left: auto; margin-right: auto; }
.spot-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); border: none; padding: 0; cursor: pointer; transition: background .25s, transform .25s var(--ease); }
.spot-dot:hover { background: var(--fg-3); }
.spot-dot.active { background: var(--fg); transform: scale(1.25); }
@media (prefers-reduced-motion: reduce) { .spot-slide { transition: none; } }

/* ── PRODUCT SECTIONS ───────────────────────────── */
.product { padding: 96px 0; text-align: center; }
.product.alt { background: var(--bg-alt); }
.product-icon { width: 110px; height: 110px; border-radius: 24px; margin: 0 auto 26px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.16); }
.product .headline { max-width: 18ch; margin: 0 auto; }
.product .subhead { max-width: 34ch; margin: 16px auto 0; font-size: clamp(17px, 1.7vw, 21px); }
.product-cta { display: flex; gap: 24px; justify-content: center; align-items: center; margin-top: 24px; flex-wrap: wrap; }

/* screenshot gallery — store shots already include device frames */
.gallery {
  display: flex; gap: 20px; overflow-x: auto; padding: 44px 24px 20px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; justify-content: flex-start;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery.center { justify-content: center; }
@media (max-width: 900px) { .gallery.center { justify-content: flex-start; } }
.gallery img {
  width: 244px; flex: 0 0 auto; border-radius: 20px; scroll-snap-align: center;
  background: var(--bg-alt);
}
@media (max-width: 640px) { .gallery img { width: 200px; } .gallery { gap: 14px; padding-top: 34px; } }

/* rating + meta line */
.prod-meta { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; font-size: 14px; color: var(--fg-3); }
.stars { color: #f5a623; letter-spacing: 1px; }
.dot-sep { opacity: .5; }

/* ── DIRECTORY GRID ─────────────────────────────── */
.dir { padding: 90px 0; }
.dir-head { text-align: center; margin-bottom: 12px; }
.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 30px 0 34px; }
.chip { font-size: 14px; font-weight: 500; color: var(--fg-2); background: var(--bg-alt);
  padding: 8px 16px; border-radius: 980px; transition: background .2s, color .2s; }
.chip:hover { color: var(--fg); }
.chip.active { background: var(--fg); color: var(--bg); }
:root[data-theme="dark"] .chip { background: var(--card); }
:root[data-theme="dark"] .chip.active { background: var(--fg); color: #000; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.tile {
  background: var(--bg-alt); border-radius: 20px; padding: 26px 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
:root[data-theme="dark"] .tile { background: var(--card); }
@media (hover: hover) { .tile:hover { transform: translateY(-6px); box-shadow: 0 14px 36px rgba(0,0,0,0.14); } }
.tile img.ico { width: 84px; height: 84px; border-radius: 19px; box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.tile .ph { width: 84px; height: 84px; border-radius: 19px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--fg-3);
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
:root[data-theme="dark"] .tile .ph { background: #000; }
.tile-name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.tile-tag { font-size: 14px; color: var(--fg-2); line-height: 1.4; flex: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--fg-3); }
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live { color: var(--ok); }
.badge.coming, .badge.review { color: var(--wait); }
.badge.rejected { color: var(--fg-3); }
.tile .flag { font-size: 11px; font-weight: 600; color: #fff; background: var(--fg-3);
  padding: 2px 8px; border-radius: 980px; }

.empty { grid-column: 1/-1; text-align: center; color: var(--fg-2); padding: 70px 0; }

/* ── NEWS ────────────────────────────────────────── */
.news { padding: 90px 0; background: var(--bg-alt); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 34px; }
.news-card { background: var(--card); border-radius: 20px; padding: 26px; }
.news-kind { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--blue); }
.news-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 8px 0 8px; line-height: 1.2; }
.news-body { font-size: 15px; color: var(--fg-2); line-height: 1.5; white-space: pre-wrap; }
.news-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--fg-3); }
.news-foot img { width: 26px; height: 26px; border-radius: 7px; }

/* ── APP-IDEA CTA ────────────────────────────────── */
.idea { padding: 96px 0; text-align: center; }
.idea .headline { max-width: 16ch; margin: 0 auto; }
.idea .subhead { max-width: 40ch; margin: 16px auto 0; font-size: clamp(17px, 1.7vw, 21px); }

/* ── FOOTER ──────────────────────────────────────── */
.footer { background: var(--bg-alt); border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--fg-2); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; padding-bottom: 26px; }
.footer-col h4 { font-size: 12px; font-weight: 600; color: var(--fg); margin-bottom: 10px; }
.footer-col a, .footer-col button { display: block; padding: 4px 0; color: var(--fg-2); font-size: 12px; text-align: left; transition: color .2s; }
.footer-col a:hover, .footer-col button:hover { color: var(--fg); text-decoration: underline; }
.footer-bottom { padding-top: 18px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ── DETAIL PAGE ─────────────────────────────────── */
.d-hero { text-align: center; padding: 108px 0 0; }
.d-icon { width: 128px; height: 128px; border-radius: 28px; margin: 0 auto 26px; box-shadow: 0 12px 38px rgba(0,0,0,0.18); }
.d-ph { width: 128px; height: 128px; border-radius: 28px; margin: 0 auto 26px; display: grid; place-items: center;
  background: var(--bg-alt); border: 1px solid var(--line); color: var(--fg-3); font-size: 34px; font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--blue); margin-bottom: 34px; }
.back:hover { text-decoration: underline; }

.spec { max-width: 760px; margin: 0 auto; padding: 70px 0 0; }
.spec-row { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.spec-row .k { color: var(--fg-2); }
@media (max-width: 560px) { .spec-row { grid-template-columns: 1fr; gap: 4px; } }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 34px; margin-top: 50px; text-align: left; }
.feature h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.feature p { font-size: 15px; color: var(--fg-2); line-height: 1.5; }

.copy { max-width: 700px; margin: 0 auto; font-size: 19px; line-height: 1.6; color: var(--fg-2); }

/* clickable screenshots */
.gallery img { cursor: zoom-in; }

/* what's new */
.wn { max-width: 720px; margin: 0 auto; text-align: left; }
.wn-line { font-size: 15px; color: var(--fg-2); margin-bottom: 8px; }
.wn-item { display: grid; grid-template-columns: 132px 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line-soft); }
.wn-date { font-size: 14px; color: var(--fg-3); }
.wn-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.wn-body { font-size: 15px; color: var(--fg-2); line-height: 1.6; white-space: pre-wrap; }
@media (max-width: 560px) { .wn-item { grid-template-columns: 1fr; gap: 6px; } }

/* FAQ accordion */
.faq { max-width: 720px; margin: 0 auto; text-align: left; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 34px 20px 0; position: relative;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--fg-3); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .faq-a { padding: 0 34px 20px 0; font-size: 15.5px; line-height: 1.6; color: var(--fg-2); }

/* similar apps */
.similar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* screenshot lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  padding: 30px; background: rgba(0,0,0,0.82); backdrop-filter: blur(6px); cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5); animation: pop .3s var(--ease); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px;
  border-radius: 50%; background: rgba(255,255,255,0.14); color: #fff; display: grid; place-items: center;
  cursor: pointer; transition: background .2s; }
.lightbox-nav:hover { background: rgba(255,255,255,0.26); }
.lightbox-nav svg { width: 24px; height: 24px; }
.lightbox-nav.prev { left: 20px; } .lightbox-nav.next { right: 20px; }
.lightbox-close { position: absolute; top: 20px; right: 22px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox-close:hover { background: rgba(255,255,255,0.26); }
@media (max-width: 560px) { .lightbox-nav { width: 42px; height: 42px; } .lightbox-nav.prev { left: 8px; } .lightbox-nav.next { right: 8px; } }

.notice { max-width: 700px; margin: 26px auto; background: var(--bg-alt); border-radius: 14px;
  padding: 16px 20px; font-size: 14px; color: var(--fg-2); text-align: left; }
.notice strong { color: var(--fg); }

/* ── LEGAL ───────────────────────────────────────── */
.legal { max-width: 720px; margin: 0 auto; padding: 104px 0 0; }
.prose { font-size: 16px; line-height: 1.65; color: var(--fg-2); }
.prose h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg); margin: 40px 0 12px; }
.prose h3 { font-size: 18px; font-weight: 600; color: var(--fg); margin: 26px 0 8px; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 16px 20px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { color: var(--blue); }
.prose a:hover { text-decoration: underline; }
.prose em { font-style: normal; font-size: 13px; color: var(--fg-3); }

/* ── ADMIN ───────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0,0,0,0.42); backdrop-filter: blur(6px); }
.overlay.open { display: flex; }
.modal { width: 100%; max-width: 400px; background: var(--bg); border-radius: 20px; padding: 30px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.3); animation: pop .32s var(--ease); }
.modal.wide { max-width: 800px; max-height: 86vh; display: flex; flex-direction: column; padding: 0; }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(10px);} to { opacity:1; transform:none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.modal-body { padding: 24px 26px; overflow-y: auto; }
.modal-title { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; margin-bottom: 8px; }
.modal-sub { font-size: 15px; color: var(--fg-2); margin-bottom: 22px; }

.tabs { display: flex; gap: 26px; padding: 0 26px; border-bottom: 1px solid var(--line-soft); }
.tab { font-size: 14px; font-weight: 500; color: var(--fg-2); padding: 14px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--fg); border-bottom-color: var(--blue); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--fg-2); margin-bottom: 6px; }
.input, .textarea, .select { width: 100%; font-family: inherit; font-size: 15px; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; transition: border-color .2s, box-shadow .2s; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.form-err { font-size: 13px; color: #d70015; margin-top: 6px; min-height: 18px; }

.admin-note { font-size: 14px; color: var(--fg-2); line-height: 1.5; background: var(--bg-alt);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.admin-note strong { color: var(--fg); }
.admin-note code { font-size: 13px; background: var(--card); padding: 1px 5px; border-radius: 4px; }

.arow { display: grid; grid-template-columns: 40px minmax(0,1fr) 132px 46px; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.arow img, .arow .ph { width: 40px; height: 40px; border-radius: 10px; }
.arow .ph { display: grid; place-items: center; background: var(--bg-alt); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--fg-3); }
.arow .an { font-size: 15px; font-weight: 500; }
.arow .as { font-size: 12.5px; color: var(--fg-3); }
.arow .select { padding: 8px 10px; font-size: 13px; }
@media (max-width: 620px) { .arow { grid-template-columns: 40px minmax(0,1fr) 46px; } .arow .select { display: none; } }

.nrow { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.nrow .nm { flex: 1; min-width: 0; }
.nrow .nt { font-size: 15px; font-weight: 500; }
.nrow .nd { font-size: 12.5px; color: var(--fg-3); }

.switch { position: relative; width: 46px; height: 28px; justify-self: end; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--line); border-radius: 980px; transition: background .25s var(--ease); pointer-events: none; }
.switch .thumb { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: transform .25s var(--ease); pointer-events: none; }
.switch input:checked ~ .track { background: #30d158; }
.switch input:checked ~ .track .thumb { transform: translateX(18px); }

.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 26px; border-top: 1px solid var(--line-soft); }
.btn-quiet { background: transparent; color: var(--fg-2); }
.btn-quiet:hover { background: var(--bg-alt); color: var(--fg); }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(16px); z-index: 300;
  background: var(--fg); color: var(--bg); font-size: 15px; font-weight: 500; padding: 13px 22px; border-radius: 980px;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); box-shadow: 0 8px 26px rgba(0,0,0,.24); }
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
