/* 차 화면 데모: 앱의 차 홈(activity_car_home.xml)과 차 브라우저 창 UI(car.html)를 같은 치수로 옮긴 것.
   무대는 디자인 크기 1600x900 그대로 그리고 통째로 줄인다(car-demo.js 가 --s 를 넣는다). */
.cd { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #edf2f8; user-select: none; -webkit-user-select: none; touch-action: none; }
.cd.fit { aspect-ratio: auto; height: 100%; }
.cd-stage { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; transform: scale(var(--s, 1));
  font-family: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; color: #111b2d; }
.cd svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 홈 */
.cd-home { position: absolute; inset: 0; display: flex; flex-direction: column; background: linear-gradient(135deg, #f8fafd, #eef3f9 50%, #e8eef7); }
.cd-top { flex: none; height: 88px; display: flex; align-items: center; padding: 0 48px; }
.cd-top img { width: 52px; height: 52px; }
.cd-brand { margin-left: 14px; font: 600 22px "Sora", sans-serif; letter-spacing: 0.18em; }
.cd-chip { margin-left: auto; height: 48px; display: flex; align-items: center; padding: 0 20px; border-radius: 999px; border: 1px solid #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94) 50%, rgba(234,241,251,.87)); box-shadow: 0 5px 16px rgba(30,60,110,.12); font-size: 17px; }
.cd-dot { width: 10px; height: 10px; border-radius: 50%; background: #1f9d61; }
.cd-chip > * + * { margin-left: 12px; }
.cd-sep { width: 1px; height: 20px; background: #aebbd0; }
.cd-muted { color: #536176; }
.cd-chip svg { width: 22px; height: 22px; color: #536176; }
.cd-set { width: 56px; height: 56px; margin-left: 12px; padding: 14px; box-sizing: border-box; border-radius: 16px; background: #fff; box-shadow: 0 4px 12px rgba(30,60,110,.12); }
.cd-set svg { width: 28px; height: 28px; }
.cd-page { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 48px 24px; min-height: 0; }
.cd-page[hidden] { display: none; }
.cd-label { padding-left: 8px; font-size: 20px; font-weight: 500; color: #536176; }
.cd-title { font-size: 32px; font-weight: 600; }
.cd-grid { display: grid; grid-template-columns: repeat(6, 1fr); column-gap: 24px; row-gap: 16px; margin-top: 20px; }
.cd-tile { margin: 8px; padding: 18px 8px; display: flex; flex-direction: column; align-items: center; border-radius: 26px; cursor: pointer; }
.cd-tile:active { background: rgba(255,255,255,.7); }
.cd-tile span { margin-top: 14px; width: 100%; font-size: 20px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-icon { position: relative; width: 120px; height: 120px; }
.cd-app { position: absolute; width: 120px; height: 120px; border-radius: 30px; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px rgba(20,40,90,.16); }
.cd-app svg { width: 58px; height: 58px; stroke-width: 2.2; }
.cd-app.nav { background: linear-gradient(145deg, #4c8dff, #2d61f2); }
.cd-app.video { background: linear-gradient(145deg, #ff7a45, #ff3b5c); }
.cd-app.music { background: linear-gradient(145deg, #b06bff, #6f4dff); }
.cd-app.fill svg { fill: #fff; stroke: none; }
.cd-pairicon .cd-app { width: 84px; height: 84px; border-radius: 22px; }
.cd-pairicon .cd-app svg { width: 40px; height: 40px; }
.cd-pairicon .cd-app:first-child { left: 0; top: 0; }
.cd-pairicon .cd-app:last-child { right: 0; bottom: 0; outline: 4px solid #eef3f9; }
.cd-add { width: 120px; height: 120px; box-sizing: border-box; border: 2px dashed #aebbd0; border-radius: 30px; display: grid; place-items: center; color: #536176; }
.cd-add svg { width: 44px; height: 44px; }
.cd-dock { flex: none; height: 112px; display: flex; align-items: center; padding: 0 48px; border-radius: 30px 30px 0 0; border-top: 1px solid #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,251,255,.91) 50%, rgba(232,240,250,.87)); }
.cd-dk { height: 72px; display: flex; align-items: center; padding: 0 24px; border-radius: 18px; background: #fff; box-shadow: 0 2px 8px rgba(30,60,110,.1); font-size: 20px; font-weight: 500; cursor: pointer; }
.cd-dk + .cd-dk { margin-left: 16px; }
.cd-dk svg { width: 28px; height: 28px; margin-right: 12px; }
.cd-dk.on { background: #2d61f2; color: #fff; font-weight: 600; box-shadow: 0 8px 22px rgba(45,97,242,.35); }
.cd-count { margin-left: 10px; min-width: 30px; height: 30px; padding: 0 8px; box-sizing: border-box; border-radius: 15px; background: #2d61f2; color: #fff; font: 600 16px/30px "Sora", sans-serif; text-align: center; }
.cd-dk.on .cd-count { background: #fff; color: #2d61f2; }
.cd-hint { margin-left: auto; font-size: 17px; color: #536176; }

/* 앱 창(차 브라우저가 보여 주는 가상 화면) */
.cd-apps { position: absolute; inset: 0; background: #f1f2f3; }
.cd-layer, .cd-chrome { position: absolute; inset: 0; }
.cd-chrome { z-index: 50; pointer-events: none; }
.cd-chrome .cd-pill { pointer-events: auto; }
.cd-apps[hidden], .cd-home[hidden] { display: none; }
.cd-win { position: absolute; overflow: hidden; background: #dfe3e8; transition: left .18s, top .18s, width .18s, height .18s; }
.cd.dragging .cd-win { transition: none; }
.cd-win img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cd-win.video img { object-position: 74% 50%; }
.cd-sel { position: absolute; box-sizing: border-box; border: 3px solid #2f5bd3; pointer-events: none; }
.cd-handle { position: absolute; box-sizing: border-box; border-radius: 4px; background: #fff; border: 1px solid #b9bec4; pointer-events: none; }
.cd-pill { position: absolute; height: 64px; box-sizing: border-box; border-radius: 32px; background: #fff; border: 1px solid #b9bec4; transition: opacity .1s; }
.cd-pill button { position: absolute; top: 6px; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 26px; background: none; color: #15171a; cursor: pointer; }
.cd-pill button svg { width: 24px; height: 24px; margin: 14px; }
.cd-pill button:active, .cd-pill button.on { background: #2f5bd3; color: #fff; }
.cd-pill i { position: absolute; top: 18px; width: 1px; height: 28px; background: #b9bec4; }
.cd-bar { position: absolute; background: #2f5bd3; pointer-events: none; }
.cd-ratio { position: absolute; height: 48px; padding: 0 22px; border-radius: 24px; background: #2f5bd3; color: #fff; font: 600 20px/48px "Sora", sans-serif; transform: translateX(-50%); pointer-events: none; white-space: nowrap; }
.cd-tip { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); padding: 14px 26px; border-radius: 16px; background: rgba(17,27,45,.86); color: #fff; font-size: 22px; pointer-events: none; opacity: 0; transition: opacity .25s; white-space: nowrap; }
.cd-tip.on { opacity: 1; }
.cd-finger { position: absolute; left: 0; top: 0; z-index: 90; width: 68px; height: 68px; border-radius: 50%; box-sizing: border-box; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255,255,255,.55), rgba(255,255,255,.18)); border: 3px solid rgba(255,255,255,.95); box-shadow: 0 6px 22px rgba(10,20,40,.35); transition: opacity .25s; }
.cd-finger.on { opacity: 1; }
.cd-finger.down { background: radial-gradient(circle, rgba(47,91,211,.55), rgba(47,91,211,.2)); }
.cd.auto .cd-win, .cd.rec .cd-win { transition: none; }
