/* 사부작 게임즈 · games.sabujakworks.com (사부작 웍스 리뉴얼 색과 서체를 따른다) */
@font-face{font-family:Jua;src:url("fonts/Jua-Regular.woff2") format("woff2");font-display:swap}
:root{--paper:#f7f5ed;--ink:#263e34;--card:#fffdf6;--line:#dcded2;--muted:#647268;--green:#315b46;--deep:#294638;--orange:#dc704c;--orange-text:#a9462a;--sky:#dfeaf3;--pink:#f6dfe0;--radius:18px;color-scheme:light}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.7 system-ui,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;word-break:keep-all;overflow-wrap:anywhere}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
h1,h2,h3{font-family:Jua,system-ui,sans-serif;font-weight:400;letter-spacing:-.03em;line-height:1.2}
.wrap{width:min(1180px,calc(100% - 64px));margin-inline:auto}
:focus-visible{outline:3px solid var(--orange);outline-offset:3px;border-radius:6px}

/* header / footer */
.top{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:84px;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;font:24px/1 Jua,sans-serif;letter-spacing:-.02em}
.brand img{width:42px;height:42px;object-fit:contain}
.top nav{display:flex;gap:22px;font-size:14px;font-weight:650}
.top nav a:hover{color:var(--orange-text)}
.foot{margin-top:96px;padding:34px 0 40px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.foot-top{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.foot-brand{font:22px Jua,sans-serif;color:var(--ink)}
.foot nav{display:flex;gap:18px;flex-wrap:wrap}
.foot nav a:hover,.foot address a:hover{color:var(--orange-text)}
.foot address{font-style:normal;line-height:1.9;margin-bottom:6px}
.nw{white-space:nowrap}

/* home */
.hero{padding:64px 0 40px}
.eyebrow{display:flex;align-items:center;gap:8px;margin:0 0 18px;font-size:13px;font-weight:650;color:var(--muted)}
.eyebrow i{width:8px;height:8px;border-radius:50%;background:var(--orange)}
.hero h1{margin:0;font-size:clamp(46px,6.4vw,84px);line-height:1.12;letter-spacing:-.05em}
.hero h1 em{font-style:normal;color:var(--orange);position:relative}
.hero h1 em:after{content:"✳";position:absolute;font-size:.36em;right:-.95em;top:-.1em;transform:rotate(14deg)}
.lead{max-width:560px;margin:22px 0 0;font-size:17px;color:var(--muted)}
.section-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin-bottom:24px}
.section-head h2{margin:0;font-size:clamp(28px,3vw,38px)}
.section-head a{font-size:13px;color:var(--muted);font-weight:650}
.count{display:inline-grid;place-items:center;min-width:1.7em;height:1.7em;margin-left:6px;padding:0 .45em;border-radius:999px;background:var(--orange);color:#fff;font:700 .45em/1 system-ui,sans-serif;vertical-align:.35em}
.section-head a:hover{color:var(--orange-text)}
.games{padding-top:28px}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px}
.card{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:transform .2s,box-shadow .2s}
.card:hover{transform:translateY(-4px);box-shadow:0 14px 30px #263e341a}
.card-cover{position:relative;display:block;aspect-ratio:4/3;background:#e7e3d6;overflow:hidden}
.card-cover img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.card:hover .card-cover img{transform:scale(1.04)}
.card-orient{position:absolute;left:12px;top:12px;padding:3px 10px;border-radius:999px;background:#fffdf6e8;font-size:11px;font-weight:700}
.card-play{position:absolute;right:14px;bottom:14px;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:var(--orange);color:#fff;font-size:17px;box-shadow:0 6px 16px #a9462a55;transition:transform .2s}
.card:hover .card-play{transform:scale(1.1)}
.card-body{display:flex;flex-direction:column;gap:6px;padding:18px 20px 20px}
.card-body strong{font:400 25px/1.25 Jua,sans-serif;letter-spacing:-.02em}
.card-tag{font-size:14px;color:var(--muted);line-height:1.6}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 0;font-size:12px;font-weight:650;color:var(--green)}
.chips span{background:#e8eddf;border-radius:999px;padding:2px 10px}
.empty{border:2px dashed #c8cfbf;border-radius:var(--radius);padding:56px 24px;text-align:center;color:var(--muted)}
.empty strong{display:block;font:400 28px Jua,sans-serif;color:var(--ink);margin-bottom:6px}
.empty p{margin:0}
.about{margin-top:84px;padding:40px 44px;background:var(--deep);color:#e9eee3;border-radius:24px}
.about h2{margin:0 0 14px;font-size:32px;color:#fff}
.about p{margin:0 0 10px;max-width:780px;font-size:15px;color:#cbd6c6}
.about a{color:#fff;text-decoration:underline;text-underline-offset:3px}

/* game page */
.crumb{display:flex;gap:10px;padding:22px 0 0;font-size:13px;color:var(--muted)}
.crumb a:hover{color:var(--orange-text)}
.game-top{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:44px;align-items:start;padding-top:22px}
.game-top.portrait{grid-template-columns:auto minmax(0,1fr);gap:56px}
.stage{position:relative;width:100%;border-radius:22px;overflow:hidden;background:#1e2a25;box-shadow:0 18px 40px #263e3424}
.landscape .stage{aspect-ratio:16/9}
.portrait .stage{aspect-ratio:9/16;max-height:min(82vh,820px);margin-inline:0;width:auto;height:min(82vh,820px);position:sticky;top:20px}
.stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000}
.stage:fullscreen{border-radius:0;max-height:none;height:100%;width:100%}
.poster{position:absolute;inset:0;display:block}
.poster img{width:100%;height:100%;object-fit:cover;transition:transform .5s,filter .3s}
.poster:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 50%,#1a221e59,transparent 60%)}
.poster:hover img{transform:scale(1.03);filter:saturate(1.08)}
.poster-btn{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1;display:flex;align-items:center;gap:10px;padding:16px 34px;border-radius:999px;background:var(--orange);color:#fff;font:400 26px/1 Jua,sans-serif;box-shadow:0 10px 24px #0005;white-space:nowrap;transition:transform .2s}
.poster:hover .poster-btn{transform:translate(-50%,-50%) scale(1.06)}
.fs-btn{position:absolute;right:12px;top:12px;z-index:2;border:0;border-radius:999px;padding:7px 14px;background:#fffdf6e6;color:var(--ink);font:700 12px system-ui,sans-serif;cursor:pointer;opacity:.75}
.fs-btn:hover{opacity:1}
.stage:fullscreen .fs-btn{display:none}
.info h1{margin:12px 0 8px;font-size:clamp(40px,4.4vw,58px)}
.tagline{margin:0 0 24px;font-size:18px;color:var(--muted)}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:28px}
.btn{display:inline-flex;align-items:center;gap:10px;min-height:50px;padding:0 22px;border-radius:12px;font-weight:700;font-size:15px;transition:transform .15s,background .2s}
.btn.primary{background:var(--ink);color:var(--paper)}
.btn.primary:hover{background:var(--green);transform:translateY(-2px)}
.btn.ghost{border:1px solid #b8c3b8}
.btn.ghost:hover{background:#e8ecdf}
.facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:0;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.facts div{background:var(--card);padding:14px 16px}
.facts dt{font-size:12px;color:var(--muted);font-weight:650}
.facts dd{margin:2px 0 0;font-size:14px;font-weight:600}
.facts .wide{grid-column:1/-1}
.info .prose{margin-top:44px}
.prose{max-width:760px;margin-top:64px}
.prose h2{font-size:32px;margin:40px 0 14px}
.prose h2:first-child{margin-top:0}
.prose p,.prose li{font-size:16px;line-height:1.95;color:#3c5249}
.prose ol{padding-left:1.3em}
.prose li{margin-bottom:6px}
.prose .note{margin-top:22px;padding:14px 18px;border-radius:12px;background:#ecebdf;font-size:14px;color:var(--muted)}
.more{margin-top:72px}
.missing{padding:90px 0 40px;text-align:center}
.missing h1{font-size:48px;margin:0 0 10px}
.missing p{color:var(--muted);margin-bottom:28px}

@media(max-width:960px){
  .grid{grid-template-columns:1fr 1fr;gap:18px}
  .game-top,.game-top.portrait{grid-template-columns:1fr;gap:28px}
  .portrait .stage{height:auto;width:100%;max-height:none;position:relative;top:auto;aspect-ratio:4/3}
  .portrait .poster img{object-position:50% 30%}
}
@media(max-width:620px){
  .wrap{width:calc(100% - 32px)}
  .top{min-height:68px}
  .brand{font-size:20px}.brand img{width:34px;height:34px}
  .top nav{gap:14px;font-size:13px}
  .hero{padding:40px 0 22px}
  .lead{font-size:15px}
  .grid{grid-template-columns:1fr;gap:18px}
  .about{padding:28px 22px;border-radius:18px;margin-top:56px}
  .about h2{font-size:27px}
  .poster-btn{font-size:22px;padding:14px 28px}
  .facts{grid-template-columns:1fr}
  .prose{margin-top:44px}
  .prose h2{font-size:28px}
  .foot{margin-top:64px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
