/* ==========================================================================
   Clone Town — 모바일/위젯 화면 (?phone=1)

   섀시 = 아이폰 목업. 바깥부터: 베젤(둥근 검정 테두리) → 화면 → 그 안에
   iOS 상태바 · 활동줄 · 마을 · 탭 · 내용 · 홈 인디케이터.

   왜 목업인가 — 데스크탑 위젯은 크롬 --app 창이다. 창을 그냥 두면 각진 회색 사각형에
   흰 제목표시줄이 얹혀 "브라우저 창"으로 보인다. 폰처럼 보여야 폰처럼 쓰게 된다.
   창 자체의 둥근 모서리는 start-desktop.ps1 의 CreateRoundRectRgn 이 만든다 —
   여기 --bezel-r 값과 그쪽 반지름(폭의 11.5%)을 같이 움직여야 한다.

   맵 컨테이너는 게임 해상도 비율(11:7)로 둔다 — CSS로 캔버스를 늘리면 타일이 찌그러진다.
   ========================================================================== */

body.phone {
    background: #000;
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 100vh;
    height: calc(100dvh - var(--bb-kb, 0px));
    font-family: 'Pretendard', system-ui, 'Malgun Gothic', sans-serif;
}

/* 원래 레이아웃에서 필요한 조각(#game-area, #dm-panel)만 섀시로 옮겨 쓴다.
   ⚠️ #app 을 처음부터 display:none 으로 두면 그 안에서 부팅하는 Phaser가 크기 0을 보고
   빈 캔버스를 만든다(실기기에서 맵이 검게 나왔던 원인). 옮긴 뒤에야 숨긴다. */
body.phone #app { position: fixed !important; left: -10000px !important; top: 0 !important; }
body.phone.bb-ready #app { display: none !important; }
body.phone #ambient-bar,
body.phone #ct-minimap,
body.phone #ct-convo { display: none !important; }
body.phone #bb { display: flex !important; }

/* ── 베젤(본체) ──────────────────────────────────────────────────────
   패딩이 곧 테두리 두께다. 아래를 조금 더 두껍게 둔 건 실제 기기가 그렇기 때문. */
#bb {
    --bezel-r: 44px;
    --screen-r: 33px;

    display: none;
    flex-direction: column;
    position: relative;
    width: 100vw;
    max-width: 520px;
    height: 100vh;
    /* --bb-kb = 소프트 키보드가 덮은 높이. ct-phone.js 의 followKeyboard()가 visualViewport
       를 보고 채운다(키보드가 없으면 0). 섀시를 그만큼 줄이면 맨 아래 입력줄이 키보드 바로
       위로 따라 올라오고, 대화 로그도 함께 짧아져 마지막 말풍선이 계속 보인다. */
    height: calc(100dvh - var(--bb-kb, 0px));
    margin: 0 auto;
    padding: 9px 9px 11px;
    box-sizing: border-box;
    border-radius: var(--bezel-r);
    background:
        linear-gradient(160deg, #3a3f47 0%, #0d0e11 18%, #05060a 50%, #0d0e11 84%, #43474f 100%);
    box-shadow:
        inset 0 0 0 1.5px #55595f,          /* 금속 테 */
        inset 0 0 0 4px #0a0b0e,            /* 테와 유리 사이 검정 */
        0 18px 40px rgba(0, 0, 0, .6);
    overflow: hidden;
}

/* ── 데스크탑 위젯: 섀시 바깥 여백 ──
   #010203 = 사실상 검정이지만 UI 어디에도 안 쓰는 고유값이다. 런처가 창을 렌더해서
   이 색이 처음 나오는 행으로 **크롬 제목표시줄 높이를 잰다**(ct-phone.js의 widgetMode 주석).
   한때 이 색을 자홍으로 두고 LWA_COLORKEY로 창을 폰 실루엣대로 도려내려 했지만,
   마을이 계속 애니메이션되는 탓에 새로 합성되는 프레임마다 키가 풀렸다. 자세한 경위는
   CLONETOWN_CONTEXT.md 5-58. 그래서 지금 네 귀퉁이는 검게 남는다. */
body.phone.widget { background: #010203; }

/* 창 밖으로 번지는 그림자는 끈다 — 사각 창 안에서 후광처럼 보인다. 안쪽 테는 유지. */
body.phone.widget #bb {
    box-shadow: inset 0 0 0 1.5px #55595f, inset 0 0 0 4px #0a0b0e;
}

/* ── 프레임리스 호스트(Electron) ──
   창이 투명하다. 섀시 밖을 뚫어 두면 남는 건 둥근 폰 실루엣뿐이다 —
   크롬 창에서 네 가지 방법으로 시도했다 실패한 바로 그 모양이다. */
body.phone.frameless { background: transparent; }
body.phone.frameless #bb {
    /* 맨 바깥의 밝은 금속 테(1.5px #55595f)를 뺀다.
       창이 폰 크기에 딱 맞아서 그 선이 화면상 '목업 바깥 테두리'처럼 읽혔다
       — 밝은 배경 위에서 특히 두드러졌다(실측: 가장자리 픽셀 85,89,95).
       바깥 그림자도 뺀다. 창이 #bb 와 같은 크기라 어차피 잘려서 보이지 않는데,
       모서리에 옅은 띠만 남긴다. 이제 실루엣은 어두운 베젤에서 그대로 끝난다. */
    box-shadow: inset 0 0 0 3px #0a0b0e;
}

/* 위젯 이동 = OS 네이티브 드래그.
   JS의 window.moveBy 로는 **다른 모니터로 넘어가지 못한다**(크롬이 창 이동을 현재 화면
   안으로 제한한다). app-region 을 주면 크롬이 OS 창 이동으로 처리해서 듀얼 모니터를
   자유롭게 오간다. 닫기 버튼만 드래그에서 뺀다 — 안 그러면 눌리지 않는다. */
body.phone.widget #bb-top { -webkit-app-region: drag; app-region: drag; }
body.phone.widget #bb-time,
body.phone.widget #bb-sys { -webkit-app-region: drag; app-region: drag; }
body.phone.widget #bb-close { -webkit-app-region: no-drag; app-region: no-drag; }

/* 다이내믹 아일랜드 — 화면 위에 떠 있는 검은 알약 */
#bb-island {
    position: absolute;
    top: calc(var(--bb-pad-top, 9px) + 6px); left: 50%; transform: translateX(-50%);
    width: 92px; height: 25px; border-radius: 13px;
    background: #000;
    z-index: 30;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .05);
}
#bb-island::after {                      /* 전면 카메라 */
    content: ''; position: absolute;
    right: 9px; top: 50%; transform: translateY(-50%);
    width: 8px; height: 8px; border-radius: 50%;
    background: radial-gradient(circle at 35% 32%, #1e2b3a 0 38%, #06080c 60%);
    box-shadow: inset 0 0 1px rgba(120, 170, 255, .5);
}

/* ── 부팅 스플래시 ── */
#bb-splash {
    position: absolute; inset: 0; z-index: 60;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(120% 90% at 50% 30%, #131a24 0%, #080a0f 70%);
    border-radius: inherit;
    transition: opacity .6s ease;
}
#bb-splash.out { opacity: 0; pointer-events: none; }
#bb-splash .s-mark {
    font: 800 26px/1 'Pretendard', system-ui, sans-serif;
    color: #eafff8; letter-spacing: 2px;
}
#bb-splash .s-from {
    position: absolute; bottom: 34px;
    font: 500 12px/1 'Pretendard', system-ui, sans-serif;
    color: #57e0c4; letter-spacing: .4px; opacity: .9;
}
#bb-splash .s-from b { font-weight: 800; }

/* ── 산출물 획득 토스트(게임풍) ── */
#bb-acquire {
    position: absolute; left: 10px; right: 10px; bottom: 86px; z-index: 55;
    padding: 10px 12px;
    background: #10241e; border: 2px solid #57e0c4; border-radius: 10px;
    box-shadow: 0 4px 0 #0a1712, 0 8px 22px rgba(0,0,0,.5);
    color: #eafff8; font: 700 13px/1.5 'Pretendard', system-ui, sans-serif;
    letter-spacing: .2px;
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity .25s ease, transform .25s cubic-bezier(.2,1.4,.4,1);
}
#bb-acquire.on { opacity: 1; transform: translateY(0); }
#bb-acquire .ico { margin-right: 2px; }

/* ── 키보드가 올라온 동안: 마을·상태줄을 접어 대화 로그에 자리를 준다 ──
   fitGame()은 크기 0이면 건너뛰므로(가드 있음) 캔버스를 접어도 Phaser는 멀쩡하다. */
body.phone.kb-open #bb-map {
    height: 0 !important; min-height: 0 !important;
    aspect-ratio: auto !important;
    border-width: 0 !important;
    overflow: hidden;
}
body.phone.kb-open #bb-status { display: none; }

/* ── 화면(유리 안쪽) ── */
#bb-screen {
    position: relative;               /* 스플래시(absolute)의 기준 */
    flex: 1 1 auto; min-height: 0;
    display: flex; flex-direction: column;
    border-radius: var(--screen-r);
    overflow: hidden;
    background: linear-gradient(180deg, #10131a 0%, #0b0e14 45%, #080a0f 100%);
}

/* ── iOS 상태바(시간 · 신호/와이파이/배터리 · 닫기) ──
   데스크탑 위젯은 여기를 잡고 창을 옮긴다.
   가운데는 아일랜드가 덮으므로 비워 둔다 — 좌우로만 배치한다. */
#bb-top {
    flex: none;
    display: flex; align-items: center;
    height: 44px;
    padding: 0 16px 0 20px;
    cursor: move; user-select: none;
    color: #eef2f7;
}
#bb-time {
    font: 700 14px/1 -apple-system, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: .01em; font-variant-numeric: tabular-nums;
}
#bb-sys {
    margin-left: auto;
    display: flex; align-items: center; gap: 6px;
}
#bb-sys svg { display: block; }
#bb-close {
    width: 19px; height: 19px; flex: none; cursor: pointer; margin-left: 3px;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .13); color: #cdd5e0;
    font: 700 10px/1 system-ui;
    display: flex; align-items: center; justify-content: center;
}
#bb-close:hover { background: #e0453d; color: #fff; }

/* 인앱 브라우저 안내 */
#bb-inapp {
    display: none; flex: none; margin: 0 10px 6px;
    background: #2a2110; border: 1px solid #5a4a1e; border-radius: 8px;
    padding: 7px 10px; color: #ffd98a; font-size: 11.5px; line-height: 1.5;
}
#bb-inapp.on { display: block; }
#bb-inapp b { color: #ffcf1f; }

/* ── 활동 줄 ── */
#bb-status {
    flex: none; display: flex; align-items: center; gap: 6px;
    margin: 0 10px 7px;
    padding: 6px 10px; background: #0b1018;
    border: 1px solid #18202c; border-radius: 9px;
    font: 600 10.5px/1.35 ui-monospace, Consolas, monospace;
    color: #9fe8d6; letter-spacing: .02em;
}
#bb-status .dot {
    width: 5px; height: 5px; border-radius: 50%; background: #57e0c4; flex: none;
    box-shadow: 0 0 0 0 rgba(87, 224, 196, .6); animation: bbpulse 2s infinite;
}
@keyframes bbpulse {
    0%   { box-shadow: 0 0 0 0 rgba(87, 224, 196, .55); }
    70%  { box-shadow: 0 0 0 7px rgba(87, 224, 196, 0); }
    100% { box-shadow: 0 0 0 0 rgba(87, 224, 196, 0); }
}
/* ⚠️ '클론타운'이 두 줄로 접히던 문제(2026-09-16 대표). 활동 글이 길면 flex 가 이름 쪽을 줄여
   글자를 접었다. 이름은 절대 줄지 않게(flex:none·nowrap), 줄어들 쪽은 활동 글 하나뿐이다.
   ⚠️ 말줄임(ellipsis)은 min-width:0 이 있어야 먹는다 — 없으면 칸이 안 줄어 그냥 넘친다. */
#bb-status { flex-wrap: nowrap; }
#bb-status b { flex: none; white-space: nowrap; }
#bb-status .now { flex: 1; min-width: 0; color: #cfd9e8; font-weight: 400;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 마을(항상 보임) ── */
#bb-map {
    flex: none; width: 100%; aspect-ratio: 11 / 7; position: relative;
    background: #05070d; border-top: 1px solid #18202c; border-bottom: 1px solid #18202c;
    overflow: hidden;
}
#bb-map::after {                     /* 로딩 중 검은 사각형만 보이지 않게 */
    content: '마을 불러오는 중…';
    position: absolute; inset: 0; z-index: 0;
    display: flex; align-items: center; justify-content: center;
    color: #45506180; font: 600 11px/1 ui-monospace, Consolas, monospace;
}
#bb-map #game-area,
#bb-map #phaser-container {
    position: absolute !important; inset: 0 !important;
    width: 100% !important; height: 100% !important; margin: 0 !important;
}
#bb-map canvas { display: block; margin: 0 auto; position: relative; z-index: 1; }

/* ── 탭 ── */
#bb-tabs {
    flex: none; display: flex; gap: 0;
    border-bottom: 1px solid #18202c; background: #0b1018;
}
.bb-tab {
    flex: 1 1 0; padding: 9px 6px; cursor: pointer;
    background: transparent; border: 0; border-bottom: 2px solid transparent;
    color: #7f8a98; font: 700 12px/1 system-ui, sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
.bb-tab.on { color: #dff6ef; border-bottom-color: #57e0c4; background: #0e1622; }
.bb-tab .cnt {
    font: 700 9.5px/1 ui-monospace, monospace; color: #05231d; background: #57e0c4;
    border-radius: 8px; padding: 2px 5px; min-width: 8px;
}
.bb-tab .cnt:empty { display: none; }

/* ── 내용 ── */
#bb-body {
    flex: 1 1 auto; min-height: 0; position: relative;
    background: #080c13; overflow: hidden;
}
.bb-pane { display: none; position: absolute; inset: 0; flex-direction: column; }
.bb-pane.on { display: flex; }

/* ── 홈 인디케이터 ── */
#bb-home {
    flex: none; height: 20px;
    display: flex; align-items: center; justify-content: center;
    background: #080c13;
}
#bb-home i {
    display: block; width: 36%; max-width: 140px; height: 5px; border-radius: 3px;
    background: rgba(235, 240, 248, .82);
}

/* DM — 기존 #dm-panel을 그대로 옮겨 쓴다 */
#bb-pane-dm #dm-panel {
    display: flex !important; flex-direction: column; flex: 1 1 auto; min-height: 0;
    background: transparent !important; border: 0 !important;
}
#bb-pane-dm .ip-header,
#bb-pane-dm #dm-memory-note,
#bb-pane-dm #dm-doc-btn { display: none !important; }
#bb-pane-dm #dm-log {
    flex: 1 1 auto !important; min-height: 0 !important; max-height: none !important;
    overflow-y: auto !important; background: transparent !important; padding: 8px 10px !important;
}
#bb-pane-dm #dm-input-row {
    flex: none !important; padding: 7px 8px !important; gap: 6px !important;
    background: #0b111a !important; border-top: 1px solid #16202c !important;
}
#bb-pane-dm #dm-input {
    background: #121a25 !important; border: 1px solid #223044 !important; color: #e8eef7 !important;
    font-size: 14px !important; border-radius: 8px !important; padding: 9px 10px !important;
}
#bb-pane-dm #dm-send {
    background: #1f6f5f !important; border: 0 !important; color: #eafff8 !important;
    font-size: 12px !important; font-weight: 700 !important; border-radius: 8px !important; padding: 9px 13px !important;
}

/* 산출물 */
#bb-pane-deliv { overflow-y: auto; padding: 9px; display: none; }
#bb-pane-deliv.on { display: block; }
.bb-empty { color: #93a3b8; font-size: 12px; text-align: center; padding: 26px 14px; line-height: 1.7; }
.bb-job {
    background: #0c1320; border: 1px solid #1a2434; border-radius: 9px;
    padding: 9px 11px; margin-bottom: 8px;
}
/* 2026-10-12 대표: "결과칸에 있는것도 대기상태처럼 색상 그대로 좀 써."
   판정 전 산출물을 opacity .62 로 흐리고 있었다 — 읽으라고 내놓은 글을 흐리게 둘 이유가 없다.
   상태는 이제 뱃지(의뢰중·작업중·검수대기)가 말한다. 색이 아니라 뱃지로 구분한다. */
.bb-job.pending { opacity: 1; }
.bb-job .t { font: 700 10.5px/1.4 ui-monospace, Consolas, monospace; color: #57e0c4; }
.bb-job .v {
    font: 700 9px/1 ui-monospace, monospace; color: #05231d; background: #57e0c4;
    border-radius: 7px; padding: 2px 5px; margin-left: 4px; vertical-align: 1px;
}
.bb-job .v.process { background: #6b7480; color: #edf1f6; }
.bb-job .v.wait    { background: #2c3646; color: #b3c1d1; }
.bb-job .v.review  { background: #6c5ce7; color: #fff; }
.bb-job .s { font-size: 12px; color: #ffffff; line-height: 1.6; margin: 6px 0 8px; }
/* 제목과 설명을 나눈다 — 줄글 한 덩어리는 읽히지 않는다(2026-09-16 대표). */
.bb-job .s-t { font-size: 13.5px; font-weight: 700; color: #ffffff; line-height: 1.4; margin-bottom: 5px; }
.bb-job .s-b, .bb-job .s-full { white-space: pre-line; }   /* 클론이 나눠 쓴 줄을 그대로 살린다 */
.bb-job .n {
    font-size: 11px; color: #f0e6c8; background: #1a1710; border-left: 2px solid #6d5a2a;
    padding: 4px 7px; margin: 0 0 6px; border-radius: 0 4px 4px 0; line-height: 1.5;
}
.bb-job .fs { display: flex; flex-wrap: wrap; gap: 4px; }
.bb-job .f {
    font: 600 9.5px/1 ui-monospace, Consolas, monospace; color: #dce6f2;
    background: #142132; border: 1px solid #2a3b52; border-radius: 5px; padding: 4px 6px;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bb-job .f.more { color: #57e0c4; }

/* ── 일반 브라우저 탭에서 볼 때(위젯 아님) ──
   위젯은 창이 곧 폰이라 화면을 꽉 채우면 되지만, 브라우저 탭은 뷰포트가 폰보다 훨씬 넓고
   낮다. 그대로 늘리면 위아래가 잘린 기둥이 되어 둥근 테두리가 보이지도 않는다.
   비율(1:2.05)을 지킨 채 가운데 띄우고, 실루엣이 전부 보이도록 여백을 준다. */
@media (pointer: fine) {
    body.phone:not(.widget) {
        display: flex; align-items: center; justify-content: center;
        padding: 20px;
        background: radial-gradient(120% 90% at 50% 0%, #191d24 0%, #08090b 65%);
    }
    body.phone:not(.widget) #bb {
        /* 크기는 Electron 위젯과 **같은 값**으로 맞춘다(widget/main.js: WIDTH=380, RATIO=2.05).
           예전엔 상한이 860px 이라 창 높이에 따라 목업이 419px 폭까지 커졌다 — 위젯을 보는
           사람과 링크로 들어온 사람이 서로 다른 크기를 보게 된다. 링크 하나로 같은 화면을
           보이는 게 목적이므로 상한을 위젯 실치수(380×779)에 고정한다.
           창이 그보다 낮으면 비율을 지킨 채 줄어든다(잘라내지 않는다). */
        --ct-widget-h: 779px;               /* 380 × 2.05 */
        flex: none;
        height: min(calc(100dvh - 40px), var(--ct-widget-h));
        width: auto;
        aspect-ratio: 1 / 2.05;
        max-width: none;
        margin: 0;
    }

    /* 브라우저 탭에는 닫을 창이 없다 — window.close() 가 무시되므로 죽은 버튼이 된다.
       PWA로 설치해 독립 창(standalone)으로 띄운 경우에만 되살린다. 거기선 실제로 닫힌다. */
    body.phone:not(.widget) #bb-close { display: none; }
}

@media (display-mode: standalone) {
    body.phone:not(.widget) #bb-close { display: flex; }
}

/* ── 실기기: 목업을 벗고 화면을 꽉 채운다 ──
   진짜 폰에는 이미 베젤도 상태바도 홈 인디케이터도 있다. 그 위에 가짜를 또 그리면 이중이 된다. */
@media (pointer: coarse) {
    #bb {
        max-width: none; border-radius: 0; box-shadow: none; padding: 0;
        background: #080a0f;
    }
    #bb-screen { border-radius: 0; }
    /* 진짜 폰은 OS가 이미 시간·배터리를 그린다. 가짜 상태바는 통째로 뺀다. */
    #bb-island, #bb-home, #bb-top { display: none !important; }
    #bb-screen { padding-top: env(safe-area-inset-top); }
    #bb-body { padding-bottom: env(safe-area-inset-bottom); }
    .bb-tab { padding: 11px 6px; font-size: 13px; }
    #bb-pane-dm #dm-input { font-size: 16px !important; }   /* 16px 미만이면 iOS가 화면을 확대한다 */
}

/* ── 이적시장 탭 (2026-08-25) ── */
#bb-pane-market { padding: 12px 14px; overflow-y: auto; }
.mk-card {
    background: #0e1622; border: 1px solid #232f42; border-radius: 14px;
    padding: 14px 16px; margin-bottom: 12px;
}
.mk-h { font-weight: 800; font-size: 14.5px; color: #dff6ef; margin-bottom: 8px; }
.mk-row { font-size: 13px; color: #dbe5f0; margin-bottom: 4px; }
.mk-row b { color: #fff; font-weight: 700; }
.mk-toggle {
    display: block; margin-top: 10px; font-size: 13px; color: #dfe5ec;
    font-weight: 600; cursor: pointer;
}
.mk-toggle input { accent-color: #57e0c4; margin-right: 6px; }
.mk-toggle .mk-td { display: block; font-weight: 400; font-size: 11.5px; color: #8d9cae; margin-top: 3px; }
/* 토글을 걷어낸 뒤(2026-08-27) 이 캡션이 카드 본문 자리에 남았다. 토글 안이 아니어도
   같은 크기로 보이게 한다 — 안 그러면 안내문이 실적보다 커 보인다. */
.mk-card > .mk-td { display: block; font-size: 11.5px; line-height: 1.6; color: #8d9cae; margin-top: 8px; }
.mk-card > .mk-td b { color: #b3c1d1; }
.mk-note {
    font-size: 12.5px; color: #9fb0c3; line-height: 1.65; background: #10151d;
    border: 1px dashed #2a3648; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
}
.mk-note b { color: #57e0c4; }
.mk-note span { color: #8d9cae; font-size: 11.5px; }
.mk-sec { font-size: 12px; font-weight: 700; color: #a6b4c4; margin: 14px 0 8px; letter-spacing: .04em; }
.mk-co {
    background: #0e1622; border: 1px solid #26313f; border-radius: 12px;
    padding: 11px 13px; margin-bottom: 8px;
}
.mk-co .t { font-size: 13.5px; font-weight: 700; color: #e8eef5; display: flex; align-items: center; gap: 7px; }
.mk-co .t i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.mk-co .t .n { color: #8d9cae; font-weight: 400; font-size: 12px; margin-left: auto; }
/* 회사 로고 — 원본이 투명 배경 + 짙은 회색 글자라 어두운 카드 위에서는 안 보인다.
   흰 판(칩)을 깔고 그 안에 높이만 맞춰 얹는다. 가로 길이는 로고 비율대로 둔다. */
.mk-logo {
    background: #fff; border-radius: 5px; padding: 3px 6px;
    display: inline-flex; align-items: center; flex: none;
}
.mk-logo img { height: 13px; width: auto; display: block; }
.mk-co .v { font-size: 12px; color: #a6b4c4; margin-top: 5px; line-height: 1.55; }
.mk-host {
    font-size: 10.5px; color: #b3c1d1; border: 1px solid #33405a; border-radius: 6px;
    padding: 1px 6px; font-weight: 600;
}
.mk-mine {
    font-size: 10.5px; color: #57e0c4; border: 1px solid #2c5f54; border-radius: 6px;
    padding: 1px 6px; font-weight: 600;
}
.mk-tr {
    font-size: 12.5px; color: #9fb0c3; padding: 7px 4px; border-bottom: 1px solid #1a2330;
}
.mk-tr b { color: #dff6ef; }

/* ── 제안 인박스 (SPEC 14절 "내 클론 키우기") ─────────────────────────────
   이 화면의 버튼 두 개가 서비스의 핵심 동작이다. 그래서 카드보다 버튼이 크고,
   결정된 제안은 흐려지되 사라지지는 않는다 — 무엇을 받아들여 왔는지가 곧 이력이다. */
.pp-n { color: #57e0c4; }
.pp-card {
    background: #0e1622; border: 1px solid #222f40; border-radius: 12px;
    padding: 12px 13px; margin-bottom: 9px;
}
.pp-card.off { opacity: .5; }
.pp-h { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.pp-k {
    font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; letter-spacing: .02em;
}
.pp-k.job { color: #ffd479; border: 1px solid #6b5527; background: #241d0d; }
.pp-k.prj { color: #57e0c4; border: 1px solid #2c5f54; background: #0d211d; }
/* 스킬 승격 — 소유권이 바뀌는 승인이라 다른 둘과 확실히 갈라 보이게 한다. */
.pp-k.skill { color: #ffcf1f; border: 1px solid #6b5a1c; background: #241f0b; }
.pp-b.quote {
    border-left: 2px solid #6b5a1c; padding-left: 8px; margin-left: 1px;
    font-style: normal; color: #dfe5ee;
}
.pp-note {
    margin-top: 7px; padding: 7px 9px; border-radius: 6px;
    background: #1a1608; border: 1px solid #3d341343; color: #c8bd93;
    font-size: 11px; line-height: 1.55;
}
.pp-note b { color: #ffcf1f; font-weight: 700; }
.pp-from { font-size: 12px; color: #a6b4c4; margin-left: auto; }
.pp-t { font-size: 14px; font-weight: 700; color: #e8eef5; line-height: 1.45; }
.pp-b { font-size: 12.5px; color: #ffffff; margin-top: 6px; line-height: 1.6; white-space: pre-wrap; }
.pp-act { display: flex; gap: 8px; margin-top: 11px; }
.pp-act button {
    flex: 1; padding: 11px 0; border-radius: 10px; font-size: 13.5px; font-weight: 700;
    font-family: inherit; cursor: pointer; border: 1px solid transparent;
}
.pp-act button:disabled { opacity: .55; cursor: default; }
.pp-no  { background: #131a26; color: #93a0b6; border-color: #263142; }
.pp-yes { background: #57e0c4; color: #06231d; }
.pp-done { font-size: 12px; color: #6d7b8e; margin-top: 9px; }
.pp-done.ok { color: #57e0c4; }
.pp-empty {
    font-size: 12.5px; color: #a6b4c4; text-align: center; line-height: 1.7;
    padding: 18px 10px; border: 1px dashed #222c3d; border-radius: 12px;
}
.pp-empty span { color: #5c6478; font-size: 11.5px; }

/* 조직 스킬 — 회사가 승인해 자산으로 등록한 절차. 개인 기억과 섞이지 않게 따로 세운다. */
.os-item {
    margin-top: 7px; padding: 8px 10px; border-radius: 7px;
    background: #121722; border: 1px solid #232c3d;
    font-size: 12px; line-height: 1.6; color: #dfe5ee;
}
.os-from { display: block; margin-top: 4px; font-size: 11px; color: #8b96ab; }

/* ── 산출물: 열람 + 그 자리 승인 (2026-09-02) ──────────────────────── */
/* 파일 이름은 눌러서 열 수 있어야 한다. 내용을 못 보면 승인이 성립하지 않는다. */
.bb-job .f.open { cursor: pointer; border-color: #2c5f54; color: #9fe9d8; }
.bb-job .f.open:active { background: #14261f; }
.s-more {
    margin-left: 6px; padding: 1px 7px; border-radius: 5px; cursor: pointer;
    background: #1a2130; border: 1px solid #2a3448; color: #cdd8e6; font-size: 11px;
    font-family: inherit;
}
.s-full { margin-top: 6px; color: #ffffff; font-size: 12px; line-height: 1.6; }

.jb-ask {
    margin-top: 9px; padding: 9px 10px; border-radius: 7px;
    background: #1a1608; border: 1px solid #3d3413; color: #efe6c8;
    font-size: 12px; line-height: 1.55;
}
.jb-ask b { color: #ffcf1f; }
.jb-ask .q {
    margin: 7px 0; padding-left: 8px; border-left: 2px solid #6b5a1c;
    color: #ffffff;
}
.jb-btns { display: flex; gap: 7px; justify-content: flex-end; }
.jb-done {
    margin-top: 9px; padding: 7px 10px; border-radius: 7px;
    background: #101820; border: 1px solid #223040; color: #cdd8e6; font-size: 11px;
}

/* 파일 뷰어 — HTML 은 sandbox iframe 으로 렌더하고, 그 외에는 텍스트로 본다 */
#ct-viewer {
    position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column;
    background: rgba(5, 7, 13, .97);
    /* ⚠️ 노치·상태바에 상단 바가 가리면 돌아갈 버튼이 안 보인다. */
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
#ct-viewer .vw-back {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
    background: #1a2130; border: 1px solid #2a3448; color: #eef3fa;
    font-size: 17px; line-height: 1; font-family: inherit;
}
#ct-viewer .vw-bar {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border-bottom: 1px solid #232c3d; flex: 0 0 auto;
}
#ct-viewer .vw-t {
    flex: 1; color: #eef3fa; font-size: 13px; font-weight: 700;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#ct-viewer .vw-x {
    padding: 6px 12px; border-radius: 6px; cursor: pointer;
    background: #1a2130; border: 1px solid #2a3448; color: #cfd6e2;
    font-size: 12px; font-family: inherit;
}
#ct-viewer .vw-body {
    flex: 1; margin: 0; padding: 14px; overflow: auto;
    color: #cfd6e2; font-size: 11.5px; line-height: 1.65;
    font-family: var(--mono, ui-monospace, Consolas, monospace);
    white-space: pre-wrap; word-break: break-word;
}

/* 산출물이 문서인데 코드로 보이면 읽을 수가 없다. 흰 종이처럼 띄운다.
   ⚠️ sandbox 는 ct-phone.js 에서 빈 값으로 준다 — 스크립트가 돌면 안 된다. */
#ct-viewer .vw-frame {
    flex: 1; width: 100%; border: 0; margin: 0; background: #fff;
}
#ct-viewer .vw-mode {
    padding: 6px 12px; border-radius: 6px; cursor: pointer;
    background: #16202c; border: 1px solid #2a3448; color: #9fb0c4;
    font-size: 12px; font-family: inherit; flex: 0 0 auto;
}

/* 참여 요청 — 입사(소속이 바뀜)와 헷갈리면 안 되므로 색을 따로 준다. */
.pp-k.join {
    background: #10243a; border-color: #1d4b78; color: #7fc0f5;
}

/* ── 제안 몰아보기 (2026-09-09) ────────────────────────────────────────
   ⚠️ 왜 있나: 카드 목록은 쌓이면 안 본다. 미결 41건, 가장 오래된 것이 엿새 전이었다.
   한 건씩 크게 띄우고 세 버튼으로 끝낸다 — 건너뛰기를 남겨 억지 결정을 막는다. */
.pp-triage {
    width: 100%; margin: 6px 0 10px; padding: 10px;
    background: linear-gradient(90deg, #1a1a2e, #0f3460); color: #fff;
    border: none; border-radius: 10px; font-size: 12.5px; font-weight: 700;
    cursor: pointer; font-family: inherit;
}
.pp-tri-back {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(12, 14, 22, .72); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center; padding: 18px;
}
.pp-tri {
    width: 100%; max-width: 340px; max-height: 82vh; overflow: auto;
    background: #fff; border-radius: 16px; padding: 16px 16px 14px;
    font-family: system-ui, -apple-system, 'Malgun Gothic', sans-serif;
    box-shadow: 0 24px 60px -18px rgba(0,0,0,.6);
}
.pp-tri-top {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11.5px; color: #889; font-weight: 600;
    /* ⚠️ 없으면 '1 / 2' 가 두 줄로 깨진다(실측). 진행 표시가 깨지면 몇 개 남았는지가 안 읽힌다. */
    white-space: nowrap;
}
.pp-tri-top button { background: none; border: none; font-size: 15px; color: #99a; cursor: pointer; }
.pp-tri-kind { margin-top: 10px; font-size: 11px; color: #5a2ddf; font-weight: 700; }
.pp-tri-t { margin-top: 4px; font-size: 15px; font-weight: 700; color: #1a1c22; line-height: 1.4; }
.pp-tri-b {
    margin-top: 9px; font-size: 12.5px; line-height: 1.6; color: #445;
    white-space: pre-wrap; word-break: break-word;
    max-height: 34vh; overflow: auto;
}
.pp-tri-note {
    margin-top: 10px; padding: 7px 9px; background: #f4f2ff; border-radius: 8px;
    font-size: 11.5px; color: #4a3a8f; line-height: 1.5;
}
.pp-tri-act { display: flex; gap: 7px; margin-top: 14px; }
.pp-tri-act button {
    flex: 1; padding: 11px 0; border-radius: 10px; font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit; border: 1px solid transparent;
}
.pp-tri-act button:disabled { opacity: .5; cursor: default; }
.pp-tri-act .t-no   { background: #fff0f0; border-color: #ffd0d0; color: #c0392b; }
/* 건너뛰기가 가장 눈에 안 띄어야 한다 — 기본값이 '나중에'가 되면 아무것도 안 정해진다. */
.pp-tri-act .t-skip { background: #f4f5f8; border-color: #e2e4ea; color: #778; flex: 0 0 84px; }
.pp-tri-act .t-yes  { background: #0f3460; color: #fff; }
.pp-tri-done { padding: 26px 0; text-align: center; font-size: 15px; font-weight: 700; color: #2f8f7f; }
.pp-tri-x {
    width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #26313f;
    background: #0e1622; color: #b3c1d1; border-radius: 10px; font-size: 13px;
    cursor: pointer; font-family: inherit;
}

/* ── 주인 피드백 (2026-09-10) ─────────────────────────────────────────
   ⚠️ 임원 검수(.n)와 **다르게 보여야 한다.** 그건 클론이 매긴 점수고 이건 사람의 말이다.
   섞여 보이면 "누가 한 말인지"가 사라진다. */
.bb-job .fb.has {
    margin-top: 6px; padding: 6px 9px; border-radius: 8px;
    background: #0d1a2c; border-left: 3px solid #2d6cdf;
    font-size: 11.5px; line-height: 1.55; color: #bcd0e8; word-break: break-word;
    white-space: pre-wrap;          /* 남긴 줄바꿈을 그대로 보여 준다 */
}
.bb-job .fb.has b { color: #2d6cdf; margin-right: 5px; }
/* 버튼은 아래에 붙인다 — 칸이 늘어나도 버튼이 가운데로 떠오르지 않게. */
.bb-job .fb-edit { display: flex; gap: 6px; margin-top: 7px; align-items: flex-end; }
.bb-job .fb-in {
    flex: 1; min-width: 0; padding: 6px 9px; border: 1px solid #26313f;
    background: #0a111b; color: #e8eef5;
    border-radius: 8px; font-size: 11.5px; font-family: inherit; outline: none;
    line-height: 1.5; resize: none; overflow: hidden; min-height: 30px;
    box-sizing: border-box;
}
.bb-job .fb-in:focus { border-color: #2d6cdf; }
.bb-job .fb-save {
    flex: 0 0 auto; padding: 6px 11px; border: none; border-radius: 8px;
    background: #2d6cdf; color: #fff; font-size: 11.5px; font-weight: 700;
    cursor: pointer; font-family: inherit;
}
.bb-job .fb-save:disabled { opacity: .55; cursor: default; }

/* 산출물 목록: 스크롤바는 숨기고 스크롤은 그대로(2026-09-10 대표 지적 — "스크롤은 자연스럽게").
   손가락·휠로는 그대로 넘어간다. 막대만 안 보인다. */
#bb-body, #bb-pane-deliv, #bb-pane-market { scrollbar-width: none; -ms-overflow-style: none; }
#bb-body::-webkit-scrollbar, #bb-pane-deliv::-webkit-scrollbar, #bb-pane-market::-webkit-scrollbar { display: none; }

/* 🎮 스킬북 (2026-09-15) */
#bb-pane-me, #bb-pane-town { overflow-y: auto; padding: 10px 12px 16px; gap: 8px; scrollbar-width: none; }
#bb-pane-me::-webkit-scrollbar, #bb-pane-town::-webkit-scrollbar { display: none; }
/* 🎮 스킬북 · 성장 트리 (2026-09-16 다시 만듦)
   ⚠️ 옛 판은 흰 카드였다 — 폰 화면이 어두운데 이 판만 하얘서 따로 놀았다(대표 지적 2회).
   색은 마을 판과 같은 것만 쓴다: 바탕 #0e1622 · 테두리 #26313f · 글 #e8eef5 · 흐린 글 #a6b4c4
   · 파랑 #2d6cdf(열림) · 금색 #ffd76a(습득). */
.sk-head { background: linear-gradient(135deg, #10203a, #171436); border: 1px solid #22314a;
    border-radius: 14px; padding: 14px; color: #e8eef5; }
.sk-who { font-size: 12px; color: #a6b4c4; letter-spacing: .04em; }
.sk-title { margin-top: 2px; font-size: 17px; font-weight: 800; color: #ffd76a; }
.sk-stat { margin-top: 7px; font-size: 11.5px; color: #a6b4c4; }
.sk-stat b { color: #e8eef5; }
.sk-hid { color: #7e8d9e; font-size: 11px; margin: 2px 0 10px; }

/* 트리 */
.tr { border: 1px solid #26313f; border-radius: 14px; background: #0e1622; padding: 10px; }
/* 직군 고르기 — 네 직군을 **한 줄**로(2026-09-16 대표: "리더십으로 바꾸면 1줄로 되지 않아?").
   가로 스크롤은 마지막 직군이 잘려서 안 되고, 2열은 세로를 먹었다. 이름을 줄여 한 줄에 넣는다. */
.tr-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
/* 이름과 개수를 한 줄에 나란히 두면 네 칸 폭에서 이름이 잘린다 — 개수를 아래로 내린다. */
.tr-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 7px 4px; border-radius: 10px; border: 1px solid #26313f; background: #0a111b; color: #a6b4c4;
    font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; min-width: 0; }
.tr-tab .tt-nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-tab .tt-n { font-weight: 400; font-size: 10px; color: #7e8d9e; }
/* 내 직군 — 배지 대신 점. 폭을 먹지 않는다. */
.tr-tab.mine .tt-nm::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: #ffd76a; margin-right: 5px; vertical-align: middle; }
.tr-tab.on { background: #14263f; border-color: #2d6cdf; color: #e8eef5; }
.tr-tab.on .tt-n { color: #b3c1d1; }
.tr-pane { display: none; margin-top: 10px; }
.tr-pane.on { display: block; }

/* 단계 — 왼쪽 세로줄이 트리의 줄기다. 마지막 단계에서 줄이 끊긴다. */
.tr-tier { position: relative; padding-left: 26px; padding-bottom: 12px; }
.tr-tier::before { content: ''; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; background: #26313f; }
.tr-tier.last { padding-bottom: 0; }
.tr-tier.last::before { display: none; }
.tr-step { position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; }
.tr-step i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #26313f; background: #0a111b; }
.tr-step span { position: relative; font-size: 10px; font-weight: 800; color: #7e8d9e; }
.tr-nodes { display: flex; flex-direction: column; gap: 6px; }

/* 노드 */
.nd { border-radius: 10px; padding: 8px 10px; border: 1px solid #26313f; background: #0a111b; }
.nd-h { display: flex; align-items: baseline; gap: 6px; }
.nd-nm { font-size: 12.5px; font-weight: 700; color: #9aa9b9; }
.nd-st { margin-left: auto; font-size: 10px; font-weight: 700; color: #7e8d9e; }
.nd-d { margin-top: 3px; font-size: 10.5px; line-height: 1.45; color: #7e8d9e; }
.nd-bar { margin-top: 6px; height: 3px; border-radius: 2px; background: #131c2a; overflow: hidden; }
.nd-bar i { display: block; height: 100%; background: #2a3750; }
.nd-req { margin-top: 5px; font-size: 10px; color: #6d7d8e; }
.nd.open { border-color: #2d6cdf; background: #0d1a2c; }
.nd.open .nd-nm { color: #e8eef5; }
.nd.open .nd-st { color: #6ea2ff; }
.nd.open .nd-d { color: #ffffff; }
.nd.open .nd-bar i { background: linear-gradient(90deg, #2d6cdf, #6ea2ff); }
.nd.done { border-color: #6b5a1f; background: #17150c; }
.nd.done .nd-nm { color: #ffd76a; }
.nd.done .nd-st { color: #ffd76a; }
.nd.done .nd-bar i { background: #ffd76a; }
.nd.locked { opacity: .65; }

/* 익힌 스킬 카드 */
.sk-card { border: 1px solid #26313f; border-left: 3px solid #2d6cdf; border-radius: 12px;
    padding: 10px 12px; background: #0e1622; margin-bottom: 8px; }
.sk-card.lv3 { border-left-color: #a45bff; }
.sk-card.lv4 { border-left-color: #ffd76a; }
.sk-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sk-lv { font-size: 10.5px; font-weight: 700; color: #0a111b; background: #2d6cdf; border-radius: 6px; padding: 2px 7px; }
.sk-card.lv3 .sk-lv { background: #a45bff; color: #fff; }
.sk-card.lv4 .sk-lv { background: #ffd76a; }
.sk-new { font-size: 10px; font-weight: 800; color: #fff; background: #d6436a; border-radius: 6px; padding: 2px 6px; }
.sk-chip { font-size: 10px; color: #a6b4c4; background: #131c2a; border: 1px solid #26313f; border-radius: 6px; padding: 2px 6px; }
.sk-chip.gold { color: #ffd76a; border-color: #6b5a1f; background: #17150c; }
.sk-name { margin-top: 7px; font-weight: 700; font-size: 13.5px; color: #e8eef5; }
.sk-bar { margin-top: 7px; height: 5px; border-radius: 3px; background: #131c2a; overflow: hidden; }
.sk-bar.big { margin-top: 10px; height: 7px; background: rgba(255,255,255,.12); }
.sk-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2d6cdf, #6ea2ff); border-radius: 3px; }
.sk-bar.big i { background: linear-gradient(90deg, #ffd76a, #ffb03a); }
.sk-xp { margin-top: 5px; font-size: 11px; color: #9aa9b9; }
.sk-when { margin-top: 6px; font-size: 12px; color: #ffffff; }
.sk-proc { margin-top: 4px; font-size: 11px; line-height: 1.6; color: #ffffff; }
.sk-rank { display: flex; gap: 8px; align-items: baseline; font-size: 12px; padding: 7px 4px;
    border-bottom: 1px solid #16202e; color: #b3c1d1; }
.sk-rank span { width: 16px; color: #7e8d9e; font-weight: 700; }
.sk-rank b { color: #e8eef5; }
.sk-rank em { margin-left: auto; font-style: normal; color: #8d9cae; font-size: 11px; }
.sk-rank.me b { color: #6ea2ff; }

/* 산출물의 의도와 물음 (2026-09-15) */
/* 의도·물음 — 2026-09-16: 밝은 테마 잔재였다. 글자가 거의 검정이라 어두운 카드에서 안 보였다(대표 지적). */
.bb-job .why, .bb-job .ask { margin: 7px 0 2px; font-size: 12.5px; line-height: 1.55; color: #ffffff; }
.bb-job .why b, .bb-job .ask b { display: block; font-size: 10.5px; letter-spacing: .04em; color: #9aa9b9; margin-bottom: 2px; }
.bb-job .ask { background: #0d1a2c; border: 1px solid #23405f; border-radius: 8px; padding: 7px 9px; }
.bb-job .ask b { color: #6ea2ff; }

/* 의뢰 상자 (2026-09-16) — 주인이 자기 클론에게 일을 시키는 자리. 산출물 목록 맨 위.
   ⚠️ 처음에 흰 바탕으로 만들었더니 어두운 폰 화면에서 혼자 튀었다(대표 지적). 카드 색을 마을 판과 맞춘다. */
.od-box { margin: 12px 8px 14px; padding: 12px; border: 1px solid #26313f; border-radius: 14px; background: #0e1622; }
.od-head { font-size: 12px; font-weight: 700; color: #a6b4c4; letter-spacing: .04em; margin-bottom: 8px; }
/* 적는 만큼 늘어난다. 좁은 칸에 스크롤바를 두면 방금 쓴 줄이 안 보인다(2026-09-30 대표).
   높이는 JS(autoGrow)가 내용에 맞춰 잡는다 — overflow 를 숨겨 안쪽 스크롤바를 없앤다. */
.od-box textarea { width: 100%; box-sizing: border-box; border: 1px solid #26313f; border-radius: 10px;
    padding: 9px 10px; font: inherit; font-size: 13px; line-height: 1.4; resize: none; min-height: 38px;
    overflow: hidden; background: #0a111b; color: #e8eef5; }
.od-box textarea::placeholder { color: #7e8d9e; }
.od-box textarea:focus { outline: none; border-color: #2d6cdf; }
.od-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.od-box button { padding: 8px 18px; border: none; border-radius: 999px; background: #2d6cdf; color: #fff;
    font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.od-box button:disabled { opacity: 0.55; cursor: default; }

/* 진행 중 (2026-09-16) — 맡긴 일이 접수됐다는 증거. 결과 목록 위에 선다. */
.od-busy { margin: 0 8px 8px; padding: 10px 12px; border-radius: 12px; background: #131c14;
    border: 1px solid #24351f; font-size: 12px; color: #9fb39a; }
.od-busy b { color: #cfe0c8; font-weight: 700; }
.od-busy.failed { background: #1c1416; border-color: #3d2429; color: #b39a9f; }
.od-busy.failed b { color: #e0c8cc; }
.od-run, .od-q, .od-fail { margin-left: 7px; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.od-run { background: #2d6cdf; color: #fff; }
.od-q { background: #26313f; color: #a6b4c4; }
.od-fail { background: #5a2733; color: #ffd7dd; }
.od-what { margin-top: 5px; color: #ffffff; line-height: 1.5; }
.od-note { margin-top: 3px; font-size: 10.5px; color: #7e8d9e; }
/* 요청 뒤 한 번 뜨는 착수 안내 — 버튼 글자만 바뀌면 무엇이 됐는지 모른다. */
.od-said { margin-top: 9px; padding: 9px 10px; border-radius: 10px; background: #0d1a2c;
    border: 1px solid #23405f; font-size: 11.5px; line-height: 1.6; color: #b3c1d1; }
.od-said b { color: #cfe0f5; }
/* 탭이 넷이 되면서 글자가 좁아진다 — 라벨을 줄이지 않고 글자 크기로 맞춘다. */
#bb-tabs .bb-tab { font-size: 11.5px; padding-left: 4px; padding-right: 4px; }

/* 승격 대기 (2026-09-16) — 7일이 지나 카드가 목록에서 빠진 미결 승격. 결정은 사라지면 안 된다. */
/* ⚠️ 2026-10-13 대표: "대기 칸만 왜 앞에 한칸이 들어가있어."
   좌우 8px 여백이 남아 있어 **대기만 안으로 밀려** 다른 접힘 묶음과 줄이 안 맞았다.
   안에 .jr-fold 가 들어가면서 이 여백은 역할이 없어졌다 — 0 으로 맞춘다. */
.jb-wait { margin: 0 0 4px; }
.jb-ask.wait { border: 1px solid #6b5a1f; background: #17150c; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.jb-ask.wait .jb-wt { font-size: 12.5px; font-weight: 700; color: #ffd76a; margin-bottom: 4px; }
.jb-ask.wait .q { font-size: 11.5px; line-height: 1.6; color: #ffffff; }
.jb-ask.wait .jb-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.jb-ask.wait .pp-yes { background: #ffd76a; color: #17150c; border: none; border-radius: 999px;
    padding: 6px 16px; font-size: 12px; font-weight: 700; }
.jb-ask.wait .pp-no { background: transparent; color: #a6b4c4; border: 1px solid #2a3750;
    border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 700; }

/* 번호 목록 (2026-09-16) — 줄글로 이어 붙이면 주인이 읽지 못한다. 항목마다 번호를 매긴다. */
.nl { margin: 4px 0 0; padding-left: 0; list-style: none; counter-reset: nl; }
.nl li { position: relative; padding-left: 20px; margin-bottom: 5px; line-height: 1.6; counter-increment: nl; }
.nl li:last-child { margin-bottom: 0; }
.nl li::before { content: counter(nl); position: absolute; left: 0; top: 1px;
    min-width: 15px; height: 15px; border-radius: 4px; background: #1b2a3f; color: #9ec2f5;
    font-size: 9.5px; font-weight: 700; line-height: 15px; text-align: center; }
.ln { margin-top: 3px; line-height: 1.6; }
.bb-job .ask .nl li::before { background: #14304f; color: #8fc0ff; }
.nl-h { margin: 7px 0 3px; font-size: 11.5px; font-weight: 700; color: #b3c1d1; letter-spacing: .02em; }
.nl-h:first-child { margin-top: 2px; }

/* 결과 묶음 (2026-09-16) — 제목·설명·의도·질문이 한 덩어리다. 피드백 칸은 이 아래에 붙는다. */
.bb-job .res { border-left: 2px solid #26313f; padding-left: 9px; margin: 6px 0 9px; }
.bb-job .res .why { margin-top: 9px; }

/* 결정 실패 사유. 예전에는 403 이 조용히 삼켜져 "버튼이 안 눌린다"로 보였다(2026-09-29). */
.pp-err {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.5;
    color: #ff9a9a;
    background: rgba(255, 90, 90, .10);
    border: 1px solid rgba(255, 90, 90, .28);
    border-radius: 7px;
    padding: 6px 8px;
}

/* ── 인풋 판 = 대화창 모양 (2026-09-30 대표) ──────────────────────────────
   시킨 것은 위에 쌓이고, 입력칸은 아래에 붙박이로 선다. 새 줄은 아래에 붙는다.
   ⚠️ 판(.bb-pane)이 이미 flex-column 이라, 기록에 flex:1 을 주면 남는 높이를 다 먹고
      입력칸이 자연히 바닥에 붙는다. position:fixed 를 쓰지 않는다 — 폰 틀 안이라 어긋난다. */
#bb-pane-mk { min-height: 0; }
.mk-log {
    flex: 1; min-height: 0; overflow-y: auto;
    display: flex; flex-direction: column; justify-content: flex-end;
    gap: 8px; padding: 12px 8px 4px;
}
.mk-line { font-size: 12.5px; line-height: 1.6; border-radius: 12px; padding: 9px 11px; }
/* 내가 시킨 말 — 오른쪽에 붙는다 */
.mk-line.mine {
    align-self: flex-end; max-width: 84%;
    background: #1b3a6b; color: #ffffff; border: 1px solid #2d6cdf;
    white-space: pre-wrap; word-break: break-word;
}
/* 마을이 주는 안내 — 왼쪽 */
.mk-line.note {
    align-self: flex-start; max-width: 90%;
    background: #0d1a2c; border: 1px solid #1d3a5c; color: #a9c2dd;
}
.mk-line.note b { color: #cfe0f5; }
/* 아래 붙박이 입력칸 */
.od-dock {
    margin: 0 8px 10px; flex: 0 0 auto;
    box-shadow: 0 -10px 18px rgba(8, 13, 20, .55);
}
/* 입력칸과 버튼을 한 줄에. 칸이 늘어나도 버튼은 아래쪽에 붙어 따라온다. */
.od-line { display: flex; align-items: flex-end; gap: 8px; }
.od-line textarea { flex: 1 1 auto; min-width: 0; }
.od-line button { flex: 0 0 auto; height: 38px; padding: 0 14px; }
.od-dock { padding: 8px; }
/* 결과 묶음 머리글 (의뢰 / 자율근무 / 검수) — 큰 제목(.mk-sec)보다 한 단 작다 */
.mk-sub {
    font-size: 11px; font-weight: 700; color: #7e8d9e; letter-spacing: .04em;
    margin: 14px 10px 6px; padding-bottom: 5px; border-bottom: 1px solid #1b2431;
}

/* 수락·거절 버튼은 어디서든 같은 모양이다 (2026-09-30 대표: "버튼 디자인이 각기 다른 거 같은데").
   예전에는 '대기' 줄만 금색으로 따로 칠해져 산출물 카드의 버튼과 달라 보였다. */
.pp-act button, .jb-btns button {
    flex: 1; padding: 11px 0; border-radius: 10px; font-size: 13.5px; font-weight: 700;
    font-family: inherit; cursor: pointer; border: 1px solid transparent;
}
.jb-btns { display: flex; gap: 8px; }
.jb-ask.wait .jb-btns { display: flex; gap: 8px; margin-top: 9px; }
.jb-ask.wait .pp-no  { background: #131a26; color: #93a0b6; border: 1px solid #263142;
    border-radius: 10px; padding: 11px 0; font-size: 13.5px; font-weight: 700; }
.jb-ask.wait .pp-yes { background: #57e0c4; color: #06231d; border: none;
    border-radius: 10px; padding: 11px 0; font-size: 13.5px; font-weight: 700; }

/* 주인이 스스로 매기는 판정 (2026-10-01) — 소속 없는 주민의 산출물에만 뜬다.
   임원 검수(note)와 같은 자리에 서지만, 누가 매기는지 한 줄로 밝힌다. */
.bb-job .jd { margin-top: 9px; padding: 9px 11px; border-radius: 10px;
    background: #101a26; border: 1px solid #22344a; }
.bb-job .jd-q { display: block; font-size: 11.5px; color: #a6b4c4; margin-bottom: 8px; }
.bb-job .jd-btns { display: flex; gap: 8px; }
.bb-job .jd-b { flex: 1; padding: 9px 0; border-radius: 9px; font-size: 12.5px; font-weight: 700;
    font-family: inherit; cursor: pointer; background: #131a26; color: #93a0b6; border: 1px solid #263142; }
.bb-job .jd-b.yes { background: #57e0c4; color: #06231d; border-color: transparent; }
.bb-job .jd-b:disabled { opacity: .55; cursor: default; }
.bb-job .jd-err { margin-top: 7px; font-size: 11px; color: #ff9a9a; }
.bb-job .v.self { background: #1b3a6b; color: #cfe0f5; }

/* ══ JIRA 형식 공통 뼈대 (2026-10-13 대표: "아웃풋은 모두 JIRA 형식으로 통일하자") ══
   아웃풋 안에 카드가 두 종류(주제·결과)인데 생김새가 달랐다. 같은 뼈대를 쓴다.
   ⚠️ 없는 값은 **칸을 비운다.** JIRA 처럼 보이려고 우선순위 같은 걸 지어내지 않는다. */
.jr-card { background:#0c1320; border:1px solid #1a2434; border-left:3px solid #2c3646;
    border-radius:9px; padding:9px 11px; margin-bottom:8px; }
.jr-head { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:5px; }
.jr-key  { font:700 10px/1.4 ui-monospace,Consolas,monospace; color:#6b7589;
    letter-spacing:.04em; text-transform:uppercase; }
.jr-b    { font-size:10px; font-weight:700; padding:1px 7px; border-radius:9px;
    background:#2c3646; color:#b3c1d1; white-space:nowrap; }
.jr-title{ font-size:13.5px; font-weight:700; color:#fff; line-height:1.4; margin:0 0 3px; }
.jr-title.done { text-decoration:line-through; }
.jr-meta { font-size:11px; color:#9aa9b9; line-height:1.6; margin-bottom:7px; }
.jr-meta b { color:#c2cadb; }
.jr-act  { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.jr-why  { font-size:10px; color:#6b7589; margin-top:6px; line-height:1.5; }

/* ══ 타임라인 (2026-10-13 대표: "가장 상단에는 타임라인도 들어가야 하고") ══
   ⚠️ 실제로 시각이 있는 것만 세운다 — 산출물의 때와 주제의 마지막 변경.
      없는 사건을 채워 넣지 않는다. */
.tl { border-left:2px solid #1a2434; margin:0 0 14px 6px; padding-left:12px; }
.tl-row { position:relative; padding:4px 0; }
.tl-row::before { content:''; position:absolute; left:-17px; top:10px; width:7px; height:7px;
    border-radius:50%; background:#2c3646; border:2px solid #0a0b0d; }
.tl-row.hot::before { background:#57e0c4; }
.tl-d { font:700 10px/1.4 ui-monospace,Consolas,monospace; color:#6b7589; }
.tl-t { font-size:12px; color:#c2cadb; line-height:1.5; }
.tl-t .jr-b { margin-right:5px; }

/* ══ 접는 묶음 (2026-10-13 대표: "아웃풋에 내용이 너무 많은데? 폰 UI에 맞지가 않으니까") ══
   타임라인·주제를 지우지 않고 **접는다.** 기본은 진행중·결과만 보이고,
   나머지는 제목 한 줄만 남는다. <details> 를 쓰므로 JS 가 필요 없다.
   ⚠️ 폰에서 네 덩이(대기·타임라인·주제·결과)가 한 번에 펼쳐져 한 화면을 넘겼다. */
.jr-fold { margin: 0 0 10px; }
.jr-fold > summary {
    font-size: 12px; font-weight: 700; color: #a6b4c4; letter-spacing: .04em;
    margin: 14px 0 8px; cursor: pointer; list-style: none; display: flex;
    align-items: center; gap: 6px;
}
.jr-fold > summary::-webkit-details-marker { display: none; }
.jr-fold > summary::before { content: '▸'; color: #57e0c4; font-size: 10px; }
.jr-fold[open] > summary::before { content: '▾'; }
.jr-fold > summary .n { color: #6b7589; font-weight: 500; }

/* 주제 카드의 '안에 든 문서' 한 줄 — 폴더 이름이 설명을 못 할 때 이게 설명한다(2026-10-14).
   한 줄로 자른다. 두 줄이 되면 카드가 들쑥날쑥해지고 목록이 안 읽힌다. */
.td-eg { font-size:10.5px; color:#6b7589; line-height:1.5; margin:4px 0 2px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
