/* Taken from Script Studio v33 (studio.css), plus Puni Hub additions at the end */
.page h1 { margin-top: 0; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
textarea.mono, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
pre.script { white-space: pre-wrap; background: #fafaf7; border: 1px solid #e5e2da; border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.55; }
pre.code { white-space: pre-wrap; }
.out { margin-top: 14px; }
.srcerr { background: #fff4f2; border: 1px solid #f1c2b8; border-radius: 8px; padding: 12px; margin: 10px 0; }
.srcerr dt { font-weight: 600; margin-top: 6px; }
.pill.st-done { background: #e3f4e6; color: #1d6b2c; }
.pill.st-needs_review { background: #fff3d6; color: #8a5a00; }
.pill.st-source_error, .pill.st-error { background: #fde4e0; color: #9b2b1a; }
.pill.st-running { background: #e6eefc; color: #2446a0; }
#nav a.on { font-weight: 600; }
.toast.show { opacity: 1; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.badge.ok { background: #e3f4e6; color: #1d7a33; }
.badge.no { background: #f1f1ee; color: #8a8a83; font-weight: 500; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 4px; }
.dot.ok { background: #22a447; } .dot.no { background: #d0d0c8; }
.svc-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.svc { border: 1px solid #ddd9cf; border-radius: 10px; padding: 8px 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.svc.on { border-color: #22a447; background: #f2fbf4; font-weight: 600; }
.warn { color: #9b5b00; }
.mtext { margin-top: 6px; }
.nav-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #9a978e; margin: 16px 12px 4px; }
.prompts { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.plist { max-height: 75vh; overflow: auto; }
.plist details { margin-bottom: 8px; }
.plist .doc { display: block; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.plist .doc:hover { background: #f3f2ee; }
.plist .doc.on { background: #e6eefc; font-weight: 600; }
.stage { display: inline-block; min-width: 22px; font-size: 11px; color: #fff; background: #555; border-radius: 4px; text-align: center; margin-right: 6px; padding: 0 4px; }
.doc-text { width: 100%; min-height: 60vh; font-size: 12.5px; line-height: 1.5; }
.sticky-save { position: sticky; bottom: 0; background: #fafaf8; padding: 10px 0; }
@media (max-width: 900px) { .prompts { grid-template-columns: 1fr; } }
.admin-link { display: block; margin: 14px 12px 0; font-size: 13px; color: #2446a0; text-decoration: none; }
.admin-link:hover { text-decoration: underline; }
body.admin .side { background: #1f2430; color: #e9ebf0; }
body.admin .side a, body.admin .side .me, body.admin .side .ver, body.admin .nav-head { color: #e9ebf0; }
body.admin .side .admin-link { color: #9fc0ff; }
body.admin #nav a.on { background: rgba(255,255,255,.12); }
body.admin .auth-app { color: #9b2b1a; }

/* "Remember this computer" on both sign-in pages */
#authForm label.remember { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 10px 0 14px; font-weight: 500; font-size: 14px; cursor: pointer; }
#authForm label.remember input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: #0b1f4d; }

/* AI settings: current status, one service at a time, detail settings */
.badge.bad { background: #fde8e6; color: #a32116; }
.status-card h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.st-row { display: flex; flex-direction: column; gap: 3px; background: #f7f7f4; border-radius: 10px; padding: 10px 12px; min-width: 0; }
.st-row span { font-size: 12px; }
.st-row b { font-size: 14px; overflow-wrap: anywhere; }
.opt-head { margin: 18px 0 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.opts input[type=range] { flex: 1; min-width: 0; }
.opts label.inline { display: flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; font-size: 13px; }
.opts label.inline input { width: auto; }
.o-tval { font-weight: 700; margin-left: 4px; }
@media (max-width: 900px) { .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { grid-template-columns: 1fr; } }

/* Usage and cost */
.ic-coin { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15 9.5c-.5-1-1.6-1.5-3-1.5-1.7 0-3 .9-3 2s1.3 1.7 3 2 3 .9 3 2-1.3 2-3 2c-1.4 0-2.5-.5-3-1.5M12 6v2M12 16v2'/%3E%3C/svg%3E"); }
.u-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.u-card { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.u-card b { font-size: 22px; }
.u-grid { align-items: start; }
.u-grid .card { margin: 0; }
#page-usage .row.wrap { flex-wrap: wrap; align-items: center; }
#uPrices input { width: 100%; min-width: 0; }
#uPrices td:first-child { width: 45%; }
.u-aud { display: block; max-width: 320px; margin: 12px 0; }
@media (max-width: 900px) { .u-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.timing { margin: 6px 0 10px; display: grid; gap: 4px; }
.phases { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 2px; }
.phase { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #f1f1ee; color: #8a8a83; }
.phase.ok { background: #e3f4e6; color: #1d6b2c; }
.phase.ok::before { content: "✓ "; }
.phase.now { background: #e6eefc; color: #2446a0; font-weight: 600; animation: pulse 1.6s ease-in-out infinite; }
.phases .arrow { color: #c4c2ba; font-size: 12px; }
@keyframes pulse { 50% { opacity: .55; } }

.qtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 -1px; position: relative; z-index: 1; }
.qtab { border: 1px solid #e3e1da; border-bottom: none; background: #f4f3ef; color: #55534c; border-radius: 10px 10px 0 0; padding: 7px 12px; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.qtab.on { background: #fff; color: #111; font-weight: 600; }
.qtab.add { font-weight: 700; padding: 7px 14px; }
.qtab .tnum { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; background: #0b1f4d; color: #fff; font-size: 11px; text-align: center; }
.qtab .tclose { margin-left: 4px; color: #9a978e; font-weight: 700; }
.qtab .tclose:hover { color: #9b2b1a; }
.tdot { width: 8px; height: 8px; border-radius: 50%; background: #c4c2ba; display: inline-block; }
.tdot.st-running, .tdot.st-waiting { background: #2446a0; animation: pulse 1.6s ease-in-out infinite; }
.tdot.st-done { background: #22a447; }
.tdot.st-needs_review { background: #d99a00; }
.tdot.st-source_error, .tdot.st-error { background: #c0392b; }
.card.tabcard { border-top-left-radius: 0; }
/* usage tables: two per row, headers on one line, wide tables scroll inside their card */
.u-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.u-grid .card, #page-usage > .card { overflow-x: auto; }
#page-usage .tbl th { white-space: nowrap; }
#page-usage .tbl td { white-space: nowrap; }
#page-usage .tbl td:first-child { white-space: normal; min-width: 120px; }
@media (max-width: 900px) { .u-grid { grid-template-columns: minmax(0, 1fr); } }

.msg-list { max-height: 60vh; overflow-y: auto; }
.msg-item { padding: 10px 4px; border-bottom: 1px solid var(--soft, #eee); }
.msg-item.imp { background: #fff8e6; }
.msg-body { margin-top: 4px; white-space: normal; line-height: 1.5; }

/* Puni Hub additions */
.btn.danger { background: #b91c1c; color: #fff; border-color: #b91c1c; }
details.card > summary { cursor: pointer; }
.steps { margin: 0; padding-left: 20px; line-height: 1.9; }
.steps li.now { font-weight: 650; }
.steps li.now::after { content: attr(data-now); margin-left: 8px; font-size: 11px; font-weight: 600; background: #e3f4e6; color: #1d7a33; border-radius: 999px; padding: 1px 8px; }
.steps li.later { color: var(--mute); }
.pe-row td { background: #fafafa; }

/* ---------- picture guides (guide.js) ---------- */
.guide { background: #f5f8ff; border: 1px solid #d6e0ff; border-radius: var(--r); padding: 12px 16px; margin: 14px 0 18px; }
.guide > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--navy); }
.guide > summary::-webkit-details-marker { display: none; }
.g-icon { font-size: 18px; }
.g-toggle { margin-left: auto; font-size: 12px; color: var(--mute); font-weight: 600; }
.g-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.g-step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px 10px; }
.g-num { position: absolute; top: -10px; left: -8px; width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.g-draw { min-height: 112px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.g-step p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink2); }
.g-step p b { color: var(--ink); }
.g-tip { margin-top: 12px; font-size: 13px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 12px; color: #713f12; }

/* small screen drawings */
.mock { width: 100%; background: #fff; border: 1px solid #d4d4d8; border-radius: 9px; overflow: hidden; font-size: 11px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.mock-bar { display: flex; align-items: center; gap: 4px; background: #f4f4f5; border-bottom: 1px solid #e4e4e7; padding: 4px 7px; }
.mock-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d4d4d8; }
.mock-bar i:first-child { background: #fca5a5; } .mock-bar i:nth-child(2) { background: #fcd34d; } .mock-bar i:nth-child(3) { background: #86efac; }
.mock-bar span { margin-left: 6px; color: var(--mute); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-body { padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.mock code { font: 10.5px/1.5 ui-monospace, Menlo, Consolas, monospace; display: block; padding: 2px 4px; border-radius: 4px; }
.m-dim { color: #a1a1aa; }
.m-field { border: 1px solid #e4e4e7; border-radius: 6px; padding: 3px 6px; display: flex; flex-direction: column; }
.m-field small { color: var(--mute); font-size: 9.5px; }
.m-field span { min-height: 13px; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.m-btns { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 2px; }
.m-btns.left { justify-content: flex-start; }
.m-btn { display: inline-block; border: 1px solid #d4d4d8; border-radius: 999px; padding: 2px 9px; font-weight: 650; font-size: 10.5px; background: #fff; white-space: nowrap; }
.m-btn.dark { background: #111; color: #fff; border-color: #111; }
.m-btn.red { background: var(--bad); color: #fff; border-color: var(--bad); }
.m-x2 { color: var(--bad); font-size: 11px; }
.m-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 6px; align-items: center; padding: 4px 5px; border-bottom: 1px solid #f1f1f3; border-radius: 5px; }
.m-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-sub { background: #fafafa; border-radius: 6px; padding: 5px; display: flex; flex-direction: column; gap: 4px; }
.m-badge { border-radius: 999px; padding: 0 7px; font-weight: 650; font-size: 10px; }
.m-badge.ok { background: #e3f4e6; color: var(--ok); } .m-badge.no { background: #f4f4f5; color: var(--mute); }
.m-ok { color: var(--ok); font-weight: 700; }
.m-eye { opacity: .7; }
.hl, .m-file.hl, .m-chip.hl { outline: 2.5px solid var(--orange); outline-offset: 1px; background: #fff7ed !important; animation: g-pulse 1.6s ease-in-out infinite; }
.m-btn.dark.hl, .m-btn.red.hl { background: #111 !important; }
.m-btn.red.hl { background: var(--bad) !important; }
.hl-text { background: #fff1c2; border-radius: 3px; padding: 0 3px; }
@keyframes g-pulse { 0%, 100% { outline-color: var(--orange); } 50% { outline-color: #fed7aa; } }
@media (prefers-reduced-motion: reduce) { .hl, .m-file.hl, .m-chip.hl { animation: none; } }
.mock.term { background: #0b0b0f; border-color: #27272a; }
.mock.term .mock-bar { background: #18181b; border-color: #27272a; }
.mock.term code { color: #e4e4e7; font-size: 11px; padding: 8px 4px; }
.mock.term code b { color: #86efac; }
.m-caret { display: inline-block; width: 6px; height: 12px; background: #e4e4e7; vertical-align: -2px; margin-left: 2px; animation: g-blink 1s steps(1) infinite; }
@keyframes g-blink { 50% { opacity: 0; } }
.side-mock { display: flex; flex-direction: column; gap: 5px; padding: 8px; max-width: 150px; }
.m-chip { display: block; border-radius: 7px; padding: 4px 8px; background: #f4f4f5; font-weight: 600; }
.path-mock { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px 8px; }
.m-folder, .m-file { background: #f4f4f5; border-radius: 6px; padding: 3px 6px; font-weight: 600; white-space: nowrap; }
.chat-mock { padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.m-bubble { align-self: flex-start; background: #f4f4f5; border-radius: 10px 10px 10px 2px; padding: 5px 9px; }
.m-bubble.me { align-self: flex-end; background: #111; color: #fff; border-radius: 10px 10px 2px 10px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.m-flow { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 11px; }
.m-flow b { color: var(--mute); }
.m-node { border: 1px solid #d4d4d8; background: #fff; border-radius: 10px; padding: 7px 9px; text-align: center; font-weight: 650; line-height: 1.3; }
.m-node small { color: var(--mute); font-weight: 500; }
.m-node.hub { background: var(--navy); color: #fff; border-color: var(--navy); }
.m-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; font-size: 11px; }
.m-roles div { border: 1px solid #d4d4d8; border-radius: 9px; padding: 7px; display: flex; flex-direction: column; gap: 3px; background: #fff; }
.m-roles small { color: var(--ink2); line-height: 1.4; }

/* numbered copy boxes on the PC connection page */
.box-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 800; font-size: 12px; margin-right: 4px; }
.code-box { position: relative; }
.code-box .copy-btn { position: absolute; top: 8px; right: 8px; background: #fff; }
.code-box pre.code { padding-right: 90px; }
.auth-help { font-size: 13px; background: #f5f8ff; border: 1px solid #d6e0ff; border-radius: 10px; padding: 7px 10px; color: var(--navy); margin: 8px 0 0; }
/* admin sidebar: readable text on the dark background */
body.admin .side .linklike { color: #d4d8e2; }
body.admin .side .brand b, body.admin .side .brand span { color: #e9ebf0; }
body.admin .side .brand span b { color: #ffb36b; }
.steps { list-style: none; padding-left: 0; }
.guide > summary { flex-wrap: wrap; row-gap: 2px; }
.guide > summary b, .g-toggle, .g-icon { white-space: nowrap; }
@media (max-width: 640px) { .guide > summary .g-toggle { margin-left: 0; width: 100%; } }
/* admin brand: "Puni Hub · 관리자" on one line, 관리자 as a small orange tag */
body.admin .side .brand span { white-space: nowrap; }
body.admin .side .brand span b { display: inline-block; font-size: 11px; color: #1f2430; background: #ffb36b; border-radius: 999px; padding: 0 7px; margin-left: 2px; vertical-align: 1px; }
body.admin a.brand:hover { background: rgba(255,255,255,.08); }
/* admin: the crest sits on a white tile so it shows on the dark sidebar and sign-in */
body.admin .side .brand img { background: #fff; border-radius: 10px; padding: 4px; width: 42px; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* ---------- step 2–3: tasks and PC cards ---------- */
.ic-list { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2'/%3E%3C/svg%3E"); }
.steps li.done { color: var(--ok); }
.badge.rev { background: #fff1db; color: #b45309; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.filters select, .small-sel { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; background: #fff; max-width: 220px; }
.seg { display: inline-flex; background: #f1f1ee; border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.new-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.new-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.new-grid .span2 { grid-column: 1 / -1; }
.new-grid textarea, .new-grid input, .new-grid select { font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.new-grid .remember { flex-direction: row; align-items: center; }
@media (max-width: 760px) { .new-grid { grid-template-columns: 1fr; } }
.set-card { padding: 10px 12px; }
.set-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.set-head .grow { flex: 1; }
.task-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr) 110px; gap: 10px; align-items: center; padding: 9px 6px; border-bottom: 1px solid #f1f1f3; cursor: pointer; border-radius: 8px; }
.task-row:hover { background: #fafafa; }
.tr-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tr-stage { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tr-pc, .tr-res { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .task-row { grid-template-columns: 1fr; gap: 4px; } }
.type-tag { font-size: 11px; font-weight: 650; border-radius: 6px; padding: 1px 7px; background: #eef2ff; color: var(--navy); }
.type-tag.t-video { background: #fdf2f8; color: #9d174d; }
.type-tag.t-cbt_clone { background: #ecfeff; color: #155e75; }
.type-tag.t-textbook { background: #f0fdf4; color: #166534; }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #e4e4e7; display: inline-block; }
.dots i.past { background: #22c55e; }
.dots i.now { background: var(--orange); box-shadow: 0 0 0 3px #fed7aa; }
.dots i.now.rev { background: #d97706; }
.task-detail { padding: 6px 10px 14px; background: #fcfcfb; border-bottom: 1px solid var(--line); }
.td-in h4 { margin: 12px 0 6px; font-size: 13px; }
.review-box { border: 2px solid #fed7aa; background: #fff7ed; border-radius: 12px; padding: 10px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.review-box textarea { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.ctl-row { margin: 8px 0; flex-wrap: wrap; }
.hist { margin: 6px 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; }
.pc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pc-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.pc-card.is-off { opacity: .6; }
.pc-top { display: flex; align-items: center; gap: 8px; }
.pc-top b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; background: #d4d4d8; }
.pc-dot.green { background: #22c55e; box-shadow: 0 0 0 3px #bbf7d0; }
.pc-dot.off { background: #fff; border: 2px solid #d4d4d8; }
.pc-st { font-size: 11px; font-weight: 650; border-radius: 999px; padding: 1px 8px; background: #f4f4f5; color: var(--ink2); }
.pc-st.st-working { background: #e0e7ff; color: var(--navy); }
.pc-st.st-blocked { background: #fde8e6; color: #a32116; }
.pc-now { font-size: 13.5px; min-height: 18px; }
.pc-meta { display: flex; flex-direction: column; gap: 1px; color: var(--ink2); }
/* guide drawings for tasks and PCs */
.m-sel { display: inline-block; border: 1px solid #d4d4d8; border-radius: 999px; padding: 2px 8px; font-size: 10.5px; background: #fff; white-space: nowrap; }
.m-pcs { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.m-pc { background: #fff; border: 1px solid #d4d4d8; border-radius: 9px; padding: 6px 8px; font-size: 11px; display: flex; flex-direction: column; gap: 2px; }
.m-pc small { color: var(--ink2); }
.m-pc .pc-dot { width: 8px; height: 8px; vertical-align: 0; margin-right: 3px; }
.m-pc .pc-st { font-size: 9.5px; padding: 0 6px; }
.dots.hl { border-radius: 999px; padding: 2px 4px; }

.pc-card.is-blocked { border: 2px solid #f87171; background: #fff7f7; }
.rv-result { font-size: 13.5px; background: #fff; border-radius: 8px; padding: 6px 9px; border: 1px solid #fde4c8; }
.rv-result a { color: var(--navy); font-weight: 650; }
.m-setrow { display: flex; align-items: center; gap: 5px; padding: 6px 4px; flex-wrap: wrap; }

/* ---------- step 3b: agents, types, guide, questions ---------- */
.ic-doc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6M8 13h8M8 17h6'/%3E%3C/svg%3E"); }
.role-tag { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; margin-right: 4px; }
.role-tag.mgr { background: #ede9fe; color: #5b21b6; } .role-tag.wrk { background: #e0f2fe; color: #075985; }
.pc-roles { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pc-cur { background: #f8fafc; border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.pc-q div { padding-left: 2px; }
.skill-chip { display: inline-block; background: #f4f4f5; border-radius: 6px; padding: 1px 7px; margin: 2px 4px 0 0; font-size: 11.5px; }
.skill-chip i { font-style: normal; color: var(--mute); }
.pc-st.st-busy { background: #e0e7ff; color: var(--navy); } .pc-st.st-free { background: #e3f4e6; color: #1d7a33; }
.role-checks { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.role-checks label { display: inline-flex; gap: 4px; align-items: center; }
.q-card { border: 2px solid #fecaca; background: #fff8f8; }
.q-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.q-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; display: inline-block; }
.q-n { background: #ef4444; color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; }
.q-item { border-top: 1px solid #fde2e2; padding: 8px 0; }
.q-item .q-where { font-size: 12.5px; color: var(--ink2); }
.q-item textarea { width: 100%; box-sizing: border-box; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-top: 6px; }
.q-wait { color: #b91c1c; font-weight: 700; font-size: 12px; }
.q-wait.late { background: #ef4444; color: #fff; border-radius: 999px; padding: 0 7px; }
.conv { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.msg-row { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: #fff; }
.msg-row.open { border-color: #fca5a5; background: #fff7f7; }
.msg-row.k-answer { background: #f0fdf4; border-color: #bbf7d0; }
.msg-row.k-rule { background: #fffbeb; border-color: #fde68a; }
.msg-head { font-size: 12.5px; }
.msg-body { white-space: pre-wrap; font-size: 13.5px; margin-top: 2px; }
.kind-tag { font-size: 11px; background: #f4f4f5; border-radius: 6px; padding: 0 6px; }
.post-row { display: flex; gap: 6px; margin-top: 6px; }
.post-row textarea { flex: 1; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.ty-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.ty-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.ty-card.off { opacity: .55; }
.ty-stages { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.ty-stages span { background: #f4f4f5; border-radius: 6px; padding: 1px 7px; }
.ty-stages span.rev { background: #fff1db; color: #b45309; font-weight: 700; }
.ty-stages b { color: var(--mute); font-weight: 400; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.st-table th { text-align: left; font-weight: 600; color: var(--ink2); padding: 4px; }
.st-table td { padding: 3px 4px; }
.st-table input[type=text], .st-table select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 7px; padding: 5px 6px; font: inherit; font-size: 12.5px; }
.st-table .mini { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 6px; cursor: pointer; }
.mono-area { width: 100%; box-sizing: border-box; font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.gd-ver input { max-width: 200px; }
details.own { border-top: 1px dashed var(--line); padding-top: 6px; }

/* signed in, but the app has never called the hub */
.pc-card.is-wait{border:2px solid #f59e0b;background:#fffbeb}
.pc-dot.yellow{background:#f59e0b}
.pc-st.st-wait{background:#fef3c7;color:#92400e}
.pc-wait{background:#fef3c7;border-radius:8px;padding:8px 10px;margin:6px 0;color:#78350f;line-height:1.5}
.pc-acct{margin:2px 0}.pc-first{margin:4px 0;color:#4b5563}
.pc-card.is-wait .pc-top{flex-wrap:wrap}
.pc-card.is-wait .pc-top b{overflow:visible;text-overflow:clip;white-space:normal;flex:1 1 auto;min-width:0}
.pc-card.is-wait .pc-st.st-wait{flex-basis:100%;margin:4px 0 0;text-align:center;white-space:normal}

/* ---------- office (3D) ---------- */
.ic-office { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M9 21v-5h6v5M9 9h.01M15 9h.01M9 13h.01M15 13h.01'/%3E%3C/svg%3E"); }
.off-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.off-stage-box { position: relative; border-radius: 18px; overflow: hidden; background: #eef2f7; box-shadow: 0 6px 24px rgba(15, 23, 42, .08); }
.off-canvas { width: 100%; height: min(72vh, 680px); min-height: 420px; }
.off-canvas canvas { display: block; cursor: grab; }
.off-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 8px; pointer-events: none; white-space: nowrap; }
.off-top > * { pointer-events: auto; }
.off-count { background: rgba(255,255,255,.92); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.off-theme { background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.off-theme select { border: 0; background: transparent; font: inherit; font-weight: 600; }
.off-legend { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.off-legend span { background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 10px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.off-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.off-legend b { font-weight: 500; }
.off-btns { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.off-btns .btn { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.off-btns .btn.on { background: #f59e0b; color: #fff; }
.off-panel { background: #fff; border-radius: 18px; box-shadow: 0 6px 24px rgba(15, 23, 42, .08); padding: 12px; max-height: min(72vh, 680px); min-height: 420px; display: flex; flex-direction: column; }
.off-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.off-tabs button { flex: 1; border: 0; border-radius: 999px; padding: 8px; font: inherit; font-weight: 600; background: #f3f4f6; cursor: pointer; }
.off-tabs button.on { background: #111827; color: #fff; }
.off-body { overflow: auto; flex: 1; }
.off-filters { display: flex; gap: 6px; margin-bottom: 8px; }
.off-filters select { flex: 1; min-width: 0; }
.off-task { border: 1px solid #eef0f3; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.off-task:hover { border-color: #f59e0b; background: #fffbeb; }
.off-tno { font-size: 11px; color: #6b7280; font-family: ui-monospace, monospace; }
.off-ttl { font-weight: 600; margin: 2px 0 6px; }
.off-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.off-stage { background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 2px 8px; font-weight: 600; }
.off-dt { margin: 10px 0 6px; }
.off-vers > div { font-size: 13px; padding: 4px 0; border-bottom: 1px dashed #eee; }
.off-tl { border-left: 2px solid #e5e7eb; margin-left: 6px; padding-left: 12px; }
.off-tl .tl { position: relative; margin-bottom: 10px; font-size: 13px; }
.off-tl .tl::before { content: ""; position: absolute; left: -18px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; }
.off-tl .tl.msg::before { background: #3b82f6; }
.off-tl .tl.k-question::before { background: #ef4444; }
.off-tl .tl-h { font-size: 12px; }
@media (max-width: 1100px) { .off-wrap { grid-template-columns: 1fr; } .off-panel { max-height: none; } }
.type-tag.t-design { background: #fdf2f8; color: #9d174d; }

.pc-photo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e5e7eb; }
.look-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; font-size: 13px; }
.look-row select { padding: 4px 6px; }
.shirt-pick { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.shirt-pick input { width: 28px; height: 24px; padding: 0; border: 1px solid #e5e7eb; border-radius: 6px; background: none; }
.photo-pick { cursor: pointer; }

.code.wrap { white-space: pre-wrap; word-break: break-word; }
.starters .code-box { margin-bottom: 8px; }
.pc-wait .btn { margin-top: 6px; background: #fff; }
.pc-room { color: #4b5563; margin: 2px 0; }
/* office: people list, person card and talk */
.op-team { margin-bottom: 12px; }
.op-th { font-weight: 700; font-size: 13px; padding: 4px 2px; border-bottom: 1px solid #eef0f3; margin-bottom: 4px; }
.op-row { display: grid; grid-template-columns: 12px auto 1fr; gap: 8px; align-items: center; padding: 6px 6px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.op-row:hover { background: #fffbeb; }
.op-row i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.op-row span { color: #4b5563; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-card { display: flex; gap: 12px; align-items: center; margin: 4px 0 10px; }
.op-card h3 { margin: 0; }
.op-face { width: 54px; height: 54px; border-radius: 50%; border: 4px solid #22c55e; overflow: hidden; display: grid; place-items: center; background: #eef2ff; font-weight: 800; font-size: 22px; color: #2e3192; flex: none; }
.op-face img { width: 100%; height: 100%; object-fit: cover; }
.op-now { border-radius: 12px; padding: 10px 12px; font-weight: 700; margin-bottom: 8px; background: #f3f4f6; }
.op-now.st-busy { background: #dbeafe; color: #1e40af; } .op-now.st-free { background: #dcfce7; color: #166534; }
.op-now.st-blocked { background: #fee2e2; color: #991b1b; } .op-now.st-wait { background: #fef3c7; color: #92400e; }
.op-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin: 0 0 8px; }
.op-facts dt { color: #6b7280; } .op-facts dd { margin: 0; }
.op-teamsel { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.op-teamsel select { flex: 1; }
.op-chat { border: 1px solid #eef0f3; border-radius: 12px; padding: 8px; height: 220px; overflow: auto; background: #fafafa; margin-bottom: 8px; }
.op-msg { max-width: 88%; border-radius: 12px; padding: 7px 10px; margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.op-msg.person { background: #fef9c3; margin-left: auto; }
.op-msg.agent { background: #fff; border: 1px solid #bfdbfe; }
.op-mh { font-size: 11px; margin-bottom: 2px; }
.op-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.op-send { display: flex; gap: 6px; margin-bottom: 4px; }
.op-send input { flex: 1; min-width: 0; }
.op-send .op-clip { flex: none; padding: 0 12px; font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; }
.op-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.op-files:empty { display: none; }
.op-file { display: inline-flex; align-items: center; gap: 6px; background: #eef2ff; border-radius: 10px; padding: 4px 8px; font-size: 12px; max-width: 100%; }
.op-file img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.op-file button { border: 0; background: none; font-size: 16px; cursor: pointer; color: #64748b; padding: 0 2px; }
.op-atts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: 6px; }
.op-att { display: inline-block; background: #f1f5f9; border-radius: 8px; padding: 4px 8px; font-size: 12px; text-decoration: none; color: #1e3a8a; word-break: break-all; }
.op-att.img { padding: 0; background: none; }
.op-att.img img { display: block; max-width: 180px; max-height: 140px; border-radius: 8px; border: 1px solid #e2e8f0; }
.op-clear { margin-top: 6px; }
/* the stand-alone office screen */
body.office-screen { background: #eef2f7; }
.os-wrap { padding: 12px 16px; }
.os-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.os-brand { display: flex; gap: 10px; align-items: center; }
.os-brand img { width: 38px; }
.os-brand div { display: flex; flex-direction: column; line-height: 1.2; }
.os-brand span { color: #6b7280; font-size: 13px; }
.os-right { display: flex; gap: 10px; align-items: center; }
.os-right .lang { margin: 0; }
.os-me { font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; padding: 2px 8px 2px 2px; border-radius: 999px; color: inherit; font-family: inherit; }
.os-me:hover { background: #eef2ff; }
.os-me img, .os-me i { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid #f97316; flex: none; }
.os-me i { display: inline-flex; align-items: center; justify-content: center; background: #ffedd5; color: #9a3412; font-style: normal; font-weight: 800; }
.pf-face { width: 132px; height: 132px; margin: 8px auto 6px; border-radius: 50%; overflow: hidden; border: 5px solid #f97316; background: #ffedd5; display: flex; align-items: center; justify-content: center; }
.pf-face img { width: 100%; height: 100%; object-fit: cover; }
.pf-face span { font-size: 56px; font-weight: 800; color: #9a3412; }
.pf-photo { justify-content: center; margin: 8px 0 2px; }
.pf-note { text-align: center; }
#offWalk.primary { background: #f97316; border-color: #f97316; color: #fff; }
.os-guide { margin-bottom: 10px; }
.os-main .off-canvas { height: calc(100vh - 175px); min-height: 460px; }
.os-main .off-panel { max-height: calc(100vh - 175px); }
/* office: hand cursor, control pad and hint */
.off-canvas canvas { cursor: grab; touch-action: none; }
.off-canvas canvas.dragging { cursor: grabbing; }
.off-canvas canvas.over-person { cursor: pointer; }
.off-pad { position: absolute; right: 12px; bottom: 64px; display: grid; grid-template-columns: repeat(3, 38px); gap: 4px; background: rgba(255,255,255,.85); padding: 6px; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.12); user-select: none; }
.off-pad button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; font-weight: 700; color: #1f2937; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); touch-action: none; }
.off-pad button:hover { background: #eef2ff; }
.off-pad button:active { background: #c7d2fe; }
.off-pad button[data-mv="home"] { background: #1f2937; color: #fff; }
.off-hint { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); background: rgba(17,24,39,.85); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; pointer-events: none; transition: opacity .6s; }
.off-hint.gone { opacity: 0; }
@media (max-width: 700px) { .off-hint { white-space: normal; width: 86%; text-align: center; } }
.off-top .off-count { margin-right: auto; }
/* people: account photo */
.pp-face { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 6px; display: inline-grid; place-items: center; }
.pp-face.none { background: #eef2ff; color: #2e3192; font-weight: 700; font-size: 12px; }
.pp-photo { margin: 6px 0; align-items: center; }
/* office: the meeting window (opens when a person is clicked) */
.meet { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, .35); display: flex; align-items: center; justify-content: center; padding: 16px; animation: meetIn .18s ease-out; }
.meet.hidden { display: none; }
@keyframes meetIn { from { opacity: 0; } to { opacity: 1; } }
.meet-box { position: relative; width: min(560px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 18px 20px 14px; display: flex; flex-direction: column; }
.meet-x { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #f3f4f6; font-size: 24px; line-height: 1; cursor: pointer; }
.meet-head { text-align: center; margin-bottom: 10px; }
.meet-head h2 { margin: 8px 0 2px; font-size: 22px; }
.meet-tag { display: inline-block; font-size: 12px; font-weight: 700; color: #1e40af; background: #dbeafe; border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.meet-face { position: relative; width: 132px; height: 132px; margin: 0 auto; border-radius: 50%; border: 6px solid #22c55e; overflow: visible; display: grid; place-items: center; background: #eef2ff; font-weight: 800; font-size: 52px; color: #2e3192; }
.meet-face img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.meet-face i { position: absolute; right: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; }
.meet-box .op-now { text-align: center; }
.meet-box .op-chat { height: auto; min-height: 140px; max-height: 34vh; }
@media (max-width: 700px) {
  .meet { padding: 0; align-items: stretch; }
  .meet-box { width: 100%; max-height: none; height: 100%; border-radius: 0; padding-top: 14px; }
  .meet-face { width: 108px; height: 108px; font-size: 44px; }
  .meet-box .op-chat { flex: 1; max-height: none; }
}
body.meeting { overflow: hidden; }
.meet-box, .meet-box * { box-sizing: border-box; }
/* the office screen on a phone: the header wraps instead of widening the page */
@media (max-width: 700px) {
  .os-wrap { padding: 8px 10px; }
  .os-head { flex-wrap: wrap; }
  .os-right { flex-wrap: wrap; justify-content: flex-end; gap: 6px; width: 100%; }
  .os-brand img { width: 30px; }
}
.meet-dancer { display: block; width: 300px; height: 262px; max-width: 100%; margin: 0 auto -4px; }
@media (max-width: 700px) { .meet-dancer { width: 240px; height: 210px; } }
/* phones (iPhone Safari): nothing may make the office page wider than the screen */
body.office-screen { overflow-x: hidden; }
.office-screen .os-wrap, .office-screen .off-wrap, .office-screen .off-stage-box { max-width: 100%; min-width: 0; }
.off-stage-box { overflow: hidden; }
@media (max-width: 700px) {
  .off-top { white-space: normal; }
  .off-theme select { max-width: 42vw; }
  .meet { width: 100vw; max-width: 100vw; }
  .meet-box { overflow-x: hidden; }
  .meet-box .op-facts { grid-template-columns: auto minmax(0, 1fr); }
  .meet-box .op-facts dd { overflow-wrap: anywhere; }
}
/* task categories (Task types page) */
.cat-card { margin-top: 16px; }
.cat-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.cat-row.off { opacity: .55; }
.cat-icon { text-align: center; font-size: 18px; }
.cat-row input { width: 100%; min-width: 0; box-sizing: border-box; }
.cat-row .cat-icon { padding-left: 4px; padding-right: 4px; }
/* narrow screens: the colour legend sits above the buttons (walk, home), left of the control pad */

/* the joystick that moves me (orange), apart from the pad that moves the view */
.off-joy { position: absolute; left: 14px; bottom: 54px; display: flex; flex-direction: column; align-items: center; gap: 4px; user-select: none; touch-action: none; }
.off-joy-ring { width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle, rgba(255,237,213,.95) 0 55%, rgba(255,247,237,.9) 56%); border: 3px solid #f97316; box-shadow: 0 2px 12px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.off-joy.on .off-joy-ring { cursor: grabbing; }
.off-joy-knob { width: 46px; height: 46px; border-radius: 50%; background: #f97316; box-shadow: 0 2px 8px rgba(154,52,18,.45); pointer-events: none; transition: transform .05s linear; }
.off-joy { align-items: flex-start; }
.off-joy-row { display: flex; align-items: center; gap: 10px; }
.off-keys { display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: 34px 34px; gap: 4px; }
.off-keys button { border: 2px solid #f97316; background: rgba(255,247,237,.95); color: #9a3412; font: 800 14px system-ui, sans-serif; border-radius: 8px; box-shadow: 0 2px 0 #fdba74; cursor: pointer; touch-action: none; padding: 0; }
.off-keys button.on, .off-keys button:active { background: #f97316; color: #fff; transform: translateY(2px); box-shadow: none; }
.off-keys [data-k="f"] { grid-column: 2; grid-row: 1; }
.off-keys [data-k="l"] { grid-column: 1; grid-row: 2; }
.off-keys [data-k="b"] { grid-column: 2; grid-row: 2; }
.off-keys [data-k="r"] { grid-column: 3; grid-row: 2; }
.off-joy-t { margin-left: 28px; font-size: 12px; background: #f97316; color: #fff; border-radius: 999px; padding: 2px 10px; }
@media (max-width: 700px) {
  .off-legend { display: none; } /* the People list below shows the colours */
  .off-joy { bottom: 64px; }
  .off-joy-ring { width: 92px; height: 92px; }
  .off-joy-row { gap: 6px; }
  .off-keys { grid-template-columns: repeat(3, 30px); grid-template-rows: 30px 30px; }
}

/* the on-screen controls can be hidden (phones start with them hidden: touch is enough) */
.ctl-hidden .off-joy, .ctl-hidden .off-pad { display: none; }
@media (max-width: 700px) {
  .off-btns { left: 12px; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .off-joy, .off-pad { bottom: 100px; } /* above the two rows of buttons */
  #offCtl, #offWalk, #offHome { padding: 6px 10px; font-size: 13px; }
}
/* phones: the count and the two choices sit in a bar above the 3D view, not on top of it */
@media (max-width: 700px) {
  .off-stage-box { display: flex; flex-direction: column; }
  .off-top { order: -1; }
  .off-top { position: static; padding: 10px 10px 8px; gap: 6px; background: #fff; justify-content: flex-start; flex-wrap: wrap; white-space: normal; border-bottom: 1px solid #e2e8f0; }
  .off-top .off-count { width: 100%; margin: 0; padding: 2px 4px 4px; background: none; text-align: center; }
  .off-top .off-theme { flex: 1 1 0; min-width: 0; padding: 4px 6px 4px 10px; background: #f1f5f9; border-radius: 12px; gap: 4px; }
  .off-top .off-theme > span { white-space: nowrap; font-size: 12px; color: #64748b; }
  .off-top .off-theme select { flex: 1; min-width: 0; max-width: none; width: 100%; font-size: 13px; }
  .off-hint { top: 116px; bottom: auto; } /* just under the bar, clear of the buttons */
}

/* ---------- status board (상황판) above the 3D office ---------- */
.sb { background: #0f172a; color: #e2e8f0; border-radius: 18px; padding: 14px 16px 16px; margin: 0 0 14px; box-shadow: 0 6px 24px rgba(15,23,42,.18); }
.sb-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sb-when { flex: 1 1 220px; min-width: 0; }
.sb-title { font-weight: 800; font-size: 18px; color: #fff; }
.sb-date { font-size: 15px; color: #cbd5e1; margin-top: 2px; }
.sb-clock { font: 800 40px/1 ui-monospace, Menlo, Consolas, monospace; color: #c8f000; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.sb-zones { display: flex; flex-direction: column; gap: 2px; font: 600 14px ui-monospace, Menlo, Consolas, monospace; color: #e2e8f0; font-variant-numeric: tabular-nums; }
.sb-zones small { font-family: system-ui, sans-serif; color: #94a3b8; margin-right: 4px; }
.sb-tools { display: flex; gap: 6px; margin-left: auto; }
.sb-tools .btn { background: #1e293b; color: #e2e8f0; border-color: #334155; }
.sb-tools .btn.primary { background: #c8f000; color: #0f172a; border-color: #c8f000; font-weight: 800; }
.sb-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.sb-pill { border: 2px solid var(--c); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 13px; color: #e2e8f0; cursor: pointer; background: color-mix(in srgb, var(--c) 18%, transparent); }
.sb-tools .btn.on { background: #334155; }
.sb-pill.ghost { background: transparent; border-style: dashed; }
.sb-pill b { margin-left: 2px; }
.sb-lanes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.sb-lane { background: #1e293b; border-radius: 14px; padding: 10px; border-top: 5px solid var(--c); min-width: 0; }
.sb-lane-h { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sb-lane-h b { color: var(--c); font-size: 18px; }
.sb-lane-sub { font-weight: 500; font-size: 12px; color: #94a3b8; }
.sb-people { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sb-who { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 92px; padding: 6px 4px; border: 0; border-radius: 12px; background: rgba(255,255,255,.04); color: inherit; cursor: pointer; font: inherit; text-align: center; }
.sb-who:hover { background: rgba(255,255,255,.12); }
.sb-who b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-who small { font-size: 11px; line-height: 1.25; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sb-who .sb-task { color: #cbd5e1; }
.sb-who .sb-timer { color: #c8f000; font-family: ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
.sb-who .sb-ask { color: #86efac; font-weight: 700; }
.sb-who .sb-ask.red { color: #fca5a5; }
.sb-who .sb-ask.amber { color: #fcd34d; }
.sb-who.free .sb-face { animation: sbBounce 0.9s ease-in-out infinite; }
.sb-who.help .sb-face { animation: sbWave 0.6s ease-in-out infinite; }
.sb-who.away { opacity: .6; }
.sb-who.busy .sb-face { animation: sbType 0.25s steps(2) infinite; }
@keyframes sbBounce { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-7px) rotate(6deg); } }
@keyframes sbWave { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes sbType { 0% { transform: translateY(0); } 100% { transform: translateY(1px); } }
.sb-face { border-radius: 50%; border: 3px solid #cbd5e1; object-fit: cover; flex: none; background: #334155; }
.sb-letter { display: inline-flex; align-items: center; justify-content: center; color: #e2e8f0; font-weight: 800; }
.sb-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.sb-col { background: #f8fafc; color: #0f172a; border-radius: 14px; padding: 10px; border-top: 5px solid var(--c); min-width: 0; max-height: 360px; overflow: auto; }
.sb-col-h { font-weight: 800; font-size: 14px; margin-bottom: 8px; position: sticky; top: -10px; background: #f8fafc; padding: 2px 0 4px; }
.sb-col-h b { color: var(--c); }
.sb-card { background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid var(--c); border-radius: 10px; padding: 8px; margin-bottom: 6px; }
.sb-card-t { font-weight: 700; font-size: 13px; word-break: break-word; }
.sb-card-m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; }
.sb-card-who { display: inline-flex; align-items: center; gap: 4px; }
.sb-card-who .sb-face { border-width: 2px; }
.sb-kind { background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.sb-card-time { font-size: 12px; color: #475569; margin-top: 4px; font-variant-numeric: tabular-nums; }
.sb-empty { margin: 6px 2px; }
.sb-modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 12px; }
.sb-modal.hidden { display: none; }
.sb-box { position: relative; background: #fff; color: #0f172a; border-radius: 18px; padding: 18px; width: min(520px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.sb-box h3 { margin: 0 0 10px; }
.sb-x { position: absolute; right: 10px; top: 10px; border: 0; background: #f1f5f9; border-radius: 50%; width: 34px; height: 34px; font-size: 16px; cursor: pointer; }
.sb-give-who { display: flex; align-items: center; gap: 12px; background: #f1f5f9; border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.sb-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.sb-f select, .sb-f textarea, .sb-row2 input { font: inherit; font-weight: 400; border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px 10px; width: 100%; box-sizing: border-box; }
.sb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.sb-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 6px 0; }
@media (max-width: 900px) { .sb-lanes, .sb-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .sb { padding: 12px; border-radius: 14px; }
  .sb-clock { font-size: 32px; }
  .sb-head { gap: 8px; }
  .sb-tools { width: 100%; justify-content: flex-start; flex-wrap: wrap; margin-left: 0; }
  .sb-lanes, .sb-cols { grid-template-columns: minmax(0, 1fr); }
  .sb-who { width: 84px; }
  .sb-col { max-height: 260px; }
}

/* the people lanes stay short: smaller faces, and a lane scrolls if it is full */
.sb-lanes { margin-top: 10px; }
.sb-lane { padding: 8px; }
.sb-people { max-height: 176px; overflow-y: auto; gap: 6px; }
.sb-who { width: 78px; padding: 4px 2px; }
.sb-who .sb-face { width: 38px !important; height: 38px !important; }

/* ---------- projects (프로젝트) ---------- */
.pj-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.pj-filters { display: flex; gap: 4px; flex-wrap: wrap; background: #eef2f7; padding: 4px; border-radius: 12px; }
.pj-f { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font: inherit; font-size: 13px; cursor: pointer; color: #475569; }
.pj-f.on { background: #fff; color: #0f172a; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pj-f b { color: #94a3b8; margin-left: 2px; }
.pj-search { flex: 1 1 200px; max-width: 320px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px 12px; font: inherit; }
.pj-top .btn.primary { margin-left: auto; }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pj-grid.mini { grid-template-columns: 1fr; }
.pj-card { text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: transform .12s, box-shadow .12s; }
.pj-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.pj-card.late { border-color: #fca5a5; box-shadow: inset 4px 0 0 #ef4444; }
.pj-card-h { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.pj-card-h b { font-size: 15px; word-break: break-word; }
.pj-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pj-st { border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; background: #dbeafe; color: #1d4ed8; }
.pj-st.paused { background: #fef3c7; color: #92400e; }
.pj-st.done { background: #dcfce7; color: #166534; }
.pj-due { font-size: 12px; border-radius: 999px; padding: 2px 9px; background: #f1f5f9; color: #334155; white-space: nowrap; }
.pj-due.soon { background: #fef3c7; color: #92400e; font-weight: 700; }
.pj-due.late { background: #fee2e2; color: #b91c1c; font-weight: 700; }
.pj-due.ok { background: #dcfce7; color: #166534; }
.pj-due.none { color: #94a3b8; }
.pj-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #e2e8f0; }
.pj-bar i { display: block; height: 100%; }
.pj-bar .d { background: #22c55e; } .pj-bar .r { background: #f59e0b; } .pj-bar .g { background: #3b82f6; } .pj-bar .t { background: #cbd5e1; }
.pj-pct { font-size: 12px; color: #475569; }
.pj-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: #475569; }
.pj-stats .late { color: #b91c1c; font-weight: 700; }
.pj-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }
.pj-people { display: flex; align-items: center; }
.pj-people i, .pj-who i { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: #e0e7ff; color: #3730a3; font-style: normal; font-weight: 800; font-size: 11px; align-items: center; justify-content: center; border: 2px solid #fff; margin-left: -4px; }
.pj-people i:first-child { margin-left: 0; }
.pj-who { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pj-who i { margin: 0; }
.pj-page { display: flex; flex-direction: column; gap: 10px; }
.pj-title input, .pj-title h2 { font-size: 24px; font-weight: 800; border: 0; border-bottom: 2px solid transparent; padding: 2px 0; width: 100%; margin: 0; font-family: inherit; background: none; }
.pj-title input:focus { outline: none; border-bottom-color: #3b82f6; }
.pj-props { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.pj-props label, .pj-notes { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pj-props label > span, .pj-notes > span { color: #64748b; font-size: 12px; }
.pj-props select, .pj-props input, .pj-notes textarea { font: inherit; border: 1px solid #cbd5e1; border-radius: 10px; padding: 6px 10px; }
.pj-notes textarea { resize: vertical; }
.pj-actions { display: flex; justify-content: flex-end; }
.pj-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; }
.pj-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pj-table th { text-align: left; font-size: 12px; color: #64748b; font-weight: 600; padding: 10px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; position: sticky; top: 0; white-space: nowrap; }
.pj-table td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.pj-table tr[data-task] { cursor: pointer; }
.pj-table tr[data-task]:hover td { background: #f8fafc; }
.pj-table tr.done td { color: #64748b; }
.pj-table .late { color: #b91c1c; font-weight: 700; }
.pj-col { border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700; white-space: nowrap; background: #f1f5f9; }
.pj-col.doing { background: #dbeafe; color: #1d4ed8; } .pj-col.review { background: #fef3c7; color: #92400e; } .pj-col.done { background: #dcfce7; color: #166534; } .pj-col.cancelled { background: #f1f5f9; color: #94a3b8; }
.pj-date { font: inherit; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 3px 6px; }
.pj-date.late { border-color: #ef4444; color: #b91c1c; background: #fef2f2; }
.pj-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pj-board .sb-col { max-height: none; }
.pj-board .sb-card { cursor: pointer; }
@media (max-width: 900px) { .pj-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pj-board { grid-template-columns: minmax(0, 1fr); } .pj-search { max-width: none; } }
.sb-due { font-size: 11px; border-radius: 999px; padding: 1px 7px; background: #f1f5f9; color: #334155; }
.sb-due.late { background: #fee2e2; color: #b91c1c; font-weight: 700; }

/* ---------- new answers: cards, counts, the bell, "waiting for the answer" (v47) ---------- */
.nt-stack { position: fixed; right: 14px; top: 64px; z-index: 9000; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 28px)); pointer-events: none; }
.nt-card { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; border: 0; border-left: 5px solid #2563eb; border-radius: 14px; background: #fff; padding: 12px 34px 12px 12px; box-shadow: 0 12px 32px rgba(15,23,42,.25); cursor: pointer; position: relative; font: inherit; color: #0f172a; transform: translateX(120%); opacity: 0; transition: transform .35s ease, opacity .35s ease; }
.nt-card.in { transform: none; opacity: 1; animation: ntPop 1.2s ease 1; }
@keyframes ntPop { 0%, 100% { box-shadow: 0 12px 32px rgba(15,23,42,.25); } 40% { box-shadow: 0 0 0 6px rgba(37,99,235,.25), 0 12px 32px rgba(15,23,42,.25); } }
.nt-ic { font-size: 22px; line-height: 1; }
.nt-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nt-tx b { font-size: 14px; }
.nt-tx span { font-size: 13px; color: #334155; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nt-tx em { font-style: normal; font-size: 12px; color: #2563eb; font-weight: 600; }
.nt-x { position: absolute; right: 8px; top: 6px; font-size: 18px; color: #94a3b8; padding: 2px 6px; }
.nt-bell { position: relative; white-space: nowrap; }
.nt-bell[data-st="on"] { border-color: #22c55e; }
.nt-count { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ef4444; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; animation: ntBeat 1.6s ease-in-out infinite; }
.nt-count[hidden] { display: none; }
@keyframes ntBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.nt-chip { margin-left: 6px; background: #ef4444; color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; animation: ntBeat 1.6s ease-in-out infinite; }
.nt-help { position: fixed; inset: 0; z-index: 9500; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.nt-hb { background: #fff; border-radius: 16px; padding: 18px 20px; max-width: 420px; width: 100%; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.nt-hb h3 { margin: 0 0 8px; }
.nt-hb ol { padding-left: 20px; margin: 8px 0 0; line-height: 1.6; }
.nt-hx { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 22px; cursor: pointer; color: #64748b; }
.op-wait { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #1d4ed8; background: #eff6ff; border: 1px dashed #93c5fd; border-radius: 12px; padding: 7px 10px; margin: 0 0 8px; max-width: 88%; }
.op-dots { display: inline-flex; gap: 3px; }
.op-dots i { width: 6px; height: 6px; border-radius: 50%; background: #3b82f6; animation: opDot 1.2s infinite ease-in-out; }
.op-dots i:nth-child(2) { animation-delay: .15s; } .op-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes opDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.op-msg.fresh { animation: opFresh 2.4s ease 1; }
@keyframes opFresh { 0%, 60% { box-shadow: 0 0 0 4px rgba(59,130,246,.45); background: #dbeafe; } 100% { box-shadow: none; } }
@media (max-width: 700px) {
  .nt-bell .nt-lbl { display: none; }
  .nt-stack { top: auto; bottom: 14px; right: 10px; }
}
.op-wait > span:last-child { display: flex; flex-direction: column; } .op-wait b { font-weight: 600; } .op-wait small { color: #64748b; font-size: 11.5px; }

/* ---------- 📢 notices and 💬 group rooms (v49) ---------- */
.rm-back { position: fixed; inset: 0; z-index: 8000; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; padding: 14px; }
.rm-box { position: relative; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); width: min(720px, 100%); max-height: calc(100vh - 28px); overflow: auto; padding: 18px 20px; }
.rm-box h3 { margin: 0 0 6px; } .rm-box h4 { margin: 18px 0 8px; }
.rm-x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 24px; color: #64748b; cursor: pointer; z-index: 2; }
.rm-box textarea, .rm-box input { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 12px; padding: 10px 12px; font: inherit; }
.rm-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.rm-f { display: block; font-weight: 600; margin: 8px 0; } .rm-f input { margin-top: 6px; font-weight: 400; }
.rm-pick { border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px; margin: 10px 0; background: #f8fafc; }
.rm-pick-top { display: flex; justify-content: space-between; align-items: center; }
.rm-all { font-weight: 700; display: flex; align-items: center; gap: 6px; cursor: pointer; } .rm-all input { width: auto; }
.rm-group { font-size: 12px; font-weight: 700; color: #64748b; margin: 10px 0 6px; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; font: inherit; font-size: 13px; }
.rm-chip.on { border-color: #2563eb; background: #dbeafe; color: #1e3a8a; font-weight: 700; }
.rm-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.rm-av.sm { width: 24px; height: 24px; } .rm-av.xs { width: 20px; height: 20px; }
.rm-av-l { display: inline-flex; align-items: center; justify-content: center; background: #1e3a8a; color: #fff; font-size: 11px; font-weight: 700; }
.rm-nlist { display: flex; flex-direction: column; gap: 10px; }
.rm-n { border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px 12px; }
.rm-n-h { display: flex; gap: 8px; align-items: baseline; } .rm-n-c { margin-left: auto; font-size: 12px; font-weight: 700; color: #16a34a; }
.rm-n-b { white-space: pre-wrap; margin: 6px 0; }
.rm-n-to { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-st { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; border-radius: 999px; padding: 2px 8px 2px 2px; background: #f1f5f9; }
.rm-st.answered { background: #dcfce7; } .rm-st.read { background: #e0f2fe; } .rm-st.waiting { background: #fef3c7; }
.rm-ans { font-size: 12.5px; color: #334155; margin-top: 4px; }
.rm-rooms { width: min(980px, 100%); height: min(720px, calc(100vh - 28px)); display: grid; grid-template-columns: 260px 1fr; gap: 0; padding: 0; overflow: hidden; }
.rm-side { border-right: 1px solid #e2e8f0; padding: 16px 12px; overflow: auto; background: #f8fafc; }
.rm-side-h { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.rm-rlist { display: flex; flex-direction: column; gap: 4px; }
.rm-r { text-align: left; border: 0; background: none; border-radius: 12px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.rm-r span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-r:hover { background: #eef2ff; } .rm-r.on { background: #dbeafe; }
.rm-main { display: flex; flex-direction: column; min-width: 0; padding: 16px; overflow: auto; }
.rm-empty { margin: auto; }
.rm-head { display: flex; align-items: center; gap: 10px; padding-right: 30px; } .rm-head > div { flex: 1; min-width: 0; } .rm-head h3 { margin: 0; }
.rm-mem { display: flex; align-items: center; gap: 2px; margin-top: 4px; }
.rm-backbtn { display: none; }
.rm-msgs { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 2px; }
.rm-m { max-width: 80%; background: #f1f5f9; border-radius: 14px; padding: 8px 12px; align-self: flex-start; }
.rm-m.agent { background: #eef2ff; } .rm-m.mine { align-self: flex-end; background: #2563eb; color: #fff; } .rm-m.mine .muted { color: #dbeafe; }
.rm-m-h { font-size: 12px; } .rm-m-b { white-space: pre-wrap; word-break: break-word; }
.rm-m.fresh { animation: opFresh 2.4s ease 1; }
.rm-send { display: flex; gap: 8px; align-items: flex-end; } .rm-send textarea { flex: 1; resize: none; }
.sb-tools .btn { position: relative; }
@media (max-width: 700px) {
  .rm-back { padding: 0; align-items: stretch; }
  .rm-box { border-radius: 0; max-height: 100vh; width: 100%; }
  .rm-rooms { height: 100vh; grid-template-columns: 1fr; }
  .rm-rooms.talking .rm-side { display: none; } .rm-rooms:not(.talking) .rm-main { display: none; }
  .rm-backbtn { display: inline-flex; }
}

/* free windows for notices and group rooms (v50): no dark cover, move by the bar, resize at the corner, fold */
.rm-back.free { background: transparent; pointer-events: none; display: block; padding: 0; }
.rm-back.free .rm-box { pointer-events: auto; position: fixed; display: flex; flex-direction: column; padding: 0; overflow: hidden; resize: both; min-width: 340px; min-height: 260px; max-width: calc(100vw - 10px); max-height: calc(100vh - 10px); box-shadow: 0 18px 50px rgba(15,23,42,.35), 0 0 0 1px rgba(15,23,42,.08); }
.rm-back.free .rm-box.moving { opacity: .92; user-select: none; }
.rm-back.free .rm-box.mini { height: auto !important; min-height: 0; resize: none; }
.rm-back.free .rm-box.mini .rm-body { display: none; }
.rm-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 16px; background: #0f172a; color: #fff; cursor: move; flex: none; touch-action: none; }
.rm-bar-t { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-bar button { position: static; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 30px; height: 28px; border-radius: 8px; font-size: 18px; line-height: 1; cursor: pointer; }
.rm-bar button:hover { background: rgba(255,255,255,.25); }
.rm-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px; }
.rm-rooms .rm-body { display: grid; grid-template-columns: 240px 1fr; padding: 0; overflow: hidden; }
.rm-back.free .rm-rooms { width: auto; height: auto; grid-template-columns: none; }
.rm-head { padding-right: 0; }
.rm-un { display: inline-block; min-width: 16px; padding: 0 5px; border-radius: 8px; background: #facc15; color: #713f12; font-size: 11px; font-weight: 800; text-align: center; cursor: help; }
.rm-allread { color: #22c55e; font-size: 11px; font-weight: 800; }
.rm-m.mine .rm-allread { color: #bbf7d0; }
.rm-heads { display: flex; align-items: center; gap: 2px; font-size: 11px; color: #64748b; margin: -4px 0 2px 6px; }
.rm-heads.r { justify-content: flex-end; margin: -4px 6px 2px 0; }
.rm-heads span { margin-left: 4px; }
@media (max-width: 700px) {
  .rm-back.free .rm-box { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; resize: none; }
  .rm-rooms .rm-body { grid-template-columns: 1fr; }
  .rm-bar { cursor: default; }
}

/* the floor stays still (lock) and full screen (v52) */
.off-canvas canvas.locked { cursor: pointer; touch-action: pan-y; }
.off-stage-box.off-full { position: fixed; inset: 0; z-index: 7000; border-radius: 0; background: #eef2f7; }
.off-stage-box.off-full .off-canvas { height: 100vh; height: 100dvh; min-height: 0; }
.off-stage-box.off-full .off-canvas canvas.locked { touch-action: none; }
html.off-full-on, html.off-full-on body { overflow: hidden; }
.off-stage-box:fullscreen { width: 100vw; height: 100vh; }
.off-btns { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 24px); }
#offLock.on { background: #0f172a; color: #fff; }
.off-stage-box.off-full .off-btns { bottom: max(12px, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-right)); }
.off-stage-box.off-full .off-top { top: max(10px, env(safe-area-inset-top)); }
@media (max-width: 700px) { .off-btns a[data-i="offOpenScreen"] { display: none; } }
#offFull.primary { background: #2563eb; color: #fff; }
.off-stage-box.off-full .off-legend { display: none; }
/* full screen office: windows that open from it sit above it (v53) */
html.off-full-on .meet, html.off-full-on .sb-modal, html.off-full-on .modal, html.off-full-on .toast, html.off-full-on .g-ring, html.off-full-on .g-card { z-index: 7600; }
html.off-full-on .g-card { z-index: 7601; }
html.off-full-on .ai-fab { display: none; }
html.off-full-on .ai-panel { z-index: 7500; }
