/* Base look for 漫畫店大亨: warm lamp-lit wooden comic shop, pixel UI. Modules add their own CSS in their own files or injected <style>. */
:root {
  --ink: #3b2a2f;        /* outlines, dark text */
  --wood: #8a5a3b;       /* wood frame */
  --wood-d: #5e3b27;
  --wood-l: #c08a5a;
  --cream: #f6ecd6;      /* panel face */
  --cream-d: #e6d5b4;
  --lamp: #ffd36b;       /* warm lamp yellow: primary buttons, highlights */
  --lamp-d: #e0a83e;
  --teal: #3fa7a0;       /* accent */
  --rose: #e2777a;       /* warnings / hearts */
  --violet: #5a4a6a;     /* shadows */
  --ok: #6fbf73;
  --r-n: #9aa3ad; --r-r: #4f9de0; --r-sr: #b36ee0; --r-ur: #f2b632;  /* rarity colours */
  --font-pixel: "Trebuchet MS", sans-serif;   /* replaced at boot by SozoFonts.stack("pixel") */
  --font-body: "Trebuchet MS", sans-serif;    /* replaced at boot by SozoFonts.stack("rounded") */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2a1f24; touch-action: none; user-select: none; -webkit-user-select: none; }
#stage { position: fixed; inset: 0; overflow: hidden; background: #2a1f24; font-family: var(--font-body); color: var(--ink); }
#scene-host { position: absolute; inset: 0; }
#hud, #bubbles, #modals { position: absolute; inset: 0; pointer-events: none; }
#hud > *, #modals > * { pointer-events: auto; }
#bubbles { overflow: hidden; }

/* Text with pixel outline */
.px-title { font-family: var(--font-pixel); color: var(--cream); text-shadow: 2px 0 var(--ink), -2px 0 var(--ink), 0 2px var(--ink), 0 -2px var(--ink), 2px 2px var(--ink), -2px 2px var(--ink), 2px -2px var(--ink), -2px -2px var(--ink), 0 4px var(--violet); }
.px-num { font-family: var(--font-pixel); font-size: 18px; color: var(--cream); text-shadow: 2px 0 var(--ink), -2px 0 var(--ink), 0 2px var(--ink), 0 -2px var(--ink), 2px 2px var(--ink), -2px -2px var(--ink), 2px -2px var(--ink), -2px 2px var(--ink); }

/* Panel: cream face, wood frame, hard pixel shadow */
.panel { background: var(--cream); border: 3px solid var(--ink); border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--wood-l), inset 0 0 0 5px var(--wood), 0 5px 0 var(--violet); padding: 14px; color: var(--ink); }
.panel h2 { font-family: var(--font-pixel); font-size: 24px; margin: 0 0 8px; color: var(--wood-d); font-weight: 400; }

/* Buttons: min 44×44, squash on press */
.btn { font-family: var(--font-body); font-size: 15px; min-width: 44px; min-height: 44px; padding: 6px 12px; border: 3px solid var(--ink); border-radius: 6px;
  background: var(--cream-d); color: var(--ink); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15), 0 3px 0 var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform .08s, filter .12s; line-height: 1.15; }
.btn:hover, .btn.focus { filter: brightness(1.08); transform: translateY(-1px) scale(1.03); outline: 3px solid var(--teal); outline-offset: 1px; }
.btn:active { transform: translateY(2px) scale(.96); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15), 0 1px 0 var(--ink); }
.btn.primary { background: var(--lamp); }
.btn.teal { background: var(--teal); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.btn.danger { background: var(--rose); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.btn.disabled, .btn[disabled] { filter: grayscale(.8) brightness(.9); opacity: .7; cursor: default; }
.btn .ico { font-family: var(--font-pixel); font-size: 18px; }

/* Modal layer: dim backdrop + centred panel that pops in */
.modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(42, 31, 36, .45); }
.modal > .panel { max-width: min(92vw, 760px); max-height: 90vh; overflow: auto; animation: pop .22s cubic-bezier(.3,1.6,.6,1); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .75; } }
.rarity { display: inline-block; font-family: var(--font-pixel); font-size: 12px; padding: 1px 5px; border: 2px solid var(--ink); border-radius: 4px; color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.rarity.N { background: var(--r-n); } .rarity.R { background: var(--r-r); } .rarity.SR { background: var(--r-sr); } .rarity.UR { background: var(--r-ur); }
.coin-ico { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2a8 0 20%, #ffd36b 21% 60%, #e0a83e 61%); border: 2px solid var(--ink); vertical-align: -3px; }
body.modal-open #hud .hud-top, body.modal-open #hud .hud-clock, body.modal-open #hud .hud-dock, body.modal-open #hud .hud-hint { display: none !important; }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: var(--wood-l); border-radius: 4px; }
