:root{--navy:#1B2A4A;--orange:#F27A2B;--cream:#FBF5EA;--white:#fff;--red:#E5484D;--green:#2E7D3A;--gray:#5B6475;--line:#D8DEE8;--accent:var(--navy)}
*{box-sizing:border-box;margin:0;padding:0}
html{font-size:clamp(17px,1.2vw + 12px,22px)}
body{background:var(--cream);color:var(--navy);font-family:'Malgun Gothic','Apple SD Gothic Neo','Noto Sans KR',sans-serif;word-break:keep-all;line-height:1.45;min-height:100vh}
button,a.tile{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;user-select:none;-webkit-user-select:none}
:focus-visible{outline:4px solid var(--orange);outline-offset:3px}
header{background:var(--accent);color:#fff;display:flex;align-items:center;gap:8px;padding:10px 12px;position:sticky;top:0;z-index:5}
header h1{flex:1;font-size:1.35rem;min-width:0}
header h1 small{display:inline-block;font-size:.7rem;background:#fff;color:var(--navy);border-radius:99px;padding:2px 10px;margin-left:8px;vertical-align:middle}
.hbtn{min-width:64px;min-height:64px;border:0;border-radius:16px;background:rgba(255,255,255,.95);color:var(--navy)!important;display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;font-size:.7rem;font-weight:bold;padding:4px 8px}
.hbtn svg{width:30px;height:30px}
.hbtn.holding{background:#FFE2C9}
main{max-width:980px;margin:0 auto;padding:16px 16px 40px}
h2{font-size:1.7rem;text-align:center;margin:4px 0 16px}
.lead{text-align:center;font-size:1.15rem;margin:-8px 0 16px;color:var(--gray)}
.ic{width:96px;height:96px;display:block}
.ic.s{width:56px;height:56px}.ic.l{width:150px;height:150px}
.center{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center}
.grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.grid.three{grid-template-columns:repeat(3,1fr)}
.card{background:#fff;border:3px solid var(--line);border-radius:20px;padding:16px 10px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;font-weight:bold;min-height:64px;text-decoration:none;width:100%}
button.card:active,a.tile:active{transform:scale(.97)}
.card.on{border-color:var(--orange);background:#FFF3E8}
.card:disabled{opacity:.55;cursor:default}
.card .big{font-size:1.45rem}
.card .sub{font-size:.9rem;color:var(--gray);font-weight:normal}
.btn{min-height:68px;border:0;border-radius:18px;background:var(--orange);color:#fff!important;font-size:1.35rem;font-weight:bold;padding:12px 28px;width:min(100%,520px)}
.btn.second{background:#fff;color:var(--navy)!important;border:3px solid var(--navy)}
.btn.good{background:var(--green)}
.btn:disabled{opacity:.45;cursor:default}
.row{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:18px}
.row .btn{width:auto;flex:1 1 220px;max-width:420px}
.say{background:#fff;border:3px dashed var(--orange);border-radius:20px;padding:14px 16px;text-align:center;font-size:1.25rem;font-weight:bold;width:100%}
.say span{display:block;font-size:.85rem;color:var(--gray);font-weight:normal}
.note{background:#FDECEC;border:3px solid var(--red);border-radius:16px;padding:12px 16px;font-weight:bold;text-align:center;width:100%}
.tagline{display:inline-block;border-radius:99px;padding:2px 12px;font-size:.85rem;background:#EEF1F6}
.tagline.warn{background:#FDECEC;color:#A4161A}
/* ATM */
.dots{display:flex;gap:18px;justify-content:center}
.dots i{width:30px;height:30px;border-radius:50%;border:4px solid var(--navy);background:#fff}
.dots i.on{background:var(--navy)}
.keys{display:grid;grid-template-columns:repeat(3,minmax(72px,120px));gap:10px;justify-content:center}
.keys button{min-height:72px;font-size:1.8rem;font-weight:bold;border:3px solid var(--line);border-radius:16px;background:#fff}
.keys button.word{font-size:1.1rem}
.bills{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.bill{width:170px;height:82px;border-radius:12px;background:#D5EFD8;border:3px solid var(--green);display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:bold;font-size:1.35rem}
.bill small{font-size:.65rem;font-weight:normal}
.card .bill{width:110px;height:48px;font-size:1rem}
/* 마트 */
.budget{background:#fff;border:3px solid var(--line);border-radius:20px;padding:14px;margin-bottom:14px}
.budget .nums{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px;font-weight:bold}
.bar{height:30px;background:#EEF1F6;border-radius:99px;overflow:hidden;margin:8px 0}
.bar b{display:block;height:100%;background:var(--green)}
.budget.over{border-color:var(--red);background:#FDECEC}
.budget.over .bar b{background:var(--red)}
.facts{display:grid;gap:8px;width:100%;max-width:520px}
.facts div{display:flex;justify-content:space-between;gap:12px;background:#fff;border-radius:14px;padding:10px 16px;border:2px solid var(--line);font-weight:bold}
.list{width:100%;border-collapse:collapse;background:#fff;border-radius:14px;overflow:hidden}
.list td{padding:10px 12px;border-bottom:2px solid var(--line);font-weight:bold}
.list td:last-child{text-align:right;white-space:nowrap}
/* 창 */
.modal{position:fixed;inset:0;background:rgba(27,42,74,.72);z-index:20;display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:16px}
.sheet{background:var(--cream);border-radius:24px;padding:20px;width:min(100%,640px);margin:auto;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%}
.steps .card{padding:10px 4px}.steps .ic{width:64px;height:64px}
.panel button{min-height:64px;width:100%;border-radius:14px;border:3px solid var(--navy);background:#fff;font-weight:bold;font-size:1.05rem;padding:8px}
@media (max-width:560px){.grid{grid-template-columns:repeat(2,1fr)}.grid.three,.grid.one{grid-template-columns:1fr}.ic{width:72px;height:72px}.ic.l{width:120px;height:120px}header h1{font-size:1.1rem}header h1 small{display:none}.hbtn{min-width:60px}}
