/* Starting look: warm grey page, white screen, ink text, one accent whose hue comes from the coin ticker. Geist for
   text, Geist Mono for small labels and numbers (local files, SIL OFL). Change the palette freely to fit the idea,
   dark or light, loud or calm: keep it finished and fresh. No inline styles in HTML (strict CSP): JS sets styles
   through the CSSOM only. */
@font-face { font-family: "Geist"; src: url("geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #f6f1f7; --panel: #fbf8fc; --white: #fff;
  --ink: #1d1626; --ink2: #4e4559; --muted: #7d7389; --faint: #b3aabd;
  --line: #e5dcea; --line2: #cfc3d7;
  --accent: #0f7c86; --accent-ink: #0b5f67; --accent-soft: rgba(15, 124, 134, .12);
  --ok: #0b8a4c;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --r: 16px; --rs: 10px; --maxw: 1080px; --gutter: clamp(16px, 3vw, 28px);
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); }
body { margin: 0; min-height: 100dvh; background: var(--bg); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.top, .hero, .stage, .log, .foot { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin: 0 auto; }
.top { display: flex; align-items: center; gap: 18px; padding: 18px 0; }
.wordmark { font: 700 20px/1 var(--sans); letter-spacing: -0.02em; }
.menu { display: flex; gap: 14px; margin-left: 6px; font: 500 14px/1 var(--sans); color: var(--ink2); }
.chip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font: 500 12px/1 var(--mono); color: var(--ink2); }
.mark { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; background: var(--white); }

.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(18px, 3vw, 32px); }
.hero-text { max-width: 640px; }
h1 { font: 700 clamp(34px, 6vw, 60px)/1.02 var(--sans); letter-spacing: -0.03em; }
.lead { margin-top: 16px; font-size: clamp(16px, 1.6vw, 19px); color: var(--ink2); max-width: 520px; }
.actions { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 15px/1 var(--sans); border: 0; cursor: pointer; }
.btn:hover { text-decoration: none; background: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line2); }
.live { display: inline-flex; align-items: center; gap: 7px; font: 500 12.5px/1 var(--mono); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(11, 138, 76, .14); }

.stage { padding: 8px 0 28px; }
.screen { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 30px 60px -30px rgba(18, 19, 23, .35); overflow: hidden; }
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line2); display: inline-block; }
.url { flex: 1; text-align: center; font: 500 12px/1 var(--mono); color: var(--muted); }
#app { min-height: 380px; padding: clamp(18px, 3vw, 36px); }
.soon { display: grid; place-content: center; text-align: center; min-height: 320px; gap: 8px; color: var(--ink2); }
.soon h2 { font: 600 24px/1.1 var(--sans); color: var(--ink); letter-spacing: -0.02em; }
.eyebrow { font: 500 12px/1 var(--mono); color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; }

.log { padding: 24px 0 40px; }
.log h2 { font: 600 18px/1.2 var(--sans); margin-bottom: 12px; letter-spacing: -0.01em; }
.log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.log li { display: flex; gap: 14px; align-items: baseline; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--rs); font-size: 15px; }
.when { font: 500 12px/1 var(--mono); color: var(--muted); white-space: nowrap; }

.foot { padding: 20px 0 48px; color: var(--muted); font-size: 13.5px; display: grid; gap: 10px; }
.ca { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--ink2); font: 500 12px/1.4 var(--mono); cursor: pointer; word-break: break-all; text-align: left; }
.ca:hover { border-color: var(--ink2); color: var(--ink); }
.ca code { font: inherit; }

/* tiles and small building blocks the product can use */
.tiles { display: grid; gap: 8px; }
.tile { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font: 700 20px/1 var(--mono); text-transform: uppercase; }
.tile.hit { background: var(--accent); color: #fff; border-color: transparent; }
.tile.near { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.tile.miss { background: var(--line); color: var(--muted); border-color: transparent; }

.wordmark b { color: var(--accent); }
.hero { display: grid; gap: 28px; align-items: center; }
.hero-img { width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); }
.page { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(20px, 5vw, 56px) 0 16px; display: grid; gap: 20px; }
.h1s { font: 700 clamp(30px, 5vw, 48px)/1.05 var(--sans); letter-spacing: -0.03em; }
.kit { display: grid; gap: 16px; align-items: start; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; align-content: start; justify-items: start; }
.card h2 { font: 600 18px/1.2 var(--sans); }
.card p { color: var(--ink2); }
.card .small { font: 500 12px/1.2 var(--mono); color: var(--muted); }
.card .btn { margin-top: 6px; }
.logo-img, .banner-img { width: 100%; height: auto; border-radius: var(--rs); }
.logo-img { max-width: 320px; }
.card.text p { max-width: 560px; font-size: 17px; }
.maker { display: grid; gap: 24px; }
.maker-side { display: grid; gap: 10px; align-content: start; }
.maker-side h2 { font: 700 28px/1.1 var(--sans); letter-spacing: -0.02em; }
.maker-side p { color: var(--ink2); }
.maker-coin { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-top: 6px; }
.maker-form { display: grid; gap: 12px; align-content: start; justify-items: start; }
.maker-form .field { display: grid; gap: 5px; width: 100%; }
.field span { font: 500 12px/1 var(--mono); color: var(--muted); }
.maker-form input, .maker-form select, .maker-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--rs); background: var(--panel); font: 400 15px/1.4 var(--sans); color: var(--ink); }
.maker-form textarea { resize: vertical; }
.maker-form input:focus, .maker-form select:focus, .maker-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.row2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; width: 100%; }
.maker > *, .maker-form > *, .row2 > * { min-width: 0; }
.maker-form input, .maker-form select { min-width: 0; }
/* chanpad */
.btn { background: var(--accent); }
.btn:hover { background: var(--accent-ink); }
.btn.ghost:hover { background: var(--accent-soft); }
.hero-text .eyebrow { margin-bottom: 14px; }
.hero-pic { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #b896b1; box-shadow: 0 30px 60px -34px rgba(29, 22, 38, .45); }
.hero-pic .hero-img { border: 0; border-radius: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1.2 var(--mono); color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.on { color: var(--accent-ink); }
.status.on::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.status.solo { white-space: normal; }
#app { min-height: 0; }
.soon { min-height: 200px; }
.maker-img { width: 100%; max-width: 300px; height: auto; border-radius: var(--rs); border: 1px solid var(--line); margin-top: 6px; }
.maker-form .btn { margin-top: 4px; }
.hint { font: 500 12px/1.4 var(--mono); color: var(--muted); }

.band { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 28px 0 8px; display: grid; gap: 16px; }
.band-head { display: grid; gap: 4px; }
.band-head h2 { font: 700 clamp(22px, 3vw, 30px)/1.1 var(--sans); letter-spacing: -0.02em; }
.band-head p { color: var(--ink2); }
#split { display: grid; gap: 10px; }
.split-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.split-row { display: grid; gap: 4px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.split-row b { font: 700 28px/1 var(--sans); color: var(--accent-ink); letter-spacing: -0.02em; }
.split-row span { color: var(--ink2); font-size: 14px; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gcard { display: grid; gap: 8px; padding: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); align-content: start; }
.gcard:hover { text-decoration: none; border-color: var(--accent); }
.gimg { aspect-ratio: 1 / 1; border-radius: var(--rs); overflow: hidden; background: var(--panel); }
.gimg img { width: 100%; height: 100%; object-fit: cover; }
.gmeta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; min-width: 0; }
.gmeta b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmeta span, .gcap { font: 500 12px/1.2 var(--mono); color: var(--muted); }
.gcap { color: var(--accent-ink); }
.empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--white); border: 1px dashed var(--line2); border-radius: var(--r); color: var(--ink2); }
.empty-img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }

.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.big { font: 700 20px/1.15 var(--sans); color: var(--accent-ink); letter-spacing: -0.01em; }
.page > .band-head { margin-top: 12px; }

@media (min-width: 800px) {
  .split-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rules { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bar .url { text-align: left; }
  .rules { grid-template-columns: 1fr; }
}
.cardmaker { display: grid; gap: 24px; align-items: start; }
.cardmaker > * { min-width: 0; }
.cardview canvas { display: block; width: 100%; max-width: 480px; height: auto; aspect-ratio: 4 / 5; border-radius: var(--r); border: 1px solid var(--line); box-shadow: 0 30px 60px -34px rgba(29, 22, 38, .45); }
@media (min-width: 800px) { .cardmaker { grid-template-columns: 1fr 1fr; } }
.stickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sticker { --tint: #f3dcec; display: grid; gap: 8px; justify-items: start; align-content: start; padding: 10px; background: var(--white); border: 3px solid var(--white); border-radius: 22px; box-shadow: 0 0 0 1px var(--line2), 0 14px 28px -18px rgba(29, 22, 38, .5); }
.sticker:hover { text-decoration: none; transform: rotate(-1.5deg); }
.sticker .pic { display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--tint); }
.sticker .pic img { width: 100%; height: 100%; object-fit: cover; }
.sticker .pos-top { object-position: 50% 15%; }
.sticker .pos-left { object-position: 20% 50%; }
.sticker .pos-bottom { object-position: 50% 85%; }
.sticker .cap { font: 700 17px/1.15 var(--sans); letter-spacing: -0.01em; }
.sticker .mood { font: 500 12px/1 var(--mono); color: var(--accent-ink); padding: 4px 8px; border-radius: 999px; background: var(--tint); }
.mood-a { --tint: #fde2ee; } .mood-b { --tint: #dff1f3; } .mood-c { --tint: #efe3fb; }
.mood-d { --tint: #fdf0d5; } .mood-e { --tint: #e2f3e6; } .mood-f { --tint: #fbe0dc; }
@media (min-width: 800px) { .stickers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.memes { display: grid; grid-template-columns: 1fr; gap: 14px; }
.meme { display: grid; gap: 10px; align-content: start; padding: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.mpic { position: relative; aspect-ratio: 1 / 1; border-radius: var(--rs); overflow: hidden; background: var(--panel); }
.mpic img { width: 100%; height: 100%; object-fit: cover; }
.mpic .pos-top { object-position: 50% 15%; }
.mpic .pos-left { object-position: 20% 50%; }
.mpic .pos-bottom { object-position: 50% 85%; }
.mtop, .mbot { position: absolute; left: 8px; right: 8px; text-align: center; color: #fff; font: 800 clamp(20px, 5vw, 26px)/1.05 var(--sans); text-transform: uppercase; letter-spacing: -0.01em; text-shadow: 0 2px 0 #1d1626, 0 0 8px #1d1626, 2px 0 0 #1d1626, -2px 0 0 #1d1626; }
.mtop { top: 10px; } .mbot { bottom: 10px; }
.mtext { color: var(--ink2); }
.mrow { display: flex; gap: 8px; flex-wrap: wrap; }
.mrow .btn { padding: 9px 14px; font-size: 14px; }
@media (min-width: 560px) { .memes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .memes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.sheet .card { width: 100%; box-sizing: border-box; }
.sheet .wide { grid-column: 1 / -1; }
.sheet-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; display: block; }
.sheet .banner-img { width: 100%; height: auto; border-radius: 10px; display: block; }
@media (min-width: 800px) {
  .sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1.1fr 1fr; }
  .kit { grid-template-columns: 1fr 2fr; }
  .maker { grid-template-columns: 1fr 1.3fr; }
}
@media (max-width: 640px) {
  .menu { display: none; }
  #app { min-height: 300px; }
  .tile { width: 44px; height: 44px; font-size: 17px; }
}