:root {
    --bg: #14171a;
    --bg-elev: #1d2125;
    --bg-elev-2: #262b30;
    --line: #33393f;
    --ink: #f0eee8;
    --ink-dim: #9aa2a9;
    --ink-faint: #5f676e;
    --accent: #ff8a3d;
    --accent-dim: #c96a2e;
    --good: #4fae6e;
    --warn: #e3b341;
    --danger: #e5594a;
    --radius: 14px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    overscroll-behavior: none;
    height: 100%;
    width: 100%;
  }
  #app { position: fixed; inset: 0; overflow: hidden; }
  .screen {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.32,.72,0,1);
    background: var(--bg);
    z-index: 1;
    visibility: hidden;
  }
  .screen.home {
    transform: translateX(0);
    z-index: 0;
    visibility: visible;
  }
  .screen.active {
    transform: translateX(0);
    z-index: 2;
    visibility: visible;
  }

  /* ---------- Top bar ---------- */
  .topbar {
    padding: 8px 18px 12px;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
  }
  .topbar.with-safe-top { padding-top: calc(var(--safe-top) + 14px); }
  .topbar h1 {
    font-size: 28.5px; font-weight: 700; margin: 0; letter-spacing: -0.01em;
  }
  .topbar .eyebrow {
    font-size: 16.5px; color: var(--ink-faint); text-transform: uppercase;
    letter-spacing: .08em; font-weight: 600; margin: 0 0 2px;
  }
  .iconbtn {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--bg-elev); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink); flex-shrink: 0;
  }
  .iconbtn svg { width: 18px; height: 18px; }

  /* ---------- Home: list ---------- */
  .scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 18px; }
  .scroll-pad-bottom { height: calc(96px + var(--safe-bottom)); flex-shrink: 0; }

  .site-group { margin-bottom: 22px; }
  .site-group-label {
    font-size: 18px; font-weight: 700; color: var(--ink-dim);
    text-transform: uppercase; letter-spacing: .06em;
    margin: 0 0 8px 2px; display: flex; align-items: center; gap: 6px;
  }
  .site-group-label .count {
    background: var(--bg-elev-2); color: var(--ink-faint);
    border-radius: 10px; padding: 1px 7px; font-size: 16.5px;
  }

  .point-card {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex; align-items: center; gap: 12px;
    padding: 10px; margin-bottom: 8px;
    position: relative;
  }
  .point-thumb {
    width: 56px; height: 56px; border-radius: 10px;
    background: var(--bg-elev-2); object-fit: cover; flex-shrink: 0;
    border: 1px solid var(--line);
  }
  .point-info { flex: 1; min-width: 0; }
  .point-name { font-size: 22.5px; font-weight: 600; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .point-meta { font-size: 18.75px; color: var(--ink-dim); margin: 0; display: flex; align-items: center; gap: 5px; }
  .dist-pill {
    font-size: 17.25px; font-weight: 700; padding: 4px 8px; border-radius: 8px;
    flex-shrink: 0; white-space: nowrap;
  }
  .dist-pill.near { background: rgba(79,174,110,.18); color: var(--good); }
  .dist-pill.mid { background: rgba(227,179,65,.18); color: var(--warn); }
  .dist-pill.far { background: rgba(154,162,169,.12); color: var(--ink-dim); }
  .status-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    background: var(--ink-faint);
  }
  .status-dot.done { background: var(--good); }

  .empty-state {
    text-align: center; padding: 80px 24px 40px; color: var(--ink-faint);
  }
  .empty-state svg { width: 56px; height: 56px; margin-bottom: 14px; opacity: .5; }
  .empty-state p { font-size: 21.75px; line-height: 1.6; margin: 0; }

  /* ---------- FAB ---------- */
  .fab {
    position: absolute; right: 20px; bottom: calc(24px + var(--safe-bottom));
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--accent); color: #1a1209;
    display: flex; align-items: center; justify-content: center;
    border: none; box-shadow: 0 8px 24px rgba(255,138,61,.35);
    z-index: 5;
  }
  .fab svg { width: 26px; height: 26px; }

  /* ---------- Dual FAB row (project detail: 현장사진 + 전후사진) ---------- */
  .dual-fab-row {
    position: absolute; right: 20px; left: 20px; bottom: calc(24px + var(--safe-bottom));
    display: flex; justify-content: flex-end; align-items: center; gap: 12px;
    z-index: 5; pointer-events: none;
  }
  .dual-fab-row > * { pointer-events: auto; }
  .dual-fab-row .fab { position: static; }
  .fab-secondary {
    height: 50px; border-radius: 25px; padding: 0 18px;
    background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink);
    display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.35);
    font-size: 21px; font-weight: 700;
  }
  .fab-secondary svg { width: 19px; height: 19px; color: var(--accent); }

  /* ---------- Section divider (project detail list) ---------- */
  .section-divider {
    font-size: 18px; font-weight: 700; color: var(--ink-faint);
    text-transform: uppercase; letter-spacing: .06em;
    margin: 22px 2px 8px; padding-top: 6px; border-top: 1px solid var(--line);
  }
  .section-divider:first-child { border-top: none; margin-top: 0; padding-top: 0; }

  /* ---------- Project info card (공사명/구분) ---------- */
  .project-info-card {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 6px;
  }
  .project-info-card .row { display: flex; gap: 8px; padding: 5px 0; font-size: 20.25px; }
  .project-info-card .row .k { color: var(--ink-faint); flex-shrink: 0; width: 52px; }
  .project-info-card .row .v { color: var(--ink); font-weight: 600; }
  .project-info-card .row .v.empty { color: var(--ink-faint); font-weight: 400; font-style: italic; }
  .project-info-card .edit-link {
    display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
    font-size: 18.75px; color: var(--accent); font-weight: 700;
  }
  .project-info-card .edit-link svg { width: 13px; height: 13px; }

  /* ---------- Category grid (site shot category picker) ---------- */
  .category-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  }
  .category-tile {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 12px; padding: 10px 6px;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    text-align: center; color: var(--ink);
  }
  .category-tile .icon-wrap {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,138,61,.14); display: flex; align-items: center; justify-content: center;
  }
  .category-tile .icon-wrap svg { width: 16px; height: 16px; color: var(--accent); }
  .category-tile .label { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.25; }
  .category-tile .count { font-size: 16px; color: var(--ink-faint); }
  .category-tile-add {
    border: 1.5px dashed var(--line); background: transparent; color: var(--ink-faint);
  }
  .category-tile-add .label { color: var(--ink-faint); }
  .category-tile-add .icon-wrap { background: var(--bg-elev-2); }
  .category-tile-add .icon-wrap svg { color: var(--ink-faint); }

  /* ---------- Site shot thumbnail strip (project detail) ---------- */
  .siteshot-cat-group { margin-bottom: 14px; }
  .siteshot-cat-label {
    font-size: 19.5px; font-weight: 700; color: var(--ink-dim); margin: 0 0 8px 2px;
  }
  .siteshot-thumb-row {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .siteshot-thumb-row::-webkit-scrollbar { display: none; }
  .siteshot-thumb {
    width: 84px; height: 84px; border-radius: 10px; object-fit: cover;
    border: 1px solid var(--line); flex-shrink: 0; background: var(--bg-elev-2);
  }

  /* ---------- Camera screen ---------- */
  /* ============================================================
     CAMERA SCREENS: screen-camera / screen-newpointcam / screen-siteshotcam
     공통 레이아웃 — 세로/가로 모드 모두 대응
     ============================================================ */

  /* camera-wrap: .screen(flex-column)의 자식으로 flex:1이어야 남은 높이 전체를 차지.
     position:relative는 내부 absolute 요소들(topbar, bottombar)의 기준점. */
  .camera-wrap {
    position: relative;
    flex: 1;          /* .screen이 flex-direction:column 이므로 세로 방향 남은 공간 전부 */
    min-height: 0;    /* flexbox에서 자식이 콘텐츠 크기보다 작아질 수 있게 허용 */
    background: #000;
    overflow: hidden;
  }

  /* camera-viewport: camera-wrap 전체를 덮는 절대위치 레이어.
     video의 object-fit:contain이 비율을 유지하며 화면에 꽉 맞춰줌 — 잘림 없음. */
  .camera-viewport {
    position: absolute;
    inset: 0;
    background: #000;
  }

  /* 세 카메라 화면의 모든 video 공통 — id 대신 클래스처럼 포괄적으로 지정 */
  .camera-viewport video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;   /* contain = 잘림 없이 전체 화각 표시, 여백은 검정 */
  }
  /* 후사진 오버레이 이미지도 같은 비율로 */
  #overlayImg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    pointer-events: none;
  }

  /* ── 상단바 (닫기·타이틀·그리드 버튼) ── */
  .cam-topbar {
    position: absolute; top: 0; left: 0; right: 0;
    padding: calc(var(--safe-top) + 12px) 16px 32px;
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0,0,0,.7), transparent);
    z-index: 10;
  }
  .cam-topbar .iconbtn {
    background: rgba(20,23,26,.55);
    border-color: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
  }
  .cam-title { text-align: center; }
  .cam-title .name { font-size: 21px; font-weight: 700; color: #fff; margin: 0; }
  .cam-title .dist { font-size: 17.25px; color: rgba(255,255,255,.7); margin: 2px 0 0; }

  /* ── 하단/우측 셔터 바 ── */
  /* 세로모드: 하단 가로 배치 */
  .cam-bottombar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px 24px calc(20px + var(--safe-bottom));
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
    z-index: 10;
  }
  .shutter-btn {
    width: 72px; height: 72px; border-radius: 50%;
    background: #fff; border: 4px solid rgba(255,255,255,.4);
    flex-shrink: 0;
  }
  .shutter-btn:active { background: #ddd; }
  .side-btn {
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(20,23,26,.55); border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(6px); color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .side-btn svg { width: 22px; height: 22px; }
  .side-btn.ghost-off svg { opacity: .35; }

  /* 투명도 슬라이더 (후사진 화면 전용) — 세로모드: 오른쪽 세로 */
  .opacity-rail {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    z-index: 10;
  }
  .opacity-rail input[type=range] {
    -webkit-appearance: none; appearance: none;
    width: 120px; height: 4px;
    background: rgba(255,255,255,.25); border-radius: 4px; outline: none;
  }
  .opacity-rail input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent); border: 2px solid #fff;
  }

  .grid-overlay {
    position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background-image:
      linear-gradient(to right, rgba(255,255,255,.18) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255,255,255,.18) 1px, transparent 1px);
    background-size: 33.33% 33.33%;
  }

  .compass-banner {
    position: absolute;
    top: calc(var(--safe-top) + 72px);
    left: 50%; transform: translateX(-50%);
    background: rgba(20,23,26,.75); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.12); border-radius: 30px;
    padding: 8px 16px; display: flex; align-items: center; gap: 8px;
    z-index: 10; font-size: 19.5px; font-weight: 600; color: #fff;
    white-space: nowrap;
  }
  .compass-banner svg { width: 16px; height: 16px; transition: transform .15s linear; }
  .compass-banner.arrived { background: rgba(79,174,110,.85); }

  /* ── 가로모드: 셔터 바를 오른쪽 세로 배치로 전환 ── */
  /* 이 블록은 반드시 기본 규칙들 뒤에 위치해야 specificity가 같을 때 이김. */
  @media (orientation: landscape) {
    /* 가로모드에서 .screen 자체도 row로 전환할 필요는 없음.
       camera-wrap이 flex:1로 남은 세로 공간을 차지하고,
       camera-viewport가 inset:0으로 그걸 꽉 채우고,
       video의 object-fit:contain이 가로모드 화면비에 맞게 자동 조정하므로 OK. */
    .cam-bottombar {
      /* 하단 가로바 → 오른쪽 세로바 */
      bottom: 0; top: 0; left: auto; right: 0;
      width: 90px;                /* 셔터 버튼이 들어갈 충분한 너비 */
      height: 100%;
      flex-direction: column;
      justify-content: center;
      gap: 28px;
      padding: 20px calc(14px + var(--safe-bottom)) 20px 14px;
      background: linear-gradient(to left, rgba(0,0,0,.7), transparent);
    }
    .shutter-btn { margin: 0; }

    /* 슬라이더는 가로모드에서 왼쪽으로 이동 */
    .opacity-rail {
      right: auto; left: 14px; top: 50%;
    }
    /* 나침반 배너는 좌측 상단으로 */
    .compass-banner {
      left: 14px; top: calc(var(--safe-top) + 72px);
      transform: none;
    }
  }

  /* ---------- New point screen ---------- */
  .form-pad { padding: 4px 18px 24px; flex: 1; overflow-y: auto; }
  .field-label {
    font-size: 18.75px; font-weight: 700; color: var(--ink-dim);
    text-transform: uppercase; letter-spacing: .04em; margin: 18px 2px 8px;
  }
  .text-input {
    width: 100%; background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 10px; padding: 13px 14px; color: var(--ink);
    font-size: 24px; outline: none;
  }
  .text-input:focus { border-color: var(--accent); }
  select.text-input { -webkit-appearance: none; appearance: none; }

  .gps-readout {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px; margin-top: 10px;
    display: flex; align-items: center; gap: 12px;
  }
  .gps-readout svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
  .gps-readout .txt p { margin: 0; }
  .gps-readout .txt .coord { font-size: 19.5px; color: var(--ink-dim); font-family: monospace; }
  .gps-readout .txt .acc { font-size: 18px; color: var(--ink-faint); margin-top: 2px; }

  /* ---------- Toggle row (settings) ---------- */
  .toggle-row {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px; margin-top: 10px;
  }
  .toggle-row-text { flex: 1; }
  .toggle-row-text .t1 { font-size: 21.75px; font-weight: 700; margin: 0 0 3px; color: var(--ink); }
  .toggle-row-text .t2 { font-size: 18px; color: var(--ink-faint); margin: 0; line-height: 1.5; }
  .toggle-switch {
    width: 48px; height: 28px; border-radius: 16px; background: var(--bg-elev-2);
    border: 1px solid var(--line); position: relative; flex-shrink: 0;
    transition: background .15s ease;
  }
  .toggle-switch .knob {
    position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
    border-radius: 50%; background: var(--ink-faint);
    transition: left .15s ease, background .15s ease;
  }
  .toggle-switch.on { background: rgba(255,138,61,.25); border-color: var(--accent); }
  .toggle-switch.on .knob { left: 22px; background: var(--accent); }

  .primary-btn {
    width: 100%; padding: 15px; border-radius: 12px; border: none;
    background: var(--accent); color: #1a1209; font-size: 23.25px; font-weight: 700;
    margin-top: 22px;
  }
  .primary-btn:disabled { background: var(--bg-elev-2); color: var(--ink-faint); }
  .ghost-btn {
    width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line);
    background: transparent; color: var(--ink-dim); font-size: 21.75px; font-weight: 600;
    margin-top: 10px;
  }

  /* ---------- Detail / compare screen ---------- */
  .compare-stack { padding: 16px 18px; }
  .compare-pair { display: flex; gap: 10px; margin-bottom: 16px; }
  .compare-pair .half { flex: 1; }
  .compare-pair img {
    width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px;
    border: 1px solid var(--line); background: var(--bg-elev);
  }
  .compare-pair .tag {
    font-size: 16.5px; font-weight: 700; color: var(--ink-faint);
    text-transform: uppercase; letter-spacing: .05em; margin: 6px 2px 0;
  }
  .slider-compare {
    position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--line); margin-bottom: 14px;
  }
  .slider-compare img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  }
  .slider-compare .after-clip {
    position: absolute; inset: 0; overflow: hidden;
  }
  .slider-compare .handle-line {
    position: absolute; top: 0; bottom: 0; width: 3px; background: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,.5);
  }
  .slider-compare .handle-knob {
    position: absolute; top: 50%; width: 34px; height: 34px; border-radius: 50%;
    background: #fff; transform: translate(-50%,-50%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
  }
  .slider-compare .handle-knob svg { width: 16px; height: 16px; color: #14171a; }
  .slider-compare input[type=range] {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
    opacity: 0; cursor: ew-resize;
  }
  .meta-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 20.25px;
  }
  .meta-row span:first-child { color: var(--ink-faint); }
  .meta-row span:last-child { color: var(--ink); font-weight: 600; text-align: right; }

  .danger-btn {
    width: 100%; padding: 14px; border-radius: 12px; border: 1px solid rgba(229,89,74,.3);
    background: rgba(229,89,74,.08); color: var(--danger); font-size: 21.75px; font-weight: 600;
    margin-top: 18px;
  }

  /* ---------- Size preset cards ---------- */
  .preset-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-elev); border: 1.5px solid var(--line);
    border-radius: 12px; padding: 13px 14px; margin-bottom: 8px;
  }
  .preset-card.selected { border-color: var(--accent); background: rgba(255,138,61,.08); }
  .preset-radio {
    width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink-faint);
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  }
  .preset-card.selected .preset-radio { border-color: var(--accent); }
  .preset-radio .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: none; }
  .preset-card.selected .preset-radio .dot { display: block; }
  .preset-text { flex: 1; }
  .preset-text .title { font-size: 21.75px; font-weight: 700; margin: 0; }
  .preset-text .sub { font-size: 18px; color: var(--ink-dim); margin: 2px 0 0; }

  /* ---------- Toast ---------- */
  .toast {
    position: fixed; bottom: calc(30px + var(--safe-bottom)); left: 50%;
    transform: translateX(-50%) translateY(20px); opacity: 0;
    background: var(--bg-elev-2); border: 1px solid var(--line);
    color: var(--ink); padding: 12px 20px; border-radius: 30px;
    font-size: 20.25px; font-weight: 600; z-index: 50; pointer-events: none;
    transition: all .25s ease; box-shadow: 0 8px 24px rgba(0,0,0,.4);
    display: flex; align-items: center; gap: 8px;
  }
  .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
  .toast svg { width: 16px; height: 16px; color: var(--good); flex-shrink: 0; }

  /* ---------- Action sheet (project menu) ---------- */
  .sheet-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    z-index: 60; display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .18s ease;
  }
  .sheet-backdrop.show { opacity: 1; visibility: visible; }
  .action-sheet {
    width: 100%; max-width: 480px; background: var(--bg-elev);
    border-radius: 18px 18px 0 0; padding: 8px 14px calc(14px + var(--safe-bottom));
    transform: translateY(100%); transition: transform .22s cubic-bezier(.32,.72,0,1);
  }
  .sheet-backdrop.show .action-sheet { transform: translateY(0); }
  .sheet-item {
    width: 100%; display: flex; align-items: center; gap: 12px;
    padding: 15px 10px; background: transparent; border: none;
    border-bottom: 1px solid var(--line); color: var(--ink);
    font-size: 22.5px; font-weight: 600; text-align: left;
  }
  .sheet-item:last-of-type { border-bottom: none; }
  .sheet-item svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
  .sheet-item.danger { color: var(--danger); }
  .sheet-item.danger svg { color: var(--danger); }
  .sheet-item.cancel { justify-content: center; color: var(--ink-faint); margin-top: 6px; font-weight: 700; }

  /* ---------- PDF export loading overlay ---------- */
  .export-overlay {
    position: fixed; inset: 0; background: rgba(14,17,20,.92);
    z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; opacity: 0; visibility: hidden; transition: opacity .2s ease;
  }
  .export-overlay.show { opacity: 1; visibility: visible; }
  .export-overlay p { color: var(--ink-dim); font-size: 21px; font-weight: 600; margin: 0; text-align: center; padding: 0 30px; }
  .export-spinner {
    width: 42px; height: 42px; border-radius: 50%;
    border: 4px solid var(--bg-elev-2); border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  ::-webkit-scrollbar { display: none; }

  /* ---------- Brand strip ---------- */
  .brand-strip {
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(var(--safe-top) + 10px) 18px 0;
    flex-shrink: 0;
  }
  .brand-mark {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer;
  }
  .brand-badge {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(155deg, var(--accent) 0%, var(--accent-dim) 100%);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 2px 6px rgba(255,138,61,.3);
  }
  .brand-badge svg { width: 19px; height: 19px; color: #1a1209; }
  .brand-text { line-height: 1.15; }
  .brand-text .ko {
    font-size: 23.25px; font-weight: 800; color: var(--ink);
    letter-spacing: -0.01em; margin: 0;
  }
  .brand-text .en {
    font-size: 16.5px; font-weight: 700; color: var(--accent);
    letter-spacing: .14em; margin: 1px 0 0;
  }
  .brand-credit {
    font-size: 17.25px; color: var(--ink-faint); font-weight: 600;
    letter-spacing: .01em;
  }
  .brand-credit b { color: var(--ink-dim); font-weight: 700; }

  .current-project-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--bg-elev-2); border: 1px solid var(--line);
    border-radius: 20px; padding: 7px 13px; margin-bottom: 4px;
    font-size: 19.5px; font-weight: 700; color: var(--accent);
  }
  .current-project-chip svg { width: 15px; height: 15px; flex-shrink: 0; }

  /* ---------- Project cards (home list) ---------- */
  .project-card {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px;
    margin-bottom: 10px; position: relative;
  }
  .project-card .ptitle {
    font-size: 29px; font-weight: 800; margin: 0 0 4px;
  }
  .project-card .pmeta {
    font-size: 18.75px; color: var(--ink-dim); margin: 0; display: flex; gap: 10px; align-items: center;
  }
  .project-card .pmeta .badge {
    background: rgba(255,138,61,.14); color: var(--accent);
    border-radius: 8px; padding: 2px 8px; font-weight: 700; font-size: 17.25px;
  }
  .project-card .chevron {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    color: var(--ink-faint);
  }
  .project-card .chevron svg { width: 18px; height: 18px; }

  .brand-watermark {
    position: absolute; z-index: 3; pointer-events: none;
    display: flex; align-items: center; gap: 5px;
    background: rgba(20,23,26,.45); backdrop-filter: blur(4px);
    border-radius: 8px; padding: 4px 8px;
    font-size: 14.25px; font-weight: 700; color: rgba(255,255,255,.75);
    letter-spacing: .06em;
  }
  .brand-watermark .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }