/* ═════════════════════════════ THE BREAK ROOM (floor 4) ═════════════════════════════
   The shared fb-* frame lives in workshop.css. Room: 1200 × 600 (phones: 400 × 900). */

.floor-breakroom {
  --fb-wall: #262245;
  background:
    radial-gradient(40% 50% at 86% 58%, rgba(255, 200, 110, .16), transparent 70%),
    radial-gradient(45% 40% at 18% 80%, rgba(124, 92, 255, .14), transparent 70%),
    linear-gradient(180deg, #1D1B38, #272347 60%, #2B2442);
}
.br-back {
  background:
    linear-gradient(180deg, transparent 0 calc(100% - 360px), rgba(20, 14, 36, .5) calc(100% - 360px), rgba(20, 14, 36, .5) calc(100% - 352px), rgba(58, 40, 70, .45) calc(100% - 352px)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 36px, transparent 36px 72px);
}
.br-lights { top: 140px; left: 0; width: 100%; height: 50px; }
.br-bulbs { position: absolute; top: 140px; left: 0; right: 0; height: 60px; display: flex; justify-content: space-around; padding: 0 2%; }
.br-bulbs i {
  display: block; width: 10px; height: 14px; border-radius: 50% 50% 45% 45%; margin-top: calc(22px + sin(var(--i) * 1.57rad) * 12px);
  background: hsl(calc(var(--i) * 57deg) 95% 70%); border: 2px solid var(--outline);
  box-shadow: 0 0 10px 2px hsl(calc(var(--i) * 57deg) 95% 60% / .7);
  animation: br-twinkle 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.37s);
}
@keyframes br-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
html.fb-dark .br-bulbs i { opacity: .15; animation: none; box-shadow: none; }
.br-window { width: 170px; left: calc((100% - 1200px) / 2 - 190px); top: calc(140px + 18%); }
@media (max-width: 1599px) { .br-window { display: none; } }
.br-shelf { width: clamp(130px, 11vw, 190px); left: 1.5%; top: calc(140px + 58%); }
@media (max-width: 760px) { .br-shelf { display: none; } }

.br-front .br-plant { left: -34px; bottom: 90px; width: clamp(110px, 12vw, 190px); }
@media (max-width: 1300px) { .br-front .br-plant { left: -70px; } }
@media (max-width: 760px) { .br-front .br-plant { display: none; } }

.br-ground {
  background:
    linear-gradient(180deg, #4A4574 0 5px, transparent 5px),
    repeating-conic-gradient(#3B3868 0 25%, #302D57 0 50%) 0 5px / 64px 64px;
}

/* header: keep the right-hand column clear for the lamp cord */
@media (min-width: 1000px) {
  .floor-breakroom .fb-head { grid-template-columns: auto minmax(260px, 400px) 1fr; }
  .floor-breakroom .fb-head-side { justify-self: start; }
}
@media (max-width: 760px) { .floor-breakroom .fb-head { padding-right: 58px; } }

/* positions: desktop room 1200 × 600 */
.br-board    { --x: 350;  --y: 34;  --w: 440; aspect-ratio: 440 / 280; }
.br-crew-a   { --x: 432;  --y: 224; --w: 150; }
.br-crew-b   { --x: 606;  --y: 224; --w: 150; }
.br-portrait { --x: 244; --y: 84;  --w: 84; z-index: 1; transform: rotate(3deg); }
.br-doodle-pivot { --x: 130; --y: 150; --w: 100; }
.br-doodle-heart { --x: 846; --y: 50;  --w: 100; }
.br-couch    { --x: 16;   --y: 356; --w: 320; }
.br-fridge   { --x: 816;  --y: 176; --w: 160; }
.br-counter  { --x: 972;  --y: 390; --w: 216; }
.br-coffee   { --x: 982;  --y: 228; --w: 136; z-index: 3; }
.br-lamp     { --x: 1040; --y: 2;   --w: 110; z-index: 5; pointer-events: none; }
.br-chain-wrap { --x: 1114; --y: 70; --w: 40; z-index: 6; }

/* the whiteboard */
.br-board {
  border-radius: calc(10 * var(--u));
  background:
    radial-gradient(30% 20% at 70% 30%, rgba(47, 111, 219, .06), transparent 70%),
    radial-gradient(25% 18% at 22% 70%, rgba(226, 61, 46, .05), transparent 70%),
    linear-gradient(160deg, #FBFCFF, #EEF2F8 70%, #E3E8F1);
  border: calc(4 * var(--u)) solid var(--outline);
  box-shadow: inset 0 0 0 calc(8 * var(--u)) #B7B9CC, inset 0 0 0 calc(11 * var(--u)) var(--outline), 0 calc(8 * var(--u)) 0 rgba(0, 0, 0, .28);
}
.br-board > .br-board-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.br-board > .br-tray { position: absolute; left: 0; bottom: -6%; width: 100%; height: auto; }
.br-tiny {
  position: absolute; left: 3.6%; top: 86.5%; width: 16%; padding: 0; margin: 0; border: 0; background: none;
  font: 700 calc(3 * var(--u))/1.25 var(--font-body); color: #2F6FDB; text-align: left; cursor: zoom-in;
  font-size-adjust: none; -webkit-text-size-adjust: none; text-size-adjust: none;
}
.br-tiny:focus-visible { outline: 2px solid var(--molten); outline-offset: 3px; border-radius: 3px; }

/* the magnifier */
.br-lens {
  position: absolute; z-index: 20; left: var(--lx, 50%); top: var(--ly, 50%);
  --size: clamp(210px, calc(250 * var(--u)), 280px);
  width: var(--size); height: var(--size); transform: translate(-50%, -50%);
  border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 0 calc(var(--size) * .14);
  background: radial-gradient(circle at 35% 30%, #FFFFFF, #EEF2F8 70%, #DDE4EF);
  border: 10px solid var(--brass); box-shadow: 0 0 0 4px var(--outline), inset 0 0 0 3px var(--outline), inset 0 -10px 24px rgba(0, 0, 0, .12), 0 16px 30px rgba(0, 0, 0, .45);
  font: 600 1.12rem/1.22 var(--font-display); color: #2F6FDB;
  animation: br-lens-in .45s var(--spring) both;
}
.br-lens::before { /* the glint */ content: ''; position: absolute; left: 16%; top: 12%; width: 30%; height: 16%; border-radius: 50%; background: rgba(255, 255, 255, .8); transform: rotate(-30deg); filter: blur(2px); pointer-events: none; }
.br-lens::after { /* the handle */ content: ''; position: absolute; right: -24%; bottom: -24%; width: 36%; height: 12%; border-radius: 99px; background: linear-gradient(#8A5A3A, #5E3A26); border: 4px solid var(--outline); transform: rotate(45deg); transform-origin: 0 50%; z-index: -1; }
.br-lens p { margin: 0; transform: rotate(-4deg); }
.br-lens-x { position: absolute; top: 2%; right: 2%; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--outline); background: var(--cream); color: var(--outline); display: grid; place-items: center; cursor: pointer; }
.br-lens-x svg { width: 16px; height: 16px; }
@keyframes br-lens-in { from { transform: translate(-50%, -50%) scale(.2) rotate(-40deg); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* the crew */
.br-crew svg { transform-origin: 50% 100%; animation: br-breathe 3.8s ease-in-out infinite; }
.br-crew-b svg { animation-delay: -1.7s; }
@keyframes br-breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.012); } }
.br-arm, .br-head { transform-box: view-box; }
.br-arm-a-r { transform-origin: 106px 140px; animation: br-draw 1.3s ease-in-out infinite; }
@keyframes br-draw { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg) translateY(-2px); } 50% { transform: rotate(3deg); } 75% { transform: rotate(-2deg) translateY(2px); } }
.br-arm-a-l { transform-origin: 44px 142px; }
.br-head-a { transform-origin: 75px 110px; animation: br-tilt 5s ease-in-out infinite; }
@keyframes br-tilt { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-5deg); } 60% { transform: rotate(-4deg); } }
.br-arm-b-r { transform-origin: 108px 140px; animation: br-sip 7s ease-in-out infinite; }
@keyframes br-sip { 0%, 60%, 100% { transform: rotate(0); } 68%, 80% { transform: rotate(-58deg) translate(-6px, -4px); } }
.br-arm-b-l { transform-origin: 44px 140px; animation: br-point 4.2s ease-in-out infinite; }
@keyframes br-point { 0%, 30%, 100% { transform: rotate(18deg); } 38%, 52% { transform: rotate(-4deg); } 44% { transform: rotate(-10deg); } }
.br-head-b { transform-origin: 75px 110px; animation: br-nod 4.2s ease-in-out infinite; }
@keyframes br-nod { 0%, 30%, 100% { transform: rotate(0); } 40%, 50% { transform: rotate(6deg) translateY(1px); } }
.br-mugsteam { animation: ws-steam 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }

.br-crew { z-index: 3; }
.br-crew.is-hop svg { animation: br-crewhop .5s var(--spring); }
@keyframes br-crewhop { 0% { transform: none; } 35% { transform: translateY(-14px) scale(.97, 1.04); } 70% { transform: translateY(0) scale(1.03, .97); } 100% { transform: none; } }
.br-crew .fb-bubble { bottom: 96%; font-size: .92rem; }

/* couch */
.br-couch svg { transform-origin: 50% 100%; }
.br-couch:hover svg { transform: scale(1.02, .98); transition: transform .3s var(--spring); }
.br-cushion, .br-pillow { transform-box: view-box; }
.br-cushion { transform-origin: 160px 158px; }
.br-pillow { transform-origin: 96px 120px; }
.br-couch.is-flop .br-cushion { animation: br-squash .6s var(--spring); }
.br-couch.is-flop .br-pillow { animation: br-hop .7s var(--spring); }
@keyframes br-squash { 0% { transform: none; } 25% { transform: scale(1.06, .78); } 60% { transform: scale(.97, 1.06); } 100% { transform: none; } }
@keyframes br-hop { 0% { transform: none; } 30% { transform: translateY(-34px) rotate(-24deg); } 60% { transform: translateY(4px) rotate(6deg); } 100% { transform: none; } }

/* fridge */
.br-fridge-door, .br-magnets-top { transform-box: view-box; }
.br-fridge-door { transform-origin: 152px 237px; transition: transform .45s var(--spring); }
.br-fridge.is-open .br-fridge-door { transform: scaleX(.14) skewY(-4deg); transition-duration: .35s; }
.br-fridge-inside { opacity: .9; }
.br-fridge.is-open .br-fridge-inside { opacity: 1; }
.br-fridge:hover .br-magnets { animation: br-jiggle .4s ease-in-out; transform-box: view-box; transform-origin: 80px 190px; }
@keyframes br-jiggle { 25% { transform: rotate(-1.5deg); } 75% { transform: rotate(1.5deg); } }
.br-fridge::after { /* light spilling out */
  content: ''; position: absolute; left: -30%; right: -30%; top: 30%; bottom: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(50% 50% at 50% 55%, rgba(255, 240, 180, .45), transparent 70%); transition: opacity .3s;
}
.br-fridge.is-open::after { opacity: 1; }

/* counter + cups sign */
.br-counter .br-cups {
  position: absolute; left: 13%; top: 33%; width: 52%; height: 34%; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font: 600 calc(10.5 * var(--u))/1.1 var(--font-display); color: #E8F2EC; text-align: center; letter-spacing: .04em;
}
.br-cups b { font: 700 calc(21 * var(--u))/1 var(--font-display); color: var(--molten); }
.br-cups.is-bump b { animation: squash .45s var(--spring); display: inline-block; }

/* coffee machine */
.br-coffee svg { transform-origin: 50% 100%; }
.br-coffee:hover svg { transform: scale(1.03, .98); transition: transform .3s var(--spring); }
.br-coffee.is-brewing svg { animation: br-rumble .12s linear infinite; }
@keyframes br-rumble { 50% { transform: translateX(1px) rotate(.4deg); } }
.br-sp { opacity: 0; transform-box: fill-box; transform-origin: center; }
.br-coffee.is-brewing .br-sp { animation: ws-puff 1.3s ease-out infinite; }
.br-coffee.is-brewing .br-sp.s2 { animation-delay: -.43s; }
.br-coffee.is-brewing .br-sp.s3 { animation-delay: -.86s; }
.br-bubbles circle { opacity: 0; transform-box: fill-box; }
.br-coffee.is-brewing .br-bubbles circle { animation: br-bubble .7s ease-in infinite; }
.br-coffee.is-brewing .br-bubbles circle:nth-child(2) { animation-delay: -.2s; }
.br-coffee.is-brewing .br-bubbles circle:nth-child(3) { animation-delay: -.45s; }
.br-coffee.is-brewing .br-bubbles circle:nth-child(4) { animation-delay: -.3s; }
@keyframes br-bubble { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px); } }
.br-light { transition: fill .2s; }
.br-coffee.is-brewing .br-light { fill: #FFC23D; animation: ws-beacon .7s steps(1) infinite; }
.br-gauge { transform-box: view-box; transform-origin: 40px 70px; transform: rotate(-60deg); transition: transform .8s var(--spring); }
.br-coffee.is-brewing .br-gauge { transform: rotate(70deg); }
.br-stream { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); transition: transform .25s ease-in; }
.br-coffee.is-pour .br-stream { transform: scaleY(1); }
.br-fill { transform: translateY(28px); transition: transform 1.5s linear; }
.br-coffee.is-full .br-fill { transform: translateY(6px); }
.br-cupsteam { opacity: 0; transition: opacity .6s; }
.br-coffee.is-full .br-cupsteam { opacity: 1; }
.br-cupsteam path { animation: ws-steam 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }

/* lamp + chain */
.br-cone { transition: opacity .25s; }
.br-bulb { transition: fill .25s; }
html.fb-dark .br-cone { opacity: 0; }
html.fb-dark .br-bulb { fill: #6B6A73; }
.br-chain-wrap { display: flex; justify-content: center; }
.br-chain {
  display: block; width: 100%; transform-origin: 50% 0; animation: br-swing 3.4s ease-in-out infinite;
  touch-action: none; cursor: grab;
}
.br-chain svg { display: block; width: 100%; height: auto; overflow: visible; transform: translateY(var(--pull, 0px)); transition: transform .35s var(--spring); }
.br-chain.is-pulling svg { transition: none; }
.br-chain.is-pulling { cursor: grabbing; animation-play-state: paused; }
.br-chain:hover { animation-duration: 1.1s; }
@keyframes br-swing { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-3deg); } }
.br-chain:focus-visible { outline: 3px solid var(--molten); outline-offset: 2px; border-radius: 10px; }
html.fb-dark .br-chain .br-pull { fill: #FFE08A; }
html.fb-dark .br-chain svg { filter: drop-shadow(0 0 4px #FFC23D) drop-shadow(0 0 10px rgba(255, 194, 61, .7)); }
html.fb-dark .br-links { fill: #FFE7A0; }

/* ── the Break Room on phones and small tablets: room 400 × 820 ── */
@media (max-width: 1020px) {
  .br-room { --rh: 820; --gh: 70; }
  .br-board    { --x: 6;   --y: 8;   --w: 300; }
  .br-crew-a   { --x: 62;  --y: 150; --w: 116; }
  .br-crew-b   { --x: 188; --y: 150; --w: 116; }
  .br-lamp     { --x: 312; --y: 0;   --w: 84; }
  .br-chain-wrap { --x: 346; --y: 52; --w: 40; }
  .br-doodle-pivot { --x: 150; --y: 404; --w: 86; }
  .br-doodle-heart { --x: 296; --y: 404; --w: 80; }
  .br-fridge   { --x: 6;   --y: 480; --w: 118; }
  .br-counter  { --x: 244; --y: 638; --w: 154; }
  .br-coffee   { --x: 258; --y: 512; --w: 108; }
  .br-couch    { --x: 118; --y: 662; --w: 150; z-index: 4; }
  .br-portrait { display: none; }
}
