/* 창업 100일 — 어두운 바탕, 크림색 글씨, 넓고 굵은 숫자, 각진 강조 카드 */
:root {
  --bg: #121110;
  --card: #1C1A18;
  --card2: #242120;
  --line: #34302C;
  --line2: #4C4640;
  --text: #EFE8DA;
  --muted: #9A9286;
  --dim: #6A645C;
  --gold: #E7B24C;
  --orange: #E8742C;
  --green: #5DBB63;
  --red: #E0533D;
  --violet: #8C86E6;
  --kr: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --num: "Archivo", "Pretendard Variable", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--kr); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overscroll-behavior-y: none; letter-spacing: -0.01em;
}
input, textarea, button { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { display: block; }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.dim { color: var(--dim); }
.gold { color: var(--gold); }
.kick { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; color: var(--muted); }
.kick.gold { color: var(--gold); }
.small { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 12px 2px; word-break: keep-all; }

.app { max-width: 480px; margin: 0 auto; padding: calc(10px + var(--safe-t)) 18px calc(108px + var(--safe-b)); }

/* ---------- 머리 ---------- */
.phead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.phead h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.mini { border: 1.5px solid var(--line2); border-radius: 14px; padding: 7px 12px 9px; min-width: 150px; }
.mini.plain { border: 0; padding: 0; min-width: 0; }
.mini-k { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.mini-v { display: flex; align-items: baseline; gap: 4px; margin-top: 1px; }
.mini-v .big { font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 22px; letter-spacing: -0.02em; }
.mini-v .mono { color: var(--muted); font-size: 12px; }
.mini-bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--gold); border-radius: 2px; transition: width .6s; }

/* ---------- 대표 카드 ---------- */
.hero { position: relative; border-radius: 22px; overflow: hidden; border: 1.5px solid var(--line2); margin-bottom: 18px; min-height: 360px; background: #0D0B0A; }
.hero.short { min-height: 0; }
.hero-art { position: absolute; inset: 0; }
.hero-art svg, .hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 9, 8, .8) 0%, rgba(10, 9, 8, .1) 34%, rgba(10, 9, 8, .05) 62%, rgba(10, 9, 8, .85) 88%); }
.hero-in { position: relative; padding: 18px 16px 16px; display: flex; flex-direction: column; min-height: 440px; }
.hero.short .hero-in { min-height: 0; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tagpill { font-size: 12px; font-weight: 700; padding: 4px 11px; border: 1.5px solid rgba(239, 232, 218, .35); border-radius: 999px; background: rgba(10, 9, 8, .45); white-space: nowrap; }
.hero-title { font-size: 46px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.1; margin-top: 14px; }
.hero-sub { font-size: 15px; font-weight: 500; color: rgba(239, 232, 218, .9); margin-top: 6px; }
.hero-rule { height: 1px; background: rgba(239, 232, 218, .2); margin: auto 0 14px; }
.hero.short .hero-rule { margin-top: 18px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tiles.five { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 4px 9px; border-radius: 13px;
  background: rgba(28, 26, 24, .62); border: 1.5px solid rgba(239, 232, 218, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tile .ti { width: 20px; height: 20px; color: var(--text); opacity: .9; }
.tile .n { font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
.tiles.five .n { font-size: 19px; }
.tile > span:last-child { font-size: 11.5px; font-weight: 600; color: rgba(239, 232, 218, .8); white-space: nowrap; }
.tile.hot .ti, .tile.hot .n { color: var(--orange); }
.tile .n.bump { animation: bump .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.25); color: var(--gold); } }
.ember { animation: rise 6s linear infinite; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .8; } 100% { transform: translateY(-60px); opacity: 0; } }

/* ---------- 공지 ---------- */
.note { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 16px; border: 1.5px solid var(--line2); background: var(--card); font-size: 13.5px; color: var(--muted); margin-bottom: 14px; word-break: keep-all; }
.note b { display: block; color: var(--text); font-size: 15px; margin-bottom: 1px; }
.note.warn { border-color: #6A3328; }
.note.promo { border-color: #6B5428; }
.ncrest { width: 40px; height: 40px; flex: none; }
.ncrest svg { width: 100%; height: 100%; }
.pips { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 4px; }
.pips i { width: 9px; height: 9px; border: 1.5px solid var(--line2); transform: rotate(45deg); }
.pips i.on { background: var(--gold); border-color: var(--gold); }

/* ---------- 구역 제목 ---------- */
.sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 2px 12px; font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.sec > span:first-child { display: flex; align-items: center; gap: 12px; flex: 1; white-space: nowrap; }
.sec > span:first-child::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec .mono { letter-spacing: .04em; font-size: 12.5px; }

/* ---------- 미션 ---------- */
.missions { display: flex; flex-direction: column; gap: 10px; }
.mission {
  position: relative; display: grid; grid-template-columns: 44px 1fr 32px; gap: 12px; align-items: center; padding: 13px 14px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: transform .1s, border-color .2s, background .2s;
}
.mission:active { transform: scale(.985); }
.qtile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #FFF6E6; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22); }
.qtile svg { width: 22px; height: 22px; }
.m-body { min-width: 0; }
.m-label { display: block; font-size: 16px; font-weight: 700; line-height: 1.35; word-break: keep-all; }
.m-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.m-meta .mono { font-size: 11.5px; color: var(--muted); }
.m-meta .mono:nth-of-type(2) { color: var(--gold); }
.m-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.hard { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 2px 8px; border: 1.5px solid var(--line2); color: var(--muted); border-radius: 0; }
.hard.on { border-color: var(--orange); color: var(--orange); background: rgba(232, 116, 44, .1); }
.mission.is-hard { border-color: rgba(232, 116, 44, .55); }
.tick { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; color: transparent; transition: all .2s; }
.tick svg { width: 18px; height: 18px; }
.mission.done { background: #171614; border-color: #2B3A2C; }
.mission.done .tick { background: var(--green); border-color: var(--green); color: #102411; }
.mission.done .m-label { color: var(--muted); }
.mission.done .qtile { filter: saturate(.5) brightness(.8); }
.mission.pop .tick { animation: tickPop .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes tickPop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
.mission.pop { animation: flash .6s; }
@keyframes flash { 0% { border-color: var(--green); background: #1E2A1F; } }

/* ---------- 버튼 ---------- */
.cta {
  display: block; width: 100%; margin-top: 18px; padding: 17px 16px; background: var(--orange); color: #FFF8EC;
  font-size: 17px; font-weight: 800; letter-spacing: .14em; border: 2px solid #F3E6CF; box-shadow: 5px 5px 0 #3A3530;
  transition: transform .08s, box-shadow .08s;
}
.cta:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #3A3530; }
.cta:disabled { background: var(--card2); color: var(--dim); border-color: var(--line2); box-shadow: none; }
.cta.ghost { background: transparent; color: var(--text); }
.hint { text-align: center; font-size: 12.5px; color: var(--dim); margin-top: 16px; word-break: keep-all; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-height: 48px; padding: 10px 12px;
  border: 1.5px solid var(--line2); background: var(--card2); font-size: 15px; font-weight: 700; border-radius: 12px;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.danger { border-color: #6A3328; color: var(--red); background: transparent; }
.row { display: flex; gap: 10px; }

/* ---------- 보상 연출 ---------- */
.floater { position: fixed; z-index: 80; pointer-events: none; font-family: var(--mono); font-weight: 600; font-size: 15px; transform: translateX(-50%); animation: floatUp 1.1s cubic-bezier(.2, .9, .3, 1) both; white-space: nowrap; }
.floater.xp { color: var(--text); }
.floater.coin { color: var(--gold); }
@keyframes floatUp { 0% { transform: translate(-50%, 8px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(-50%, -46px); opacity: 0; } }
.combo { position: fixed; z-index: 82; left: 50%; top: 40%; pointer-events: none; text-align: center; transform: translate(-50%, -50%); animation: combo .95s cubic-bezier(.3, 1.4, .5, 1) both; }
.combo b { font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 72px; line-height: 1; letter-spacing: -0.03em; text-shadow: 0 6px 30px rgba(0, 0, 0, .8); }
.combo b span { font-size: 34px; color: var(--muted); }
.combo small { display: block; font-family: var(--mono); font-size: 13px; letter-spacing: .4em; color: var(--gold); margin-top: 4px; }
@keyframes combo { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.85); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%); } }

/* ---------- 아래 탭 ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(6px + var(--safe-b)); background: rgba(18, 17, 16, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tabs[hidden] { display: none; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; color: var(--dim); font-size: 11px; font-weight: 700; }
.tab svg { width: 24px; height: 24px; }
.tab.is-on { color: var(--text); }
.tab.is-on span { border-bottom: 2px solid var(--gold); padding-bottom: 1px; }

/* ---------- 카드 공통 ---------- */
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
.lab { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.lab2 { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.row-b { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bign { font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 44px; line-height: 1.05; letter-spacing: -0.03em; margin-top: 8px; }
.bign small { font-family: var(--kr); font-stretch: normal; font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.chart { margin-top: 10px; }
.chart svg { width: 100%; height: auto; }
.legend { display: flex; gap: 12px; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px; letter-spacing: 0; flex-wrap: wrap; }
.legend.center { justify-content: center; margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.lg.me { background: var(--green); }
.lg.avg { background: repeating-linear-gradient(90deg, #6E675E 0 4px, transparent 4px 7px); }
.lg.bar { width: 10px; height: 10px; background: var(--orange); border-radius: 1px; }
.lg.dot { background: repeating-linear-gradient(90deg, var(--red) 0 2px, transparent 2px 5px); }
.lg.c-full, .lg.c-part, .lg.c-ins { width: 10px; height: 10px; border-radius: 3px; }
.lg.c-full { background: var(--gold); }
.lg.c-part { border: 1.5px solid var(--gold); }
.lg.c-ins { background: #4E6FB0; }

/* 성장 */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.duo .card { margin: 0; }
.stack { position: relative; padding: 0 4px 6px 0; }
.stack::before { content: ""; position: absolute; inset: 6px 0 0 6px; border: 1.5px solid var(--line); border-radius: 18px; background: #191715; transform: rotate(2deg); }
.card.tilt { position: relative; background: #211E1B; transform: rotate(-1.2deg); }
.nxt { font-size: 13.5px; font-weight: 600; line-height: 1.5; margin: 8px 0 0; word-break: keep-all; }
.gcards { display: flex; flex-direction: column; gap: 10px; }
.gcard { margin: 0; }
.gc-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; margin-bottom: 10px; }
.gc-head b { font-size: 16px; }
.gc-n { font-size: 15px; color: var(--text); }
.gsteps { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.gstep { display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #171614; color: var(--dim); font-size: 13px; font-weight: 600; line-height: 1.5; word-break: keep-all; }
.gstep .gs-n { font-size: 12px; padding-top: 1px; }
.gstep.on { background: rgba(93, 187, 99, .1); color: var(--text); }
.gstep.on .gs-n { color: var(--green); }
.seg { position: relative; height: 12px; background: #2A2724; overflow: hidden; }
.seg > b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); transition: width .6s; }
.seg .cut { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--card); }
.seg.thin { height: 5px; }
.seg.gold > b { background: linear-gradient(90deg, #A9742F, #E7B24C); }
.seg.gold { height: 24px; background: #1E1B18; border: 1.5px solid #4A4035; }
.seg.gold .cut { background: #4A4035; width: 1.5px; }
.seg.thin { height: 6px; margin: 6px 0 3px; }
.seg.thin > b { background: var(--gold); }
.seg.thin.orange > b { background: var(--orange); }
.froad { padding: 12px 14px; }
.fr-head { display: grid; grid-template-columns: 44px 1fr 20px; gap: 12px; align-items: center; color: var(--dim); }
.fr-head b { display: block; color: var(--text); font-size: 16px; }
.fr-head .mono { font-size: 11.5px; }
.fr-head > svg { width: 18px; height: 18px; }
.fr-em { width: 44px; height: 44px; filter: grayscale(.6) brightness(.8); }
.fr-em svg { width: 100%; height: 100%; }
.fr-list { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line2); display: flex; flex-direction: column; gap: 7px; }
.fr-list li, .ev-list li { font-size: 13px; font-weight: 600; color: #CFC7B8; word-break: keep-all; display: flex; gap: 8px; align-items: baseline; }
.chip { flex: none; font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 1px 6px; border: 1.5px solid; letter-spacing: .04em; }
.chip.new { color: var(--gold); border-color: var(--gold); }
.chip.up { color: var(--orange); border-color: var(--orange); }

/* 시즌 */
.rankbox { border: 2px solid #A9742F; background: #1A1714; padding: 16px; margin-bottom: 14px; }
.rb-top { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; }
.rb-em { width: 76px; height: 76px; }
.rb-em svg { width: 100%; height: 100%; }
.rb-name { display: block; font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.15; margin-top: 2px; }
.rb-sub { display: block; font-size: 13.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.rb-cut { border-top: 1.5px dashed #4A4035; margin: 14px -16px 14px; }
.rb-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.rb-line b { font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 17px; }
.rb-ends { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--dim); margin-top: 6px; }
.rb-promo { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--gold); }
.rb-rewards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 14px; }
.rw { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; padding: 11px 10px; border: 1.5px solid var(--line2); background: #171513; }
.rw-ic { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); }
.rw-ic svg { width: 100%; height: 100%; }
.rw-ic.lock svg { width: 24px; height: 24px; }
.rw b { display: block; font-size: 14px; }
.rw > span > span:not(.mono) { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.rw .mono { font-size: 11px; color: var(--muted); }
.board { border: 1.5px solid var(--line2); background: var(--card); margin-bottom: 12px; }
.lrow { display: grid; grid-template-columns: 26px 40px 1fr auto; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.lrow .rk { font-size: 15px; color: var(--muted); }
.lr-em { width: 40px; height: 40px; }
.lr-em svg { width: 100%; height: 100%; }
.lr-b b { display: block; font-size: 16px; }
.lr-b b em { font-style: normal; font-size: 12px; color: var(--orange); margin-left: 4px; }
.lr-b span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 1px; word-break: keep-all; }
.lr-x { text-align: right; }
.lr-x b { display: block; font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 16px; }
.lr-x .mono { font-size: 11px; color: var(--muted); }
.lrow.me { background: #3A2716; }
.lrow.me .rk, .lrow.me .lr-x .mono { color: var(--orange); }
.lrow.locked .lr-em { filter: grayscale(1) brightness(.6); }
.lrow.locked .lr-b b, .lrow.locked .lr-x b { color: var(--muted); }
.lrow.past .lr-x .mono { color: var(--green); }
.s2 p { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; line-height: 1.6; word-break: keep-all; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { padding: 12px 14px; border: 1.5px solid var(--line2); }
.kpi span { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.kpi b { display: block; font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 24px; letter-spacing: -0.02em; margin-top: 2px; }
.kpi b small { font-family: var(--kr); font-stretch: normal; font-size: 13px; color: var(--muted); margin-left: 3px; }

/* 장부 */
.cal-card { padding: 14px 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 2px; }
.cal-head button { width: 36px; height: 36px; border: 1.5px solid var(--line2); border-radius: 10px; font-size: 20px; line-height: 1; color: var(--muted); }
.cal-title { font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 20px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--dim); padding-bottom: 2px; }
.cell { aspect-ratio: 1; border-radius: 9px; background: #171614; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.cell.blank { background: none; }
.cell.full { background: var(--gold); color: #2A1E08; font-weight: 600; }
.cell.part { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--text); }
.cell.ins { background: #4E6FB0; color: #fff; }
.cell.today { outline: 2px solid var(--text); outline-offset: 1px; }
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed .card { margin: 0; }
.news .mono { font-size: 11.5px; }
.news b { display: block; font-size: 16px; margin-top: 4px; word-break: keep-all; }
.news p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); word-break: keep-all; }
.news p.txt { color: var(--text); }
.empty { text-align: center; color: var(--dim); padding: 18px 0; font-size: 13.5px; }

/* 입력 */
.form { padding: 4px 14px; }
.field { padding: 12px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; word-break: keep-all; }
.field input[type="text"], .field input[type="time"], .field textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--line2); border-radius: 12px; background: #141312; font-size: 16px; font-weight: 600;
  outline: none; -webkit-appearance: none; appearance: none; min-height: 48px; color-scheme: dark;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.switch { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 700; }
.switch input { width: 24px; height: 24px; accent-color: var(--orange); }

/* 아래에서 올라오는 창 */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; }
.overlay[hidden] { display: none; }
.sheet { width: 100%; max-width: 480px; background: #191715; border: 1.5px solid var(--line2); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 10px 18px calc(22px + var(--safe-b)); max-height: 92vh; overflow-y: auto; animation: up .3s cubic-bezier(.2, .9, .3, 1); }
@keyframes up { from { transform: translateY(100%); } }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line2); margin: 0 auto 14px; }
.sheet h3 { font-size: 22px; font-weight: 800; margin: 6px 0 4px; }
.sheet .field { border: 0; }
.r-title { font-size: 34px; font-weight: 900; letter-spacing: -0.03em; margin-top: 6px; }
.r-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.receipt { margin-top: 16px; padding: 6px 16px 18px; background: #EFE8DA; color: #1C1A18; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 95% 100%, 90% calc(100% - 8px), 85% 100%, 80% calc(100% - 8px), 75% 100%, 70% calc(100% - 8px), 65% 100%, 60% calc(100% - 8px), 55% 100%, 50% calc(100% - 8px), 45% 100%, 40% calc(100% - 8px), 35% 100%, 30% calc(100% - 8px), 25% 100%, 20% calc(100% - 8px), 15% 100%, 10% calc(100% - 8px), 5% 100%, 0 calc(100% - 8px)); }
.r-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed #B9B0A0; font-size: 14px; font-weight: 600; animation: rin .3s both; }
.r-row .mono { font-size: 13.5px; }
@keyframes rin { from { opacity: 0; transform: translateY(4px); } }
.r-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 2px; font-weight: 800; }
.r-total b { font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 26px; letter-spacing: -0.02em; }

/* 전체 화면 이벤트 */
.event { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(20px + var(--safe-t)) 22px calc(26px + var(--safe-b)); text-align: center; overflow: hidden; background: #0C0A09; animation: fadeIn .25s both; }
@keyframes fadeIn { from { opacity: 0; } }
.ev-glow { position: absolute; left: 50%; top: 36%; width: 520px; height: 520px; margin: -260px 0 0 -260px; background: radial-gradient(closest-side, rgba(232, 116, 44, .28), rgba(232, 116, 44, 0)); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .8; } }
.event > *:not(.ev-glow):not(canvas) { position: relative; z-index: 2; }
.event canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.ev-k { animation: rin .4s .1s both; }
.ev-em { width: 170px; height: 170px; margin: 14px auto 4px; animation: emIn .9s .3s cubic-bezier(.2, 1.3, .4, 1) both; }
.ev-em svg { width: 100%; height: 100%; }
@keyframes emIn { 0% { transform: scale(.3) translateY(30px); opacity: 0; filter: brightness(3); } 60% { opacity: 1; filter: brightness(1.6); } 100% { transform: none; filter: none; } }
.ev-from { font-size: 14px; color: var(--dim); text-decoration: line-through; animation: rin .4s .8s both; }
.ev-title { font-size: 48px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.1; margin-top: 4px; animation: rin .5s .9s both; }
.ev-title.sm { font-size: 36px; margin-top: 10px; }
.ev-sub { font-size: 14.5px; color: var(--muted); margin-top: 8px; max-width: 320px; word-break: keep-all; }
.ev-list { list-style: none; margin: 20px 0 0; padding: 14px; width: 100%; max-width: 360px; text-align: left; border: 1.5px solid var(--line2); background: var(--card); display: flex; flex-direction: column; gap: 8px; animation: rin .4s 1.1s both; }
.event .cta { max-width: 360px; animation: rin .4s 1.3s both; }
.event .news-cta { animation-delay: .5s; margin-top: 26px; }
.chest { width: 200px; height: 184px; margin: 30px auto 0; cursor: pointer; animation: wob 1.6s ease-in-out infinite; }
.chest svg { width: 100%; height: 100%; overflow: visible; }
@keyframes wob { 0%, 65%, 100% { transform: none; } 75% { transform: rotate(-4deg); } 85% { transform: rotate(4deg); } 92% { transform: rotate(-2deg); } }
.chest.open { animation: none; }
.chest .lid { transform-box: fill-box; transform-origin: 90% 100%; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.chest.open .lid { transform: translateY(-12px) rotate(14deg); }
.chest .gold { opacity: 0; transform: translateY(14px); transition: transform .4s .1s cubic-bezier(.3, 1.6, .5, 1), opacity .2s .1s; }
.chest.open .gold { opacity: 1; transform: none; }
.loot { min-height: 96px; margin-top: 8px; }
.l-big { font-family: var(--num); font-stretch: 125%; font-weight: 900; font-size: 46px; letter-spacing: -0.03em; color: var(--gold); animation: rin .4s both; }
.l-big small { font-family: var(--kr); font-stretch: normal; font-size: 20px; margin-left: 2px; }
.l-rare { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .3em; color: var(--violet); border: 1.5px solid var(--violet); padding: 2px 10px; margin-bottom: 6px; }
.newscard { width: 100%; max-width: 360px; background: #EFE8DA; color: #1C1A18; padding: 16px 18px 20px; text-align: left; transform: rotate(-1.5deg); box-shadow: 8px 8px 0 #2A2622; animation: paper .55s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes paper { 0% { transform: translateY(70vh) rotate(12deg); } 100% { transform: rotate(-1.5deg); } }
.nc-mast { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px double #1C1A18; padding-bottom: 8px; margin-bottom: 12px; }
.nc-mast b { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.nc-mast span { font-family: var(--mono); font-size: 12px; color: #6A645C; }
.nc-flag { display: inline-block; font-size: 12px; font-weight: 800; color: #fff; background: var(--red); padding: 2px 8px; }
.nc-h { font-size: 26px; font-weight: 900; line-height: 1.25; letter-spacing: -0.03em; margin-top: 10px; word-break: keep-all; }
.nc-b { font-size: 14px; color: #4A453F; margin-top: 8px; word-break: keep-all; }

/* 첫 화면 */
.onb { padding-top: 8px; }
.onb-art { position: relative; height: 230px; border-radius: 22px; overflow: hidden; border: 1.5px solid var(--line2); margin-bottom: 20px; }
.onb-art svg { width: 100%; height: 100%; }
.onb-em { position: absolute; left: 16px; bottom: 14px; width: 70px; height: 70px; }
.onb h1 { font-size: 38px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.15; margin: 8px 0 12px; }
.onb p { font-size: 14.5px; color: var(--muted); margin: 0 0 18px; word-break: keep-all; line-height: 1.6; }

.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); z-index: 120; opacity: 0; transition: opacity .25s; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 700; padding: 10px 16px; border-radius: 12px; pointer-events: none; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
html, body { overflow-x: hidden; }

/* 그림 파일 */
.emb { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.hero-art img { object-position: center 30%; }
.onb-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; display: block; }
.chest { position: relative; width: 240px; height: 240px; margin: 18px auto 0; }
.chest img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .25s, transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.chest .c-open { opacity: 0; transform: scale(.9); }
.chest.open .c-closed { opacity: 0; }
.chest.open .c-open { opacity: 1; transform: scale(1.04); }
.chest::after { content: ""; position: absolute; left: 50%; top: 45%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; background: radial-gradient(closest-side, rgba(240, 178, 84, .35), rgba(240, 178, 84, 0)); opacity: 0; transition: opacity .4s; z-index: -1; }
.chest.open::after { opacity: 1; }
.ev-em { width: 210px; height: 210px; }
.rb-em { width: 84px; height: 84px; }
.rb-top { grid-template-columns: 84px 1fr; }
.lr-em, .fr-em { width: 46px; height: 46px; }
.lrow { grid-template-columns: 26px 46px 1fr auto; }
.fr-head { grid-template-columns: 46px 1fr 20px; }
.onb-em { width: 96px; height: 96px; }
.ncrest { width: 46px; height: 46px; }
.rw > span { min-width: 0; }
.rw .seg { max-width: 100%; }
.rw-ic img.emb { width: 34px; height: 34px; }
/* 테스트 모드 막대 */
.testbar { position: fixed; left: 0; right: 0; top: 0; z-index: 60; display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: calc(env(safe-area-inset-top) + 6px) 10px 6px; background: #2A1606; border-bottom: 1.5px solid var(--orange); scrollbar-width: none; }
.testbar::-webkit-scrollbar { display: none; }
.testbar .tb-k { flex: none; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--orange); letter-spacing: .08em; margin-right: 2px; }
.testbar button { flex: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--text); background: #171513; border: 1.5px solid var(--line2); padding: 6px 8px; }
.testbar button:active { transform: translateY(1px); }
body.is-test #app { padding-top: 44px; }
