:root {
  --bg: #101c27;
  --bg2: #15242f;
  --panel: #1b2d3a;
  --panel2: #22384a;
  --line: #2b4357;
  --text: #e8eef3;
  --muted: #8ba2b5;
  --dim: #5e7a90;
  --gold: #f5b83d;
  --gold2: #ffd572;
  --gold-ink: #3a2600;
  --up: #ff5468;
  --down: #4b93ff;
  --good: #3fd08f;
  --bad: #ff5468;
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 7px;
  --tab-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --display: 'Black Han Sans', 'Pretendard Variable', sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
html, body { overflow: hidden; }
/* 화면 전체를 고정 프레임으로: 사파리 툴바/홈 인디케이터 위에 탭이 정확히 붙도록 */
#app { position: fixed; inset: 0; overflow: hidden; display: flex; flex-direction: column; }
#login { overflow-y: auto; height: 100%; -webkit-overflow-scrolling: touch; }
/* 더블탭 확대 방지 + 연타 시 선택/하이라이트 방지 */
html, body, button, a, input, .tap { touch-action: manipulation; }
body {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input {
  font: inherit; color: var(--text);
  font-size: 16px; /* iOS 포커스 확대 방지 */
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 11px 12px; width: 100%; outline: none;
}
input:focus { border-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.num, .cash, .price { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.err { color: var(--bad); min-height: 1.2em; font-size: 13px; }
[hidden] { display: none !important; }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: var(--r-md);
  background: var(--panel2); color: var(--text); font-weight: 650; font-size: 14px;
  transition: transform .06s, filter .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .38; pointer-events: none; }
.btn.gold { background: var(--gold); color: var(--gold-ink); }
.btn.red { background: var(--up); color: #fff; }
.btn.blue { background: var(--down); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.big { min-height: 50px; font-size: 16px; width: 100%; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.btn.full { width: 100%; }
.btn .cost { font-weight: 500; opacity: .85; font-size: .9em; }

/* ── 로그인 ── */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 20px calc(24px + var(--safe-b)); }
.login-box { width: 100%; max-width: 360px; text-align: center; }
.logo-coin {
  width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold2), var(--gold) 55%, #b57d12);
  box-shadow: inset 0 0 0 6px #d99a22, inset 0 0 0 8px #ffd77a55;
  display: grid; place-items: center;
}
.logo-coin span { font-family: var(--display); font-size: 44px; color: var(--gold-ink); }
.brand { font-family: var(--display); font-weight: 400; font-size: 40px; margin: 0 0 8px; letter-spacing: -.5px; }
.login-sub { color: var(--muted); margin: 0 0 22px; }
#loginForm { display: grid; gap: 10px; }
#loginForm input { text-align: center; font-size: 18px; padding: 14px; }
.login-note { color: var(--dim); font-size: 12.5px; margin-top: 16px; }

/* ── 게임 레이아웃 ── */
.game { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; position: relative; }
.top { padding: calc(10px + var(--safe-t)) 16px 0; background: var(--bg); position: relative; z-index: 3; border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 8px; }
.cash-wrap { flex: 1; min-width: 0; }
.cash { font-family: var(--display); font-size: 30px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cash.neg { color: var(--bad); }
.sub { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.sub b { color: var(--text); font-weight: 650; }
.sub .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--panel); color: var(--muted); }
.ticker { margin: 8px -16px 0; height: 30px; overflow: hidden; position: relative; background: var(--bg2); }
.ticker-in { position: absolute; white-space: nowrap; line-height: 30px; font-size: 12.5px; color: var(--muted); will-change: transform; animation: tick 60s linear infinite; padding-left: 100%; }
.ticker-in span { margin-right: 28px; }
.ticker-in b { font-weight: 650; }
@keyframes tick { to { transform: translateX(-100%); } }

.view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 14px max(16px, env(safe-area-inset-left)) 24px max(16px, env(safe-area-inset-right)); }
.tabs {
  flex: none; position: relative; z-index: 5;
  display: grid; grid-template-columns: repeat(7, 1fr);
  height: calc(var(--tab-h) + max(var(--safe-b), 4px)); padding-bottom: max(var(--safe-b), 4px);
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
  background: var(--bg); border-top: 1px solid var(--line);
}
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--dim); font-size: 11px; font-weight: 600; }
.tabs i { font-style: normal; font-size: 20px; filter: grayscale(1) opacity(.55); transition: filter .15s; }
.tabs button.on { color: var(--text); }
.tabs button.on i { filter: none; }

/* ── 공용 블록 ── */
.sec { margin-bottom: 18px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.sec-h h2 { font-size: 17px; margin: 0; font-weight: 750; }
.sec-h .aside { color: var(--muted); font-size: 12.5px; }
.panel { background: var(--panel); border-radius: var(--r-lg); padding: 14px; }
.panel + .panel { margin-top: 10px; }
.rows > * + * { border-top: 1px solid var(--line); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.kv b { font-weight: 650; text-align: right; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hstack { display: flex; gap: 8px; align-items: center; }
.hstack.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.note { color: var(--dim); font-size: 12.5px; margin: 8px 2px 0; }
.empty { color: var(--dim); text-align: center; padding: 18px 8px; font-size: 14px; }

.seg { display: flex; background: var(--bg2); border-radius: var(--r-md); padding: 3px; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; min-height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 650; font-size: 13.5px; white-space: nowrap; }
.seg button.on { background: var(--panel2); color: var(--text); }
.seg.long button.on { background: var(--up); color: #fff; }
.seg.long button.on.short { background: var(--down); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; min-height: 32px; padding: 0 12px; border-radius: 99px; background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 600; }
.chips button.on { background: var(--text); color: var(--bg); }

/* 금액 입력 */
.amt { display: grid; gap: 6px; }
.amt-top { display: flex; gap: 6px; }
.amt-top input { flex: 1; text-align: right; font-weight: 650; }
.amt-q { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.amt-q button { min-height: 30px; border-radius: var(--r-sm); background: var(--bg2); color: var(--muted); font-size: 12.5px; font-weight: 650; }
.amt-hint { font-size: 12px; color: var(--dim); text-align: right; min-height: 1.2em; }

/* ── 일하기 ── */
.work-card { display: flex; align-items: center; gap: 12px; }
.work-card .title { font-weight: 750; font-size: 16px; }
.work-card .sub2 { color: var(--muted); font-size: 13px; }
.coin-stage { position: relative; height: 290px; display: grid; place-items: center; margin: 4px 0 6px; }
.coin {
  position: relative; width: 236px; height: 236px; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #fff3c4 0, var(--gold2) 18%, var(--gold) 52%, #c98a14 78%, #9a6406 100%);
  box-shadow:
    0 0 0 7px #d4951f,
    0 0 0 9px #8f5d08,
    0 14px 0 9px #6e4704,
    0 22px 40px rgba(0,0,0,.45);
  display: grid; place-items: center;
  transition: transform .05s;
  touch-action: manipulation;
}
.coin::before {
  content: ''; position: absolute; inset: 14px; border-radius: 50%;
  border: 2px dashed rgba(90, 58, 0, .35);
}
.coin .face { text-align: center; color: var(--gold-ink); pointer-events: none; }
.coin .face .w { font-family: var(--display); font-size: 64px; line-height: 1; display: block; }
.coin .face .l { font-weight: 800; font-size: 14px; opacity: .75; }
.coin.press { transform: translateY(6px) scale(.985); box-shadow: 0 0 0 7px #d4951f, 0 0 0 9px #8f5d08, 0 7px 0 9px #6e4704, 0 12px 24px rgba(0,0,0,.45); }
.pop {
  position: absolute; pointer-events: none; font-weight: 800; font-size: 18px; color: var(--gold2);
  text-shadow: 0 2px 0 rgba(0,0,0,.4); animation: pop .8s ease-out forwards; white-space: nowrap;
}
.pop.crit { color: #fff; font-size: 24px; }
.pop.crit small { display: block; font-size: 12px; color: var(--gold2); text-align: center; }
@keyframes pop { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -80px); } }
.click-stats { display: flex; justify-content: center; gap: 18px; color: var(--muted); font-size: 13px; }
.click-stats b { color: var(--text); }

.up-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.up-item { background: var(--panel); border-radius: var(--r-md); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.up-item .nm { font-weight: 650; font-size: 13.5px; }
.up-item .ef { color: var(--muted); font-size: 12px; }
.up-item.owned { opacity: .5; }
.log { font-size: 13px; }
.log div { padding: 6px 0; color: var(--muted); }
.log .good { color: var(--text); }
.log .bad { color: #ff9aa6; }

/* ── 사업 ── */
.biz { background: var(--panel); border-radius: var(--r-lg); padding: 12px; margin-bottom: 10px; }
.biz.locked .biz-head { opacity: .55; }
.biz-head { display: flex; gap: 10px; align-items: center; }
.biz-ic { font-size: 28px; width: 46px; height: 46px; border-radius: 12px; background: var(--bg2); display: grid; place-items: center; flex: none; }
.biz-head .nm { font-weight: 750; }
.biz-head .meta { color: var(--muted); font-size: 12.5px; }
.biz-inc { text-align: right; margin-left: auto; flex: none; white-space: nowrap; }
.biz-inc b { display: block; color: var(--good); font-size: 15px; }
.biz-inc span { color: var(--dim); font-size: 11.5px; }
.bar { height: 5px; background: var(--bg2); border-radius: 9px; overflow: hidden; margin: 10px 0 8px; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 9px; }
.biz-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.biz-btns .btn { flex-direction: column; gap: 0; min-height: 48px; padding: 4px 6px; font-size: 13px; line-height: 1.2; white-space: normal; }
.biz-btns .btn .cost { font-size: 11.5px; }

/* ── 시장 ── */
.mkt-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; }
.mkt-row .nm { font-weight: 650; }
.mkt-row .tk { color: var(--dim); font-size: 12px; }
.mkt-row .pr { margin-left: auto; text-align: right; }
.mkt-row .pr b { display: block; font-variant-numeric: tabular-nums; }
.mkt-row .pr span { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mkt-row .spark { width: 64px; height: 28px; flex: none; }
.mkt-row .hold { font-size: 11.5px; color: var(--gold); }
.chart-wrap { position: relative; height: 200px; margin: 6px -4px 4px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.big-price { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.pos { background: var(--panel); border-radius: var(--r-lg); padding: 12px; margin-bottom: 8px; }
.pos-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tag { font-size: 11.5px; font-weight: 750; padding: 2px 7px; border-radius: 6px; background: var(--panel2); }
.tag.long { background: rgba(255,84,104,.18); color: var(--up); }
.tag.short { background: rgba(75,147,255,.18); color: var(--down); }
.tag.gold { background: rgba(245,184,61,.18); color: var(--gold); }
.pnl { font-weight: 750; font-size: 16px; margin-left: auto; text-align: right; }
.range { width: 100%; accent-color: var(--gold); height: 28px; }
.lev-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.lev-label b { color: var(--text); font-size: 16px; }

/* ── 부동산 ── */
.prop { display: flex; gap: 10px; align-items: center; padding: 11px 2px; }
.prop .ic { font-size: 26px; width: 44px; text-align: center; flex: none; }
.prop .nm { font-weight: 650; }
.prop .meta { font-size: 12px; color: var(--muted); }
.prop > div:nth-child(2) { min-width: 0; flex: 1; }
.prop .r { margin-left: auto; text-align: right; white-space: nowrap; flex: none; }
.region-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.region { background: var(--panel); border-radius: var(--r-md); padding: 8px 4px; text-align: center; font-size: 12px; }
.region b { display: block; font-size: 14px; }

/* ── 은행 ── */
.gauge { height: 10px; border-radius: 9px; background: linear-gradient(90deg, #ff5468, #f5b83d 45%, #3fd08f); position: relative; margin: 10px 0 4px; }
.gauge i { position: absolute; top: -4px; width: 4px; height: 18px; background: #fff; border-radius: 2px; transform: translateX(-50%); }

/* ── 친구 ── */
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; }
.user-row .rk { width: 26px; text-align: center; font-weight: 800; color: var(--dim); }
.user-row .rk.podium { color: var(--gold); }
.user-row .nm { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.dot.on { background: var(--good); }
.user-row .me { font-size: 11px; color: var(--gold); }

/* ── 시트(모달) ── */
.sheet-bg { position: fixed; inset: 0; background: rgba(4, 10, 16, .6); z-index: 20; animation: fade .15s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 600px; margin: 0 auto;
  background: var(--bg2); border-radius: 18px 18px 0 0; max-height: 90%; overflow-y: auto;
  padding: 8px 16px calc(18px + var(--safe-b)); animation: up .2s ease-out;
}
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 2px auto 10px; }
.sheet h3 { margin: 0 0 4px; font-size: 19px; }
.sheet .panel { background: var(--panel); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + max(var(--safe-b), 4px) + 10px); z-index: 40; display: grid; justify-items: center; gap: 6px; pointer-events: none; padding: 0 12px; }
.toast { background: #24394b; border: 1px solid var(--line); color: var(--text); padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.35); max-width: 520px; animation: up .18s; }
.toast.bad { border-color: var(--bad); }
.toast.good { border-color: var(--good); }

.kicked { position: fixed; inset: 0; z-index: 50; background: rgba(8, 14, 20, .92); display: grid; place-items: center; padding: 24px; text-align: center; }
.kicked-box h2 { margin: 0 0 8px; }
.kicked-box p { color: var(--muted); margin: 0 0 18px; }

/* ── 카지노 (스테이크풍 레이아웃) ── */
.casino { display: grid; gap: 10px; }
.cz-games { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cz-games button { background: var(--panel); border-radius: var(--r-md); padding: 8px 2px; font-size: 12px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cz-games button i { font-style: normal; font-size: 22px; }
.cz-games button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 -3px 0 var(--gold); }
.cz-board { background: #0d1821; border-radius: var(--r-lg); position: relative; overflow: hidden; }
.cz-bet { background: var(--panel); border-radius: var(--r-lg); padding: 12px; display: grid; gap: 10px; }
.cz-bet label { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
.cz-inline { display: flex; gap: 6px; }
.cz-inline input { flex: 1; }
.cz-inline .btn { min-width: 46px; }
.cz-hist { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.cz-hist::-webkit-scrollbar { display: none; }
.cz-hist span { flex: none; font-size: 12px; font-weight: 750; padding: 4px 8px; border-radius: 6px; background: var(--panel); }
.cz-hist span.w { color: var(--good); }
.cz-hist span.l { color: var(--muted); }
.crash-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 52px; pointer-events: none; }
.crash-num.bust { color: var(--bad); }
.crash-num.won { color: var(--good); }
.dice-track { position: relative; height: 12px; border-radius: 9px; margin: 34px 14px 10px; }
.dice-mark { position: absolute; top: -34px; transform: translateX(-50%); background: #fff; color: #0d1821; font-weight: 800; font-size: 14px; padding: 3px 8px; border-radius: 6px; transition: left .35s cubic-bezier(.2,.8,.2,1); }
.dice-mark.w { background: var(--good); }
.dice-mark.l { background: var(--bad); color: #fff; }
.mines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 12px; }
.mines button { aspect-ratio: 1; border-radius: 9px; background: var(--panel2); box-shadow: 0 4px 0 #13222d; font-size: 26px; display: grid; place-items: center; transition: transform .08s; }
.mines button:active { transform: translateY(2px); }
.mines button.gem { background: #123a2c; box-shadow: none; }
.mines button.bomb { background: #4a1820; box-shadow: none; }
.mines button.reveal { opacity: .45; }
.mines button:disabled { cursor: default; }
.plinko-canvas { width: 100%; display: block; }
.limbo-num { font-family: var(--display); font-size: 56px; text-align: center; padding: 34px 0 6px; }
.limbo-num.w { color: var(--good); }
.limbo-num.l { color: var(--bad); }
.cz-stat { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

@media (min-width: 601px) {
  .game { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-in { animation-duration: 240s; }
  .pop { animation-duration: .4s; }
}
.sheet .amt-q button, .sheet input { background: var(--panel); }
.sheet .seg { background: var(--panel); }
.sheet .seg button.on:not(.short) { background: var(--panel2); }
.sheet .seg.long button.on { background: var(--up); }
.sheet .seg.long button.on.short { background: var(--down); }

/* ── 좁은 화면 대응 ── */
.tabs button { min-width: 0; }
.tabs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sec-h { flex-wrap: wrap; }
.kv b { min-width: 0; overflow-wrap: anywhere; }
.btn .cost { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 360px) {
  html, body { font-size: 14px; }
  .cash { font-size: 26px; }
  .tabs i { font-size: 18px; }
  .tabs { --tab-h: 56px; }
  .biz-btns .btn { font-size: 12px; }
  .region-grid { grid-template-columns: repeat(3, 1fr); }
  .cz-games button { font-size: 11px; }
}
.sheet { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.sub .good, .sub .bad { font-weight: 650; }

/* ── 본업 미니게임 ── */
.shift .bar { margin: 10px 0 0; }
.job-stage { position: relative; margin: 10px 0 8px; }
.job { background: var(--panel); border-radius: var(--r-lg); padding: 12px; min-height: 250px; }
.job-lock { position: absolute; inset: 0; border-radius: var(--r-lg); background: rgba(16, 28, 39, .86); display: grid; place-items: center; text-align: center; padding: 20px; z-index: 2; }
.job-lock p { margin: 6px 0 12px; }
.jg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.jg-streak { margin-left: auto; color: var(--gold); font-size: 12.5px; font-weight: 700; }
.jg-help { color: var(--dim); font-size: 12.5px; margin: 2px 0 10px; }
.jg-q { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; min-height: 34px; }
.jg-who { font-size: 13px; color: var(--muted); margin-right: 2px; }
.jg-chip { background: var(--bg2); border-radius: 8px; padding: 5px 9px; font-size: 13.5px; font-weight: 650; }
.jg-chip.ok { background: rgba(63, 208, 143, .18); color: var(--good); text-decoration: line-through; }
.jg-order { font-size: 18px; }
.jg-cup { background: var(--bg2); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; min-height: 42px; }
.jg-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.jg-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.jg-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.jg-btn {
  background: var(--panel2); border-radius: 10px; min-height: 58px; padding: 6px 4px; font-size: 12.5px; font-weight: 650;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 3px 0 #13222d;
  transition: transform .05s; word-break: keep-all; text-align: center; line-height: 1.2;
}
.jg-btn i { font-style: normal; font-size: 24px; }
.jg-btn.tall { min-height: 78px; font-size: 14px; }
.jg-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #13222d; }
.jg-btn:disabled { opacity: .3; box-shadow: none; }
.jg-doc { background: #f3efe4; color: #2a2418; border-radius: 10px; padding: 18px 14px; margin-bottom: 12px; text-align: center; font-size: 17px; }
.jg-doc .dim { color: #8a8170; }
.jg-sheet { background: var(--bg2); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.jg-sheet > div { display: flex; justify-content: space-between; padding: 5px 0; gap: 10px; }
.jg-sheet .sum { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 8px; font-size: 17px; }
.jg-sheet .title { justify-content: flex-start; }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* ── 부업 ── */
.gig { display: flex; align-items: center; gap: 10px; padding: 10px 2px; }
.gig.locked { opacity: .55; }
.gig-ic { font-size: 24px; width: 40px; height: 40px; border-radius: 10px; background: var(--bg2); display: grid; place-items: center; flex: none; }
.gig .nm { font-weight: 650; }
.prop button.ic { font-size: 26px; }

/* ── 가계부 ── */
.ledger { padding: 10px 14px; }
.lg-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 5px 0; font-size: 13.5px; align-items: baseline; }
.lg-row b { text-align: right; font-variant-numeric: tabular-nums; min-width: 72px; }
.lg-row b.dim { font-weight: 500; }
.lg-h { color: var(--dim); font-size: 11.5px; }
.lg-h span { text-align: right; min-width: 72px; }
.lg-sep { border-top: 1px solid var(--line); margin: 4px 0; }
.lg-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 9px; font-weight: 750; font-size: 14.5px; }
@media (max-width: 360px) { .jg-grid4 { grid-template-columns: repeat(3, 1fr); } }
