/* PLAYORA 나사 끼우기. 바깥 페이지는 흰 바탕 작업 노트 + 호두나무 띠. 게임 안 색·글꼴은 js/art.js의 시안(THEMES)이 CSS 변수로 넣는다.
   게임 안 크기는 모두 em (app.js가 상자 크기로 글자 크기를 정함). */
:root {
  --ink: #26211d; --ink2: #5a524b; --paper: #f6f6f4; --paper2: #ebeae6; --line: rgba(38, 33, 29, 0.16);
  --walnut: #2c1f17; --walnut2: #3a2a20; --birch: #e4c79b; --amber: #ffb547; --amber2: #ffd287; --snow: #f3ead8; --snow2: #cdb99a;
  --font-d: "Do Hyeon", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-b: "Gowun Dodum", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-h: "Gaegu", "Malgun Gothic", sans-serif;
  --s1: 0.25em; --s2: 0.5em; --s3: 0.75em; --s4: 1em; --s6: 1.5em; --s8: 2em;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@supports (color: oklch(0 0 0)) {
  :root { --ink: oklch(0.26 0.012 60); --ink2: oklch(0.45 0.014 60); --paper: oklch(0.972 0.002 90); --paper2: oklch(0.935 0.004 90); --walnut: oklch(0.24 0.03 50); --walnut2: oklch(0.29 0.035 50); --amber: oklch(0.82 0.15 72); }
}
html { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-b); font-size: 16px; line-height: 1.7; -webkit-text-size-adjust: 100%; }
a { color: inherit; }

/* ---------------------------------------------------------------- 바깥 페이지 */
.mast { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1.25rem; background: var(--walnut); color: var(--snow); font-size: 0.88rem; }
.mast a { text-decoration: none; }
.mast-brand b { font-family: var(--font-d); font-weight: 400; letter-spacing: 0.08em; margin-right: 0.6rem; color: var(--snow); font-size: 1.05rem; }
.mast-brand span { color: var(--snow2); }
.mast-more { margin-left: auto; border-bottom: 2px solid var(--amber); }
.head { max-width: 1060px; margin: 0 auto; padding: 1.4rem 1.25rem 0.9rem; display: flex; align-items: baseline; gap: 0.3rem 1.4rem; flex-wrap: wrap; }
.head h1 { font-family: var(--font-d); font-weight: 400; font-style: normal; font-size: clamp(2.4rem, 7vw, 3.9rem); line-height: 1; margin: 0; letter-spacing: -0.01em; }
.head p { margin: 0; color: var(--ink2); font-size: 0.96rem; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 12px; }
.about { max-width: 1060px; margin: 2.6rem auto 0; padding: 0 1.25rem; }
.about-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); gap: 2.8rem; }
.about h2 { font-family: var(--font-d); font-weight: 400; font-style: normal; font-size: 1.65rem; line-height: 1.3; margin: 2.4rem 0 0.6rem; word-break: keep-all; }
.about h2:first-child { margin-top: 0; }
.about h3 { font-size: 1.04rem; font-weight: 700; margin: 1.3rem 0 0.25rem; font-style: normal; }
.about p, .about li { word-break: keep-all; }
.about p { margin: 0 0 0.85rem; }
.about ol { padding-left: 1.3rem; margin: 0 0 1rem; } .about li { margin: 0 0 0.45rem; }
.about .note { border-left: 4px solid var(--walnut2); background: var(--paper2); padding: 0.75rem 1rem; font-size: 0.95rem; }
.prodtab-wrap { overflow-x: auto; margin: 0.4rem 0 1rem; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.prodtab { border-collapse: collapse; width: 100%; font-size: 0.9rem; min-width: 30rem; }
.prodtab th, .prodtab td { padding: 0.42rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; word-break: keep-all; }
.prodtab thead th { font-weight: 700; color: var(--ink2); font-size: 0.82rem; }
.prodtab tbody th { font-family: var(--font-d); font-weight: 400; white-space: nowrap; font-size: 1.02rem; }
.about dl { margin: 0; }
.about dt { font-weight: 700; margin-top: 1rem; }
.about dd { margin: 0.2rem 0 0; color: var(--ink2); }
.about .more { margin-top: 2.2rem; font-size: 0.9rem; line-height: 1.9; color: var(--ink2); }
.about .more a { text-decoration: none; border-bottom: 1px solid rgba(38, 33, 29, 0.3); }
.about-side h3 { margin-top: 0; font-family: var(--font-d); font-weight: 400; font-size: 1.2rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.3rem; }
.about-side h3 ~ h3 { margin-top: 1.6rem; }
.keytab { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.keytab th { text-align: left; padding: 0.35rem 0.6rem 0.35rem 0; font-weight: 700; white-space: nowrap; vertical-align: top; }
.keytab td { padding: 0.35rem 0; color: var(--ink2); border-bottom: 1px solid var(--line); word-break: keep-all; }
.foot { max-width: 1060px; margin: 3rem auto 0; padding: 1.2rem 1.25rem 2.6rem; border-top: 3px solid var(--ink); font-size: 0.86rem; color: var(--ink2); }
.foot a { margin-right: 1.1rem; font-weight: 700; color: var(--ink); text-decoration: none; display: inline-block; }
.foot p { margin: 0.7rem 0 0; }
@media (max-width: 820px) { .about-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; } .mast { padding: 0.5rem 0.9rem; } .head { padding: 1rem 0.9rem 0.7rem; } .about, .foot { padding-left: 0.9rem; padding-right: 0.9rem; } .wrap { padding: 0 6px; } }
html.embed .mast, html.embed .head, html.embed .about, html.embed .foot { display: none; }
html.embed, html.embed body { height: 100%; overflow: hidden; background: var(--walnut); }
html.embed .wrap { max-width: none; padding: 0; }
.nojs { padding: 2em; color: var(--snow); }

/* ---------------------------------------------------------------- 게임 상자 */
.screw { position: relative; box-sizing: border-box; width: 100%; aspect-ratio: 16 / 10; max-height: 84vh; min-height: 300px; margin: 0 auto; background: var(--th-bg, var(--walnut)); color: var(--th-fg, var(--snow)); border-radius: 10px; overflow: hidden; font-family: var(--font-b); line-height: 1.4; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: none; contain: layout paint; }
@media (max-width: 640px) and (orientation: portrait) { .screw { aspect-ratio: 10 / 16; max-height: 86vh; } }
html.embed .screw { position: fixed; inset: 0; width: auto; height: auto; aspect-ratio: auto; max-height: none; min-height: 0; border-radius: 0; }
.screw * { box-sizing: border-box; }
.screw button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
.screw button:disabled { cursor: default; }
.screw :focus-visible { outline: 2px solid var(--th-acc); outline-offset: 2px; }
.sw-cv { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }

/* HUD */
.sw-hud { position: absolute; inset: 0; pointer-events: none; }
.sw-hud[hidden] { display: none; }
.sw-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s2) var(--s3); }
.sw-plate { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 0.32em 1.25em 0.4em; min-height: 2.6em; background: var(--th-hud2); color: var(--th-hudInk); border-radius: 0.35em; box-shadow: 0 0.18em 0 rgba(0, 0, 0, 0.28); }
.th-A .sw-plate { border-bottom: 0.22em solid #b08a57; background-image: repeating-linear-gradient(178deg, rgba(120, 80, 40, 0.0) 0 0.55em, rgba(120, 80, 40, 0.09) 0.55em 0.62em); }
.th-A .sw-plate::before, .th-A .sw-plate::after { content: ""; position: absolute; top: 50%; width: 0.62em; height: 0.62em; margin-top: -0.31em; border-radius: 50%; background: #b3b9bf; box-shadow: inset 0 0 0 0.09em #6f767d, inset 0.12em 0.12em 0 #d7dbdf; }
.th-A .sw-plate::before { left: 0.32em; } .th-A .sw-plate::after { right: 0.32em; }
.th-B .sw-plate { border-top: 0.25em solid var(--th-acc); border-radius: 0.15em; box-shadow: 0 0.15em 0.5em rgba(0, 0, 0, 0.12); }
.th-C .sw-plate { border-radius: 0.5em; box-shadow: 0 0.15em 0.4em rgba(0, 0, 0, 0.15); }
.sw-st { min-width: 0; flex: 0 1 auto; }
.sw-st b { font-family: var(--font-d); font-weight: 400; font-size: 1.12em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-st span { font-size: 0.8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.85; }
.sw-seg { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 0.28em; padding-top: 0.7em; min-width: 0; }
.sw-seg i { display: block; width: 1.05em; height: 0.72em; border-radius: 0.2em; border: 0.12em solid var(--th-fg2); background: rgba(0, 0, 0, 0.15); }
.sw-seg i.l { width: 1.6em; }
.sw-seg i.g { background: var(--th-fg2); border-color: var(--th-fg2); }
.sw-seg i.p { background: var(--th-acc); border-color: var(--th-acc); }
.sw-score { flex: 0 0 auto; align-items: center; min-width: 5.4em; }
.sw-score span { font-size: 0.7em; opacity: 0.8; }
.sw-score b { font-family: var(--font-d); font-weight: 400; font-size: 1.35em; line-height: 1.05; font-variant-numeric: tabular-nums; display: inline-block; }
.sw-score b.roll { animation: roll 0.32s var(--ease); }
@keyframes roll { 0% { transform: translateY(0.55em); opacity: 0.2; } 100% { transform: none; opacity: 1; } }
.sw-tb { display: flex; gap: 0.35em; pointer-events: auto; flex: 0 0 auto; }
.tb { width: 2.6em; height: 2.6em; display: grid; place-items: center; border: 0; border-radius: 0.5em; background: var(--th-hud); color: var(--th-fg); padding: 0; }
.th-B .tb, .th-C .tb { background: var(--th-hud); color: var(--th-hudInk); box-shadow: 0 0.1em 0.35em rgba(0, 0, 0, 0.15); }
.tb svg { width: 1.3em; height: 1.3em; }
.sw-msg { position: absolute; left: 50%; top: 4.4em; transform: translateX(-50%); margin: 0; max-width: min(30em, 92%); padding: 0.45em 1em; border-radius: 0.45em; background: var(--th-paper); color: var(--th-paperInk); font-size: 0.94em; text-align: center; opacity: 0; transition: opacity 0.25s; word-break: keep-all; box-shadow: 0 0.2em 0.8em rgba(0, 0, 0, 0.25); }
.sw-msg.on { opacity: 1; }
.sw-tut { position: absolute; left: var(--s3); top: 38%; max-width: min(17em, 40%); padding: 0.7em 0.9em; background: var(--th-paper); color: var(--th-paperInk); border-radius: 0.5em; pointer-events: auto; box-shadow: 0 0.3em 1.2em rgba(0, 0, 0, 0.3); }
.sw-tut[hidden] { display: none; }
.sw-tut p { margin: 0 0 0.3em; font-size: 0.95em; word-break: keep-all; }
.lnk { background: none; border: 0; padding: 0.3em 0; text-decoration: underline; text-underline-offset: 0.2em; font-size: 0.84em; color: inherit; opacity: 0.85; }
.sw-hand { position: absolute; width: 3em; height: 3.5em; pointer-events: none; filter: drop-shadow(0 0.15em 0.3em rgba(0, 0, 0, 0.45)); }
.sw-hand[hidden] { display: none; }
.sw-hand svg { width: 100%; height: 100%; animation: press 0.9s ease-in-out infinite; transform-origin: 30% 10%; }
@keyframes press { 0%, 100% { transform: scale(1); } 40%, 60% { transform: scale(0.84) translateY(-0.2em); } }
.sw-hint { position: absolute; left: 50%; bottom: 0.6em; transform: translateX(-50%); margin: 0; font-size: 0.8em; opacity: 0.7; white-space: nowrap; }
.sw-toast { position: absolute; left: 50%; bottom: 5.6em; transform: translate(-50%, 0.5em); padding: 0.4em 1em; border-radius: 1.4em; background: var(--th-paper); color: var(--th-paperInk); font-size: 0.9em; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.35s var(--ease); white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.sw-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 화면들 (공통 종이 카드) */
.sw-scr { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--s4); background: rgba(10, 7, 5, 0.42); overflow: hidden; }
.th-B .sw-scr, .th-C .sw-scr { background: rgba(40, 44, 50, 0.28); }
.sw-scr[hidden] { display: none; }
.md { position: relative; max-width: 34em; width: 100%; max-height: 100%; overflow: auto; padding: 1.2em 1.4em; border-radius: 0.5em; background: var(--th-paper); color: var(--th-paperInk); box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.35); }
.md h2 { font-family: var(--font-d); font-weight: 400; font-style: normal; font-size: 1.7em; line-height: 1.2; margin: 0 0 0.35em; word-break: keep-all; }
.th-B .md h2 { font-weight: 700; font-size: 1.5em; }
.md p { margin: 0 0 0.6em; word-break: keep-all; }
.md .sub { opacity: 0.8; font-size: 0.92em; }
.btns { display: flex; flex-wrap: wrap; gap: 0.5em; margin: 0.8em 0 0.2em; }
.btns.col { flex-direction: column; align-items: stretch; }
.btn { display: inline-flex; align-items: baseline; justify-content: center; gap: 0.5em; padding: 0.55em 1.1em; border: 2px solid var(--th-paperInk); border-radius: 0.4em; background: transparent; color: var(--th-paperInk); white-space: nowrap; transition: background 0.15s, transform 0.12s; font-weight: 700; }
.btn small { font-weight: 400; font-size: 0.8em; opacity: 0.8; }
.btn:active:not(:disabled) { transform: translateY(0.1em); }
.btn.pri { background: var(--th-paperInk); color: var(--th-paper); }
.btn.warn { background: var(--th-bad); border-color: var(--th-bad); color: #fff; }
.btn.sm { padding: 0.3em 0.8em; font-size: 0.88em; }
.btn.on { background: var(--th-acc); border-color: var(--th-acc); color: #241a0e; }
.th-B .btn.on { color: #fff; }
.btn:disabled { opacity: 0.42; }
.keys { width: 100%; border-collapse: collapse; font-size: 0.9em; margin: 0.4em 0 0.6em; }
.keys th { text-align: left; padding: 0.35em 0.8em 0.35em 0; white-space: nowrap; vertical-align: middle; font-weight: 700; }
.keys td { padding: 0.35em 0; border-bottom: 1px solid var(--th-line); word-break: keep-all; }
.th-A .keys td { border-color: rgba(42, 37, 34, 0.15); }
.keys td.feel { display: flex; flex-wrap: wrap; gap: 0.3em; }
.stars { display: inline-flex; gap: 0.2em; vertical-align: middle; }
.stars .star { width: 1em; height: 1em; display: inline-block; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: rgba(0, 0, 0, 0.18); }
.stars .star.on { background: var(--th-acc); }
.fl { list-style: none; margin: 0.6em 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: 0.4em; }
.fl .btn { width: 100%; justify-content: flex-start; }

/* 시작 화면: 판자 간판 + 단추 목록. 시안마다 모양이 다름 */
.sw-scr.title { background: none; place-items: center start; padding: var(--s4) clamp(1em, 5%, 3em); }
.md.title { background: none; box-shadow: none; padding: 0; max-width: 24em; overflow: visible; color: var(--th-fg); display: flex; flex-direction: column; gap: 0.9em; }
.ti-sign { position: relative; padding: 0.95em 1.6em 0.85em; }
.ti-h { font-size: 3.5em !important; line-height: 1 !important; margin: 0 0 0.18em !important; white-space: nowrap; }
.ti-sub { margin: 0 !important; font-size: 0.98em; max-width: 21em; }
.nail { position: absolute; width: 1.05em; height: 1.05em; }
.nail svg { width: 100%; height: 100%; display: block; }
.n1 { left: 0.45em; top: 0.45em; } .n2 { right: 0.45em; top: 0.45em; } .n3 { left: 0.45em; bottom: 0.45em; } .n4 { right: 0.45em; bottom: 0.45em; }
.ti-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5em; }
.ti-menu .btn { width: 100%; justify-content: space-between; }
.ti-foot { display: flex; gap: 1.2em; margin: 0 !important; }
/* A 작업대: 자작나무 판자 간판 (아래 두께, 나사 네 개) */
.th-A .ti-sign { background: #e8cfa3; color: #2a2018; border-radius: 0.3em; transform: rotate(-1.2deg); box-shadow: 0 0.42em 0 #b48c58, 0 0.9em 1.4em rgba(0, 0, 0, 0.45); background-image: repeating-linear-gradient(177deg, rgba(150, 100, 50, 0) 0 0.9em, rgba(150, 100, 50, 0.12) 0.9em 1em, rgba(150, 100, 50, 0) 1em 1.7em, rgba(150, 100, 50, 0.07) 1.7em 1.75em); }
.th-A .ti-h { font-family: var(--font-d); color: #2a2018; }
.th-A .ti-menu .btn { background: rgba(28, 20, 15, 0.72); border: 0; border-left: 0.3em solid #b48c58; color: var(--th-fg); border-radius: 0.25em; padding: 0.62em 1em; }
.th-A .ti-menu .btn small { color: var(--th-fg2); opacity: 1; }
.th-A .ti-menu .btn.pri { background: var(--th-acc); color: #2a1a08; border-left-color: #c47f1c; }
.th-A .ti-menu .btn.pri small { color: #4d3412; }
.th-A .ti-menu .btn:hover:not(:disabled) { background: rgba(28, 20, 15, 0.88); }
.th-A .ti-menu .btn.pri:hover { background: var(--amber2); }
/* B 작업 지시서: 클립보드에 꽂힌 종이, 단추는 체크 칸 줄 */
.th-B .md.title { background: #fbfbf8; color: #23262b; padding: 1.1em 1.3em 1em; border: 0.75em solid #b48a55; border-radius: 0.7em; box-shadow: 0 0.6em 1.6em rgba(0, 0, 0, 0.18); gap: 0.6em; }
.th-B .md.title::before { content: ""; position: absolute; left: 50%; top: -1.35em; width: 6em; height: 1.6em; margin-left: -3em; background: #8f9399; border-radius: 0.35em; box-shadow: inset 0 -0.3em 0 rgba(0, 0, 0, 0.18); }
.th-B .ti-sign { padding: 0 0 0.6em; border-bottom: 2px solid #23262b; }
.th-B .ti-sign .nail { display: none; }
.th-B .ti-sign::before { content: "작업 지시서  No. 1128"; display: block; font-family: var(--font-h); font-size: 0.78em; letter-spacing: 0.08em; color: var(--th-acc); margin-bottom: 0.3em; white-space: pre; }
.th-B .ti-h { font-weight: 700; font-size: 3em !important; letter-spacing: -0.03em; }
.th-B .ti-menu { gap: 0; }
.th-B .ti-menu .btn { border: 0; border-bottom: 1px dashed rgba(35, 38, 43, 0.35); border-radius: 0; padding: 0.62em 0.2em 0.62em 2em; justify-content: space-between; position: relative; font-weight: 700; }
.th-B .ti-menu .btn::before { content: ""; position: absolute; left: 0.2em; top: 50%; width: 1em; height: 1em; margin-top: -0.5em; border: 2px solid #23262b; border-radius: 0.12em; }
.th-B .ti-menu .btn.pri { background: none; color: #23262b; }
.th-B .ti-menu .btn.pri::before { background: var(--th-acc); border-color: var(--th-acc); }
.th-B .ti-menu .btn small { font-family: var(--font-h); }
.th-B .ti-foot .lnk { color: #23262b; }
/* C 페그보드: 줄에 걸린 합판 간판, 단추는 못에 걸린 종이 꼬리표 */
.th-C .ti-sign { background: #e7cfa6; color: #2e2418; border-radius: 0.6em; margin-top: 1.6em; box-shadow: 0 0.35em 0 #c4a473, 0 0.7em 1.2em rgba(0, 0, 0, 0.18); }
.th-C .ti-sign::before, .th-C .ti-sign::after { content: ""; position: absolute; top: -1.7em; width: 2px; height: 2em; background: #5d5f63; }
.th-C .ti-sign::before { left: 18%; transform: rotate(14deg); } .th-C .ti-sign::after { right: 18%; transform: rotate(-14deg); }
.th-C .ti-sign .nail { display: none; }
.th-C .ti-h { color: #2e2418; }
.th-C .ti-menu { flex-direction: row; flex-wrap: wrap; gap: 0.7em 0.6em; }
.th-C .ti-menu li { flex: 1 1 10.5em; }
.th-C .ti-menu .btn { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0.1em; padding: 0.55em 0.9em 0.6em 1.9em; border: 0; border-radius: 0.35em; background: #d9b98a; color: #2e2418; clip-path: polygon(0.9em 0, 100% 0, 100% 100%, 0.9em 100%, 0 50%); position: relative; white-space: normal; text-align: left; }
.th-C .ti-menu .btn::before { content: ""; position: absolute; left: 1em; top: 50%; width: 0.55em; height: 0.55em; margin-top: -0.28em; border-radius: 50%; background: #f2f2ef; box-shadow: inset 0 0 0 0.1em rgba(0, 0, 0, 0.25); }
.th-C .ti-menu .btn.pri { background: var(--th-acc); color: #fff; }
.th-C .ti-foot .lnk { color: #2e3033; }
/* 세로 화면 */
.screw.port .sw-scr.title { place-items: stretch; padding: var(--s3) var(--s4) var(--s4); }
.screw.port .md.title { max-width: none; display: grid; grid-template-rows: auto minmax(5em, 1fr) auto auto; gap: 0.55em; }
.screw.port .ti-sign { justify-self: stretch; }
.screw.port .ti-h { font-size: 3em !important; }
.screw.port .ti-menu { grid-row: 3; }
.screw.port .ti-foot { grid-row: 4; }
.screw.port.th-C .ti-menu li { flex-basis: 45%; }
.screw.port.th-B .sw-scr.title { place-items: start stretch; }
.screw.port.th-B .md.title { grid-template-rows: auto auto auto; margin-top: 1.2em; }

/* 새 작업 소개 */
.md.intro { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 0.4em 1.2em; align-items: start; max-width: 36em; }
.in-art { width: 7.5em; height: 7.5em; }
.in-no { font-family: var(--font-h); font-size: 1em; margin: 0 0 0.1em !important; opacity: 0.8; }
.in-new { margin: 0.4em 0 0.4em; padding-left: 1.1em; }
.in-new li { margin: 0 0 0.35em; word-break: keep-all; font-size: 0.93em; }
.in-new b { margin-right: 0.3em; }
.screw.port .md.intro { grid-template-columns: minmax(0, 1fr); }
.screw.port .in-art { width: 6em; height: 6em; }

/* 모음집 (선반) */
.md.shelf { max-width: 46em; }
.sh-head { display: flex; align-items: baseline; gap: 0.4em 1em; flex-wrap: wrap; }
.sh-head h2 { margin: 0; } .sh-head p { margin: 0; opacity: 0.8; } .sh-head .btn { margin-left: auto; }
.sh-grid { list-style: none; margin: 0.8em 0 0.4em; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5em; border-bottom: 0.45em solid #b48c58; }
.th-B .sh-grid { border-bottom-color: #8f9399; } .th-C .sh-grid { border-bottom-color: #d8c3a0; }
.sh-it { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.15em; padding: 0.35em 0.15em 0.45em; border: 0; background: transparent; border-radius: 0.4em; }
.sh-it canvas { width: 5.2em; height: 5.2em; }
.sh-it .nm { font-size: 0.82em; font-weight: 700; word-break: keep-all; text-align: center; line-height: 1.25; }
.sh-it .tag { font-size: 0.72em; padding: 0.05em 0.5em; border-radius: 1em; background: var(--th-acc); color: #241a0e; }
.th-B .sh-it .tag { color: #fff; }
.sh-it.lock { opacity: 0.45; }
.sh-it.next { outline: 2px dashed var(--th-acc); outline-offset: -2px; }
.sh-it:hover:not(.lock) { background: rgba(0, 0, 0, 0.05); }
.sh-note { font-size: 0.82em; opacity: 0.8; margin: 0.4em 0 0 !important; }
.screw.port .sh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.screw.port .sh-it canvas { width: 4.6em; height: 4.6em; }

/* 완성 장면 꼬리표 */
.sw-scr.scene { background: none; place-items: center end; padding-right: clamp(1em, 6%, 4em); }
.md.scene { max-width: 22em; background: none; box-shadow: none; padding: 0.4em; color: var(--th-fg); overflow: visible; }
.md.scene h2 { font-size: 2.2em; }
.tagcard { position: relative; background: var(--th-paper); color: var(--th-paperInk); padding: 0.9em 1.1em 0.7em 1.6em; border-radius: 0.3em; transform: rotate(1.5deg); box-shadow: 0 0.4em 1.2em rgba(0, 0, 0, 0.35); }
.tagcard::before { content: ""; position: absolute; left: 0.55em; top: 1em; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--th-bg); box-shadow: inset 0 0 0 0.12em rgba(0, 0, 0, 0.3); }
.tagcard .hand { font-family: var(--font-h); font-size: 1.12em; line-height: 1.35; margin: 0 0 0.3em; }
.th-A .tagcard .hand { font-weight: 700; }
.tg-st { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.3em 0.6em; margin: 0.5em 0 0.2em; }
.tg-st div { border-top: 1px solid rgba(42, 37, 34, 0.2); padding-top: 0.2em; }
.tg-st div.wide { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 0.6em; }
.tg-st dt { font-size: 0.74em; opacity: 0.75; white-space: nowrap; }
.tg-st dd { margin: 0; font-family: var(--font-d); font-size: 1.25em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.md.scene .btns { flex-wrap: nowrap; }
.md.scene .btns .btn { padding: 0.5em 0.8em; }
.md.scene .btns .btn { border-color: var(--th-fg); color: var(--th-fg); }
.md.scene .btns .btn.pri { background: var(--th-acc); border-color: var(--th-acc); color: #241a0e; }
.th-B .md.scene .btns .btn.pri { color: #fff; }
.screw.port .sw-scr.scene { place-items: end stretch; padding: var(--s3); }
.screw.port .md.scene { max-width: none; }
.screw.port .md.scene h2 { font-size: 1.8em; margin-bottom: 0.25em; }
.screw.port .md.scene .btns { flex-wrap: wrap; }

/* 세로 화면 HUD: 윗줄 이름판 + 단추, 아랫줄 칸 막대 + 점수 */
.screw.port .sw-top { flex-wrap: wrap; gap: var(--s2); }
.screw.port .sw-st { order: 1; flex: 1 1 calc(100% - 9.5em); }
.screw.port .sw-tb { order: 2; }
.screw.port .sw-seg { order: 3; flex: 1 1 55%; justify-content: flex-start; padding-top: 0.75em; }
.screw.port .sw-score { order: 4; }
.screw.port .sw-msg { top: 7.6em; }
.screw.port .sw-tut { top: auto; bottom: 30%; max-width: 62%; }
.md.result, .md.pause, .md.confirm, .md.settings, .md.howto, .md.prac { max-width: 31em; }
.md.prac { max-width: 38em; }
@media (prefers-reduced-motion: reduce) {
  .sw-hand svg, .sw-score b.roll { animation: none !important; }
  .sw-msg, .sw-toast { transition: none; }
}

/* ---------------------------------------------------------------- v2 (2026-11-29): 인기작처럼 밝고 쨍하게. 크고 둥글고 눌리는 단추, 광택 있는 판 */
.th-A { --v2-gold1: #ffe08a; --v2-gold2: #ffb23a; --v2-gold3: #d97a0c; --v2-blue1: #6fb6ff; --v2-blue2: #2f7ff0; --v2-blue3: #1a52b8; --v2-cream: #fff8ea; }
.th-A .md { background: linear-gradient(180deg, #fffaf0 0%, #fff1d6 100%); color: #3a2412; border-radius: 1.4em; padding: 1.3em 1.4em 1.2em; box-shadow: 0 0 0 0.28em #fff, 0 0 0 0.5em rgba(150, 92, 30, 0.55), 0 1.2em 2.4em rgba(40, 18, 2, 0.5); }
.th-A .md h2 { color: #4a2a0e; text-shadow: 0 0.06em 0 #fff; }
.th-A .btn { position: relative; border: 0; border-radius: 999px; padding: 0.78em 1.5em 0.84em; font-size: 1.06em; color: #4a2a0e; background: linear-gradient(180deg, #ffffff 0%, #f3e6cc 100%); box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.95), inset 0 -0.18em 0 rgba(160, 110, 50, 0.25), 0 0.3em 0 #c99a5a, 0 0.5em 0.8em rgba(60, 30, 5, 0.3); transition: transform 0.08s, box-shadow 0.08s, filter 0.12s; min-height: 3.1em; align-items: center; }
.th-A .btn::after { content: ""; position: absolute; left: 12%; right: 12%; top: 0.18em; height: 38%; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0)); pointer-events: none; }
.th-A .btn.pri { color: #4a2400; background: linear-gradient(180deg, var(--v2-gold1) 0%, var(--v2-gold2) 62%, #ff9a1f 100%); box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.8), inset 0 -0.2em 0 rgba(170, 80, 0, 0.35), 0 0.32em 0 var(--v2-gold3), 0 0.55em 0.9em rgba(120, 50, 0, 0.4); text-shadow: 0 0.06em 0 rgba(255, 255, 255, 0.6); }
.th-A .btn.warn { color: #fff; background: linear-gradient(180deg, #ff8f7a, #ef4a33); box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.6), 0 0.3em 0 #b2321f, 0 0.5em 0.8em rgba(120, 20, 0, 0.35); }
.th-A .btn.on { color: #fff; background: linear-gradient(180deg, var(--v2-blue1), var(--v2-blue2)); box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.6), 0 0.3em 0 var(--v2-blue3), 0 0.5em 0.8em rgba(10, 40, 110, 0.35); }
.th-A .btn:active:not(:disabled) { transform: translateY(0.24em); box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.8), 0 0.06em 0 #c99a5a, 0 0.15em 0.3em rgba(60, 30, 5, 0.3); }
.th-A .btn.pri:active:not(:disabled) { box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.8), 0 0.06em 0 var(--v2-gold3), 0 0.15em 0.3em rgba(120, 50, 0, 0.35); }
.th-A .btn:hover:not(:disabled) { filter: brightness(1.05); }
.th-A .btn.sm { padding: 0.5em 1.1em; min-height: 2.5em; font-size: 0.95em; }
.th-A .btn small { color: inherit; opacity: 0.72; }
.th-A .ti-sign { background: linear-gradient(180deg, #fff6df, #ffe2a8); border-radius: 1.1em; transform: rotate(-1.2deg); box-shadow: 0 0 0 0.25em #fff, 0 0.45em 0 0.25em #d08a2c, 0 1em 1.6em rgba(40, 15, 0, 0.5); }
.th-A .ti-h { color: #6a2f00; text-shadow: 0 0.05em 0 #fff, 0 0.09em 0 #f0b45a; }
.th-A .ti-menu .btn { border: 0; border-radius: 999px; padding: 0.78em 1.4em; background: linear-gradient(180deg, #ffffff 0%, #f3e6cc 100%); color: #4a2a0e; border-left: 0; }
.th-A .ti-menu .btn small { color: #7a5a3a; }
.th-A .ti-menu .btn.pri { background: linear-gradient(180deg, var(--v2-gold1) 0%, var(--v2-gold2) 62%, #ff9a1f 100%); color: #4a2400; }
.th-A .ti-menu .btn.pri small { color: #6a3a0a; }
.th-A .ti-menu .btn:hover:not(:disabled) { background: linear-gradient(180deg, #ffffff 0%, #f7ecd8 100%); }
.th-A .ti-menu .btn.pri:hover { background: linear-gradient(180deg, #ffe9a6 0%, #ffbd52 62%, #ffa531 100%); }
.th-A .ti-foot .lnk { color: #fff8ea; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); opacity: 1; font-size: 0.95em; }
.th-A .md .ti-foot .lnk, .th-A .md .lnk { color: #6a3a10; text-shadow: none; }
.th-A .tb { width: 3em; height: 3em; border-radius: 50%; color: #4a2a0e; background: linear-gradient(180deg, #ffffff, #f0dfbf); box-shadow: inset 0 0.1em 0 #fff, 0 0.22em 0 #b98a4c, 0 0.35em 0.6em rgba(40, 15, 0, 0.35); }
.th-A .tb:active { transform: translateY(0.18em); box-shadow: inset 0 0.1em 0 #fff, 0 0.04em 0 #b98a4c; }
.th-A .sw-plate { background: linear-gradient(180deg, #fff8e6, #f6dfae); color: #4a2a0e; border-radius: 0.9em; box-shadow: inset 0 0.1em 0 #fff, 0 0.22em 0 #c08a44, 0 0.4em 0.7em rgba(40, 15, 0, 0.35); background-image: linear-gradient(180deg, #fff8e6, #f6dfae); border-bottom: 0; }
.th-A .sw-seg i { border-radius: 0.4em; }
.th-A .sw-seg i.p { background: linear-gradient(180deg, #ffe08a, #ffad2e); border-color: #e08a10; box-shadow: 0 0 0.5em rgba(255, 190, 60, 0.7); }
.th-A .sw-seg i.g { background: linear-gradient(180deg, #fff, #e9dcc4); border-color: #d6c09a; }
.th-A .sw-toast, .th-A .sw-msg { border-radius: 999px; }
.th-A .sw-scr { background: radial-gradient(ellipse at 50% 40%, rgba(255, 220, 150, 0.12), rgba(30, 12, 0, 0.5)); }
.th-A .md.title { background: none; box-shadow: none; padding-left: 0.4em; padding-right: 0.4em; }
.th-A .md .btn:not(.pri):not(.warn):not(.on) { color: #4a2a0e; }
.th-A .md .btn:disabled { opacity: 0.5; }
.th-A .md.title .ti-foot .lnk { color: #fff8ea; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }

/* ---------------------------------------------------------------- v2.1 다듬기 (2026-11-29): 더 크고 둥근 버튼, 더 강한 광택, 나무 위 글자는 판 위에 */
.th-A .btn { font-family: var(--font-d); font-weight: 400; letter-spacing: 0.01em; font-size: 1.14em; min-height: 3.1em; padding: 0.7em 1.6em 0.78em; }
.th-A .btn::after { left: 8%; right: 8%; top: 0.12em; height: 46%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.1)); }
.th-A .btn::before { content: ""; position: absolute; left: 0.8em; top: 0.32em; width: 0.7em; height: 0.34em; border-radius: 50%; background: #fff; opacity: 0.95; transform: rotate(-16deg); pointer-events: none; z-index: 1; }
.th-A .btn.sm::before, .th-A .btn.sm::after { display: none; }
.th-A .btn.sm { font-size: 1em; min-height: 2.75em; padding: 0.5em 1.2em; }
.th-A .btn.pri { background: linear-gradient(180deg, #fff09a 0%, #ffc12e 55%, #ff9410 100%); box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.9), inset 0 -0.22em 0 rgba(190, 80, 0, 0.35), 0 0.34em 0 #d06a00, 0 0.6em 1em rgba(120, 50, 0, 0.42); }
.th-A .ti-menu { gap: 0.62em; }
.th-A .ti-menu .btn { font-size: 1.18em; min-height: 2.95em; padding: 0.62em 1.45em 0.7em 1.6em; background: linear-gradient(180deg, #ffffff 0%, #fff4dc 55%, #f6dcae 100%); box-shadow: inset 0 0.12em 0 #fff, inset 0 -0.2em 0 rgba(170, 110, 40, 0.22), 0 0.3em 0 #c48a42, 0 0.55em 0.9em rgba(60, 26, 0, 0.32); }
.th-A .ti-menu .btn.pri { font-size: 1.32em; min-height: 3.05em; background: linear-gradient(180deg, #fff09a 0%, #ffc12e 55%, #ff9410 100%); box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.9), inset 0 -0.22em 0 rgba(190, 80, 0, 0.35), 0 0.32em 0 #d06a00, 0 0.6em 1em rgba(120, 50, 0, 0.42); }
.th-A .ti-menu .btn small { font-size: 0.74em; opacity: 0.85; }
.th-A .md.title .ti-foot { gap: 0.7em; justify-content: center; }
.th-A .md.title .ti-foot .lnk, .th-A .md .lnk { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75em; padding: 0.4em 1.4em; border-radius: 999px; text-decoration: none; font-family: var(--font-d); font-size: 1.04em; color: #4a2a0e; text-shadow: none; opacity: 1; background: linear-gradient(180deg, #fffdf6, #f3dfb8); box-shadow: inset 0 0.1em 0 #fff, 0 0.2em 0 #b98a4c, 0 0.35em 0.6em rgba(40, 15, 0, 0.3); }
.th-A .md.title .ti-foot .lnk:active, .th-A .md .lnk:active { transform: translateY(0.14em); box-shadow: inset 0 0.1em 0 #fff, 0 0.06em 0 #b98a4c; }
.th-A .tb { position: relative; width: 3.25em; height: 3.25em; background: linear-gradient(180deg, #ffffff 0%, #fff3da 55%, #f0d6a6 100%); }
.th-A .tb::after { content: ""; position: absolute; left: 18%; right: 18%; top: 0.14em; height: 40%; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0)); pointer-events: none; }
.th-A .tb svg { width: 1.45em; height: 1.45em; position: relative; z-index: 1; }
.th-A .sw-hint { opacity: 1; color: #fff6dc; background: rgba(46, 20, 2, 0.78); padding: 0.32em 1em; border-radius: 999px; font-size: 0.86em; }
.th-A .sw-scr { background: radial-gradient(ellipse at 50% 40%, rgba(255, 230, 170, 0.1), rgba(40, 14, 0, 0.36)); }
.th-A .sw-scr.title, .th-A .sw-scr.scene { background: none; }
.screw.th-A:not(.port) .md.title { gap: 0.7em; }
.screw.th-A:not(.port) .ti-menu { gap: 0.45em; }
.screw.th-A:not(.port) .ti-menu .btn { font-size: 1.06em; min-height: 2.7em; padding-top: 0.5em; padding-bottom: 0.56em; }
.screw.th-A:not(.port) .ti-menu .btn.pri { font-size: 1.2em; min-height: 2.75em; }
.screw.th-A:not(.port) .md.title .ti-foot .lnk { min-height: 2.5em; }
.th-A .fl { gap: 0.5em; }
.th-A .fl .btn { font-size: 1em; min-height: 2.8em; padding: 0.45em 1em 0.5em 1.2em; white-space: normal; line-height: 1.2; text-align: left; justify-content: flex-start; }
.th-A .fl .btn::before { display: none; }
.th-A .sw-hint:empty { display: none; }

/* 사진 재질을 다 불러오기 전에는 그림판을 감춰 둔다 (2026-11-29) */
#screw.ph-wait canvas { visibility: hidden; }
#screw.ph-wait { background: #c9853f; }
