/* =========================================================
   Subculture Community (SCC) — subculturecommunity.com
   ========================================================= */
:root {
  --ink: #141414;
  --ink-2: #2a2a2a;
  --paper: #F3EFE6;
  --paper-2: #E4DED2;
  --pink: #FF8FC7;
  --pink-l: #FFD6EA;
  --lime: #D8FF4F;
  --lilac: #C9B8FF;
  --mint: #A8EFD0;
  --sky: #9FD8FF;
  --red: #FF5A4E;
  --grid: rgba(243, 239, 230, .5);
  --win-grad: linear-gradient(180deg, #FFD0E8 0%, #E3D9FF 45%, #C9F3E0 100%);
  --shadow: 6px 6px 0 var(--ink);
  --f-serif: "Fraunces", Georgia, serif;
  --f-sans: "Poppins", system-ui, sans-serif;
  --f-lcd: "VT323", ui-monospace, monospace;
  --f-mono: "Rubik Mono One", "Poppins", sans-serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #E9E5DC;
  color: var(--ink);
  font-family: var(--f-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* SVG text helpers */
.t-pop  { font-family: var(--f-sans); fill: var(--ink); }
.t-serif{ font-family: var(--f-serif); fill: var(--ink); }
.t-lcd  { font-family: var(--f-lcd); fill: var(--ink); }
.t-mono { font-family: var(--f-mono); }
.t-hand { font-family: var(--f-hand); fill: var(--ink); font-weight: 600; }

/* =================== WORLD / STAGE =================== */
.world {
  position: fixed; inset: 0;
  overflow: hidden;
  cursor: default;
  touch-action: pan-x;
}
.world.pan { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; }
.world.pan::-webkit-scrollbar { display: none; }
.world.dragging { cursor: grabbing; }
.pan-spacer { height: 1px; }

.stage {
  position: absolute; left: 0; top: 0;
  width: 1600px; height: 900px;
  transform-origin: 0 0;
}
.wall {
  position: absolute; left: -1600px; top: -920px; width: 4800px; height: 1520px;
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
}
.floor-wrap {
  position: absolute; left: -1600px; top: 600px; width: 4800px; height: 1400px;
  overflow: hidden; perspective: 420px; perspective-origin: 50% 0;
  background: var(--ink);
}
.floor-plane {
  position: absolute; left: 0; top: 0; width: 100%; height: 3000px;
  transform-origin: 50% 0; transform: rotateX(62deg);
  /* same 40px grid + same origin (x = -1600 in stage units) as .wall, so every
     wall column continues into a floor line exactly at the horizon */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 0 0;
}
.horizon {
  position: absolute; left: -1600px; top: 599px; width: 4800px; height: 2px;
  background: rgba(243,239,230,.8);
}

/* parallax layers */
.stage .obj, .stage .deco { will-change: transform; }

.deco { position: absolute; pointer-events: none; }
.deco.tw  { animation: twinkle 3.4s ease-in-out infinite; }
.deco.tw2 { animation: twinkle 4.2s ease-in-out infinite .8s; }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); } 50% { transform: scale(.7) rotate(25deg); } }

/* =================== OBJECTS =================== */
.obj {
  position: absolute; display: block;
  padding: 0; margin: 0; border: 0; background: none;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), filter .25s;
  transform-origin: 50% 100%;
  -webkit-tap-highlight-color: transparent;
}
.obj svg { display: block; width: 100%; height: auto; overflow: visible; }
.obj:focus-visible { transform: translateY(-8px) scale(1.04) rotate(-1deg); filter: drop-shadow(0 0 14px rgba(216,255,79,.45)); }
@media (hover: hover) {
  .obj:hover { transform: translateY(-8px) scale(1.04) rotate(-1deg); filter: drop-shadow(0 0 14px rgba(216,255,79,.45)); }
}
.obj:focus-visible { outline: 3px dashed var(--lime); outline-offset: 6px; }
.obj:active { transform: translateY(-2px) scale(.98); }

.obj.swing { transform-origin: 50% 0; }
.obj.swing:focus-visible { transform: none; animation: swing 1.4s ease-in-out infinite; }
@media (hover: hover) { .obj.swing:hover { transform: none; animation: swing 1.4s ease-in-out infinite; } }
@keyframes swing { 0%,100% { transform: rotate(0); } 25% { transform: rotate(4deg); } 75% { transform: rotate(-4deg); } }

.obj .crank { transform-origin: 86px 236px; transition: transform .6s cubic-bezier(.34,1.56,.64,1); }
.obj:hover .crank, .obj.popped .crank { transform: rotate(180deg); }
.obj .cap { transition: transform .12s; transform-origin: 75px 80px; }
.obj:hover .cap { transform: scale(.88); }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }

.obj.popped { animation: pop .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop { 40% { transform: scale(1.12) rotate(2deg); } }

/* hover tag following cursor */
.hover-tag {
  position: fixed; left: 0; top: 0; z-index: 30;
  pointer-events: none;
  font-family: var(--f-lcd); font-size: 22px; line-height: 1;
  padding: 6px 10px 5px;
  background: var(--lime); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink);
  opacity: 0; transform: translate(-50%, -50%) scale(.8);
  transition: opacity .15s, transform .15s;
  white-space: nowrap;
}
.hover-tag.on { opacity: 1; transform: translate(14px, 14px) scale(1); }
.hover-tag::before { content: "[ "; }
.hover-tag::after  { content: " ]"; }

/* =================== CHROME =================== */
.menu-btn {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 25;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 22px 10px 16px;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink), 0 0 0 2px var(--paper);
  font-family: var(--f-sans); font-weight: 800; font-size: 14px; letter-spacing: 1.5px;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.menu-btn:hover { transform: translateX(-50%) translateY(-2px); box-shadow: 6px 6px 0 var(--ink), 0 0 0 2px var(--paper); }
.menu-btn:active { transform: translateX(-50%) translateY(2px); box-shadow: 1px 1px 0 var(--ink), 0 0 0 2px var(--paper); }
.menu-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pink); border: 2px solid var(--ink); animation: dot 2s ease-in-out infinite; }
@keyframes dot { 50% { background: var(--lime); } }

.corner {
  position: fixed; bottom: 24px; z-index: 20;
  font-family: var(--f-lcd); font-size: 18px; color: var(--paper);
  letter-spacing: .5px; opacity: .8; pointer-events: none;
  text-shadow: 0 0 6px var(--ink);
}
.corner-l { left: 22px; }
.corner-r { right: 22px; }

.pan-hint {
  position: fixed; left: 50%; top: 18px; z-index: 20; transform: translateX(-50%);
  font-family: var(--f-lcd); font-size: 20px; color: var(--ink);
  background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 14px 2px;
  box-shadow: 3px 3px 0 var(--ink);
  display: none; pointer-events: none; white-space: nowrap;
  animation: nudge 1.6s ease-in-out infinite;
}
.pan .pan-hint, body.is-pan .pan-hint { display: block; }
body.is-pan.has-panned .pan-hint { opacity: 0; transition: opacity .4s; }
@keyframes nudge { 50% { transform: translateX(calc(-50% + 6px)); } }

/* =================== INTRO =================== */
.intro {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: var(--paper);
  transition: opacity .5s .2s, visibility 0s .7s;
}
.intro.done { opacity: 0; visibility: hidden; }
.intro-mark { display: grid; justify-items: center; gap: 10px; }
.intro-logo { font-family: var(--f-mono); font-size: clamp(64px, 14vw, 140px); line-height: 1; color: var(--ink); text-shadow: 6px 6px 0 var(--pink); }
.intro-sub { font-family: var(--f-lcd); font-size: 26px; letter-spacing: 3px; text-transform: uppercase; }
.intro-bar { width: 220px; height: 16px; border: 2.5px solid var(--ink); border-radius: 4px; padding: 2px; background: #fff; }
.intro-bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--pink) 0 10px, var(--lilac) 10px 20px); animation: load 1.1s steps(11) forwards; }
@keyframes load { to { width: 100%; } }

.world.reveal {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M100 8c14 10 8 26 26 22s30 8 26 24 24 18 14 34 14 30-4 40-4 28-22 30-14 26-32 22-20 22-34 10-26-4-30-20-22-6-24-26-10-28 6-38-4-28 14-32 4-26 22-24 8-18 20-16z' fill='black'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M100 8c14 10 8 26 26 22s30 8 26 24 24 18 14 34 14 30-4 40-4 28-22 30-14 26-32 22-20 22-34 10-26-4-30-20-22-6-24-26-10-28 6-38-4-28 14-32 4-26 22-24 8-18 20-16z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: 0% 0%; mask-size: 0% 0%;
  animation: reveal 1.3s cubic-bezier(.7,0,.2,1) forwards;
}
@keyframes reveal {
  0%   { -webkit-mask-size: 0% 0%; mask-size: 0% 0%; }
  100% { -webkit-mask-size: 420vmax 420vmax; mask-size: 420vmax 420vmax; }
}

/* =================== WINDOWS =================== */
.backdrop {
  position: fixed; inset: 0; z-index: 35;
  background: rgba(20,20,20,.35);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s;
}
.backdrop.on { opacity: 1; visibility: visible; transition: opacity .2s; }

.win {
  position: fixed; z-index: 40;
  display: flex; flex-direction: column;
  background: var(--win-grad);
  border: 2.5px solid var(--ink); border-radius: 6px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
}
.win[hidden] { display: none; }
.win.opening { animation: winOpen .28s steps(5, end); }
@keyframes winOpen { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.win.front { z-index: 42; }

.win-menu { width: 340px; }
.win-detail { width: 540px; }

.win-bar {
  flex: none; display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 6px 0 12px;
  border-bottom: 2.5px solid var(--ink);
  background: linear-gradient(180deg, #C9F3E0, #B4EAD3);
  cursor: grab; user-select: none; touch-action: none;
}
.win-bar.dark { background: var(--ink); color: var(--paper); }
.win-title { flex: 1; min-width: 0; font-family: var(--f-serif); font-weight: 800; font-size: 17px; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-bar.dark .win-title { font-style: italic; font-weight: 500; font-size: 17px; letter-spacing: .5px; text-transform: uppercase; }
.win-ctrls { display: flex; gap: 2px; }
.wc {
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 0; background: none; cursor: pointer; border-radius: 4px;
  font-family: var(--f-sans); font-size: 16px; line-height: 1; font-weight: 600;
}
.wc:hover { background: rgba(0,0,0,.12); }
.win-bar.dark .wc:hover { background: rgba(255,255,255,.16); }
.wc-back { display: none; font-size: 24px; }
.win.min .win-body { display: none; }

.win-body { overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 18px; scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
.win.max { left: 50% !important; top: 20px !important; transform: translateX(-50%); width: min(980px, calc(100vw - 40px)); max-height: calc(100vh - 100px); }

/* menu list */
.includes { margin: 0 0 10px; text-align: center; font-weight: 600; font-size: 12.5px; letter-spacing: 1px; }
.menu-list { list-style: none; margin: 0; padding: 0; border: 2px solid var(--ink); background: var(--paper); }
.menu-list li + li { border-top: 2px solid var(--ink); }
.menu-list button {
  width: 100%; display: grid; grid-template-columns: 40px 1fr 18px; align-items: center;
  min-height: 38px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  font-family: var(--f-sans); font-size: 12.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
}
.menu-list .ico { display: grid; place-items: center; height: 100%; border-right: 2px solid var(--ink); }
.menu-list .ico svg { width: 22px; height: 22px; }
.menu-list .lbl { padding: 0 10px; }
.menu-list .arr { font-size: 11px; }
.menu-list button:hover { background: var(--pink-l); }
.menu-list button.active { background: var(--ink); color: var(--paper); }
.menu-list button.active .ico { border-color: var(--paper); }
.menu-list button.active .ico svg * { stroke: var(--paper); }
.menu-list .soon { font-family: var(--f-lcd); font-size: 15px; text-transform: none; background: var(--lime); color: var(--ink); padding: 0 5px; border: 1.5px solid var(--ink); border-radius: 3px; margin-left: 6px; letter-spacing: 0; }

.menu-actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }

/* buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border: 2.5px solid var(--ink); border-radius: 999px;
  background: var(--paper); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--f-sans); font-weight: 700; font-size: 13.5px; cursor: pointer; text-decoration: none; color: var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.pill:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.pill:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.pill-pink { background: var(--pink); }
.pill-lime { background: var(--lime); }
.pill-ink { background: var(--ink); color: var(--paper); }
.pill[disabled] { opacity: .55; cursor: not-allowed; }

/* =================== DETAIL CONTENT =================== */
.d h2 {
  margin: 6px 0 10px; text-align: center;
  font-family: var(--f-serif); font-weight: 600; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.12; letter-spacing: -.3px;
}
.d .lede { text-align: center; font-family: var(--f-serif); font-size: 16px; line-height: 1.55; margin: 0 auto 16px; max-width: 42ch; }
.d p { font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
.d h3 { font-family: var(--f-sans); font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 800; font-style: italic; text-align: center; margin: 18px 0 10px; }
.d ul.stars { list-style: none; padding: 0; margin: 0 auto 14px; max-width: 420px; }
.d ul.stars li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.5; margin: 6px 0; }
.d ul.stars li::before { content: "✦"; position: absolute; left: 0; top: 0; }
.d .center { text-align: center; }
.d .row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0 4px; }
.d .note { font-family: var(--f-lcd); font-size: 17px; line-height: 1.25; text-align: center; opacity: .8; margin: 12px 0 0; }
.d .card { background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 12px 14px; box-shadow: 3px 3px 0 var(--ink); }
.d .tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0 14px; }
.tag { display: inline-block; font-family: var(--f-lcd); font-size: 17px; line-height: 1; padding: 4px 8px 3px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); }
.tag.pink { background: var(--pink); } .tag.lime { background: var(--lime); } .tag.lilac { background: var(--lilac); } .tag.mint { background: var(--mint); } .tag.sky { background: var(--sky); }

.hero-art { display: grid; place-items: center; margin: 4px 0 14px; }
.hero-art svg { width: min(100%, 300px); height: auto; }

/* pinned notes grid (board) */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 10px 0 8px; }
.notes .n { position: relative; padding: 14px 10px 10px; border: 2px solid var(--ink); background: #fff; font-family: var(--f-hand); font-size: 22px; line-height: 1.05; box-shadow: 3px 3px 0 var(--ink); }
.notes .n small { display: block; font-family: var(--f-sans); font-size: 11.5px; line-height: 1.35; margin-top: 6px; }
.notes .n::before { content: ""; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--red); }
.notes .n:nth-child(3n+1) { transform: rotate(-1.5deg); background: #EFFFB8; }
.notes .n:nth-child(3n+2) { transform: rotate(1.2deg); background: var(--pink-l); }
.notes .n:nth-child(3n) { transform: rotate(-.5deg); background: #EEE8FF; }

/* rules (chat) */
.rules { counter-reset: r; list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.rules li::before { content: counter(r, decimal-leading-zero); font-family: var(--f-lcd); font-size: 24px; line-height: 1; }
.rules b { display: block; }

/* events */
.ev-list { display: grid; gap: 10px; margin: 6px 0 10px; }
.ev { display: grid; grid-template-columns: 86px 1fr; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); }
.ev-date { display: grid; place-content: center; text-align: center; background: var(--ink); color: var(--paper); font-family: var(--f-lcd); line-height: .95; padding: 8px 4px; }
.ev-date .dd { font-size: 30px; color: var(--lime); }
.ev-date .mm { font-size: 20px; letter-spacing: 1px; }
.ev-date .yy { font-size: 16px; opacity: .7; }
.ev-date .tba { font-size: 24px; color: var(--pink); }
.ev-main { padding: 10px 12px; min-width: 0; }
.ev-main h4 { margin: 0 0 2px; font-family: var(--f-serif); font-size: 18px; font-weight: 600; }
.ev-main .where { font-size: 12.5px; margin: 0 0 6px; opacity: .85; }
.ev-main .tags { justify-content: flex-start; margin: 0 0 6px; }
.ev-main a { font-size: 12.5px; font-weight: 700; }
.ev.past { opacity: .55; box-shadow: none; }
.ev.past .ev-date { background: #555; }
.ev-sub { font-family: var(--f-lcd); font-size: 19px; margin: 18px 0 6px; text-align: center; }

/* forms */
.form { display: grid; gap: 10px; margin: 8px 0 4px; }
.form label { display: grid; gap: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.form input, .form select, .form textarea {
  width: 100%; padding: 10px 12px; font: 500 14px var(--f-sans); color: var(--ink);
  background: #fff; border: 2px solid var(--ink); border-radius: 6px; outline: none;
}
.form textarea { min-height: 80px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { box-shadow: 0 0 0 3px var(--lime); }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { display: inline-block; position: relative; cursor: pointer; text-transform: none; letter-spacing: 0; }
.chips span { display: inline-block; font: 500 13px var(--f-sans); padding: 5px 10px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; transition: background .12s, transform .12s; }
.chips input:checked + span { background: var(--lime); transform: translateY(-1px); box-shadow: 2px 2px 0 var(--ink); }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px var(--pink); }
.form .submit-row { display: flex; justify-content: center; margin-top: 4px; }
.form-msg { text-align: center; font-family: var(--f-lcd); font-size: 19px; min-height: 1em; margin: 6px 0 0; }

/* atlas */
.atlas-top { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 4px 0 8px; }
.atlas-top input, .atlas-top select { padding: 10px 12px; font: 500 14px var(--f-sans); border: 2px solid var(--ink); border-radius: 6px; background: #fff; color: var(--ink); width: 100%; }
.atlas-top select { max-width: 200px; }
.atlas-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--f-lcd); font-size: 18px; }
.atlas-list { display: grid; gap: 8px; }
.sc { background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 10px 12px; }
.sc h4 { margin: 0; font-family: var(--f-serif); font-weight: 600; font-size: 17px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.sc .tag { font-size: 15px; padding: 3px 7px 2px; }
.sc .meta { font-family: var(--f-lcd); font-size: 16px; opacity: .75; margin: 2px 0 4px; }
.sc p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.sc mark { background: var(--lime); }
.atlas-more { display: flex; justify-content: center; margin: 12px 0 0; }
.empty { text-align: center; font-family: var(--f-lcd); font-size: 20px; padding: 18px 0; }

/* gacha */
.gacha-modes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 12px; }
.gacha-modes button { font: 600 12.5px var(--f-sans); padding: 5px 11px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; cursor: pointer; }
.gacha-modes button.on { background: var(--ink); color: var(--paper); }
.gacha-stage { display: grid; place-items: center; height: 150px; }
.capsule { width: 110px; height: 110px; overflow: visible; }
.capsule.shake { animation: shake .5s ease-in-out 2; }
.capsule.drop { animation: drop .45s cubic-bezier(.5,0,.75,0) reverse; }
.capsule .top { transition: transform .35s cubic-bezier(.34,1.56,.64,1); transform-box: view-box; transform-origin: 15px 55px; }
.capsule.open .top { transform: translate(-8px,-16px) rotate(-30deg); }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes drop { from { transform: translateY(0); } to { transform: translateY(-120px); opacity: 0; } }
.gacha-result { min-height: 120px; }
.gacha-result .sc { animation: rise .35s cubic-bezier(.34,1.56,.64,1); text-align: center; }
.gacha-result .sc h4 { justify-content: center; font-size: 22px; }
@keyframes rise { from { transform: translateY(14px) scale(.96); opacity: 0; } }

/* regions */
.regions { display: grid; gap: 8px; margin: 10px 0; }
.region { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 9px 12px; }
.region b { font-family: var(--f-serif); font-weight: 600; font-size: 16px; }
.region span { font-size: 12.5px; opacity: .8; }
.region.live { background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }

/* merch */
.merch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.merch-grid div { aspect-ratio: 1; display: grid; place-items: center; text-align: center; border: 2px dashed var(--ink); border-radius: 8px; background: rgba(255,255,255,.55); font-family: var(--f-lcd); font-size: 18px; padding: 6px; }
.merch-grid div span { display: block; font-size: 34px; }

.noscript { position: fixed; inset: auto 0 0 0; z-index: 99; background: var(--lime); padding: 12px; text-align: center; font-weight: 600; }

/* =================== RESPONSIVE =================== */
@media (max-width: 820px) {
  .corner { display: none; }
  .win { left: 10px !important; right: 10px !important; width: auto !important; top: 12px !important; transform: none !important;
         max-height: calc(100% - 92px); bottom: auto; }
  .win.max { left: 10px !important; right: 10px !important; }
  .wc-min, .wc-max { display: none; }
  .wc-back { display: grid; }
  body.menu-hidden-mobile .win-menu { display: none; }
  .win-bar { cursor: default; }
  .form .two { grid-template-columns: 1fr; }
  .atlas-top { grid-template-columns: 1fr; }
  .atlas-top select { max-width: none; }
  .merch-grid { grid-template-columns: repeat(2, 1fr); }
  .d .lede { font-size: 15px; }
  .hover-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .world.reveal { -webkit-mask: none; mask: none; }
}

/* decor extras */
.clock-l { font-size: 20px; color: var(--pink); text-shadow: 0 0 8px rgba(255,143,199,.6); }
.sway { transform-origin: 50% 0; animation: sway 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(1.5deg); } }
.vignette { position: fixed; inset: 0; z-index: 5; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.5) 100%); }
.merch-grid p { font-family: var(--f-lcd); font-size: 19px; line-height: 1.1; }

/* LED sign (clock + ticker) */
.obj.sign {
  width: 200px; padding: 8px 10px 7px;
  background: #0c0c0c; border: 3px solid var(--paper); border-radius: 8px;
  box-shadow: 0 0 0 3px var(--ink), 0 0 26px rgba(216,255,79,.22);
  font-family: var(--f-lcd); color: var(--lime); text-align: left;
  transform-origin: 50% 50%;
}
.sign-time { display: flex; align-items: baseline; gap: 10px; font-size: 42px; line-height: .9; letter-spacing: 2px; text-shadow: 0 0 8px rgba(216,255,79,.6); }
.sign-ticker { display: block; overflow: hidden; white-space: nowrap; margin-top: 6px; padding-top: 5px; border-top: 1.5px dashed rgba(243,239,230,.35); font-size: 18px; line-height: 1; color: var(--pink); text-shadow: 0 0 6px rgba(255,143,199,.6); }
.sign-track { display: inline-block; padding-left: 100%; animation: ticker 22s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* atlas picked card */
.sc.picked { background: #EFFFB8; box-shadow: 4px 4px 0 var(--ink); }
.atlas-tools { display: flex; gap: 6px; }
.mini { padding: 5px 12px !important; font-size: 12px !important; }

/* events extras */
.ev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.ev-actions a, .ev-actions button { font: 700 12.5px var(--f-sans); color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.countdown { display: inline-block; font-family: var(--f-lcd); font-size: 16px; line-height: 1; padding: 2px 7px 1px; margin-left: 6px; background: var(--ink); color: var(--lime); border-radius: 3px; vertical-align: 2px; }

/* member pass maker */
.pass-maker { display: grid; justify-items: center; gap: 10px; margin: 4px 0 14px; }
.pass-maker canvas { width: min(100%, 340px); height: auto; border-radius: 10px; filter: drop-shadow(5px 6px 0 rgba(20,20,20,.9)); transform: rotate(-2deg); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.pass-maker canvas:hover { transform: rotate(0) scale(1.02); }
.pass-maker .row { margin: 6px 0 0; }

/* toast */
.toast { position: fixed; left: 50%; top: 18px; z-index: 70; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  font-family: var(--f-lcd); font-size: 20px; background: var(--lime); border: 2px solid var(--ink); border-radius: 6px; padding: 6px 14px 4px; box-shadow: 3px 3px 0 var(--ink); transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.loading { text-align: center; font-family: var(--f-lcd); font-size: 22px; padding: 30px 0; }
.loading::after { content: "▌"; animation: blink 1s steps(1) infinite; }
.chrome { position: static; }
