:root{--pine:#173d32;--forest:#0d2d24;--paper:#f8f3e7;--card:#fffdf6;--gold:#f6c668;--red:#a4382e;--muted:#506359;--line:#e2d9c5;color:var(--pine);background:var(--paper);font-family:system-ui,sans-serif;line-height:1.5}
*{box-sizing:border-box}body{margin:0}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:Georgia,serif;line-height:1.08}h2{font-size:clamp(1.6rem,4vw,2.1rem)}h3{font-size:1.25rem}button,input,select{font:inherit}button{touch-action:manipulation;cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #a4382e;outline-offset:4px}a{color:inherit}.top{min-height:74px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 max(20px,calc((100% - 1100px)/2))}.brand{font:bold 1.5rem Georgia,serif;white-space:nowrap;text-decoration:none}.brand span{margin-right:7px}main{width:min(1100px,calc(100% - 36px));margin:30px auto}.hero{border-radius:26px;min-height:460px;display:grid;align-items:center;background:radial-gradient(ellipse at 74% 44%,#326150,var(--pine) 60%,var(--forest));overflow:hidden;color:var(--paper);position:relative}.hero:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#102c25 0%,#102c25e8 27%,#102c2510 75%)}.hero-copy{position:relative;padding:48px clamp(26px,6vw,75px)}.eyebrow{font-size:.875rem;letter-spacing:.12em;font-weight:800;color:var(--gold)}.hero h1{font-size:clamp(4rem,10vw,7.8rem);letter-spacing:-.065em;margin:15px 0 18px;line-height:.87}.hero em{color:var(--gold)}.primary,.secondary,.quiet{min-height:46px;border-radius:10px;padding:10px 18px;font-weight:750;border:1px solid transparent}.primary{background:var(--gold);color:#302414}.primary:hover{background:#ffdb93}.secondary{background:var(--pine);color:white}.secondary:hover{background:#245847}.quiet{border-color:var(--line);background:var(--card);color:var(--pine)}.quiet:hover{background:#f1ead8}.host-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}.panel{padding:clamp(18px,3vw,30px);background:var(--card);border:1px solid var(--line);border-radius:20px}.panel p{margin:10px 0 17px;color:var(--muted)}.icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#f2e4c6;margin-bottom:12px}ul{margin:12px 0 0;padding:0;list-style:none}li{padding:8px 0;border-bottom:1px solid var(--line)}li:last-child{border:0}label{display:block;font-weight:700;margin-bottom:6px}input,select{background:white;color:var(--pine);border:1px solid #a5ada2;border-radius:9px;padding:10px 12px;min-height:46px;width:100%}#code{text-transform:uppercase;letter-spacing:.12em}.join-input,.actions{display:flex;gap:9px;flex-wrap:wrap}.join-input input{flex:1;min-width:95px}.actions{margin-top:18px}.notice{margin:14px 0;color:var(--red);font-weight:700}.stage{background:var(--pine);color:var(--paper);border-radius:24px;padding:clamp(20px,5vw,54px);text-align:center}.stage h1{font-size:clamp(2.25rem,6vw,4.6rem);margin:12px 0}.stage p{color:#e9e9d6}.stage .eyebrow{color:var(--gold)}.measure{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:24px auto 12px;max-width:780px}.beat{border:1px solid #789083;border-radius:12px;min-height:88px;padding:6px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:700}.beat.current{background:var(--gold);color:var(--forest);border-color:var(--gold)}.beat.past{opacity:.55}.beat span{font-size:clamp(1.22rem,4vw,2.6rem);line-height:1.12}.beat small{font-size:.8rem}.clock{font-weight:800;min-height:25px}.host-grid{grid-template-columns:1fr 1.25fr}.room-share{display:flex;flex-wrap:wrap;align-items:center;gap:18px;margin:14px 0}.room-share img{width:124px;height:124px;image-rendering:pixelated}.room-code{font:bold clamp(1.7rem,5vw,2.5rem) ui-monospace,monospace;letter-spacing:.12em}.settings{display:grid;gap:12px}.settings label:has(input){display:flex;align-items:center;gap:8px}.settings input{width:20px;min-height:20px;accent-color:var(--pine)}.chips{display:flex;flex-wrap:wrap;gap:7px}.chips li{background:#eaf0e4;border:0;border-radius:7px;padding:4px 8px;font-size:.875rem}.join-page,.player{max-width:740px;margin:auto}.player .stage{margin-bottom:18px}.bell-pad{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.bell{background:var(--card);color:var(--pine);border:2px solid #d7c8a7;border-radius:18px;min-height:126px;display:grid;place-content:center;text-align:center;position:relative;font-weight:800}.bell>span{font:bold 2.6rem Georgia,serif}.bell small{font-size:.875rem}.bell.ready{background:var(--gold);border-color:#a4382e;box-shadow:inset 0 0 0 2px #a4382e}.bell.hit{transform:scale(.95);background:#e3eddb}.bell.ready.hit{background:#fff0b5}.bell small:last-child{height:1.4em;color:var(--red)}.status{margin-top:12px;text-align:center;color:var(--muted)}.hidden,[hidden]{display:none!important}@media(max-width:650px){.host-grid{grid-template-columns:1fr}.hero{min-height:430px;background-position:64% center}.hero:before{background:linear-gradient(90deg,#102c25f3 0%,#102c25b5 56%,#102c2520 100%)}.hero-copy{padding-block:34px}main{margin-top:18px}.top{min-height:62px}.beat{min-height:66px}}

.hero-art{position:absolute;right:5%;top:50%;width:430px;height:330px;transform:translateY(-50%);pointer-events:none}.hero-copy{z-index:1}.art-bell{display:block;position:absolute;width:155px;height:176px;background:linear-gradient(115deg,#f9db85,#f4bd58 65%,#e8a046);border-radius:50% 50% 30% 30% / 55% 55% 16% 16%;box-shadow:inset -12px -12px #993b2225,0 10px 26px #0d2d2470;bottom:68px;left:145px;transform:rotate(-13deg)}.art-bell:before{content:"";position:absolute;width:115%;height:23%;border-radius:50%;left:-7.5%;bottom:-5%;background:#9f6026;border:7px solid #fbd17a;box-sizing:border-box}.art-bell:after{content:"";position:absolute;width:20%;height:16%;border-radius:50%;background:#eaa94c;left:42%;bottom:-10%}.art-bell i{position:absolute;width:12px;height:16px;background:#3c2b23;border-radius:50%;top:46%;left:33%;box-shadow:36px 0 #3c2b23}.art-bell i:after{content:"";position:absolute;width:25px;height:16px;background:#543025;border-radius:3px 3px 24px 24px;left:12px;top:24px}.art-bell.small{transform:scale(.65) rotate(-29deg);left:13px;bottom:31px;background:linear-gradient(115deg,#f3b45d,#d67440);opacity:.92}.art-bell.right{transform:scale(.68) rotate(22deg);left:271px;bottom:21px;background:linear-gradient(115deg,#fbd787,#e5a03d)}.hat{position:absolute;z-index:1;left:6%;top:-24%;width:91%;height:50%;background:#b83c32;border-radius:82% 35% 7px 10px;transform:rotate(-11deg);border-bottom:15px solid #fff3d6}.hat:after{content:"";position:absolute;width:30px;height:30px;background:#fff3d6;border-radius:50%;top:-3px;right:-15px}.spark{position:absolute;color:#ffd586;font-size:36px}.spark.one{top:18%;left:11%}.spark.two{bottom:3%;left:48%}.spark.three{top:10%;right:11%}.spark.four{right:1%;top:44%;font-size:25px}.settings{margin-top:18px}.actions a{text-decoration:none;display:inline-flex;align-items:center}
@media(max-width:800px){.hero-art{right:-44px;transform:translateY(-50%) scale(.84);transform-origin:right center}}
@media(max-width:650px){.hero-art{right:-60px;top:32%;transform:translateY(-50%) scale(.54);opacity:.74}.hero-copy{padding-top:88px}.hero h1{font-size:clamp(3.7rem,12vw,5rem)}}
.stage{position:relative}.stage .encouragement{position:absolute;right:14px;bottom:10px;max-width:calc(100% - 28px);border-radius:10px;background:var(--gold);color:var(--forest);padding:8px 13px;box-shadow:0 4px 14px #0003;font-weight:800;overflow-wrap:anywhere;pointer-events:none}.conductor-stage{padding-bottom:max(65px,5vw)}
.song-progress{display:block;width:min(100%,780px);height:9px;margin:0 auto 12px;accent-color:var(--gold);appearance:none;border:0;border-radius:20px;overflow:hidden;background:#ffffff35}.song-progress::-webkit-progress-bar{background:#ffffff35}.song-progress::-webkit-progress-value{background:var(--gold)}.song-progress::-moz-progress-bar{background:var(--gold)}.beat{flex-direction:row;flex-wrap:wrap;align-content:center;gap:4px}.beat .beat-note{display:grid;place-items:center;border-radius:7px;min-width:1.1em;min-height:1.1em;font-size:clamp(1.15rem,3.4vw,2.25rem)}.beat-note.rang{background:#e1f4cc;color:#173d32;box-shadow:inset 0 -2px #8bc36d}
.bar-display{max-width:780px;margin:18px auto 12px}.bar-label{font-size:.875rem;font-weight:800}.bar-display .measure{margin:6px 0 0}.bar-preview{margin-top:12px}.bar-preview .beat{min-height:52px;border-style:dashed}.bar-preview .beat-note{font-size:clamp(1.05rem,2.7vw,1.65rem)}

.stage-actions{display:flex;justify-content:center;gap:8px;margin:10px 0}
.stage-actions .quiet{font-size:.875rem;min-height:36px;padding:5px 12px}
.stage-focused{background:#091e19}
.stage-focused .top,.stage-focused #app>:not(.conductor-stage):not(.notice):not(.status){display:none}
.stage-focused main{width:100%;margin:0}
.stage-focused .conductor-stage{min-height:100svh;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:clamp(5px,1.25vh,16px);padding:clamp(14px,2.5vh,38px) clamp(12px,4vw,70px) clamp(72px,10vh,106px);border-radius:0;background:radial-gradient(ellipse at 50% 30%,#215447,#0b2821 76%)}
.stage-focused .conductor-stage .eyebrow{display:none}
.stage-focused .conductor-stage h1{font-size:clamp(2.1rem,min(7vw,8vh),7rem);margin:0;line-height:1}
.stage-focused .clock{font-size:clamp(1rem,2.65vh,2rem);min-height:0}
.stage-focused .bar-display{width:100%;max-width:1900px;margin:0 auto}
.stage-focused .bar-label{font-size:clamp(.95rem,2.8vh,2.1rem)}
.stage-focused .measure{max-width:none;gap:clamp(4px,1vw,18px);margin:4px 0 0}
.stage-focused .beat{display:grid;grid-auto-flow:column;grid-auto-columns:max-content;place-content:center;gap:clamp(2px,.6vw,12px);height:clamp(90px,29vh,370px);min-height:0;border:2px solid #638e7f;border-radius:clamp(8px,1.4vw,24px);background:#153b31;color:#fff5db;font-size:clamp(2rem,7vh,7rem)}
.stage-focused .beat.past{opacity:.64}
.stage-focused .beat.current{background:#ffd16e;color:#142b23;border-color:#fff2c3;box-shadow:0 0 0 3px #e6a742,0 0 28px #ffd16e4d}
.stage-focused .beat .beat-note{font-size:clamp(1.8rem,min(10vw,17vh),13rem);min-width:.84em;min-height:1em;line-height:1}
.stage-focused .beat.chord .beat-note{font-size:clamp(1.5rem,min(6.8vw,12.5vh),9rem)}
.stage-focused .beat .chord-plus{font-size:.4em;align-self:center}
.stage-focused .beat.large-chord{grid-auto-flow:row;grid-template-columns:repeat(2,max-content);gap:0 clamp(4px,1vw,16px)}
.stage-focused .beat.large-chord .chord-plus{display:none}
.stage-focused .bar-preview{margin-top:clamp(5px,1.5vh,24px)}
.stage-focused .bar-preview .beat{height:clamp(52px,14vh,160px);border-style:dashed;background:#112f28;font-size:clamp(1.5rem,4vh,4rem)}
.stage-focused .bar-preview .beat .beat-note{font-size:clamp(1.2rem,min(5vw,8vh),6rem)}
.stage-focused .bar-preview .beat.large-chord .beat-note{font-size:clamp(1rem,min(4vw,5.7vh),4.5rem)}
.stage-focused .song-progress{width:100%;max-width:1900px;margin:0 auto;height:clamp(6px,1.3vh,13px)}
.stage-focused #guide{font-size:clamp(.94rem,2.2vh,1.5rem)}
.stage-focused .stage-actions{position:absolute;top:auto;bottom:12px;right:clamp(12px,4vw,70px);margin:0}
.stage-focused .encouragement{bottom:12px;left:clamp(12px,4vw,70px);right:auto;max-width:calc(100% - 225px);margin:0;font-size:clamp(1rem,2.7vh,2rem)}
.stage-focused #error,.stage-focused #status{color:#ffe1a4;text-align:center}
@media(max-width:560px){.stage-focused .beat.chord .chord-plus{font-size:.28em}.stage-focused .stage-actions{bottom:8px}.stage-focused .encouragement{bottom:54px;max-width:calc(100% - 24px)}}

.stage-marquee{display:grid;grid-template-columns:minmax(45px,1fr) minmax(0,4fr) minmax(45px,1fr);align-items:center;max-width:1600px;width:100%;margin:0 auto;isolation:isolate}
.stage-stars{color:var(--gold);font-size:clamp(1.4rem,4vw,4rem);text-shadow:0 0 24px #ffcb594d;line-height:.9}
.stage-stars span{display:block;margin-left:40%;font-size:.52em}
.stage-mascot{position:relative;min-height:clamp(46px,14vh,160px)}
.stage-mascot .hero-art{opacity:1;right:50%;top:50%;transform-origin:center;transform:translate(50%,-50%) scale(var(--mascot-scale,.32))}
.stage-focused .stage-mascot{--mascot-scale:.47}
.stage-focused .conductor-stage:before{content:"";position:absolute;top:0;left:0;right:0;height:clamp(5px,1vh,10px);background:repeating-linear-gradient(125deg,#f9e5bf 0 18px,#ad3b31 18px 36px)}
.stage-focused .conductor-stage{background:radial-gradient(ellipse at 78% 0%,#49715a 0%,transparent 52%),radial-gradient(ellipse at 45% 28%,#215447,#0b2821 76%)}

.stage-focused .stage-title .clock{margin-top:.4em;color:#ffda8a}
.stage-focused .bar-preview .beat{background:#18362f;border-color:#a17d4c}
.stage-focused .beat.current{background:linear-gradient(145deg,#ffe19a,#ffc755)}
.stage-focused .encouragement{border:2px solid #ffe7a8;box-shadow:0 5px 0 #87492f}
@media(max-width:900px){.stage-focused .stage-mascot{--mascot-scale:.32}}
@media(max-width:650px){.stage-mascot,.stage-focused .stage-mascot{--mascot-scale:.19}.stage-marquee{grid-template-columns:minmax(36px,1fr) minmax(0,5fr) minmax(36px,1fr)}}
@media(max-height:650px) and (min-width:900px){.stage-focused .stage-mascot{--mascot-scale:.29}}

.ringer-theme{background:radial-gradient(ellipse at 75% 0%,#285445,#0d2d24 56%,#091f19);color:var(--paper);min-height:100svh}
.ringer-theme .top{border-bottom:1px solid #537768;min-height:55px}
.ringer-theme .brand{font-size:1.25rem}
.ringer-theme .status{color:#d8e4d5}
.ringer-theme .notice{color:#ffd297}
.ringer-theme main{width:min(740px,calc(100% - 28px));margin:14px auto}
.ringer-theme .player .stage{padding:14px 16px 13px;border:1px solid #5b8471;border-top:4px solid var(--gold);margin-bottom:13px;border-radius:18px;background:#153c32}
.ringer-marquee{display:grid;grid-template-columns:minmax(0,1fr) clamp(62px,20vw,145px);text-align:left;align-items:center;gap:4px}

.ringer-marquee h1{font-size:clamp(1.7rem,6.1vw,3.4rem);margin:5px 0 3px;overflow-wrap:break-word}
.ringer-marquee .clock{font-size:.875rem;min-height:0;color:#ffdc92}
.ringer-art,.join-art{position:relative;height:clamp(65px,13vw,110px);pointer-events:none}
.ringer-art .hero-art,.join-art .hero-art{right:50%;top:50%;opacity:1;transform-origin:center;transform:translate(50%,-50%) scale(.20)}
.ringer-theme .player #guide{font-size:.875rem;text-align:left;margin-top:7px}
.ringer-theme .player .song-progress{margin:8px 0 0;height:5px}
.ringer-theme .bell-pad{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;max-width:560px;margin:8px auto 0}
.ringer-theme .bell-pad[data-count="1"]{grid-template-columns:minmax(0,1fr)}
.ringer-theme .bell-pad[data-count="3"] .bell:first-child{grid-column:1 / -1;width:46%;justify-self:center}
.ringer-theme .bell-pad:is([data-count="5"],[data-count="6"],[data-count="7"],[data-count="8"]){grid-template-columns:repeat(3,minmax(0,1fr))}
.ringer-theme .bell{background:none;color:#fdf0d1;border:0;border-radius:0;min-height:130px;padding:12px 2px 4px;gap:4px;-webkit-tap-highlight-color:transparent;user-select:none}
.ringer-theme .bell:is(.ready,.hit){background:none;box-shadow:none;transform:none}
.ringer-theme .bell:nth-child(even){padding-top:23px}
.ringer-theme .bell .ringer-bell{position:relative;display:grid;place-items:center;width:clamp(70px,24vw,115px);height:clamp(58px,19vw,94px);margin:10px auto 5px;border-radius:53% 53% 24% 24% / 68% 68% 20% 20%;background:linear-gradient(125deg,#ffe6a4 3%,#f3bc58 65%,#dc8c39);box-shadow:inset -5px -5px #a264323d,0 3px #9d642c,0 10px 15px #081a1770;color:#352719;font:800 clamp(2rem,9vw,3.25rem)/1 system-ui,sans-serif}
.ringer-theme .bell-pad:is([data-count="5"],[data-count="6"],[data-count="7"],[data-count="8"]) .ringer-bell{width:clamp(57px,19vw,84px);height:clamp(47px,16vw,73px);font-size:clamp(1.85rem,7vw,2.75rem)}
.ringer-theme .bell:nth-child(3n+1) .bell-figure{transform:rotate(-6deg)}
.ringer-theme .bell:nth-child(3n+2) .bell-figure{transform:rotate(5deg)}
.ringer-bell:before{position:absolute;content:"";width:15px;height:10px;top:-9px;border:3px solid #e6b25b;border-radius:8px 8px 0 0}
.ringer-bell:after{position:absolute;content:"";width:15px;height:8px;bottom:-5px;background:#edb656;border-radius:0 0 60% 60%}
.ringer-theme .bell .bell-cue{height:1.55em;min-width:73px;padding:0 7px;border-radius:10px;font-size:.8rem}
.ringer-theme .bell.ready .ringer-bell{background:linear-gradient(125deg,#fff7ce,#ffd56d 66%,#f0a348);box-shadow:inset -5px -5px #a264323d,0 3px #ad6b2e,0 0 24px 8px #ffc55766}
.ringer-theme .bell.ready .bell-cue{background:#ffdf8c;color:#312712}
.ringer-theme .bell.hit .ringer-bell{box-shadow:inset -5px -5px #a264323d,0 3px #ad6b2e,0 0 24px 8px #c8ed9585}
.ringer-theme .bell:focus-visible{outline:none}
.ringer-theme .bell:focus-visible .ringer-bell,.ringer-theme .quiet:focus-visible{outline:3px solid #fff0be;outline-offset:5px}
.ringer-theme .player .actions{margin-top:14px}
.ringer-theme .player .quiet{background:#193e34;color:#f9edce;border-color:#739384;font-size:.875rem}
.ringer-theme .player .quiet[aria-pressed="true"] {
  border-color: #ffdc92;
  color: #ffdc92;
}

.top:has(.leave-room) #header-bell-art {
  margin-inline-start: auto;
}

.leave-room {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #c3d6cc;
  font: 600 1.5rem/1 system-ui, sans-serif;
}

.leave-room:hover {
  background: #ffffff18;
  color: #fff4df;
}

.leave-room:focus-visible {
  outline-color: #ffdc92;
}

.player-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 16px;
  margin-top: 10px;
}

.player-tools .text-action,
.player-footer > .text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 4px;
  color: #c3d6cc;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.player-tools .text-action:hover,
.player-footer > .text-action:hover {
  color: #fff4df;
}

.room-player .player-tools #shake {
  padding: 8px 16px;
  border: 1px solid #ffd45c70;
  border-radius: 999px;
  background: #ffd45c18;
  color: #ffebad;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.room-player .player-tools #shake:is(:hover, :focus-visible) {
  background: #ffd45c2c;
  border-color: #ffd45ca8;
}

.shake-controls,
.shake-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
}

.shake-choices .quiet {
  min-width: 44px;
  padding-inline: 8px;
}

.shake-sensitivity {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #c3d6cc;
  font-size: .8rem;
}

.shake-settings {
  display: inline-block;
  text-align: center;
}

.shake-settings summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  cursor: pointer;
  list-style: none;
}

.shake-settings summary::-webkit-details-marker {
  display: none;
}

.shake-sensitivity :is(#shake-less, #shake-more) {
  min-width: 32px;
  min-height: 44px;
  padding-inline: 3px;
  font-size: 1rem;
}

#shake-level {
  min-width: 2.25em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #f9edce;
}

.shake-choices button[aria-pressed="true"] {
  background: #ffdc92;
  color: #173d32;
}

#shake-status,
#fullscreen-status {
  color: #f9edce;
  text-align: left;
}

.ringer-theme .join-page{color:var(--pine);border-top:5px solid var(--gold);margin-top:22px}
.ringer-theme .join-page .notice{color:var(--red)}
.join-submit {
  width: 100%;
  min-height: 64px;
  margin-top: 14px;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
}

.join-alternatives {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 12px;
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.join-alternatives .text-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: .875rem;
}

.join-art{height:90px}
.join-art .hero-art{transform:translate(50%,-50%) scale(.30)}
@media(min-width:580px){.ringer-art .hero-art{transform:translate(50%,-50%) scale(.32)}}
@media(max-width:370px){.ringer-theme .bell-pad{gap:7px}.ringer-theme .bell .bell-cue{min-width:0}}

.ringer-theme .bell .bell-figure{position:relative;display:block;justify-self:center;font:inherit}
.ringer-theme .bell .ringer-bell{transform-origin:50% 0}
.bell-waves{position:absolute;inset:8px -14px 4px;border:3px solid #ffe18d;border-block-color:transparent;border-radius:50%;opacity:0;pointer-events:none}


body:has(.hero) .top{display:none}.home-join{margin-top:20px}.home-join form{max-width:480px;margin:auto}

.solo{display:flex;flex-direction:column;min-height:calc(100svh - 85px)}
.ringer-theme .solo .stage{margin-bottom:10px}
.solo .bar-display{margin-top:9px}
.solo .measure{gap:5px}
.solo .beat{min-height:55px;padding:3px;gap:2px}
.solo .bar-preview .beat{min-height:41px}
.solo .bar-preview{margin-top:7px}
.solo .beat .beat-note{font-size:clamp(1.1rem,4vw,1.8rem)}
.solo .beat .chord-plus{font-size:.74rem}
.solo-settings{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:5px}
.solo-settings button{font-size:.875rem;min-height:44px;padding:6px 8px}

.solo-cues {
  position: relative;
  block-size: 166px;
}

.solo-idle:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 8px;
}

.solo-idle .solo-settings {
  grid-area: 1 / 2;
  margin: 0;
}

.solo-idle .personal-result {
  grid-area: 2 / 2;
  justify-self: end;
}

.solo-idle .solo-score {
  margin: 0;
}

.solo .solo-live .clock {
  min-height: 1.15em;
  margin: 0;
  color: #ffdc92;
  text-align: center;
}

.solo .solo-live .clock[hidden] {
  display: block !important;
  visibility: hidden;
}

.solo .solo-live .bar-display {
  margin: 0;
}

.solo .solo-live .bar-label {
  margin: 0;
  font-size: .75rem;
}

.solo .solo-live .measure {
  margin-top: 3px;
}

.solo .solo-live .beat {
  min-height: 38px;
}

.solo .solo-live .bar-preview {
  margin-top: 4px;
}

.solo .solo-live .bar-preview .beat {
  min-height: 30px;
}

.solo .solo-live .song-progress {
  position: absolute;
  bottom: 0;
  margin: 0;
}

.solo .song-picker:has(> button:disabled) {
  grid-template-columns: var(--song-arrow-width) minmax(0, 1fr) var(--song-arrow-width);
}

.solo .song-picker > button:disabled {
  display: grid;
}

.solo-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 8px;
  min-height: 44px;
  margin-top: auto;
}

.solo-footer .solo-links {
  margin: 0 0 0 auto;
}

.solo-footer #stop {
  min-height: 44px;
  padding: 6px 10px;
}

.solo-footer #fullscreen-status {
  flex-basis: 100%;
}

@media (max-width: 700px), (pointer: coarse) {
  .ringer-theme:has(main > .solo) {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
  }

  .solo-settings .tempo-choices {
    display: none;
  }

  .solo-idle:not([hidden]) {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 8px;
  }

  .solo-idle .solo-settings {
    grid-area: 1 / 1;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
  }

  .solo-idle .solo-settings :is(#start, #solo-invite) {
    width: min(100%, 280px);
    min-height: 44px;
  }

  .solo-idle .personal-result {
    grid-area: 2 / 1;
    justify-self: end;
  }

  .ringer-theme .solo .stage {
    padding-block: 6px 8px;
    margin-bottom: 8px;
  }

  .ringer-theme .solo .ringer-marquee {
    grid-template-columns: minmax(0, 1fr);
  }

  .solo .ringer-art {
    display: none;
  }

  .ringer-theme .solo .song-picker:has(> button) {
    block-size: clamp(64px, 18vw, 84px);
  }

  .ringer-theme main:has(.solo) {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    margin-block: 8px;
  }

  .ringer-theme .solo {
    flex: 1;
    width: 100%;
    min-height: 0;
  }

  .solo .solo-links {
    column-gap: 8px;
  }
}

.solo-links .text-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  text-decoration: none;
}

.solo-links .text-action:hover {
  text-decoration: underline;
}

.home-conductor-tip {
  max-width: 40ch;
  margin: 10px 0 0;
  color: #b8c3de;
  font-size: .875rem;
  line-height: 1.4;
}
.solo-settings :is(#start,#phone-start,#solo-invite,#phone-invite-inline) {
  min-inline-size: 9em;
  white-space: nowrap;
}

.song-transport #start {
  min-inline-size: 11em;
  white-space: nowrap;
}

.solo-score{color:#ffdc92;text-align:center;font-weight:800}
.ringer-theme .solo .bell-pad{align-self:center;width:min(100%,380px);margin:auto 0;gap:12px;padding:5px 0}
.ringer-theme .solo .bell-pad .bell{min-height:84px;padding:3px 0 0;gap:0}
.ringer-theme .solo .bell-pad .ringer-bell {
  width: clamp(116px, min(43vw, 23svh), 168px);
  height: auto;
  aspect-ratio: 5 / 4;
  margin: 8px auto;
  font-size: clamp(2.8rem, 10vw, 4.5rem);
}
.ringer-theme .solo .bell-pad .bell-cue{min-width:0;min-height:1.4em;padding:0 3px;font-size:.68rem}

@media (max-width: 700px) and (max-height: 520px) {
  .ringer-theme .solo .stage {
    padding-block: 5px;
    margin-bottom: 4px;
  }

  .ringer-theme .solo .song-picker:has(> button) {
    block-size: 58px;
  }

  .solo-cues {
    block-size: 132px;
  }

  .solo .solo-live .bar-preview {
    display: none;
  }

  .ringer-theme .solo .bell-pad .ringer-bell {
    width: 108px;
    margin-block: 4px;
  }

  .ringer-theme .solo .bell-pad .bell {
    min-height: 72px;
  }
}

/* Keep the bell-count controls aligned with the player's current assignment. */
.chips li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bell-count-controls {
  display: inline-flex;
  gap: 4px;
}

.chips .bell-count-button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font-size: 1.25rem;
}

.encouragement:not([hidden]) {
  padding: 10px 18px;
  animation: callout-pop 180ms ease-out;
}

.encouragement[data-kind="reminder"] {
  background: #fff4d9;
}

.encouragement[data-kind="mistake"],
.encouragement[data-kind="mash"] {
  background: #77243b;
  color: #fff5ed;
  border-color: #f0a2ad;
  box-shadow: 0 4px 12px #070c17a6;
}

.encouragement[data-kind="mash"]:not([hidden]) {
  background: linear-gradient(135deg, #98263d, #7a1c34);
  border-color: #ffd45c;
  animation: callout-mash 340ms ease-out;
}

@keyframes callout-pop {
  from { opacity: 0; transform: translateY(8px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes callout-mash {
  0% { opacity: 0; transform: scale(.92); }
  25% { opacity: 1; transform: translateX(-6px) rotate(-1.5deg); }
  55% { transform: translateX(6px) rotate(1.5deg); }
  80% { transform: translateX(-3px); }
  100% { transform: translateX(0) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .encouragement:not([hidden]) { animation: none; }
}

.ringer-bell .bell-label {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.ringer-bell .bell-pitch {
  font-size: clamp(.8rem, 3vw, 1rem);
  line-height: 1;
}

/* Round each note while keeping the four beat positions easy to follow. */
.bar-display .beat,
.stage-focused .bar-display .beat {
  border-color: #ffffff2e;
  border-radius: clamp(13px, 2vw, 30px);
}

.bar-display .beat.current,
.stage-focused .bar-display .beat.current {
  border-color: #fff2c3;
}

.bar-display .beat .beat-note,
.stage-focused .bar-display .beat .beat-note {
  min-width: 1.16em;
  min-height: 1.16em;
  border: 1px solid #fff5db70;
  border-radius: 50%;
  background: #fff5db18;
  line-height: 1;
}

.bar-display .beat.current .beat-note {
  border-color: #6f481d55;
  background: #fff6dc;
}

.bar-display .beat .beat-note.rang,
.stage-focused .bar-display .beat .beat-note.rang {
  border-color: #8bc36d;
  background: #e1f4cc;
}

.stage-focused .beat.chord .beat-note {
  font-size: clamp(1.25rem, min(6vw, 11vh), 8.5rem);
}

.stage-focused .bar-preview .beat {
  padding-block: 3px;
}

.stage-focused .bar-preview .beat.large-chord .beat-note {
  font-size: clamp(1rem, min(4vw, 4.8vh), 4rem);
}

/* Give a single assigned bell the space between the song and room controls. */
.ringer-theme .room-player:has(> .bell-pad[data-count="1"]) {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 83px);
}

.ringer-theme .room-player > .bell-pad[data-count="1"] {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
}

.ringer-theme .room-player .bell-pad[data-count="1"] .bell {
  padding: 12px 0 4px;
}

.ringer-theme .room-player .bell-pad[data-count="1"] .ringer-bell {
  width: min(76vw, 43svh, 500px);
  height: auto;
  aspect-ratio: 4 / 5;
  font-size: clamp(3rem, min(23vw, 13svh), 10rem);
}

.ringer-theme .room-player .bell-pad[data-count="1"] .bell-pitch {
  font-size: clamp(1rem, min(5.5vw, 3svh), 2.25rem);
}

/* Keep the three-bell artwork level with the site title. */
#header-bell-art {
  position: relative;
  flex: 0 0 78px;
  height: 50px;
}

#header-bell-art .hero-art {
  right: 50%;
  top: 50%;
  opacity: 1;
  transform-origin: center;
  transform: translate(50%, -50%) scale(.17);
}

.room-player .ringer-marquee {
  grid-template-columns: minmax(0, 1fr);
}

.ringer-theme .room-player {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 83px);
}

.ringer-theme .room-player > .bell-pad {
  width: 100%;
}

.ringer-theme #player-round-status {
  margin: 0 0 8px;
  font-weight: 700;
}

.player-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding: 8px 0 max(4px, env(safe-area-inset-bottom));
  background: #0d2d24;
}

.player-footer .player-tools {
  margin-top: 0;
}

.player-footer .status:empty {
  display: none;
}

.player-footer .status,
.player-footer .notice {
  margin: 0 0 4px;
}

.phone-room {
  padding: 8px 12px 12px;
  border: 1px solid #5b8471;
  border-radius: 16px;
  background: #153c32;
  text-align: center;
}

.phone-room .status {
  margin: 0;
  color: #c3d6cc;
  font-size: .8rem;
}

.phone-room .solo-settings {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 6px 0 0;
}

.phone-room .solo-settings .tempo-choices {
  align-self: center;
}

.phone-room .solo-settings :is(#phone-start, #phone-invite-inline) {
  width: 100%;
  min-height: 46px;
}

.phone-room .phone-song-pick:has(> button:disabled) {
  grid-template-columns: minmax(0, 1fr);
}

.phone-room .phone-song-pick > button:disabled {
  display: none;
}

.phone-room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.handheld-room .player-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 16px;
  padding-inline: 12px;
}

.handheld-room .player-footer > :is(.status, .notice) {
  flex-basis: 100%;
}

.handheld-room .player-footer > #party-part {
  flex-basis: 100%;
  justify-content: center;
  order: -1;
}

.phone-options-panel .phone-room-actions {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.phone-options-panel .phone-room-actions button {
  min-height: 44px;
  padding: 0 8px;
  text-align: start;
}

.phone-options-panel .actions {
  justify-content: flex-end;
}

.ringer-theme .handheld-room > .bell-pad[data-count="1"] {
  flex: 1 0 auto;
}

.ringer-theme .handheld-room > .bell-pad[data-count="1"] .ringer-bell {
  width: clamp(104px, min(39vw, 24svh), 162px);
  aspect-ratio: 5 / 4;
  font-size: clamp(2.6rem, 10vw, 4.25rem);
}

.phone-invite-dialog img {
  display: block;
  margin: 1rem auto;
  border-radius: .75rem;
}

.phone-invite-dialog input {
  width: 100%;
}

.solo-invite-dialog {
  text-align: center;
}

.solo-invite-dialog h2 {
  padding-inline: 32px;
}

.solo-invite-dialog .solo-invite-close {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  width: 44px;
  min-height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
}

.hero-copy .actions > a.quiet {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.solo-invite-dialog [data-view="invite"] > p {
  max-width: 34ch;
  margin: 8px auto 0;
  padding-inline: 28px;
  font-size: .9rem;
  line-height: 1.35;
}

.solo-invite-dialog img {
  margin-block: 10px 6px;
  padding: 6px;
  border-radius: 12px;
  background: white;
}

.solo-invite-share {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.solo-invite-share button {
  min-height: 44px;
  padding: 8px 14px;
}

.solo-invite-play {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.solo-invite-play .primary {
  width: min(100%, 220px);
  min-height: 46px;
}

.invite-screen-divider {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid #ffffff1f;
}

.invite-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.invite-screen-head .solo-invite-close {
  position: static;
}

.solo-invite-dialog .status:empty {
  display: none;
}

.phone-song-pick {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  text-align: center;
}

.phone-song-pick > button {
  min-height: 44px;
  padding: 0;
  font-size: 1.5rem;
}

.phone-room .phone-song-pick {
  block-size: 68px;
  margin-top: 2px;
}

.phone-song-pick h2 {
  margin: 0;
  font-size: var(--fitted-song-size, clamp(1.25rem, 5vw, 1.8rem));
  overflow-wrap: anywhere;
}

.ringer-theme .phone-band .stage {
  padding: 8px 10px;
  margin-bottom: 5px;
}

.phone-band .ringer-marquee h1 {
  margin: 0 0 3px;
  font-size: clamp(1.2rem, 4.8vw, 2rem);
}

.phone-band .bar-display {
  max-width: none;
  margin: 5px 0 0;
}

.phone-band .bar-label {
  font-size: .72rem;
}

.phone-band .bar-display .measure {
  gap: 3px;
  margin: 3px 0 0;
}

.phone-band .bar-display .beat {
  min-height: clamp(34px, 8svh, 58px);
  gap: 1px;
  padding: 2px;
}

.phone-band .bar-preview {
  margin-top: 4px;
}

.phone-band .bar-preview .beat {
  min-height: clamp(24px, 5svh, 40px);
}

.phone-band .bar-display .beat-note {
  font-size: clamp(.8rem, 3.6vw, 1.35rem);
}

.phone-band .bar-display .measure.subdivided .chord-plus {
  display: none;
}

.phone-band .bar-display .beat .your-note {
  border-color: #ffdf87;
  background: #ffdf87;
  color: #38291b;
  font-weight: 900;
}

.phone-band .bar-display .beat.current .your-note {
  border-color: #173d32;
  background: #173d32;
  color: #fff6dc;
}

.ringer-theme .phone-band:not(.handheld-room):has(.stage:not([hidden])) .bell-pad[data-count="1"] .ringer-bell {
  width: min(64vw, 32svh, 250px);
}

@media (max-height: 650px) {
  .phone-band .bar-preview {
    display: none;
  }

  .ringer-theme .phone-band:has(.stage:not([hidden])) .bell-pad[data-count="2"] .bell {
    padding-block: 10px;
  }

  .ringer-theme .phone-band:has(.stage:not([hidden])) .bell-pad[data-count="2"] .ringer-bell {
    aspect-ratio: 1 / 1;
  }
}

.ringer-theme .room-player .bell-pad:is([data-count="2"], [data-count="3"]) .ringer-bell {
  width: min(38vw, 32svh, 215px);
  height: auto;
  aspect-ratio: 1 / 1;
  font-size: clamp(2.75rem, min(13vw, 10svh), 5rem);
}

.ringer-theme .room-player .bell-pad:is([data-count="2"], [data-count="3"]) .bell-pitch {
  font-size: clamp(1rem, 4vw, 1.4rem);
}

@media (orientation: portrait) and (max-width: 600px) {
  .ringer-theme .room-player > .bell-pad[data-count="2"] {
    flex: 1;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .ringer-theme .room-player .bell-pad[data-count="2"] .bell {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 6px clamp(20px, 5svh, 48px);
  }

  .ringer-theme .room-player .bell-pad[data-count="2"] .bell:nth-child(2) {
    padding-block: clamp(30px, 7svh, 64px) 12px;
  }

  .ringer-theme .room-player .bell-pad[data-count="2"] .bell-figure {
    width: min(100%, 38svh, 250px);
  }

  .ringer-theme .room-player .bell-pad[data-count="2"] .ringer-bell {
    width: 100%;
    aspect-ratio: 4 / 5;
    font-size: clamp(3rem, min(16vw, 10svh), 5.5rem);
  }

  .ringer-theme .room-player .bell-pad[data-count="2"] .bell-cue {
    justify-self: center;
  }
}

/* Keep the live scores legible and stable beside the changing beat cues. */



.phone-bell-icon {
  width: 19px;
  height: 19px;
  flex: none;
}

.song-picker {
  --song-arrow-width: clamp(46px, 6vw, 64px);
  display: grid;
  grid-template-columns: var(--song-arrow-width) minmax(0, 1fr) var(--song-arrow-width);
  align-items: center;
  gap: clamp(3px, 1.6vw, 18px);
  text-align: center;
}

/* Keep the picker height stable while browsing songs. */
.song-picker:has(> button:enabled) {
  container-type: inline-size;
  block-size: clamp(100px, 15vw, 170px);
}

.song-picker:has(> button:enabled) h1 {
  margin: 0;
  font-size: var(--fitted-song-size, clamp(1.35rem, 9cqi, 4.45rem));
  line-height: 1.03;
  text-wrap: balance;
}

.solo .song-picker {
  container-type: inline-size;
  block-size: clamp(124px, 24vw, 170px);
}
.solo .song-picker h1 {
  margin: 0;
  font-size: var(--fitted-song-size, clamp(1.125rem, 8.5cqi, 2rem));
  line-height: 1.03;
  text-wrap: balance;
}

.song-picker h1 {
  overflow-wrap: anywhere;
}

.song-copyright {
  margin-inline-start: .2em;
  color: #b8c3de;
  font-size: .28em;
  font-weight: 650;
  letter-spacing: normal;
  line-height: 0;
  text-shadow: none;
}

.song-picker > button {
  display: grid;
  place-items: center;
  width: var(--song-arrow-width);
  aspect-ratio: 1;
  border: 1px solid #b7a57c;
  border-radius: 12px;
  background: #171f33;
  color: #ffdf87;
  box-shadow: inset 0 1px #ffffff18;
}

.song-picker > button::before {
  content: '';
  width: 12px;
  height: 12px;
  border: solid currentColor;
  border-width: 3px 3px 0 0;
}

#previous-song::before {
  transform: translateX(2px) rotate(-135deg);
}

#next-song::before {
  transform: translateX(-2px) rotate(45deg);
}

.song-picker > button:is(:hover, :focus-visible) {
  border-color: #ffdf87;
  background: #303c59;
}

.song-picker > button:disabled {
  visibility: hidden;
}

.stage .song-group {
  display: inline-block;
  margin: 0;
  color: #b8c3de;
  font-size: .8rem;
  font-weight: 700;
}

.conductor-stage:has(.song-transport:not([hidden])) .stage-title {
  position: relative;
  min-width: 0;
  padding-bottom: 26px;
}

.conductor-stage:has(.song-transport:not([hidden])) .song-group {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
}

.solo .stage-title {
  min-width: 0;
}

.solo .stage .song-group {
  display: block;
  min-height: 1rem;
  text-align: center;
}

.solo .stage .song-group[hidden] {
  display: block !important;
  visibility: hidden;
}

.tempo-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tempo-choices button > span {
  font-size: 1.2em;
}

.tempo-choices .tempo-label {
  margin-left: .25em;
  font-size: inherit;
}

.tempo-choices button[aria-pressed="true"] {
  border-color: #977343;
  box-shadow: inset 0 0 0 1px #977343;
  background: #f2e4c6;
  color: #302414;
}

.actions a {
  gap: 8px;
}

/* The stage has one transport, with room utilities in a separate disclosure. */
.song-transport {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.transport-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.stage-focused .bell-check-active .clock {
  font-size: clamp(2rem, 7vw, 7rem);
  overflow-wrap: anywhere;
}

.roll-call-cues {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(4px, 2vw, 24px);
}

.roll-call-cues #roll-call-bell { grid-column: 2; grid-row: 1; }
.roll-call-cues #wrong-bell-left { grid-column: 1; grid-row: 1; }
.roll-call-cues #wrong-bell-right { grid-column: 3; grid-row: 1; }

.roll-call-cues .wrong-bell {
  padding: clamp(6px, 1.5vw, 16px);
  border-radius: 12px;
  background: #671228;
  color: #fff1e3;
  font-size: clamp(.875rem, 2.5vw, 2.5rem);
  font-weight: 800;
}

.song-transport #start:disabled {
  cursor: default;
}

.song-transport .tempo-choices {
  gap: 0;
}

.song-transport .tempo-choices button {
  min-width: 40px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  font-size: .875rem;
  filter: saturate(.35);
  opacity: .6;
}

.song-transport .tempo-choices button[aria-pressed="true"] {
  opacity: 1;
  filter: saturate(.85);
  background: #dbe2ff14;
}

.song-transport .tempo-label {
  display: none;
}

.text-action {
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 700;
  text-underline-offset: 3px;
}

.text-action:hover {
  text-decoration: underline;
}

.room-deck {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(12px, 2.4vw, 30px);
  margin-top: 14px;
  padding: clamp(12px, 2.1vw, 24px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.room-invite {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: clamp(12px, 2vw, 24px);
  border-right: 1px solid var(--line);
}

.room-invite > img {
  flex: none;
  width: clamp(170px, 20vw, 220px);
  height: auto;
  aspect-ratio: 1;
  padding: 6px;
  image-rendering: pixelated;
}

#open-display {
  display: block;
  text-align: start;
}

.room-deck h2 {
  font-size: 1.2rem;
}

.room-invite .room-code {
  margin-top: 4px;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.room-options {
  position: fixed;
  inset: 12px 12px auto auto;
  width: min(345px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--deck-edge);
  border-radius: 14px;
  background: var(--deck);
  color: var(--deck-text);
  box-shadow: 0 16px 54px #070b18a6;
}

.room-options[open] {
  display: flex;
  flex-direction: column;
}

.room-options::backdrop {
  background: #080d1b75;
}

.room-options.display-invite {
  inset: 0;
  z-index: 3;
  width: min(380px, calc(100vw - 24px));
  height: fit-content;
  margin: auto;
  overflow: auto;
  text-align: center;
}

.display-invite p {
  padding: 12px 16px 0;
}

.display-invite img {
  width: min(240px, calc(100% - 32px));
  height: auto;
  aspect-ratio: 1;
  margin: 14px auto 12px;
  padding: 6px;
  border-radius: 12px;
  background: white;
  image-rendering: pixelated;
}

.display-invite-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0 16px 14px;
}

.display-invite-actions button {
  min-height: 44px;
  padding: 8px 14px;
}

.display-invite input {
  width: calc(100% - 32px);
  margin: 0 16px 12px;
}

.display-invite .status {
  padding: 0 16px 14px;
}

.display-invite .status:empty {
  display: none;
}

body:has(#room-options[open]) {
  overflow: hidden;
}

.room-tools {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.room-tools #speaker {
  min-height: 44px;
  padding-inline: 8px;
  color: var(--deck-muted);
  font-size: .875rem;
  text-align: right;
}

.options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--deck-edge);
}

.options-header h2 {
  font-size: 1.2rem;
}

#open-options,
#close-options {
  min-height: 44px;
  padding-inline: 10px;
}

.options-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
}

#options-error {
  margin: 8px 16px 0;
  color: #ffb4bf;
}

@media (max-width: 540px) {
  .room-options {
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 80dvh;
    border-radius: 16px 16px 0 0;
  }

  .options-list {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}

.options-list > :is(button, a) {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--pine);
  text-align: left;
  text-decoration: none;
}

.options-list > :is(button, a):hover {
  background: #eaf0e4;
}

.options-back {
  min-height: 44px;
  padding-inline: 6px;
}

.options-chevron,
.options-list #name-takeover small {
  margin-left: auto;
  color: var(--deck-muted);
  font-size: .85rem;
}

.options-bell-icon {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 4px;
}

.room-bell-setting {
  min-width: 0;
  margin: 0 2px 4px;
  padding: 6px 6px 8px;
  border: 0;
  border-bottom: 1px solid var(--deck-edge);
}

.room-bell-setting legend {
  padding: 0;
  color: var(--deck-muted);
  font-size: .8rem;
}

.room-bell-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: #090f1e;
}

.room-bell-choices button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--deck-text);
  font-weight: 750;
}

.room-bell-choices button[aria-pressed="true"],
.room-options .tempo-choices button[aria-pressed="true"] {
  background: #dbe2ff;
  color: #161d36;
  box-shadow: none;
}

.room-options .tempo-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: #090f1e;
}

.room-options .tempo-choices button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--deck-text);
  font-weight: 750;
}

.room-options .tempo-choices .tempo-label {
  display: inline;
  margin-left: 0;
  font-size: .85rem;
}

.options-list #cues::after {
  margin-left: auto;
  color: var(--muted);
  font-size: .8rem;
}

.room-audio-option {
  min-width: 0;
  margin: 2px 0;
  padding: 2px 0 4px;
  border: 0;
}

.room-audio-option legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 4px;
  font-weight: 750;
}

.room-audio-option label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  padding: 4px 8px 4px 28px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.room-audio-option label:has(input:checked) {
  background: #2e3b59;
  color: #fff2c8;
}

.room-audio-option input {
  flex: none;
  width: 16px;
  min-height: 0;
  margin: 0;
  accent-color: #ffd45c;
}

.audio-tools {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--deck-edge);
}

.options-list > #demo {
  margin-top: 8px;
}

.options-list #cues[aria-pressed="true"]::after { content: "On"; }
.options-list #cues[aria-pressed="false"]::after { content: "Off"; }

@media (max-width: 580px) {
  .conductor-stage:has(.song-transport:not([hidden])) .stage-marquee {
    grid-template-columns: minmax(0, 1fr);
  }

  .conductor-stage:has(.song-transport:not([hidden])) :is(.stage-stars, .stage-mascot) {
    display: none;
  }
}

@media (max-width: 760px) {
  .room-deck {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "invite invite"
      "roster tools";
  }

  .room-invite {
    grid-area: invite;
    padding: 0;
    border: 0;
  }

  .room-invite > img {
    width: clamp(120px, 41vw, 174px);
  }

  .room-roster {
    grid-area: roster;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .room-tools {
    grid-area: tools;
  }
}

.stage .clock:is([data-phase="count-in"], [data-phase="first-beat"]) {
  display: inline-grid;
  place-items: center;
  min-width: 1.9em;
  min-height: 1.65em;
  margin: .2em 0 0;
  padding: 0 .4em;
  border: 2px solid #ffdc92;
  border-radius: 999px;
  color: #ffdc92;
  font-size: clamp(1.55rem, min(5vw, 5vh), 4.5rem);
  line-height: 1;
}

.stage .clock[data-phase="first-beat"] {
  background: #ffdc92;
  color: #302414;
}

/* Arcade palette for the lobby and both conductor displays. */
body:has(.room-deck),
body.second-screen {
  --cabinet: #0b1220;
  --deck: #151d2c;
  --deck-edge: #39465d;
  --deck-text: #f8f2e5;
  --deck-muted: #aab9d2;
  min-height: 100svh;
  background: radial-gradient(ellipse at 50% 0%, #26334b, var(--cabinet) 62%);
  color: var(--deck-text);
}

body:has(.room-deck) .top {
  min-height: 64px;
  border-color: #ffffff19;
}

.display-lobby {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-block-start: 16px;
  padding: 16px;
  border: 1px solid var(--deck-edge);
  border-radius: 18px;
  background: var(--deck);
}

.display-lobby img {
  width: min(220px, 100%);
  height: auto;
  border-radius: 8px;
  image-rendering: pixelated;
}

@media (min-width: 761px) {
  body:has(.room-deck),
  body.second-screen {
    --lobby-gutter: clamp(24px, 3.4vw, 64px);
  }

  body:has(.room-deck):not(.stage-focused) main,
  body.second-screen:not(.stage-focused) main {
    width: min(1760px, calc(100% - 2 * var(--lobby-gutter)));
  }

  body:has(.room-deck) .top {
    padding-inline: max(var(--lobby-gutter), calc((100% - 1760px) / 2));
  }

  .conductor-stage:has(.song-transport:not([hidden])) {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: clamp(320px, 40svh, 480px);
  }

  .conductor-stage:has(.song-transport:not([hidden])) .stage-marquee {
    flex: 1;
  }

  .room-invite > img {
    width: clamp(220px, 21vw, 290px);
  }
}

.stage-actions:has(:is([data-fullscreen], #stage-party-next):not([hidden])) {
  flex-wrap: wrap;
  max-width: calc(100% - 24px);
}

body:has(.room-deck) .room-deck h2 {
  font: 850 1.05rem/1.15 system-ui, sans-serif;
}

/* The header uses the same crowned bell and warm accent on every screen. */
.top {
  background: #141d35;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

#conductor-screen-number {
  color: #aab9d2;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
}

#status.room-reconnecting {
  position: fixed;
  inset: auto 12px max(12px, env(safe-area-inset-bottom)) auto;
  z-index: 5;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border: 1px solid #596889;
  border-radius: 10px;
  background: #151d2c;
  color: #fff4df;
}

#status.room-reconnecting button {
  margin-inline-start: 8px;
}

.top .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #fff4df;
  font: 780 clamp(1.15rem, 2.2vw, 1.5rem)/1 system-ui, sans-serif;
  letter-spacing: -.035em;
}

.top .brand-mark {
  flex: none;
  width: clamp(26px, 4vw, 32px);
  height: auto;
}

.top .brand-wordmark {
  margin: 0;
}

.top .brand-wordmark b {
  color: var(--gold, #ffce73);
  font-weight: inherit;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions:not(:has(.leave-room, .bell-tally:not([hidden]))) {
  display: none;
}

.bell-tally {
  padding: 4px 8px;
  border: 1px solid #ffce7340;
  border-radius: 8px;
  background: #141d35;
  color: #e1d4b8;
  font: 600 .65rem/1.2 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.bell-tally strong {
  display: block;
  color: #ffce73;
  font-size: .95rem;
}

#conductor-build {
  display: none;
}

@media (min-width: 761px) and (pointer: fine) {
  .conductor-view #conductor-build {
    display: block;
    position: fixed;
    inset: auto 8px 4px auto;
    color: #a9b5cb;
    opacity: .65;
    font: 500 .65rem/1.2 system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
  }
}

body:has(.hero) .top:has(.bell-tally:not([hidden])),
.stage-focused .top:has(.bell-tally:not([hidden])) {
  display: contents;
}

body:has(.hero) .top > :not(.header-actions),
.stage-focused .top > :not(.header-actions),
body:has(.hero) .header-actions > :not(.bell-tally),
.stage-focused .header-actions > :not(.bell-tally) {
  display: none;
}

body:has(.hero) .bell-tally,
.stage-focused .bell-tally {
  position: absolute;
  z-index: 2;
  inset: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) auto auto;
}

@media (max-width: 580px) {
  .top:has(.bell-tally:not([hidden])) #header-bell-art {
    display: none;
  }
  .header-brand {
    gap: 6px;
  }
  .top:has(.bell-tally.long-count:not([hidden])) {
    padding-inline: 10px;
    gap: 6px;
  }
  .bell-tally.long-count strong {
    font-size: .72rem;
  }
}

.stats-page {
  background: #141d35;
  color: #fff4df;
  min-height: 100vh;
}

.stats-page h1,
.stats-page h2 {
  margin-block: 24px 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 12px;
}

.stats-grid > div {
  padding: 14px;
  border: 1px solid #596889;
  border-radius: 10px;
  background: #1c2740;
}

.stats-grid dd {
  margin: 4px 0 0;
  color: #ffce73;
  font-size: 1.5rem;
  font-weight: 750;
}

.stats-scroll {
  overflow-x: auto;
}

.stats-page table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.stats-page th,
.stats-page td {
  padding: 8px;
  border-bottom: 1px solid #596889;
}

.personal-result:has(.result-share:not([hidden])) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  margin-bottom: 8px;
}

.ringer-theme .personal-result:has(.result-share:not([hidden])) #player-round-status {
  margin: 0;
}

.result-share,
.result-actions .text-action.result-share {
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid #ffce7366;
  border-radius: 8px;
  background: #ffce7312;
  color: #ffe09d;
}

.result-actions:has(> .result-share:only-child[hidden]) {
  display: none;
}

.share-result-dialog {
  width: min(480px, calc(100% - 28px));
  padding: 20px;
  border: 1px solid #596889;
  border-radius: 14px;
  background: #151d2c;
  color: #fff4df;
}

.share-result-dialog::backdrop {
  background: #080d18c9;
}

.conductor-welcome {
  box-sizing: border-box;
  padding: clamp(14px, 4vw, 24px);
  text-align: center;
}

.conductor-welcome h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
}

.conductor-welcome p {
  margin: 0 auto 12px;
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.4;
}

.conductor-welcome .conductor-welcome-tip {
  color: #b8c3de;
  font-size: .9rem;
}

.share-result-dialog label {
  margin-top: 16px;
}

.share-result-dialog textarea {
  display: block;
  width: 100%;
  min-height: 9rem;
  padding: 10px;
  border: 1px solid #596889;
  border-radius: 8px;
  background: #101726;
  color: inherit;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.share-result-dialog .actions {
  align-items: center;
}

.share-result-dialog [role="status"]:not(:empty) {
  margin-top: 12px;
}

.share-result-dialog.share-card-dialog {
  width: min(540px, calc(100% - 28px));
  padding: 20px;
  position: relative;
}

.share-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.share-dialog-head h2 {
  margin: 0;
}

.share-dialog-head .solo-invite-close {
  position: static;
  margin-inline-end: -8px;
}

.share-card-frame {
  margin: 0;
  aspect-ratio: 1200 / 630;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ffce7352;
  background: #0f1830;
  box-shadow: 0 12px 28px #00000066;
}

.share-card-preview {
  display: block;
  width: 100%;
  height: auto;
}

.share-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.share-card-actions button {
  min-height: 44px;
  padding: 8px 15px;
}

.share-card-actions .quiet {
  border-color: #7285ab80;
  background: #ffffff12;
  color: #eef3ff;
}

.share-card-actions .quiet:hover:enabled {
  background: #ffffff20;
  border-color: #9cb0d8;
}

.share-message-details {
  margin-top: 12px;
}

.share-message-details > summary {
  display: inline-block;
  padding: 4px 0;
  font-size: .9rem;
  color: var(--deck-muted);
}

.share-card-dialog textarea {
  min-height: 6.5rem;
  margin-top: 8px;
  font-size: .92rem;
}

@media (max-width: 580px) {
  .share-result-dialog {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 85dvh;
    margin: 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 580px) and (prefers-reduced-motion: no-preference) {
  .share-result-dialog[open] {
    animation: share-sheet-in 160ms ease-out;
  }
}

@keyframes share-sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.conductor-stage {
  isolation: isolate;
  border: 1px solid #596889;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 50% 35%, #3a4370, transparent 62%),
    radial-gradient(circle at 82% 45%, #443658, transparent 29%),
    linear-gradient(155deg, #19243c, #0d1423 74%);
  box-shadow: inset 0 1px #ffffff24, 0 14px 44px #03071080;
}

.conductor-stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, #c0cbff20 1px, transparent 1.5px) 0 0 / 12px 12px;
  mask-image: linear-gradient(transparent, #000 54%, transparent);
  content: "";
  pointer-events: none;
}

.conductor-stage h1 {
  color: #fff4df;
  font-family: system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: -.065em;
  text-shadow: 0 4px #0b1026, 0 6px #8193ed75;
}

.conductor-stage .stage-mascot {
  filter: drop-shadow(0 0 20px #ffc75a45);
}

.conductor-stage:has(.song-transport:not([hidden])) {
  padding-bottom: 12px;
}

.song-transport #start {
  min-height: 52px;
  min-width: 196px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #b8c3de;
  font-size: 1.05rem;
  font-weight: 800;
}

.song-transport #start:not(:disabled) {
  background: #ffd45c;
  color: #241a0e;
  box-shadow: 0 6px 22px #ffd45c2e;
}

.song-transport :is(#start, .tempo-choices button):not(:disabled):is(:hover, :focus-visible) {
  background: #dbe2ff20;
  opacity: 1;
}

.song-transport #start:not(:disabled):is(:hover, :focus-visible) {
  background: #ffe595;
}

.song-transport .start-hint {
  color: var(--deck-muted);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
}

.song-transport #start:disabled {
  border: 1px solid #ffd45c45;
  color: #e4c788;
  opacity: .8;
}

.room-deck {
  border-color: var(--deck-edge);
  background: var(--deck);
  color: var(--deck-text);
}

.room-deck .room-invite,
.room-deck .room-roster {
  border-color: var(--deck-edge);
}

.room-invite > img {
  border-radius: 8px;
  background: white;
}

.room-deck .room-code {
  color: #ffd45c;
}

.room-deck .text-action,
.room-deck #player-count,
.room-options #cues::after,
body:has(.room-deck) #status {
  color: var(--deck-muted);
}

.room-options .options-list > :is(button, a) {
  color: var(--deck-text);
}

.room-tools #open-options:hover,
.room-options .options-list > :is(button, a):hover,
.room-deck .chips li {
  background: #26334b;
}

.room-deck .chips .bell-count-button {
  border-color: #576a8b;
  background: #172135;
  color: #dbe2ff;
}

body:has(.room-deck) :is(button, a, summary):focus-visible {
  outline: 2px solid #ffd45c;
  outline-offset: 3px;
}

.stage-focused .conductor-stage {
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 20%, #363e67, transparent 65%),
    linear-gradient(155deg, #19243c, #0a1020 74%);
}

.stage-focused .conductor-stage::before {
  height: 4px;
  background: linear-gradient(90deg, transparent, #ffd45c 33%, #a6adff 67%, transparent);
}

.song-picker:has(> button:disabled) {
  grid-template-columns: minmax(0, 1fr);
}

.song-picker > button:disabled {
  display: none;
}

.conductor-stage .bar-display .beat {
  background: #17233c;
}

.conductor-stage .bar-preview .beat {
  background: #0f192c;
}

/* Keep both preview rows in view without giving them equal weight to the live cues. */
.stage-focused .conductor-stage .bar-label {
  font-size: clamp(.8rem, 2.15dvh, 1.7rem);
}

.stage-focused .conductor-stage .bar-current .beat {
  height: clamp(68px, 23dvh, 290px);
}

.stage-focused .conductor-stage .bar-current .beat-note {
  font-size: clamp(1.65rem, min(9vw, 14dvh), 10rem);
}

.stage-focused .conductor-stage .bar-current .chord .beat-note {
  font-size: clamp(1.15rem, min(6vw, 9dvh), 7rem);
}

.stage-focused .conductor-stage .bar-preview {
  margin-top: clamp(5px, 1dvh, 14px);
}

.stage-focused .conductor-stage .bar-preview .beat {
  height: clamp(45px, 12dvh, 148px);
}

.stage-focused .conductor-stage .bar-preview .beat-note {
  font-size: clamp(1rem, min(5vw, 7dvh), 5rem);
}

.stage-focused .conductor-stage .bar-preview .large-chord .beat-note {
  font-size: clamp(.85rem, min(4vw, 4.3dvh), 3.6rem);
}

.conductor-stage .bar-preview + .bar-preview .bar-label {
  color: #aab9d2;
}

.conductor-stage .bar-display {
  position: relative;
  overflow: clip;
  overflow-clip-margin: 8px;
}

.bar-exit {
  position: absolute;
  inset: 0 0 auto;
  pointer-events: none;
}

.conductor-stage .bar-display .beat.current {
  background: linear-gradient(145deg, #ffe792, #ffc550);
  box-shadow: 0 0 16px #ffd45c60;
}

.bar-display .measure {
  grid-template-columns: repeat(var(--cue-columns, 4), minmax(0, 1fr));
}

.conductor-stage .bar-display .measure.subdivided .beat {
  padding-inline: 1px;
}

.conductor-stage .bar-display .measure.subdivided .beat-note {
  font-size: clamp(1rem, min(6vw, 10dvh), 6rem);
}

.conductor-stage .bar-display .measure.subdivided .chord .beat-note {
  font-size: clamp(.8rem, min(3.7vw, 6dvh), 4rem);
}

.conductor-stage .bar-display .measure.subdivided .large-chord .beat-note {
  font-size: clamp(.75rem, min(3.5vw, 4.2dvh), 3.5rem);
}

.conductor-stage .bar-preview .measure.subdivided .beat-note {
  font-size: clamp(.85rem, min(5vw, 6.5dvh), 4.5rem);
}

.conductor-stage .bar-preview .measure.subdivided .chord .beat-note {
  font-size: clamp(.75rem, min(3.4vw, 4.3dvh), 3.5rem);
}

.conductor-stage .bar-preview .measure.subdivided .large-chord .beat-note {
  font-size: clamp(.7rem, min(3.3vw, 3.8dvh), 3rem);
}

.bar-display .measure .beat .beat-note.automatic-pitch {
  min-width: 0;
  border-radius: .35em;
  padding: 0 .16em;
  font-size: clamp(.8rem, min(3vw, 3.5dvh), 2.1rem);
}

.bar-display .measure .beat .beat-note.conductor-note {
  border-color: currentColor;
  border-style: dashed;
  border-width: clamp(1px, .035em, 2px);
  background: transparent;
  color: inherit;
  opacity: .46;
  box-shadow: none;
}

.bar-display .measure .beat .beat-note.conductor-note.rang {
  opacity: .72;
  box-shadow: inset 0 0 0 1px currentColor;
}

.player-away {
  color: var(--deck-muted);
}

.conductor-stage .song-progress::-webkit-progress-value {
  background: linear-gradient(90deg, #a6adff, #ffd45c);
}

.round-results {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: clamp(20px, 5vw, 70px);
  padding: clamp(22px, 5vw, 64px);
  border: 1px solid #7771a6;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 15% 10%, #4a437a, transparent 60%),
    linear-gradient(155deg, #28314d, #10192b 76%);
  box-shadow: 0 16px 52px #03071090;
}

.result-intro {
  container-type: inline-size;
}

.result-intro > p {
  color: #ffd45c;
  font-weight: 850;
}

.result-intro h1 {
  margin-top: 8px;
  color: #fff4df;
  font: 900 clamp(2.1rem, 5vw, 4.8rem)/.99 system-ui, sans-serif;
  letter-spacing: -.06em;
  overflow-wrap: anywhere;
  text-shadow: 0 4px #121830;
}

.result-intro h1:focus {
  outline: none;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 384px);
  margin-top: clamp(18px, 3.5vw, 32px);
}

#replay.primary,
#party-next {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 10px 22px;
  border-radius: 12px;
  background: linear-gradient(#ffe48a, #ffc34f);
  box-shadow: 0 4px #a86322;
  font-size: 1.2rem;
  font-weight: 850;
}

#replay.primary:hover:enabled,
#party-next:hover:enabled {
  background: #ffe595;
}

#replay > [aria-hidden] {
  font-size: 1.25em;
}

.result-actions .result-share,
.result-actions #try-party,
.result-actions #replay.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: .94rem;
  font-weight: 750;
  line-height: 1.15;
  white-space: nowrap;
}

.result-actions .text-action.result-share {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #ffce7366;
  border-radius: 10px;
  background: #ffce7316;
  color: #ffe09d;
  text-decoration: none;
}

.result-actions .text-action.result-share:hover:enabled {
  background: #ffce7328;
  border-color: #ffce73aa;
}

.result-actions #try-party,
.result-actions #replay.quiet {
  border: 1px solid #7285ab80;
  background: #ffffff12;
  color: #eef3ff;
}

.result-actions #try-party:hover:enabled,
.result-actions #replay.quiet:hover:enabled {
  background: #ffffff20;
  border-color: #9cb0d8;
}

.result-actions:not(:has(#try-party:not([hidden]), #replay.quiet:not([hidden]))) .result-share {
  grid-column: 1 / -1;
}

.second-screen .result-actions {
  width: fit-content;
  min-width: 210px;
}

.result-actions #change-song {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 36px;
  padding: 4px 2px;
  margin-top: 2px;
  color: var(--deck-muted);
  font-size: .94rem;
  font-weight: 650;
}

.result-actions #change-song:hover:enabled {
  color: #fff4df;
}

@container (max-width: 356px) {
  .result-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.party-countdown {
  margin-top: clamp(12px, 2.5vw, 22px);
  padding: 10px 12px 4px;
  border: 1px solid #7283a970;
  border-radius: 10px;
  background: #111b30;
}

.party-countdown-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

#party-countdown-label {
  color: #ffe18d;
  font-variant-numeric: tabular-nums;
}

#party-countdown-progress {
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 8px;
  accent-color: #ffd45c;
}

#party-countdown-toggle {
  color: var(--deck-muted);
  font-size: .85rem;
}

.band-result {
  border: 1px solid #ffe38d70;
  border-radius: 16px;
  padding: clamp(14px, 3vw, 26px);
  background: linear-gradient(115deg, #3c3246, #18243d 75%);
}

.band-result h2 {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
}

#band-accuracy {
  display: block;
  color: #ffe18d;
  font: 900 clamp(2.4rem, 7vw, 5rem)/1.05 system-ui, sans-serif;
  margin-block: 6px;
}

#band-stats {
  color: #dbe4ff;
}

.finale-hit {
  margin-top: 12px;
  color: #fff1bd;
  font-weight: 850;
}

.party-result:has(.finale-hit:not([hidden])) .band-result {
  border-color: #ffe18d;
  box-shadow: 0 0 24px #ffc96565;
  animation: finale-glow 1.1s ease-out both;
}

@keyframes finale-glow {
  from { box-shadow: 0 0 8px #ffc96520; }
  45% { box-shadow: 0 0 54px #ffc965a6; }
  to { box-shadow: 0 0 24px #ffc96565; }
}

@media (prefers-reduced-motion: reduce) {
  .party-result:has(.finale-hit:not([hidden])) .band-result { animation: none; }
}

.final-scores {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.final-scores .result-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 2vw, 18px);
  padding: 12px clamp(10px, 2vw, 20px);
  border: 1px solid #7484a452;
  border-radius: 12px;
  background: #111b30;
}

.final-scores .top-score {
  border-color: #ffd45c94;
  background: linear-gradient(105deg, #342f38, #151f34 69%);
}

#result-leaderboard {
  block-size: clamp(8rem, 34dvh, 15rem);
}

.band-result #result-leaderboard {
  margin-top: 12px;
}

#roster-scroll {
  block-size: clamp(6rem, 20dvh, 13rem);
}

.dashboard-scroll {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  overflow-anchor: none;
  scrollbar-gutter: stable;
}

.dashboard-scroll:focus-visible {
  outline: 2px solid #ffe18d;
  outline-offset: 2px;
}

.final-scores.compact-scores {
  gap: 5px 10px;
}

.compact-scores .result-entry {
  grid-template-columns: 2em minmax(0, 1fr) auto;
  gap: .5rem;
  padding: .35rem .6rem;
  border-radius: 8px;
}

.compact-scores .result-player h2,
.compact-scores .result-value {
  font-size: clamp(.92rem, 1.35vw, 1.18rem);
}

.compact-scores .result-value {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1050px) {
  .compact-scores:has(> :nth-child(5)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.result-rank {
  display: grid;
  place-items: center;
  width: 1.8em;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #293854;
  color: #e2eafe;
  font-weight: 850;
}

.top-score .result-rank {
  background: #ffd45c;
  color: #241a0e;
}

.result-player h2 {
  font: 850 clamp(1rem, 2.4vw, 1.45rem)/1.2 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.result-value {
  color: #ffd45c;
  font-size: clamp(1.3rem, 4vw, 2.5rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 680px) {
  .round-results {
    grid-template-columns: minmax(0, 1fr);
  }
}
#player-round-controls {
  text-align: center;
}

#player-round-controls > summary {
  display: list-item;
  width: fit-content;
  margin-inline: auto;
  padding-block: 10px;
  color: #d8e4d5;
  cursor: pointer;
}

.player-round-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}

.player-round-controls .player-admin-picker {
  width: min(100%, 22rem);
  margin: 0;
  flex: 0 0 100%;
  max-width: 22rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.player-round-controls .player-admin-picker .quiet {
  font-size: 1.5rem;
}

.party-part {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  min-width: 0;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.party-part[hidden] {
  display: none;
}

.party-part legend {
  float: left;
  margin: 0 2px 0 0;
  color: #9ab3a6;
  font-size: .8rem;
}

.party-part .text-action {
  min-height: 36px;
  color: #9ab3a6;
  font-size: .8rem;
}

.party-part .text-action[aria-pressed="true"] {
  color: #e6f2ec;
}

.hero .home-brand {
  font-size: clamp(2.7rem, 10.5vw, 7.8rem);
}

.party-part button[aria-pressed="false"] span {
  visibility: hidden;
}

.drum-circle #stage-mascot {
  visibility: hidden;
}

/* Use the same team colour on the roster, score and playing pad. */
.drum-circle [data-note="1"] { --drum-team: #7bd5ff; }
.drum-circle [data-note="2"] { --drum-team: #ff9cbd; }
.drum-circle [data-note="3"] { --drum-team: #b4ed82; }
.mixed-groove [data-note="4"] { --drum-team: #ffc174; }
.mixed-groove :is([data-note="5"], [data-note="6"], [data-note="7"], [data-note="8"], [data-note="9"]) {
  --drum-team: #d7bbff;
}

.drum-team-label {
  display: inline-block;
  margin-inline-end: .3em;
  padding: .12em .42em;
  border-radius: .35em;
  background: var(--drum-team);
  color: #172238;
  font-weight: 750;
}

.drum-circle .bar-display .measure .beat {
  container-type: inline-size;
  padding-inline: 2px;
}

/* Stack simultaneous hits and size their labels against the actual beat cell. */
.drum-circle .bar-display .measure .beat.chord {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.drum-circle .bar-display .measure .beat .beat-note {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  flex-shrink: 0;
  padding: .08em .2em;
  border-radius: .4em;
  font-size: min(20cqi, 2.25rem);
  line-height: 1;
  border-color: var(--drum-team);
  background: var(--drum-team);
  color: #172238;
  font-weight: 850;
}

.drum-circle .bar-display .measure .beat .beat-note.conductor-note {
  background: #172238;
  color: var(--drum-team);
}

.drum-circle .phone-band .bar-display .measure .beat .beat-note:not(.your-note) {
  background: #16283a;
  color: var(--drum-team);
}

.drum-circle .phone-band .bar-display .measure .beat.current .your-note {
  outline: 2px solid #172238;
  outline-offset: 1px;
}

.drum-circle .bar-display .measure .beat.chord .beat-note {
  font-size: min(20cqi, 2.8dvh, 1.7rem);
}

.drum-circle .bar-preview .measure .beat.chord .beat-note {
  font-size: min(20cqi, 2dvh, 1.35rem);
}

.drum-circle .phone-band .bar-display .measure .beat .beat-note {
  font-size: min(20cqi, .9rem);
}

.drum-circle .phone-band .bar-preview .measure .beat.chord .beat-note {
  font-size: min(20cqi, .75rem);
}

.drum-circle.ringer-theme .bell .ringer-bell {
  width: min(37vw, 180px);
  height: clamp(75px, 24vw, 135px);
  border-radius: 24px;
  font-size: clamp(1.05rem, 5vw, 2rem);
  background: #132635;
  border: 3px solid var(--drum-team);
  color: var(--drum-team);
  box-shadow: 0 5px 0 #0a1b24;
}

.drum-circle.ringer-theme .bell:is(.ready,.hit) .ringer-bell {
  background: var(--drum-team);
  color: #172238;
  box-shadow: 0 0 0 3px #fff, 0 0 26px var(--drum-team);
}

.drum-circle.ringer-theme .bell.ready .bell-cue {
  background: var(--drum-team);
  color: #172238;
  font-weight: 900;
}

.drum-circle.ringer-theme .bell-pad[data-count="1"] .ringer-bell {
  width: min(65vw, 300px);
}

.drum-circle.ringer-theme .ringer-bell::before,
.drum-circle.ringer-theme .ringer-bell::after {
  display: none;
}

.player-menu {
  position: relative;
  display: inline-block;
}

.player-menu summary {
  cursor: pointer;
  list-style: none;
  padding: .15rem .45rem;
}

.player-menu summary::-webkit-details-marker {
  display: none;
}

.player-menu > div {
  position: fixed;
  z-index: 2;
  padding: .25rem;
  border: 1px solid #61708a;
  border-radius: .5rem;
  background: #151d2d;
  color: #fff4df;
  white-space: nowrap;
}

.player-menu button {
  display: block;
  width: 100%;
  text-align: start;
  color: inherit;
}

.song-lock {
  display: block;
  max-inline-size: 100%;
  margin: 4px auto 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #ffdf87;
  font-size: clamp(.85rem, 2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.25;
  text-shadow: none;
}

.song-lock:is(:hover, :focus-visible) {
  text-decoration: underline;
}

/* Keep the standalone pack links off narrow screens. */
@media (max-width: 700px) {
  #open-packs {
    display: none;
  }
}

@media (max-width: 700px), (pointer: coarse) {
  .solo #solo-packs {
    display: none;
  }
}

.song-packs-dialog {
  max-height: min(85dvh, 44rem);
  overflow-y: auto;
}

.pack-catalogue {
  display: grid;
  gap: 1rem;
  margin-block: 1rem;
}

.pack-card {
  display: grid;
  justify-items: start;
  gap: .7rem;
  padding: 1rem;
  border: 1px solid #394764;
  border-radius: 10px;
  background: #101726;
}

.pack-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.pack-card > details {
  justify-self: stretch;
  min-width: 0;
}

.pack-catalogue summary {
  cursor: pointer;
  color: #c1cbe0;
}

.pack-catalogue ul {
  line-height: 1.5;
  max-height: 35dvh;
  overflow-y: auto;
}

.pack-footer {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .75rem;
  padding-top: .65rem;
  border-top: 1px solid #394764;
}

.pack-redemption {
  flex: 1;
  min-width: 0;
}

.pack-footer button.text-action,
.pack-card .pack-restore,
.pack-redemption summary {
  display: block;
  padding: .55rem 0;
  color: #c1cbe0;
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: .16em;
  cursor: pointer;
}

.pack-card .pack-restore[hidden] {
  display: none;
}

.pack-purchased {
  color: #c1cbe0;
}

.pack-redemption form > button {
  margin-top: .65rem;
}

.song-packs-dialog input {
  width: 100%;
}

.site-about {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto 1.25rem;
  color: #b8c3de;
  font-size: .8rem;
}

.site-about a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.about-link-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.policy-content nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
}

.stage-focused .site-about,
.second-screen .site-about,
body:has(.room-deck, .player, .solo) .site-about {
  display: none;
}

.policy-page {
  min-height: 100vh;
  background: #101726;
  color: #fff4df;
}

.policy-content {
  max-width: 46rem;
  padding-block: .75rem 2rem;
  line-height: 1.6;
}

.policy-content section {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #394764;
}

.policy-content nav,
.policy-content h3,
.policy-content p {
  margin-top: .8rem;
}

.policy-content a {
  color: #ffd58a;
  text-underline-offset: .16em;
}

.about-handbell {
  margin: 1rem 0 0;
}

.about-handbell img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid #394764;
  background: #0b111d;
}

.about-handbell figcaption {
  margin-top: .5rem;
  color: #b8c3de;
  font-size: .875rem;
}

.table-score-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-top: 14px;
}

.table-stars {
  color: #ffd45c;
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  letter-spacing: .08em;
}

.table-points {
  color: #fff4df;
  font: 900 clamp(1.5rem, 3.2vw, 2.4rem)/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.table-bells-meta {
  color: #c7d2eb;
  font-size: .95rem;
  font-weight: 700;
}

.table-record {
  padding: 4px 10px;
  border: 1px solid #ffd45c88;
  border-radius: 999px;
  background: #ffd45c22;
  color: #ffe394;
  font-size: .8rem;
  font-weight: 800;
}

.player-result-card {
  position: relative;
  overflow: hidden;
  flex: 1 1 100%;
  width: 100%;
  margin: 8px 0 4px;
  padding: 12px 14px;
  border: 1px solid #ffd45c59;
  border-radius: 16px;
  background: linear-gradient(155deg, #1b4a3c, #112d25);
  text-align: center;
  box-shadow: 0 10px 28px #07151066;
}

.player-result-medal {
  margin: 0;
  color: #ffd45c;
  font-size: .95rem;
  font-weight: 800;
}

.player-result-score {
  margin: 4px 0 0;
  color: #fff4df;
  font: 900 1.45rem/1.15 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.player-result-table {
  margin: 4px 0 0;
  color: #c3d6cc;
  font-size: .8rem;
  font-weight: 600;
}

.player-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.player-result-actions .result-share.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 10px;
  background: #ffd45c;
  color: #241a0e;
  font-size: .95rem;
  font-weight: 800;
  text-decoration: none;
}

.player-result-actions .result-share.primary:hover {
  background: #ffe080;
  text-decoration: none;
}

.host-own-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}

.live-feedback {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  margin: 4px 0 2px;
}

.live-streak {
  padding: 3px 10px;
  border: 1px solid #ffd45c66;
  border-radius: 999px;
  background: #ffd45c1c;
  color: #ffe28a;
  font-size: .85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.live-pop {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.live-pop[data-kind="perfect"] {
  color: #ffd45c;
}

.live-pop[data-kind="good"] {
  color: #9be8bf;
}

.live-pop[data-kind="oops"] {
  color: #ff9e9e;
}

.confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: .92;
  animation: confetti-fall 1.8s ease-out forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(320px) rotate(320deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .confetti-layer { display: none; }
}
