* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #070b1a; color: #f3e6d6;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Pretendard, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; touch-action: none; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#hud { position: fixed; inset: 0; pointer-events: none; }
#count { position: absolute; top: calc(env(safe-area-inset-top) + 16px); left: 0; right: 0; text-align: center;
  font-size: 13px; letter-spacing: .02em; color: rgba(243, 230, 214, .62); transition: opacity .8s; }
#count .sub { display: block; margin-top: 3px; font-size: 11px; color: rgba(243, 230, 214, .42); }
#hint { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 80px); text-align: center;
  font-size: 13px; color: rgba(243, 230, 214, .7); opacity: 0; transition: opacity .8s; }
#hint.on { opacity: 1; }

/* 아이폰 감성: 작은 반투명 유리 캡슐 버튼 */
#buttons { position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 22px);
  display: flex; gap: 8px; justify-content: center; transition: opacity .6s, transform .6s; }
.btn { pointer-events: auto; position: relative; display: inline-flex; align-items: center;
  height: 38px; padding: 0 16px; border-radius: 19px; border: .5px solid rgba(255, 255, 255, .22); white-space: nowrap;
  background: rgba(118, 118, 128, .24); color: rgba(255, 255, 255, .92);
  font: 600 15px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', Pretendard, system-ui, sans-serif; letter-spacing: -.01em;
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); transition: transform .18s cubic-bezier(.3, .7, .4, 1.4), opacity .4s, background .2s; }
.btn:active { transform: scale(.94); background: rgba(118, 118, 128, .36); }
/* 아이콘만 있는 동그란 유리 버튼 (선 아이콘, 색 없음) */
.btn.icon { width: 50px; height: 50px; padding: 0; border-radius: 25px; justify-content: center; color: rgba(255, 255, 255, .9); }
.btn.icon svg { width: 24px; height: 24px; }
#buttons { gap: 14px; }
#btnSit.disabled { opacity: .45; }

/* 앉았을 때: 손 쬐기 + 일어나기만 흐리게 */
#seatBar { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 22px); transform: translateX(-50%);
  display: flex; gap: 10px; align-items: center; opacity: 0; transition: opacity .7s; }
#seatBar .btn { pointer-events: none; }
#btnStand { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 13px; font-weight: 500;
  background: rgba(118, 118, 128, .18); color: rgba(255, 255, 255, .8); box-shadow: none; }
#btnWarm { width: 40px; height: 40px; border-radius: 20px; background: rgba(118, 118, 128, .18); box-shadow: none; }
#btnWarm svg { width: 20px; height: 20px; }
#btnWarm.on { background: rgba(255, 255, 255, .26); color: #fff; border-color: rgba(255, 255, 255, .45); }

body.seated #buttons { opacity: 0; transform: translateY(20px); pointer-events: none; }
body.seated #buttons .btn { pointer-events: none; }
body.seated #seatBar { opacity: .5; }
body.seated.warming #seatBar { opacity: .85; }
body.seated #seatBar .btn { pointer-events: auto; }
body.seated #count { opacity: 0; }

#intro { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(120% 70% at 50% 62%, rgba(80, 30, 8, .55), rgba(7, 11, 26, .92) 60%); transition: opacity 1.2s; z-index: 5; }
#intro.out { opacity: 0; pointer-events: none; }
.intro-inner { padding: 0 24px; }
#intro h1 { margin: 18px 0 8px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
#intro p { margin: 0; color: rgba(243, 230, 214, .72); font-size: 15px; }
#intro p b { color: #ffc27a; font-weight: 600; }
#intro .small { margin-top: 18px; font-size: 12px; color: rgba(243, 230, 214, .45); }
#btnEnter { margin-top: 30px; border: 0; height: 46px; padding: 0 28px; border-radius: 23px; background: #ff9f0a; color: #fff;
  font: 600 16px -apple-system, BlinkMacSystemFont, 'SF Pro Text', Pretendard, system-ui, sans-serif; letter-spacing: -.01em;
  box-shadow: 0 0 32px rgba(255, 140, 20, .35); }
#btnEnter:active { transform: scale(.96); }
.ember { width: 14px; height: 14px; margin: 0 auto; border-radius: 50%; background: #ffb35c;
  box-shadow: 0 0 18px 6px rgba(255, 140, 40, .7), 0 0 60px 20px rgba(255, 90, 20, .35); animation: ember 2.4s ease-in-out infinite; }
@keyframes ember { 50% { transform: scale(.8); box-shadow: 0 0 12px 4px rgba(255, 140, 40, .55), 0 0 40px 14px rgba(255, 90, 20, .25); } }
