/* Homemade Bubble Tea website. Colours, fonts, pills and panels follow style-guide/index.html and the game screens:
   soft rounded shapes, no outlines, lilac shadows, flavour-named colours. The deep flavours keep text readable. */
:root {
  color-scheme: light;
  --sky: #DDF4FF; --sky-top: #BFE9FD; --milk: #FFF9F0; --ink: #46323D; --ink-soft: #6F5A66;
  --taro: #BBA2F2; --taro-deep: #6241C4; --taro-dark: #442C94; --taro-pale: #EDE5FF;
  --matcha: #ADE083; --matcha-deep: #2E7D57; --matcha-pale: #E6F8D4;
  --straw: #FFA3BA; --straw-deep: #C93763; --straw-dark: #94234A; --straw-pale: #FFE3EA;
  --mango: #FFCF57; --mango-pale: #FFF0C9; --soda: #93DCF7; --soda-pale: #D6F2FB;
  --display: "Baloo 2", "Nunito", "Trebuchet MS", sans-serif;
  --body: "Nunito", "Trebuchet MS", sans-serif;
  --hand: "Mali", "Nunito", sans-serif;
  --bar: 72px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 16px); }
body { margin: 0; min-height: 100vh; background: linear-gradient(var(--sky-top), var(--sky) 420px) var(--sky); color: var(--ink); font: 600 17px/1.55 var(--body); display: flex; flex-direction: column; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
a { color: var(--taro-deep); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--taro-deep); outline-offset: 3px; border-radius: 12px; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: #fff; padding: 8px 16px; border-radius: 14px; font-weight: 800; }
.skip:focus { left: 16px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; height: var(--bar); background: rgba(255, 249, 240, .92); backdrop-filter: blur(8px); box-shadow: 0 4px 0 rgba(187, 162, 242, .55); }
.top .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--straw-deep); font: 800 22px/1 var(--display); white-space: nowrap; margin-right: auto; }
.brand img { width: 46px; height: 46px; }
.links { display: flex; gap: 6px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 16px; border-radius: 999px; color: var(--taro-deep); text-decoration: none; font: 800 19px/1 var(--display); }
.links a:hover { background: var(--taro-pale); }
.links a[aria-current="page"] { background: var(--taro-deep); color: #fff; box-shadow: 0 3px 0 var(--taro-dark); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 22px; border-radius: 18px; text-decoration: none;
  font: 800 20px/1.1 var(--display); color: #fff; background: var(--c, var(--taro-deep)); box-shadow: 0 5px 0 var(--d, var(--taro-dark)), inset 0 3px 0 rgba(255, 255, 255, .35);
  transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--d, var(--taro-dark)), inset 0 3px 0 rgba(255, 255, 255, .35); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--d, var(--taro-dark)), inset 0 3px 0 rgba(255, 255, 255, .35); }
.btn.pink { --c: var(--straw-deep); --d: var(--straw-dark); }
.btn.play::before { content: ""; width: 0; height: 0; border-left: .62em solid currentColor; border-top: .4em solid transparent; border-bottom: .4em solid transparent; border-radius: 3px; margin-left: 2px; }
.btn.big { font-size: 34px; padding: 10px 46px 12px 40px; border-radius: 26px; box-shadow: 0 7px 0 var(--d), inset 0 4px 0 rgba(255, 255, 255, .35); }
.btn.big:hover { box-shadow: 0 9px 0 var(--d), inset 0 4px 0 rgba(255, 255, 255, .35); }

/* ---------- panels: the game's white card with the strawberry awning on top ---------- */
.panel { position: relative; background: var(--milk); border-radius: 26px; box-shadow: 0 6px 0 var(--taro); overflow: hidden; }
.panel::before { content: ""; display: block; height: 14px; background: repeating-linear-gradient(90deg, var(--straw) 0 32px, #fff 32px 64px); }

/* ---------- the game logo, letter by letter as in the style guide ---------- */
.logo { font: 800 clamp(52px, 5.6vw, 72px)/.92 var(--display); letter-spacing: -.01em; display: flex; flex-wrap: wrap; column-gap: .24em; }
.logo .w { display: inline-flex; }
.logo i { font-style: normal; display: inline-block; color: var(--c); -webkit-text-stroke: .2em #fff; paint-order: stroke fill; filter: drop-shadow(0 .055em 0 #8F72DE); transform: translateY(var(--y)) rotate(var(--a)); }

/* ---------- labels ---------- */
.label { display: inline-flex; align-items: center; flex: none; font: 800 13px/1 var(--display); letter-spacing: .02em; padding: 5px 9px 4px; border-radius: 999px; color: #fff; background: var(--taro-deep); white-space: nowrap; }
.label.beta { background: var(--taro-deep); }
.label.event { background: var(--straw-deep); }
.label.balance { background: var(--matcha-deep); }
.label.maintenance { background: var(--mango); color: var(--ink); }
.date { font: 800 14px/1.2 var(--display); color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- HOME ---------- */
.home { overflow-x: hidden; }
.stage { position: relative; flex: 1; min-height: calc(100vh - var(--bar)); display: flex; }
/* The background: a looping gameplay clip on large screens, its first frame as a still everywhere else. */
.bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: linear-gradient(var(--sky-top), var(--sky) 62%, #E9F8E0); }
.bg video, .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 60%; }
.bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(221, 244, 255, .55), rgba(221, 244, 255, 0) 44%); pointer-events: none; }
.hero { position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: minmax(0, 460px); align-content: center; gap: 12px; padding-block: 14px 18px; }
.tagline { font: 600 21px/1.35 var(--hand); color: var(--taro-deep); max-width: 21em; }
.hero .cta { display: flex; align-items: center; gap: 14px; margin-block: 2px 8px; }
.hero .cta small { font: 700 15px/1.35 var(--body); color: var(--ink-soft); }
.hero-still { display: none; }

.news .head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 18px 6px; }
.news h2 { font: 800 24px/1.1 var(--display); color: var(--taro-deep); }
.news .head a { font: 800 16px var(--display); }
/* Exactly five rows show; the rest scroll inside the window with its own scroll bar. */
.news ol { --row: 48px; max-height: calc(var(--row) * 5 + 8px); overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px 10px; scrollbar-width: thin; scrollbar-color: var(--taro) var(--taro-pale); }
.news ol::-webkit-scrollbar { width: 10px; }
.news ol::-webkit-scrollbar-track { background: var(--taro-pale); border-radius: 999px; }
.news ol::-webkit-scrollbar-thumb { background: var(--taro); border-radius: 999px; }
.news li + li { border-top: 2px dashed var(--taro-pale); }
.news li a { display: grid; grid-template-columns: 52px auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 46px; padding: 6px 8px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.news li a:hover { background: #fff; }
.news li .h { font: 700 16px/1.25 var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news li a:hover .h { color: var(--taro-deep); }
.news .empty { padding: 12px 18px 16px; color: var(--ink-soft); }

/* ---------- inner pages ---------- */
main.page { flex: 1; padding-block: 36px 56px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: center; gap: 24px; margin-bottom: 28px; }
.intro h1 { font: 800 clamp(44px, 6vw, 64px)/1 var(--display); color: var(--straw-deep); }
.intro p { font: 600 20px/1.4 var(--hand); color: var(--taro-deep); margin-top: 8px; max-width: 30em; }
.intro img { width: 100%; }

.events { display: grid; gap: 28px; max-width: 860px; }
.event { scroll-margin-top: calc(var(--bar) + 16px); }
.event:target { box-shadow: 0 6px 0 var(--taro), 0 0 0 4px var(--mango); }
.event .in { padding: 18px 26px 24px; display: grid; gap: 10px; }
.event .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.event h2 { font: 800 clamp(28px, 3.4vw, 36px)/1.1 var(--display); color: var(--taro-deep); text-wrap: balance; }
.event .body { display: grid; gap: 10px; max-width: 64ch; }
.event .pic { background: radial-gradient(circle at 50% 60%, #fff, var(--straw-pale) 75%); border-radius: 20px; padding: 10px 10px 0; }
.event .pic img { margin-inline: auto; max-height: 260px; width: auto; }
.event .share { justify-self: start; font: 800 15px var(--display); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.event .share svg { width: 18px; height: 18px; }

.support { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.support .card .in { padding: 20px 26px 26px; display: grid; gap: 14px; }
.support h2 { font: 800 28px/1.1 var(--display); color: var(--taro-deep); }
.mail { justify-self: start; font-size: 22px; word-break: break-all; }
.tips { display: grid; gap: 8px; }
.tips li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start; }
.tips li::before { content: ""; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #FFF3BE 0 16%, var(--c, var(--mango)) 46%); box-shadow: inset 0 -3px 0 rgba(70, 50, 61, .14); }
.tips li:nth-child(2) { --c: var(--straw); } .tips li:nth-child(3) { --c: var(--matcha); } .tips li:nth-child(4) { --c: var(--soda); }
.note { font: 600 17px/1.4 var(--hand); color: var(--ink-soft); }

footer.foot { background: var(--taro-pale); color: var(--ink-soft); font: 700 15px/1.5 var(--body); padding-block: 18px; }
footer.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
footer.foot a { font-weight: 800; }
.home footer.foot { display: none; }

/* ---------- smaller screens: one column, the still becomes a picture ---------- */
@media (max-width: 960px) {
  .home footer.foot { display: block; }
  .stage { min-height: 0; }
  .bg { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding-block: 20px 36px; gap: 14px; }
  .hero .logo { justify-content: center; }
  .hero .cta { flex-direction: column; gap: 10px; }
  .hero-still { display: block; width: 100%; max-width: 640px; border-radius: 24px; box-shadow: 0 6px 0 var(--taro); }
  .news { width: 100%; max-width: 640px; text-align: left; }
  .intro { grid-template-columns: minmax(0, 1fr); }
  .intro img { max-width: 420px; }
  .support { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  :root { --bar: 112px; }
  .top .wrap { flex-wrap: wrap; align-content: center; row-gap: 6px; column-gap: 10px; }
  .brand { font-size: 19px; }
  .brand img { width: 40px; height: 40px; }
  .top .btn { min-height: 40px; padding: 6px 16px; font-size: 18px; }
  .links { order: 3; width: 100%; justify-content: space-between; }
  .links a { flex: 1; justify-content: center; padding-inline: 8px; font-size: 18px; min-height: 40px; }
  .logo { font-size: 50px; }
  .tagline { font-size: 19px; }
  .btn.big { font-size: 30px; width: 100%; max-width: 340px; }
  .news ol { --row: 56px; }
  .news li a { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 2px; column-gap: 8px; padding: 6px 6px; }
  .news li .date { grid-row: 1; }
  .news li .label { grid-row: 1; justify-self: start; }
  .news li .h { grid-column: 1 / -1; }
  .event .in { padding: 14px 18px 20px; }
  .intro img { max-width: 280px; margin-inline: auto; }
  main.page { padding-block: 24px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
