/* 2.91.0 책상 카드 앞면 · 미리보기 · 한 장씩 보기 · 고쳐서 시트 · 책상 탭 메뉴 · 직원 현황 줄 (docs/ONE-CARD-PLAN.md 3~5·8장)
   모양은 지금 웹의 값(var(--panel), var(--line), var(--decide) …)을 그대로 쓰고, 배치만 목업(docs/mock/one-card-v3.html)을 따른다. */
:root {
  --cp-add: #1E8E4A; --cp-add-bg: rgba(48, 170, 90, .13);
  --cp-del: #C2362C; --cp-del-bg: rgba(220, 60, 50, .11);
  --sn-work: #34C759; --sn-review: #0A84FF; --sn-lounge: #FF9F0A; --sn-idle: #8E8E93; --sn-late: #D97706;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --cp-add: #30D158; --cp-add-bg: rgba(48, 209, 88, .16); --cp-del: #FF6B61; --cp-del-bg: rgba(255, 69, 58, .16); --sn-late: #FF9F0A; }
}
:root[data-theme="dark"] { --cp-add: #30D158; --cp-add-bg: rgba(48, 209, 88, .16); --cp-del: #FF6B61; --cp-del-bg: rgba(255, 69, 58, .16); --sn-late: #FF9F0A; }

/* ---------- 종류 칩(중립색) · 덧말 · 표시 */
.act-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--nav-bg); color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.act-sub { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.cf-marks { margin-left: auto; display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.cf-mark { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--nav-bg); color: var(--ink-2); }
.cf-mark.m-ext { color: var(--confirm); background: var(--confirm-bg); }
.cf-mark.m-urgent { color: var(--urgent); background: var(--urgent-bg); }
.cf-rid { color: var(--muted); font-size: 11.5px; }

/* ---------- 카드 앞면 */
.cf-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 0; -webkit-touch-callout: none; min-width: 0; }
.cf-card .cf-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cf-task { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cf-task .cf-tid { font-size: 12px; color: var(--muted); }
.cf-task a.cf-tid:hover { color: var(--ink); }
.cf-task .cf-tt { color: var(--ink-2); font-weight: 500; }
.cf-ask { font-family: var(--sans); font-size: 21px; font-weight: 700; line-height: 1.32; letter-spacing: -.3px; margin: 6px 0 12px; color: var(--ink); overflow-wrap: anywhere; }
.cf-rec { margin-top: 12px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.cf-rec b { color: var(--ink); }
.cf-rec-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--decide-bg); color: var(--decide); display: grid; place-items: center; font-size: 12px; font-weight: 800; margin-top: 1px; }
.cf-rec-why { color: var(--ink-2); }
.cf-btns { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cf-btns .cf-btn { min-height: 48px; border-radius: 24px; font-size: 15.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; }
.cf-btns .cf-main { grid-column: 1 / -1; min-height: 52px; font-size: 16.5px; }
.cf-btns.is-note .cf-main { grid-column: auto; }
.cf-btns .cf-btn:only-child { grid-column: 1 / -1; }
.cf-btn-s { font-size: 12.5px; font-weight: 500; opacity: .82; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.cf-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 40px; color: var(--muted); font-size: 13.5px; }
.cf-more > summary::-webkit-details-marker { display: none; }
.cf-more > summary > span:first-child { color: var(--ink-2); font-weight: 600; }
.cf-more-hint { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cf-caret { margin-left: auto; transition: transform .15s; }
.cf-more[open] .cf-caret { transform: rotate(180deg); }
/* 자세히 안: 지금 3판 상세 그대로(앞면과 겹치는 정할 것·뒤로 단추만 숨김) */
.cf-more > .detail { border: 0; padding: 4px 0 0; background: transparent; box-shadow: none; min-height: 0; }
.cf-more > .detail > .head .back-btn, .cf-more > .detail > .head > .brief-ask, .cf-more > .detail > .head > h2.serif { display: none; }
.cf-pending { margin-bottom: 10px; }
.cf-view { display: flex; flex-direction: column; gap: 8px; }
.cf-view .cf-back { align-self: flex-start; }
@media (min-width: 761px) { .cf-view .cf-back { display: none; } }
@media (prefers-reduced-motion: reduce) { .cf-caret { transition: none; } }

/* ---------- 목록 줄 */
.req-card.cf-row .cf-head { flex-wrap: wrap; min-width: 0; }
.req-card.cf-row .top .cf-marks { margin-left: 0; flex: none; }
.req-card.cf-row .cf-task { margin-top: 0; font-size: 12px; }
.req-card.cf-row .title { font-weight: 600; }
.req-quick .req-quick-s { font-size: 11.5px; opacity: .85; margin-left: 6px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

/* ---------- 미리보기(core/cardpreview.js) */
.card-preview { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); overflow: hidden; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); min-width: 0; }
.card-preview .cp-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; min-width: 0; }
.card-preview .cp-ext { flex: none; min-width: 28px; height: 22px; padding: 0 4px; border-radius: 5px; background: var(--file-ink); color: #fff; font: 800 9px/22px var(--sans); text-align: center; }
.card-preview .cp-name { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-size: 13px; text-align: left; }
.card-preview button.cp-name { background: none; border: 0; padding: 0; cursor: pointer; }
.card-preview button.cp-name:hover { text-decoration: underline; }
.card-preview .cp-ver { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); }
.cp-diff { display: flex; flex-direction: column; }
.cp-dl { position: relative; padding: 5px 12px 5px 28px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-dl .cp-g { position: absolute; left: 11px; top: 5px; font-weight: 800; }
.cp-add { background: var(--cp-add-bg); }
.cp-add .cp-g { color: var(--cp-add); }
.cp-add ins { text-decoration: none; color: var(--ink); }
.cp-del { background: var(--cp-del-bg); }
.cp-del .cp-g { color: var(--cp-del); }
.cp-del del { text-decoration: line-through; text-decoration-color: var(--cp-del); color: var(--ink-2); }
.cp-eq { color: var(--muted); }
.cp-fold { display: block; width: 100%; padding: 4px 12px; font-size: 11.5px; color: var(--muted); text-align: center; background: none; border: 0; }
button.cp-fold-btn { cursor: pointer; }
button.cp-fold-btn:hover { color: var(--ink); }
.cp-text { padding: 9px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-table-wrap { overflow-x: auto; padding: 6px 10px; }
.cp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cp-table th, .cp-table td { padding: 3px 6px; text-align: left; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.cp-table th { color: var(--muted); font-weight: 500; }
.cp-img { display: block; max-width: 100%; max-height: 260px; margin: 0 auto; object-fit: contain; }

/* ---------- 머리: 한 장씩 아이콘 · 상태 줄 · 게임 접기 */
.one-entry { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px 0 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; flex: none; font: inherit; }
.one-entry .one-entry-ic { display: inline-flex; }
.one-entry .one-entry-n { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.one-entry.dim { opacity: .45; }
.one-entry:focus-visible { outline: 2px solid var(--decide); outline-offset: 2px; }
.header .brand .one-entry.m-one { margin-left: 8px; height: 28px; vertical-align: middle; }
.desk-h1row { display: flex; align-items: center; gap: 10px; }
@media (max-width: 760px) { .desk-h1row .one-entry { display: none; } }
.desk-status { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.desk-status .ds-n { background: none; border: 0; padding: 2px 3px; border-radius: 6px; color: var(--ink-2); font: inherit; cursor: pointer; text-decoration: none; }
.desk-status .ds-n:hover { color: var(--ink); background: var(--nav-bg); }
.desk-status .ds-n.on { color: var(--decide); font-weight: 600; }
.desk-status .ds-stall { color: var(--urgent); }
.desk-status .ds-none { cursor: default; }
.desk-status .ds-sep { color: var(--dot); padding: 0 1px; }
.desk-status .desk-game-btn { margin-left: 6px; height: 28px; min-width: 0; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.desk-status .desk-game-btn.on { color: var(--decide); }
.desk-status .dcm-caret { display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-1px, -1px); }
.desk-status .dcm-caret.up { transform: rotate(-135deg) translate(-1px, -1px); }
.desk-game-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- 한 장씩 보기: 한 화면, 엄지 자리 단추, 다음 장 엿보기 */
.desk-one .one-count { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; color: var(--ink); font-weight: 600; }
.desk-one .one-count .one-sub { font-size: 11px; color: var(--muted); font-weight: 500; }
.desk-one .one-bar-sp { min-width: 60px; }
.desk-one .one-staff { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-one .one-card { display: flex; flex-direction: column; gap: 0; overscroll-behavior: contain; }
.desk-one .one-card > .cf-card { flex: none; box-shadow: 0 10px 30px -14px var(--shadow); position: relative; z-index: 1; }
.desk-one .cf-card.is-one .cf-ask { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.desk-one .cf-card.is-one .card-preview { max-height: 34vh; overflow: hidden; position: relative; }
.desk-one .cf-card.is-one .card-preview::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: linear-gradient(transparent, var(--bg-2)); pointer-events: none; }
.desk-one .one-peek { flex: none; margin: -14px 14px 0; padding: 22px 16px 8px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; background: var(--bg-2); color: var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-one .one-peek .one-peek-k { color: var(--ink-2); font-weight: 600; }
.desk-one .one-peek { display: flex; gap: 4px; align-items: baseline; min-width: 0; }
.desk-one .one-peek > * { flex: none; }
.desk-one .one-peek .one-peek-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-one .one-thumb { flex: none; width: 100%; max-width: 760px; margin: 10px auto 0; padding: 0 0 2px; box-sizing: border-box; }
.desk-one .one-thumb .one-hint { display: flex; justify-content: space-between; gap: 8px; margin: 0 6px 8px; font-size: 11.5px; }
.desk-one .one-thumb .cf-btns { margin-top: 0; }
.desk-one.one-done .one-end { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--ink-2); }
.desk-one .one-end-art { color: var(--muted); }
.desk-one .one-end-t { font-family: var(--sans); font-size: 19px; margin: 0; color: var(--ink); }
.desk-one .one-end-stat { font-size: 15px; font-variant-numeric: tabular-nums; }
.desk-one .one-end-acts { gap: 10px; align-items: center; margin-top: 6px; }
@media (max-width: 760px) {
  .desk-one .one-card { padding: 0 12px; box-sizing: border-box; }
  .desk-one .one-card > .cf-card { border-radius: 22px; }
  .desk-one .one-thumb { padding: 0 16px; }
  .desk-one .one-arrow { display: none; }
  .desk-one .cf-card.is-one .card-preview { max-height: 28vh; }
}
.one-scrub .os-seg.t-week { background: var(--muted); }

/* ---------- 고쳐서 시트(revise.js) */
.rv-back { position: fixed; inset: 0; z-index: 1200; background: rgba(0, 0, 0, .42); display: flex; align-items: flex-end; justify-content: center; }
.rv-sheet { width: min(560px, calc(100% - 16px)); margin: 0 8px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: 10px 16px 16px; box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .45); box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; }
.rv-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 2px; }
.rv-title { text-align: center; font-size: 13.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.rv-title b { color: var(--ink); font-size: 15px; }
.rv-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-wave { display: none; gap: 3px; justify-content: center; align-items: center; height: 40px; }
.rv-wave i { width: 4px; border-radius: 2px; background: var(--decide); animation: rv-wave 1s ease-in-out infinite alternate; }
.rv-wave i:nth-child(2n) { animation-delay: .15s; } .rv-wave i:nth-child(3n) { animation-delay: .3s; }
.rv-back.listening .rv-wave { display: flex; }
@keyframes rv-wave { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .rv-wave i { animation: none; } }
.rv-status { font-size: 12.5px; color: var(--muted); text-align: center; min-height: 1em; }
.rv-status:empty { display: none; }
.rv-ta { width: 100%; box-sizing: border-box; min-height: 72px; resize: vertical; font-size: 15px; }
.rv-chips { justify-content: center; flex-wrap: wrap; gap: 6px; }
.rv-chip.on { background: var(--decide); border-color: var(--decide); color: #fff; }
.rv-actions { display: flex; align-items: center; gap: 8px; }
.rv-actions .rv-sp { flex: 1; }
.rv-actions .rv-mic[aria-pressed="true"] { color: var(--decide); border-color: var(--decide); }

/* ---------- 책상 탭 메뉴(길게 누르기·오른쪽 클릭) */
.tb-menu-back { position: fixed; inset: 0; z-index: 1300; background: rgba(0, 0, 0, .18); }
.tb-menu { position: fixed; min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .4); padding: 6px; display: flex; flex-direction: column; }
.tb-menu-i { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.tb-menu-i:hover, .tb-menu-i:focus-visible { background: var(--nav-bg); outline: none; }
.tb-menu-i.tb-one { font-weight: 600; }
.tb-menu-r { color: var(--muted); }
#tabbar a[data-screen="desk"], #rail a[data-screen="desk"] { -webkit-touch-callout: none; }

/* ---------- 직원 현황 줄(staffnow.js) */
.staff-now.sn { display: block; }
.sn-list { display: flex; flex-direction: column; }
.sn-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-radius: 10px; }
.sn-row:last-child { border-bottom: 0; }
.sn-row:hover, .sn-row:focus-visible { background: var(--nav-bg); outline: none; }
.sn-row.idle { opacity: .55; }
.sn-av { position: relative; width: 42px; height: 42px; display: grid; place-items: center; }
.sn-av .avatar { width: 36px; height: 36px; font-size: 14px; box-shadow: 0 0 0 2px var(--sn-tone, var(--sn-idle)), 0 0 0 3.5px var(--panel); }
.sn-row.t-work { --sn-tone: var(--sn-work); } .sn-row.t-review { --sn-tone: var(--sn-review); } .sn-row.t-lounge { --sn-tone: var(--sn-lounge); } .sn-row.t-idle { --sn-tone: var(--sn-idle); }
.sn-row.idle .sn-av .avatar { filter: grayscale(.7); }
.sn-lv { position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%); padding: 0 4px; border-radius: 999px; background: linear-gradient(180deg, #FFCF5A, #F0A020); color: #3A2600; font: 800 8.5px/1.3 var(--sans); white-space: nowrap; }
.sn-bd { position: absolute; right: -2px; top: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; border: 0; background: #FF3B30; color: #fff; font: 800 10px/17px var(--sans); text-align: center; cursor: pointer; box-shadow: 0 0 0 1.5px var(--panel); }
.sn-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.sn-n { font-weight: 600; color: var(--ink); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-n small { margin-left: 6px; color: var(--muted); font-weight: 500; font-size: 12px; }
.sn-d { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-t { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-t a { color: var(--muted); }
.sn-t a:hover { color: var(--ink); }
.sn-ago { font-size: 11.5px; color: var(--muted); white-space: nowrap; align-self: start; padding-top: 3px; }
.sn-ago.late { color: var(--sn-late); font-weight: 600; }
.desk-one:focus { outline: none; }

/* 2.91.1 대기 23: 한 장씩 넘길 때 입체로(넘긴 쪽에서 세로축으로 돌며 들어옴). 동작 줄이기면 없음 */
.desk-one .one-stage { perspective: 1200px; }
.desk-one .one-card { will-change: transform; }
.desk-one .one-card.one-enter-next { transform-origin: left center; animation: oneInNext .34s cubic-bezier(.2, .8, .2, 1); }
.desk-one .one-card.one-enter-prev { transform-origin: right center; animation: oneInPrev .34s cubic-bezier(.2, .8, .2, 1); }
@keyframes oneInNext { from { transform: translateX(16%) rotateY(-24deg) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes oneInPrev { from { transform: translateX(-16%) rotateY(24deg) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .desk-one .one-card.one-enter-next, .desk-one .one-card.one-enter-prev { animation: none; }
}

