:root {
  color-scheme: dark;
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #080d1a;
  --panel: rgba(17, 24, 39, .88);
  --panel-2: rgba(30, 41, 59, .72);
  --line: rgba(148, 163, 184, .16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #38bdf8;
  --indigo: #818cf8;
  --green: #34d399;
  --gold: #fbbf24;
  --rose: #fb7185;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; background: radial-gradient(circle at 50% -10%, #172554 0, #0b1222 38%, var(--bg) 75%); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }

.ambient { position: fixed; z-index: -1; width: 420px; height: 420px; border-radius: 50%; filter: blur(100px); opacity: .13; pointer-events: none; }
.ambient-one { top: -120px; right: -100px; background: #2563eb; }
.ambient-two { bottom: -160px; left: -120px; background: #7c3aed; }
.game-shell { width: min(1440px, 100%); margin: 0 auto; padding: 22px clamp(14px, 3vw, 38px) 36px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(125, 211, 252, .3); border-radius: 15px; background: linear-gradient(145deg, #0ea5e9, #4f46e5); font-size: 24px; box-shadow: 0 12px 30px rgba(37, 99, 235, .25); }
.brand p, .eyebrow { margin: 0; color: #7dd3fc; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.brand h1 { margin: 2px 0 0; font-size: clamp(21px, 3vw, 29px); line-height: 1; letter-spacing: -.04em; }
.top-actions { display: flex; gap: 8px; }
.ghost-button, .icon-button, .text-button { border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; }
.ghost-button { border-radius: 11px; padding: 10px 14px; font-size: 13px; font-weight: 800; }
.icon-button { width: 40px; border-radius: 11px; font-size: 17px; }
.ghost-button:hover, .icon-button:hover { background: rgba(255,255,255,.09); }

.status-strip { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 17px; background: rgba(15, 23, 42, .72); backdrop-filter: blur(14px); }
.status-strip > div { min-width: 0; padding: 14px 18px; border-right: 1px solid var(--line); }
.status-strip > div:last-child { border-right: 0; }
.status-strip span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.status-strip strong { display: block; overflow: hidden; margin-top: 4px; color: #fff; font-size: clamp(15px, 2vw, 20px); text-overflow: ellipsis; white-space: nowrap; }

.notice { max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-8px); transition: .25s ease; }
.notice.show { max-height: 80px; margin-bottom: 14px; padding: 11px 15px; border: 1px solid rgba(52,211,153,.25); border-radius: 12px; background: rgba(6,78,59,.35); color: #a7f3d0; opacity: 1; transform: translateY(0); font-size: 13px; font-weight: 800; }
.notice.error { border-color: rgba(251,113,133,.3); background: rgba(127,29,29,.35); color: #fecdd3; }

.dashboard { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 14px; }
.management-column { display: grid; gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(30,41,59,.78), rgba(15,23,42,.9)); box-shadow: 0 18px 45px rgba(0,0,0,.18); backdrop-filter: blur(16px); }
.work-card, .promotion-card, .acquisition-card, .essentials-panel, .empire-panel { padding: clamp(18px, 2.5vw, 25px); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.035em; }
.eyebrow.gold { color: var(--gold); }
.eyebrow.violet { color: #c4b5fd; }
.eyebrow.green { color: #6ee7b7; }
.eyebrow.rose { color: #fda4af; }
.pill, .rank-badge { flex: 0 0 auto; border: 1px solid rgba(56,189,248,.2); border-radius: 999px; background: rgba(14,165,233,.1); padding: 7px 10px; color: #bae6fd; font-size: 11px; font-weight: 900; }
.violet-pill { border-color: rgba(167,139,250,.22); background: rgba(124,58,237,.14); color: #ddd6fe; }
.rank-badge { border-color: rgba(251,191,36,.25); background: rgba(217,119,6,.14); color: #fde68a; }
.muted { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.muted.small { margin: 0; font-size: 11px; }

.work-zone { position: relative; min-height: 330px; margin-top: 18px; overflow: hidden; border: 1px solid rgba(56,189,248,.13); border-radius: 18px; background: linear-gradient(#16213d 0 44%, #273449 44% 61%, #121827 61%); }
.desk-scene { position: absolute; inset: 0; opacity: .9; pointer-events: none; }
.window { position: absolute; top: 24px; left: 28px; display: flex; align-items: end; gap: 8px; width: 120px; height: 75px; padding: 10px; border: 5px solid #334155; background: linear-gradient(#0c4a6e, #38bdf8); }
.window i { flex: 1; border-radius: 3px 3px 0 0; background: rgba(255,255,255,.45); }
.window i:nth-child(1) { height: 35%; }.window i:nth-child(2) { height: 65%;}.window i:nth-child(3) { height: 48%;}
.plant { position: absolute; right: 30px; top: 54px; font-size: 38px; }
.monitor { position: absolute; top: 125px; left: 50%; display: grid; width: 185px; height: 94px; place-items: center; transform: translateX(-50%); border: 8px solid #1e293b; border-radius: 8px; background: #dbeafe; color: #1e3a8a; font-size: 11px; font-weight: 900; box-shadow: 0 0 34px rgba(56,189,248,.16); }
.monitor::after { position: absolute; top: 94px; width: 60px; height: 12px; background: #1e293b; content: ""; }
.coffee { position: absolute; top: 186px; left: calc(50% + 110px); font-size: 29px; }
.desk { position: absolute; inset: 220px 8% auto; height: 22px; border-radius: 6px; background: #854d0e; box-shadow: 0 58px 0 -7px #78350f; }
.work-button { position: absolute; z-index: 2; bottom: 20px; left: 50%; display: grid; width: 156px; height: 94px; place-items: center; transform: translateX(-50%); border: 0; border-radius: 22px; background: linear-gradient(145deg, #0ea5e9, #4f46e5); box-shadow: 0 12px 0 #312e81, 0 20px 35px rgba(37,99,235,.35); cursor: pointer; touch-action: manipulation; transition: transform .08s, box-shadow .08s, filter .2s; }
.work-button:hover { filter: brightness(1.08); }
.work-button:active, .work-button.pressed { transform: translate(-50%, 8px) scale(.98); box-shadow: 0 4px 0 #312e81, 0 10px 20px rgba(37,99,235,.25); }
.work-button strong { display: block; margin-top: -8px; font-size: 17px; }.work-button small { margin-top: -15px; color: #dbeafe; font-size: 10px; font-weight: 800; }.work-icon { font-size: 28px; }
.float-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.float-money { position: absolute; bottom: 96px; left: 50%; color: #fef08a; font-size: 16px; font-weight: 1000; text-shadow: 0 2px 8px #000; animation: moneyFloat .85s ease-out forwards; }
@keyframes moneyFloat { to { opacity: 0; transform: translate(var(--drift), -75px) scale(1.15); } }
.work-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.work-stats div { border-radius: 12px; background: rgba(255,255,255,.035); padding: 11px; }.work-stats span { display: block; color: var(--muted); font-size: 10px; }.work-stats strong { display: block; margin-top: 3px; font-size: 14px; }

.promotion-body, .company-focus { margin-top: 16px; }
.promotion-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.promotion-line strong { font-size: 17px; }.promotion-line span { color: var(--muted); font-size: 12px; }
.requirement-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 12px 0; }
.requirement { border-radius: 10px; background: rgba(255,255,255,.04); padding: 9px; color: var(--muted); font-size: 11px; font-weight: 800; }
.requirement.done { background: rgba(16,185,129,.1); color: #6ee7b7; }
.action-button { width: 100%; border: 0; border-radius: 12px; background: linear-gradient(90deg, #0284c7, #4f46e5); padding: 12px 14px; font-weight: 900; cursor: pointer; transition: .2s; }
.action-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }.action-button:disabled { cursor: not-allowed; opacity: .38; filter: grayscale(.5); }
.action-button.gold-button { background: linear-gradient(90deg, #d97706, #f59e0b); color: #1c1917; }
.company-focus { display: grid; grid-template-columns: 64px 1fr; gap: 13px; align-items: center; }
.company-logo { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid rgba(167,139,250,.2); border-radius: 18px; background: rgba(124,58,237,.12); font-size: 31px; }
.company-focus h3 { margin: 0; font-size: 19px; }.company-focus p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }.company-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 13px 0; }.company-prices div { border-radius: 10px; background: rgba(255,255,255,.04); padding: 9px; }.company-prices span { display: block; color: var(--muted); font-size: 10px; }.company-prices strong { display: block; margin-top: 3px; font-size: 12px; }

.content-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; margin-top: 14px; }
.item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.item-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); padding: 10px; }
.item-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: rgba(16,185,129,.1); font-size: 22px; }.item-card h3 { margin: 0; font-size: 12px; }.item-card p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.35; }.item-buy { min-width: 73px; border: 1px solid rgba(52,211,153,.2); border-radius: 10px; background: rgba(16,185,129,.1); padding: 7px; color: #a7f3d0; cursor: pointer; }.item-buy b, .item-buy span { display: block; }.item-buy b { font-size: 10px; }.item-buy span { margin-top: 2px; font-size: 8px; }.item-buy:disabled { cursor: not-allowed; opacity: .35; }
.progress-track { height: 8px; margin-top: 16px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.06); }.progress-track div { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #818cf8, #f472b6); transition: width .4s ease; }
.company-map { display: grid; gap: 11px; margin-top: 16px; }.company-tier { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); padding: 11px; }.tier-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }.tier-heading strong { font-size: 11px; }.tier-heading span { color: var(--muted); font-size: 9px; }.company-row { display: flex; flex-wrap: wrap; gap: 5px; }.company-chip { border: 1px solid rgba(148,163,184,.12); border-radius: 8px; background: rgba(15,23,42,.7); padding: 6px 7px; color: #64748b; font-size: 9px; font-weight: 800; }.company-chip.owned { border-color: rgba(52,211,153,.24); background: rgba(16,185,129,.1); color: #a7f3d0; }.company-chip.next { border-color: rgba(129,140,248,.38); color: #c7d2fe; box-shadow: 0 0 0 2px rgba(99,102,241,.08); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 4px 0; color: #64748b; font-size: 10px; }.text-button { border-radius: 8px; padding: 7px 9px; color: #94a3b8; font-size: 10px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(2,6,23,.8); backdrop-filter: blur(12px); }.modal-backdrop.hidden { display: none; }.modal { position: relative; width: min(440px, 100%); border: 1px solid rgba(148,163,184,.22); border-radius: 26px; background: linear-gradient(155deg, #1e293b, #0f172a); padding: 30px; text-align: center; box-shadow: 0 30px 90px #000; }.modal-icon, .ending-crown { display: grid; width: 72px; height: 72px; margin: 0 auto 17px; place-items: center; border-radius: 22px; background: linear-gradient(145deg,#0ea5e9,#4f46e5); font-size: 36px; }.modal h2 { margin: 7px 0 0; font-size: 25px; letter-spacing: -.045em; }.modal > p:not(.eyebrow) { color: #cbd5e1; font-size: 13px; line-height: 1.75; }.modal label { display: block; margin-top: 18px; color: #cbd5e1; font-size: 12px; font-weight: 900; text-align: left; }.modal input { width: 100%; margin-top: 7px; border: 1px solid #475569; border-radius: 12px; outline: 0; background: #0f172a; padding: 12px; color: white; }.modal input:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,.12); }.primary-button { width: 100%; margin-top: 14px; border: 0; border-radius: 13px; background: linear-gradient(90deg,#0284c7,#4f46e5); padding: 13px; font-weight: 900; cursor: pointer; }.modal-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.05); cursor: pointer; }.help-list { margin: 20px 0 0; padding: 0; list-style: none; text-align: left; }.help-list li { display: grid; grid-template-columns: 90px 1fr; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--line); }.help-list b { color: #7dd3fc; font-size: 12px; }.help-list span { color: #cbd5e1; font-size: 11px; line-height: 1.5; }.ending-modal { border-color: rgba(251,191,36,.3); }.ending-crown { background: linear-gradient(145deg,#f59e0b,#b45309); }

@media (max-width: 980px) {
  .dashboard, .content-grid { grid-template-columns: 1fr; }
  .management-column { grid-template-columns: 1fr 1fr; }
  .work-zone { min-height: 300px; }
}
@media (max-width: 680px) {
  .game-shell { padding-top: 14px; }
  .ghost-button { display: none; }
  .brand-mark { width: 42px; height: 42px; }
  .status-strip { grid-template-columns: 1fr 1fr; }
  .status-strip > div { padding: 11px 12px; border-bottom: 1px solid var(--line); }
  .status-strip > div:nth-child(2) { border-right: 0; }.status-strip > div:nth-child(n+3) { border-bottom: 0; }
  .management-column, .item-grid { grid-template-columns: 1fr; }
  .work-zone { min-height: 285px; }
  .window { left: 18px; transform: scale(.82); transform-origin: left top; }.plant { right: 18px; }
  .monitor { top: 112px; transform: translateX(-50%) scale(.86); }.desk { top: 205px; }
  .company-map { max-height: 420px; overflow-y: auto; padding-right: 3px; }
  footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
