/* Circus Routes — styles. The theme variables, panels, list, timeline and tooltip follow circus-routes.html (1900) exactly; additions are marked NEW. */
*{margin:0;padding:0;box-sizing:border-box}
/* Same three modes, and the same panel colors, as the Big Top Builder */
:root{
  --bg:#0a0a0a;--body-text:#cccccc;--panel-bg:rgba(0,0,0,.82);--panel-border:rgba(255,255,255,.15);
  --heading:#ffffff;--hr:rgba(255,255,255,.1);--label:rgba(255,255,255,.55);--note:rgba(255,255,255,.4);
  --row-hover:rgba(255,255,255,.07);--row-sel:rgba(255,255,255,.15);--row-new:rgba(255,255,255,.2);
  --btn-bg:rgba(255,255,255,.08);--btn-border:rgba(255,255,255,.15);--btn-text:rgba(255,255,255,.7);
  --btn-bg-hover:rgba(255,255,255,.15);--btn-text-hover:#ffffff;--range-track:rgba(255,255,255,.15);--range-thumb:#ffffff;
}
:root[data-theme="light"]{
  --bg:#ffffff;--body-text:#333333;--panel-bg:rgba(255,255,255,.9);--panel-border:rgba(0,0,0,.15);
  --heading:#111111;--hr:rgba(0,0,0,.12);--label:rgba(0,0,0,.55);--note:rgba(0,0,0,.45);
  --row-hover:rgba(0,0,0,.05);--row-sel:rgba(0,0,0,.11);--row-new:rgba(0,0,0,.16);
  --btn-bg:rgba(0,0,0,.06);--btn-border:rgba(0,0,0,.2);--btn-text:rgba(0,0,0,.65);
  --btn-bg-hover:rgba(0,0,0,.12);--btn-text-hover:#111111;--range-track:rgba(0,0,0,.2);--range-thumb:#333333;
}
:root[data-theme="grey"]{
  --bg:#979797;--body-text:#1a1a1a;--panel-bg:rgba(176,176,176,.88);--panel-border:rgba(0,0,0,.2);
  --heading:#111111;--hr:rgba(0,0,0,.16);--label:rgba(0,0,0,.68);--note:rgba(0,0,0,.62);
  --row-hover:rgba(0,0,0,.06);--row-sel:rgba(0,0,0,.13);--row-new:rgba(0,0,0,.2);
  --btn-bg:rgba(0,0,0,.07);--btn-border:rgba(0,0,0,.25);--btn-text:rgba(0,0,0,.75);
  --btn-bg-hover:rgba(0,0,0,.14);--btn-text-hover:#111111;--range-track:rgba(0,0,0,.25);--range-thumb:#1a1a1a;
}
html,body{width:100%;height:100%;overflow:hidden}
body{background:var(--bg);color:var(--body-text);font-family:'JetBrains Mono',ui-monospace,Menlo,Consolas,monospace;transition:background .25s ease,color .25s ease}
#map{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:grab}
#map.drag{cursor:grabbing}
body.panels-hidden #map{cursor:default}

.ui{transition:opacity .4s cubic-bezier(.4,0,.2,1),visibility .4s}
body.panels-hidden .ui{opacity:0 !important;visibility:hidden !important;pointer-events:none !important}
.panel{background:var(--panel-bg);border:1px solid var(--panel-border);border-radius:6px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
button{font-family:inherit}
button:focus-visible,input:focus-visible,select:focus-visible,li:focus-visible,a:focus-visible{outline:1px solid var(--heading);outline-offset:1px}

#homeLink{position:fixed;top:16px;left:16px;z-index:14;display:inline-flex;align-items:center;gap:6px;padding:6px 12px 6px 10px;
  background:var(--panel-bg);border:1px solid var(--panel-border);border-radius:20px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:1px;color:var(--label);text-decoration:none}
#homeLink:hover{color:var(--heading)}
body.embedded #homeLink{display:none}

/* date, top center */
#now{position:fixed;top:14px;left:50%;transform:translateX(-50%);z-index:10;text-align:center;pointer-events:none;white-space:nowrap}
#date{font-size:20px;font-weight:600;color:var(--heading);letter-spacing:.02em}
#count{font-size:10px;text-transform:uppercase;letter-spacing:1.5px;color:var(--label);margin-top:3px}
#yrChips{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;max-width:min(640px,56vw);width:max-content;margin:8px auto 0;white-space:normal;pointer-events:auto}   /* NEW: years of one circus */
#yrChips[hidden]{display:none}
#yrChips .yl{font-size:10px;text-transform:uppercase;letter-spacing:1.5px;color:var(--label);margin-right:4px}
#yrChips button{font:inherit;font-size:11px;padding:2px 6px 2px 16px;border:1px solid var(--panel-border);border-radius:3px;background:var(--panel-bg);color:var(--heading);cursor:pointer;position:relative}
#yrChips button::before{content:"";position:absolute;left:6px;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:50%;background:var(--yc)}
#yrChips button:hover{border-color:var(--heading)}
#yrChips.focus button{opacity:.45}
#yrChips.focus button[aria-pressed="true"]{opacity:1;border-color:var(--heading)}

/* show list, left */
#shows{position:fixed;left:16px;top:56px;bottom:16px;width:248px;z-index:10;display:flex;flex-direction:column;padding:12px 6px 8px}
#shows h2{font-size:10px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--label);padding:0 8px 8px;display:flex;justify-content:space-between;align-items:center;min-height:26px}
#clear{font-size:9px;letter-spacing:1px;text-transform:uppercase;padding:3px 7px;background:var(--btn-bg);border:1px solid var(--btn-border);color:var(--btn-text);border-radius:3px;cursor:pointer;visibility:hidden}
#clear:hover{background:var(--btn-bg-hover);color:var(--btn-text-hover)}
#shows .tabs{display:flex;gap:12px;white-space:nowrap}
#shows .tabs button{font:inherit;letter-spacing:inherit;text-transform:inherit;color:var(--note);background:none;border:0;border-bottom:1px solid transparent;padding:0 0 3px;cursor:pointer}
#shows .tabs button[aria-pressed="true"]{color:var(--heading);border-bottom-color:var(--heading)}
#shows .tabs button[hidden]{display:none}
#meetWrap{flex:1;min-height:0;display:flex;flex-direction:column}
#meetWrap[hidden]{display:none}
#meetKey{font-size:9.5px;line-height:1.5;color:var(--label);padding:0 8px 8px;border-bottom:1px solid var(--hr);margin-bottom:4px}
#meetKey span{display:flex;gap:6px;align-items:center}
#meetKey b{font-weight:600;color:var(--heading)}
#meet{list-style:none;flex:1;min-height:0;overflow:auto}
#meet .grp{list-style:none}
#meet .gh{display:grid;grid-template-columns:10px 1fr auto;gap:0 8px;align-items:center;width:100%;padding:5px 8px;border:0;border-radius:3px;background:none;cursor:pointer;text-align:left;font:inherit;color:var(--heading)}
#meet .gh:hover{background:var(--row-hover)}
#meet .gh[aria-expanded="true"]{background:var(--row-sel)}
#meet .gh .sw{width:8px;height:8px;border-radius:50%}
#meet .gh .nm{font-size:10.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#meet .gh .ct{font-size:9.5px;color:var(--label);min-width:1.2em;text-align:right}
#meet .grp.off .gh{cursor:default;color:var(--note)}
#meet .grp.off .gh:hover{background:none}
#meet .grp.off .nm{font-weight:400}
#meet .grp.off .sw{opacity:.45}
#meet .grp ul{list-style:none;margin:2px 0 6px 10px;padding-left:6px;border-left:1px solid var(--hr)}
#meet .grp ul li{padding:4px 6px;border-radius:3px;cursor:pointer;font-size:10px;line-height:1.45;color:var(--body-text);display:grid;grid-template-columns:14px 1fr;gap:0 6px}
#meet .grp ul li.later{opacity:.4}
#meet .grp ul li:hover{background:var(--row-hover)}
#meet .grp ul li.now{background:var(--row-hover)}
#meet .grp ul li svg{margin-top:1px;color:var(--heading)}
#meet .grp ul li b{font-weight:600;color:var(--heading)}
#meet .grp ul li .w{color:var(--label)}
#list[hidden]{display:none}
#list{list-style:none;flex:1;min-height:0;overflow:hidden;--rh:16px;--fs:10.5px}
#list.scroll{overflow:auto}
#list li{display:grid;grid-template-columns:10px 1fr;gap:0 8px;padding:0 8px;height:var(--rh);border-radius:3px;cursor:pointer;align-items:center;transition:background .4s}
#list li:hover{background:var(--row-hover)}
#list li.sel{background:var(--row-sel)}
#list li.new{background:var(--row-new)}
#list .sw{width:8px;height:8px;border-radius:50%}
#list .nm{font-size:var(--fs);line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--heading)}
#list li.off .nm{color:var(--note);font-weight:400}
#list li.off .sw{opacity:.45}

/* timeline, bottom */
#time{position:fixed;left:280px;right:16px;bottom:16px;z-index:10;padding:10px 14px 8px;display:grid;grid-template-columns:auto 1fr;gap:6px 14px;align-items:center}
#play{width:72px;padding:7px 0;font-size:10px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;background:var(--heading);color:var(--bg);border:1px solid var(--heading);border-radius:3px;cursor:pointer}
#tl{min-width:0}
#spark{display:block;width:100%;height:20px}
#scrub{-webkit-appearance:none;appearance:none;display:block;width:100%;height:4px;background:var(--range-track);border-radius:2px;outline-offset:4px;cursor:pointer;margin:4px 0 2px}
#scrub::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;background:var(--range-thumb);border-radius:50%;cursor:pointer}
#scrub::-moz-range-thumb{width:14px;height:14px;background:var(--range-thumb);border:0;border-radius:50%;cursor:pointer}
#months{position:relative;height:13px;font-size:9px;letter-spacing:1px;text-transform:uppercase;color:var(--note)}
#months span{position:absolute;top:2px;padding-left:3px;border-left:1px solid var(--hr)}
/* color switch. On the home page at desktop width the page itself shows a larger one above the
   map's caption, so this copy is hidden there; it is used on phones and when the map is opened alone. */
.seg{display:inline-flex;border:1px solid var(--btn-border);border-radius:999px;overflow:hidden}
.seg button{font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;padding:6px 12px;background:transparent;border:0;color:var(--btn-text);cursor:pointer}
.seg button[aria-pressed="true"]{background:var(--heading);color:var(--bg)}
#key{display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,auto);grid-auto-flow:column;justify-content:space-between;gap:7px 8px;color:var(--label);font-size:9px;letter-spacing:0}
#key span{gap:4px}
#key span{display:flex;gap:5px;align-items:center;white-space:nowrap}
#key svg{display:block;flex:none}

/* zoom, right */
#zoom{position:fixed;right:16px;top:56px;z-index:10;display:flex;flex-direction:column;gap:4px}
#zoom button,#listTab{width:28px;height:28px;font-size:14px;line-height:1;background:var(--panel-bg);border:1px solid var(--panel-border);color:var(--btn-text);border-radius:4px;cursor:pointer;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#zoom button:hover,#listTab:hover{color:var(--btn-text-hover)}
#listTab{display:none}

#tip{position:fixed;pointer-events:none;z-index:20;display:none;padding:9px 11px;font-size:10px;line-height:1.5;max-width:min(460px,calc(100vw - 16px));color:var(--body-text)}
#tip .who{display:flex;gap:7px;align-items:center;font-size:12px;font-weight:600;color:var(--heading);line-height:1.3}
#tip .dot{width:9px;height:9px;border-radius:50%;flex:none}
#tip .st{margin-left:16px;color:var(--label)}
#tip .stop{display:flex;gap:7px;align-items:center;margin-top:3px}
#tip .stop .nm{color:var(--body-text)}
#tip .stop .dd{color:var(--label);white-space:nowrap;margin-left:auto;padding-left:10px}
#tip .sec.ruled{margin-top:8px;padding-top:7px;border-top:1px solid var(--hr)}
#tip .lab{font-size:8.5px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--note);margin-bottom:2px}
#tip .row{display:grid;grid-template-columns:16px auto 1fr;gap:0 7px;align-items:start;margin-top:5px}
#tip .row svg{margin-top:1px}
#tip .row .d{font-weight:600;color:var(--heading);white-space:nowrap}
#tip .row .rel{color:var(--body-text)}
#tip .row .ref{color:var(--heading);font-weight:600}
#tip .row .sub{grid-column:3;color:var(--label)}
#tip .idot{display:inline-block;width:7px;height:7px;border-radius:50%;margin:0 4px 0 1px}


/* ---------------------------------------------------------------- NEW for the full application */
#shows{bottom:var(--tb,168px)}
#showsWrap{flex:1;min-height:0;display:flex;flex-direction:column}
#showsWrap[hidden]{display:none}
.hbtns{display:flex;gap:4px}
.mini{font-size:9px;letter-spacing:1px;text-transform:uppercase;padding:3px 7px;background:var(--btn-bg);border:1px solid var(--btn-border);color:var(--btn-text);border-radius:3px;cursor:pointer;font-family:inherit}
.mini:hover{background:var(--btn-bg-hover);color:var(--btn-text-hover)}
.lnk{font:inherit;font-size:9px;letter-spacing:1px;text-transform:uppercase;background:none;border:0;color:var(--note);cursor:pointer;padding:0 0 0 8px}
.lnk:hover{color:var(--heading)}
.find{padding:0 8px 6px}
.find input{width:100%;font:inherit;font-size:10.5px;color:var(--heading);background:var(--btn-bg);border:1px solid var(--btn-border);border-radius:3px;padding:5px 7px}
.find input::placeholder{color:var(--note)}
.bulk{display:flex;justify-content:space-between;align-items:center;padding:0 8px 6px;font-size:9.5px;color:var(--label);border-bottom:1px solid var(--hr);margin-bottom:4px}
#list,#list.scroll{overflow:auto;--rh:20px;--fs:10.5px}
#list li{grid-template-columns:10px 1fr auto;height:auto;min-height:var(--rh);padding:2px 8px}
#list .nm{line-height:1.25}
#list .ct{font-size:9px;color:var(--note);white-space:nowrap}
#list li .only{display:none;font-size:8.5px;letter-spacing:1px;text-transform:uppercase;color:var(--note);background:none;border:0;cursor:pointer;font-family:inherit;padding:0}
#list li:hover .only{display:inline}
#list li:hover .ct{display:none}
#list li .only:hover{color:var(--heading)}
#list li.hid .nm{color:var(--note);font-weight:400;text-decoration:line-through;text-decoration-color:var(--hr)}
#list li.hid .sw{opacity:.25}
#list li.idle .nm{color:var(--note)}
#list li.idle .sw{opacity:.45}

#filters{position:fixed;right:16px;top:56px;bottom:var(--tb,168px);width:264px;z-index:10;padding:12px 14px 10px;overflow:auto}
#filters .fs{border-bottom:1px solid var(--hr);padding:0 0 11px;margin-bottom:10px}
#filters .fs:last-child{border-bottom:0;margin-bottom:0}
#filters h3{font-size:10px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--label);margin-bottom:7px;display:flex;justify-content:space-between;align-items:baseline}
#filters h3 .val{color:var(--heading);letter-spacing:.5px}
#filters .hint{font-size:9px;line-height:1.45;color:var(--note);margin-top:5px}
#filters .find{padding:0}
#yrSpark{display:block;width:100%;height:34px;cursor:pointer}
.dual{position:relative;height:16px;margin:2px 0 6px}
.dual input{position:absolute;left:0;right:0;top:6px;width:100%;-webkit-appearance:none;appearance:none;height:4px;background:none;pointer-events:none;margin:0}
.dual input:first-child{background:var(--range-track);border-radius:2px}
.dual input::-webkit-slider-thumb{-webkit-appearance:none;pointer-events:auto;width:13px;height:13px;background:var(--range-thumb);border-radius:50%;cursor:pointer}
.dual input::-moz-range-thumb{pointer-events:auto;width:13px;height:13px;background:var(--range-thumb);border:0;border-radius:50%;cursor:pointer}
.yrow{display:flex;gap:6px;align-items:center;font-size:10px;color:var(--label)}
.yrow input{width:58px;font:inherit;font-size:10.5px;color:var(--heading);background:var(--btn-bg);border:1px solid var(--btn-border);border-radius:3px;padding:3px 5px;text-align:center;-moz-appearance:textfield}
.yrow input::-webkit-inner-spin-button{display:none}
.yrow .mini{padding:3px 8px;font-size:10px}
#sugg{list-style:none;margin-top:3px;border:1px solid var(--panel-border);border-radius:3px;max-height:210px;overflow:auto;background:var(--panel-bg)}
#sugg li{font-size:10px;padding:4px 7px;cursor:pointer;display:flex;justify-content:space-between;gap:8px;color:var(--body-text)}
#sugg li span{color:var(--note);white-space:nowrap}
#sugg li:hover,#sugg li.on{background:var(--row-hover);color:var(--heading)}
#chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
#chips:empty{display:none}
.chip{display:inline-flex;gap:6px;align-items:center;font-size:9.5px;padding:3px 4px 3px 8px;border:1px solid var(--btn-border);border-radius:999px;color:var(--heading);background:var(--btn-bg)}
.chip button{font:inherit;background:none;border:0;color:var(--note);cursor:pointer;padding:0 3px;font-size:11px;line-height:1}
.chip button:hover{color:var(--heading)}
.checks{display:flex;flex-wrap:wrap;gap:5px 14px;font-size:10px;color:var(--body-text)}
.checks.col{flex-direction:column}
.checks label{display:flex;gap:6px;align-items:center;cursor:pointer}
.checks input{accent-color:var(--range-thumb)}
#themeSec{position:fixed;top:16px;right:16px;z-index:14}           /* color mode: very top right */
#themeSeg{background:var(--panel-bg);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#themeSeg button{padding:5px 10px}
body.site-theme #themeSec{display:none}

#zoom{right:292px}
#tip .yr{color:var(--label);font-weight:400}
#tip .stop .src{color:var(--note);font-size:9px;margin-left:6px}
#tip .nt{margin-top:4px;color:var(--note);font-size:9.5px}
#filterTab{display:none}
#loading{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);font-size:10px;letter-spacing:1.5px;text-transform:uppercase;color:var(--label);z-index:30}
#loading[hidden]{display:none}

#months span.yr{font-size:8.5px;letter-spacing:.5px}

/* phones (as 1900) */
@media (max-width:980px){
  #shows{left:10px;right:10px;width:auto;top:56px;bottom:150px;z-index:16;display:none}
  body.list-open #shows{display:flex}
  #listTab{display:block;position:fixed;left:10px;top:56px;z-index:17;width:auto;padding:0 10px;font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;font-family:inherit}
  body.embedded #listTab{top:56px}
  body.list-open #listTab{left:auto;right:10px}
  #time,body:not(.embedded) #time{left:10px;right:10px;bottom:10px}
    #date{font-size:15px}
  #now{top:60px}                       /* below the home page's Back button and color-mode switch */
  body:not(.embedded) #now{top:52px}
  #zoom{right:10px}
}
@media (max-width:1180px){
  #filters{width:224px}
  #zoom{right:252px}
}
@media (max-width:980px){
  #filters{left:10px;right:10px;width:auto;top:92px;bottom:150px;z-index:16;display:none}
  body.filters-open #filters{display:block}
  #filterTab{display:block;position:fixed;top:56px;right:10px;z-index:17;height:28px;padding:0 10px;font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;font-family:inherit;background:var(--panel-bg);border:1px solid var(--panel-border);color:var(--btn-text);border-radius:4px;cursor:pointer}
  #shows{top:92px;bottom:var(--tb,150px)}
  #time,body:not(.embedded) #time{left:10px;right:10px;bottom:10px}
  #zoom{right:10px;top:96px}
  body.filters-open #zoom,body.list-open #zoom{display:none}
}

#meet li.out{display:none}   /* NEW: encounters outside the picked circuses */

/* NEW: the key and a word about the map at the foot of the right panel; the timeline runs the full width below the list */
#filters{display:flex;flex-direction:column}
#filters .fs{flex:none}
#filters .aboutSec{margin-top:auto;padding-top:14px;border-bottom:0}
#filters .fs.aboutSec:last-child{margin-bottom:0}
#filters .blurb{font-size:9.5px;line-height:1.55;color:var(--body-text);margin:12px 0 9px}
#filters .more{font:inherit;font-size:11.5px;font-weight:600;letter-spacing:.3px;color:var(--heading);background:none;border:0;border-bottom:1px solid currentColor;padding:0 0 2px;cursor:pointer;text-align:left}
#filters .more:hover span{margin-left:3px}
#filters .more span{transition:margin .15s}
#time{left:16px}
#aboutDlg{position:fixed;inset:0;z-index:40}
#aboutDlg[hidden]{display:none}
#aboutDlg .scrim{position:absolute;inset:0;background:rgba(0,0,0,.45)}
#aboutDlg .box{position:absolute;top:40px;bottom:40px;left:50%;transform:translateX(-50%);width:min(780px,calc(100vw - 80px));display:flex;flex-direction:column;padding:0;border-radius:6px;background:var(--bg);border:1px solid var(--panel-border);box-shadow:0 20px 60px rgba(0,0,0,.35)}
#aboutDlg .body{overflow:auto;padding:34px 44px 40px;font-size:12.5px;line-height:1.7;color:var(--body-text)}
#aboutDlg .x{position:absolute;top:10px;right:12px;width:32px;height:32px;font-size:22px;line-height:1;background:none;border:0;color:var(--heading);cursor:pointer;border-radius:4px;z-index:1}
#aboutDlg .x:hover{background:var(--btn-bg)}
#aboutDlg .kicker{font-size:10px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--label);margin-bottom:8px}
#aboutDlg h2{font-size:21px;line-height:1.3;font-weight:600;color:var(--heading);margin:0 40px 20px 0}
#aboutDlg h3{font-size:10.5px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--heading);margin:28px 0 10px}
#aboutDlg p{margin:0 0 12px}
#aboutDlg ul,#aboutDlg ol{margin:0 0 12px 20px}
#aboutDlg li{margin-bottom:6px}
#aboutDlg b{color:var(--heading);font-weight:600}
#aboutDlg .cred{font-size:11px;line-height:1.6;color:var(--label)}
@media (max-width:980px){
  #time,body:not(.embedded) #time{left:10px}
  #aboutDlg .box{top:20px;bottom:20px;width:calc(100vw - 40px)}
  #aboutDlg .body{padding:26px 22px 30px}
}

#meet li.out{display:none}   /* NEW: encounters outside the picked circuses */

/* ================================================================ NEW: one control system
   Bars (top and bottom) use pills, all 28px high; panels use rows of checkboxes and radios.
   Type: 10px uppercase 600 for controls and section heads, 10.5px for list text, 9px for hints. */
:root{--ctl-h:28px}
.seg{display:inline-flex;height:var(--ctl-h);border:1px solid var(--btn-border);border-radius:999px;overflow:hidden;flex:none}
.seg button{height:100%;font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;padding:0 12px;background:transparent;border:0;color:var(--btn-text);cursor:pointer;white-space:nowrap}
.seg button+button{border-left:1px solid var(--btn-border)}
.seg button:hover{color:var(--btn-text-hover)}
.seg button[aria-pressed="true"]{background:var(--heading);color:var(--bg);border-color:var(--heading)}
#themeSeg{height:var(--ctl-h)}
#themeSeg button{padding:0 11px}
#homeLink{height:var(--ctl-h);padding:0 12px 0 10px}
select.pill{height:var(--ctl-h);font:inherit;font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--btn-text);background:transparent;border:1px solid var(--btn-border);border-radius:999px;padding:0 26px 0 12px;cursor:pointer;-webkit-appearance:none;appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 15px) 12px,calc(100% - 11px) 12px;background-size:4px 4px;background-repeat:no-repeat}
select.pill:hover{color:var(--btn-text-hover)}
select.pill option{background:var(--bg);color:var(--heading);text-transform:none}

#time{display:grid;grid-template-columns:auto 1fr;gap:0 18px;align-items:center;padding:10px 16px 8px}
#time .ctl{display:flex;align-items:center;gap:8px}
#play{width:76px;height:var(--ctl-h);padding:0;border-radius:999px}
#spark{height:22px}

/* panel rows: checkboxes and radios share one look */
.checks{font-size:10.5px;color:var(--body-text);gap:6px 14px}
.checks label{min-height:16px}
.checks.col{gap:4px}
.checks input{width:13px;height:13px;margin:0;accent-color:var(--range-thumb);flex:none}
#filters .fs{padding-bottom:10px;margin-bottom:10px}
#filters{overflow-x:hidden}
.yrow input{flex:1;min-width:0;width:auto}
#onMap.checks{flex-direction:row}
#filters h3{margin-bottom:8px}
#nearScope b{color:var(--heading);font-weight:600}
#nearScope{margin-left:19px}

/* narrower: the bar wraps the controls above the timeline */
@media (max-width:760px){
  #time{grid-template-columns:1fr;gap:8px 0;padding:10px 12px 8px}
  #time .ctl{justify-content:space-between}
}
@media (max-width:380px){
  .seg button{padding:0 9px}
  #play{width:64px}
  select.pill{padding:0 22px 0 10px}
}

@media (max-width:980px){
  #filters{display:none;bottom:var(--tb,150px)}
  body.filters-open #filters{display:flex}
}

/* NEW: the right panel scrolls its controls; the key and the note about the map stay pinned at its foot */
#filters{overflow:hidden;padding:0}
#filters .fscroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:12px 14px 2px}
#filters .fscroll .fs:last-child{border-bottom:0;margin-bottom:0}
#filters .aboutSec{flex:none;margin:0;padding:11px 14px 12px;border-top:1px solid var(--hr)}
#filters .blurb{margin:10px 0 8px}
@media (max-height:860px){ #filters .blurb{display:none} #filters .more{margin-top:10px} }
#key{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);justify-content:stretch}
#key span{white-space:normal;line-height:1.25}

/* NEW: day-of-week key, under the Color choices */
.dowkey{display:flex;gap:3px;margin:8px 0 0 19px}
.dowkey[hidden]{display:none}
.dowkey span{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:9px;color:var(--label);width:22px}
.dowkey i{display:block;width:22px;height:8px;border-radius:2px}

/* The player: controls on one row (how to play on the left, how to color on the right), the timeline under them
   at full width. The timeline's bars are colored the way the map is, so they are the color key. */
#time{grid-template-columns:1fr;gap:9px 0;padding:10px 16px 8px}
#time .ctl{flex-wrap:wrap;gap:8px;row-gap:8px}
#time .colorBox{margin-left:auto;display:flex;align-items:center;gap:8px}
#time .clab{font-size:9.5px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--label)}
#time .dowkey{order:5;margin:0;gap:2px}
#time .dowkey span{flex-direction:row;width:auto;gap:3px;font-size:9px}
#time .dowkey i{width:12px;height:8px}
@media (max-width:760px){
  #time .ctl{justify-content:flex-start}
  #time .colorBox{margin-left:0;width:100%}
  #time .colorBox .seg{flex:1}
  #time .colorBox .seg button{flex:1;padding:0 6px}
}
@media (max-width:420px){ #time .clab{display:none} }
#spark{height:32px}
#time .dowkey{gap:8px}
#time .dowkey span{gap:4px;font-size:9.5px;letter-spacing:.5px}
#time .dowkey i{width:14px;height:9px}
@media (max-width:760px){ #spark{height:26px} }
/* each control in the player is named by a small label before it */
#time .clab{margin-left:6px}
#time .ctl>.clab:first-of-type{margin-left:10px}
#time .colorBox .clab{margin-left:0}
@media (max-width:760px){ #time .clab{margin-left:2px} }
/* the player's tooltips */
#ptip{position:fixed;z-index:30;pointer-events:none;max-width:280px;padding:8px 11px;font-size:10.5px;line-height:1.5;color:var(--body-text)}
#ptip[hidden]{display:none}

/* ===== player, third pass: a round Play button at the left, every map control on one row, the timeline below ===== */
#time{grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;gap:10px 16px;padding:12px 16px 8px 14px;align-items:center}
#time #play{grid-row:1 / span 2;align-self:center;width:54px;height:54px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--heading);border:0;color:var(--bg);cursor:pointer;transition:transform .12s}
#time #play:hover{transform:scale(1.05)}
#time #play svg{width:24px;height:24px;fill:currentColor}
#time #play .i-play{margin-left:3px}
#time #play .i-pause,#time #play.on .i-play{display:none}
#time #play.on .i-pause{display:block}
#time .ctl{grid-column:2;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 18px}
#time #tl{grid-column:2}
#time .grp{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
#time .grp .clab{margin-left:0}
#time .grp .clab+.seg,#time .grp .clab+.togs,#time .grp .clab+select{margin-right:6px}
#time .grp>:last-child{margin-right:0}
#time .colorBox{margin-left:0}
#time .clab{font-size:9.5px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--label);white-space:nowrap}
.togs{display:inline-flex;gap:4px}
.tog{position:relative;display:inline-flex;align-items:center;gap:6px;height:var(--ctl-h);padding:0 11px 0 9px;border:1px solid var(--btn-border);border-radius:999px;font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--btn-text);cursor:pointer;white-space:nowrap;user-select:none}
.tog:hover{color:var(--btn-text-hover)}
.tog input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.tog::before{content:"";width:8px;height:8px;border-radius:2px;border:1.5px solid currentColor;flex:none;box-sizing:border-box}
.tog:has(input:checked){color:var(--heading);border-color:var(--heading)}
.tog:has(input:checked)::before{background:currentColor}
.tog:has(input:focus-visible){outline:2px solid var(--range-thumb);outline-offset:2px}
#spark{height:34px}

/* the right box: only years, places, the key and the note; as tall as it needs to be */
#filters{bottom:auto;max-height:calc(100vh - 56px - var(--tb,168px))}
#filters .fscroll{flex:none;overflow:visible}
#filters .aboutSec{border-top:1px solid var(--hr)}
#colorKey{margin-top:10px;font-size:9.5px;color:var(--body-text)}
#colorKey[hidden]{display:none}
#colorKey .ck-lab{display:block;color:var(--label);margin-bottom:5px}
#colorKey .ck-strip{height:8px;border-radius:2px}
#colorKey .ck-ends{display:flex;justify-content:space-between;font-size:9px;color:var(--note);margin-top:3px}
#colorKey .ck-dow{display:flex;gap:7px;flex-wrap:wrap}
#colorKey .ck-dow span{display:flex;align-items:center;gap:4px;font-size:9px}
#colorKey .ck-dow i{display:block;width:12px;height:8px;border-radius:2px}
#colorKey .ck-note{color:var(--note)}
#meetWrap #nearScope{font-size:9px;line-height:1.45;color:var(--note);margin:0 0 8px;padding:0 2px}

@media (max-width:980px){
  #filters{bottom:auto;max-height:calc(100vh - 92px - var(--tb,150px));overflow:auto}
}
@media (max-width:760px){
  #time{grid-template-columns:auto minmax(0,1fr);gap:8px 12px;padding:10px 12px 8px 10px}
  #time #play{width:46px;height:46px;grid-row:1}
  #time #tl{grid-column:1 / span 2}
  #time .ctl{justify-content:flex-start;gap:8px 14px}
  #time .grp{flex-wrap:wrap}
  #time .colorBox{width:auto}
  #time .colorBox .seg{flex:none}
  #time .colorBox .seg button{flex:none;padding:0 8px}
  .tog{padding:0 9px 0 8px}
  #spark{height:26px}
}
@media (max-width:420px){ #time .clab{display:inline} }
#time .ctl{justify-content:flex-start;gap:8px 26px}
#time .colorBox{margin-left:auto}
@media (max-width:760px){
  #time .ctl{gap:7px 0;flex-direction:column;align-items:stretch}
  #time .grp{display:grid;grid-template-columns:62px auto;justify-content:start;gap:8px}
  #time .colorBox{margin-left:0}
  #time .grp .clab+.seg,#time .grp .clab+.togs,#time .grp .clab+select{margin-right:0}
  .tog .lg{display:none}
  #time #play{align-self:start;margin-top:30px}
}
@media (max-width:760px){
  #time{grid-template-columns:auto minmax(0,1fr);gap:7px 12px}
  #time .ctl{display:contents}
  #time #play{grid-row:1 / span 2;grid-column:1;margin-top:0;align-self:center}
  #time .grp{grid-column:2}
  #time .grp:nth-child(n+3){grid-column:1 / span 2}
  #time #tl{grid-column:1 / span 2}
  #time .colorBox .seg button{padding:0 7px;letter-spacing:.6px}
}
/* each color choice carries its own key: a thin strip under its name */
#colorSeg button{position:relative}
#colorSeg .ck{position:absolute;left:12px;right:12px;bottom:3px;height:2.5px;border-radius:2px}
#colorSeg button[aria-pressed="true"] .ck{box-shadow:0 0 0 1px var(--bg)}
@media (max-width:760px){ #colorSeg .ck{left:7px;right:7px} }
