* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  --ink: #edf4e9;
  --paper: #111813;
  --panel: #19221b;
  --work-green: #8fdb8d;
  --alert-red: #ff5d5d;
  --warning: #ffd166;
  --office-blue: #1f5f99;
  --office-grid: #d9e0e7;
  --office-paper: #ffffff;
  --office-ink: #202124;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #090d0a;
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", system-ui, sans-serif;
}

#app {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: radial-gradient(circle at 50% 12%, #26372a 0%, #090d0a 70%);
}

canvas#stage {
  display: block;
  width: 100%;
  height: 100%;
  background: #101713;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 8, 6, 0.72);
  backdrop-filter: blur(5px);
}

.overlay[hidden] { display: none; }

.panel {
  width: min(440px, 100%);
  padding: 30px 24px;
  border: 1px solid rgba(143, 219, 141, 0.35);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(31, 43, 34, 0.98), rgba(16, 23, 19, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warning);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 { margin: 0 0 14px; font-size: clamp(1.7rem, 7vw, 2.5rem); }
#overlay-message { margin: 0 0 24px; color: #c6d2c6; line-height: 1.7; }

button {
  min-width: 210px;
  padding: 16px 26px;
  border: 2px solid #d9e5d5;
  border-radius: 7px;
  background: linear-gradient(180deg, #f7f4df, #d8d3ba);
  color: #172019;
  font: 900 0.95rem/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 5px 0 #747d70, 0 12px 28px rgba(0, 0, 0, 0.45);
  transition: transform 90ms ease, box-shadow 90ms ease, border-color 90ms ease;
}

button:hover {
  border-color: var(--warning);
  box-shadow: 0 5px 0 #8b7c3e, 0 0 22px rgba(255, 209, 102, 0.28);
  transform: translateY(-1px);
}

button:active { transform: translateY(4px); box-shadow: 0 1px 0 #747d70; }
button:focus-visible { outline: 3px solid var(--warning); outline-offset: 4px; }

.fake-work-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: 34px 46px 1fr 28px;
  overflow: hidden;
  pointer-events: none;
  background: var(--office-paper);
  color: var(--office-ink);
  font: 13px/1.4 "Segoe UI", Arial, sans-serif;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  transition: opacity 55ms linear, transform 90ms ease-out, visibility 0s 90ms;
}

.fake-work-screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition-delay: 0s;
}

.fake-work-screen::before {
  content: "분기별 실적 보고서 - 업무용";
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--office-blue);
  color: #fff;
  font-weight: 600;
}

.fake-work-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  border-bottom: 1px solid #c8ced5;
  background: #f4f6f8;
  color: #34383d;
}

.fake-work-sheet {
  position: relative;
  overflow: hidden;
  background-color: #fff;
  background-image:
    linear-gradient(to right, transparent 79px, var(--office-grid) 80px),
    linear-gradient(to bottom, transparent 25px, var(--office-grid) 26px);
  background-size: 80px 26px;
  box-shadow: inset 42px 0 #f3f5f7, inset 0 26px #f3f5f7;
}

.fake-work-sheet::after {
  content: "매출 분석     비용 검토     진행률     담당자     비고";
  position: absolute;
  top: 31px;
  left: 50px;
  padding: 6px 12px;
  width: calc(100% - 70px);
  color: #1d3c28;
  font-weight: 700;
  word-spacing: 34px;
  background: rgba(198, 224, 180, 0.82);
  border: 2px solid #2f7d4a;
}

.fake-work-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-top: 1px solid #c8ced5;
  background: #f3f5f7;
  color: #4b5158;
}

.suspicion-meter {
  position: absolute;
  right: 18px;
  bottom: 44px;
  z-index: 2;
  width: min(280px, calc(100% - 36px));
  padding: 10px 12px;
  border: 1px solid #b8bec5;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: #30343a;
  font-weight: 700;
}

.suspicion-meter-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}

.suspicion-meter progress {
  display: block;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: #dfe4e8;
  accent-color: var(--alert-red);
}

.suspicion-meter progress::-webkit-progress-bar {
  border-radius: 6px;
  background: #dfe4e8;
}

.suspicion-meter progress::-webkit-progress-value {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--warning), var(--alert-red));
}

.suspicion-meter progress::-moz-progress-bar {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--warning), var(--alert-red));
}

.suspicion-meter::after {
  content: "SPACE를 유지하면 업무 화면을 계속 표시합니다";
  display: block;
  margin-top: 5px;
  color: #687078;
  font-size: 11px;
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  button,
  .fake-work-screen { transition: none; }
}
