@font-face { font-family: "Bricolage"; font-weight: 400 800; font-display: swap;
             src: url(/fonts/bricolage.woff2) format("woff2"); }
@font-face { font-family: "Dot"; font-display: swap; src: url(/fonts/dotgothic16.woff2) format("woff2"); }

:root {
  --ink: #1f2a5a; --soft: #5a648f; --paper: #fffdf5; --bg: #f6f0e1; --dots: #e4dac2;
  --pink: #ff6fa0; --sky: #6fa8f0; --lime: #8bd39c; --sun: #ffd166; --grape: #b48cf2; --tang: #ff9f5a;
  --line: 2.5px solid var(--ink); --r: 16px;
  --lift: 4px 4px 0 var(--ink);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background: var(--bg) radial-gradient(var(--dots) 1.2px, transparent 1.6px) 0 0 / 22px 22px;
  font: 16px/1.5 "Bricolage", ui-rounded, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
::selection { background: var(--sun); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.px { font-family: "Dot", ui-monospace, monospace; font-weight: 400; letter-spacing: .02em; }
.muted { color: var(--soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* buttons + inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 16px; border: var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font: 700 15px/1 "Bricolage", system-ui, sans-serif; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform .08s, box-shadow .08s, background .15s;
}
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.pink { background: var(--pink); } .btn.sky { background: var(--sky); }
.btn.sun { background: var(--sun); } .btn.lime { background: var(--lime); }
.btn.ink { background: var(--ink); color: var(--paper); }
.btn.big { min-height: 64px; padding: 14px 30px; font-size: 21px; border-radius: 16px; box-shadow: 5px 5px 0 var(--ink); }
.btn.big:hover:not(:disabled) { box-shadow: 7px 7px 0 var(--ink); transform: translate(-2px, -2px) rotate(-1deg); }
.btn.icon { width: 42px; padding: 0; font-size: 18px; }
.btn[aria-pressed="true"] { background: var(--sun); }
.btn.flat { box-shadow: none; } .btn.flat:hover:not(:disabled) { box-shadow: 2px 2px 0 var(--ink); }
input[type="text"], input:not([type]) {
  min-width: 0; min-height: 42px; padding: 8px 14px; border: var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font: 500 15px "Bricolage", system-ui, sans-serif;
}
input::placeholder { color: #8d93ad; }
input:focus-visible { outline: 3px solid var(--pink); outline-offset: 1px; }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px 22px;
  padding: 12px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: var(--line); backdrop-filter: blur(6px);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 24px; line-height: 1; }
.logo svg { width: 34px; height: 34px; flex: none; transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.logo:hover svg { transform: rotate(-14deg) scale(1.1); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 6px 12px; border-radius: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; border: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-color: var(--ink); background: var(--sun); }
.top .here { margin-left: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: var(--line);
  border-radius: 999px; background: var(--paper); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.live { width: 10px; height: 10px; border-radius: 50%; background: #2fbf71; border: 2px solid var(--ink);
        animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { transform: scale(.7); opacity: .55; } }

/* home */
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.hero { padding: clamp(44px, 8vw, 88px) 0 clamp(28px, 5vw, 48px); text-align: center; }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; text-wrap: balance; }
.hero p { max-width: 620px; margin: 18px auto 0; font-size: clamp(17px, 2vw, 20px); color: var(--soft); text-wrap: pretty; }
.squig { white-space: nowrap; font-style: normal; color: var(--pink); text-shadow: .045em .045em 0 var(--ink); }
.hero .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.chip { padding: 4px 12px; border: 2px dashed var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 22px; padding-bottom: 48px; }
.tool {
  --c: var(--pink); --tilt: -1.2deg;
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 236px; padding: 22px;
  border: var(--line); border-radius: 22px; background: var(--paper); box-shadow: 5px 5px 0 var(--ink);
  text-decoration: none; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s;
}
.tool:nth-child(2n) { --tilt: 1.2deg; }
a.tool:hover, a.tool:focus-visible { transform: translate(-3px, -4px) rotate(var(--tilt)); box-shadow: 9px 9px 0 var(--ink); }
a.tool:hover .ico { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } }
.tool h2 { font-size: 23px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.tool p { color: var(--soft); font-size: 15.5px; }
.tool .go { margin-top: auto; display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; }
.tool .go b { display: inline-block; transition: transform .2s; }
a.tool:hover .go b { transform: translateX(5px); }
.ico { width: 68px; height: 68px; flex: none; display: grid; place-items: center; border: var(--line);
       border-radius: 18px; background: var(--c); box-shadow: 3px 3px 0 var(--ink); }
.ico svg { width: 46px; height: 46px; overflow: visible; }
.sticker { position: absolute; top: 16px; right: -10px; padding: 4px 10px; border: var(--line); border-radius: 10px;
           background: var(--sun); font: 800 13px/1 "Bricolage", sans-serif; transform: rotate(8deg);
           box-shadow: 2px 2px 0 var(--ink); }
.tool.soon { border-style: dashed; background: transparent; box-shadow: none; }
.tool.soon .ico { background: var(--paper); border-style: dashed; box-shadow: none; }
.loadbar { margin-top: auto; height: 14px; border: var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.loadbar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--lime) 0 8px, #6cc283 8px 16px);
             border-right: var(--line); animation: load 7s cubic-bezier(.1, .8, .2, 1) infinite; }
@keyframes load { 0% { width: 4%; } 70%, 100% { width: 99%; } }
.soon small { font-weight: 700; font-size: 13px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center;
        padding: 22px 0 40px; border-top: 2.5px dashed var(--dots); font-size: 14px; color: var(--soft); }
.foot a { font-weight: 700; color: var(--ink); }
.door { display: flex; flex-direction: column; gap: 2px; }
.door:not(:empty)::before { content: "bouncer log"; font-weight: 800; color: var(--ink); }

/* googly eyes: the pupils follow the pointer */
.eye { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.pupil { fill: var(--ink); transition: transform .08s linear; }

/* other people's cursors on the home page */
.dot { position: fixed; top: 0; left: 0; z-index: 30; pointer-events: none; transition: translate 90ms linear; will-change: translate; }
.dot svg { width: 22px; height: 22px; display: block; filter: drop-shadow(1px 1px 0 var(--ink)); }
.dot span { position: absolute; left: 18px; top: 16px; padding: 1px 8px; border: 2px solid var(--ink); border-radius: 8px;
            font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--c, var(--sun)); }

/* tool landing pages */
.intro { display: grid; justify-items: center; gap: 16px; padding: clamp(40px, 8vw, 80px) 0 28px; text-align: center; }
.intro .ico { width: 104px; height: 104px; border-radius: 26px; box-shadow: 5px 5px 0 var(--ink); transform: rotate(-4deg); }
.intro .ico svg { width: 72px; height: 72px; }
.intro h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -.035em; }
.intro p { max-width: 560px; font-size: 19px; color: var(--soft); text-wrap: pretty; }
.intro .btn.big { margin-top: 10px; }
.join { display: flex; gap: 8px; width: min(440px, 100%); margin-top: 4px; }
.join input { flex: 1; }
.or { display: flex; align-items: center; gap: 12px; width: min(440px, 100%); font-weight: 700; color: var(--soft); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 2.5px dashed var(--dots); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; padding: 24px 0 64px; counter-reset: s; }
.steps li { position: relative; padding: 22px 20px 18px; border: var(--line); border-radius: 18px; background: var(--paper); counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; top: -16px; left: 18px; display: grid; place-items: center;
                    width: 34px; height: 34px; border: var(--line); border-radius: 50%; background: var(--c, var(--sun)); font-weight: 800; }
.steps b { display: block; font-size: 18px; }
.steps span { color: var(--soft); font-size: 15px; }

/* rooms */
.app { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; padding: 18px clamp(12px, 3vw, 28px) 24px;
       height: calc(100dvh - 64px); min-height: 560px; }
.main { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; min-width: 0; min-height: 0; }
.stage { position: relative; min-height: 0; overflow: hidden; border: var(--line); border-radius: 20px; background: var(--ink);
         box-shadow: 5px 5px 0 var(--ink); }
.stage:fullscreen { border: 0; border-radius: 0; }
.card { border: var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--lift); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; }
.bar .grow { flex: 1 1 200px; min-width: 0; }
.bar .sep { width: 2px; align-self: stretch; background: var(--dots); }
.roomtag { display: flex; align-items: center; gap: 8px; min-width: 0; }
.roomtag code { overflow: hidden; text-overflow: ellipsis; font: 15px "Dot", monospace; }

.side { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; overflow: hidden; }
.side > header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: var(--line); }
.side h2 { font-size: 16px; font-weight: 800; }
.people { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.who { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border: 2px solid var(--ink);
       border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; max-width: 100%; }
.who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who.me { background: var(--sun); cursor: pointer; }
.who.me:hover { box-shadow: 2px 2px 0 var(--ink); }
.who .tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 6px; background: var(--pink); font-size: 11px; line-height: 1; }
.av { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border: 2px solid var(--ink);
      border-radius: 50%; background: hsl(var(--h, 50) 90% 75%); font-size: 13px; font-weight: 800; line-height: 1; text-transform: uppercase; }
.log { display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; overflow-wrap: anywhere; }
.log .msg { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: start; }
.log .msg b { display: block; font-size: 13px; }
.log .msg p { font-size: 15px; line-height: 1.35; }
.log .sys { align-self: center; padding: 2px 10px; border-radius: 999px; background: var(--bg); font-size: 12.5px; font-weight: 600;
            color: var(--soft); text-align: center; }
.log:empty::before { content: "it's quiet. too quiet. say hi"; margin: auto; color: var(--soft); font-size: 14px; }
.say { display: flex; gap: 8px; padding: 12px; border-top: var(--line); }
.say input { flex: 1; }
.reacts { display: flex; gap: 4px; }
.reacts .btn { width: 38px; min-height: 38px; padding: 0; font-size: 18px; box-shadow: 2px 2px 0 var(--ink); border-radius: 10px; }

/* overlays on the stage */
.fx { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.floaty { position: absolute; bottom: -40px; display: grid; justify-items: center; animation: rise 2.6s cubic-bezier(.2, .6, .4, 1) forwards; }
.floaty b { padding: 4px 14px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--c, var(--sun));
            box-shadow: 3px 3px 0 var(--ink); font-size: 24px; font-weight: 800; white-space: nowrap; rotate: -4deg; }
.floaty small { margin-top: 6px; padding: 1px 7px; border: 2px solid var(--ink); border-radius: 7px; background: var(--paper);
                font: 700 11px "Bricolage", sans-serif; color: var(--ink); white-space: nowrap; }
@keyframes rise {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  12% { opacity: 1; transform: translateY(-60px) scale(1.15); }
  40% { transform: translate(14px, -200px) rotate(8deg); }
  70% { transform: translate(-12px, -320px) rotate(-6deg); opacity: 1; }
  100% { transform: translate(6px, -440px) scale(.9); opacity: 0; }
}
.fly { position: absolute; left: 100%; white-space: nowrap; font-size: 24px; font-weight: 800; color: #fff;
       -webkit-text-stroke: 4px #000; paint-order: stroke fill; animation: fly 9s linear forwards; }
@keyframes fly { to { transform: translateX(calc(-100vw - 100%)); } }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; translate: -50% 0; padding: 10px 18px; border: var(--line);
         border-radius: 14px; background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: 4px 4px 0 var(--pink);
         animation: pop .25s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes pop { from { transform: scale(.6) translateY(20px); opacity: 0; } }

/* empty screens */
.blank { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 20px;
         text-align: center; color: var(--paper); }
.blank h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.blank p { max-width: 380px; color: #c9cee6; }
.bars { background: linear-gradient(90deg, #efe9da 0 14.3%, #e3c23f 0 28.6%, #58b8b0 0 42.9%, #63a85a 0 57.1%,
                                    #b65fa6 0 71.4%, #c8503f 0 85.7%, #3a57b0 0); }
.bars::after { content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none; mix-blend-mode: multiply;
               background: repeating-linear-gradient(0deg, #000 0 2px, transparent 2px 4px); }
.bars > * { position: relative; z-index: 1; }
.bars .btn.big { font-size: 22px; }

@media (max-width: 860px) {
  .top { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .app { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .main { grid-template-rows: auto auto; }
  .stage { aspect-ratio: 16 / 10; }
  .side { height: 460px; }
}
@media (max-width: 520px) {
  .join { flex-direction: column; }
  .bar .sep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* watch party */
.screen, .screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen iframe { pointer-events: none; background: #000; }
.controls { display: grid; gap: 0; overflow: hidden; }
.now { padding: 12px 16px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.time { min-width: 42px; font: 14px "Dot", monospace; text-align: center; }
.hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 12px 4px; padding: 8px 12px; border: 2px dashed var(--ink);
        border-radius: 12px; background: var(--sun); font-size: 14px; font-weight: 600; }
.hint .btn { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.addrow { border-top: 2.5px dashed var(--dots); }
.queue { max-height: 150px; overflow-y: auto; padding: 0 12px; }
.queue:not(:empty) { padding-bottom: 12px; }
.queue li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.queue li + li { border-top: 2px dotted var(--dots); }
.queue img { width: 56px; height: 42px; flex: none; object-fit: cover; border: 2px solid var(--ink); border-radius: 8px; background: var(--dots); }
.queue .qt { display: grid; min-width: 0; flex: 1; font-size: 14px; line-height: 1.25; }
.queue .qt > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .btn.icon { width: 32px; min-height: 32px; font-size: 13px; }

input[type="range"] { --p: 0%; height: 26px; margin: 0; background: transparent; accent-color: var(--pink); -webkit-appearance: none; appearance: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 12px; border: 2px solid var(--ink); border-radius: 999px;
  background: linear-gradient(90deg, var(--pink) var(--p), #fff var(--p)); }
input[type="range"]::-moz-range-track { height: 8px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; }
input[type="range"]::-moz-range-progress { height: 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border: 2.5px solid var(--ink);
  border-radius: 50%; background: var(--sun); box-shadow: 2px 2px 0 var(--ink); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--sun); }
input[type="range"]:disabled { opacity: .45; cursor: not-allowed; }

.side .reacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 14px 0; border-top: var(--line); }
.side .reacts .btn { width: 100%; min-height: 32px; padding: 0 6px; font-size: 13px; }
.side .say { padding: 10px 14px 14px; border-top: 0; }

/* rename dialog */
.pick { width: min(420px, calc(100vw - 32px)); padding: 0; color: var(--ink); }
.pick::backdrop { background: rgb(31 42 90 / .45); backdrop-filter: blur(2px); }
.pick form { display: grid; gap: 14px; padding: 22px; }
.pick h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pick .row { display: flex; justify-content: flex-end; gap: 10px; }

/* screen share */
.tiles { position: absolute; inset: 0; display: grid; gap: 10px; padding: 10px;
         grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); grid-auto-rows: minmax(0, 1fr); }
.tiles[data-n="0"] { display: none; }
.tile { position: relative; min-height: 0; overflow: hidden; border-radius: 12px; background: #000; }
.tile:fullscreen { border-radius: 0; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: crosshair; }
.tile.lost video { opacity: .35; filter: grayscale(1); }
.tile.lost::after { content: "connection hiccup, hang on…"; position: absolute; inset: 0 0 48px; display: grid; place-items: center;
                    padding: 0 16px; color: var(--paper); font-weight: 800; text-align: center; pointer-events: none; }
.tilebar { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.tilebar > * { pointer-events: auto; }
.tilebar .btn { min-height: 34px; box-shadow: 2px 2px 0 var(--ink); }
.tilebar .btn.icon { width: 34px; margin-left: auto; }
.label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 12px 3px 4px; border: 2px solid var(--ink);
         border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.label > span:not(.av) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.label .nosound { display: inline-flex; flex: none; color: var(--soft); }
.label .nosound svg { width: 15px; height: 15px; }
.tile .unmute { position: absolute; left: 50%; top: 50%; z-index: 2; translate: -50% -50%; }
.label:not(:has(.av)) { padding-left: 12px; }
.pings { position: absolute; inset: 0; pointer-events: none; }
.ping { position: absolute; width: 0; height: 0; }
.ping::before, .ping::after { content: ""; position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%;
                              border: 4px solid var(--c); box-shadow: 0 0 0 2px var(--ink); animation: ripple 1.6s ease-out forwards; }
.ping::after { animation-delay: .25s; opacity: 0; }
.ping span { position: absolute; left: 14px; top: 12px; padding: 1px 8px; border: 2px solid var(--ink); border-radius: 8px; background: var(--c);
             font-size: 12px; font-weight: 800; white-space: nowrap; animation: fade 2.2s ease-in forwards; }
@keyframes ripple { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.tip { font-size: 14px; }
@media (max-width: 860px) { .tip { display: none; } }

/* room header + control rows */
.roomtag { justify-content: space-between; width: 100%; }
.roomtag .btn { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.side .code { width: 100%; font-size: 13px; color: var(--soft); }
.side .code { display: flex; align-items: center; gap: 6px; line-height: 1; }
.side .code code { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--bg); color: var(--ink); font: 13px/1 "Dot", monospace; }
.seekrow { display: flex; flex: 1 1 320px; align-items: center; gap: 10px; min-width: 0; }
.seekrow input { flex: 1; min-width: 60px; }
.addrow input { flex: 1 1 140px; }
@media (max-width: 520px) {
  .controls .bar { gap: 8px; }
  .controls .btn.icon { width: 40px; }
  .seekrow { flex-basis: 100%; }
}
.blank .mascot { width: 96px; height: 96px; overflow: visible; animation: bob 3s ease-in-out infinite; }
.blank .mascot .eye { stroke: var(--ink); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
.blank:not(.bars) .btn { border-color: var(--paper); box-shadow: 5px 5px 0 var(--pink); }
.blank:not(.bars) .btn:hover:not(:disabled) { box-shadow: 7px 7px 0 var(--pink); }
@media (max-width: 520px) { .wide { display: none; } }

.btn svg { width: 20px; height: 20px; flex: none; }
.btn:not(.icon) svg { width: 16px; height: 16px; }
.queue .btn.icon svg { width: 16px; height: 16px; }
.rec { width: 10px; height: 10px; flex: none; border: 2px solid var(--ink); border-radius: 50%; background: #ff4d4d; animation: blink 1.2s infinite; }

/* on narrow screens the shared screens stack, each at its own 16:9 */
@media (max-width: 860px) {
  .stage:has(> .tiles) { aspect-ratio: auto; min-height: 300px; }
  .stage > .tiles { position: relative; inset: auto; grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile { aspect-ratio: 16 / 9; }
  .tile .unmute { min-height: 48px; padding: 8px 18px; font-size: 16px; }
}

/* links out to manas.sh */
.plug { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 6px 12px; border: 2px dashed var(--ink);
        border-radius: 10px; font-weight: 700; font-size: 14px; text-decoration: none; transition: background .15s, transform .15s; }
.plug svg { width: 16px; height: 16px; transition: transform .2s; }
.plug:hover { background: var(--lime); border-style: solid; transform: rotate(-2deg); }
.plug:hover svg { transform: translate(2px, -2px); }
.here + .plug { margin-left: 0; }
.top .here { margin-left: auto; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: -24px 0 40px; padding: 18px 22px;
          border: var(--line); border-radius: 20px; background: var(--lime); box-shadow: 5px 5px 0 var(--ink);
          text-decoration: none; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s; }
.banner:hover { transform: translate(-2px, -3px) rotate(-.6deg); box-shadow: 8px 8px 0 var(--ink); }
.banner .px { padding: 4px 10px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); font-size: 15px; rotate: -6deg; }
.banner > span:nth-child(2) { flex: 1 1 260px; font-size: 16px; }
.banner .go { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.banner .go svg { width: 18px; height: 18px; transition: transform .2s; }
.banner:hover .go svg { transform: translate(3px, -3px); }
.intro .row404 { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 10px; }
.intro .row404 .btn.big { margin: 0; }
@media (max-width: 860px) {
  .plug { order: 2; }
  .top .here { order: 2; margin-left: 0; }
}

/* ---------- shared bits for the new tools ---------- */
.btn.grape { background: var(--grape); } .btn.tang { background: var(--tang); }
.zone { position: relative; display: grid; place-content: center; justify-items: center; gap: 10px; min-height: 0; padding: 28px 20px;
        border: 3px dashed var(--ink); border-radius: 22px; background: var(--paper); text-align: center; cursor: pointer;
        transition: background .15s, transform .15s; overflow: hidden; }
.zone:hover, .zone.over { background: color-mix(in srgb, var(--lime) 35%, var(--paper)); }
.zone.over { transform: scale(1.01) rotate(-.4deg); border-style: solid; }
.zone:focus-within { outline: 3px solid var(--pink); outline-offset: 3px; }
.zone b { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }
.zone .muted { max-width: 420px; }
.zone .ico { transform: rotate(-4deg); transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.zone:hover .ico, .zone.over .ico { transform: rotate(4deg) scale(1.08); }
.zone.small { min-height: 150px; }
.zone .fx { z-index: 0; }

.list { display: grid; gap: 0; }
.list > li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 0; }
.list > li + li { border-top: 2px dotted var(--dots); }
.list .empty { justify-content: center; padding: 18px 0; font-size: 14px; }
.xfer .ext { display: grid; place-items: center; width: 48px; height: 48px; flex: none; overflow: hidden; border: 2px solid var(--ink);
             border-radius: 12px; background: var(--sun); font: 800 12px/1 "Bricolage", sans-serif; text-transform: uppercase; }
.xfer .ext img { width: 100%; height: 100%; object-fit: cover; }
.xfer .what { display: grid; gap: 3px; flex: 1; min-width: 0; }
.xfer .what > b, .xfer .what > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xfer .what > b { font-size: 15px; }
.meter { height: 10px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.meter i { display: block; width: 0; height: 100%; background: var(--sky); transition: width .2s; }
.xfer.in .meter i { background: var(--pink); }
.xfer.ok .meter i { background: var(--lime); }
.xfer.bad .meter i { background: #c9cee6; }
.xfer .end { display: flex; align-items: center; gap: 10px; flex: none; }
.xfer .status { min-width: 38px; font: 13px "Dot", monospace; text-align: right; }
.xfer.bad .status { color: #c8503f; font: 700 13px "Bricolage", sans-serif; }
.xfer .btn { min-height: 36px; padding: 6px 14px; font-size: 14px; }

/* ---------- file drop ---------- */
.droproom { grid-template-rows: minmax(260px, 1fr) minmax(0, auto); }
.droproom .zone .ico { width: 92px; height: 92px; border-radius: 24px; }
.droproom .zone .ico svg { width: 64px; height: 64px; }
.transfers { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: 42vh; padding: 14px 16px 6px; }
.transfers h2, .board h2 { font-size: 16px; font-weight: 800; }
.transfers .list { overflow-y: auto; }
.transfers .list:empty::before { content: "nothing yet. files you send or get show up here"; display: block; padding: 14px 0; color: var(--soft); font-size: 14px; }

/* ---------- buzzer ---------- */
.hint2 { font-size: 14px; }
.hint2 kbd { padding: 1px 8px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink);
             font: 700 13px "Bricolage", sans-serif; }
/* a flat arcade button: solid fill, one ring, a hard shadow that it sinks into when pressed */
.buzzer { position: relative; width: min(250px, 60vw); height: min(250px, 60vw); flex: none; padding: 0; border: 4px solid var(--ink);
          border-radius: 50%; background: var(--pink); color: var(--ink); box-shadow: 0 10px 0 var(--ink); cursor: pointer;
          touch-action: manipulation; transition: transform .06s, box-shadow .06s, background .15s; -webkit-tap-highlight-color: transparent; }
.buzzer::before { content: ""; position: absolute; inset: 16px; border: 3px solid var(--ink); border-radius: 50%; opacity: .2; }
.buzzer span { position: relative; font: 800 clamp(34px, 5vw, 46px)/1 "Bricolage", sans-serif; letter-spacing: -.02em; text-transform: uppercase; }
.buzzer:disabled { background: #e6e1d3; color: #8d93ad; cursor: default; }
.buzzer.live { animation: throb 1s ease-in-out infinite; }
.buzzer.live:active, .buzzer.press { transform: translateY(8px); box-shadow: 0 2px 0 var(--ink); animation: none; }
.buzzer.in { background: var(--lime); color: var(--ink); transform: translateY(8px); box-shadow: 0 2px 0 var(--ink); }
.buzzer.nope { animation: nope .35s; }
@keyframes throb { 50% { transform: translateY(-4px); box-shadow: 0 14px 0 var(--ink); } }
@keyframes nope { 20%, 60% { translate: -10px 0; } 40%, 80% { translate: 10px 0; } }
@keyframes go { from { background-color: var(--sun); } }
@keyframes first { from { background-color: var(--lime); } }
.board { padding: 14px 16px 6px; max-height: 260px; overflow-y: auto; }
.board .list > li { gap: 10px; }
.board .list b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.board .list small { font: 13px "Dot", monospace; }
.board .top b::after { content: " ★"; color: var(--tang); }
.boardhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.boardhead .btn.icon { width: 34px; min-height: 34px; }
.boardhead .btn svg { width: 17px; height: 17px; }

/* the maximized scoreboard */
body.dim::after { content: ""; position: fixed; inset: 0; z-index: 59; background: rgb(31 42 90 / .55); }
.board.max { position: fixed; inset: clamp(10px, 3vw, 32px); z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px;
             max-height: none; padding: clamp(18px, 4vw, 48px); overflow: hidden; box-shadow: 8px 8px 0 var(--ink); }
.board.max:fullscreen { inset: 0; border: 0; border-radius: 0; box-shadow: none; }
.board.max h2 { font-size: clamp(30px, 5vw, 64px); letter-spacing: -.03em; }
.board.max .boardhead .btn.icon { width: 48px; min-height: 48px; }
.board.max .boardhead .btn svg { width: 22px; height: 22px; }
.board.max .list { align-content: start; overflow-y: auto; }
.board.max .list > li { gap: clamp(10px, 2vw, 22px); padding: clamp(10px, 1.8vh, 20px) 0; }
.board.max .list > li + li { border-top-width: 3px; }
.board.max .list b { font-size: clamp(22px, 3.6vw, 48px); letter-spacing: -.02em; }
.board.max .place { width: clamp(36px, 4.4vw, 60px); height: clamp(36px, 4.4vw, 60px); border-width: 3px; border-radius: 14px;
                    font-size: clamp(18px, 2.4vw, 30px); }
.board.max .av { width: clamp(36px, 4.4vw, 60px); height: clamp(36px, 4.4vw, 60px); border-width: 3px; font-size: clamp(16px, 2.2vw, 28px); }
.board.max .pts { min-width: 2.2em; padding: 4px 16px; border-width: 3px; border-radius: 14px; font-size: clamp(24px, 4vw, 52px); }
.board.max .pm .btn { min-height: 40px; padding: 4px 12px; font-size: 16px; }
.board.max .top .pts { background: var(--sun); }
.place { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border: 2px solid var(--ink); border-radius: 8px;
         background: var(--paper); font-weight: 800; font-size: 13px; }
.board .top .place { background: var(--sun); }
.pts { min-width: 34px; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 8px; background: hsl(var(--h) 90% 82%);
       font-weight: 800; text-align: center; }
.pm { display: flex; gap: 4px; flex: none; }
.pm .btn { min-height: 30px; padding: 2px 8px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }

/* ---------- squisher + qr ---------- */
.squisher, .qrtool { display: grid; gap: 18px; padding: clamp(16px, 3vw, 26px); margin-bottom: 56px; }
.opts { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; }
.opt { display: grid; gap: 8px; min-width: 0; }
.opt.grow { flex: 1 1 200px; }
.lab { font-size: 14px; font-weight: 800; }
.lab b { font: 13px "Dot", monospace; padding: 1px 6px; border-radius: 6px; background: var(--bg); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg .btn { min-height: 38px; padding: 6px 14px; font-size: 14px; border-width: 2px; }
.seg .btn[aria-pressed="true"] { box-shadow: 2px 2px 0 var(--ink); }
select, textarea { min-height: 42px; padding: 8px 12px; border: var(--line); border-radius: 12px; background: #fff; color: var(--ink);
                   font: 500 15px "Bricolage", system-ui, sans-serif; }
textarea { resize: vertical; line-height: 1.4; }
select:focus-visible, textarea:focus-visible { outline: 3px solid var(--pink); outline-offset: 1px; }
.summary { padding: 12px 16px; border: 2px dashed var(--ink); border-radius: 14px; background: color-mix(in srgb, var(--grape) 25%, var(--paper)); }
.summary b { font-size: 18px; }
.squished .ext { background: var(--bg); }
.status.win { color: #1f7a45; font-weight: 800; }
.status.meh { color: #c8503f; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row.end { justify-content: flex-end; }

.qrtool { grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); align-items: start; }
.qrform { display: grid; gap: 20px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 42px; height: 42px; padding: 0; border: 2.5px solid var(--ink); border-radius: 12px; cursor: pointer;
          background: linear-gradient(135deg, var(--fg) 0 50%, var(--bg) 50%); transition: transform .12s; }
.swatch:hover { transform: rotate(-6deg) scale(1.06); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ink); }
.qrview { display: grid; gap: 14px; justify-items: center; }
.qrbox { position: relative; width: 100%; padding: 12px; border: var(--line); border-radius: 18px; background: #fff; box-shadow: var(--lift); rotate: 1.5deg; }
.qrbox canvas { display: block; width: 100%; height: auto; border-radius: 8px; }
.qrerr { position: absolute; inset: 12px; display: grid; place-items: center; padding: 20px; border-radius: 8px;
         background: color-mix(in srgb, var(--paper) 92%, transparent); font-weight: 700; text-align: center; }
.qrview .row { justify-content: center; }

/* ---------- home sections ---------- */
.section { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 16px; }
.section h2 { white-space: nowrap; }
.section h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.section span { color: var(--soft); font-size: 15px; }
.grid + .section { margin-top: 8px; }

@media (max-width: 860px) {
  .droproom { grid-template-rows: auto auto; }
  .droproom .zone { min-height: 240px; }
  .qrtool { grid-template-columns: 1fr; }
  .qrview { order: -1; }
  .qrbox { max-width: 360px; }
}
@media (max-width: 520px) {
  #folks { display: none; }
  .top .here { margin-left: auto; padding: 5px 10px; }
  .top .here + .plug, .top .plug { margin-left: 0; }
}
@media (max-width: 520px) {
  .top { gap: 8px 10px; padding: 10px 14px; }
  .logo { font-size: 19px; gap: 8px; }
  .logo svg { width: 28px; height: 28px; }
  .plug { padding: 4px 9px; font-size: 13px; }
}

/* ---------- quizbowl buzzer ---------- */
.quizroom { grid-template-rows: auto auto auto; align-content: start; overflow-y: auto; padding-right: 4px; }
.qstage { position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 360px; padding: 16px 18px 22px; overflow: hidden; }
.qtop { display: flex; align-items: center; gap: 12px; min-width: 0; }
.qnum { padding: 3px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sun); font-weight: 800; white-space: nowrap; }
.qmeta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.qtop .btn.icon { width: 36px; min-height: 36px; flex: none; }
.timer { position: relative; height: 22px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--lime); }
.timer.low i { background: var(--pink); }
.timer span { position: absolute; inset: 0; display: grid; place-items: center; font: 12px "Dot", monospace; }
.qtext { max-height: 40vh; overflow-y: auto; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 14px; background: #fff;
         font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; }
.qtext b { font-weight: 800; }
.mark { display: inline-block; margin: 0 4px; padding: 0 8px; border: 2px solid var(--ink); border-radius: 7px; font-size: 12px; font-weight: 800;
        line-height: 1.5; vertical-align: 2px; white-space: nowrap; }
.mark.ok { background: var(--lime); } .mark.bad { background: var(--pink); } .mark.live { background: var(--sun); }
.pmark { display: inline-block; padding: 0 5px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 12px "Dot", monospace; vertical-align: 2px; }
.caret { display: inline-block; width: 9px; height: 1.05em; margin-left: 2px; background: var(--ink); vertical-align: -2px; animation: blink2 1s steps(2) infinite; }
@keyframes blink2 { 50% { opacity: 0; } }
.qanswer { padding: 10px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--sun); font-size: 16px; }
.bonusbox { display: grid; gap: 10px; }
.bonusbox .leadin { font-size: 17px; font-weight: 600; }
.bpart { display: flex; gap: 12px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font-size: 16px; }
.bpart.ok { background: color-mix(in srgb, var(--lime) 35%, #fff); } .bpart.bad { background: color-mix(in srgb, var(--pink) 22%, #fff); }
.bnum { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); font-weight: 800; }
.banswer { margin-top: 6px; font-size: 15px; }
.qact { display: grid; justify-items: center; gap: 14px; margin-top: auto; }
.qstage .status { font-size: clamp(19px, 2.3vw, 26px); font-weight: 800; letter-spacing: -.02em; text-align: center; text-wrap: balance; }
.typing { font-size: 15px; font-style: italic; color: var(--soft); }
.answerform { display: grid; gap: 8px; width: min(520px, 100%); }
.answerform .row { flex-wrap: nowrap; }
.answerform input { flex: 1; min-height: 50px; font-size: 18px; border-width: 3px; }
.promptline { padding: 6px 12px; border: 2px dashed var(--ink); border-radius: 10px; background: var(--sun); font-weight: 700; }
.qstage.reader .buzzer { width: 140px; height: 140px; }
.qstage.reader .buzzer span { font-size: 28px; }
.qstage.reader .buzzer::before { inset: 10px; }
.qstage.go { animation: go .5s ease-out; } .qstage.first { animation: first .7s ease-out; }
.controls2 { gap: 8px; }
.controls2 .small { font-size: 13px; }
.board { padding: 14px 16px 12px; }
.teams.has-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 10px; }
.teamcard { border: 2px solid var(--ink); border-radius: 14px; background: #fff; overflow: hidden; }
.teamcard header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 2px solid var(--ink); background: hsl(var(--h, 45) 85% 80%); }
.teamcard.free header { background: var(--bg); }
.teamcard .tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; cursor: pointer; }
.teamcard .tscore { min-width: 40px; padding: 1px 10px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); font-weight: 800; text-align: center; }
.teamcard.top .tscore { background: var(--sun); }
.teamcard header .btn { min-height: 30px; padding: 2px 10px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }
.teamcard header .btn.icon { width: 30px; padding: 0; }
.teamcard header .btn svg { width: 14px; height: 14px; }
.teamcard .list { padding: 0 10px; }
.board .list li.mine b { text-decoration: underline 2px; text-underline-offset: 3px; }
.stats { font: 12px "Dot", monospace; color: var(--soft); }
.teamform { display: flex; gap: 8px; margin-top: 12px; }
.teamform input { flex: 1; }
.board.max .teams.has-teams { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; overflow-y: auto; align-content: start; }
.board.max .teamcard header { padding: 14px 18px; }
.board.max .teamcard .tname { font-size: clamp(22px, 3vw, 40px); }
.board.max .teamcard .tscore { font-size: clamp(24px, 3.4vw, 46px); padding: 2px 16px; border-width: 3px; border-radius: 12px; }
.board.max .stats { font-size: clamp(13px, 1.4vw, 18px); }
.board.max .teamform, .board.max .pm { display: none; }
.settings { width: min(620px, calc(100vw - 24px)); }
.settings form { max-height: calc(100dvh - 60px); overflow-y: auto; }
.togs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.tog { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 12px; cursor: pointer; }
.tog input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--pink); flex: none; }
.tog span { display: grid; } .tog small { font-size: 12.5px; }
.nums { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.num { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.num input { width: 70px; min-height: 38px; padding: 4px 10px; border: var(--line); border-radius: 10px; font: 600 15px "Bricolage", sans-serif; }
.chips2 { display: flex; flex-wrap: wrap; gap: 6px; }
.chips2 .btn { min-height: 34px; padding: 4px 12px; font-size: 13.5px; border-width: 2px; }
.chips2 .btn[aria-pressed="true"] { background: var(--sun); box-shadow: 2px 2px 0 var(--ink); }
.settings form:not(.is-reader) .readeronly { display: none; }
.readeronly { display: grid; gap: 16px; }
@media (max-width: 860px) {
  .quizroom { overflow: visible; }
  .qstage { min-height: 420px; }
  .qtext { max-height: 50vh; font-size: 17px; }
}
#scoreboard { max-height: none; overflow: visible; }
#scoreboard.max { overflow: hidden; }
.board.max .teamcard header .btn { display: none; }
.qtext.done { max-height: 60vh; }

/* ---------- all-tools menu ---------- */
:root { --mint: #7fd8c8; --coral: #ff8a7a; }
.btn.mint { background: var(--mint); } .btn.coral { background: var(--coral); }
.crumb { padding: 4px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--sun); font-weight: 800; font-size: 15px; white-space: nowrap; }
.menu { position: relative; }
.menu summary { list-style: none; min-height: 38px; padding: 6px 12px; font-size: 15px; box-shadow: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 16px; height: 16px; transition: transform .2s; }
.menu[open] summary { background: var(--sun); }
.menu[open] summary svg { transform: rotate(180deg); }
.menu-panel { position: absolute; top: calc(100% + 10px); left: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px;
              width: min(560px, calc(100vw - 28px)); padding: 16px; animation: pop .18s cubic-bezier(.3, 1.8, .5, 1); }
.mg { display: grid; align-content: start; gap: 2px; }
.mg b { padding: 0 8px 6px; font-size: 13px; color: var(--soft); }
.mg a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 2px solid transparent; border-radius: 12px; font-weight: 700; text-decoration: none; }
.mg a:hover, .mg a[aria-current] { border-color: var(--ink); background: var(--bg); }
.mi { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 2px solid var(--ink); border-radius: 10px; background: var(--c); }
.mi svg { width: 24px; height: 24px; overflow: visible; }
@media (max-width: 520px) {
  .menu { position: static; }
  .menu-panel { left: 14px; right: 14px; width: auto; grid-template-columns: 1fr; }
  .crumb { display: none; }
}

/* ---------- polls & tier lists ---------- */
.pollroom { grid-template-rows: auto; align-content: start; overflow-y: auto; padding-right: 4px; }
.maker { padding: 16px 18px; display: grid; gap: 12px; }
.makerhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; }
.makerhead h2 { font-size: 18px; font-weight: 800; }
.makerform { display: grid; gap: 10px; }
.makerform textarea { width: 100%; }
.optlist { display: grid; gap: 8px; }
.optlist .btn { justify-self: start; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--pink); }
.ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ideas .btn { min-height: 30px; padding: 2px 10px; font-size: 13px; border-width: 2px; }
.tierpreview { display: flex; flex-wrap: wrap; gap: 6px; }
.pollsbox { display: grid; gap: 14px; }
.pollsbox > .empty { padding: 30px; text-align: center; }
.pollcard { display: grid; gap: 12px; padding: 16px 18px; border: var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--lift); }
.pollcard.closed { background: #fbf8ee; }
.pollcard header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pollcard h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pollcard .tools { display: flex; gap: 6px; flex: none; }
.pollcard .tools .btn { min-height: 32px; padding: 2px 10px; font-size: 13px; border-width: 2px; }
.opts2 { display: grid; gap: 8px; }
.opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 14px; overflow: hidden; border: 2.5px solid var(--ink);
       border-radius: 12px; background: #fff; color: var(--ink); font: 700 15px "Bricolage", sans-serif; text-align: left; cursor: pointer; }
.opt:disabled { cursor: default; }
.opt:hover:not(:disabled) { box-shadow: 3px 3px 0 var(--ink); }
.opt .fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--mint) 55%, #fff); transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.opt.lead .fill { background: var(--mint); }
.opt.on { box-shadow: inset 0 0 0 2px var(--ink); }
.opt.on .olabel::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid var(--ink); border-radius: 50%; background: var(--pink); vertical-align: 0; }
.opt > :not(.fill) { position: relative; }
.olabel { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ocount { font: 13px "Dot", monospace; white-space: nowrap; }
.owho { display: flex; } .owho .av { width: 22px; height: 22px; margin-left: -6px; font-size: 11px; }
.tierwrap { display: grid; gap: 10px; }
.tiertabs .btn { min-height: 34px; font-size: 13.5px; }
.tiers { display: grid; gap: 0; border: 2.5px solid var(--ink); border-radius: 14px; overflow: hidden; background: #fff; }
.tierrow { display: grid; grid-template-columns: 64px minmax(0, 1fr); min-height: 56px; border-bottom: 2px solid var(--ink); }
.tierrow.over, .tray.over { background: color-mix(in srgb, var(--sun) 40%, #fff); }
.tierlabel { display: grid; place-items: center; padding: 4px; border-right: 2px solid var(--ink); font-weight: 800; font-size: 20px; text-align: center; overflow-wrap: anywhere; }
.tierlabel.sm { display: inline-grid; min-width: 30px; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 7px; font-size: 13px; }
.tierchips { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 8px; min-height: 52px; }
.tray { display: grid; gap: 4px; padding: 8px 10px; background: var(--bg); }
.tray .tierchips { padding: 0; min-height: 36px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper);
        font-weight: 700; font-size: 14px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.chip:hover { box-shadow: 2px 2px 0 var(--ink); }
.chip.picked { background: var(--sun); box-shadow: 2px 2px 0 var(--ink); }
.chip.dragging { opacity: .35; }
.chip.ghost, .pg.ghost { position: fixed; top: 0; left: 0; z-index: 70; pointer-events: none; rotate: -4deg; box-shadow: 4px 4px 0 var(--ink); }
.chip.result { cursor: default; }
.chip small { font: 11px "Dot", monospace; color: var(--soft); }
.chip.spicy { background: var(--pink); }
.chip em { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 6px; background: var(--paper); }
.hiddenres { padding: 18px; border: 2px dashed var(--ink); border-radius: 12px; text-align: center; }
.lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.personlist { display: grid; gap: 6px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.personlist > b { display: flex; align-items: center; gap: 6px; }
.minirows { display: grid; gap: 4px; font-size: 13.5px; }
.minirow { display: flex; align-items: baseline; gap: 8px; }
.pollcard.mini { padding: 12px; gap: 8px; box-shadow: none; border-width: 2px; }
.pollcard.mini h3 { font-size: 15px; }
.pollcard.mini .opt { min-height: 38px; font-size: 14px; padding: 6px 10px; }
.side .pollsbox.mini { padding: 10px 12px 0; }
.small { font-size: 13px; }

/* ---------- study timer ---------- */
.studyroom { grid-template-rows: auto auto auto; align-content: start; overflow-y: auto; padding-right: 4px; }
.clockcard { position: relative; display: grid; justify-items: center; gap: 14px; padding: 18px 18px 22px; overflow: hidden; --m: var(--coral); }
body[data-mode="short"] .clockcard { --m: var(--mint); }
body[data-mode="long"] .clockcard { --m: var(--sky); }
.modes .btn[aria-pressed="true"] { background: var(--m); }
.ring { position: relative; width: min(300px, 70vw); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; rotate: -90deg; }
.ring .track { fill: var(--paper); stroke: var(--bg); stroke-width: 14; }
.ring .arc { fill: none; stroke: var(--m); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.ring::before { content: ""; position: absolute; inset: 0; border: 3px solid var(--ink); border-radius: 50%; }
.ring::after { content: ""; position: absolute; inset: 26px; border: 3px solid var(--ink); border-radius: 50%; }
.ringtext { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; }
.ringtext b { font-size: clamp(48px, 9vw, 72px); font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.ringtext span { font-weight: 700; }
.nudge { padding: 6px 14px; border: 2px dashed var(--ink); border-radius: 12px; background: color-mix(in srgb, var(--m) 35%, var(--paper)); font-weight: 700; text-align: center; }
.row.center { justify-content: center; align-items: center; }
.doingform { display: flex; gap: 8px; }
.doingform input { flex: 1; min-width: 0; }
.desks { padding: 14px 16px; }
.desks h2 { font-size: 16px; font-weight: 800; }
.desks .list li { gap: 10px; }
.desk { display: grid; flex: 1; min-width: 0; }
.desk > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tomatoes { display: flex; align-items: center; gap: 3px; font: 12px "Dot", monospace; }
.tomatoes i { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; background: var(--coral); }
.desks li.mine b { text-decoration: underline 2px; text-underline-offset: 3px; }

/* ---------- pdf tools ---------- */
.pdftool { display: grid; gap: 16px; padding: clamp(16px, 3vw, 26px); margin-bottom: 56px; }
#work { display: grid; gap: 14px; }
.pdfbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; }
.srcchip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 3px 4px 3px 10px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font-size: 14px; }
.srcchip i { width: 12px; height: 12px; flex: none; border: 2px solid var(--ink); border-radius: 4px; background: var(--c); }
.srcchip b { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srcchip .btn.icon { width: 28px; min-height: 28px; border-width: 2px; }
.srcchip .btn svg { width: 13px; height: 13px; }
.panel { display: grid; gap: 10px; padding: 14px 16px; border: 2px dashed var(--ink); border-radius: 14px; background: color-mix(in srgb, var(--sky) 14%, var(--paper)); }
.panel .row { align-items: center; }
.panel .row input { flex: 0 1 260px; }
.splitmodes { display: grid; gap: 8px; }
.splitmodes .row input { flex: 1 1 160px; }
.status2:empty { display: none; }
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.pg { position: relative; display: grid; gap: 6px; padding: 8px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; cursor: grab;
      touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 3px 3px 0 var(--c); transition: transform .12s; }
.pg:hover { transform: translateY(-2px); }
.pg.dragging { opacity: .3; }
.pg.before { box-shadow: -6px 0 0 var(--pink), 3px 3px 0 var(--c); }
.pg.after { box-shadow: 6px 0 0 var(--pink), 3px 3px 0 var(--c); }
.pg.ghost { width: 130px; }
.thumb { display: grid; place-items: center; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; background: var(--bg); }
.thumb canvas, .thumb img { max-width: 100%; max-height: 100%; box-shadow: 0 0 0 1px #d8d2c2; rotate: var(--r, 0deg); scale: var(--s, 1); transition: rotate .2s, scale .2s; }
.pgbar { display: flex; align-items: center; gap: 2px; }
.pgnum { flex: 1; font: 13px "Dot", monospace; }
.pgbar .btn.icon { width: 28px; min-height: 28px; border-width: 2px; }
.pgbar .btn svg { width: 14px; height: 14px; }
.pick2 { display: none; position: absolute; top: 12px; left: 12px; padding: 1px 8px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); font-size: 12px; font-weight: 800; }
.selecting .pick2 { display: block; }
.selecting .pg { cursor: pointer; }
.pg.sel { background: color-mix(in srgb, var(--sun) 45%, #fff); }
.pg.sel .pick2 { background: var(--sun); }
.levels .btn { min-height: 36px; }
@media (max-width: 860px) {
  .pollroom, .studyroom { overflow: visible; }
  .tierrow { grid-template-columns: 48px minmax(0, 1fr); }
  .pages { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.side > header .pollsbox.mini { width: 100%; }
.tiers > p { padding: 6px 10px 8px; }
.mfoot { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 10px 8px 2px; border-top: 2px dashed var(--dots);
         font-size: 14px; text-decoration: none; color: var(--soft); }
.mfoot b { color: var(--ink); }
.mfoot svg { width: 15px; height: 15px; }
.mfoot:hover b { text-decoration: underline 2px; text-underline-offset: 3px; }
@media (max-width: 520px) { .top .plug { display: none; } }
