
.office-consult-toggle { border: 1px solid #b3d9ef; border-radius: 20px; color: #164772; background: #eef9ff; padding: 5px 8px; min-height: 28px; font: 600 10px var(--body); cursor: pointer; white-space: nowrap; }
.office-consult-toggle[hidden], #office-consult-card[hidden] { display: none; }
#office-consult-card { position: relative; flex: none; margin: 8px 4px 5px; color: white; background: #224f7b; border: 2px solid #082c58; outline: 2px solid #b5e4ff; outline-offset: 2px; box-shadow: inset 0 0 0 3px #9ccbec, 0 7px 0 #163b5b14; }
.consult-alert { position: absolute; top: -13px; left: 17px; width: 26px; height: 30px; display: grid; place-items: center; color: #082c58; background: #e9ff58; border: 2px solid #082c58; font: 800 21px var(--pixel); }
.consult-later { display: block; margin: 9px 10px 0 auto; min-height: 28px; padding: 3px 6px; border: 0; background: transparent; color: #c5e4f5; font: 11px var(--body); cursor: pointer; }
.consult-invite { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 3px 13px 17px; text-align: left; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.consult-face { flex: none; padding-top: 4px; }
.consult-portrait { display: block; flex: none; width: 47px; height: 50px; }
.consult-invite-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 6px; }
.consult-by { color: #c0e0f2; font-size: 10px; }
.consult-invite strong { font-size: 13px; line-height: 1.65; color: white; }
.consult-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #c6e4f8; font-size: 11px; line-height: 1.7; }
.consult-arrow { display: none; color: #e9ff58; font-size: 24px; }
.consult-next { display: block; margin: -6px 12px 11px auto; min-height: 28px; padding: 4px 0; border: 0; color: #c6e4f8; background: transparent; font: 10px var(--body); cursor: pointer; }
#office-consult-card button:hover { color: #e9ff58; }
#office-consult-card button:focus-visible { outline-color: #e9ff58; outline-offset: -3px; }
#office-consult-dialog { position: fixed; inset: 0; margin: auto; width: min(460px, calc(100vw - 28px)); max-height: calc(100dvh - 36px); padding: 0; color: #173f68; background: #fff; border: 3px solid #082c58; outline: 2px solid #a8d8f7; outline-offset: 2px; overflow-y: auto; overscroll-behavior: contain; font: 14px/1.8 var(--body); box-shadow: 0 20px 80px #062a5959; }
#office-consult-dialog::backdrop { background: #062a5966; backdrop-filter: blur(3px); }
#office-consult-dialog[open] { animation: consult-arrive .24s ease both; }
.consult-dialog-head { display: flex; align-items: center; gap: 15px; padding: 24px 22px; color: white; background: #224f7b; }
.consult-dialog-head > div { min-width: 0; flex: 1; }
.consult-dialog-head > div > span { color: #bde3f9; font-size: 11px; }
.consult-dialog-head h2 { font-size: 19px; margin: 3px 0 0; line-height: 1.5; }
.consult-dialog-head .consult-portrait { width: 52px; height: 55px; }
.consult-close { align-self: flex-start; flex: none; width: 34px; height: 34px; margin: -14px -12px 0 0; border: 2px solid #8ebcda; background: #224f7b; color: #fff; font: 24px/1 var(--body); cursor: pointer; }
.consult-dialog-body { padding: 14px 22px 22px; }
.consult-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: #607e9b; font-size: 11px; margin: -3px -3px 12px; }
.consult-pager button { width: 29px; height: 29px; border: 1px solid #cee4f1; background: #f4faff; color: #224f7b; cursor: pointer; }
.consult-pager button:disabled { opacity: .3; cursor: default; }
.consult-dialog-body h3 { font-size: 19px; line-height: 1.6; margin: 0 0 14px; overflow-wrap: anywhere; }
.consult-description { font-size: 13px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 14px; }
.consult-file { background: #fff; color: #174f82; border: 1px solid #91beda; padding: 7px 11px; margin-bottom: 15px; font: 12px var(--body); cursor: pointer; }
.consult-choices { display: grid; gap: 9px; margin: 2px 0 16px; }
.consult-choices button { display: flex; width: 100%; align-items: center; gap: 11px; border: 2px solid #c1e6fa; background: #f1f9fd; padding: 12px 13px; text-align: left; color: #173f68; font: 13px var(--body); cursor: pointer; transition: border-color .16s, background .16s; }
.consult-choices button:hover { background: #e6f6ff; border-color: #6fb9e4; }
.consult-choices button > span:nth-child(2) { flex: 1; }
.consult-choices strong, .consult-choices small { display: block; }
.consult-choices strong { font-size: 13px; font-weight: 600; }
.consult-choices small { color: #54718d; font-size: 11px; line-height: 1.6; margin-top: 4px; }
.consult-number { flex: none; display: grid; place-items: center; width: 21px; height: 24px; background: #082c58; color: white; font: 14px var(--pixel); }
.consult-note-label { display: block; color: #5c7994; font-size: 12px; margin: 0 0 5px; }
#consult-note { display: block; width: 100%; min-height: 84px; resize: vertical; padding: 10px; border: 1px solid #8cbfe4; border-radius: 5px; font: 13px/1.6 var(--body); color: #173f68; background: #fff; }
.consult-note-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 13px; }
.consult-note-footer > span { color: #6b8299; font-size: 10px; }
.consult-comment { border: 2px solid #082c58; box-shadow: 0 4px 0 #b0cee4; color: #174f82; background: #fff; min-height: 41px; padding: 8px 13px; font: 12px var(--body); cursor: pointer; }
.consult-scope { margin-top: 17px; color: #637d94; font-size: 10px; line-height: 1.7; }
.consult-result { font-size: 12px; line-height: 1.7; color: #156c5a; margin-top: 8px; }
.consult-result:empty { display: none; }
.consult-result[data-error="true"] { color: #a13f34; }
.consult-history { margin-top: 14px; border-top: 1px solid #d4e5f0; padding-top: 12px; font-size: 11px; }
.consult-history summary { cursor: pointer; color: #526e89; }
.consult-history > div { margin-top: 10px; padding: 8px 10px; background: #f3f9fc; }
.consult-history > div > span { color: #637d94; font-size: 10px; }
.consult-history p { white-space: pre-wrap; overflow-wrap: anywhere; }
#office-consult-dialog button:disabled { opacity: .5; cursor: wait; }
#consult-notice:not(:empty) { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 1100; max-width: calc(100vw - 40px); padding: 12px 18px; color: #fff; background: #082c58; border: 1px solid #91beda; font-size: 12px; box-shadow: 0 4px 20px #082c5833; }
@keyframes consult-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
#office-consult-card .consult-count { width: auto; min-width: 26px; padding: 0 5px; font-size: 18px; line-height: 1; }
.consult-confirm { margin: 0 0 14px; padding: 10px 12px; background: #fdffe3; border: 1px solid #d9e66a; border-left: 4px solid #b7c934; font-size: 12px; line-height: 1.75; }
.consult-confirm strong { display: block; font-size: 11px; color: #5e6a12; }
.consult-confirm p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.consult-current { margin: -4px 0 16px; font-size: 12px; }
.consult-current summary { cursor: pointer; color: #526e89; font-size: 11px; }
.consult-current p { margin: 8px 0 0; padding: 10px 12px; background: #f3f9fc; border-left: 3px solid #b9d9ec; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; color: #2d5276; }
.consult-examples { margin-bottom: 10px; }
.consult-examples button { padding: 10px 12px; }
.consult-examples strong { font-weight: 500; line-height: 1.6; }
.consult-examples button[aria-pressed="true"], .consult-quick button[aria-pressed="true"] { border-color: #224f7b; background: #dff1fc; }
.consult-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.consult-quick button { border: 2px solid #c1e6fa; background: #f1f9fd; color: #173f68; padding: 5px 12px; min-height: 32px; font: 12px var(--body); cursor: pointer; }
.consult-quick button:hover { border-color: #6fb9e4; }
.consult-count-text { display: block; text-align: right; color: #6b8299; font-size: 10px; margin-top: 4px; }
.consult-answer-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.consult-defer { border: 1px solid #91beda; background: #fff; color: #174f82; min-height: 41px; padding: 8px 12px; font: 12px var(--body); cursor: pointer; }
.consult-send { border: 2px solid #082c58; box-shadow: 0 4px 0 #b0cee4; color: #fff; background: #224f7b; min-height: 41px; padding: 8px 16px; font: 600 13px var(--body); cursor: pointer; }
.consult-send:hover { background: #1a4069; }
.consult-defer:hover { background: #f1f9fd; }
#view-office .office-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
#view-office .office-scene { height: calc(100% - 38px); }
#view-office .office-hud { position: absolute; z-index: 25; inset: auto 18px 16px; display: flex; align-items: flex-end; justify-content: flex-end; gap: 18px; pointer-events: none; }  
#view-office #office-consult-card { position: relative; inset: auto; flex: 0 1 350px; width: 350px; min-width: 0; margin: 0; pointer-events: auto; }
#office-consult-card .consult-later { margin-top: 4px; min-height: 24px; }
#office-consult-card .consult-invite { align-items: center; gap: 13px; padding: 2px 15px 13px; }
#office-consult-card .consult-invite-copy { gap: 4px; }
#office-consult-card .consult-invite strong { font-size: 14px; line-height: 1.6; }
#office-consult-card .consult-invite strong br { display: none; }
#office-consult-card .consult-preview { font-size: 11px; }
#office-consult-card .consult-arrow { display: block; font-size: 23px; }
#office-consult-card .consult-next { min-height: 24px; margin-bottom: 6px; }
@media (min-width: 701px) and (max-width: 1100px) {
  #view-office .office-scene { height: calc(100% - 90px); }
}
@media (max-width: 700px) {
  #view-office .office-hud { inset: auto 12px 12px; gap: 12px; }
  #view-office #office-consult-card { flex-basis: 100%; width: 100%; max-width: 420px; }  
  #office-consult-card .consult-later { font-size: 9px; margin-right: 4px; }
  #office-consult-card .consult-invite { flex-wrap: wrap; gap: 6px; padding: 2px 9px 10px; }
  #office-consult-card .consult-face { display: none; }
  #office-consult-card .consult-by { font-size: 9px; }
  #office-consult-card .consult-invite strong { font-size: 11px; }
  #office-consult-card .consult-preview { font-size: 10px; }
  #office-consult-card .consult-arrow { display: none; }
  #office-consult-card .consult-next { font-size: 9px; margin-right: 8px; }
  #office-consult-card .consult-alert { width: 22px; height: 25px; font-size: 18px; left: 10px; }
  #office-consult-card .consult-count { width: auto; min-width: 22px; padding: 0 4px; font-size: 15px; }
}
@media (max-width: 450px) {
  #view-office .office-scene { height: calc(100% - 105px); }
  #view-office .office-hud { inset: auto 10px 12px; gap: 10px; }
  #office-consult-card .consult-invite strong { display: none; }
  #office-consult-card .consult-preview { -webkit-line-clamp: 3; font-size: 11px; line-height: 1.7; }
}
@media (max-width: 600px) {
  .office-consult-toggle { font-size: 8px; padding: 4px 6px; }
  .consult-dialog-body { padding: 14px 17px 18px; }
  .consult-dialog-body h3 { font-size: 17px; }
  .consult-dialog-head { padding: 22px 17px; }
  .consult-dialog-head h2 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { #office-consult-dialog[open] { animation: none; } }
.view-container:has(> #view-office.active) { padding: 0; }
#view-office.active { gap: 0; }
#view-office .office-main-panel { position: relative; border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: hidden; }
#view-office .office-viewport { background: radial-gradient(ellipse at 78% 22%, #fff 0%, transparent 50%), linear-gradient(155deg, #eefaff 0%, #e0f2ff 68%, #f4fbff 100%); }
#view-office .office-scene { height: calc(100% - 90px); background: transparent; }
#view-office .office-toolbar { position: absolute; top: 18px; right: 24px; z-index: 30; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#view-office .office-toolbar .scene-tools { gap: 7px; }
#view-office .office-scene-footer { position: absolute; bottom: 7px; left: 24px; right: 24px; min-height: 0; padding: 0; border: 0; background: transparent; pointer-events: none; font-size: 9px; color: #67849b; }
#view-office .office-hud { left: 24px; right: 24px; bottom: 36px; }
#view-office .office-load-error:not([hidden]) { position: absolute; top: 56px; left: 16px; right: 16px; z-index: 40; }
@media (min-width: 701px) and (max-width: 1100px) {
  #view-office .office-scene { height: calc(100% - 125px); }
}
@media (max-width: 700px) {
  #view-office .office-toolbar { top: 12px; right: 14px; }
  #view-office .office-hud { left: 14px; right: 14px; bottom: 34px; }
  #view-office .office-scene-footer { left: 14px; right: 14px; font-size: 8px; }
}
@media (max-width: 450px) {
  #view-office .office-scene { height: calc(100% - 145px); }
  #view-office .office-toolbar { right: 12px; }
  #view-office .office-hud { left: 12px; right: 12px; }
}
#view-office .office-viewport { container: office-canvas / size; }
@container office-canvas (min-width: 1200px) and (min-aspect-ratio: 3/2) {
  #view-office .office-scene { height: calc(100% - 30px); }
  #view-office .office-depth {
    --office-floor-tall: calc(.666667 + (var(--office-floor-n) - 1) * .34);
    --office-floor-size: min(calc((100cqw - 80px) / 1.7), calc((100cqh - 64px) / var(--office-floor-tall)));
    --office-floor-shift: calc(var(--office-floor-size) * .7);
    --office-floor-drop: calc(var(--office-floor-size) * .34);
    --office-scene-left: calc((100cqw - var(--office-floor-size) * 1.7) / 2);
    --office-scene-top: calc((100cqh - var(--office-floor-size) * var(--office-floor-tall)) / 2);
  }
  #view-office .office-floor { left: calc(var(--office-scene-left) + var(--floor-right, 0) * var(--office-floor-shift)); }
  #view-office .scene-person { width: clamp(42px, 10.5cqw, 104px); height: clamp(44.4px, 11.1cqw, 110px); }
  #view-office .agent-name { font-size: clamp(10px, 1.35cqw, 13px); }
  #view-office .agent-dept { font-size: clamp(8px, 1cqw, 10px); }
  #view-office .office-floor[data-floor="1"] .floor-plaque { left: 40%; }
}
@container office-canvas (min-aspect-ratio: 1/1) {
  #view-office .office-depth.office-many-floors {
    --office-floor-tall: calc(.666667 + (var(--office-floor-n) - 1) * .34);
    --office-floor-size: min(calc((100cqw - 80px) / 1.7), calc((100cqh - 64px) / var(--office-floor-tall)));
    --office-floor-shift: calc(var(--office-floor-size) * .7);
    --office-floor-drop: calc(var(--office-floor-size) * .34);
    --office-scene-left: calc((100cqw - var(--office-floor-size) * 1.7) / 2);
    --office-scene-top: calc((100cqh - var(--office-floor-size) * var(--office-floor-tall)) / 2);
  }
  #view-office .office-many-floors .office-floor { left: calc(var(--office-scene-left) + var(--floor-right, 0) * var(--office-floor-shift)); }
}
@container office-canvas (min-aspect-ratio: 1/1) {
  #view-office .office-many-floors .office-floor[data-floor="1"] .floor-plaque { left: 27%; top: 70%; }
}
@container (max-width: 540px) {
  #view-office .office-many-floors .agent-label { min-width: 0; }
  #view-office .office-many-floors .agent-dept { display: none; }
}
@container (min-width: 320px) and (max-width: 400px) {
  #view-office .office-many-floors .agent-spot[data-agent="minato"] { --label-nudge-x: -6px; }
  #view-office .office-many-floors .agent-spot[data-agent="haru"] { --label-nudge-x: -6px; }
}
#view-office .floor-hover-surface { pointer-events: auto; cursor: pointer; }
#view-office .floor-plaque { pointer-events: auto; cursor: pointer; z-index: 35; font-family: var(--body); }
#view-office .floor-plaque:hover { border-color: #fff; box-shadow: 0 3px 0 #0866ed, 0 0 0 2px #80dfff66; }
#view-office .floor-plaque:focus-visible { outline: 2px solid #0866ed; outline-offset: 4px; }
.consult-wait { color: #ffd27a; font-weight: 700; }
.consult-waiting { display: inline-block; margin: -6px 0 12px; padding: 2px 8px; border: 1px solid #f0dca8; background: #fff6e0; color: #7a5a12; font-size: 12px; font-weight: 700; border-radius: 3px; }
.consult-waiting.old { border-color: #eccbbe; background: #fbe9df; color: #9b3a28; }
