/* ============================================================
   ui.css — 포켓몬(GBA)풍 UI. 크림 박스 + 남색 이중 테두리 + 검은 텍스트.
   폰트: Galmuri(픽셀 한글) → 없으면 시스템 폰트 대체.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #2A2E3E;
  --paper: #F8F8F0;
  --paper2: #EAEAD8;
  --line: #3A4560;       /* 남색 테두리 */
  --line2: #A8B4CC;      /* 안쪽 밝은 테두리 */
  --shadow: #283040;
  --accent: #3A4560;
  --gold: #C9A24B;
}

html, body {
  height: 100%;
  background: #10131C;
  overflow: hidden;
  font-family: 'Galmuri11', 'Galmuri9', 'DungGeunMo', 'Segoe UI', sans-serif;
  color: var(--ink);
}

#stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }

canvas#game {
  image-rendering: pixelated; image-rendering: crisp-edges;
  background: #000;
  box-shadow: 0 0 0 4px #202838, 0 0 0 7px #0E1119, 0 10px 50px rgba(0,0,0,.7);
}

/* 포켓몬 박스 (공통) */
.pkbox {
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 7px;
  box-shadow: inset 0 0 0 2px var(--line2), 0 4px 0 var(--shadow), 0 8px 18px rgba(0,0,0,.45);
}

/* 레벨업 플래시 */
#stage.levelup::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255,240,180,.35), transparent 70%);
  animation: lvflash .9s ease-out;
}
@keyframes lvflash { 0%{opacity:0} 25%{opacity:1} 100%{opacity:0} }

/* 씬 전환 페이드 */
#fade { position: absolute; inset: 0; background: #0E1119; opacity: 0; pointer-events: none;
  transition: opacity .26s ease; z-index: 30; }
#fade.on { opacity: 1; }

/* ---- 툴팁 (요소 이름표) ---- */
#tooltip {
  position: fixed; display: none; z-index: 40; pointer-events: none;
  flex-direction: column; gap: 1px;
  background: var(--paper); border: 2px solid var(--line); border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px var(--line2), 2px 3px 0 var(--shadow);
  padding: 5px 10px; font-size: 13px;
}
#tooltip b { color: #8A2E3E; }
#tooltip span { font-size: 11px; opacity: .7; }

/* ---- HUD ---- */
#hud {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 6px 14px; font-size: 13px; white-space: nowrap;
}
#hud .chip { display: flex; align-items: center; gap: 4px; }
#hud .sep { color: var(--line2); }
#sceneTitle { color: #8A2E3E; }

.gauges { display: flex; gap: 8px; }
.gauge-wrap { display: flex; align-items: center; gap: 3px; font-size: 12px; }
.gauge-wrap .glabel { width: 14px; text-align: center; font-weight: bold; }
.gauge {
  width: 52px; height: 11px; background: #D8D8C8;
  border: 2px solid var(--line); border-radius: 4px; position: relative; overflow: hidden;
}
.gauge .fill { height: 100%; width: 0; transition: width .5s ease;
  background-image: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0) 50%); }
.gauge-wrap .glv { font-size: 10px; opacity: .8; }
.gauge-wrap.flash .gauge { box-shadow: 0 0 8px 2px rgba(255,240,150,.9); }

#soundBtn { background: none; border: none; cursor: pointer; font-size: 15px;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,.3)); }

/* ---- 마을로 버튼 ---- */
#backBtn {
  position: absolute; top: 12px; left: 12px; z-index: 20;
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--paper); border: 3px solid var(--line); border-radius: 6px;
  box-shadow: inset 0 0 0 2px var(--line2), 0 3px 0 var(--shadow);
  padding: 7px 14px; cursor: pointer;
}
#backBtn:hover { background: #FFFDF0; transform: translateY(-1px); }
#backBtn:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--line2); }

/* ---- 토스트 ---- */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--paper); border: 3px solid var(--line); border-radius: 6px;
  box-shadow: inset 0 0 0 2px var(--line2), 0 3px 0 var(--shadow);
  padding: 8px 16px; font-size: 13px;
  opacity: 0; transform: translateY(12px); transition: all .35s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---- 경험치 플로터 ---- */
.floater {
  position: fixed; z-index: 70; pointer-events: none; font-size: 15px; font-weight: bold;
  text-shadow: 1px 1px 0 #fff, -1px 1px 0 #fff, 1px -1px 0 #fff, -1px -1px 0 #fff;
  transition: all 1.2s ease-out; opacity: 1;
}
.floater.fly { transform: translateY(-60px); opacity: 0; }

/* ---- 요소 패널 (포켓몬 대화창) ---- */
#panel {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 105%);
  width: min(700px, 96vw); max-height: 64vh;
  z-index: 50; display: flex; flex-direction: column;
  background: var(--paper);
  border: 3px solid var(--line); border-radius: 9px;
  box-shadow: inset 0 0 0 2px var(--line2), 0 5px 0 var(--shadow), 0 10px 24px rgba(0,0,0,.5);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
}
#panel.open { transform: translate(-50%, -14px); }

.p-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: var(--paper2);
  border-bottom: 2px solid var(--line2); border-radius: 6px 6px 0 0;
}
#pIcon {
  font-size: 24px; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 2px solid var(--line); border-radius: 6px;
}
.p-title { flex: 1; }
#pName { font-size: 16px; color: #8A2E3E; }
#pAi { font-size: 11px; opacity: .65; display: block; margin-top: 2px; }
#pClose {
  background: var(--paper); border: 2px solid var(--line); border-radius: 5px; color: var(--ink);
  font-family: inherit; font-size: 13px; padding: 5px 11px; cursor: pointer;
  box-shadow: 0 2px 0 var(--shadow);
}
#pClose:hover { background: #FFFDF0; }
#pClose:active { transform: translateY(2px); box-shadow: none; }

.p-body { display: flex; overflow: hidden; flex: 1; min-height: 0; }
.p-left { flex: 1.1; padding: 12px 14px; border-right: 2px solid var(--line2); overflow-y: auto; }
.p-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }

#pDesc { font-size: 12px; opacity: .9; line-height: 1.65; margin-bottom: 10px; }
.p-sub { font-size: 11px; opacity: .6; margin-bottom: 6px; letter-spacing: 1px; }

#pQuests { display: flex; flex-direction: column; gap: 6px; }
.quest {
  display: flex; align-items: center; gap: 8px; text-align: left;
  font-family: inherit; font-size: 13px; color: var(--ink);
  background: var(--paper2); border: 2px solid var(--line2); border-radius: 5px;
  padding: 8px 10px; cursor: pointer; transition: all .12s;
}
.quest:hover:not(.done) { background: #FFFDF0; border-color: var(--line); transform: translateX(2px); }
.quest.done { opacity: .5; cursor: default; }
.quest.done .qtext { text-decoration: line-through; }
.qcheck {
  width: 18px; height: 18px; flex: none; border-radius: 3px;
  border: 2px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #3E8A5A;
}
.qtext { flex: 1; line-height: 1.4; }
.qstat { flex: none; font-size: 11px; color: #fff; padding: 3px 7px; border-radius: 3px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.35); }

/* 통합 빠른 할 일 추가 버튼 (플로팅) */
#addTaskBtn {
  position: absolute; top: 12px; right: 12px; z-index: 22;
  font-family: inherit; font-size: 14px; color: #11131F;
  background: var(--gold); border: 3px solid var(--line); border-radius: 6px;
  box-shadow: inset 0 0 0 2px #F0DCA0, 0 3px 0 var(--shadow);
  padding: 7px 14px; cursor: pointer;
}
#addTaskBtn:hover { background: #F4D878; transform: translateY(-1px); }
#addTaskBtn:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #F0DCA0; }

/* 할 일 추가 모달 */
#taskModal {
  position: fixed; inset: 0; z-index: 80; display: none;
  align-items: center; justify-content: center;
  background: rgba(10,13,22,.55);
}
#taskModal.open { display: flex; }
.tm-card { width: min(420px, 92vw); padding: 16px 18px; }
.tm-head { font-size: 16px; color: #8A2E3E; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tm-head button { background: none; border: none; font-family: inherit; font-size: 16px; cursor: pointer; color: var(--ink); }
#tmText {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 6px; padding: 10px 12px; outline: none;
}
.tm-label { font-size: 12px; color: #8A7550; margin: 12px 0 6px; }
.tm-opt { opacity: .6; }
.tm-tags { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tm-tag, .tm-quick {
  font-family: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
  background: var(--paper2); border: 2px solid var(--line2); border-radius: 6px; padding: 9px 8px;
}
.tm-tag:hover, .tm-quick:hover { background: #FFFDF0; }
.tm-tag.on { background: #FFF3D8; border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.tm-when { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tm-quick.on { background: #E4F0E4; border-color: #A8CCA8; }
#tmDate { font-family: inherit; font-size: 13px; padding: 7px 8px; border: 2px solid var(--line2); border-radius: 6px; flex: 1; min-width: 120px; }
.tm-actions { display: flex; gap: 8px; margin-top: 16px; }
.tm-actions button { flex: 1; font-family: inherit; font-size: 14px; cursor: pointer; padding: 10px; border-radius: 6px; }
#tmCancel { background: var(--paper2); border: 2px solid var(--line2); color: var(--ink); }
#tmAdd { background: var(--gold); border: 2px solid var(--line); color: #11131F; box-shadow: 0 2px 0 var(--shadow); }
#tmAdd:active { transform: translateY(2px); box-shadow: none; }

/* 건물 할 일 목록 (달력 패널 안) */
.tasklist { margin-bottom: 12px; }
.tasklist-head { font-size: 12px; color: #8A2E3E; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.tasklist-add { font-family: inherit; font-size: 11px; color: #11131F; cursor: pointer;
  background: var(--gold); border: 2px solid var(--line); border-radius: 4px; padding: 2px 8px; }
.task-empty { font-size: 12px; opacity: .5; padding: 4px 2px; }
/* 통합 달력: 넣을 건물 선택 */
.cal-bpick { font-size: 11px; color: #8A7550; margin: 2px 0 8px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cal-bp { font-family: inherit; font-size: 11px; color: var(--ink); cursor: pointer;
  background: var(--paper2); border: 2px solid var(--line2); border-radius: 4px; padding: 3px 8px; }
.cal-bp.on { background: #FFF3D8; border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.taskrow { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px;
  background: var(--paper2); border: 2px solid var(--line2); border-radius: 5px; margin-bottom: 4px; cursor: pointer; }
.taskrow input { width: 16px; height: 16px; cursor: pointer; }
.taskrow-text { flex: 1; }
.taskrow-text.doneln { text-decoration: line-through; opacity: .5; }
.taskrow-due { font-size: 11px; color: #8A6E3A; }
.taskrow-del { background: none; border: none; color: #B0463E; font-family: inherit; font-size: 12px; cursor: pointer; padding: 0 2px; }
.taskrow-del:hover { color: #8A2E3E; }
.taskrow-repeat { width: 16px; text-align: center; font-size: 12px; }

/* 반복 루틴 스케줄 라벨 + 비활성 */
.quest .qsched { margin-left: auto; font-size: 10px; color: #8A7550;
  background: var(--paper); border: 1.5px solid var(--line2); border-radius: 3px; padding: 1px 6px; }
.quest.inactive { opacity: .42; cursor: default; }
.quest[disabled] { cursor: default; }

/* 요소 패널 미니 제목 + 인라인 추가 */
.p-mini { font-size: 12px; color: #8A2E3E; margin: 10px 0 6px; display: flex; justify-content: space-between; align-items: center; }
.p-mini:first-child { margin-top: 0; }
.mini-add { font-family: inherit; font-size: 11px; color: #11131F; cursor: pointer;
  background: var(--gold); border: 2px solid var(--line); border-radius: 4px; padding: 2px 8px; }
.inline-add { display: flex; gap: 6px; margin-top: 8px; }
.inline-add input { flex: 1; font-family: inherit; font-size: 13px; color: var(--ink);
  background: #fff; border: 2px solid var(--line2); border-radius: 5px; padding: 8px 10px; outline: none; }
.inline-add button { font-family: inherit; font-size: 13px; color: #11131F; cursor: pointer;
  background: var(--gold); border: 2px solid var(--line); border-radius: 5px; padding: 0 14px; }
.ev-del { background: none; border: none; color: #B0463E; font-family: inherit; font-size: 12px; cursor: pointer; margin-left: 6px; }
.ev-tag { font-size: 10px; background: var(--line); color: #fff; border-radius: 3px; padding: 1px 5px; margin-right: 4px; }

/* AI 에이전트 가리기/펼치기 */
#chatToggle {
  background: var(--paper); border: 2px solid var(--line); border-radius: 5px; color: var(--ink);
  font-family: inherit; font-size: 12px; padding: 5px 9px; cursor: pointer; margin-right: 6px; box-shadow: 0 2px 0 var(--shadow);
}
#chatToggle:hover { background: #FFFDF0; }
#panel.chat-hidden .p-right { display: none; }
#panel.chat-hidden .p-left { border-right: none; }

/* 사업 PC 바탕화면 (윈도우식) */
.pc-screen { background: linear-gradient(160deg, #2E4A7A, #3E6EA8 55%, #5A8AC8);
  border: 2px solid var(--line); border-radius: 6px; padding: 0 0 12px; overflow: hidden; }
.pc-topbar { background: rgba(0,0,0,.28); color: #EAF0FA; font-size: 12px; padding: 6px 10px; }
.pc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px; }
.pc-app { position: relative; background: rgba(255,255,255,.10); border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 8px; padding: 10px 4px 8px; text-align: center; cursor: pointer; transition: all .12s; }
.pc-app:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.pc-ic { font-size: 26px; line-height: 1.1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.pc-nm { font-size: 11px; color: #FFFFFF; margin-top: 4px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.pc-url { font-size: 9px; color: #CFE0F4; margin-top: 2px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-edit, .pc-rm { position: absolute; top: 2px; width: 16px; height: 16px; border: none; border-radius: 3px;
  font-size: 9px; cursor: pointer; color: #fff; opacity: 0; transition: opacity .12s; padding: 0; }
.pc-app:hover .pc-edit, .pc-app:hover .pc-rm { opacity: 1; }
.pc-edit { left: 2px; background: #3A4560; }
.pc-rm { right: 2px; background: #B0463E; }
.pc-app[data-int] .pc-ic { filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.pc-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
#pcAdd { font-family: inherit; font-size: 12px; color: #11131F; cursor: pointer;
  background: var(--gold); border: 2px solid var(--line); border-radius: 5px; padding: 6px 12px; }
.pc-hint { font-size: 10px; opacity: .6; }
.pc-back { font-family: inherit; font-size: 12px; color: var(--ink); cursor: pointer; margin-bottom: 10px;
  background: var(--paper2); border: 2px solid var(--line2); border-radius: 5px; padding: 5px 12px; }
.pc-back:hover { background: #FFFDF0; }

/* PC 바탕화면: 표어(슬로건) + 로드맵 (바로 보임, 앱 아님) */
.pc-slogan, .pc-roadmap { position: relative; margin: 12px 12px 0; padding: 13px 15px;
  background: rgba(255,255,255,.10); border: 1.5px solid rgba(255,255,255,.26);
  border-radius: 10px; box-shadow: 0 2px 7px rgba(0,0,0,.22); }
.pc-secedit { position: absolute; top: 9px; right: 9px; font-family: inherit; font-size: 10px;
  background: rgba(0,0,0,.30); color: #EAF0FA; border: 1px solid rgba(255,255,255,.25);
  border-radius: 5px; padding: 3px 7px; cursor: pointer; }
.pc-secedit:hover { background: rgba(0,0,0,.5); }
.pc-slg-tag { font-size: 10px; color: #BFD2EC; letter-spacing: .4px; margin-bottom: 6px; }
.pc-slg-mission { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.35;
  text-shadow: 0 2px 4px rgba(0,0,0,.4); }
.pc-slg-vision { font-size: 12px; color: #E4EDFA; margin-top: 8px; }
.pc-slg-okr { font-size: 12px; color: #DCE7F6; margin-top: 8px; line-height: 1.5; white-space: pre-wrap;
  border-top: 1px solid rgba(255,255,255,.18); padding-top: 8px; }
.pc-slg-empty { font-size: 12px; color: #AFC0DC; font-style: italic; line-height: 1.5; }
/* 로드맵 스텝퍼 */
.pc-steps { display: flex; align-items: flex-start; overflow-x: auto; padding: 8px 2px 2px; }
.pc-step { flex: 0 0 auto; width: 88px; text-align: center; cursor: pointer; transition: transform .1s; }
.pc-step:hover { transform: translateY(-2px); }
.pc-step-dot { font-size: 19px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.pc-step-lb { font-size: 10px; color: #D3E0F2; margin-top: 4px; line-height: 1.25; word-break: keep-all; }
.pc-step.now { transform: scale(1.06); }
.pc-step.now .pc-step-lb { color: #FFE7A0; font-weight: 700; }
.pc-step.done .pc-step-lb { color: #A6D9B2; }
.pc-step-line { flex: 1 1 auto; min-width: 12px; height: 3px; margin-top: 11px; border-radius: 2px;
  background: rgba(255,255,255,.22); }
.pc-step-line.done { background: #64C486; }
.pc-road-sum { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 11px; font-size: 12px; color: #E4EDFA; }
.pc-road-sum b { color: #fff; }
.pc-road-hint { font-size: 10px; color: #9AAECB; margin-top: 7px; }
.pc-secttl { font-size: 11px; color: #C6D7EF; margin: 12px 12px 0; letter-spacing: .3px; }

/* 린 캔버스 (사업 PC 안) — 사진 레이아웃: 윗줄 5열 + 아랫줄 2칸 */
.lc-title { font-size: 13px; color: var(--ink); margin: 2px 0 10px; }
.lc-title span { font-size: 11px; color: #8A7550; margin-left: 4px; font-weight: normal; }
.lc-top { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: auto auto; gap: 7px;
  grid-template-areas: "prob sol uvp adv cust" "prob met uvp chan cust"; }
.lc-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; }
.lc-problem { grid-area: prob; } .lc-solution { grid-area: sol; } .lc-metrics { grid-area: met; }
.lc-uvp { grid-area: uvp; } .lc-advantage { grid-area: adv; } .lc-channels { grid-area: chan; }
.lc-customers { grid-area: cust; }
.lc-cell { background: #fff; border: 1.5px solid var(--line2); border-radius: 7px; padding: 8px 9px;
  display: flex; flex-direction: column; min-height: 96px; }
.lc-hl { background: #FBEEE9; border-color: #E0A48C; }   /* 고유가치제안 강조(핑크) */
.lc-h { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.lc-no { color: #D85A30; font-weight: 700; }
.lc-ta { flex: 1; font-family: inherit; font-size: 11.5px; line-height: 1.5; color: var(--ink);
  background: transparent; border: none; outline: none; resize: vertical; min-height: 60px; padding: 0; width: 100%; }
.lc-ta::placeholder { color: #B7B2A0; }
.lc-save { width: 100%; margin-top: 10px; }

/* 사업 PC 전체화면 모드 */
#panel.pc-full {
  left: 0; width: 100%; height: 100vh; max-height: 100vh; bottom: 0;
  border-radius: 0; border: none; box-shadow: none;
  transform: translateY(100%);
}
#panel.pc-full.open { transform: translateY(0); }
#panel.pc-full .p-head { background: #1E2740; border-bottom: 3px solid #0E1119; border-radius: 0; }
#panel.pc-full #pName { color: #EAF0FA; }
#panel.pc-full #pAi { color: #A8B4CC; }
#panel.pc-full #pIcon { background: #2A3350; border-color: #0E1119; }
#panel.pc-full #pDesc, #panel.pc-full #pSub { display: none; }
#panel.pc-full .p-body { flex: 1; min-height: 0; }
#panel.pc-full .p-left { flex: 1; padding: 0; border-right: none; overflow-y: auto; }
#panel.pc-full .pc-screen { border: none; border-radius: 0; min-height: 100%; padding-bottom: 24px; }
#panel.pc-full .pc-topbar { font-size: 13px; padding: 8px 14px; }
#panel.pc-full .pc-grid { grid-template-columns: repeat(6, 1fr); padding: 28px; gap: 16px; }
#panel.pc-full .pc-ic { font-size: 36px; }
#panel.pc-full .pc-nm { font-size: 13px; margin-top: 6px; }
#panel.pc-full .pc-url { font-size: 10px; }
#panel.pc-full .pc-app { padding: 16px 6px 12px; }
#panel.pc-full .pc-bar { padding: 4px 28px 20px; }
#panel.pc-full .okr, #panel.pc-full .tasklist, #panel.pc-full #pQuests > .p-mini,
#panel.pc-full .pc-back { margin-left: 28px; margin-right: 28px; }
/* 전체화면: 표어·로드맵 크게 */
#panel.pc-full .pc-slogan, #panel.pc-full .pc-roadmap { margin: 20px 28px 0; padding: 20px 24px; }
#panel.pc-full .pc-slg-mission { font-size: 26px; }
#panel.pc-full .pc-slg-vision, #panel.pc-full .pc-slg-okr { font-size: 14px; }
#panel.pc-full .pc-secttl { margin: 18px 28px 0; font-size: 13px; }
#panel.pc-full .pc-step { width: 120px; }
#panel.pc-full .pc-step-dot { font-size: 24px; }
#panel.pc-full .pc-step-lb { font-size: 12px; }
#panel.pc-full .pc-road-sum { font-size: 13px; }
/* 전체화면: 린 캔버스 여백·크기 크게 */
#panel.pc-full .lc-title, #panel.pc-full .lc-top, #panel.pc-full .lc-bottom,
#panel.pc-full .lc-save { margin-left: 28px; margin-right: 28px; }
#panel.pc-full .lc-top { margin-top: 6px; }
#panel.pc-full .lc-cell { min-height: 120px; padding: 10px 12px; }
#panel.pc-full .lc-h { font-size: 13px; }
#panel.pc-full .lc-ta { font-size: 13px; }
#panel.pc-full .p-right { flex: 0 0 min(360px, 88vw); border-left: 3px solid var(--line); }
@media (max-width: 640px) {
  #panel.pc-full .pc-grid { grid-template-columns: repeat(3, 1fr); }
  #panel.pc-full .p-right { flex-basis: 100%; }
  #panel.pc-full .pc-slg-mission { font-size: 20px; }
  /* 좁은 화면: 린 캔버스 세로로 한 칸씩 */
  .lc-top, .lc-bottom { grid-template-columns: 1fr; grid-template-areas: none; }
  .lc-cell { grid-area: auto !important; }
}

/* 사업 미션·비전·OKR (컴퓨터/제품 안) */
.okr { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px;
  padding-bottom: 10px; border-bottom: 2px solid var(--line2); }
.okr-l { font-size: 12px; color: #8A2E3E; margin-top: 6px; }
.okr-l span { font-size: 10px; color: #8A7550; margin-left: 4px; }
.okr-in { font-family: inherit; font-size: 13px; color: var(--ink);
  background: #fff; border: 2px solid var(--line2); border-radius: 5px; padding: 7px 9px; outline: none; }
.okr-ta { font-family: inherit; font-size: 13px; color: var(--ink); line-height: 1.6;
  background: #fff; border: 2px solid var(--line2); border-radius: 5px; padding: 7px 9px; outline: none;
  min-height: 68px; resize: vertical; }
.okr-save { margin-top: 8px; font-family: inherit; font-size: 13px; color: #11131F; cursor: pointer;
  background: var(--gold); border: 2px solid var(--line); border-radius: 5px; padding: 8px; box-shadow: 0 2px 0 var(--shadow); }
.okr-save:active { transform: translateY(2px); box-shadow: none; }

/* 저금통 (재정) */
.fin-lock { text-align: center; padding: 18px 8px; }
.fin-lock-icon { font-size: 34px; margin-bottom: 8px; }
.fin-lock-msg { font-size: 13px; color: var(--ink); margin-bottom: 12px; }
#finPin { font-family: inherit; font-size: 20px; letter-spacing: 8px; text-align: center; width: 140px;
  padding: 8px; border: 2px solid var(--line); border-radius: 6px; outline: none; }
#finUnlock { display: block; margin: 12px auto 0; font-family: inherit; font-size: 14px; color: #11131F; cursor: pointer;
  background: var(--gold); border: 2px solid var(--line); border-radius: 6px; padding: 8px 24px; box-shadow: 0 2px 0 var(--shadow); }
.fin-hint { font-size: 11px; opacity: .55; margin-top: 12px; }
.fin-list { display: flex; flex-direction: column; gap: 6px; }
.fin-row { display: flex; align-items: center; gap: 8px; }
.fin-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.fin-name { width: 62px; font-size: 13px; }
.fin-input { flex: 1; font-family: inherit; font-size: 14px; text-align: right; color: var(--ink);
  background: #fff; border: 2px solid var(--line2); border-radius: 5px; padding: 7px 9px; outline: none; }
.fin-won { font-size: 12px; opacity: .7; }
.fin-total { margin-top: 12px; padding: 10px; text-align: center; font-size: 14px;
  background: var(--paper2); border: 2px solid var(--line); border-radius: 6px; }
.fin-total b { font-size: 18px; color: #8A2E3E; }
.fin-save { flex: 1; }
.fin-pinbtn { background: var(--paper2) !important; border-color: var(--line2) !important; color: var(--ink) !important; }

/* 달력 (월간 뷰) */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-size: 14px; color: #8A2E3E; }
.cal-nav {
  font-family: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
  background: var(--paper2); border: 2px solid var(--line); border-radius: 5px;
  width: 28px; height: 26px; box-shadow: 0 2px 0 var(--shadow);
}
.cal-nav:hover { background: #FFFDF0; }
.cal-nav:active { transform: translateY(2px); box-shadow: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-wd { text-align: center; font-size: 11px; color: #8A7550; padding: 2px 0; }
.cal-wd.sun { color: #B0463E; }
.cal-wd.sat { color: #2E5FA5; }
.cal-cell {
  aspect-ratio: 1 / 1; background: var(--paper2); border: 2px solid var(--line2); border-radius: 4px;
  position: relative; cursor: pointer; display: flex; flex-direction: column; padding: 2px;
}
.cal-cell.empty { background: none; border: none; cursor: default; }
.cal-cell:not(.empty):hover { background: #FFFDF0; border-color: var(--line); }
.cal-cell.today { border-color: #8A2E3E; box-shadow: inset 0 0 0 1px #8A2E3E; }
.cal-cell.sel { background: #FFF3D8; border-color: var(--gold); }
.cal-num { font-size: 11px; color: var(--ink); }
.cal-cell.sun .cal-num { color: #C0392B; }
.cal-cell.sat .cal-num { color: #2E5FA5; }
.cal-hol { font-size: 9px; line-height: 1.15; color: #C0392B; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-hol-name { color: #C0392B; }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; margin-top: auto; }
.cal-dots .dot { width: 5px; height: 5px; border-radius: 50%; }
.cal-dots .dot.done { background: #4E9E77; }
.cal-dots .dot.ev { background: #3A4560; }
.cal-dots .dot.task { background: #D66A45; }
.cal-detail {
  margin-top: 10px; padding: 8px 10px; background: var(--paper2);
  border: 2px solid var(--line2); border-radius: 5px; min-height: 30px;
}
.cal-detail-date { font-size: 12px; color: #8A2E3E; margin-bottom: 4px; }
.cal-detail-line { font-size: 12px; line-height: 1.6; }
.cal-detail-line.dim { opacity: .55; }

/* 전체화면 달력 = 한 달 한눈에 (좌: 큰 그리드 / 우: 할 일·상세) */
#panel.cal-full .p-left { display: flex; flex-direction: column; overflow: hidden; padding: 16px 24px; }
#panel.cal-full #pQuests { flex: 1; min-height: 0; margin: 0; }
#panel.cal-full .cal-wrap { display: flex; gap: 20px; flex: 1; min-height: 0; }
#panel.cal-full .cal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
#panel.cal-full .cal-head { flex: 0 0 auto; margin-bottom: 10px; }
#panel.cal-full .cal-title { font-size: 18px; }
#panel.cal-full .cal-grid { flex: 1; min-height: 0; grid-template-rows: auto; grid-auto-rows: 1fr; gap: 5px; }
#panel.cal-full .cal-wd { font-size: 13px; padding: 0 0 4px; }
#panel.cal-full .cal-cell { aspect-ratio: auto; min-height: 0; padding: 5px 6px; border-radius: 6px; }
#panel.cal-full .cal-num { font-size: 15px; }
#panel.cal-full .cal-hol { font-size: 11px; white-space: normal; }
#panel.cal-full .cal-dots .dot { width: 6px; height: 6px; }
#panel.cal-full .cal-side { flex: 0 0 300px; overflow-y: auto; padding-right: 4px; }
#panel.cal-full .cal-detail { margin-top: 12px; }
@media (max-width: 720px) {
  #panel.cal-full .cal-wrap { flex-direction: column; overflow-y: auto; }
  #panel.cal-full .cal-main { min-height: 62vh; }
  #panel.cal-full .cal-side { flex: 1 0 auto; }
}

/* 목표판 (5년·연간·월간) */
.goal-period {
  font-size: 12px; color: #8A2E3E; letter-spacing: 1px;
  margin: 10px 0 5px; padding-bottom: 3px; border-bottom: 2px solid var(--line2);
}
.goal-period:first-child { margin-top: 0; }
.goal-item {
  font-size: 12px; line-height: 1.6; padding: 6px 9px 6px 24px; position: relative;
  background: var(--paper2); border: 2px solid var(--line2); border-radius: 5px;
  margin-bottom: 4px; color: var(--ink);
}
.goal-item::before { content: '▸'; position: absolute; left: 9px; color: #8A6E3A; }

#pChat { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.bubble { max-width: 85%; padding: 8px 11px; font-size: 12px; line-height: 1.55; border-radius: 6px; border: 2px solid; }
.bubble.ai { align-self: flex-start; background: #EEF0F6; border-color: var(--line2); }
.bubble.me { align-self: flex-end; background: #E4F0E4; border-color: #A8CCA8; }
.bubble.thinking { color: #5A6480; animation: think-pulse 1.1s ease-in-out infinite; }
@keyframes think-pulse { 0%,100%{ opacity:.55 } 50%{ opacity:1 } }

/* 대화 속 첨부 이미지 */
.bubble img.chat-img { display: block; max-width: 100%; border-radius: 4px; margin-top: 4px; border: 2px solid var(--line2); }
.bubble.me img.chat-img:first-child { margin-top: 0; }

/* 보내기 전 이미지 미리보기 */
#pImgPreview { display: none; padding: 6px 12px 0; }
#pImgPreview.on { display: flex; gap: 6px; flex-wrap: wrap; }
.img-thumb { position: relative; }
.img-thumb img { height: 54px; border-radius: 5px; border: 2px solid var(--line2); display: block; }
.img-thumb .img-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border: none;
  border-radius: 50%; background: #B0463E; color: #fff; font-size: 11px; cursor: pointer; padding: 0; line-height: 1; }

#pAttach { font-family: inherit; font-size: 16px; cursor: pointer;
  background: var(--paper2); border: none; border-right: 2px solid var(--line2); padding: 0 12px; }
#pAttach:hover { background: #FFFDF0; }

.p-input { display: flex; border-top: 2px solid var(--line2); }
#pInput { flex: 1; font-family: inherit; font-size: 13px; color: var(--ink);
  background: #fff; border: none; outline: none; padding: 10px 12px; }
#pSend { font-family: inherit; font-size: 13px; color: #fff; cursor: pointer;
  background: var(--line); border: none; border-left: 2px solid var(--line2); padding: 0 18px; }
#pSend:hover { background: #4A587A; }
.p-note { font-size: 10px; opacity: .45; padding: 4px 12px 6px; }

@media (max-width: 660px) {
  .p-body { flex-direction: column; overflow-y: auto; }
  .p-left { border-right: none; border-bottom: 2px solid var(--line2); }
  #hud { font-size: 11px; gap: 6px; padding: 5px 8px; }
  .gauge { width: 34px; }
}

/* ============ 오프닝(타이틀) + 로그인 ============ */
#intro { position: fixed; inset: 0; z-index: 200; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(#10162B, #28304E 55%, #3A4468); }
#intro.hide { opacity: 0; pointer-events: none; transition: opacity .65s; }
.intro-star { position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 50%;
  opacity: .85; animation: intro-twk 2.4s infinite; pointer-events: none; }
@keyframes intro-twk { 50% { opacity: .1; } }
.intro-title { font-size: clamp(30px, 7vw, 56px); font-weight: 900; color: #E8C860; letter-spacing: 3px;
  text-shadow: 0 3px 0 #8A6E2E, 0 7px 16px rgba(0,0,0,.55); z-index: 1; }
.intro-sub { font-size: clamp(12px, 2.4vw, 17px); color: #C8D4F0; letter-spacing: 7px; z-index: 1; }
#introHero { image-rendering: pixelated; z-index: 1; margin-top: 6px; }
.intro-stats { display: flex; gap: 8px; z-index: 1; }
.intro-stats span { width: 30px; height: 30px; border-radius: 6px; border: 2px solid rgba(255,255,255,.5);
  color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.intro-press { margin-top: 10px; font-size: 16px; color: #FBF3DC; letter-spacing: 2px;
  animation: intro-blink 1.1s steps(2) infinite; z-index: 1; }
@keyframes intro-blink { 50% { opacity: 0; } }
.intro-ver { position: absolute; bottom: 14px; font-size: 11px; color: #6E7890; letter-spacing: 2px; }
#intro.login .intro-press, #intro.login #introHero, #intro.login .intro-stats { display: none; }
#intro.login .intro-title { font-size: clamp(24px, 5vw, 40px); }
#loginBox { display: none; cursor: default; z-index: 2; width: min(320px, 86vw);
  background: var(--paper); border: 3px solid var(--line); border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--line2), 0 6px 0 var(--shadow), 0 12px 30px rgba(0,0,0,.5);
  padding: 18px 22px; margin-top: 10px; }
#intro.login #loginBox { display: block; }
#loginBox.shake { animation: intro-shake .35s; }
@keyframes intro-shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.login-head { font-size: 15px; font-weight: 700; color: var(--ink); text-align: center; margin-bottom: 8px; }
.login-l { display: block; font-size: 12px; color: #8A2E3E; margin: 10px 0 4px; }
.login-in { width: 100%; font-family: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 2px solid var(--line2); border-radius: 5px; padding: 9px 10px; outline: none; }
.login-in:focus { border-color: var(--gold); }
#loginGo { width: 100%; margin-top: 16px; font-family: inherit; font-size: 15px; font-weight: 700;
  color: #11131F; background: var(--gold); border: 2px solid var(--line); border-radius: 6px;
  padding: 11px; cursor: pointer; box-shadow: 0 3px 0 var(--shadow); }
#loginGo:active { transform: translateY(2px); box-shadow: none; }
#loginErr { font-size: 12px; color: #E88A80; margin-top: 9px; min-height: 16px; text-align: center; }
