/* PLAYORA 저금통 부수기. 노란 장판과 짙은 나무색, 도장 인주색 하나. 바깥 페이지는 한지색.
   게임 안 크기는 모두 em: .piggy의 글자 크기를 app.js가 상자 크기에 맞춰 정한다(가로 60em×37.5em, 세로 24em×43em). */
:root {
  --wood: #3b2a1e; --wood2: #4b3627; --wood3: #5e4532; --floor: #dfb067; --wall: #f3ead7;
  --paper: #fbf6ea; --paper2: #f1e6cf; --paper3: #e6d7b8; --ink: #3b2a1e; --ink2: #6b5646; --line: rgba(59, 42, 30, 0.18);
  --red: #c8463a; --red2: #a3362c; --gold: #e8b93c; --green: #3f8f5a; --sky: #5b9fc1;
  --font-d: "Jua", "Gowun Dodum", "Malgun Gothic", sans-serif;
  --font-b: "Gowun Dodum", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --s1: 0.25em; --s2: 0.5em; --s3: 0.75em; --s4: 1em; --s6: 1.5em;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@supports (color: oklch(0 0 0)) {
  :root { --wood: oklch(0.3 0.035 55); --wood2: oklch(0.35 0.04 55); --wood3: oklch(0.42 0.045 58); --floor: oklch(0.79 0.11 78); --wall: oklch(0.94 0.025 85);
    --paper: oklch(0.975 0.015 88); --paper2: oklch(0.93 0.03 85); --paper3: oklch(0.88 0.045 82); --ink: oklch(0.3 0.035 55); --ink2: oklch(0.47 0.035 58);
    --red: oklch(0.56 0.16 30); --red2: oklch(0.48 0.15 30); --gold: oklch(0.8 0.14 85); --green: oklch(0.57 0.11 150); }
}
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.55rem 1.25rem; background: var(--wood); color: var(--paper); font-size: 0.9rem; font-weight: 700; }
.mast a { text-decoration: none; }
.mast-brand b { font-family: var(--font-d); font-weight: 400; font-size: 1.2rem; letter-spacing: 0.03em; margin-right: 0.6rem; color: var(--gold); }
.mast-more { margin-left: auto; border-bottom: 2px solid var(--red); }
.head { max-width: 1040px; margin: 0 auto; padding: 1.3rem 1.25rem 0.8rem; display: flex; align-items: baseline; gap: 0.3rem 1.1rem; flex-wrap: wrap; }
.head h1 { font-family: var(--font-d); font-weight: 400; font-style: normal; font-size: clamp(2.3rem, 7vw, 3.6rem); line-height: 1.05; margin: 0; color: var(--ink); }
.head p { margin: 0; font-weight: 700; color: var(--ink2); font-size: 0.95rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 12px; }
.about { max-width: 1040px; margin: 2.6rem auto 0; padding: 0 1.25rem; }
.about-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); gap: 2.6rem; }
.about h2 { font-family: var(--font-d); font-weight: 400; font-style: normal; font-size: 1.6rem; line-height: 1.3; margin: 2.3rem 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, .about dd, .about td { word-break: keep-all; }
.about p { margin: 0 0 0.85rem; }
.about ol, .about ul { padding-left: 1.3rem; margin: 0 0 1rem; } .about li { margin: 0 0 0.45rem; }
.about .note { border-left: 4px solid var(--red); background: var(--paper2); padding: 0.75rem 1rem; font-size: 0.95rem; }
.ledger-wrap { overflow-x: auto; margin: 0.4rem 0 1rem; border: 2px solid var(--ink); background: #fffaf0; }
.ledger { border-collapse: collapse; width: 100%; font-size: 0.88rem; font-variant-numeric: tabular-nums; min-width: 30rem; }
.ledger th, .ledger td { padding: 0.3rem 0.6rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ledger thead th { background: var(--ink); color: var(--paper); font-weight: 700; }
.ledger tbody th { text-align: left; font-weight: 700; }
.ledger td.l { text-align: left; white-space: normal; }
.kinds-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.4rem 1.2rem; }
.kinds-list li { margin: 0; padding: 0.4rem 0; border-bottom: 1px dashed var(--line); }
.kinds-list b { font-family: var(--font-d); font-weight: 400; font-size: 1.08rem; margin-right: 0.35rem; }
.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(59, 42, 30, 0.3); }
.about-side h3:first-child { margin-top: 0; }
.keytab { border-collapse: collapse; width: 100%; font-size: 0.9rem; margin-bottom: 1rem; }
.keytab th, .keytab td { text-align: left; vertical-align: top; padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--line); word-break: keep-all; }
.keytab th { white-space: nowrap; font-weight: 700; padding-right: 0.8rem; }
.foot { max-width: 1040px; margin: 3rem auto 0; padding: 1.4rem 1.25rem 2.4rem; border-top: 2px solid var(--ink); font-size: 0.86rem; color: var(--ink2); }
.foot a { margin-right: 1.1rem; text-decoration: none; border-bottom: 1px solid rgba(59, 42, 30, 0.3); display: inline-block; margin-bottom: 0.4rem; }
.foot p { margin: 0.6rem 0 0; word-break: keep-all; }
@media (max-width: 820px) { .about-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; } .mast { padding: 0.55rem 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(--wood); }
html.embed .wrap { max-width: none; padding: 0; }
.nojs { padding: 2rem; color: var(--paper); }

/* ---------------------------------------------------------------- 게임 상자 */
.piggy { position: relative; box-sizing: border-box; width: 100%; aspect-ratio: 16 / 10; max-height: calc(100svh - 16px); margin: 0 auto; background: var(--wood); color: var(--paper); border-radius: 8px; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; font-family: var(--font-b); line-height: 1.3; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
@media (max-width: 700px) { .piggy { aspect-ratio: auto; height: min(calc(100svh - 10px), 820px); border-radius: 0; } }
html.embed .piggy { position: fixed; inset: 0; width: auto; height: auto; aspect-ratio: auto; max-height: none; border-radius: 0; }
.piggy *, .piggy *::before, .piggy *::after { box-sizing: border-box; }
.piggy [hidden] { display: none !important; }
:where(.piggy) button { font: inherit; color: inherit; touch-action: manipulation; cursor: pointer; }
.piggy button:disabled { cursor: default; }
.piggy :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* 머리띠 */
.pg-hud { display: flex; align-items: center; gap: 0.3em; padding: 0.35em 0.45em; background: var(--wood); border-bottom: 0.12em solid #2a1d14; min-width: 0; }
.cal { flex: 0 0 auto; width: 4.1em; height: 2.7em; background: var(--paper); color: var(--ink); border-radius: 0.3em; position: relative; overflow: hidden; display: flex; align-items: baseline; justify-content: center; gap: 0.15em; padding-top: 0.62em; box-shadow: 0 0.12em 0 #1c130c; }
.cal::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 0.48em; background: var(--red); }
.cal b { font-family: var(--font-d); font-weight: 400; font-size: 0.95em; white-space: nowrap; }
.cal span { font-size: 0.72em; font-weight: 700; white-space: nowrap; }
.cal .bar { position: absolute; left: 0.3em; right: 0.3em; bottom: 0.22em; height: 0.18em; background: var(--paper3); border-radius: 1em; overflow: hidden; }
.cal .bar i { display: block; height: 100%; width: 0; background: var(--ink2); }
.wal { flex: 1 1 auto; min-width: 0; display: grid; align-content: center; padding: 0.15em 0.55em; height: 2.7em; background: var(--wood2); border-radius: 0.3em; }
.wal span { font-size: 0.62em; font-weight: 700; color: var(--paper2); line-height: 1.1; }
.wal b { font-family: var(--font-d); font-weight: 400; font-size: 1.12em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: clip; color: #ffe7a6; letter-spacing: -0.01em; }
.wal b.l { font-size: 0.96em; } .wal b.xl { font-size: 0.84em; }
.gau { flex: 0 0 auto; width: 5em; height: 2.7em; padding: 0.3em 0.4em; background: var(--wood2); border-radius: 0.3em; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 0.25em; }
.gau span { font-size: 0.66em; font-weight: 700; color: var(--paper2); }
.gau em { font-style: normal; font-size: 0.66em; font-weight: 700; text-align: right; }
.gau .bar { grid-column: 1 / 3; height: 0.55em; background: #251912; border-radius: 1em; overflow: hidden; }
.gau .bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 1em; transition: width 0.2s linear; }
.gau.warm .bar i { background: var(--gold); } .gau.hot .bar i { background: var(--red); } .gau.hot em { color: #ffb3a8; }
.gau.hot { animation: pulse 0.9s ease-in-out infinite; }
@keyframes pulse { 50% { background: #6a2a20; } }
.hb { flex: 0 0 auto; display: flex; gap: 0.25em; }
.ib { width: 2.3em; height: 2.3em; border: 0; border-radius: 0.3em; background: var(--wood3); display: grid; place-items: center; padding: 0; }
.ib.tx { width: auto; min-width: 2.75em; height: 2.75em; padding: 0 0.55em; font-family: var(--font-d); font-size: 0.86em; color: var(--paper); white-space: nowrap; }
.ib.tx.off { color: #a8957f; text-decoration: line-through; text-decoration-thickness: 0.12em; }
.ib:active { background: #765841; }

/* 본문 (방바닥 + 고지서) */
.pg-body { position: relative; display: flex; min-height: 0; min-width: 0; }
.piggy.port .pg-body { flex-direction: column; }
.piggy.land .pg-body { flex-direction: row; }
.pg-stage { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; background: var(--floor); overflow: hidden; }
.pg-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.pg-rail { flex: 0 0 auto; display: flex; gap: 0.32em; background-color: var(--wall); color: var(--ink); scrollbar-width: thin; }
.piggy.port .pg-rail { order: -1; height: 5.3em; padding: 0.5em 0.4em 0.3em; overflow-x: auto; overflow-y: hidden;
  background-image: linear-gradient(to bottom, transparent 0.5em, #b08a60 0.5em, #b08a60 0.62em, transparent 0.62em), repeating-linear-gradient(90deg, rgba(176, 138, 96, 0.08) 0 0.6em, transparent 0.6em 1.2em); }
.piggy.land .pg-rail { width: 10.6em; flex-direction: column; padding: 0.45em 0.45em 0.45em 0.75em; overflow-y: auto; overflow-x: hidden;
  background-image: linear-gradient(to right, transparent 0.32em, #b08a60 0.32em, #b08a60 0.44em, transparent 0.44em), repeating-linear-gradient(0deg, rgba(176, 138, 96, 0.08) 0 0.6em, transparent 0.6em 1.2em); border-left: 0.12em solid #2a1d14; }
.rail-empty { margin: auto; font-size: 0.8em; color: var(--ink2); white-space: nowrap; }
.bill { position: relative; flex: 0 0 auto; border: 0.08em solid #c9b48f; border-radius: 0.2em; background: var(--paper); color: var(--ink); padding: 0.55em 0.3em 0.2em; display: grid; justify-items: center; align-content: start; gap: 0.08em; box-shadow: 0 0.14em 0.2em rgba(59, 42, 30, 0.22); transform-origin: 50% 0; animation: billIn 0.35s var(--ease); }
.piggy.port .bill { width: 4.9em; height: 4.4em; }
.piggy.port .bill:nth-child(odd) { transform: rotate(-1.5deg); } .piggy.port .bill:nth-child(even) { transform: rotate(1.2deg); }
.piggy.land .bill { width: 100%; min-height: 3.5em; padding: 0.3em 0.45em 0.3em 0.8em; grid-template-columns: 1fr auto; justify-items: start; align-items: center; transform-origin: 0 50%; }
.piggy.land .bill .b-n { grid-column: 1 / 3; } .piggy.land .bill .b-d { justify-self: end; }
@keyframes billIn { from { transform: translateY(-0.8em) rotate(-6deg); opacity: 0; } }
.bill .clip { position: absolute; top: -0.32em; left: 50%; width: 0.62em; height: 0.95em; margin-left: -0.31em; background: #c58f52; border-radius: 0.12em; box-shadow: inset 0 -0.2em 0 #8a5a2b; }
.piggy.land .bill .clip { top: 50%; left: -0.36em; width: 0.95em; height: 0.62em; margin: -0.31em 0 0; }
.bill .b-n { display: block; font-size: 0.68em; font-weight: 700; white-space: nowrap; max-width: 100%; }
.bill .b-a { font-family: var(--font-d); font-weight: 400; font-size: 0.76em; white-space: nowrap; letter-spacing: -0.03em; }
.bill .b-d { font-size: 0.64em; font-weight: 700; color: var(--ink2); white-space: nowrap; }
.bill.soon { border-color: var(--gold); background: #fff4d2; } .bill.soon .b-d { color: #8a5f15; }
.bill.late { border-color: var(--red); background: #fde5df; } .bill.late .b-d { color: var(--red2); }
.bill.poor .b-a { color: #a68f78; }
/* 고지서 묶음 띠: 집·공과금·통신·금융·교육·교통·철마다 */
.bill { border-top-width: 0.3em; }
.bill[data-c="home"] { border-top-color: #8a5a32; } .bill[data-c="util"] { border-top-color: #3f7d93; } .bill[data-c="tel"] { border-top-color: #6c5a8e; } .bill[data-c="fin"] { border-top-color: #4a5a6a; } .bill[data-c="edu"] { border-top-color: #4f7f3f; } .bill[data-c="move"] { border-top-color: #8a7a2a; } .bill[data-c="season"] { border-top-color: var(--red); }
.bill .stamp { position: absolute; right: 0.15em; bottom: 0.3em; font-style: normal; font-family: var(--font-d); font-size: 0.66em; color: var(--red); border: 0.14em solid var(--red); border-radius: 0.3em; padding: 0 0.2em; transform: rotate(-14deg); opacity: 0.85; pointer-events: none; }
.bill.paid { animation: paid 0.7s ease-in forwards; pointer-events: none; }
.bill .paid-st { right: auto; left: 50%; top: 40%; bottom: auto; font-size: 1em; margin-left: -1.3em; animation: stampIn 0.18s ease-out; }
@keyframes stampIn { from { transform: scale(2.2) rotate(-14deg); opacity: 0; } }
@keyframes paid { 0%, 55% { opacity: 1; } 100% { opacity: 0; transform: translateY(-0.6em) rotate(4deg); } }
.bill kbd { position: absolute; left: 0.2em; top: 0.12em; font: 700 0.5em var(--font-b); color: #b3a08a; }
.bill.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-0.2em); } 75% { transform: translateX(0.2em); } }
.pg-foot { display: flex; align-items: center; gap: 0.5em; padding: 0.35em 0.45em; background: var(--wood); border-top: 0.12em solid #2a1d14; min-width: 0; }
.shopb { position: relative; flex: 0 0 auto; display: flex; align-items: center; height: 2.6em; padding: 0 1.9em 0 1.1em; border: 0; border-radius: 0.35em; background: var(--paper); color: var(--ink); box-shadow: 0 0.16em 0 #1c130c; }
.shopb span { font-family: var(--font-d); font-size: 1.08em; }
.shopb em { position: absolute; top: 0.25em; right: 0.25em; min-width: 1.4em; height: 1.4em; border-radius: 1em; background: var(--red); color: #fff; font: 700 0.72em/1.4em var(--font-b); text-align: center; padding: 0 0.3em; }
.shopb:active { transform: translateY(0.1em); box-shadow: 0 0.06em 0 #1c130c; }
.finfo { flex: 1 1 auto; min-width: 0; font-size: 0.78em; color: var(--paper2); text-align: right; white-space: nowrap; overflow: hidden; }

/* 알림·안내·연말 */
.pg-toast { position: absolute; left: 0; right: 0; top: 0.5em; display: flex; justify-content: center; pointer-events: none; z-index: 3; }
.pg-toast p { margin: 0 0.6em; max-width: 92%; padding: 0.35em 0.8em; border-radius: 2em; background: rgba(59, 42, 30, 0.88); color: var(--paper); font-size: 0.8em; font-weight: 700; text-align: center; word-break: keep-all; animation: toastIn 0.3s var(--ease); }
.pg-toast p.bad { background: rgba(163, 54, 44, 0.92); } .pg-toast p.good { background: rgba(63, 120, 80, 0.92); }
@keyframes toastIn { from { transform: translateY(-0.6em); opacity: 0; } }
.pg-tip { position: absolute; left: 50%; bottom: 0.6em; transform: translateX(-50%); width: min(92%, 22em); padding: 0.55em 0.8em 0.45em; border-radius: 0.5em; background: var(--paper); color: var(--ink); box-shadow: 0 0.3em 0.8em rgba(40, 25, 15, 0.35); z-index: 3; pointer-events: none; display: grid; gap: 0.15em; border-left: 0.3em solid var(--red); }
.pg-tip b { font-family: var(--font-d); font-weight: 400; font-size: 1em; }
.pg-tip span { font-size: 0.78em; line-height: 1.45; word-break: keep-all; }
.pg-tip .skip { pointer-events: auto; justify-self: end; border: 0; background: none; font-size: 0.68em; color: var(--ink2); text-decoration: underline; padding: 0.3em 0; min-height: 2.6em; }
.pg-eve { position: absolute; left: 0; right: 0; bottom: 0.4em; display: flex; justify-content: center; pointer-events: none; z-index: 2; }
.pg-eve p { margin: 0; padding: 0.3em 0.9em; border-radius: 2em; background: #2b3a6b; color: #ffe9a8; font-size: 0.78em; font-weight: 700; }

/* 가게 */
.pg-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; z-index: 5; background: var(--paper); color: var(--ink); border-radius: 0.8em 0.8em 0 0; box-shadow: 0 -0.4em 1.2em rgba(30, 20, 12, 0.45); display: flex; flex-direction: column; animation: sheetIn 0.28s var(--ease); }
.piggy.land .pg-sheet { left: 50%; width: 36em; margin-left: -18em; max-height: 92%; }
@keyframes sheetIn { from { transform: translateY(30%); opacity: 0; } }
.sh-h { display: flex; align-items: center; gap: 0.6em; padding: 0.6em 0.8em 0.3em; }
.sh-h h2 { margin: 0; font-family: var(--font-d); font-weight: 400; font-size: 1.3em; }
.sh-m { margin: 0 0 0 auto; display: flex; align-items: baseline; gap: 0.35em; font-family: var(--font-d); white-space: nowrap; }
.sh-m span { font-family: var(--font-b); font-size: 0.72em; font-weight: 700; color: var(--ink2); }
.sh-note { margin: 0 0.8em 0.4em; font-size: 0.72em; color: var(--ink2); word-break: keep-all; }
.sh-b { overflow-y: auto; padding: 0 0.6em 0.8em; display: grid; gap: 0.35em; }
.up { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.55em; padding: 0.4em 0.5em; border-radius: 0.45em; background: var(--paper2); }
.up .u-art { width: 2.7em; height: 2.7em; display: block; }
.up .u-t { display: grid; gap: 0.05em; min-width: 0; }
.up .u-t b { font-family: var(--font-d); font-weight: 400; font-size: 1em; white-space: nowrap; }
.up .u-t b small { font-family: var(--font-b); font-size: 0.7em; font-weight: 700; color: var(--ink2); }
.up .u-t span { font-size: 0.72em; color: var(--ink2); word-break: keep-all; }
.up.max { opacity: 0.7; }
.btn { border: 0; border-radius: 0.4em; padding: 0.5em 0.9em; min-height: 2.85em; background: var(--paper3); color: var(--ink); font-weight: 700; font-size: 0.86em; white-space: nowrap; box-shadow: 0 0.12em 0 rgba(59, 42, 30, 0.35); }
.btn.pri { background: var(--red); color: #fff; box-shadow: 0 0.14em 0 var(--red2); }
.btn.warn { background: #f3d3cc; color: var(--red2); }
.btn.ghost { background: transparent; box-shadow: none; text-decoration: underline; }
.btn.buy { min-height: 3.05em; min-width: 6.2em; background: var(--wood2); color: #ffe7a6; font-family: var(--font-d); font-weight: 400; font-size: 0.82em; }
.btn:disabled { opacity: 0.45; box-shadow: none; }
.btn:active:not(:disabled) { transform: translateY(0.08em); }

/* 창 */
.pg-modal { position: absolute; inset: 0; z-index: 8; background: rgba(30, 20, 12, 0.55); display: grid; place-items: center; padding: 0.6em; }
.md { width: min(100%, 25em); max-height: 100%; overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 0.7em; padding: 1em 1.1em; box-shadow: 0 0.6em 1.6em rgba(20, 12, 6, 0.45); display: grid; gap: 0.5em; animation: mdIn 0.3s var(--ease); }
@keyframes mdIn { from { transform: translateY(0.8em) scale(0.97); opacity: 0; } }
.md h2 { margin: 0; font-family: var(--font-d); font-weight: 400; font-size: 1.45em; line-height: 1.2; word-break: keep-all; }
.md h3 { margin: 0.6em 0 0.1em; font-size: 0.92em; }
.md p { margin: 0; font-size: 0.86em; line-height: 1.6; word-break: keep-all; }
.md p.lead { font-size: 0.92em; }
.md .small, .tr-d .small { font-size: 0.72em; color: var(--ink2); }
.md .row { display: flex; gap: 0.5em; justify-content: flex-end; flex-wrap: wrap; margin-top: 0.3em; }
.md-list { display: grid; gap: 0.4em; }
.md-list .btn { width: 100%; }
.md-scroll { overflow-y: auto; max-height: 60vh; display: grid; gap: 0.5em; padding-right: 0.2em; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35em; font-size: 0.86em; }
.how li { display: flex; gap: 0.55em; align-items: baseline; word-break: keep-all; }
.how b { flex: 0 0 auto; font-family: var(--font-d); font-weight: 400; color: var(--red); width: 1.6em; }
.kinds { margin: 0; padding-left: 1.1em; font-size: 0.82em; display: grid; gap: 0.25em; }
.kinds li { word-break: keep-all; }
.kv { border-collapse: collapse; width: 100%; font-size: 0.86em; }
.kv th, .kv td { padding: 0.28em 0.2em; border-bottom: 1px dashed var(--line); text-align: left; }
.kv td { text-align: right; font-weight: 700; } .kv td.bad { color: var(--red2); }
.hist { margin: 0; padding-left: 1.1em; font-size: 0.8em; }
.md .next { background: var(--paper2); border-radius: 0.4em; padding: 0.5em 0.6em; }
.md .award { font-size: 1em; display: flex; align-items: center; gap: 0.3em; justify-content: center; }
.md .award b { font-family: var(--font-d); font-weight: 400; font-size: 1.5em; color: var(--red); }
.md.broke { text-align: center; } .md.broke .row { justify-content: center; }
.md canvas.ott { width: 5.5em; height: 5.5em; justify-self: center; animation: wobble 1.6s ease-in-out infinite; }
@keyframes wobble { 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
.md.win canvas.end { width: 100%; height: 8.5em; border-radius: 0.4em; }
.md.start h2 { font-size: 1.9em; }

/* 요령 나무 */
.pg-tree { position: absolute; inset: 0; z-index: 7; background: #2c2118; color: var(--paper); display: flex; flex-direction: column; }
.tr-h { display: flex; align-items: center; gap: 0.6em; padding: 0.55em 0.7em; background: var(--wood); flex-wrap: wrap; }
.tr-h h2 { margin: 0; font-family: var(--font-d); font-weight: 400; font-size: 1.25em; color: #b9dca0; }
.tr-o { margin: 0 0 0 auto; display: flex; align-items: center; gap: 0.25em; font-size: 0.9em; white-space: nowrap; }
.tr-o canvas.ott-s { width: 1.7em; height: 1.7em; } .tr-o b { font-family: var(--font-d); font-weight: 400; font-size: 1.3em; color: #ffd0c4; }
.tr-main { flex: 1 1 auto; min-height: 0; display: flex; }
.piggy.port .tr-main { flex-direction: column; }
.tr-grid { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.2em; padding: 0.6em 0.4em 2.2em; align-items: end; }
.trunk { position: absolute; left: 50%; bottom: 0; width: 3.2em; height: 1.9em; margin-left: -1.6em; background: #6b4325; border-radius: 0.6em 0.6em 0 0; }
.tr-grid::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; bottom: 1.75em; height: 0.34em; background: #6b4325; border-radius: 1em; }
.br { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.br::before { content: ""; position: absolute; top: 0.8em; bottom: -0.55em; left: 50%; width: 0.3em; margin-left: -0.15em; background: #6b4325; border-radius: 1em; }
.br .nodes { position: relative; display: flex; flex-direction: column-reverse; align-items: center; gap: 0.3em; }
.br .bn { position: relative; margin: 0.3em 0 0; font-family: var(--font-d); font-size: 0.82em; color: #e7c38f; }
.node { position: relative; border: 0; background: none; display: grid; justify-items: center; gap: 0.1em; padding: 0.15em; min-width: 3.4em; max-width: 100%; }
.node .dot { width: 2.7em; height: 2.7em; border-radius: 50%; display: grid; place-items: center; background: #46602f; border: 0.16em solid #2a3a1c; color: #e8f3dc; font-style: normal; box-shadow: 0 0.12em 0 #1a130d; }
.node .dot span { font: 700 0.7em var(--font-b); }
.node .nm { font-size: 0.66em; line-height: 1.2; text-align: center; color: #e9dcc6; word-break: keep-all; max-width: 6.4em; }
.node.got .dot { background: #7fb069; border-color: #c9e7a8; color: #1f2d13; }
.node.full .dot { background: var(--gold); border-color: #fff0b8; color: #4a3410; }
.node.shut { opacity: 0.45; }
.node.can .dot { box-shadow: 0 0 0 0.18em #ffd0c4, 0 0.12em 0 #1a130d; }
.node.sel .dot { outline: 0.2em solid #fff; outline-offset: 0.1em; }
.tr-d { flex: 0 0 auto; background: var(--paper); color: var(--ink); padding: 0.7em 0.9em; display: grid; gap: 0.35em; align-content: start; }
.piggy.land .tr-d { width: 17em; }
.tr-d h3 { margin: 0; font-family: var(--font-d); font-weight: 400; font-size: 1.15em; }
.tr-d h3 small { font-family: var(--font-b); font-size: 0.65em; font-weight: 700; color: var(--ink2); }
.tr-d p { margin: 0; font-size: 0.82em; word-break: keep-all; line-height: 1.5; }
.tr-d .st { font-weight: 700; color: var(--red2); }
.tr-d .btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) {
  .bill, .md, .pg-sheet, .pg-toast p, .gau.hot, .md canvas.ott, .bill.paid, .bill.shake, .bill .paid-st { animation-duration: 0.01s !important; animation-iteration-count: 1 !important; }
  .gau .bar i { transition: none; }
}
