/* The Office: a room you click around in. */
.of-wrap { --of-face: var(--vf-face, 'Courier Prime', 'Courier New', monospace); background: radial-gradient(ellipse at 50% 0%, #1B2D47 0%, #0F1B2D 60%); color: #FAF8F4; padding: 10px 16px 30px; }
.of-hud { max-width: 1280px; margin: 0 auto 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 700 13px/1.2 var(--of-face); letter-spacing: .16em; color: #C9D2DD; }
.of-hud-who { color: #F2B33D; }
.of-hud-btns { display: flex; gap: 8px; }
.of-hud-btn { font: 700 12px/1 var(--of-face); letter-spacing: .1em; text-transform: uppercase; color: #FAF8F4; background: rgba(250,248,244,.06); border: 1px solid rgba(250,248,244,.3); border-radius: 6px; padding: 0 12px; min-height: 36px; display: inline-flex; align-items: center; cursor: pointer; text-decoration: none; }
.of-hud-btn:hover { background: rgba(250,248,244,.14); }

.of-stage { position: relative; max-width: 1280px; margin: 0 auto; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(250,248,244,.08); background: #0B1424; }
.of-world { position: relative; width: 100%; height: 100%; }
.of-svg { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; }
.of-svg text { font-family: var(--of-face); }

/* Hotspots: invisible until you point at them */
.of-hot { fill: rgba(242,179,61,0); stroke: rgba(242,179,61,0); stroke-width: 4; cursor: pointer; transition: fill .2s, stroke .2s; outline: none; }
.of-hot:hover, .of-hot:focus-visible, .of-hot.is-sel { fill: rgba(242,179,61,.10); stroke: rgba(242,179,61,.9); stroke-dasharray: 10 8; }
.of-marker { pointer-events: none; animation: of-bob 1s ease-in-out infinite; }
@keyframes of-bob { 50% { translate: 0 -10px; } }
.of-ring { animation: of-ring 1.4s ease-in-out infinite; transform-origin: 1026px 548px; transform-box: view-box; }
@keyframes of-ring { 0%, 60%, 100% { rotate: 0deg; } 70% { rotate: -14deg; } 80% { rotate: 12deg; } 90% { rotate: -8deg; } }
.of-ladder { transition: transform 1.1s cubic-bezier(.4,.1,.3,1); }
.of-drawer-top { transition: transform .5s ease; transform-box: fill-box; transform-origin: center; }
.of-cab-open .of-drawer-top { transform: translateY(14px) scale(1.06); }
.of-padlock { transform-box: fill-box; transform-origin: 50% 0; }
.of-shake { animation: of-shake .5s ease; }
@keyframes of-shake { 20% { rotate: -10deg; } 40% { rotate: 9deg; } 60% { rotate: -6deg; } 80% { rotate: 3deg; } }

/* The hidden bookshelf door */
.of-entry { position: absolute; inset: 0; z-index: 5; perspective: 1600px; perspective-origin: 50% 50%; transition: transform 1.1s cubic-bezier(.5,0,.3,1), opacity .8s ease .5s; transform-origin: 50% 52%; }
.of-entry[hidden] { display: none; }
.of-entry-part { position: absolute; top: 0; height: 100%; display: block; }
.of-entry-l { left: 0; width: 37.5%; }
.of-entry-r { right: 0; width: 37.5%; }
.of-entry-door { position: absolute; top: 0; left: 37.5%; width: 25%; height: 100%; transform-origin: 0 50%; transition: transform 1.3s cubic-bezier(.6,0,.3,1); box-shadow: 0 0 0 rgba(0,0,0,0); }
.of-entry-door .of-entry-part { left: 0; width: 100%; }
.of-entry.is-open .of-entry-door { transform: rotateY(-78deg); box-shadow: 30px 0 60px rgba(0,0,0,.6); }
.of-entry.is-through { transform: scale(2.6); opacity: 0; }
.of-redbook { cursor: pointer; transform-box: fill-box; transform-origin: 50% 100%; animation: of-glow 1.6s ease-in-out infinite; outline: none; }
.of-redbook:hover, .of-redbook:focus-visible { filter: drop-shadow(0 0 10px #F2B33D) brightness(1.2); }
.of-redbook.is-pulled { animation: none; transform: rotate(-18deg) translateY(-6px); transition: transform .45s ease; }
@keyframes of-glow { 50% { filter: drop-shadow(0 0 12px rgba(242,179,61,.95)) brightness(1.15); } }
.of-entry-ui { position: absolute; left: 0; right: 0; bottom: 5%; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.of-entry-hint { margin: 0; font: 700 clamp(16px, 2.2vw, 24px)/1.2 var(--of-face); letter-spacing: .14em; text-transform: uppercase; color: #F2B33D; text-shadow: 0 2px 10px rgba(0,0,0,.8); animation: of-blink 1.6s ease-in-out infinite; }
@keyframes of-blink { 50% { opacity: .55; } }
.of-skip { pointer-events: auto; font: 600 12px/1 var(--of-face); letter-spacing: .1em; text-transform: uppercase; color: #C9D2DD; background: rgba(15,27,45,.7); border: 1px solid rgba(250,248,244,.3); border-radius: 6px; min-height: 36px; padding: 0 14px; cursor: pointer; }
.of-entry.is-open .of-entry-ui { opacity: 0; transition: opacity .3s; }

/* The talk box, like an old game */
.of-box { position: relative; max-width: 1280px; margin: 14px auto 0; background: #0B1424; border: 3px solid #F2B33D; outline: 2px solid #0B1424; outline-offset: -8px; box-shadow: inset 0 0 0 6px #0B1424, inset 0 0 0 7px rgba(242,179,61,.45); border-radius: 8px; padding: 22px 24px 18px; min-height: 132px; }
.of-box-who { position: absolute; top: -15px; left: 18px; background: #F2B33D; color: #0F1B2D; font: 700 12px/1 var(--of-face); letter-spacing: .18em; padding: 7px 12px; border-radius: 4px; }
.of-box-text { margin: 4px 0 14px; font: 400 clamp(16px, 1.9vw, 19px)/1.55 var(--of-face); color: #FAF8F4; min-height: 2.6em; }
.of-box-text.is-typing::after { content: '▌'; color: #F2B33D; animation: of-blink .8s steps(1) infinite; }
.of-box-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.of-box-acts .btn { min-height: 44px; }
.of-box-acts .of-ghost { background: transparent; color: #FAF8F4; border: 1.5px solid rgba(250,248,244,.5); }
.of-box-acts .of-ghost:hover { background: rgba(250,248,244,.1); }
.of-box-next { margin-left: auto; font: 700 14px/1 var(--of-face); letter-spacing: .14em; text-transform: uppercase; color: #0F1B2D; background: #F2B33D; border: 0; border-radius: 6px; padding: 0 16px !important; cursor: pointer; min-height: 44px; padding: 0 6px; }

/* The toolbar of everything in the room */
.of-inv { max-width: 1280px; margin: 12px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.of-inv-btn { font: 700 12.5px/1 var(--of-face); letter-spacing: .06em; color: #FAF8F4; background: rgba(250,248,244,.06); border: 1px solid rgba(250,248,244,.22); border-radius: 999px; min-height: 40px; padding: 0 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.of-inv-btn:hover, .of-inv-btn.is-sel { background: rgba(242,179,61,.16); border-color: #F2B33D; }
.of-inv-lock { color: #B8461F; font-size: 10px; }

/* Members: the Valley Files drawer */
.of-drawer { max-width: 900px; width: calc(100% - 32px); border: 0; padding: 24px; background: #6B756E; box-shadow: 0 40px 90px rgba(0,0,0,.6), inset 0 0 0 8px #59625C; border-radius: 6px; color: #1E1B16; font-family: var(--of-face); }
.of-drawer::backdrop { background: rgba(11,20,36,.75); }
.of-drawer .vf-slip-hd { color: #F1E9D6; border-color: rgba(241,233,214,.5); }
.of-drawer .vf-cabinet { background: #2A221A; padding: 30px 18px 18px; border-radius: 4px; box-shadow: inset 0 10px 24px rgba(0,0,0,.6); }
.of-drawer-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.of-empty { color: #F1E9D6; }
.of-drawer .btn-ghost-ink { background: transparent; border: 1.5px solid #F1E9D6; color: #F1E9D6; }
.of-nos { max-width: 1280px; margin: 12px auto 0; }
.of-nos a { color: #F2B33D; }

/* Phones: the room keeps its shape and you pan across it */
@media (max-width: 760px) {
  .of-wrap { padding: 8px 0 24px; }
  .of-hud { padding: 0 16px; font-size: 11px; }
  .of-stage { aspect-ratio: auto; height: min(64vh, 520px); min-height: 360px; border-radius: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .of-stage::-webkit-scrollbar { display: none; }
  .of-world { width: auto; height: 100%; aspect-ratio: 16 / 9; }
  .of-box { margin: 18px 16px 0; padding: 20px 16px 14px; }
  .of-inv { padding: 0 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .of-inv::-webkit-scrollbar { display: none; }
  .of-inv-btn { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .of-ladder, .of-entry, .of-entry-door, .of-drawer-top { transition: none; }
  .of-marker, .of-ring, .of-redbook, .of-entry-hint { animation: none; }
}

/* ---------- The 3D library ---------- */
.of3-stage { position: relative; aspect-ratio: 16 / 9; max-height: calc(100vh - 180px); min-height: 420px; width: 100%; overflow: hidden; touch-action: none; }
.of3-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; outline: none; }
.of3-canvas:active { cursor: grabbing; }
.of3-ui { position: absolute; inset: 0; pointer-events: none; }
.of3-tip { position: absolute; padding: 6px 10px; background: rgba(11,20,36,.86); border: 1px solid rgba(242,179,61,.7); color: #FAF8F4; font: 700 12px/1.2 var(--of-face); letter-spacing: .08em; text-transform: uppercase; border-radius: 4px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.of3-help { position: absolute; left: 16px; bottom: 14px; padding: 7px 12px; background: rgba(11,20,36,.7); color: #C9D2DD; font: 600 12px/1.3 var(--of-face); letter-spacing: .04em; border-radius: 6px; transition: opacity .6s; }
.of3-help.is-done { opacity: 0; }
.of3-entry { position: absolute; left: 0; right: 0; bottom: 7%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.of3-entry-hint { margin: 0; font: 700 clamp(16px, 2.2vw, 24px)/1.2 var(--of-face); letter-spacing: .14em; text-transform: uppercase; color: #F2B33D; text-shadow: 0 2px 10px rgba(0,0,0,.9); animation: of-blink 1.6s ease-in-out infinite; }
.of3-entry .of-skip { pointer-events: auto; }
.of3-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #05080f; color: #C9D2DD; font: 700 13px/1 var(--of-face); letter-spacing: .2em; text-transform: uppercase; transition: opacity .6s; }
.of3-loading.is-done { opacity: 0; }
/* an open book, read right in the room */
.of3-book { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: auto; background: rgba(5,8,15,.35); opacity: 0; transition: opacity .35s; }
.of3-book.is-open { opacity: 1; }
.of3-book-in { display: grid; grid-template-columns: 1fr 1fr; width: min(820px, 92%); min-height: 300px; background: #0F1B2D; padding: 14px; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.6); transform: perspective(1200px) rotateX(8deg) scale(.92); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.of3-book.is-open .of3-book-in { transform: perspective(1200px) rotateX(0) scale(1); }
.of3-book-in.is-red { background: #8a2e14; }
.of3-page { background: #F1E9D6; color: #1E1B16; padding: 26px 26px 22px; font-family: var(--of-face); }
.of3-left { border-radius: 3px 0 0 3px; box-shadow: inset -18px 0 24px -14px rgba(0,0,0,.35); }
.of3-right { border-radius: 0 3px 3px 0; box-shadow: inset 18px 0 24px -14px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.of3-ed { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #B8461F; margin: 0 0 12px; }
.of3-page h3 { font-family: var(--of-face); font-size: clamp(19px, 2.2vw, 26px); line-height: 1.25; margin: 0 0 12px; color: #1E1B16; }
.of3-by { font-size: 14px; margin: 0; opacity: .75; }
.of3-right p { font-size: 15px; line-height: 1.6; margin: 0 0 16px; flex: 1; }
.of3-book-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.of3-book-acts .of-ghost { color: #1E1B16; border-color: rgba(30,27,22,.5); }
@media (max-width: 760px) {
  .of3-stage { aspect-ratio: auto; height: min(68vh, 560px); max-height: none; }
  .of3-book-in { grid-template-columns: 1fr; }
  .of3-left { border-radius: 3px 3px 0 0; }
  .of3-right { border-radius: 0 0 3px 3px; }
}
.of3-ui [hidden], .of3-book[hidden] { display: none !important; }
.of3-loading > div { display: grid; gap: 14px; justify-items: center; }
.of3-bar { width: 220px; height: 3px; background: rgba(250,248,244,.15); border-radius: 3px; overflow: hidden; }
.of3-bar i { display: block; height: 100%; width: 0; background: #F2B33D; transition: width .3s; }
/* the Library: labels over things you can open, and the how-it-works steps */
.of3-labels { position: absolute; inset: 0; pointer-events: none; transition: opacity .3s; }
.of3-pin { position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; padding: 6px 10px; border: 1px solid rgba(242,179,61,.75); border-radius: 999px; background: rgba(11,20,36,.78); color: #FAF8F4; font: 700 11.5px/1 var(--of-face); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.of3-pin::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 9px; height: 9px; background: inherit; border-right: 1px solid rgba(242,179,61,.75); border-bottom: 1px solid rgba(242,179,61,.75); transform: translateX(-50%) rotate(45deg); }
.of3-pin:hover, .of3-pin:focus-visible { background: #F2B33D; color: #0F1B2D; outline: none; }
.of3-pin.is-locked::before { content: '\1F512\FE0E'; margin-right: 6px; font-size: 10px; }
.of3-coach { position: absolute; right: 18px; top: 18px; width: min(340px, calc(100% - 36px)); pointer-events: auto; padding: 18px 18px 14px; border-radius: 10px; background: rgba(11,20,36,.94); border: 2px solid #F2B33D; color: #FAF8F4; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.of3-coach-step { margin: 0 0 6px; font: 700 11px/1 var(--of-face); letter-spacing: .14em; text-transform: uppercase; color: #F2B33D; }
.of3-coach h3 { margin: 0 0 6px; font: 700 20px/1.2 var(--of-face); color: #FAF8F4; }
.of3-coach p:not(.of3-coach-step) { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: #E7E2D6; }
.of3-coach-acts { display: flex; justify-content: flex-end; gap: 8px; }
.of3-coach-acts .of-ghost { background: transparent; color: #FAF8F4; border: 1.5px solid rgba(250,248,244,.5); }
.of-hud-btn[aria-pressed="false"] { opacity: .55; }
@media (max-width: 760px) { .of3-coach { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; } .of3-pin { font-size: 10.5px; padding: 5px 8px; } }
.of3-entry-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; pointer-events: auto; }
.of3-entry-btns .btn { pointer-events: auto; }
