/* =========================
   플듀 게임 공용 시작 화면 (진단소 스타일) — 2026-11-15
   글꼴: Galmuri11(OFL, assets/clinic/fonts) · 버튼: Kenney Pixel UI Pack(CC0, assets/clinic/ui) · 장면: js/common/px-art.js
   쓰는 법: <body class="px-body"> + .px-hero(캔버스+제목) + .px-actions(.pbtn) — 게임 화면은 각 게임 CSS 그대로
   ========================= */
@font-face { font-family: Galmuri11; font-weight: 400; font-display: swap; src: url("./assets/clinic/fonts/Galmuri11.woff2") format("woff2"); }
@font-face { font-family: Galmuri11; font-weight: 700; font-display: swap; src: url("./assets/clinic/fonts/Galmuri11-Bold.woff2") format("woff2"); }
:root {
  --px-ink: #231a2b; --px-night: #1d1626; --px-night2: #2b2236; --px-cream: #fff7e8; --px-mint: #5ec8b0; --px-yellow: #f2c230;
  --px-red: #e8463c; --px-blue: #3c7ce8; --px-green: #2fae58; --px-purple: #8b6fd1; --px-muted: #a99fb5;
  --px-font: Galmuri11, "Malgun Gothic", system-ui, sans-serif;
}
body.px-body {
  background-color: var(--px-night);
  background-image: linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%), linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%);
  background-size: 48px 48px; background-position: 0 0, 24px 24px; background-attachment: fixed;
}
.px-font, .px-hero, .px-actions, .px-panel, .pbtn { font-family: var(--px-font); }

/* ---------- 장면 배너 ---------- */
.px-hero { position: relative; width: 100%; max-width: 1040px; margin: 0 auto; aspect-ratio: 16 / 9; max-height: 440px; overflow: hidden; border: 4px solid var(--px-ink); box-shadow: 0 8px 0 rgba(0,0,0,.35); background: var(--px-night2); }
.px-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.px-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(29,22,38,.55) 0%, rgba(29,22,38,0) 38%, rgba(29,22,38,0) 70%, rgba(29,22,38,.45) 100%); }
.px-logo { position: absolute; left: 0; right: 0; top: 7%; z-index: 2; text-align: center; pointer-events: none; color: var(--px-cream);
  text-shadow: 0 3px 0 var(--px-ink), 3px 0 0 var(--px-ink), -3px 0 0 var(--px-ink), 0 -3px 0 var(--px-ink), 3px 3px 0 var(--px-ink), -3px 3px 0 var(--px-ink); }
.px-logo small { display: inline-block; font-size: 12px; letter-spacing: .2em; color: var(--px-mint); background: var(--px-ink); padding: 3px 10px; text-shadow: none; }
.px-logo h1 { margin: 10px 0 6px; font-size: clamp(30px, 6.6vw, 58px); line-height: 1.1; font-weight: 700; letter-spacing: .02em; }
.px-logo h1 span { color: var(--px-yellow); }
.px-logo p { margin: 0; font-size: clamp(13px, 2.3vw, 18px); }
.px-logo p b { color: var(--px-mint); font-weight: 700; }

/* ---------- 버튼 (Kenney 9-slice) ---------- */
.pbtn {
  --img: url("./assets/clinic/ui/grey.png"); --img-p: url("./assets/clinic/ui/grey_pressed.png"); --tc: var(--px-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex-direction: column;
  min-height: 48px; padding: 6px 18px 10px; color: var(--tc); font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2;
  border: 12px solid transparent; border-image: var(--img) 12 fill / 12px stretch; image-rendering: pixelated; background: none;
  transition: transform .08s, filter .08s; user-select: none; -webkit-user-select: none; touch-action: manipulation; box-sizing: border-box;
}
.pbtn small { font-size: 12px; font-weight: 400; opacity: .88; }
.pbtn:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
.pbtn:active:not(:disabled) { border-image-source: var(--img-p); transform: translateY(2px); }
.pbtn:disabled { filter: grayscale(.8) brightness(.8); cursor: not-allowed; }
.pbtn:focus-visible { outline: 3px solid var(--px-yellow); outline-offset: 2px; }
.pbtn.green { --img: url("./assets/clinic/ui/green.png"); --img-p: url("./assets/clinic/ui/green_pressed.png"); --tc: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.pbtn.blue { --img: url("./assets/clinic/ui/blue.png"); --img-p: url("./assets/clinic/ui/blue_pressed.png"); --tc: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.pbtn.yellow { --img: url("./assets/clinic/ui/yellow.png"); --img-p: url("./assets/clinic/ui/yellow_pressed.png"); }
.pbtn.red { --img: url("./assets/clinic/ui/red.png"); --img-p: url("./assets/clinic/ui/red_pressed.png"); --tc: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.pbtn.ghost { border: 3px solid rgba(255,247,232,.35); border-image: none; color: var(--px-cream); padding: 6px 14px; min-height: 42px; }
.pbtn.big { min-height: 68px; font-size: 20px; }
.pbtn.sm { min-height: 36px; font-size: 13px; padding: 3px 10px 6px; }

/* ---------- 시작 화면 묶음 ---------- */
.px-start { max-width: 1040px; margin: 0 auto; padding: 0 0 28px; }
.px-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 720px; margin: 22px auto 0; padding: 0 16px; }
.px-actions .wide { grid-column: 1 / -1; }
.px-row { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; max-width: 720px; margin: 16px auto 0; padding: 0 16px; color: var(--px-cream); font-family: var(--px-font); }
.px-input { font-family: var(--px-font); font-size: 16px; background: var(--px-cream); color: var(--px-ink); border: 0; box-shadow: 0 0 0 3px var(--px-ink), inset 0 3px 0 rgba(0,0,0,.12); padding: 10px 12px; min-width: 0; border-radius: 0; }
.px-panel { background: var(--px-cream); color: var(--px-ink); padding: 16px 18px; margin: 18px auto 0; max-width: 720px; box-shadow: 0 0 0 4px var(--px-ink), 0 8px 0 4px rgba(0,0,0,.3); position: relative; box-sizing: border-box; }
.px-panel h3 { margin: 0 0 10px; font-size: 18px; }
.px-panel ul { margin: 0; padding-left: 18px; line-height: 1.75; font-size: 14px; }
.px-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.px-seg button { font-family: var(--px-font); font-size: 14px; font-weight: 700; padding: 8px 12px; background: var(--px-night2); color: var(--px-cream); border: 0; box-shadow: 0 0 0 3px var(--px-ink); cursor: pointer; }
.px-seg button.on { background: var(--px-yellow); color: var(--px-ink); }
.px-tag { display: inline-block; font-family: var(--px-font); font-size: 12px; padding: 3px 8px; background: var(--px-ink); color: var(--px-mint); }
.px-muted { color: var(--px-muted); font-size: 13px; }
@media (max-width: 640px) {
  .px-hero { aspect-ratio: 4 / 3; border-left: 0; border-right: 0; }
  .px-actions { grid-template-columns: 1fr; gap: 10px; }
  .pbtn.big { min-height: 60px; font-size: 18px; }
}

/* ---------- 기존 시작 화면 덮어쓰기 (js/common/px-intro.js) ---------- */
.px-hide { display: none !important; }
.px-clear { background: transparent !important; background-image: none !important; }
.px-hero-intro { margin: 0 auto 4px; width: min(1040px, 100%); }
.px-skin { background: none !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; max-width: 720px !important; margin-left: auto; margin-right: auto; font-family: var(--px-font); color: var(--px-cream); }
.px-skin::before, .px-skin::after { display: none !important; }
.px-skin .pbtn, .px-skin a.pbtn { background: none !important; box-shadow: none !important; border-radius: 0 !important; font-family: var(--px-font) !important; width: 100%; max-width: 520px; margin: 8px auto 0 !important; display: flex !important; text-decoration: none !important; letter-spacing: 0; animation: none !important; filter: none; }
.px-skin .pbtn.green, .px-skin .pbtn.blue, .px-skin .pbtn.red { color: #fff !important; }
.px-skin .pbtn.yellow, .px-skin .pbtn.grey-px { color: var(--px-ink) !important; text-shadow: none !important; }
.px-skin .pbtn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.px-skin .px-input { width: 100%; max-width: 520px; margin: 8px auto 0; display: block; border-radius: 0 !important; background: var(--px-cream) !important; color: var(--px-ink) !important; border: 0 !important; box-shadow: 0 0 0 3px var(--px-ink), inset 0 3px 0 rgba(0,0,0,.12) !important; font-family: var(--px-font) !important; }
.px-skin .px-seg { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px auto 4px; background: none !important; border: 0 !important; box-shadow: none !important; }
.px-skin .px-seg button { font-family: var(--px-font) !important; border-radius: 0 !important; border: 0 !important; background: var(--px-night2) !important; color: var(--px-cream) !important; box-shadow: 0 0 0 3px var(--px-ink) !important; padding: 8px 12px; }
.px-skin .px-seg button.active, .px-skin .px-seg button.on, .px-skin .px-seg button[aria-pressed="true"] { background: var(--px-yellow) !important; color: var(--px-ink) !important; }
.px-dpanel { background: var(--px-night2) !important; border: 0 !important; border-radius: 0 !important; box-shadow: 0 0 0 3px var(--px-ink), 0 6px 0 3px rgba(0,0,0,.3) !important; backdrop-filter: none !important; color: var(--px-cream); font-family: var(--px-font); }
.px-skin .px-dpanel { margin-top: 18px; }
@media (max-width: 640px) { .px-hero-intro { aspect-ratio: 4 / 3; } }
/* 페이지 자체 버튼 스타일(아이디 선택자·그라데이션 글자)보다 우선 */
.px-skin .pbtn, .px-skin a.pbtn { border: 12px solid transparent !important; border-image: var(--img) 12 fill / 12px stretch !important; -webkit-text-fill-color: currentColor !important; background-clip: border-box !important; -webkit-background-clip: border-box !important; padding: 6px 18px 10px !important; min-height: 50px; height: auto !important; line-height: 1.25 !important; outline: none; }
.px-skin .pbtn.big { min-height: 64px; font-size: 19px !important; }
.px-skin .pbtn:active { border-image-source: var(--img-p) !important; }
.px-skin .pbtn.grey-px { --img: url("./assets/clinic/ui/grey.png"); --img-p: url("./assets/clinic/ui/grey_pressed.png"); }
.px-skin .pbtn * { -webkit-text-fill-color: currentColor !important; }
