@font-face { font-family: Fredoka; src: url(/f/fredoka-hebrew.woff2) format('woff2'); font-weight: 300 700; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; font-display: swap; }
@font-face { font-family: Fredoka; src: url(/f/fredoka-latin.woff2) format('woff2'); font-weight: 300 700; unicode-range: U+0000-00FF, U+2000-206F, U+2122; font-display: swap; }
@font-face { font-family: Assistant; src: url(/f/assistant-hebrew.woff2) format('woff2'); font-weight: 200 800; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; font-display: swap; }
@font-face { font-family: Assistant; src: url(/f/assistant-latin.woff2) format('woff2'); font-weight: 200 800; unicode-range: U+0000-00FF, U+2000-206F, U+2122; font-display: swap; }

:root {
  --wall: #16213d; --wall-deep: #101930; --panel: #1f2d51; --panel-2: #2a3b66; --line: #3a4d7d;
  --velvet: #e3a72f; --velvet-dark: #b67d16; --velvet-deep: #8d5f0d; --ink: #f5f2ea; --dim: #adbad6; --teal: #5cc8b8; --coral: #f08a7a; --on-velvet: #2a1b02;
  color-scheme: dark; scrollbar-color: var(--line) transparent; scrollbar-width: thin;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: var(--wall); color: var(--ink); font: 400 16px/1.45 Assistant, 'Segoe UI', sans-serif; overflow: hidden; }
#root { height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
h1, h2, h3, .brand { font-family: Fredoka, Assistant, sans-serif; font-weight: 600; line-height: 1.2; }
.ic { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.ic.solid { fill: currentColor; stroke: none; }
input[type=text], textarea, select { background: var(--wall-deep); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; min-width: 0; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--dim); opacity: 1; }
input[type=range] { accent-color: var(--velvet); width: 100%; height: 22px; background: none; }
.main { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--velvet); color: var(--on-velvet); font-weight: 700; padding: 9px 18px; border-radius: 10px; white-space: nowrap; }
.main:hover { background: #f0b945; }
.soft { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--panel-2); padding: 8px 14px; border-radius: 10px; white-space: nowrap; }
.soft:hover { background: var(--line); }
.danger { color: #ffb3a8; }
.icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none; }
.icon:hover { background: var(--panel-2); }
.icon.on { background: var(--teal); color: #0b2a26; }
.icon:has(span) { display: inline-flex; width: auto; gap: 7px; padding: 0 11px; align-items: center; }
.dim { color: var(--dim); }
.small { font-size: 14px; }

/* door and lobby */
.hall { height: 100%; overflow: auto; display: grid; place-items: center; padding: 24px 16px 0; grid-template-rows: 1fr auto; }
.hall-in { width: min(440px, 100%); display: grid; gap: 18px; padding-block: 24px; }
.hall-in.wide { width: min(620px, 100%); }
.brand { font-size: 60px; letter-spacing: -1px; }
.hall p { max-width: 46ch; }
.row { display: flex; gap: 10px; align-items: center; }
.row > input { flex: 1; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { width: 42px; height: 42px; border-radius: 50%; border: 3px solid transparent; }
.pick[aria-pressed=true] { border-color: var(--ink); }
.hat { padding: 6px 12px; border-radius: 10px; background: var(--panel); border: 2px solid transparent; font-size: 15px; }
.hat[aria-pressed=true] { border-color: var(--velvet); }
.hall-sofa { width: min(560px, 100%); }
.roomcard { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel); border-radius: 12px; }
.roomcard > div { flex: 1; min-width: 0; }
.roomcard b { display: block; font-family: Fredoka; font-weight: 500; font-size: 19px; }
.cut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* room */
.room { height: 100%; display: grid; grid-template: auto minmax(0, 1fr) / minmax(0, 1fr) 350px; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
.top .brand { font-size: 27px; color: var(--velvet); }
.top .brand:hover { color: #f0b945; }
.viewer .bar [title='ציור על המסך'], .viewer .bar [title='סימון הרגע הזה'], .viewer .bar [title='ספירה לאחור והתחלה יחד'] { display: none; }
.top .rname { font-family: Fredoka; font-size: 18px; max-width: 18ch; }
.add { flex: 1; display: flex; gap: 8px; max-width: 760px; margin-inline: auto; position: relative; }
.add input { border-radius: 12px; padding: 10px 15px; background: var(--wall-deep); }
.add.busy input { background-image: linear-gradient(90deg, transparent, #e3a72f44, transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: slide 1.1s linear infinite; }
@keyframes slide { from { background-position: -100% 0; } to { background-position: 200% 0; } }
.left { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding-inline-start: 16px; padding-inline-end: 14px; }
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #000; border-radius: 14px; overflow: hidden; position: relative; }
.screen { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.screen video, .screen iframe, .screen .share { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.screen .share { z-index: 3; }
.empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px; background: var(--wall-deep); padding: 20px; z-index: 2; }
.empty h2 { font-size: clamp(22px, 3vw, 34px); }
.empty .row { flex-wrap: wrap; justify-content: center; }
.spin { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--panel-2); border-top-color: var(--velvet); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.cap { position: absolute; inset-inline: 5%; bottom: 5%; text-align: center; z-index: 5; pointer-events: none; font-size: calc(var(--cs, 1) * clamp(16px, 2.6vw, 40px)); line-height: 1.35; font-weight: 600; white-space: pre-line; unicode-bidi: plaintext; }
.cap span { background: #000a; padding: 2px 10px; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.fx { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx.drawing { pointer-events: auto; cursor: crosshair; touch-action: none; }
.fly { position: absolute; bottom: -50px; font-size: 42px; animation: fly 3.2s ease-out forwards; text-align: center; }
.fly small { display: block; font-size: 13px; background: #000a; border-radius: 8px; padding: 0 7px; }
@keyframes fly { 15% { opacity: 1; } to { transform: translateY(-75vh) translateX(var(--dx)); opacity: 0; } }
.comet { position: absolute; left: 0; white-space: nowrap; font-size: 23px; font-weight: 700; text-shadow: 0 0 4px #000, 0 1px 2px #000; animation: comet 9s linear forwards; }
@keyframes comet { from { transform: translateX(-100%); } to { transform: translateX(100vw); } }
.count { position: absolute; inset: 0; display: grid; place-items: center; font: 600 clamp(90px, 20vw, 220px) Fredoka; text-shadow: 0 6px 30px #000; animation: pop .9s ease-out; }
@keyframes pop { from { transform: scale(1.7); opacity: 0; } 25% { transform: none; opacity: 1; } }
.waitbar { position: absolute; top: 12px; inset-inline: 0; margin: auto; width: fit-content; background: #000b; padding: 6px 16px; border-radius: 10px; z-index: 7; }
.bar { display: flex; align-items: center; gap: 2px; padding: 5px 8px; background: var(--wall-deep); position: relative; z-index: 8; direction: ltr; }
.bar .time { font-variant-numeric: tabular-nums; padding-inline: 8px; white-space: nowrap; font-size: 15px; }
.seek { position: relative; flex: 1; min-width: 50px; display: flex; }
.seek i { position: absolute; top: 3px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--teal); pointer-events: none; }
.bar .vol { width: 84px; }
.bar select { width: auto; padding: 5px 8px; font-size: 14px; max-width: 120px; }
.stage:fullscreen { border-radius: 0; }
.stage:fullscreen .bar { position: absolute; inset-inline: 0; bottom: 0; background: #0b1226dd; transition: opacity .25s; }
.stage:fullscreen.idle .bar { opacity: 0; }
.stage:fullscreen.idle { cursor: none; }
.stage:fullscreen .cap { bottom: 9%; }

/* the sofa */
.sofa { position: relative; display: flex; align-items: flex-end; margin: 10px 0 0; flex: none; height: 134px; isolation: isolate; }
.sofa::before { content: ''; position: absolute; z-index: 1; inset: 64px 12px 0; background: linear-gradient(#eeb743, var(--velvet) 16px, var(--velvet) 60%, var(--velvet-dark)); border-radius: 22px 22px 0 0; }
.seats { flex: 1; display: flex; justify-content: safe center; overflow-x: auto; overflow-y: hidden; height: 134px; scrollbar-width: none; min-width: 0; }
.seat { width: 112px; flex: 0 1 112px; min-width: 84px; height: 134px; text-align: center; position: relative; padding: 0; color: var(--on-velvet); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.seat + .seat::after { content: ''; position: absolute; z-index: 2; inset-block: 72px 0; inset-inline-start: 0; border-inline-start: 2px solid var(--velvet-dark); }
.seat .head { width: 70px; height: 74px; position: relative; z-index: 0; flex: none; margin-top: 0; transition: transform .15s; }
.seat.talk .head { filter: drop-shadow(0 0 5px var(--teal)) drop-shadow(0 0 9px var(--teal)); animation: bob .42s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-5px) rotate(2deg); } }
.seat.new .head { animation: sit .5s cubic-bezier(.2, 1.4, .5, 1); }
@keyframes sit { from { transform: translateY(70px); } }
.seat canvas, .seat video { position: relative; z-index: 2; width: 94px; height: 71px; object-fit: cover; border-radius: 12px; margin-top: 4px; border: 3px solid var(--velvet-dark); background: #000; }
.seat.talk canvas, .seat.talk video { border-color: var(--teal); }
.seat .who { position: absolute; z-index: 3; inset-inline: 5px; top: 84px; font-weight: 700; line-height: 1.2; }
.seat .tags { position: absolute; z-index: 3; inset-inline: 0; top: 105px; display: flex; justify-content: center; gap: 4px; font-size: 13px; align-items: center; }
.seat .tags .ic { width: 16px; height: 16px; }
.arm { position: relative; z-index: 3; display: flex; gap: 4px; align-items: center; align-content: center; justify-content: center; background: linear-gradient(#e9b03a, var(--velvet-dark)); height: 94px; padding: 0 12px; border-radius: 26px 26px 0 0; color: var(--on-velvet); box-shadow: 0 -2px 0 #f5c860 inset, 0 0 0 2px var(--velvet-deep); flex: none; }
.arm .icon { width: 46px; height: 46px; background: #00000024; border-radius: 14px; }
.arm .icon:hover { background: #00000040; }
.arm .icon.on { background: #16423c; color: #c9fff6; }
.arm .icon.off { background: #6e2219; color: #ffe3de; }

/* side */
.side { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-radius: 0 14px 0 0; margin-inline-end: 0; }
.tabs { display: flex; padding: 8px 8px 0; gap: 4px; }
.tabs button { flex: 1; padding: 9px 4px; border-radius: 10px; font-family: Fredoka; font-weight: 500; font-size: 17px; color: var(--dim); position: relative; }
.tabs button[aria-selected=true] { background: var(--panel-2); color: var(--ink); }
.tabs .dot::after { content: ''; position: absolute; top: 8px; inset-inline-end: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.msg { line-height: 1.4; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.msg b { margin-inline-end: 7px; }
.msg.sys { color: var(--dim); font-size: 14.5px; }
.msg button { color: var(--teal); text-decoration: underline; padding: 0; }
.msg a { color: var(--teal); }
.typing { height: 22px; padding: 0 14px; font-size: 14px; color: var(--dim); }
.emo { display: flex; justify-content: space-between; padding: 2px 10px; }
.emo button { font-size: 23px; padding: 3px; border-radius: 9px; line-height: 1.2; }
.emo button:hover { background: var(--panel-2); }
.emo button:active { transform: scale(1.35); }
.say { display: flex; gap: 8px; padding: 8px 12px 12px; }
.qi { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: 12px; background: var(--wall); }
.qi .th { width: 88px; height: 50px; border-radius: 8px; object-fit: cover; background: var(--panel-2); display: grid; place-items: center; padding: 0; overflow: hidden; }
.qi .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qi b { font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.qi .acts { grid-column: 1 / -1; display: flex; align-items: center; gap: 2px; }
.qi .acts .icon { height: 32px; width: 34px; } .qi .acts .icon:has(span) { width: auto; }
.qi .acts .dim { flex: 1; min-width: 0; }
.note { text-align: center; color: var(--dim); padding: 24px 12px; }
.sec { display: grid; gap: 9px; padding-bottom: 14px; }
.sec h3 { font-weight: 500; font-size: 17px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grid4 .soft { padding: 9px 3px; font-size: 14px; }
.opt { position: relative; background: var(--wall); border-radius: 10px; padding: 9px 12px; display: flex; justify-content: space-between; width: 100%; overflow: hidden; text-align: start; }
.opt i { position: absolute; inset-block: 0; inset-inline-start: 0; background: #5cc8b840; }
.opt span { position: relative; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; cursor: pointer; }
.toggle small { display: block; color: var(--dim); }
.toggle input { width: 22px; height: 22px; accent-color: var(--velvet); flex: none; }

.sheet { margin: auto; width: min(500px, calc(100vw - 28px)); max-height: 88dvh; border: 0; border-radius: 18px; background: var(--panel); color: var(--ink); padding: 0; overflow: auto; }
.sheet::backdrop { background: #0a1124cc; }
.sheet-in { padding: 18px 20px 22px; display: grid; gap: 12px; }
.sheet header { display: flex; justify-content: space-between; align-items: center; }
.sheet h2 { font-size: 23px; }
.found { display: grid; gap: 8px; }
.found .qi { grid-template-columns: 130px minmax(0, 1fr); text-align: start; align-items: center; width: 100%; }
.found .qi .th { width: 130px; height: 73px; } .found .qi:hover { background: var(--panel-2); }
.knock { position: fixed; z-index: 30; top: 66px; inset-inline: 0; margin: auto; width: fit-content; max-width: 94vw; background: var(--panel-2); border: 2px solid var(--velvet); border-radius: 14px; padding: 10px 14px; display: grid; gap: 8px; }
#toasts { position: fixed; z-index: 50; bottom: 150px; inset-inline-start: 20px; display: grid; gap: 8px; max-width: min(400px, calc(100vw - 40px)); pointer-events: none; }
.toast { background: var(--panel-2); border-inline-start: 5px solid var(--velvet); padding: 10px 15px; border-radius: 10px; transition: opacity .4s; box-shadow: 0 6px 22px #0007; }
.toast.good { border-color: var(--teal); } .toast.bad { border-color: var(--coral); } .toast.bye { opacity: 0; }
.drop::after { content: 'שחררו כאן כדי להוסיף לתור'; position: fixed; inset: 12px; z-index: 60; display: grid; place-items: center; border: 4px dashed var(--velvet); border-radius: 20px; background: #101930e6; font: 600 32px Fredoka; pointer-events: none; }

@media (max-width: 900px) {
  .room { grid-template: auto auto minmax(0, 1fr) / 100%; }
  .top { flex-wrap: wrap; padding: 8px 10px; gap: 6px; } .top .brand { font-size: 23px; } .top .brand:hover { color: #f0b945; }
.viewer .bar [title='ציור על המסך'], .viewer .bar [title='סימון הרגע הזה'], .viewer .bar [title='ספירה לאחור והתחלה יחד'] { display: none; }
.top .rname { flex: 1; } .add { order: 5; flex-basis: 100%; } .top .soft span, .top .main span { display: none; } .top .soft { padding: 8px 10px; }
  .left { padding: 0; } .stage { border-radius: 0; flex: none; } .screen { aspect-ratio: 16 / 9; flex: none; }
  .stage:fullscreen .screen { flex: 1; aspect-ratio: auto; }
  .bar .vol, .bar .wide { display: none; } .bar .icon { width: 36px; } .bar { overflow-x: auto; }
  .sofa { height: 104px; margin-top: 4px; } .sofa::before { inset: 48px 6px 0; } .seats, .seat { height: 104px; } .seat { flex-basis: 78px; min-width: 70px; font-size: 14px; }
  .seat .head { width: 52px; height: 55px; } .seat canvas, .seat video { width: 68px; height: 52px; } .seat .who { top: 62px; } .seat .tags { top: 80px; } .seat + .seat::after { inset-block: 48px 0; }
  .arm { height: 74px; padding: 0 6px; flex-wrap: wrap; width: 54px; gap: 2px; border-radius: 18px 18px 0 0; } .arm .icon { width: 34px; height: 33px; border-radius: 9px; }
  .side { border-radius: 0; } .tabs button { padding: 6px; } #toasts { bottom: 70px; }
  input, textarea, select { font-size: 16px; }
}
@media (max-height: 640px) and (min-width: 901px) { .sofa { height: 96px; overflow: hidden; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation-duration: .01s !important; transition: none !important; } .fly, .comet { animation-duration: 3s !important; } .spin { animation-duration: 2s !important; } }
