/* Black Hole Mukbang web site. Colours and 9-slice images come from the game
   (lib/ui/theme.dart Pal, assets/images/ui); headings use the game's display
   face for each language (--display, set per page), body text the system face. */
:root {
  --ink: #25233F;
  --ink2: #3A3760;
  --night: #1B1A3A;
  --night2: #2B2860;
  --cream: #FFF6E6;
  --cream2: #F2E1C4;
  --coral: #FF4D6D;
  --coral-dark: #CC2F4E;
  --butter: #FFD166;
  --mint: #3DDC97;
  --grape: #9B7BFF;
  --text-dim: #6E6A8C;
  --grey: #C4C0D6;
  --gutter: 16px;
  --max: 1080px;
  --display: 'BHM Display', system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font: 16px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--butter); }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 6px; }
.lang-ko { word-break: keep-all; }
.lang-ja h1, .lang-ja h2, .lang-ja h3 { word-break: auto-phrase; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight, 700); line-height: 1.15; margin: 0; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }

/* sticker text: a thick ink outline and a drop, like OText in the game */
.sticker {
  color: #fff;
  text-shadow:
    3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink),
    2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink),
    0 6px 0 var(--ink), 2px 5px 0 var(--ink), -2px 5px 0 var(--ink);
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ------------------------------------------------------------ top bar */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(27, 26, 58, 0.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: var(--display-weight, 700); font-size: 18px; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.top nav > a { color: var(--grey); text-decoration: none; font-size: 14px; padding: 8px 10px; border-radius: 10px; }
.top nav > a:hover, .top nav > a[aria-current] { color: #fff; background: rgba(255, 255, 255, 0.08); }

.langs { position: relative; }
.langs summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  color: #fff; font-size: 14px; padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14);
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary svg { width: 16px; height: 16px; flex: none; }
.langs ul {
  position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  background: var(--cream); border-radius: 16px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 0 3px var(--ink);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 280px;
}
.langs li a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; white-space: nowrap; }
.langs li a:hover { background: var(--cream2); color: var(--ink); }
.langs li a[aria-current] { background: var(--coral); color: #fff; }

/* ------------------------------------------------------------ hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--night) url(/assets/img/bg_lobby.webp) center 30% / cover no-repeat;
}
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--night)); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 72px; }
.hero .logo { display: block; width: min(440px, 100%); margin: 0 0 18px -6px; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.18)); }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); margin-bottom: 18px; }
.hero .lead { font-size: 18px; color: #EDE8FF; max-width: 34em; margin: 0 0 26px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.candy {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 11px 30px 17px; color: #fff; text-decoration: none;
  font-family: var(--display); font-weight: var(--display-weight, 700); font-size: 20px;
  /* the 9-slice image is wider than the 1px border: it paints over the padding */
  border: 1px solid transparent; border-image: url(/assets/ui/btn_primary.png) 52 56 62 56 fill / 26px 28px 31px stretch;
  text-shadow: 2px 0 0 var(--coral-dark), -2px 0 0 var(--coral-dark), 0 2px 0 var(--coral-dark), 0 -2px 0 var(--coral-dark), 0 3px 0 var(--coral-dark);
  line-height: 1;
}
.candy:hover { filter: brightness(1.05); color: #fff; }
.candy:active { border-image-source: url(/assets/ui/btn_primary_pressed.png); }
.candy svg { width: 22px; height: 22px; flex: none; }
.soon {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); border: 2px solid rgba(255, 255, 255, 0.2);
  font-weight: 600; font-size: 15px; color: #fff;
}
.soon img { width: 32px; height: 32px; }
.platforms { margin: 14px 0 0; color: var(--grey); font-size: 14px; letter-spacing: 0.02em; }
.store-badge { display: block; border-radius: 12px; transition: transform 0.15s ease, filter 0.15s ease; }
.store-badge img { display: block; height: 52px; width: auto; }
.store-badge:hover { transform: translateY(-2px); filter: brightness(1.15); }
.store-badge:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; }
.get-it { padding: 8px 0 72px; text-align: center; }
.get-it .icon { display: block; margin: 0 auto 18px; border-radius: 24px; box-shadow: 0 0 0 4px var(--ink), 0 10px 0 rgba(0, 0, 0, 0.25); }
.get-it .section-title { margin-bottom: 22px; }
.get-it .stores { justify-content: center; }
.hero-phone { justify-self: center; position: relative; width: min(300px, 78vw); }
.hero-phone .icon { position: absolute; left: -46px; top: 40px; width: 104px; height: 104px; border-radius: 26px; box-shadow: 0 0 0 5px var(--ink), 0 12px 0 rgba(0, 0, 0, 0.25); transform: rotate(-8deg); z-index: 2; }

.phone {
  display: block; padding: 8px; border-radius: 34px; background: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.phone img { display: block; width: 100%; border-radius: 27px; aspect-ratio: 360 / 760; object-fit: cover; background: var(--night2); }

/* ------------------------------------------------------------ sections */
section { padding: 56px 0; }
.section-title { font-size: clamp(28px, 4vw, 40px); text-align: center; margin-bottom: 28px; }
.section-lead { text-align: center; color: #DAD4F4; max-width: 38em; margin: -12px auto 28px; }

.strip { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--gutter) 22px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: thin; }
.strip .phone { flex: 0 0 min(220px, 62vw); scroll-snap-align: center; }
@media (min-width: 1100px) { .strip { justify-content: center; overflow: visible; } }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  color: var(--ink); padding: 22px 24px 32px;
  border: 1px solid transparent; border-image: url(/assets/ui/panel_cream.png) 68 68 84 68 fill / 34px 34px 42px stretch;
}
.card img { width: 56px; height: 56px; display: block; margin-bottom: 8px; }
.card h3 { font-size: 22px; color: var(--ink); margin-bottom: 6px; }
.card p { margin: 0; color: #4B476D; font-size: 15.5px; line-height: 1.55; }

.editions .cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.postcard { position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: var(--night2); box-shadow: 0 0 0 3px var(--ink), 0 8px 0 rgba(0, 0, 0, 0.25); aspect-ratio: 2.3; }
.postcard img { display: block; width: 100%; height: 100%; object-fit: cover; }
.postcard figcaption { position: absolute; left: 10px; right: 10px; bottom: 8px; line-height: 1.2; }
.postcard strong { display: block; font-family: var(--display); font-weight: var(--display-weight, 700); font-size: 19px; }
.postcard span { display: block; font-size: 12.5px; color: #F4F0FF; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.faq .list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 700; font-size: 17px; display: flex; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-left: auto; font: 700 24px/1 var(--display); color: var(--butter); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 18px; color: #DAD4F4; }

/* ------------------------------------------------------------ footer */
footer { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 28px 0 40px; color: var(--grey); font-size: 14px; }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
footer .links a { color: #fff; text-decoration: none; }
footer .links a:hover { text-decoration: underline; }
footer p { margin: 4px 0; }

/* ------------------------------------------------------------ documents */
.doc { padding: 36px 0 56px; }
.paper {
  max-width: 820px; margin: 0 auto; color: var(--ink); background: var(--cream); overflow-wrap: break-word;
  border-radius: 28px; padding: 40px clamp(20px, 5vw, 56px) 48px;
  box-shadow: 0 0 0 4px var(--ink), 0 10px 0 rgba(0, 0, 0, 0.25);
  font-size: 16px; line-height: 1.7;
}
.paper h1 { font-size: clamp(26px, 4.6vw, 42px); color: var(--ink); margin-bottom: 6px; }
.paper .effective { color: var(--text-dim); margin: 0 0 24px; font-size: 14.5px; }
.paper h2 { font-size: 22px; color: var(--ink); margin: 34px 0 10px; padding-top: 6px; }
.paper h3 { font-size: 18px; color: var(--ink); margin: 22px 0 8px; }
.paper p, .paper ul { margin: 0 0 14px; }
.paper ul { padding-left: 1.3em; }
.paper li { margin: 4px 0; }
.paper li::marker { color: var(--coral); }
.paper a { color: #B8264A; word-break: break-all; }
.paper strong { color: var(--ink); }
.table { overflow-x: auto; margin: 0 0 16px; border-radius: 14px; box-shadow: 0 0 0 2px var(--cream2); }
.paper table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.55; min-width: 520px; }
.paper th, .paper td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--cream2); }
.paper th { background: var(--cream2); font-weight: 700; }
.paper tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------ chooser (/, /privacy/, /terms/) */
.chooser { min-height: 100vh; display: grid; place-items: center; padding: 40px var(--gutter); background: var(--night) url(/assets/img/bg_lobby.webp) center / cover; }
.chooser .box { width: 100%; max-width: 520px; text-align: center; }
.chooser .logo { width: min(360px, 90%); margin: 0 auto 18px; display: block; }
.chooser h1 { font-size: 22px; font-family: var(--body); font-weight: 600; color: #EDE8FF; margin-bottom: 18px; }
.chooser ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chooser a { display: block; padding: 12px; border-radius: 16px; background: var(--cream); color: var(--ink); text-decoration: none; font-weight: 700; box-shadow: 0 0 0 3px var(--ink), 0 5px 0 var(--ink); }
.chooser a:hover { background: #fff; }

/* ------------------------------------------------------------ in the app (?app=1): no chrome */
.in-app .top, .in-app footer, .in-app .stores, .in-app .platforms, .in-app .get-it { display: none; }
.in-app body, body.in-app { background: var(--night); }
.in-app .doc { padding: 0; }
.in-app .doc .wrap { padding: 0; }
.in-app .paper { border-radius: 0; box-shadow: none; max-width: none; padding: 20px 18px 36px; }
.in-app .paper h1 { display: none; } /* the app's title plate already names the page */
.in-app.doc-page body { background: var(--cream); }

/* ------------------------------------------------------------ small screens */
@media (max-width: 400px) { .store-badge img { height: 46px; } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 32px; text-align: center; }
  .hero .logo { margin: 0 auto 14px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .stores { justify-content: center; }
  .hero-phone .icon { left: -30px; width: 84px; height: 84px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .editions .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .top nav > a { display: none; }
  .home-page .brand span { display: none; } /* the hero logo right below names the game */
  .grid { grid-template-columns: 1fr; }
  .editions .cards { gap: 12px; }
  .postcard strong { font-size: 16px; }
  .postcard span { display: none; }
  .langs ul { width: 250px; }
  .hero h1 { font-size: 34px; }
  .hero .lead { font-size: 16.5px; }
  section { padding: 40px 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .strip { scroll-behavior: smooth; }
}
