/* Shared top nav — tourneyclock v9 */
.tc-nav{
  position:sticky;top:0;z-index:1000;
  display:flex;align-items:center;gap:10px;
  box-sizing:border-box;
  padding:0 max(12px, env(safe-area-inset-right,0px)) 0 max(12px, env(safe-area-inset-left,0px));
  padding-top:env(safe-area-inset-top,0px);
  height:calc(54px + env(safe-area-inset-top,0px));
  min-height:calc(54px + env(safe-area-inset-top,0px));
  max-height:calc(54px + env(safe-area-inset-top,0px));
  background:#0a0a0a;
  border-bottom:1px solid rgba(153,255,51,.18);
  -webkit-transform:translateZ(0);transform:translateZ(0);
  -webkit-backface-visibility:hidden;backface-visibility:hidden;
  contain:layout style paint;
  will-change:transform;
}
.tc-nav *{box-sizing:border-box}
.tc-nav-brand{
  display:inline-flex;align-items:center;gap:8px;
  text-decoration:none;color:#fff;flex-shrink:0;
  height:100%;padding:4px 0;
}
.tc-nav-brand img{height:36px;width:auto;display:block;filter:none}
.tc-nav-brand-txt{
  font-family:'Orbitron',sans-serif;font-weight:900;font-size:13px;
  letter-spacing:1px;color:#ffd700;white-space:nowrap;
}
.tc-nav-links{
  display:flex;align-items:center;gap:4px;
  flex:1;min-width:0;overflow-x:auto;scrollbar-width:none;
  -webkit-overflow-scrolling:touch;height:100%;
}
.tc-nav-links::-webkit-scrollbar{display:none}
.tc-nav-link{
  display:inline-flex;align-items:center;gap:6px;
  height:34px;padding:0 12px;border-radius:999px;
  font-family:'Orbitron',sans-serif;font-weight:700;font-size:11px;
  letter-spacing:1px;text-decoration:none;color:#c8c8d0;
  white-space:nowrap;border:1px solid transparent;flex-shrink:0;
}
.tc-nav-link:hover{color:#fff;border-color:rgba(153,255,51,.35)}
.tc-nav-link.on{
  color:#06140a;
  background:linear-gradient(135deg,#99ff33,#0ca344);
  border-color:transparent;
}
.tc-nav-link .tc-ico{width:14px;height:14px}
.tc-nav-actions{
  display:flex;align-items:center;gap:6px;flex-shrink:0;margin-left:auto;
}
.tc-nav-iconbtn{
  display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:10px;
  border:1px solid rgba(153,255,51,.35);background:rgba(0,0,0,.25);
  color:#99ff33;text-decoration:none;cursor:pointer;padding:0;font:inherit;
}
.tc-nav-iconbtn:hover{filter:brightness(1.15)}
.tc-nav-iconbtn .tc-ico{width:16px;height:16px}
.tc-nav-burger{
  display:none;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:10px;
  border:1px solid rgba(153,255,51,.35);background:rgba(0,0,0,.25);
  color:#99ff33;cursor:pointer;padding:0;flex-shrink:0;
}
.tc-nav-burger .tc-ico{width:18px;height:18px}
.tc-nav-drawer{
  display:none;position:fixed;left:0;right:0;
  top:calc(54px + env(safe-area-inset-top,0px));
  z-index:999;background:#0a0a0a;
  border-bottom:1px solid rgba(153,255,51,.18);
  padding:10px 14px 14px;flex-direction:column;gap:6px;
  -webkit-transform:translateZ(0);transform:translateZ(0);
}
.tc-nav-drawer.open{display:flex}
.tc-nav-drawer .tc-nav-link{
  height:42px;justify-content:flex-start;width:100%;
  border:1px solid rgba(153,255,51,.25);
}
.tc-nav-drawer .tc-nav-link.on{border-color:transparent}

@media (min-width: 1800px){
  .tc-nav,.tc-nav-drawer{display:none!important}
}
body.projector .tc-nav,
body.projector .tc-nav-drawer{display:none!important}

@media (max-width: 820px){
  .tc-nav{
    height:calc(48px + env(safe-area-inset-top,0px));
    min-height:calc(48px + env(safe-area-inset-top,0px));
    max-height:calc(48px + env(safe-area-inset-top,0px));
    gap:8px;
  }
  .tc-nav-brand img{height:30px}
  .tc-nav-brand-txt{display:none}
  .tc-nav-links{display:none}
  .tc-nav-burger{display:inline-flex}
  .tc-nav-drawer{top:calc(48px + env(safe-area-inset-top,0px))}
}

/* Compact event sub-bar (under shared nav) — v10b */
.tc-eventbar{
  display:flex;align-items:center;
  box-sizing:border-box;
  min-height:0;height:auto;
  padding:8px max(12px,env(safe-area-inset-right,0px)) 8px max(12px,env(safe-area-inset-left,0px));
  background:#0a0a0a;
  border-bottom:1px solid rgba(153,255,51,.14);
  position:relative;z-index:5;
  margin:0;
}
.tc-eventbar .eb-main{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex-wrap:nowrap;
  min-width:0;width:100%;
}
.tc-eventbar .eb-titles{
  flex:1 1 auto;min-width:0;max-width:100%;
}
.tc-eventbar .eb-eye{
  font-family:'Orbitron',sans-serif;font-weight:700;font-size:10px;
  letter-spacing:.12em;text-transform:uppercase;color:#99ff33;
  opacity:.85;margin:0 0 1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  line-height:1.2;
}
.tc-eventbar .eb-eye[hidden]{display:none!important}
.tc-eventbar .title{
  font-family:'Orbitron',sans-serif;font-weight:900;color:#ffd700;
  font-size:clamp(13px,1.45vw,17px);letter-spacing:1px;line-height:1.15;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;
}
.tc-eventbar .subtitle{
  font-family:'Roboto',sans-serif;font-weight:400;color:rgba(255,255,255,.68);
  font-size:10px;letter-spacing:.06em;text-transform:uppercase;
  margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  line-height:1.2;
}
.tc-eventbar .eb-actions{
  display:flex;align-items:center;gap:8px;flex-wrap:nowrap;
  margin-left:auto;flex:0 0 auto;min-width:0;
}
.tc-eventbar .eb-actions > *{flex-shrink:0}

/* flatten pill row into the action flex so desktop stays one line */
.tc-eventbar .lb-row,
.tc-eventbar .lb-row.show{
  display:contents!important;
  margin:0!important;padding:0!important;width:auto!important;flex:none!important;
}
.tc-eventbar #prevWeek,
.tc-eventbar #nextWeek{display:none!important}

.tc-eventbar .status{
  height:32px;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;
  padding:0 12px;border-radius:999px;font-size:10px;margin:0;letter-spacing:.1em;
}
.tc-eventbar .walltime{
  height:32px;display:inline-flex;align-items:center;justify-content:flex-end;
  font-size:13px;min-width:6.5ch;width:auto;margin:0;opacity:.9;padding:0;
}

/* Match shared-nav iconbtn: 32x32, radius 10 */
.tc-eventbar #alertBellHost{
  display:inline-flex;align-items:center;justify-content:center;
  width:32px;height:32px;min-height:32px;margin:0;padding:0;
}
.tc-eventbar #alertBellHost .tc-bell,
.tc-eventbar .tc-bell{
  width:32px!important;height:32px!important;min-width:32px!important;
  box-sizing:border-box;padding:0!important;gap:0!important;
  border-radius:10px!important;border-width:1px!important;
  border-color:rgba(153,255,51,.35)!important;
  background:rgba(0,0,0,.25)!important;
  justify-content:center;align-items:center;
}
.tc-eventbar #alertBellHost .tc-bell .tc-bell-label,
.tc-eventbar .tc-bell .tc-bell-label{
  position:absolute!important;width:1px!important;height:1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;border:0!important;padding:0!important;margin:-1px!important;
}
.tc-eventbar #alertBellHost .tc-bell svg,
.tc-eventbar .tc-bell svg{width:16px!important;height:16px!important}

.tc-eventbar .sound-btn{
  width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;max-height:32px!important;
  box-sizing:border-box!important;padding:0!important;margin:0!important;
  border-radius:10px!important;justify-content:center;align-items:center;
  border:1px solid rgba(153,255,51,.35)!important;background:rgba(0,0,0,.25)!important;
  color:#99ff33;box-shadow:none!important;animation:none;line-height:0;overflow:hidden;
}
.tc-eventbar .sound-btn .sound-lbl{
  position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);
}
.tc-eventbar .sound-btn .sound-ico,
.tc-eventbar .sound-btn .sound-ico .tc-ico,
.tc-eventbar .sound-btn .sound-ico svg{width:16px;height:16px;display:block}
.tc-eventbar .sound-btn.needs-tap{
  box-shadow:0 0 0 1px rgba(153,255,51,.4);
  animation:ebSoundPulse 2s ease-in-out infinite;
}
.tc-eventbar .sound-btn.off{opacity:.55}
@keyframes ebSoundPulse{
  0%,100%{box-shadow:0 0 0 1px rgba(153,255,51,.3)}
  50%{box-shadow:0 0 0 2px rgba(153,255,51,.7)}
}

.tc-eventbar .lb-pill,
.tc-eventbar .lb-pill.show{
  height:32px;box-sizing:border-box;
  display:none;align-items:center;gap:6px;
  padding:0 12px;font-size:10px;margin:0;
  border-radius:999px;
  border:1px solid rgba(153,255,51,.35);
  background:rgba(0,0,0,.25);color:#99ff33;
  text-decoration:none;letter-spacing:.08em;text-transform:uppercase;
  white-space:nowrap;
}
.tc-eventbar .lb-pill.show{display:inline-flex!important}
.tc-eventbar .lb-pill .tc-ico{width:14px;height:14px}

.tc-eventbar .eb-apl{display:none!important}
.tc-eventbar .conn{display:none!important}
.tc-eventbar .recon{display:none;font-size:10px;color:#ff6b6b;letter-spacing:.06em;margin:0}
.tc-eventbar .recon.show{display:inline-flex;align-items:center;height:32px}
.tc-eventbar .sound-hint{display:none!important}

/* Desktop: force single row, ~64px bar */
@media (min-width:900px){
  .tc-eventbar{
    height:64px;min-height:64px;max-height:64px;
    padding-top:0;padding-bottom:0;overflow:hidden;box-sizing:border-box;
  }
  .tc-eventbar .eb-main{flex-wrap:nowrap;align-items:center;height:100%}
  .tc-eventbar .eb-actions{flex-wrap:nowrap;margin-left:auto;flex:0 0 auto}
  .tc-eventbar .eb-titles{flex:1 1 auto;min-width:0}
}

/* Mid 600-899: actions drop under titles, left-aligned, compact */
@media (max-width:899px) and (min-width:600px){
  .tc-eventbar{height:auto;min-height:0;max-height:none;padding:8px max(12px,env(safe-area-inset-right,0px))}
  .tc-eventbar .eb-main{flex-wrap:wrap;align-items:center;gap:8px}
  .tc-eventbar .eb-titles{flex:1 1 100%;min-width:0}
  .tc-eventbar .eb-actions{
    flex:1 1 100%;margin-left:0;justify-content:flex-start;
    flex-wrap:wrap;gap:6px 8px;
  }
}

/* Phone: two compact lines; actions scroll horizontally */
@media (max-width:599px){
  .tc-eventbar{
    height:auto;min-height:0;max-height:none;
    padding:6px max(10px,env(safe-area-inset-right,0px)) 6px max(10px,env(safe-area-inset-left,0px));
  }
  .tc-eventbar .eb-main{flex-wrap:wrap;gap:6px;align-items:flex-start}
  .tc-eventbar .eb-titles{flex:1 1 100%}
  .tc-eventbar .eb-actions{
    flex:1 1 100%;margin-left:0;justify-content:flex-start;
    flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;padding-bottom:0;gap:6px;
  }
  .tc-eventbar .eb-actions::-webkit-scrollbar{display:none}
  .tc-eventbar .title{font-size:clamp(12px,3.6vw,15px)}
  .tc-eventbar .subtitle{font-size:9px}
  .tc-eventbar .eb-eye{font-size:9px}
  .tc-eventbar .walltime{font-size:12px}
  .tc-eventbar .lb-pill{font-size:9px;padding:0 10px}
}

.tc-pagetitle{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  margin-bottom:14px;
}
.tc-pagetitle h1,.tc-pagetitle .title{
  font-family:'Orbitron',sans-serif;font-weight:900;color:#ffd700;
  font-size:clamp(18px,3vw,26px);letter-spacing:1.5px;margin:0;
}
.tc-pagetitle .sub,.tc-pagetitle .subtitle{
  font-family:'Orbitron',sans-serif;color:#99ff33;
  font-size:11px;letter-spacing:1px;opacity:.9;
}
