/* 앱 화면은 깔끔하게, 게임 화면(.game)은 픽셀로 */
:root {
  --ink: #1c1c1e;
  --sub: #6e6e73;
  --line: #e5e5ea;
  --card: #ffffff;
  --bg: #f2f2f7;
  --accent: #e5533c;
  --blue: #1e88ff;
  --r: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.06);
  --panel: #1c1c1e;   /* 흰 글자를 올리는 어두운 판. 다크 모드에서도 어두워야 한다 */
  --pixel: 'Galmuri11', monospace;
  --pixel-big: 'Galmuri14', monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: #1d1f1d;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Pretendard', -apple-system, sans-serif;
  color: var(--ink);
  user-select: none; -webkit-user-select: none;
}
body.pixel .phone { font-family: var(--pixel); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
input, textarea { font: inherit; color: var(--ink); user-select: text; -webkit-user-select: text; }
input::placeholder, textarea::placeholder { color: var(--sub); opacity: .8; }

/* 폰 외곽: PC에서는 액자, 모바일에서는 전체 화면 */
.phone {
  position: relative;
  height: min(844px, calc(100vh - 48px));
  aspect-ratio: 390 / 844;
  background: var(--bg);
  border: 10px solid #0b0c0b;
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 0 0 2px #3a3d3a, 0 20px 50px rgba(0,0,0,.5);
}
@media (max-width: 520px) {
  body { background: var(--bg); }
  .phone { width: 100vw; height: 100dvh; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
  .dock { margin-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  .home-pet { bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  .home-bar { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.app:not(.hidden), .game:not(.hidden) { animation: pop .16s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: .5; } }

/* 잠금화면 */
.lock { align-items: center; padding: 62px 22px 42px; background: linear-gradient(180deg, #dbe9ff 0%, #f7f1ea 100%); }
.lock-time { font-size: 82px; font-weight: 700; letter-spacing: -3px; line-height: 1; margin-top: 10px; position: relative; z-index: 2; }
.lock-date { font-size: 16.5px; margin-top: 6px; color: var(--sub); font-weight: 500; position: relative; z-index: 2; }
.lock-art { position: relative; width: calc(100% + 44px); flex: 1; min-height: 190px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; margin: 4px -22px 12px; }
.lock-scene { width: 100%; height: 100%; max-height: 290px; display: block; }
.ls-sun { fill: #ffd86b; opacity: .92; }
.ls-stars { opacity: 0; transition: opacity .3s; }
.ls-cloud { fill: rgba(255,255,255,.78); animation: lockCloud 14s ease-in-out infinite; }
.ls-cloud.c2 { animation-delay: -6s; opacity: .68; }
@keyframes lockCloud { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }
.ls-far { fill: #c6d8f2; }
.ls-mid { fill: #a4bee6; }
.ls-peak { fill: #7c9ed4; }
.ls-shade { fill: rgba(34,52,88,.18); }
.ls-snow { fill: #ffffff; }
.ls-hill { fill: rgba(255,255,255,.68); }
.lock-pet { position: absolute; width: 64px; height: 64px; cursor: pointer; filter: drop-shadow(0 6px 10px rgba(30,41,59,.2)); animation: lockBob 2.6s ease-in-out infinite; z-index: 3; }
.lock-pet svg { width: 100%; height: 100%; display: block; }
.lock-pet.summit { left: 50%; bottom: 56%; transform: translateX(-50%); }
.lock-pet.base { left: 50%; bottom: 14%; transform: translateX(-50%); }
.lock-pet.pop { animation: lockPop .42s cubic-bezier(.25,1.5,.4,1); }
@keyframes lockBob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
@keyframes lockPop { 0%, 100% { transform: translate(-50%, 0) scale(1); } 45% { transform: translate(-50%, -18px) scale(1.12, .92); } }
body.dark .ls-sun { fill: #fde68a; opacity: .88; }
body.dark .ls-stars { opacity: .85; }
body.dark .ls-cloud { fill: rgba(255,255,255,.12); }
body.dark .ls-far { fill: #25304f; }
body.dark .ls-mid { fill: #1d2742; }
body.dark .ls-peak { fill: #2e3e66; }
body.dark .ls-snow { fill: #dbe7ff; }
body.dark .ls-hill { fill: rgba(255,255,255,.08); }
.lock-start { position: relative; z-index: 2; width: 100%; padding: 18px; border-radius: 16px; background: var(--accent); color: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 6px 16px rgba(229,83,60,.35); }
.lock-start:hover { filter: brightness(1.06); }
.lock-start:active { transform: scale(.98); }
.lock-pin { margin-top: 14px; font-size: 14px; color: var(--sub); text-decoration: underline; padding: 6px; }

/* 키패드 */
.pin { align-items: center; padding: 84px 30px 44px; background: linear-gradient(180deg, #dbe9ff 0%, #f7f1ea 100%); }
.pin-title { font-size: 20px; font-weight: 700; margin: 0; }
.pin-dots { display: flex; gap: 18px; margin: 26px 0 10px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.pin-dots i.on { background: var(--ink); }
.pin-msg { font-size: 14px; color: var(--sub); min-height: 1.4em; margin: 0 0 24px; text-align: center; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 16px 20px; }
.pin-pad button { height: 72px; border-radius: 50%; background: rgba(255,255,255,.8); font-size: 28px; box-shadow: var(--shadow); }
.pin-pad button:hover:not(:disabled) { background: #fff; }
.pin-pad button:active { background: #d1d1d6; }
.pin-pad .ghost { background: none; box-shadow: none; font-size: 20px; }
.pin-back { margin-top: auto; font-size: 14px; color: var(--sub); padding: 6px; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ===== 게임 화면: 픽셀 스타일 유지 ===== */
.game { background: #f6f5f0; font-family: var(--pixel); }
.game canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; touch-action: none; }
.game-ui { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 44px 16px 0; pointer-events: none; }
.game-alt { font-family: var(--pixel-big); font-size: 22px; background: #fff; border: 3px solid #1a1a1a; padding: 4px 10px; }
.game-quit { pointer-events: auto; width: 44px; height: 44px; border: 3px solid #1a1a1a; background: #fff; font-size: 18px; }
.game-quit:hover { background: #ffd6d0; }
.game-progress { position: absolute; right: 8px; top: 100px; bottom: 60px; width: 8px; border: 2px solid #1a1a1a; background: #fff; display: flex; align-items: flex-end; }
.game-progress i { display: block; width: 100%; background: var(--accent); }
.game-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; background: rgba(20,20,20,.84); color: #fff; text-align: center; }
.game-overlay h2 { font-family: var(--pixel-big); font-size: 28px; margin: 0; }
.game-overlay p { margin: 0; font-size: 15px; line-height: 1.6; }
.game-overlay .how { font-size: 17px; background: #fff; color: #1a1a1a; padding: 10px 14px; border: 3px solid #1a1a1a; }
.game-overlay .code { font-family: var(--pixel-big); font-size: 40px; letter-spacing: 8px; padding: 6px 14px; border: 3px solid #fff; }
.game-overlay .code.small { font-size: 30px; letter-spacing: 2px; }
.game-overlay button { width: 100%; max-width: 260px; padding: 14px; background: #fff; color: #1a1a1a; font-size: 16px; }
.game-overlay button:hover { background: #fff3a0; }
.game-overlay button.sub { background: none; color: #fff; border: 3px solid #fff; }
.game-overlay button.sub:hover { background: rgba(255,255,255,.15); }
.muted-l { color: rgba(255,255,255,.7) !important; font-size: 13px !important; }
.taunt { max-width: 270px; padding: 10px 14px; background: #fff; color: #1a1a1a !important; border: 3px solid #1a1a1a; font-size: 16px !important; transform: rotate(-1.5deg); box-shadow: 3px 3px 0 var(--accent); }
.medals { display: flex; gap: 4px; }
.medals i { width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 50%; opacity: .3; }
.medals i.on { opacity: 1; }
.medals i.m1.on { background: #cd7f32; } .medals i.m2.on { background: #c0c0c0; } .medals i.m3.on { background: #ffd700; }
.medals.big i { width: 22px; height: 22px; border-color: #fff; }

.coin-get { color: #ffd60a !important; font-weight: bold; }
/* 인형뽑기 도감·결과 */
.book { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; max-width: 300px; }
.book div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; background: #fff; color: #1a1a1a; border: 3px solid; font-size: 10px; }
.book svg { width: 34px; height: 34px; }
.book em { position: absolute; top: 1px; right: 3px; font-style: normal; font-size: 10px; color: #e5533c; }
.prize-big { background: #fff; border: 4px solid; padding: 10px; }
.prize-big svg { width: 96px; height: 96px; display: block; }

/* 상태바 + 배터리 클릭 충전 기믹 */
.status { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px 6px; font-size: 15px; font-weight: 600; }
.status-bat { padding: 2px 8px; margin-right: -8px; border-radius: 99px; font-size: 14px; font-weight: 600; transition: background .18s, color .18s, transform .12s; }
.status-bat:hover { background: rgba(0,0,0,.07); }
.status-bat:active { transform: scale(.94); }
.status-bat.charging { background: #34c759; color: #fff; box-shadow: 0 0 10px rgba(52,199,89,.45); }
.status-bat.low { color: #ff3b30; animation: batPulse 1.1s ease-in-out infinite; }
@keyframes batPulse { 50% { opacity: .45; } }
.phone.dimmed { filter: brightness(.86); transition: filter .5s; }
body.dark .status-bat:hover { background: rgba(255,255,255,.12); }

/* 홈 화면 돌아다니는 인형 펫 */
.home-pet {
  position: absolute; left: 0; bottom: 112px; z-index: 6; width: 38px; height: 38px;
  cursor: pointer; user-select: none; -webkit-user-select: none; will-change: transform;
}
.home-pet .pet-body { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); transition: transform .12s; }
.home-pet .pet-body svg { width: 34px; height: 34px; display: block; }
.home-pet.hop .pet-body { animation: petHop .42s cubic-bezier(.25,1.4,.4,1); }
@keyframes petHop { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-16px) scale(1.08, .94); } }
.home-pet .pet-say {
  position: absolute; left: 50%; bottom: 42px; transform: translateX(-50%) scale(.85);
  white-space: nowrap; padding: 5px 10px; border-radius: 12px;
  background: rgba(255,255,255,.94); color: #1a1a1a; font-size: 12px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,.15); pointer-events: none;
  opacity: 0; transition: opacity .2s, transform .2s;
}
.home-pet .pet-say.show { opacity: 1; transform: translateX(-50%) scale(1); }
body.dark .home-pet .pet-say { background: rgba(44,44,46,.95); color: #f2f2f7; }

/* ===== 홈 ===== */
.home { background: linear-gradient(180deg, #dbe9ff 0%, #f7f1ea 100%); }
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px 16px 4px; }
.profile-card { grid-column: 1 / -1; display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: 22px; background: linear-gradient(135deg, #252730, #16181f); color: #fff; text-align: left; box-shadow: 0 8px 20px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.1); }
.profile-card div:not(.avatar) { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-card b { font-size: 18px; letter-spacing: -.02em; }
.profile-card span { font-size: 12.5px; color: #b4b7c2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-card em { font-style: normal; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(255,255,255,.14); padding: 6px 11px; border-radius: 99px; white-space: nowrap; }
.profile-card:hover { transform: translateY(-1px); }
.avatar { width: 50px; height: 50px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #ff9f0a, #e5533c); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; border: 2px solid rgba(255,255,255,.55); overflow: hidden; }
.avatar.doll { background: linear-gradient(135deg, #fff5e6, #ffe0f0); padding: 4px; }
.avatar.doll svg { width: 100%; height: 100%; display: block; }
.widget { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 13px 14px; text-align: left; border-radius: 22px; background: rgba(255,255,255,.86); backdrop-filter: blur(12px); box-shadow: 0 4px 14px rgba(15,23,42,.08); font-size: 13px; min-height: 114px; }
.widget.wx-w.sunny { background: linear-gradient(155deg, #e5f3ff 0%, #ffffff 78%); }
.widget.wx-w.cloud { background: linear-gradient(155deg, #edf1f7 0%, #ffffff 80%); }
.widget.wx-w.rain { background: linear-gradient(155deg, #dce9fa 0%, #f4f8ff 80%); }
.widget.wx-w.snow { background: linear-gradient(155deg, #e6f4ff 0%, #ffffff 80%); }
.widget.dark { background: linear-gradient(145deg, #ff6c47 0%, #ea4335 100%); color: #fff; box-shadow: 0 6px 16px rgba(234,67,53,.28); }
.widget:hover { transform: translateY(-1px); }
.widget:active { transform: scale(.98); }
.w-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.w-date { color: var(--sub); font-weight: 600; }
.w-ic { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; flex: none; }
.w-ic svg { width: 26px; height: 26px; display: block; }
.w-av { width: 26px; height: 26px; border-radius: 9px; background: rgba(255,255,255,.22); padding: 2px; display: flex; align-items: center; justify-content: center; flex: none; }
.w-av svg { width: 22px; height: 22px; display: block; }
.w-mid { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; margin-top: auto; }
.w-big { font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; }
.w-big small { font-size: 14px; font-weight: 700; opacity: .82; }
.w-hilo { font-size: 11px; font-weight: 700; color: var(--sub); white-space: nowrap; }
.w-pct { font-size: 11.5px; font-weight: 700; opacity: .88; }
.w-foot { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.w-prog { width: 100%; height: 5px; border-radius: 99px; background: rgba(255,255,255,.28); overflow: hidden; margin: 2px 0; }
.w-prog i { display: block; height: 100%; background: #ffd60a; border-radius: 99px; }
.w-chips { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; opacity: .94; }
.w-chips span { padding: 2px 6px; border-radius: 99px; background: rgba(0,0,0,.15); }
body.dark .widget.wx-w { background: linear-gradient(155deg, #252b3b 0%, #1c1e26 85%); }
body.dark .w-foot { color: #f2f2f7; }
.widget .muted { font-size: 12px; }
.widget.dark .muted { color: #ffe1d9; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 4px; padding: 18px 10px 10px; }
.dock { margin: auto 12px 28px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 4px; border-radius: 28px; background: rgba(255,255,255,.55); backdrop-filter: blur(14px); }
.icon { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.icon .ic { position: relative; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 15px; box-shadow: 0 2px 6px rgba(0,0,0,.15); transition: transform .1s; }
.icon svg { width: 32px; height: 32px; }
.icon:hover .ic { transform: translateY(-3px) scale(1.04); box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.icon:active .ic { transform: scale(.94); }
.icon span { white-space: nowrap; }
.dock .icon > span { display: none; }
.cal-ic { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.cal-ic b { font-size: 10px; color: var(--accent); font-weight: 700; }
.cal-ic span { font-size: 28px; font-weight: 600; margin-top: 2px; }
.badge { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #ff3b30; color: #fff; font-size: 13px; line-height: 22px; font-weight: 700; font-style: normal; }
/* 마우스를 올리면 앱 설명 말풍선 */
.tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: var(--panel); color: #fff; font-size: 12px; font-style: normal; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 10; }
.tip::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--panel); }
@media (hover: hover) { .icon:hover .tip, .icon:focus-visible .tip { opacity: 1; } }

/* ===== 앱 창 ===== */
.app { background: var(--bg); }
.app-bar { display: flex; align-items: center; gap: 8px; padding: 6px 12px 10px; font-size: 20px; font-weight: 700; }
.app-bar button { width: 38px; height: 38px; border-radius: 50%; font-size: 14px; color: var(--blue); background: var(--card); box-shadow: var(--shadow); }
.app-bar button:hover { background: #e8f1ff; }
.app-body { flex: 1; overflow-y: auto; padding: 8px 16px 44px; font-size: 15px; line-height: 1.6; }
.app-body h3 { margin: 0 0 6px; font-size: 17px; }
.app-body p { margin: 0 0 12px; }
.box { border-radius: var(--r); background: var(--card); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.btn { display: block; width: 100%; padding: 13px; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 600; text-align: center; text-decoration: none; margin: 8px 0; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.98); }
.btn.line { background: var(--card); color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.link { color: var(--blue); margin-bottom: 12px; padding: 4px 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.row:first-child { border-radius: var(--r) var(--r) 0 0; }
.row:last-of-type { border-radius: 0 0 var(--r) var(--r); border-bottom: 0; margin-bottom: 12px; }
.row > button { padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; background: #e8f1ff; color: var(--blue); white-space: nowrap; }
.row > button:hover { background: #d6e7ff; }
button.warn { background: #ff3b30 !important; color: #fff !important; }
.muted { color: var(--sub); font-size: 13px; }
.section { font-size: 13px; color: var(--sub); font-weight: 600; margin: 18px 4px 8px !important; }
.center { text-align: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.soon { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 6px; color: var(--sub); text-align: center; }
.seg { display: flex; padding: 2px; border-radius: 9px; background: #e3e3e8; }
.seg button { padding: 6px 12px; border-radius: 7px; font-size: 13px; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }
.field { display: block; font-size: 13px; color: var(--sub); margin-bottom: 10px; }
.field input, .field textarea { display: block; width: 100%; margin-top: 4px; font-size: 15px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.field textarea { height: 150px; resize: none; }
.field input:disabled { background: #ececf0; color: var(--sub); }
.err { color: #ff3b30; font-size: 13px; min-height: 1.2em; margin: 0 !important; }
.placeholder { padding: 18px; border: 1.5px dashed #c7c7cc; border-radius: var(--r); color: #a1a1a6; text-align: center; font-size: 14px; }

/* 메뉴 추천 */
.seg.big { margin-bottom: 10px; }
.seg.big button { flex: 1; padding: 9px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chips button { padding: 6px 13px; border-radius: 99px; background: var(--card); font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.chips button.on { background: var(--ink); color: #fff; box-shadow: none; }
.dart-wrap { display: flex; justify-content: center; }
.dart-board { width: 100%; max-width: 300px; cursor: crosshair; }
.dart-board text { font-size: 15px; font-weight: 700; fill: #1c1c1e; pointer-events: none; }
.sector { transition: opacity .2s; }
.sector.dim { opacity: .3; }
.food-result { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; margin-bottom: 4px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); animation: pop .2s ease-out; }
.food-result b { font-size: 28px; letter-spacing: -1px; }
.food-result .chip { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: #fff1e0; color: #ff9500; font-weight: 600; }
.food-result .btn { margin-bottom: 0; }

/* 프로필 */
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 14px 8px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
.profile-head .avatar { width: 92px; height: 92px; font-size: 40px; border: 0; }
.profile-head h2 { margin: 12px 0 2px; font-size: 24px; }
.profile-head .btn { margin-top: 6px; }
.placeholder small { color: #c0c0c5; font-size: 12px; }

/* 메일 */
.mail-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; text-align: left; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); line-height: 1.5; }
.mail-row:hover { background: #f7f9ff; }
.mail-row div { flex: 1; }
.mail-row i { width: 10px; height: 10px; border-radius: 50%; }
.mail-row i.dot { background: var(--blue); }

/* 게임 목록 (카드 안 아이콘은 픽셀) */
.medal-sum { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 14px; border-radius: var(--r); background: var(--panel); color: #fff; margin-bottom: 14px; }
.medal-sum b { font-size: 18px; }
.medal-sum .bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.2); }
.medal-sum .bar i { display: block; height: 100%; background: #ffd700; }
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.game-card { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 6px 10px; text-align: center; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); line-height: 1.2; transition: transform .12s, box-shadow .15s; }
.game-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.11); }
.game-card:active { transform: scale(.96); }
.game-card .ic { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 14px; overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.game-card .ic svg { width: 52px; height: 52px; display: block; }
.game-card b { font-size: 13px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.game-card .g-meta { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 24px; justify-content: center; }
.game-card .medals { gap: 3px; }
.game-card .medals i { width: 8px; height: 8px; border-width: 1.5px; }
.game-card .best { font-size: 10.5px; color: var(--sub); font-weight: 600; }

/* 시계, 날씨 */
.big-time { font-size: 60px; font-weight: 700; letter-spacing: -2px; text-align: center; line-height: 1.1; margin: 16px 0 6px; font-variant-numeric: tabular-nums; }
.big-time.sw { font-size: 44px; margin-top: 0; }
.advice { padding: 14px 16px; border-radius: var(--r); background: #fff8d6; font-size: 15px; font-weight: 500; margin: 6px 0 14px !important; box-shadow: var(--shadow); }

/* 계산기 */
.calc-out { display: flex; flex-direction: column; align-items: flex-end; padding: 14px 6px; margin-bottom: 10px; min-height: 96px; }
.calc-out span { color: var(--sub); font-size: 14px; min-height: 1.4em; }
.calc-out b { font-size: 42px; font-weight: 600; overflow: hidden; max-width: 100%; font-variant-numeric: tabular-nums; }
.calc { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 62px; gap: 10px; }
.calc button { border-radius: 31px; background: #e5e5ea; font-size: 24px; font-weight: 500; }
.calc button:hover { filter: brightness(1.05); }
.calc button:active { filter: brightness(.9); }
.calc .op { background: #ff9f0a; color: #fff; }
.calc .wide { grid-column: span 2; }
.calc .tall { grid-row: span 2; }

/* 캘린더 */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 19px; }
.cal-head button { width: 38px; height: 38px; border-radius: 50%; background: var(--card); color: var(--blue); box-shadow: var(--shadow); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; margin-bottom: 8px; padding: 10px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.cal span { padding: 8px 0; border-radius: 50%; }
.cal .wd { font-size: 12px; color: var(--sub); }
.cal .sun { color: #ff3b30; }
.cal .today { background: #ff3b30; color: #fff; font-weight: 700; }

/* 음악 */
.now { padding: 14px; border-radius: var(--r); background: var(--panel); color: #fff; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: #ff2d55; animation: eq .5s infinite alternate; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

/* 손전등 */
.torch { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; height: 100%; min-height: 440px; background: #1c1c1e; color: #8e8e93; margin: -8px -16px; }
.torch.on { background: #fff; color: var(--ink); box-shadow: inset 0 0 90px #fff3a0; }
.torch button { width: 120px; height: 120px; border-radius: 50%; background: #3a3a3c; color: #fff; font-size: 22px; font-weight: 700; }
.torch.on button { background: #ffd60a; color: var(--ink); }

/* 할 일 */
.todo-add { display: flex; gap: 8px; margin-bottom: 12px; }
.todo-add input { flex: 1; font-size: 15px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.todo-add button { padding: 0 16px; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 600; }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.todo:first-of-type { border-radius: var(--r) var(--r) 0 0; }
.todo span { flex: 1; word-break: break-all; }
.todo.done span { text-decoration: line-through; color: var(--sub); }
.chk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c7c7cc; font-size: 13px; color: #fff; }
.todo.done .chk { background: #34c759; border-color: #34c759; }
.del { width: 30px; height: 30px; color: #c7c7cc; }
.del:hover { color: #ff3b30; }

/* 브라우저 */
.url { padding: 10px 14px; border-radius: 12px; background: #e3e3e8; font-size: 13px; color: var(--sub); margin-bottom: 40px; text-align: center; }
.portal { text-align: center; }
.portal .logo { font-size: 38px; font-weight: 800; letter-spacing: -1px; margin: 20px 0 18px; }
.portal input { width: 100%; padding: 13px 16px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* 사진 */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.photos div { aspect-ratio: 1; background: #e3e3e8; display: flex; align-items: center; justify-content: center; color: #a1a1a6; }

/* 하단 홈 바, 알림 */
.home-bar { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; background: var(--ink); cursor: pointer; z-index: 5; border-radius: 3px; }
.home-bar:hover { background: var(--accent); }
.toast { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); padding: 10px 18px; border-radius: 99px; background: rgba(28,28,30,.92); color: #fff; font-size: 14px; z-index: 20; white-space: nowrap; }

/* 픽셀 글꼴을 고른 경우 큰 숫자도 픽셀로 */
body.pixel .lock-time, body.pixel .w-big, body.pixel .big-time, body.pixel .calc-out b, body.pixel .portal .logo { font-family: var(--pixel-big); font-weight: 400; letter-spacing: 0; }

/* 세로가 짧은 화면에서는 홈을 조금 줄인다 */
@media (max-height: 780px) {
  .icon .ic { width: 52px; height: 52px; border-radius: 13px; }
  .icon svg { width: 28px; height: 28px; }
  .grid { gap: 12px 4px; padding-top: 12px; }
  .widget { min-height: 92px; padding: 12px; }
  .w-big { font-size: 28px; }
  .profile-card { padding: 10px 14px; }
  .profile-card .avatar { width: 44px; height: 44px; font-size: 20px; }
}

/* ===== v0.6 추가 ===== */
/* 푸시 알림 */
.notice { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 40; display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 20px;
  background: rgba(245,245,247,.92); backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0,0,0,.25); cursor: pointer;
  transform: translateY(-140%); transition: transform .35s cubic-bezier(.2,1.2,.4,1); }
.notice.show { transform: translateY(0); }
.notice .ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.notice .ic svg { width: 22px; height: 22px; }
.notice .nt { flex: 1; font-size: 13px; line-height: 1.4; }
.notice .nt > b { font-size: 12px; color: var(--sub); text-transform: uppercase; }
.notice .nt .muted { float: right; font-size: 12px; }
.notice p { margin: 2px 0 0; font-size: 14px; color: var(--ink); }

/* 무중력 */
.icon.floating { cursor: grab; touch-action: none; z-index: 3; will-change: transform; }
.icon.floating:active { cursor: grabbing; }
.icon.floating .tip { display: none; }

/* 스위치 */
.switch { position: relative; width: 50px; height: 30px; border-radius: 15px; background: #d1d1d6 !important; padding: 0 !important; transition: background .2s; flex: none; }
.switch i { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: left .2s; }
.switch.on { background: #34c759 !important; }
.switch.on i { left: 22px; }

/* 메모 카드와 찢기 */
.memos { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.memo-card { padding: 12px 14px 8px; border-radius: 4px; background: #fff7b8; color: #3a3420; box-shadow: 0 2px 6px rgba(0,0,0,.12); background-image: repeating-linear-gradient(transparent 0 23px, #efe39a 23px 24px); line-height: 24px; }
.memo-card p { margin: 0 0 6px; word-break: break-all; }
.memo-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #8a7a40; }
.memo-foot button { padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.08); font-size: 12px; color: #6a5a20; }
.memo-foot button:hover { background: #ff3b30; color: #fff; }
.torn { position: absolute; z-index: 30; margin: 0; pointer-events: none; animation: .9s cubic-bezier(.4,0,.8,.6) forwards; }
.torn.left { clip-path: polygon(0 0, 52% 0, 46% 18%, 55% 36%, 45% 55%, 54% 74%, 47% 100%, 0 100%); animation-name: tearL; }
.torn.right { clip-path: polygon(52% 0, 100% 0, 100% 100%, 47% 100%, 54% 74%, 45% 55%, 55% 36%, 46% 18%); animation-name: tearR; }
@keyframes tearL { 25% { transform: translateX(-8px) rotate(-5deg); } 100% { transform: translate(-50px, 320px) rotate(-30deg); opacity: 0; } }
@keyframes tearR { 25% { transform: translateX(8px) rotate(5deg); } 100% { transform: translate(50px, 340px) rotate(26deg); opacity: 0; } }

/* 음악 */
.now { justify-content: flex-start; }
.now button { margin-left: auto; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.18); color: #fff; font-size: 13px; }
.vol { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--sub); margin-bottom: 4px; }
.vol input { flex: 1; accent-color: #ff2d55; }
.noise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.noise { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); text-align: left; }
.noise span { font-size: 12px; color: var(--sub); }
.noise.on { background: #ff2d55; color: #fff; }
.noise.on span { color: #ffd6df; }

/* 챗GTP */
#appBody:has(.gtp-log) { display: flex; flex-direction: column; padding-bottom: 28px; }
.gtp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.gtp-head b { font-size: 18px; }
.gtp-log { flex: 1; min-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.gtp-msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; line-height: 1.55; font-size: 15px; }
.gtp-msg.bot { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.gtp-msg.me { align-self: flex-end; background: #6c5ce7; color: #fff; border-bottom-right-radius: 4px; }
.gtp-msg.typing { display: flex; gap: 4px; padding: 14px; }
.gtp-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #a1a1a6; animation: dot 1s infinite; }
.gtp-msg.typing i:nth-child(2) { animation-delay: .15s; } .gtp-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .4; } }
.gtp-link { margin-left: 4px; padding: 3px 10px; border-radius: 99px; background: #ece9ff; color: #6c5ce7; font-size: 13px; font-weight: 600; }
.gtp-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; }
.gtp-chips button { flex: none; padding: 7px 12px; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; }
.gtp-chips button:hover { box-shadow: inset 0 0 0 1.5px #6c5ce7; color: #6c5ce7; }
.gtp-form { display: flex; gap: 8px; }
.gtp-form input { flex: 1; padding: 12px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.gtp-form button { width: 44px; height: 44px; border-radius: 50%; background: #6c5ce7; color: #fff; font-size: 18px; font-weight: 700; }
.gtp-note { text-align: center; font-size: 11px; color: var(--sub); margin: 6px 0 0 !important; }

/* 내 캐릭터 */
.avatar-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.avatar-row > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.avatar-row .av { width: 48px; height: 48px; border-radius: 12px; background: #f2f2f7; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--sub); }
.avatar-row .av svg { width: 36px; height: 36px; }
.avatar-row > button { padding: 7px 14px; border-radius: 99px; background: #e8f1ff; color: var(--blue); font-size: 13px; font-weight: 600; }
.av-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; margin-bottom: 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.av-list p { margin: 0 0 4px !important; font-size: 14px; color: var(--sub); }
.av-list > button:not(.btn) { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; font-size: 11px; }
.av-list > button:not(.btn) svg { width: 34px; height: 34px; }
.av-list > button.on { background: #e8f1ff; box-shadow: inset 0 0 0 2px var(--blue); }

/* ===== 다크 모드 ===== */
body.dark { --ink: #f2f2f7; --sub: #98989f; --line: #38383a; --card: #1c1c1e; --bg: #000; --shadow: 0 1px 2px rgba(0,0,0,.4); }
body.dark .lock, body.dark .pin, body.dark .home { background: linear-gradient(180deg, #1b2236 0%, #0d0d10 100%); }
body.dark .widget { background: rgba(44,44,46,.75); }
body.dark .widget.dark { background: #c4472d; }
body.dark .dock { background: rgba(60,60,64,.5); }
body.dark .pin-pad button { background: rgba(58,58,60,.85); }
body.dark .pin-dots i { border-color: var(--ink); } body.dark .pin-dots i.on { background: var(--ink); }
body.dark { --panel: #2c2c2e; }
body.dark .row { border-bottom-color: var(--line); }
body.dark .row > button, body.dark .avatar-row > button { background: #1e3a5f; color: #8ec5ff; }
body.dark .seg { background: #2c2c2e; } body.dark .seg button.on { background: #636366; }
body.dark .calc button { background: #333336; } body.dark .calc .op { background: #ff9f0a; }
body.dark .url, body.dark .photos div, body.dark .avatar-row .av { background: #2c2c2e; }
body.dark .advice { background: #3a3420; color: #fff3c4; }
body.dark .placeholder { border-color: #48484a; color: #6e6e73; }
body.dark .mail-row:hover, body.dark .game-card:hover { background: #2c2c2e; }
body.dark .field input:disabled { background: #2c2c2e; }
body.dark .notice { background: rgba(44,44,46,.92); }
body.dark .chips button.on { background: #f2f2f7; color: #1c1c1e; }
body.dark .gtp-link { background: #2e2a55; color: #b4abff; }
body.dark .app-bar button:hover { background: #2c2c2e; }
body.dark .torch { background: #000; }

/* ===== v0.7 ===== */
/* 컬러 아이콘: SVG가 타일 전체를 채운다 */
.icon .ic:has(svg.full), .notice .ic:has(svg.full) { background: none !important; padding: 0; }
.icon svg.full, .notice svg.full { width: 100% !important; height: 100% !important; display: block; border-radius: inherit; overflow: hidden; }
body.dark .icon .ic { box-shadow: 0 2px 8px rgba(0,0,0,.6); }
/* 날씨 그림 */
.wx-art { display: block; width: 100%; border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 6px; }
/* 챗GDP */
.gtp-ex { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--sub); }
.gtp-ex a { color: inherit; }
.gtp-terms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.gtp-terms .gtp-link { margin: 0; }
/* 방명록 */
.gb-hero { padding: 16px; margin-bottom: 12px; border-radius: 18px; background: linear-gradient(135deg, #3ddc97, #11a36a); color: #fff; }
.gb-hero b { font-size: 20px; }
.gb-hero p { margin: 4px 0 0 !important; font-size: 14px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gb-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 1.4em; }
.gb-meta .link { margin: 0; padding: 0; font-size: 13px; }
.gb-card { padding: 12px 14px; margin-bottom: 8px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.gb-card p { margin: 0 0 4px !important; word-break: break-all; }

/* ===== v0.8: 다크 모드에서 밝은 바탕에 밝은 글자가 올라가던 곳 ===== */
.game { color: #1a1a1a; }   /* 게임 화면은 다크 모드에서도 밝은 픽셀 화면이라 글자를 어둡게 고정 */
body.dark .pin-pad button:hover:not(:disabled) { background: #48484a; }
body.dark .row > button:hover { background: #24476f; }
body.dark .av-list > button.on { background: #1e3a5f; }

/* ===== v0.9 음악 앱 탭 ===== */
.seg.tabs { margin: 10px 0 12px; }
.seg.gfilter { margin: 8px 0 12px; }
.seg.gfilter button { flex: 1; padding: 7px 2px; font-size: 12px; white-space: nowrap; }
.hint { font-size: 13px; color: var(--sub); margin: 0 2px 10px !important; }
.muted-w { color: #c7c7cc; }
.rec-hero { padding: 14px 16px; margin-bottom: 12px; border-radius: 18px; background: linear-gradient(135deg, #ff6b8a, #ff2d55); color: #fff; }
.rec-hero b { font-size: 17px; }
.rec-hero p { margin: 4px 0 0 !important; font-size: 14px; }
/* 8848은 플랫 일러스트라 부드럽게 (다른 미니게임은 픽셀 유지) */
#climb { image-rendering: auto; }

/* ===== PC 동적 스크롤 포트폴리오 (900px 이상): 왼쪽 스크롤 포트폴리오 + 오른쪽 sticky 폰 추종 ===== */
.site { display: contents; }
.story { display: none; }
@media (min-width: 900px) {
  :root {
    --pg: #f7f7f5; --pg-card: #ffffff; --pg-ink: #16171a; --pg-sub: #6c727f;
    --pg-muted: #9aa0ad; --pg-line: #e6e7ec; --pg-dash: #d4d7e0; --pg-hover: #f0f1f5;
    --pg-glass: rgba(247,247,245,.84); --pg-shadow: 0 1px 8px rgba(15,23,42,.035);
  }
  body.dark {
    --pg: #0e1014; --pg-card: #161921; --pg-ink: #f2f3f5; --pg-sub: #959ba8;
    --pg-muted: #5d6473; --pg-line: #252935; --pg-dash: #343948; --pg-hover: #1e222d;
    --pg-glass: rgba(14,16,20,.84); --pg-shadow: 0 4px 16px rgba(0,0,0,.3);
  }
  html { scroll-behavior: smooth; }
  body { display: block; height: auto; min-height: 100%; background: var(--pg); color: var(--pg-ink); }
  .site {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
    gap: 64px; max-width: 1160px; margin: 0 auto; padding: 0 44px;
  }
  .stage { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; perspective: 1200px; }
  .stage::before {
    content: ''; position: absolute; inset: 12% -38px; border-radius: 50%; z-index: -1; pointer-events: none;
    background: radial-gradient(circle, var(--stage-glow, rgba(255,107,74,.14)) 0%, transparent 70%);
    filter: blur(28px); transition: background .7s ease, opacity .7s ease;
  }
  body[data-chap="sec-hero"] { --stage-glow: rgba(255,107,74,.15); }
  body[data-chap="sec-about"] { --stage-glow: rgba(56,189,248,.16); }
  body[data-chap="sec-projects"] { --stage-glow: rgba(139,92,246,.16); }
  body[data-chap="sec-experience"] { --stage-glow: rgba(52,199,89,.15); }
  body[data-chap="sec-stack"] { --stage-glow: rgba(245,158,11,.15); }
  body[data-chap="sec-contact"] { --stage-glow: rgba(244,63,94,.14); }
  body.dark[data-chap="sec-hero"] { --stage-glow: rgba(255,107,74,.22); }
  body.dark[data-chap="sec-about"] { --stage-glow: rgba(56,189,248,.22); }
  body.dark[data-chap="sec-projects"] { --stage-glow: rgba(139,92,246,.24); }
  body.dark[data-chap="sec-experience"] { --stage-glow: rgba(52,199,89,.2); }
  body.dark[data-chap="sec-stack"] { --stage-glow: rgba(245,158,11,.2); }
  body.dark[data-chap="sec-contact"] { --stage-glow: rgba(244,63,94,.2); }
  .phone { color: var(--ink); height: min(820px, calc(100vh - 56px)); will-change: transform; transform-style: preserve-3d; }

  .story {
    display: flex; flex-direction: column;
    max-width: 560px; width: 100%; justify-self: end; padding-bottom: 96px;
    font-size: 15px; line-height: 1.65;
  }
  .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; }

  /* 상단 스티키 내비게이션 + 스크롤 진행 바 */
  .pc-nav {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 16px 0 14px; background: var(--pg-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--pg-line);
  }
  .pc-scroll-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; overflow: hidden; }
  .pc-scroll-bar i { display: block; height: 100%; width: 0%; background: var(--pg-ink); transition: width .08s linear; }
  .ph-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--pg-ink); font-weight: 800; font-size: 14px; flex: none; }
  .mark {
    width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    background: var(--pg-ink); color: var(--pg); font-size: 12px; font-weight: 800;
  }
  .pc-nav-links { display: flex; gap: 2px; }
  .pc-nav-links a {
    padding: 5px 9px; border-radius: 99px; text-decoration: none; font-size: 12.5px; font-weight: 600;
    color: var(--pg-sub); transition: background .15s, color .15s;
  }
  .pc-nav-links a:hover { color: var(--pg-ink); background: var(--pg-hover); }
  .pc-nav-links a.on { color: var(--pg-ink); background: var(--pg-card); box-shadow: inset 0 0 0 1px var(--pg-line); }
  .ph-tools { display: flex; align-items: center; flex: none; }
  .theme-pill {
    width: 30px; height: 30px; border-radius: 99px; display: flex; align-items: center; justify-content: center;
    background: var(--pg-card); color: var(--pg-ink); border: 1px solid var(--pg-line); font-size: 13px;
    transition: background .15s;
  }
  .theme-pill:hover { background: var(--pg-hover); }

  /* 스크롤 챕터 공통 */
  .chap { padding: 84px 0 40px; display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 64px; }
  .chap-hero { min-height: calc(100vh - 64px); justify-content: center; padding: 48px 0 36px; gap: 22px; }
  .chap-end { padding-bottom: 16px; }
  .chap-k { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; color: var(--pg-sub); }
  .chap-head { position: relative; display: flex; align-items: flex-end; gap: 14px; padding-bottom: 14px; }
  .chap-head::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: var(--pg-line); transform: scaleX(0); transform-origin: left center;
    transition: transform .8s cubic-bezier(.22,1,.36,1);
  }
  .chap.in .chap-head::after { transform: scaleX(1); }
  .chap-num {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 28px; font-weight: 700; line-height: 1; color: var(--pg-muted);
    opacity: 0; transform: translateX(-10px); transition: opacity .55s ease, transform .6s cubic-bezier(.22,1,.36,1);
  }
  .chap.in .chap-num { opacity: 1; transform: none; }
  .chap-head h2 { margin: 2px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.025em; line-height: 1.25; display: flex; align-items: center; gap: 8px; }
  .chap-cnt {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; font-weight: 700;
    padding: 2px 8px; border-radius: 99px; background: var(--pg-hover); color: var(--pg-sub);
  }

  /* 00. 히어로 */
  .hero-top { display: flex; align-items: center; gap: 10px; }
  .hero-dot {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 99px; border: 1px solid var(--pg-line); color: var(--pg-sub); background: var(--pg-card);
  }
  .chap-hero h1 { margin: 0; font-size: 52px; font-weight: 800; letter-spacing: -.04em; line-height: 1.08; }
  .hero-role { margin: 0; font-size: 18px; line-height: 1.55; color: var(--pg-sub); max-width: 44ch; }
  .hero-role.is-empty {
    padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--pg-dash);
    font-size: 14px; color: var(--pg-muted);
  }
  .hero-meta {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin: 6px 0 0; padding-top: 20px; border-top: 1px solid var(--pg-line);
  }
  .hero-meta div { display: flex; flex-direction: column; gap: 3px; }
  .hero-meta dt { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11px; color: var(--pg-muted); letter-spacing: .04em; }
  .hero-meta dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--pg-ink); }
  .hero-meta dd.is-empty { color: var(--pg-muted); font-weight: 500; }
  .scroll-cue {
    align-self: flex-start; margin-top: 10px; font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 12.5px; font-weight: 600; color: var(--pg-sub); text-decoration: none;
    animation: cueBob 2.2s ease-in-out infinite;
  }
  .scroll-cue:hover { color: var(--pg-ink); }
  @keyframes cueBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

  /* 공통 빈 슬롯(준비 중) 스타일 */
  .pf-empty {
    padding: 28px 22px; border-radius: 16px; border: 1px dashed var(--pg-dash);
    display: flex; flex-direction: column; gap: 6px; color: var(--pg-muted); font-size: 14px;
  }
  .pf-empty b { font-size: 14.5px; font-weight: 700; color: var(--pg-sub); }
  .pf-empty span { font-size: 13px; color: var(--pg-muted); }

  /* 01. About */
  .about-bio {
    margin: 0; padding: 22px; border-radius: 16px; background: var(--pg-card);
    border: 1px solid var(--pg-line); box-shadow: var(--pg-shadow);
    font-size: 15.5px; line-height: 1.75; color: var(--pg-ink); white-space: pre-line;
  }
  .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
  .about-cell {
    padding: 16px 18px; border-radius: 14px; background: var(--pg-card);
    border: 1px solid var(--pg-line); display: flex; flex-direction: column; gap: 4px;
  }
  .about-cell.is-empty { background: transparent; border-style: dashed; border-color: var(--pg-dash); }
  .about-cell span { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11px; color: var(--pg-muted); letter-spacing: .04em; }
  .about-cell strong { font-size: 14.5px; font-weight: 700; color: var(--pg-ink); }
  .about-cell.is-empty strong { color: var(--pg-muted); font-weight: 500; }

  /* 02. Projects */
  .proj-grid { display: flex; flex-direction: column; gap: 14px; }
  .proj-card {
    display: grid; grid-template-columns: 156px minmax(0, 1fr); gap: 18px; align-items: center;
    padding: 14px; border-radius: 18px; background: var(--pg-card);
    border: 1px solid var(--pg-line); box-shadow: var(--pg-shadow);
    text-decoration: none; color: inherit; transition: transform .15s, border-color .15s;
  }
  .proj-card:hover { transform: translateY(-2px); border-color: var(--pg-sub); }
  .proj-thumb {
    aspect-ratio: 16 / 11; border-radius: 12px; overflow: hidden;
    background: var(--pg-hover); border: 1px solid var(--pg-line);
    display: flex; align-items: center; justify-content: center;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; color: var(--pg-muted);
  }
  .proj-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .proj-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .proj-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .proj-year { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; color: var(--pg-muted); }
  .proj-arrow { font-size: 13px; color: var(--pg-sub); }
  .proj-body b { font-size: 16.5px; font-weight: 800; color: var(--pg-ink); letter-spacing: -.015em; }
  .proj-body p { margin: 0; font-size: 13.5px; color: var(--pg-sub); line-height: 1.5; }
  .proj-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
  .proj-tags i {
    font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px;
    border-radius: 99px; background: var(--pg-hover); color: var(--pg-sub);
  }
  .proj-slot {
    display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center;
    padding: 14px; border-radius: 16px; border: 1px dashed var(--pg-dash);
  }
  .proj-slot .proj-thumb { background: transparent; border: 1px dashed var(--pg-dash); }
  .proj-slot b { font-size: 14.5px; font-weight: 700; color: var(--pg-sub); }
  .proj-slot p { margin: 0; font-size: 13px; color: var(--pg-muted); }

  /* 03. Experience 타임라인 */
  .exp-list { display: flex; flex-direction: column; }
  .exp-item {
    display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px;
    padding: 18px 0; border-bottom: 1px solid var(--pg-line);
  }
  .exp-item:first-child { padding-top: 4px; }
  .exp-item:last-child { border-bottom: 0; }
  .exp-period { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; color: var(--pg-muted); padding-top: 3px; }
  .exp-main { display: flex; flex-direction: column; gap: 4px; }
  .exp-main b { font-size: 15.5px; font-weight: 800; color: var(--pg-ink); }
  .exp-org { font-size: 13.5px; font-weight: 600; color: var(--pg-sub); }
  .exp-main p { margin: 4px 0 0; font-size: 13.5px; color: var(--pg-sub); line-height: 1.55; }

  /* 04. Stack 카테고리 그리드 */
  .stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .stack-box {
    padding: 16px 18px; border-radius: 16px; background: var(--pg-card);
    border: 1px solid var(--pg-line); box-shadow: var(--pg-shadow);
    display: flex; flex-direction: column; gap: 10px;
  }
  .stack-box.is-empty { background: transparent; border-style: dashed; border-color: var(--pg-dash); box-shadow: none; }
  .stack-k { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11.5px; font-weight: 700; color: var(--pg-muted); letter-spacing: .04em; }
  .stack-tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .stack-tags span {
    font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 8px;
    background: var(--pg-hover); color: var(--pg-ink);
  }
  .stack-box.is-empty .stack-tags span { background: transparent; border: 1px dashed var(--pg-dash); color: var(--pg-muted); font-weight: 500; }

  /* 05. Contact 목록 */
  .rows { list-style: none; margin: 0; padding: 6px; border-radius: 16px; background: var(--pg-card); border: 1px solid var(--pg-line); box-shadow: var(--pg-shadow); }
  .rows li { border-radius: 11px; transition: background .15s; }
  .rows li > a, .rows li > button, .rows li > div {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px 14px; text-decoration: none; color: var(--pg-ink); font-size: 14.5px; font-weight: 600; text-align: left;
  }
  .rows li:not(.is-empty):hover { background: var(--pg-hover); }
  .rows li.is-empty > div { color: var(--pg-muted); font-weight: 500; }
  .rows .cat { color: var(--pg-sub); font-size: 13px; font-weight: 500; white-space: nowrap; }
  .rows li.is-empty .cat { color: var(--pg-muted); }

  /* 푸터 */
  .ph-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 22px; margin-top: 12px; border-top: 1px solid var(--pg-line);
    font-size: 12.5px; color: var(--pg-muted);
  }
  .foot-top { color: var(--pg-sub); text-decoration: none; font-weight: 600; }
  .foot-top:hover { color: var(--pg-ink); }

  /* 스크롤 스태거 순차 등장 애니메이션 */
  .rv { opacity: 1; transform: none; }
  .rv-item {
    opacity: 0; transform: translateY(22px) scale(.985); filter: blur(4px);
    transition: opacity .62s cubic-bezier(.22,1,.36,1), transform .68s cubic-bezier(.22,1,.36,1), filter .55s ease;
    transition-delay: var(--d, 0ms);
  }
  .chap.in .rv-item { opacity: 1; transform: none; filter: blur(0); }
}
@media (min-width: 900px) and (prefers-reduced-motion: reduce) {
  .rv-item { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .chap-head::after, .chap-num { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-cue { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== v1.0 게임 화면 UI도 플랫으로 (픽셀 글꼴·두꺼운 테두리 제거) ===== */
.game { font-family: 'Pretendard', -apple-system, sans-serif; }
.game-alt { font-family: inherit; font-weight: 700; font-size: 18px; border: 0; border-radius: 99px; padding: 6px 14px; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.game-quit { border: 0; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.15); font-size: 16px; }
.game-progress { border: 0; border-radius: 4px; background: rgba(255,255,255,.7); overflow: hidden; }
.game-overlay { background: rgba(18,20,26,.78); backdrop-filter: blur(6px); }
.game-overlay h2 { font-family: inherit; font-weight: 800; font-size: 30px; letter-spacing: -1px; }
.game-overlay .how { border: 0; border-radius: 16px; padding: 12px 16px; font-size: 16px; line-height: 1.6; }
.game-overlay .code { font-family: inherit; font-weight: 800; border: 0; border-radius: 16px; background: rgba(255,255,255,.12); }
.game-overlay button { border-radius: 14px; font-weight: 700; }
.game-overlay button.sub { border: 0; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.8); }
.taunt { border: 0; border-radius: 16px 16px 16px 4px; box-shadow: 0 4px 0 #e5533c; transform: rotate(-1deg); font-weight: 600; }
.book div { border-width: 2px; border-radius: 12px; }
.prize-big { border-radius: 20px; }
