:root{
  --bg0:#070a14;
  --bg1:#0b1230;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.66);
  --shadow: 0 18px 55px rgba(0,0,0,.45);
  --primary:#7c5cff;
  --primary2:#35d7ff;
  --danger:#ff4d6d;
  --ok:#36d399;
  --radius: 18px;
  --search-placeholder-color: rgba(100, 116, 139, 0.9);
  /* Same layout floor on every page; viewport can shrink further → horizontal scroll */
  --app-min-width: 600px;
}

*{ box-sizing:border-box; }
html, body { height: 100%; }
html{
  min-width: var(--app-min-width);
  overflow-x: auto;
}
body{
  margin:0;
  min-width: var(--app-min-width);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 500px at 20% -10%, rgba(124,92,255,.25), transparent 55%),
              radial-gradient(900px 420px at 85% 0%, rgba(53,215,255,.20), transparent 50%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
}
/* Every standalone page shell shares the same minimum width (home, tools, bug reports, alumni, reminders, magic word, reset). */
.topbar,
.layout,
main.content,
main.bug-reports-shell,
main.magic-word-shell,
main.reset-password-shell{
  min-width: var(--app-min-width);
}

.bg{
  position: fixed;
  inset: 0;
  pointer-events:none;
  background:
    radial-gradient(600px 280px at 50% 0%, rgba(124,92,255,.12), transparent 60%),
    radial-gradient(480px 250px at 0% 60%, rgba(53,215,255,.10), transparent 60%),
    radial-gradient(560px 260px at 100% 70%, rgba(54,211,153,.10), transparent 60%);
  filter: blur(0px);
}

/* Build/version — inline next to “MSAI · CAT” in the top bar (__APP_VERSION_FULL__). */
.brand-version-stamp{
  display: inline;
  margin-left: 0.55em;
  padding: 0;
  border: 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  line-height: inherit;
  white-space: nowrap;
  text-transform: none;
  vertical-align: baseline;
  user-select: text;
  cursor: default;
  overflow-wrap: normal;
  /* Same ink as white top bar — invisible until drag-select / highlight */
  color: #ffffff;
}
.brand-version-stamp::selection{
  background: rgba(124, 92, 255, 0.55);
  color: #fff;
}
/* Director’s Cuts — match dark top bar (#080808) so it stays invisible there too */
body.showcase-page .brand-version-stamp{
  color: #080808;
}

/* “New version” modal: native <dialog> + ::backdrop (see app-version-check.js) */
.new-version-dialog{
  padding: 0;
  border: none;
  border-radius: 16px;
  max-width: min(440px, calc(100vw - 28px));
  width: calc(100vw - 28px);
  background: rgba(255, 255, 255, 0.99);
  color: rgba(71, 85, 105, 0.94);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.38);
}
/* Focus lands on the panel so neither button reads as pre-selected. */
.new-version-dialog:focus,
.new-version-dialog-panel:focus{
  outline: none;
}
.new-version-dialog::backdrop{
  background: rgba(6, 10, 24, 0.58);
  backdrop-filter: blur(6px);
}
/* Showcase (dark page): keep update dialog above fixed auras / stacking contexts */
html.showcase-page .new-version-dialog{
  z-index: 2147483000;
}
.new-version-dialog-panel{
  padding: 22px 22px 18px;
}
.new-version-dialog-title{
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: rgba(51, 65, 85, 0.96);
}
.new-version-dialog-text{
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 450;
  color: rgba(100, 116, 139, 0.96);
}
.new-version-dialog-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
/* No default “selected” ring on the primary button until keyboard Tab. */
.new-version-dialog-actions .btn:focus:not(:focus-visible){
  outline: none;
  box-shadow: none;
}
.new-version-dialog-actions .btn:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 5;
  display:flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  /* Keep vertical padding identical on every page so the bottom border lines up */
  padding: 18px 22px;
  background: rgba(10,14,35,.52);
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}
.auth-strip{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  /* Mode dropdown, account menu, Showcase TV — one vertical rhythm */
  --auth-strip-control-h: 28px;
  /* Optical lift: TV artwork reads low vs flat selects */
  --topbar-showcase-tv-nudge-y: -4px;
}
.auth-strip-showcase-cluster{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.auth-strip-showcase-cluster:has(.topbar-showcase-tv-link[hidden]):not(:has(.topbar-voice-notes-link:not([hidden]))){
  display: none !important;
}
.auth-strip-showcase-sep{
  flex-shrink: 0;
  width: 1px;
  height: calc(var(--auth-strip-control-h) - 7px);
  border-radius: 1px;
  background: color-mix(in srgb, rgba(11, 18, 32, 1) 22%, transparent);
  align-self: center;
}
.auth-strip-showcase-cluster:has(.topbar-voice-notes-link[hidden]) > .auth-strip-showcase-sep{
  display: none;
}
/* Showcase TV — icon-only; vertically centered with sibling selects */
.topbar-voice-notes-link{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  padding: 0;
  box-sizing: border-box;
  height: var(--auth-strip-control-h);
  line-height: 0;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.16s ease;
}
.topbar-voice-notes-link[hidden]{
  display: none !important;
}
.topbar-voice-notes-icon{
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--auth-strip-control-h);
  height: var(--auth-strip-control-h);
  color: rgba(11, 18, 32, 0.72);
}
.topbar-voice-notes-link:hover .topbar-voice-notes-icon{
  color: #6d28d9;
}
.topbar-voice-notes-link:focus-visible{
  outline: 2px solid rgba(109, 40, 217, 0.45);
  outline-offset: 3px;
}
.topbar-showcase-tv-link{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  margin-right: 2px;
  padding: 0;
  box-sizing: border-box;
  height: var(--auth-strip-control-h);
  line-height: 0;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.16s ease, transform 0.18s ease;
}
.topbar-showcase-tv-link[hidden]{
  display: none !important;
}
.topbar-showcase-tv-icon{
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--auth-strip-control-h);
  height: var(--auth-strip-control-h);
  flex-shrink: 0;
}
.topbar-showcase-tv-link svg{
  display: block;
  width: var(--auth-strip-control-h);
  height: var(--auth-strip-control-h);
  flex-shrink: 0;
  transform: translateY(var(--topbar-showcase-tv-nudge-y));
}
.topbar-showcase-tv-link:hover svg{
  filter: saturate(1.06) brightness(1.03);
  transform: translateY(var(--topbar-showcase-tv-nudge-y));
}
.topbar-showcase-tv-link:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce){
  .topbar-showcase-tv-link{
    transition: opacity 0.16s ease;
  }
}
.admin-view-mode{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(11, 18, 32, 0.66);
}
.admin-view-mode[hidden]{
  display: none !important;
}
.admin-view-mode select{
  height: var(--auth-strip-control-h);
  min-width: 93px;
  border-radius: 10px;
  padding: 3px 8px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: normal;
  border: 1px solid rgba(11, 18, 32, 0.16);
  background-color: #fff;
  color: var(--search-placeholder-color);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
}
.account-actions-wrap{
  display: inline-flex;
  align-items: center;
}
.account-actions-wrap[hidden]{
  display: none !important;
}
.account-actions-select{
  height: var(--auth-strip-control-h);
  min-width: 93px;
  border-radius: 10px;
  padding: 3px 22px 3px 8px;
  font-size: 13px;
  border: 1px solid rgba(11, 18, 32, 0.16);
  background-color: #fff;
  color: var(--search-placeholder-color);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M2.5 4.5 6 8l3.5-3.5' stroke='%23475569' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 11px 11px;
}
.account-actions-select,
.admin-role-select-wrap select{
  font-size: 13px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: normal;
}
.auth-link{
  font-size: 13px;
  line-height: 1;
  font-weight: 400;
  color: rgba(11, 18, 32, 0.66);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.16s ease, opacity 0.16s ease;
}
.auth-link:hover{
  color: rgba(11, 18, 32, 0.9);
}
.auth-link:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.38);
  outline-offset: 3px;
  border-radius: 4px;
}
.auth-link-with-icon{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* [hidden] alone loses to .auth-link-with-icon { display: inline-flex } */
.auth-link-with-icon[hidden],
#adminBugReportsLink[hidden]{
  display: none !important;
}
.auth-link-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}
.auth-link-feedback .auth-feedback-label{
  white-space: nowrap;
  line-height: 1.35;
}
.auth-link-feedback.auth-link-with-icon{
  flex-shrink: 0;
}
.auth-slash-sep{
  opacity: 0.45;
  margin: 0;
  padding: 0;
  font-weight: 400;
}

.brand{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.brand-logo-link{
  display: inline-flex;
  border-radius: 14px;
  text-decoration: none;
}
.logo{
  width: 44px; height: 44px;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: none;
  background: #ffffff;
}
.brand h1{ margin:0; font-size: 18px; letter-spacing:.2px; }
.brand-kicker{
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: rgba(11, 18, 32, 0.72);
  text-transform: uppercase;
}
/* Keep the visible title on one line on narrow headers (home uses .brand-kicker-phrase). */
.brand-kicker-phrase,
span.brand-kicker{
  white-space: nowrap;
}
.subtitle{
  margin: 3px 0 0 0;
  color: var(--muted);
  font-size: 12.5px;
  max-width: 520px;
}

/* Tight widths: stack top-right actions so they don't crowd the header. */
@media (max-width: 860px){
  .topbar{
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 10px;
  }
  .topbar .brand{
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }
  /* Own row + full width so items align to the viewport right (not a shrink-wrapped strip). */
  .auth-strip{
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
  .auth-strip-showcase-cluster{
    align-self: flex-end;
  }
  .admin-view-mode{
    justify-content: flex-end;
  }
  .auth-link-with-icon{
    justify-content: flex-end;
  }
}

/* + and search share one row in main content */
.content-plus-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 2px 2px 8px;
}
.add-resource-cluster{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-shrink: 0;
}
/* Match one card column: 2× grid with 12px gap → (100% − 12px) / 2 */
.content-search{
  flex: 0 0 calc(50% - 6px);
  width: calc(50% - 6px);
  max-width: calc(50% - 6px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.content-search .search{
  width: 100%;
  position: relative;
  display: block;
}
.search-icon{
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(100, 116, 139, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search:focus-within .search-icon{
  color: color-mix(in srgb, var(--search-steel-focus, hsl(210 30% 58%)) 80%, #475569);
}
.content-search .search input{
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.add-resource-hint{
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.add-resource-hint:hover{
  color: var(--muted);
}
.content-sort-row{
  display: flex;
  justify-content: flex-end;
  padding: 4px 2px 10px;
  margin-top: 2px;
  margin-bottom: 0;
}
/* Below sort row, same left edge as the + FAB row */
.content-selected-labels-row{
  padding: 0 2px 12px;
  margin-top: -2px;
}
.selected-labels-line{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 0;
}
.selected-labels-prefix{
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
  flex-shrink: 0;
}
.selected-labels-chips{
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
/* Same width behavior as #tagList .tag-pill (intrinsic to label + count), not fixed 11.5rem */
button.selected-label-chip{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
}
button.selected-label-chip > span:first-of-type{
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.selected-label-remove{
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
  opacity: 0.75;
  margin-left: 1px;
}
button.selected-label-chip:hover .selected-label-remove{
  opacity: 1;
}
.content-header-sortside{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
  text-align: right;
}
.content-header-filters{
  display: block;
  max-width: min(100%, 520px);
  line-height: 1.35;
}
.content-header-sortside .sort{
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.content-header-sortside .sort label{
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}
.content-header-sortside .sort label strong{
  font-weight: 700;
  color: inherit;
}
.content-header-sortside .sort select{
  margin: 0;
  padding: 5px 26px 5px 8px;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border: 1px solid rgba(11, 18, 32, 0.22);
  color: var(--search-placeholder-color);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M2.5 4.5 6 8l3.5-3.5' stroke='%23475569' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 11px 11px;
}
.content-header-sortside .sort select:focus{
  border-color: var(--search-steel-focus);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.content-header-sortside .sort select option{
  color: var(--search-placeholder-color);
  background-color: #fff;
}

/* Round + button only; caption sits outside (see .add-resource-hint) */
.fab-add{
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-family: inherit;
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.38),
    0 10px 28px rgba(37, 99, 235, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fab-add:hover{
  transform: scale(1.06);
  box-shadow:
    0 6px 20px rgba(37, 99, 235, 0.48),
    0 14px 36px rgba(37, 99, 235, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}
.fab-add:focus-visible{
  outline: 3px solid rgba(37, 99, 235, 0.55);
  outline-offset: 4px;
}
.fab-add:active{
  transform: scale(0.96);
}
.fab-add-plus{
  font-size: 2.1rem;
  font-weight: 300;
  line-height: 0;
  display: block;
  transform: translateY(-0.08em); /* optical vertical center for “+” */
}
/* Same gradient + glyph as .fab-add; Showcase tag picker “Add it” control (smaller diameter). */
.fab-add.fab-add--showcase-tags-hint{
  width: 38px;
  height: 38px;
  box-shadow:
    0 3px 11px rgba(37, 99, 235, 0.34),
    0 8px 22px rgba(37, 99, 235, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}
.fab-add.fab-add--showcase-tags-hint:hover{
  transform: scale(1.06);
  box-shadow:
    0 5px 16px rgba(37, 99, 235, 0.42),
    0 11px 28px rgba(37, 99, 235, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}
.fab-add.fab-add--showcase-tags-hint .fab-add-plus{
  font-size: 1.5rem;
  font-weight: 300;
}
.search input{
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 2px solid color-mix(in srgb, hsl(218 30% 62%) 55%, transparent);
  color: var(--text);
  outline: none;
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.2),
    0 10px 24px rgba(37, 99, 235, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.search input::placeholder{
  color: var(--search-placeholder-color);
}
.search:has(.search-icon) input{
  padding-left: 42px;
}
.search input:focus{
  border-color: hsl(210 32% 58%);
  box-shadow:
    0 5px 18px rgba(37, 99, 235, 0.28),
    0 12px 30px rgba(37, 99, 235, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 0 0 4px rgba(37, 99, 235, 0.12);
}

.layout{
  display:grid;
  grid-template-columns: 310px 1fr;
  gap: 18px;
  padding: 18px 22px 40px;
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
}

/* Apps hub: narrower app picker so the embedded tool has more width */
.layout.tools-hub-layout{
  grid-template-columns: 220px 1fr;
}
@media (max-width: 980px){
  /* Must beat `.layout.tools-hub-layout` specificity — otherwise phones stay 220px | main side-by-side. */
  .layout.tools-hub-layout{
    grid-template-columns: 1fr;
  }

  /*
   * Apps hub: lock page to the viewport and give the main pane all remaining vertical space
   * (tray + expanded picker are auto height; iframe/workspace fills below).
   */
  body.tools-hub-shell{
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.tools-hub-shell > .topbar{
    flex: 0 0 auto;
  }
  body.tools-hub-shell > .layout.tools-hub-layout{
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  body.tools-hub-shell .tools-hub-apps-column{
    flex-shrink: 0;
    min-width: 0;
  }
  body.tools-hub-shell .tools-hub-main{
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.tools-hub-shell #toolsHubWorkspace:not([hidden]){
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.tools-hub-shell .tools-hub-frame:not([hidden]){
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
  }
}

/* First grid cell: optional mobile tray + vertical app cards (see @media max 980). */
.tools-hub-apps-column{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.tools-hub-tray-strip--mobile{
  display: none;
}
@media (max-width: 980px){
  .tools-hub-tray-strip--mobile{
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    cursor: default;
  }
  /*
   * Match home sidebar Apps row: icons hug "Apps" (flex-start), then + pins right.
   * flex-wrap + align-content lets many apps grow the tray downward with extra rows.
   */
  .tools-hub-tray-icons{
    display: flex;
    align-items: center;
    align-content: flex-start;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px 5px;
    margin-left: 2px;
  }
  .tools-hub-tray-strip--mobile .tools-hub-apps-expand-btn{
    flex-shrink: 0;
    margin-left: auto;
  }
  .tools-hub-sidebar.tools-hub-sidebar-cards:not(.tools-hub-sidebar--expanded){
    display: none !important;
  }
  .tools-hub-sidebar.tools-hub-sidebar-cards.tools-hub-sidebar--expanded{
    display: flex !important;
  }
  .tools-hub-apps-column:has(.tools-hub-sidebar--expanded) .tools-hub-apps-expand-btn .card-fold-toggle-char::before{
    content: '\2212';
  }
}
@media (min-width: 981px){
  .tools-hub-tray-strip--mobile{
    display: none !important;
  }
}

.tools-hub-empty-hint-narrow{
  display: none;
}
@media (max-width: 980px){
  .tools-hub-empty-hint-wide{
    display: none;
  }
  .tools-hub-empty-hint-narrow{
    display: inline;
  }
}

.sidebar{ display:flex; flex-direction:column; gap: 14px; }
@media (min-width: 981px){
  .sidebar{
    padding: 4px 6px;
    box-sizing: border-box;
  }
}

/* How it works + Tags: collapsible on single column (mini +/−); always open on wide layout */
.how-it-works-summary,
.sidebar-tags-summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.how-it-works-summary::-webkit-details-marker,
.sidebar-tags-summary::-webkit-details-marker{
  display: none;
}
.how-it-works-summary-label,
.sidebar-tags-summary-label{
  flex: 1 1 auto;
  min-width: 0;
}
.how-it-works-summary .how-it-works-arrow,
.sidebar-tags-summary .sidebar-tags-arrow{
  display: none;
}
.how-it-works[open] .how-it-works-summary .how-it-works-arrow .card-fold-toggle-char::before,
.sidebar-tags-panel[open] .sidebar-tags-summary .sidebar-tags-arrow .card-fold-toggle-char::before{
  content: '\2212';
}
.how-it-works .how-it-works-body p{
  margin: 0;
  /* Match .tag-list-hint: .muted sets size/color; line-height shared with tag sidebar */
  line-height: 1.45;
}
@media (min-width: 981px){
  .how-it-works-summary,
  .sidebar-tags-summary{
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.86);
    margin: 0 0 10px 0;
    cursor: default;
  }
  .how-it-works .how-it-works-body,
  .sidebar-tags-panel .sidebar-tags-body{
    padding: 0;
  }
}
@media (max-width: 980px){
  .how-it-works,
  .sidebar-tags-panel{
    padding: 14px;
  }
  .how-it-works-summary .how-it-works-arrow,
  .sidebar-tags-summary .sidebar-tags-arrow{
    display: inline-flex;
  }
  .how-it-works-summary,
  .sidebar-tags-summary{
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.86);
  }
  .how-it-works[open] .how-it-works-summary,
  .sidebar-tags-panel[open] .sidebar-tags-summary{
    margin-bottom: 0;
  }
  .how-it-works .how-it-works-body,
  .sidebar-tags-panel .sidebar-tags-body{
    margin-top: 10px;
  }
}

.panel{
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.panel h2{
  margin: 0 0 10px 0;
  font-size: 13px;
  color: rgba(255,255,255,.86);
}
.tag-list-hint{
  margin: 0 0 10px 0;
  line-height: 1.45;
}
.sidebar-tags-wrap{
  /* Exactly 10 full rows; 11th row triggers expand (+ uses `.chips` row-gap between rows). */
  --sidebar-tags-row-h: calc(12px * 1.25 + 12px + 2px);
  --sidebar-tags-row-gap: 8px;
  --sidebar-tags-collapsed-max: calc(
    10 * var(--sidebar-tags-row-h) + 9 * var(--sidebar-tags-row-gap)
  );
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
#tagList.sidebar-tags-chips{
  width: 100%;
  min-width: 0;
}
.sidebar-tags-expand-foot{
  display: flex;
  justify-content: flex-end;
  width: 100%;
  min-height: 0;
}
.sidebar-tags-wrap:not(.sidebar-tags-wrap--expanded) #tagList.sidebar-tags-chips{
  max-height: var(--sidebar-tags-collapsed-max);
  overflow: hidden;
}
.sidebar-tags-wrap.sidebar-tags-wrap--expanded #tagList.sidebar-tags-chips{
  max-height: none;
}
/* Mini +/− like truncated lists on tool cards (`.card-fold-toggle`). */
.sidebar-tags-expand-mini{
  flex-shrink: 0;
  padding: 2px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.sidebar-tags-expand-mini:hover{
  color: var(--text);
  background: rgba(11, 18, 32, 0.06);
}
.sidebar-tags-expand-mini:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}
.sidebar-tags-expand-mini .card-fold-toggle{
  margin-left: 0;
}
.sidebar-tags-wrap.sidebar-tags-wrap--expanded .sidebar-tags-expand-mini .card-fold-toggle-char::before{
  content: '\2212';
}
.chips{ display:flex; flex-wrap: wrap; gap: 8px; }
.admin-accounts-section{
  display: block;
}
.admin-accounts-section[hidden]{
  display: none !important;
}
.admin-accounts-table-outer{
  width: 100%;
}
.admin-accounts-table-wrap{
  width: 100%;
  max-width: 100%;
  max-height: min(80vh, 880px);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(11, 18, 32, 0.12);
  background: #fff;
}
.admin-accounts-table-wrap .admin-usage-logs-table{
  width: 100%;
  min-width: 880px;
  table-layout: fixed;
  font-size: 12px;
}
.admin-accounts-table-wrap col.admin-accounts-col-account{
  width: 30%;
}
.admin-accounts-table-wrap col.admin-accounts-col-delete{
  width: 42px;
}
.admin-accounts-table-wrap col.admin-accounts-col-role{
  width: 8rem;
}
.admin-accounts-table-wrap .admin-usage-logs-table th,
.admin-accounts-table-wrap .admin-usage-logs-table td{
  padding: 8px 10px;
  vertical-align: middle;
}
.admin-accounts-table-wrap .admin-usage-logs-table thead th{
  padding: 8px 10px;
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.admin-accounts-table-wrap .admin-accounts-role-label.admin-role-select-wrap{
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.admin-accounts-table-wrap .admin-accounts-role-cell{
  overflow: hidden;
  white-space: normal;
  vertical-align: middle;
}
.admin-accounts-table-wrap .admin-accounts-role-cell .admin-role-select-wrap select{
  min-width: 0 !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  padding: 3px 16px 3px 6px;
  height: auto;
  min-height: 24px;
}
.admin-accounts-app-col{
  text-align: center;
  white-space: normal;
}
/* Delete column: compact trash control */
.admin-accounts-table-wrap .admin-usage-logs-table tbody td:nth-child(2).admin-accounts-check-cell{
  text-align: center;
  vertical-align: middle;
  padding: 6px 4px;
}
/* App access checkboxes: centered in column (headers align to same center) */
.admin-accounts-check-cell.admin-accounts-app-access-cell{
  text-align: center;
  vertical-align: middle;
  padding: 6px 10px;
}
.admin-accounts-table-wrap .admin-usage-logs-table thead th.admin-accounts-app-col{
  text-align: center;
  vertical-align: middle;
  padding: 6px 10px;
}
.admin-accounts-check-label{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  cursor: pointer;
}
.admin-accounts-check-label input{
  width: 14px;
  height: 14px;
  accent-color: #2563eb;
  cursor: pointer;
}
.admin-accounts-account-cell{
  min-width: 0;
}
.admin-accounts-cell-email{
  font-weight: 600;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(11, 18, 32, 0.88);
  word-break: break-word;
}
.admin-accounts-cell-name{
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.25;
}
.admin-accounts-role-label.admin-role-select-wrap{
  margin: 0;
}
.admin-accounts-delete-btn{
  margin: 0 auto;
}
.admin-user-list{
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-usage-logs-section{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-usage-logs-toolbar.bug-reports-toolbar{
  margin-bottom: 0;
  width: 100%;
}
.admin-usage-logs-toolbar .content-search{
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.admin-usage-logs-section[hidden]{
  display: none !important;
}
.admin-usage-logs-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.admin-usage-logs-head .muted{
  margin: 0;
}
.admin-usage-logs-table-wrap{
  width: 100%;
  max-width: 100%;
  max-height: min(68vh, 620px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(11, 18, 32, 0.12);
  background: #fff;
}
.admin-usage-logs-table{
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 12px;
}
.admin-usage-logs-table th,
.admin-usage-logs-table td{
  padding: 8px 10px;
  border-bottom: 1px solid rgba(11, 18, 32, 0.1);
  text-align: left;
  vertical-align: top;
}
.admin-usage-logs-table thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fafc;
  color: rgba(11, 18, 32, 0.72);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-usage-logs-path-cell{
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-row.panel{
  padding: 14px 16px;
  margin: 0;
}
.admin-user-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  border-radius: var(--radius);
}
.admin-user-meta{
  flex: 1 1 auto;
  min-width: 0;
}
.admin-user-email{
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-name{
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(11, 18, 32, 0.62);
  overflow-wrap: break-word;
}
.admin-role-select-wrap{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(11, 18, 32, 0.65);
  flex-shrink: 0;
}
.admin-role-select-wrap select{
  height: 28px;
  min-width: 93px;
  border-radius: 10px;
  padding: 3px 22px 3px 8px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: normal;
  border: 1px solid rgba(11, 18, 32, 0.16);
  background-color: #fff;
  color: var(--search-placeholder-color);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M2.5 4.5 6 8l3.5-3.5' stroke='%23475569' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 11px 11px;
}
.content{
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  padding: 12px 14px;
}
.meta{ display:flex; align-items:center; gap: 10px; }
.muted{ color: var(--muted); font-size: 12.5px; }
.pill{
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 12.5px;
}
.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
  align-items: start;
  /* Stacking context so hover z-index overlaps sibling cards without reflow */
  isolation: isolate;
}

/* Desktop: left pane scrolls when tall; main list scrolls in .content-grid-scroll */
@media (min-width: 981px){
  /* Showcase + magic word: no .layout; locking body clips document scroll (feedback overrides overflow via body.feedback-page). */
  body:not(.showcase-page):not(.magic-word-page){
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .topbar{
    flex: 0 0 auto;
  }
  .layout{
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 18px;
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
  }
  .sidebar{
    align-self: stretch;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }
  .content{
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .content-grid-scroll{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    /* Room for .grid card hover scale so edges aren’t clipped by the scroll box */
    padding: 12px 14px 22px 14px;
    scrollbar-gutter: stable;
  }
  /* Same horizontal inset as .content-grid-scroll so + / sort / labels line up with cards */
  main.content > .content-plus-row{
    padding: 2px 14px 8px;
  }
  main.content > .content-sort-row{
    padding: 4px 14px 10px;
  }
  main.content > .content-selected-labels-row{
    padding: 0 14px 12px;
  }
  #resourceGrid{
    min-height: 0;
  }
}

/*
 * Home resource grid: 2 columns above 700px viewport; 1 column from 700px down.
 * Between 700px and --app-min-width (600px), scale padding/type (uses 100vw). Below 600px clamps hold → fixed sizes + horizontal scroll on html.
 * Card *width* cannot go below --app-min-width once the window is narrower than that (document floor), even though type/padding still key off vw.
 */
@media (max-width: 700px){
  .grid{ grid-template-columns: 1fr; }
  .content-search{
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }
  .content-grid-scroll{
    overflow: visible;
    padding: 0;
  }

  main.content{
    padding:
      clamp(10px, calc(12px + (100vw - 700px) * 0.02), 12px)
      clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
  }

  main.content .add-resource-cluster{
    gap: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
  }

  main.content .add-resource-hint{
    font-size: clamp(12.5px, calc(14px + (100vw - 700px) * 0.015), 14px);
  }

  main.content .fab-add{
    width: clamp(48px, calc(56px + (100vw - 700px) * 0.08), 56px);
    height: clamp(48px, calc(56px + (100vw - 700px) * 0.08), 56px);
  }
  /* ~2.1rem → ~1.75rem across 700–600px viewport */
  main.content .fab-add-plus{
    font-size: clamp(28px, calc(33.6px + (100vw - 700px) * 0.056), 33.6px);
  }

  /* Longhand padding so we don’t wipe `.search:has(.search-icon) input { padding-left }` (shorthand resets all sides). */
  main.content .search input{
    padding-top: clamp(9px, calc(11px + (100vw - 700px) * 0.02), 11px);
    padding-bottom: clamp(9px, calc(11px + (100vw - 700px) * 0.02), 11px);
    padding-right: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
    padding-left: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
  }
  main.content .search:has(.search-icon) input{
    padding-left: 42px;
  }

  main.content #resourceGrid{
    gap: clamp(10px, calc(12px + (100vw - 700px) * 0.02), 12px);
  }

  main.content #resourceGrid > .card{
    --card-pad: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
    padding: var(--card-pad);
    gap: clamp(6px, calc(8px + (100vw - 700px) * 0.02), 8px);
  }

  main.content #resourceGrid > .card .card-title-band{
    margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 0 calc(-1 * var(--card-pad));
    padding:
      clamp(6px, calc(7px + (100vw - 700px) * 0.02), 7px)
      var(--card-pad);
  }

  main.content #resourceGrid > .card .card-title-text{
    /* Was 0.01 → only ~1px over 700–600; too subtle. */
    font-size: clamp(12px, calc(14px + (100vw - 700px) * 0.02), 14px);
  }

  main.content #resourceGrid > .card .desc{
    font-size: clamp(11.5px, calc(14px + (100vw - 700px) * 0.025), 14px);
    min-height: clamp(32px, calc(38px + (100vw - 700px) * 0.06), 38px);
  }
}

/* --- Other routes: same 700→600 viewport scaling as home (shells, lists, cards) --- */
@media (max-width: 700px){
  .topbar{
    padding:
      clamp(14px, calc(18px + (100vw - 700px) * 0.04), 18px)
      clamp(14px, calc(22px + (100vw - 700px) * 0.08), 22px);
  }

  main.bug-reports-shell:not(.alumni-shell){
    padding:
      clamp(12px, calc(16px + (100vw - 700px) * 0.04), 16px)
      clamp(12px, calc(18px + (100vw - 700px) * 0.06), 18px)
      clamp(28px, calc(48px + (100vw - 700px) * 0.2), 48px);
  }

  main.bug-reports-shell.alumni-shell{
    padding-top: clamp(14px, calc(22px + (100vw - 700px) * 0.08), 22px);
    padding-bottom: clamp(28px, calc(40px + (100vw - 700px) * 0.12), 40px);
    padding-left: clamp(12px, calc(16px + (100vw - 700px) * 0.04), 16px);
    padding-right: clamp(12px, calc(16px + (100vw - 700px) * 0.04), 16px);
  }

  main.magic-word-shell{
    padding:
      clamp(12px, calc(16px + (100vw - 700px) * 0.04), 16px)
      clamp(12px, calc(18px + (100vw - 700px) * 0.06), 18px)
      clamp(28px, calc(48px + (100vw - 700px) * 0.2), 48px);
  }
  .magic-word-crt-case{
    padding:
      clamp(10px, calc(12px + (100vw - 700px) * 0.02), 12px)
      clamp(12px, calc(14px + (100vw - 700px) * 0.02), 14px)
      clamp(12px, calc(14px + (100vw - 700px) * 0.02), 14px);
  }
  .magic-word-placeholder{
    font-size: clamp(13px, calc(15px + (100vw - 700px) * 0.02), 15px);
  }

  main.reset-password-shell{
    padding:
      clamp(16px, calc(24px + (100vw - 700px) * 0.08), 24px)
      clamp(12px, calc(16px + (100vw - 700px) * 0.04), 16px);
  }

  .bug-reports-toolbar{
    margin-bottom: clamp(20px, calc(32px + (100vw - 700px) * 0.12), 32px);
  }
  .bug-reports-gate{
    font-size: clamp(13px, calc(14px + (100vw - 700px) * 0.01), 14px);
  }
  .bug-reports-list{
    gap: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
  }
  .bug-report-card{
    padding:
      clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px)
      clamp(12px, calc(16px + (100vw - 700px) * 0.04), 16px);
  }
  .bug-report-title{
    font-size: clamp(14px, calc(16px + (100vw - 700px) * 0.02), 16px);
  }
  .bug-report-line{
    font-size: clamp(12px, calc(13px + (100vw - 700px) * 0.01), 13px);
  }
  .bug-report-pre{
    padding:
      clamp(8px, calc(10px + (100vw - 700px) * 0.02), 10px)
      clamp(10px, calc(12px + (100vw - 700px) * 0.02), 12px);
    font-size: clamp(12px, calc(13px + (100vw - 700px) * 0.01), 13px);
  }

  /* Feedback kicker: stack date under badge only when compressed; wide = one row. */
  .bug-report-card-kicker{
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
  }
  .bug-report-meta{
    flex: none;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    text-align: left;
  }

  /*
   * Reminders (≤700px): toolbar is a fixed column stack; list stays a column stack.
   * Only cards + chrome scale down smoothly toward --app-min-width (600px).
   */
  .reminders-shell .reminders-layout{
    gap: clamp(16px, calc(24px + (100vw - 700px) * 0.08), 24px);
  }
  .reminders-shell .reminders-plus-row{
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: clamp(12px, calc(16px + (100vw - 700px) * 0.04), 16px);
  }
  .reminders-shell .reminders-search-wrap{
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
  }
  .reminders-shell .reminders-search-wrap .search{
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .reminders-shell .bug-reports-list{
    gap: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
  }
  .reminders-shell .reminder-card{
    --rc-pad-y: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
    --rc-pad-x: clamp(12px, calc(16px + (100vw - 700px) * 0.04), 16px);
    padding: var(--rc-pad-y) var(--rc-pad-x);
  }
  .reminders-shell .reminder-card-title{
    font-size: clamp(12px, calc(14px + (100vw - 700px) * 0.02), 14px);
  }
  .reminders-shell .reminder-card-label{
    font-size: clamp(10px, calc(11px + (100vw - 700px) * 0.01), 11px);
  }
  .reminders-shell .reminder-card-pre,
  .reminders-shell .reminder-card-meta{
    font-size: clamp(11.5px, calc(13px + (100vw - 700px) * 0.015), 13px);
  }
  .reminders-shell .reminder-card-block{
    margin-top: clamp(8px, calc(12px + (100vw - 700px) * 0.04), 12px);
  }
  .reminders-shell .fab-add{
    width: clamp(48px, calc(56px + (100vw - 700px) * 0.08), 56px);
    height: clamp(48px, calc(56px + (100vw - 700px) * 0.08), 56px);
  }
  .reminders-shell .fab-add-plus{
    font-size: clamp(28px, calc(33.6px + (100vw - 700px) * 0.056), 33.6px);
  }
  .reminders-shell .add-resource-cluster{
    gap: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
  }
  .reminders-shell .add-resource-hint{
    font-size: clamp(12.5px, calc(14px + (100vw - 700px) * 0.015), 14px);
  }
  .reminders-shell .search input{
    padding-top: clamp(9px, calc(11px + (100vw - 700px) * 0.02), 11px);
    padding-bottom: clamp(9px, calc(11px + (100vw - 700px) * 0.02), 11px);
    padding-right: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
    padding-left: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
  }
  .reminders-shell .search:has(.search-icon) input{
    padding-left: 44px;
  }
  .reminders-shell .reminders-archive-toggle{
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .reminders-shell .reminders-archive-toggle svg{
    width: 22px;
    height: 22px;
  }

  /* Feedback (/bug-reports.html): same adaptive toolbar as reminders; archive stays desktop 34×34 + 16px glyph (no flex shrink). */
  body.feedback-page .bug-reports-toolbar-row{
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: clamp(10px, calc(12px + (100vw - 700px) * 0.02), 12px);
  }
  body.feedback-page .bug-reports-search-wrap{
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    min-width: 0;
  }
  body.feedback-page .bug-reports-search-wrap .content-search{
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  body.feedback-page .bug-reports-toolbar > .bug-reports-toolbar-row > .bug-reports-export-btn{
    align-self: stretch;
    width: 100%;
    text-align: center;
  }
  body.feedback-page .bug-reports-search-wrap .reminders-archive-toggle{
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    flex-shrink: 0;
    box-sizing: border-box;
  }
  body.feedback-page .bug-reports-search-wrap .reminders-archive-toggle svg{
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .admin-user-list{
    gap: clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px);
  }
  .admin-user-row.panel{
    padding:
      clamp(10px, calc(14px + (100vw - 700px) * 0.04), 14px)
      clamp(12px, calc(16px + (100vw - 700px) * 0.04), 16px);
  }
  .admin-user-email{
    font-size: clamp(11px, calc(12px + (100vw - 700px) * 0.01), 12px);
  }

  .tools-hub-sidebar{
    gap: clamp(8px, calc(10px + (100vw - 700px) * 0.02), 10px);
  }
  .tools-hub-card{
    padding:
      clamp(10px, calc(12px + (100vw - 700px) * 0.02), 12px)
      clamp(12px, calc(14px + (100vw - 700px) * 0.02), 14px);
  }
  .tools-hub-card-with-icon{
    gap: clamp(8px, calc(12px + (100vw - 700px) * 0.04), 12px);
  }
  .tools-hub-card h2{
    font-size: clamp(12px, calc(13px + (100vw - 700px) * 0.01), 13px);
    line-height: clamp(20px, calc(22px + (100vw - 700px) * 0.02), 22px);
  }
  .tools-hub-empty-heading{
    font-size: clamp(14px, calc(16px + (100vw - 700px) * 0.02), 16px);
  }

  .alumni-meta-block{
    font-size: clamp(11.5px, calc(12.5px + (100vw - 700px) * 0.01), 12.5px);
  }
  .alumni-download-xlsx{
    font-size: clamp(11.5px, calc(12.5px + (100vw - 700px) * 0.01), 12.5px);
  }
  .alumni-th-btn{
    padding:
      clamp(4px, calc(6px + (100vw - 700px) * 0.02), 6px)
      clamp(6px, calc(8px + (100vw - 700px) * 0.02), 8px);
  }
  .alumni-table{
    font-size: clamp(10px, calc(11px + (100vw - 700px) * 0.01), 11px);
  }
}

.card{
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  display:flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
  position: relative;
}
.grid .card:has(.card-vote-hint:hover),
.grid .card:has(.card-vote-hint:focus-within){
  z-index: 6;
}
.grid .card{
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  transform-origin: center center;
  min-width: 0;
}
/* Tool cards: optional fold for long description / crowded tags; +/− only when used */
.card-fold{
  width: 100%;
  min-width: 0;
  margin: 0;
  border: none;
}
.card-tags-fold{
  margin-top: -2px;
}
.card-fold-summary{
  list-style: none;
  display: flex;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  user-select: none;
  color: inherit;
}
.card-desc-fold > .card-fold-summary{
  align-items: baseline;
}
.card-tags-fold > .card-fold-summary{
  align-items: center;
}
.card-fold-summary::-webkit-details-marker{ display: none; }
.card-fold-summary::marker{ content: ''; }
.card-fold-toggle{
  flex-shrink: 0;
  margin-left: auto;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
}
.card-desc-fold .card-fold-toggle{
  align-self: baseline;
}
.card-tags-fold .card-fold-toggle{
  align-self: center;
}
.card-desc-slot,
.card-tags-slot{
  min-width: 0;
  width: 100%;
}
.card-tags-measure{
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.card-tags-measure .tag-pill{
  flex-shrink: 0;
  max-width: min(14rem, 50vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-desc-measure{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
}
.card-fold-toggle-char::before{
  content: '+';
}
.card-fold[open] .card-fold-toggle-char::before{
  content: '\2212';
}
.card-tags-inline{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: -2px;
  width: 100%;
  min-width: 0;
}
.card-desc-fold .desc-foldable{
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin: 0;
}
.card-desc-fold:not([open]) .desc-foldable{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.card-desc-fold[open] .desc-foldable{
  display: block;
  -webkit-line-clamp: unset;
}
.card-tags-foldable{
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.card-tags-fold[open] .card-tags-foldable{
  flex-wrap: wrap;
  overflow: visible;
}
.card-tags-foldable .tag-pill{
  flex-shrink: 0;
  max-width: min(14rem, 50vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grid .card:hover{
  transform: scale(1.02);
  z-index: 5;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.1);
}
@media (prefers-reduced-motion: reduce){
  .grid .card{
    transition: none;
  }
  .grid .card:hover{
    transform: none;
  }
}
.card.card-duplicate-focus{
  animation: cardDuplicatePulse 1.5s ease;
}
@keyframes cardDuplicatePulse{
  0%{
    box-shadow: 0 12px 32px rgba(0,0,0,.06), 0 0 0 0 rgba(37, 99, 235, 0.32);
  }
  30%{
    box-shadow: 0 12px 32px rgba(0,0,0,.06), 0 0 0 4px rgba(37, 99, 235, 0.28);
  }
  100%{
    box-shadow: 0 12px 32px rgba(0,0,0,.06), 0 0 0 0 rgba(37, 99, 235, 0);
  }
}
.existing-card-preview{
  padding-top: 10px;
}
.existing-card-preview .card{
  margin: 0;
}
.existing-card-preview .card [data-tag],
.existing-card-preview .card [data-vote],
.existing-card-preview .card [data-delete-resource]{
  pointer-events: none;
}

/* Title strip: lighter steel blue (see STEEL_BLUE_TITLE_BAND in app.js) */
.card-title-band{
  margin: -14px -14px 0 -14px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--tb-border, hsl(218 40% 40%));
  background: linear-gradient(
    165deg,
    var(--tb1, hsl(212 38% 56%)) 0%,
    var(--tb2, hsl(210 42% 52%)) 48%,
    var(--tb3, hsl(216 36% 54%)) 100%
  );
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  overflow: hidden;
}
.card-title-band-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.card-title-text{
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--tb-text, hsl(210 55% 98%));
  min-width: 0;
}
.card-title-text .card-title-link{
  color: inherit;
  text-decoration: none;
  transition: text-shadow 0.22s ease;
}
/* Direct hover / keyboard: classic underline + a touch more glow */
.card-title-text .card-title-link:hover{
  text-decoration: underline;
  text-underline-offset: 2px;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.5),
    0 0 22px rgba(255, 255, 255, 0.28);
}
/* Card inflate: glow + underline on linked titles */
.grid .card:hover .card-title-text .card-title-link{
  text-decoration: underline;
  text-underline-offset: 2px;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.45),
    0 0 16px rgba(255, 255, 255, 0.22);
}
.card-title-text .card-title-link:focus-visible{
  outline: 2px solid rgba(255, 255, 255, 0.88);
  outline-offset: 2px;
  border-radius: 4px;
}
.card-title-band .votes{
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}
.card .desc{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  min-height: 38px;
}
/* Tag pills: theme pastels via --tag-bg / --tag-border / --tag-fg (set in app.js) */
.tag-pill{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: normal;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--tag-bg, rgba(11, 18, 32, 0.06));
  border: 1px solid var(--tag-border, rgba(11, 18, 32, 0.14));
  color: var(--tag-fg, rgba(11, 18, 32, 0.78));
  cursor: pointer;
  user-select: none;
  transition: box-shadow 0.12s ease, filter 0.12s ease;
}
button.tag-pill,
span.tag-pill{
  font-family: inherit;
}
button.tag-pill{
  color: var(--tag-fg, rgba(11, 18, 32, 0.78));
}
.tag-pill:hover:not(.tag-pill-active){
  filter: brightness(0.96);
}
/* Keep category tint (inline --tag-*); ring shows selection — same hue as cards/detail/add form */
.tag-pill-active{
  background: var(--tag-bg, rgba(37, 99, 235, 0.08)) !important;
  border: 1px solid var(--tag-border, rgba(37, 99, 235, 0.35)) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.38);
  color: var(--tag-fg, rgba(11, 18, 32, 0.9)) !important;
  filter: none;
}
.tag-pill-active:hover{
  filter: none;
}
.cat-pill{
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(53,215,255,.14);
  border: 1px solid rgba(53,215,255,.22);
  user-select:none;
}

.btn{
  display:inline-flex;
  gap: 8px;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  text-decoration:none;
  user-select:none;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(255,255,255,.22); }
.btn:active{
  transform: translateY(0px);
  outline: none;
}
.btn.small{ padding: 7px 10px; border-radius: 12px; font-size: 12px; }
.btn.primary{
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
.btn.danger{
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
.btn.ghost{
  background: transparent;
}
.icon-btn{
  width: 40px; height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor:pointer;
}

.card-footer-row{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.card-details{
  flex: 1;
  min-width: 0;
  border: none;
}
.card-details-summary{
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  user-select: none;
  padding: 4px 0;
}
.card-details-summary::-webkit-details-marker{ display: none; }
.card-details-summary::marker{ content: ''; }
.card-details-chev.card-fold-toggle{
  margin-left: auto;
  color: currentColor;
  opacity: 0.9;
}
.card-details[open] .card-details-chev .card-fold-toggle-char::before{
  content: '\2212';
}
/* Open details on its own row so examples use the full card width (not squeezed beside votes). */
.card-details[open]{
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
}
.card-details-body{
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(11, 18, 32, 0.1);
}
.card-details-block{
  margin-bottom: 10px;
}
.card-details-block:last-child{
  margin-bottom: 0;
}
.card-details-heading{
  margin: 0 0 6px 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(11, 18, 32, 0.55);
}
.card-details-pre{
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(11, 18, 32, 0.04);
  border: 1px solid rgba(11, 18, 32, 0.08);
  color: var(--text);
  max-height: 160px;
  overflow: auto;
}
.card-details-link{
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.card-details-link:hover{
  text-decoration: underline;
}
.card-details-empty{
  margin: 0;
  font-size: 12.5px;
}
/* Use with .vote on the same element (guest thumbs); no extra padding vs logged-in .vote. */
.card-vote-hint{
  position: relative;
  z-index: 2;
  cursor: default;
  user-select: none;
}
.vote.card-vote-hint{
  display: flex;
}
.card-vote-hint::after{
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  transform: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid rgba(11, 18, 32, 0.14);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}
.card-vote-hint:hover::after,
.card-vote-hint:focus-visible::after{
  opacity: 1;
  visibility: visible;
}
.card-vote-hint:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Guest: disabled thumb hit areas don’t receive hover; parent shows “Log in to vote” tooltip. */
.card-vote-hint .vote-icon-btn{
  pointer-events: none;
}
.vote{
  display:flex;
  gap: 8px;
  align-items:center;
  margin-left: auto;
  flex-shrink: 0;
}
.votes{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  white-space: nowrap;
}
.vote .btn{ padding: 8px 10px; border-radius: 12px; }

/* Thumbs: outline SVG only (monochrome), light hit area */
.vote-icon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  padding: 6px 8px;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(11, 18, 32, 0.52);
  cursor: pointer;
  box-shadow: none;
  transition: background 0.12s ease, transform 0.1s ease, color 0.12s ease;
}
.vote-icon-btn .vote-icon-svg{
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}
.vote-icon-btn:hover{
  background: rgba(11, 18, 32, 0.06);
  color: rgba(11, 18, 32, 0.82);
}
.vote-icon-btn:active{
  background: rgba(11, 18, 32, 0.09);
  color: rgba(11, 18, 32, 0.9);
  transform: scale(0.96);
}
.vote-icon-btn:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}
.vote-icon-btn:disabled{
  opacity: 0.4;
  cursor: not-allowed;
  background: transparent;
}
.vote-icon-btn-danger{
  color: rgba(180, 35, 24, 0.72);
}
.vote-icon-btn-danger:hover{
  background: rgba(180, 35, 24, 0.10);
  color: rgba(180, 35, 24, 0.96);
}
.vote-icon-btn-danger:active{
  background: rgba(180, 35, 24, 0.16);
}

.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  /* Column + margin auto on .modal-card centers short dialogs; tall forms scroll inside the card. */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 50;
  padding:
    calc(16px + env(safe-area-inset-top, 0px))
    calc(16px + env(safe-area-inset-right, 0px))
    calc(16px + env(safe-area-inset-bottom, 0px))
    calc(16px + env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.modal[hidden]{
  display:none !important;
}
.modal-card{
  width: min(880px, 100%);
  flex: 0 0 auto;
  margin-block: auto;
  max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  border-radius: 22px;
  background: rgba(14,18,45,.92);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.modal-card-compact{
  width: min(460px, 100%);
}
.reset-password-shell{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.reset-password-card{
  width: min(460px, 100%);
}
.modal-head h1{
  margin: 0;
  font-size: 18px;
}
.modal-head{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.modal-head h2{ margin:0; font-size: 18px; }
.modal-head .icon-btn{
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.detail-sub{ display:flex; gap: 10px; margin-top: 8px; align-items:center; }
.modal-body{ padding: 14px 16px 18px; }
.lead{
  margin: 0 0 12px 0;
  color: rgba(255,255,255,.86);
  line-height: 1.45;
}
.detail-tags{ margin: 12px 0; }
.detail-examples h3{ margin: 0 0 8px; font-size: 13px; color: rgba(255,255,255,.8); }
.codebox{
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.85);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow:auto;
}
.detail-links{ margin: 12px 0; }
.vote-row{
  display:flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.vote-row .vote-icon-btn{
  padding: 6px 10px;
}

/* High-key (bright) theme overrides */
:root{
  --bg0:#ffffff;
  --bg1:#ffffff;
  --text:#0b1220;
  --muted: rgba(11,18,32,.65);
  --stroke: rgba(11,18,32,.14);
  --card: rgba(255,255,255,.98);
  --card2: rgba(255,255,255,.99);
  --shadow: 0 18px 55px rgba(0,0,0,.09);
  --primary:#2563eb;
  --primary2:#06b6d4;
  --danger:#e11d48;
  --ok:#16a34a;
  /* Same steel blues as card title band (STEEL_BLUE_TITLE_BAND in app.js) */
  --title-steel-border: hsl(218 40% 40%);
  --title-steel-mid: hsl(210 42% 52%);
  --title-steel-soft: hsl(216 36% 54%);
  --title-steel-focus: hsl(210 42% 36%);
  /* Lighter steel for search — same hue family as titles, easier on the eyes */
  --search-steel-border: hsl(218 26% 82%);
  --search-steel-focus: hsl(210 30% 58%);
  /* Match + button vibe: layered blue glow + inset rim */
  --search-field-shadow:
    0 4px 14px rgba(37, 99, 235, 0.26),
    0 10px 26px rgba(37, 99, 235, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
  --search-field-shadow-focus:
    0 5px 18px rgba(37, 99, 235, 0.34),
    0 14px 32px rgba(37, 99, 235, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 0 0 4px rgba(37, 99, 235, 0.14);
}

body{
  color: var(--text);
  background: #ffffff;
}

.bg{
  opacity: 0;
}

.topbar{
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid rgba(11,18,32,.12);
}

.search input{
  background: #ffffff;
  border: 2px solid var(--search-steel-border);
  color: var(--text);
  box-shadow: var(--search-field-shadow);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.search input:focus{
  border-color: var(--search-steel-focus);
  box-shadow: var(--search-field-shadow-focus);
  outline: none;
}
.content-search .search-icon{
  color: color-mix(in srgb, hsl(218 28% 52%) 55%, #94a3b8);
}
.content-search .search:focus-within .search-icon{
  color: color-mix(in srgb, var(--search-steel-focus) 75%, #475569);
}

.panel{
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(11,18,32,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.panel h2{
  color: rgba(11,18,32,.80);
}
@media (min-width: 981px){
  .how-it-works-summary,
  .sidebar-tags-summary{
    color: rgba(11, 18, 32, 0.8);
  }
}
@media (max-width: 980px){
  .how-it-works-summary,
  .sidebar-tags-summary{
    color: rgba(11, 18, 32, 0.8);
  }
  .how-it-works-summary .how-it-works-arrow,
  .sidebar-tags-summary .sidebar-tags-arrow{
    color: rgba(11, 18, 32, 0.42);
  }
}
.content{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(11,18,32,.10);
}
.card{
  background: #ffffff;
  border: 1px solid rgba(11,18,32,.10);
  box-shadow: 0 12px 32px rgba(0,0,0,.06);
}
.pill,.votes{
  background: rgba(11,18,32,.05);
  border: 1px solid rgba(11,18,32,.10);
  color: var(--text);
}
.tag-pill{
  background: var(--tag-bg, rgba(11, 18, 32, 0.055));
  border-color: var(--tag-border, rgba(11, 18, 32, 0.13));
  color: var(--tag-fg, rgba(11, 18, 32, 0.8));
}

.btn{
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  color: var(--text);
  background: #ffffff;
  border: 1px solid rgba(11,18,32,.16);
}
.btn.primary{
  border-color: rgba(11,18,32,.22);
  background: #ffffff;
  color: var(--text);
}
.btn.danger{
  border-color: rgba(11,18,32,.22);
  background: #ffffff;
  color: var(--text);
}
.btn.ghost{
  background: transparent;
}
/* Earlier `.btn:hover` border is for dark UI; keep a visible stroke on the bright shell. */
.btn:hover{
  border-color: rgba(11,18,32,.22);
}
.btn.primary:hover,
.btn.danger:hover{
  border-color: rgba(11,18,32,.30);
}
/* Match enabled stroke/fill; browsers otherwise fade disabled buttons. */
.btn:disabled{
  opacity: 1;
  cursor: not-allowed;
  transform: none;
  color: var(--text);
  background: #ffffff;
  border: 1px solid rgba(11,18,32,.16);
}
.btn.primary:disabled,
.btn.danger:disabled{
  border-color: rgba(11,18,32,.22);
}
.btn:disabled:hover{
  transform: none;
  border-color: rgba(11,18,32,.16);
}
.btn.primary:disabled:hover,
.btn.danger:disabled:hover{
  border-color: rgba(11,18,32,.22);
}
/* Match focus rings used elsewhere (e.g. vote buttons): no default black rim on click / mouse focus. */
.btn:focus:not(:focus-visible){
  outline: none;
}
.btn:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}
.icon-btn{
  background: #ffffff;
  border: 1px solid rgba(11,18,32,.14);
  color: var(--text);
}

.modal{
  background: rgba(0,0,0,.28);
}
.modal-card{
  background: #ffffff;
  border: 1px solid rgba(11,18,32,.12);
}
.lead,.muted,.codebox{
  color: var(--text);
}
/* Keep sidebar helper copy truly muted and identical between sections. */
.how-it-works .how-it-works-body p,
.tag-list-hint{
  color: var(--muted) !important;
  font-size: 12.5px;
  line-height: 1.45;
}
.codebox{
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(11,18,32,.12);
}

input, textarea, select{
  background: #ffffff;
  border: 1px solid rgba(11,18,32,.14);
  color: var(--text);
}

/* Force pure logo-paper white across main surfaces */
body{ background:#ffffff !important; }
html{ background:#ffffff !important; }
.topbar{ background:#ffffff !important; border-bottom:1px solid rgba(11,18,32,.10) !important; }
.panel{ background:#ffffff !important; border:1px solid rgba(11,18,32,.10) !important; }
.content{ background:#ffffff !important; border:1px solid rgba(11,18,32,.10) !important; }
.card{ background:#ffffff !important; border:1px solid rgba(11,18,32,.10) !important; }
.modal{ background: rgba(0,0,0,.55) !important; }
.modal-card{ background:#ffffff !important; border:1px solid rgba(11,18,32,.12) !important; }
#authModal .modal-card,
#signupSplashModal .modal-card{
  width: min(528px, 100%) !important;
}
/* Search stays white/steel — not the blue modal field style */
.search input{
  background: #ffffff !important;
  border: 2px solid var(--search-steel-border) !important;
  color: var(--text);
  box-shadow: var(--search-field-shadow) !important;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.search input:focus{
  border-color: var(--search-steel-focus) !important;
  box-shadow: var(--search-field-shadow-focus) !important;
  outline: none;
}
/* Blue-tint fields: modals only (not search, not sort) */
#authForm input:not(.auth-input-error),
#authForm textarea,
#addForm input,
#addForm textarea,
#addForm .add-tags-entry-composite,
#showcaseTagsForm .add-tags-entry-composite,
#bugForm input:not([type="radio"]):not([type="checkbox"]),
#bugForm textarea,
#profileForm input,
#attendanceForm input,
#attendanceUnlockForm input:not([type="button"]):not([type="submit"]),
#attendanceSetPasswordForm input:not([type="button"]):not([type="submit"]),
#attendanceChangePasswordForm input:not([type="button"]):not([type="submit"]),
#resetForm input,
#magicWordForm .magic-word-input{
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.38) !important;
}
.content-field-label{
  display: block;
  margin: 0 0 6px 2px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.78);
}
#addForm .add-tags-field .content-field-label-tags-plain{
  font-weight: 400;
}
.pill, .votes{ background: rgba(11,18,32,.04) !important; border:1px solid rgba(11,18,32,.10) !important; }
.card-title-band .votes{
  color: rgba(255,255,255,.95) !important;
  background: rgba(255,255,255,.22) !important;
  border: 1px solid rgba(255,255,255,.4) !important;
}
.tag-pill{
  background: var(--tag-bg, rgba(11, 18, 32, 0.055)) !important;
  border: 1px solid var(--tag-border, rgba(11, 18, 32, 0.13)) !important;
  color: var(--tag-fg, rgba(11, 18, 32, 0.8)) !important;
}
.tag-pill:hover:not(.tag-pill-active){
  filter: brightness(0.96);
}
.tag-pill-active{
  background: var(--tag-bg, rgba(11, 18, 32, 0.06)) !important;
  border: 1px solid var(--tag-border, rgba(11, 18, 32, 0.13)) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.38) !important;
  color: var(--tag-fg, rgba(11, 18, 32, 0.9)) !important;
  filter: none !important;
}
.form-actions{
  display:flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.auth-error{
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #b42318;
}
.auth-email-field-error{
  margin: 6px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #b42318;
  line-height: 1.35;
}
.auth-error.auth-success{
  color: #067647;
}
.auth-resend-verify-wrap{
  margin: 12px 0 10px;
}
.auth-resend-verify-wrap .btn.small{
  font-size: 12.5px;
  padding: 6px 10px;
}

form label{
  display:flex;
  flex-direction:column;
  gap: 7px;
  margin-bottom: 12px;
  color: rgba(11,18,32,.82);
  font-size: 13px;
}
input, textarea, select{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--text);
  outline:none;
}
#addForm input:focus,
#addForm textarea:focus,
#addForm .add-tags-entry-composite:focus-within,
#showcaseTagsForm .add-tags-entry-composite:focus-within{
  border-color: rgba(37, 99, 235, 0.62) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}
#addForm .add-tags-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  color: rgba(11,18,32,.82);
  font-size: 13px;
}
.add-tags-auto-hint,
.add-tags-unavailable{
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
}
#addForm .add-tags-auto-hint,
#addForm .add-tags-unavailable{
  padding-left: 14px;
  box-sizing: border-box;
}
.add-tags-entry-composite{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.38);
}
.add-tags-entry-composite #addTagSuggestedChips,
.add-tags-entry-composite #addTagChips,
.add-tags-entry-composite #showcaseTagChips{
  display: contents;
}
.add-tag-suggested-chips,
.add-tag-chips-inner{
  margin: 0;
}
#addForm .add-tags-entry-composite input[type="text"],
#showcaseTagsForm .add-tags-entry-composite input[type="text"]{
  flex: 1 1 140px;
  min-width: 10ch;
  width: auto;
  margin: 0;
  padding: 4px 2px;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  font-size: inherit;
  line-height: 1.25;
}
#addForm .add-tags-entry-composite input[type="text"]:focus,
#showcaseTagsForm .add-tags-entry-composite input[type="text"]:focus{
  border: none !important;
  box-shadow: none !important;
  outline: none;
}
/* Same typography as #tagList .tag-pill; slightly tighter vertical padding so overall height matches list pills (× is shorter than old 22px hit target). */
.add-form-tag-chip.tag-pill{
  cursor: default;
  max-width: 100%;
  gap: 4px;
  padding: 5px 10px;
  box-sizing: border-box;
}
.add-form-tag-chip .add-form-tag-text{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  font: inherit;
  color: inherit;
}
/* Suggested: width = label + × (inherits padding from .add-form-tag-chip). */
.add-form-tag-chip.add-form-suggested-chip.tag-pill{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  align-self: flex-start;
}
.add-form-tag-chip.add-form-suggested-chip .add-form-suggested-add.add-form-tag-text{
  cursor: pointer;
  border: none;
  background: transparent !important;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 400;
  color: inherit !important;
  text-align: left;
  max-width: none;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* × sized to ~line box (12px/1.25) so pill height matches #tagList pills, not 22px tall */
.add-form-tag-chip .add-form-tag-remove{
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent !important;
  color: var(--tag-fg, rgba(11, 18, 32, 0.78)) !important;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  opacity: 0.75;
  -webkit-appearance: none;
  appearance: none;
}
.add-form-tag-chip .add-form-tag-remove:hover{
  opacity: 1;
  background: rgba(11, 18, 32, 0.08) !important;
}
#authForm .auth-email-input-wrap{
  position: relative;
}
/* Sign-up names + email + passwords: one consistent row height (plain inputs weren’t picking up wrap-only rules). */
#authForm input:not([type="hidden"]):not([type="button"]):not([type="submit"]){
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.35;
}
#authForm .auth-email-input-wrap input{
  padding-right: 42px;
}
.auth-email-clear-btn{
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(11, 18, 32, 0.45);
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.auth-email-clear-btn:hover{
  background: rgba(11, 18, 32, 0.06);
  color: rgba(11, 18, 32, 0.78);
}
.auth-email-clear-btn:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}
.auth-email-clear-btn[hidden]{
  display: none !important;
}
#authForm .password-input-wrap{
  position: relative;
}
#authForm .password-input-wrap input{
  padding-right: 48px;
}
#resetForm .password-input-wrap{
  position: relative;
}
#resetForm .password-input-wrap input{
  width: 100%;
  padding-right: 40px;
}
#authForm input:focus{
  border-color: rgba(37, 99, 235, 0.62) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}
#resetForm input:focus{
  border-color: rgba(37, 99, 235, 0.62) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}
#bugForm input:not([type="radio"]):not([type="checkbox"]):focus,
#bugForm textarea:focus{
  border-color: rgba(37, 99, 235, 0.62) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}
.feedback-kind-row{
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 10px;
}
.feedback-kind-label{
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.55);
}
.feedback-kind-options{
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
}
.feedback-kind-option{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(11, 18, 32, 0.82);
  cursor: pointer;
}
.feedback-kind-option input{
  margin: 0;
  accent-color: #2563eb;
}
/* Bug-only fields: form label { display:flex } can fight [hidden]; keep off for feature requests */
#bugFormBugOnlyFields[hidden],
#bugFormEmailWrap[hidden]{
  display: none !important;
}
.bug-modal-success-body{
  padding-top: 10px;
}
.bug-modal-success-actions{
  justify-content: stretch;
  flex-wrap: wrap;
  margin-top: 0;
}
.bug-modal-success-actions .btn{
  flex: 1 1 160px;
  min-width: 0;
}
#profileForm input[readonly]{
  cursor: default;
  background: rgba(11, 18, 32, 0.06) !important;
  border-color: rgba(11, 18, 32, 0.16) !important;
  color: rgba(11, 18, 32, 0.72);
}
#profileForm input[readonly]:focus{
  border-color: rgba(11, 18, 32, 0.22) !important;
  box-shadow: none !important;
  outline: none;
}
#profileForm input:focus,
#attendanceForm input:focus,
#attendanceUnlockForm .password-input-wrap input:focus,
#attendanceSetPasswordForm .password-input-wrap input:focus,
#attendanceChangePasswordForm .password-input-wrap input:focus{
  border-color: rgba(37, 99, 235, 0.62) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}
#attendanceUnlockForm .password-input-wrap,
#attendanceSetPasswordForm .password-input-wrap,
#attendanceChangePasswordForm .password-input-wrap{
  position: relative;
}
#attendanceUnlockForm .password-input-wrap input,
#attendanceSetPasswordForm .password-input-wrap input,
#attendanceChangePasswordForm .password-input-wrap input{
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px 48px 12px 14px;
  font-size: 16px;
  line-height: 1.35;
}
#authEmail.auth-input-error{
  border-color: #b42318 !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14) !important;
}
#authEmail.auth-input-error:focus{
  border-color: #b42318 !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18) !important;
}
.password-toggle-btn{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(11, 18, 32, 0.56);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
/* Two stacked SVGs in one slot; display:none on <g> inside a single SVG is unreliable */
.password-toggle-icon-wrap{
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.password-toggle-icon-wrap svg{
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  display: block;
}
.password-toggle-icon-wrap .password-toggle-eye-off-svg{
  display: none;
}
.password-toggle-btn.showing .password-toggle-icon-wrap .password-toggle-eye-open-svg{
  display: none;
}
.password-toggle-btn.showing .password-toggle-icon-wrap .password-toggle-eye-off-svg{
  display: block;
}
.password-toggle-btn:hover{
  background: rgba(11, 18, 32, 0.06);
  color: rgba(11, 18, 32, 0.8);
}
.password-toggle-btn:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}
@media (max-width: 640px){
  .modal-head .icon-btn{
    width: 48px;
    height: 48px;
    font-size: 26px;
  }
  .showcase-video-dialog .showcase-dialog-close.icon-btn{
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 26px;
  }
  .showcase-video-dialog .showcase-dialog-close.icon-btn svg{
    width: 22px;
    height: 22px;
  }
  #authModal .password-toggle-btn{
    width: 36px;
    height: 36px;
    right: 8px;
  }
  #authModal .password-toggle-icon-wrap{
    width: 22px;
    height: 22px;
  }
  #authModal .password-toggle-icon-wrap svg{
    width: 22px;
    height: 22px;
  }
  #authForm .password-input-wrap input{
    padding-right: 52px;
  }
}
/* Hide browser-native password reveal controls (we use custom eye buttons). */
#authForm input[type="password"]::-ms-reveal,
#authForm input[type="password"]::-ms-clear,
#resetForm input[type="password"]::-ms-reveal,
#resetForm input[type="password"]::-ms-clear{
  display: none;
}
#authForm input[type="password"]::-webkit-credentials-auto-fill-button,
#resetForm input[type="password"]::-webkit-credentials-auto-fill-button{
  visibility: hidden;
  pointer-events: none;
}
/*
 * Hiding this pseudo-element on attendance PIN fields broke typing on some mobile WebKit builds.
 * Auth/reset keep it suppressed so our custom eye toggle is the only affordance.
 */
#authForm input[type="password"]::-webkit-textfield-decoration-container,
#resetForm input[type="password"]::-webkit-textfield-decoration-container{
  display: none;
}
#attendanceUnlockForm input[type="password"]::-ms-reveal,
#attendanceUnlockForm input[type="password"]::-ms-clear,
#attendanceSetPasswordForm input[type="password"]::-ms-reveal,
#attendanceSetPasswordForm input[type="password"]::-ms-clear,
#attendanceChangePasswordForm input[type="password"]::-ms-reveal,
#attendanceChangePasswordForm input[type="password"]::-ms-clear{
  display: none;
}
#attendanceUnlockForm input[type="password"]::-webkit-credentials-auto-fill-button,
#attendanceSetPasswordForm input[type="password"]::-webkit-credentials-auto-fill-button,
#attendanceChangePasswordForm input[type="password"]::-webkit-credentials-auto-fill-button{
  visibility: hidden;
  pointer-events: none;
}
.password-rules{
  margin-top: 4px;
}
.password-rules-intro{
  margin: 0 0 6px 0;
  font-size: 12px;
  color: rgba(11, 18, 32, 0.62);
}
.password-rules-list{
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
.password-rule-item{
  font-size: 12px;
  color: rgba(11, 18, 32, 0.56);
}
.password-rule-item.met{
  color: rgba(17, 24, 39, 0.84);
  font-weight: 600;
}
textarea{ resize: vertical; }

.note p{ margin:0; color: var(--muted); font-size: 14px; line-height: 1.35; }

/* --- Admin bug reports page (/bug-reports.html) --- */
/* "MSAI · CAT" uses same .brand-kicker as index; line-height matches that block */
.bug-reports-page-heading{
  line-height: 1.2;
}
/* Index: .brand h1’s letter-spacing beats .brand-kicker on the h1 — inherit so this span matches */
.bug-reports-page-heading .brand-kicker{
  letter-spacing: inherit;
}
.bug-reports-heading-sep{
  display: inline-block;
  padding: 0 0.45em;
  color: rgba(11, 18, 32, 0.38);
  font-weight: 400;
}
.bug-reports-heading-page{
  font-weight: 400;
  color: rgba(11, 18, 32, 0.72);
  text-transform: none;
}
.bug-reports-shell{
  max-width: 880px;
  margin: 0 auto;
  padding: 16px 18px 48px;
}
/* Feedback + magic word: html/body { height:100% } can clip; let the page grow and scroll */
html.feedback-page,
html.magic-word-page{
  height: auto;
  min-height: 100%;
}
body.feedback-page,
body.magic-word-page{
  min-height: 100%;
  height: auto;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
main.attendance-dashboard-shell.bug-reports-shell{
  max-width: min(1420px, 100%);
}
.bug-reports-toolbar{
  margin-bottom: 32px;
}
.bug-reports-toolbar-row{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  width: 100%;
}
.bug-reports-toolbar > .bug-reports-toolbar-row > .content-search{
  flex: 1 1 240px;
  min-width: 0;
  width: auto;
  max-width: 100%;
}
.bug-reports-search-wrap{
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.bug-reports-search-wrap .content-search{
  flex: 1 1 360px;
  min-width: 0;
  max-width: 100%;
}
.bug-reports-export-btn{
  flex: 0 0 auto;
  white-space: nowrap;
}
/* Toolbar with search only (no row wrapper), e.g. admin accounts */
.bug-reports-toolbar > .content-search{
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.bug-reports-gate{
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}
.bug-reports-gate a{
  color: var(--primary, #2563eb);
  font-weight: 600;
}
.bug-reports-list{
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bug-reports-empty{
  margin: 0;
}

/* Triple-click target on home (MSAI · CAT); no visual change */
.brand-interpunct{
  cursor: default;
  user-select: none;
}

/* Full-screen magic-word iframe: address bar stays on home URL */
.magic-word-overlay[hidden]{
  display: none !important;
}
.magic-word-overlay{
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.magic-word-overlay-frame{
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
}

/* --- Magic word page: CRT + embedded video --- */
.magic-word-shell{
  max-width: min(92vw, 800px);
  margin: 0 auto;
  padding: 16px 18px 48px;
}
.magic-word-error-slot{
  display: grid;
  grid-template-areas: 'stack';
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}
.magic-word-error-ghost,
.magic-word-error-live{
  grid-area: stack;
}
.magic-word-error-ghost{
  color: transparent;
  user-select: none;
  pointer-events: none;
}
.magic-word-error-live{
  color: #b42318;
}
.magic-word-error-live:empty{
  visibility: hidden;
}
.magic-word-crt{
  margin: 0 auto;
  max-width: 100%;
}
.magic-word-crt-case{
  border-radius: 14px 14px 10px 10px;
  background:
    linear-gradient(165deg, #3a3d42 0%, #25262b 38%, #1c1d21 100%);
  box-shadow:
    0 4px 0 #121316,
    0 12px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 12px 14px 14px;
  border: 1px solid rgba(0, 0, 0, 0.45);
}
.magic-word-crt-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  margin-bottom: 10px;
}
.magic-word-crt-led{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #7f7, #0a3);
  box-shadow: 0 0 6px rgba(80, 255, 120, 0.65);
}
.magic-word-crt-model{
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}
.magic-word-crt-bezel{
  padding: 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #0d0d0f 0%, #141418 100%);
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.85),
    0 1px 0 rgba(255, 255, 255, 0.04);
}
.magic-word-crt-screen-surface{
  position: relative;
  border-radius: 3px 3px 5px 5px / 3px 3px 8px 8px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 2px #050506,
    inset 0 0 48px rgba(0, 0, 0, 0.65);
  background: #000;
}
.magic-word-figure{
  margin: 0;
  text-align: center;
}
.magic-word-video-wrap{
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border: none;
  background: #000;
}
.magic-word-video{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: contrast(1.04) saturate(0.92) brightness(1.02);
}
.magic-word-crt-scanlines{
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.11) 2px,
    rgba(0, 0, 0, 0.11) 3px
  );
}
.magic-word-crt-phosphor{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 255, 140, 0.045);
  mix-blend-mode: overlay;
}
.magic-word-crt-vignette{
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.5);
}
.magic-word-crt-deck{
  margin-top: 12px;
  padding: 14px 12px 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, #1e1f24 0%, #16171c 100%);
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.magic-word-crt-stand{
  height: 10px;
  margin: 10px -6px -6px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #22232a, #14151a);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
.magic-word-crt-form label.magic-word-label{
  margin-bottom: 0;
}
.magic-word-form{
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  margin: 0;
}
.magic-word-crt .magic-word-label{
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(130, 255, 180, 0.55);
}
.magic-word-crt #magicWordForm .magic-word-input{
  background: rgba(0, 24, 14, 0.92) !important;
  border-color: rgba(72, 200, 130, 0.4) !important;
  color: #b8ffc8;
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  border-radius: 4px;
  box-shadow: inset 0 0 20px rgba(0, 80, 40, 0.15);
}
.magic-word-crt #magicWordForm .magic-word-input:focus{
  border-color: rgba(120, 255, 170, 0.65) !important;
  box-shadow:
    inset 0 0 20px rgba(0, 80, 40, 0.2),
    0 0 0 2px rgba(80, 200, 120, 0.2) !important;
  outline: none;
}
.magic-word-crt-btn{
  align-self: flex-start;
  margin-top: 4px;
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #2a4a38, #1a3028) !important;
  border: 1px solid rgba(100, 220, 150, 0.35) !important;
  color: #c8ffd8 !important;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.magic-word-crt-btn:hover{
  filter: brightness(1.08);
}
.magic-word-input{
  width: 100%;
  box-sizing: border-box;
}
.magic-word-submit{
  align-self: flex-start;
  margin-top: 4px;
}
.magic-word-content{
  padding: 24px 8px;
  min-height: 120px;
}
.magic-word-placeholder{
  margin: 0;
  font-size: 15px;
}

.bug-report-card{
  padding: 14px 16px;
  text-align: left;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.bug-report-card-closed{
  opacity: 0.48;
  filter: grayscale(0.25);
}
.bug-report-card.panel.bug-report-card-closed{
  background: rgba(11, 18, 32, 0.08) !important;
  border-color: rgba(11, 18, 32, 0.12) !important;
}
.bug-report-card-closed .bug-report-title{
  color: rgba(11, 18, 32, 0.52);
}
.bug-report-card-closed .bug-report-pre,
.bug-report-card-closed .bug-report-line{
  color: rgba(11, 18, 32, 0.55);
}
.bug-report-card-head{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 10px;
}
.bug-report-card-kicker{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  width: 100%;
  min-width: 0;
}
.bug-report-card-title-row{
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.bug-report-type-badge{
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
}
.bug-report-type-bug{
  background: rgba(180, 35, 24, 0.1);
  color: #9a3412;
}
.bug-report-type-feature{
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
.bug-report-type-badge .bug-report-ref{
  display: inline-block;
  margin-left: 0.45em;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.92;
}
.bug-report-card-closed .bug-report-type-badge .bug-report-ref{
  opacity: 0.78;
}
.bug-report-title{
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: rgba(11, 18, 32, 0.92);
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}
.bug-report-head-actions{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.bug-report-meta{
  font-size: 12px;
  color: rgba(11, 18, 32, 0.55);
  white-space: nowrap;
  text-align: right;
  min-width: 0;
  flex: 1 1 auto;
}
.bug-report-status{
  text-transform: capitalize;
}
.bug-report-close-btn,
.bug-report-reopen-btn{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 10px;
}
.bug-report-line{
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
}
.bug-report-block{
  margin: 0 0 10px;
}
.bug-report-label{
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(11, 18, 32, 0.5);
  margin-bottom: 4px;
}
.bug-report-pre{
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(11, 18, 32, 0.04);
  border: 1px solid rgba(11, 18, 32, 0.1);
  border-radius: 10px;
  color: rgba(11, 18, 32, 0.88);
}
.bug-report-ua{
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
}
.bug-report-id{
  margin: 10px 0 0;
  font-size: 11px;
}

/* Sidebar: Apps box below Tags (admin/superuser) */
.sidebar-apps-box{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  text-decoration: none;
  transform-origin: center center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.15s ease;
}
.sidebar-apps-tool-icons{
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 2px;
}
.sidebar-apps-tool-icon{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(11, 18, 32, 0.45);
  pointer-events: none;
}
.sidebar-apps-tool-icon svg{
  display: block;
}
.sidebar-apps-box:hover .sidebar-apps-tool-icon{
  color: rgba(11, 18, 32, 0.62);
}
.sidebar-apps-label{
  /* Match .panel h2 (“Tags”) and .how-it-works-summary (“How it works”) */
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(11, 18, 32, 0.8);
}
.sidebar-apps-box:hover{
  transform: scale(1.02);
  z-index: 5;
  border-color: rgba(37, 99, 235, 0.28) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.1);
}
.sidebar-apps-box:hover .sidebar-apps-label{
  color: rgba(11, 18, 32, 0.8);
}
.sidebar-apps-box:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.38);
  outline-offset: 2px;
}
@media (max-width: 980px){
  .sidebar-apps-box{
    padding: 14px;
    box-sizing: border-box;
  }
}
@media (prefers-reduced-motion: reduce){
  .sidebar-apps-box{
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .sidebar-apps-box:hover{
    transform: none;
  }
}
#sidebarAppsLink[hidden]{
  display: none !important;
}

.sidebar-apps-tool-icon[hidden],
#sidebarAppsAccountsIcon[hidden],
#sidebarAppsUsageLogsIcon[hidden]{
  display: none !important;
}

/* Tools hub (/tools.html) — same grid as home; iframe fills the right pane */
.tools-hub-sidebar{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tools-hub-card{
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  border: 1px solid rgba(11, 18, 32, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transform-origin: center center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.15s ease;
}
.tools-hub-card-with-icon{
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
}
.tools-hub-card-icon{
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: rgba(37, 99, 235, 0.88);
}
.tools-hub-card-icon svg{
  display: block;
}
.tools-hub-card.is-active .tools-hub-card-icon{
  color: rgba(29, 78, 216, 0.98);
}
.tools-hub-card-body{
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}
/* Match .panel h2 on home (Tags, etc.): dark + bold */
.tools-hub-card h2{
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  color: rgba(11, 18, 32, 0.8);
}
.tools-hub-card.panel h2{
  margin: 0;
}
.tools-hub-card:hover{
  transform: scale(1.02);
  z-index: 5;
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.1);
}
.tools-hub-card.is-active{
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}
.tools-hub-card.is-active:hover{
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(37, 99, 235, 0.12);
}
@media (prefers-reduced-motion: reduce){
  .tools-hub-card{
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .tools-hub-card:hover{
    transform: none;
  }
}
.tools-hub-main{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
/* Dashboard · Apps beside Home — only while hub iframe shows attendance-data (`syncToolsHubAttendanceNav` in tools.js). */
.tools-hub-attendance-nav{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tools-hub-attendance-nav[hidden]{
  display: none !important;
}
.tools-hub-workspace{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.tools-hub-cat-wrap{
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}
/* `hidden` must win over component display rules, or empty state stays visible behind the iframe */
.tools-hub-card[hidden],
.tools-hub-empty[hidden],
.tools-hub-frame[hidden]{
  display: none !important;
}
.tools-hub-empty{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  min-height: min(200px, 36vh);
  margin: 0;
  padding: 0.25rem 1rem 0.75rem;
  box-sizing: border-box;
  overflow: hidden;
}
/* Fixed strip: heading never shifts when the cat lane randomizes below. */
.tools-hub-empty-heading{
  flex: 0 0 auto;
  flex-shrink: 0;
  margin: 0.55rem 0 0.65rem;
  padding: 0 0.5rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  min-height: calc(1.35em + 2px);
  color: var(--muted);
  position: relative;
  z-index: 2;
}
/* Bigger muted cat; enters at right lane edge, exits at left lane edge (100cqw → -100%) */
.tools-hub-cat-scene{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: clamp(120px, 22vh, 240px);
  margin: 0;
  padding: 0 0 0.35rem;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}
.tools-hub-cat-lane{
  --tools-hub-cat-size: clamp(56px, 10vw, 88px);
  container-type: inline-size;
  container-name: tools-hub-cat-lane;
  position: relative;
  width: 100%;
  /* Extra vertical room for wide random --tools-hub-cat-y-offset (±~96px) */
  height: calc(var(--tools-hub-cat-size) + 176px);
  min-height: calc(var(--tools-hub-cat-size) + 176px);
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  pointer-events: auto;
  touch-action: none;
}
.tools-hub-cat-draw{
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}
.tools-hub-cat-lane:has(.tools-hub-cat-mover--stopped) .tools-hub-cat-draw{
  cursor: pointer;
}
.tools-hub-cat-mover{
  --tools-hub-cat-y-offset: 0px;
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 0;
  width: var(--tools-hub-cat-size);
  height: var(--tools-hub-cat-size);
  animation-name: tools-hub-cat-drift-fallback;
  animation-duration: 17s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
@supports (width: 1cqw){
  .tools-hub-cat-mover{
    animation-name: tools-hub-cat-drift;
  }
}
.tools-hub-cat-img{
  display: block;
  width: var(--tools-hub-cat-size);
  height: var(--tools-hub-cat-size);
  object-fit: contain;
  border-radius: 14px;
  opacity: 0.42;
  filter: grayscale(0.35);
  transform: scaleX(-1);
  -webkit-user-drag: none;
  user-select: none;
}
.tools-hub-cat-mover--stopped{
  animation-play-state: paused !important;
}
.tools-hub-cat-mover--stopped .tools-hub-cat-img{
  cursor: pointer;
}
@keyframes tools-hub-cat-drift{
  from{
    transform: translateY(calc(-50% + var(--tools-hub-cat-y-offset, 0px))) translateX(100cqw);
  }
  to{
    transform: translateY(calc(-50% + var(--tools-hub-cat-y-offset, 0px))) translateX(-100%);
  }
}
@keyframes tools-hub-cat-drift-fallback{
  from{
    transform: translateY(calc(-50% + var(--tools-hub-cat-y-offset, 0px))) translateX(100vw);
  }
  to{
    transform: translateY(calc(-50% + var(--tools-hub-cat-y-offset, 0px))) translateX(-100%);
  }
}
@media (prefers-reduced-motion: reduce){
  .tools-hub-cat-mover{
    animation: none;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
.tools-hub-frame{
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: none;
  border-radius: var(--radius);
  background: #fff;
}
@media (min-width: 981px){
  .tools-hub-layout .tools-hub-main{
    overflow: hidden;
    padding-bottom: 0;
    min-height: 0;
    align-self: stretch;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .tools-hub-layout #toolsHubWorkspace:not([hidden]){
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .tools-hub-layout .tools-hub-frame:not([hidden]){
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }
}

/* Embedded in tools hub (iframe): hide duplicate chrome */
body.embed-shell .bg,
body.embed-shell > .topbar{
  display: none !important;
}
body.embed-shell main.bug-reports-shell.alumni-shell{
  padding-top: 14px;
}
body.embed-shell main.bug-reports-shell.reminders-shell{
  padding-top: 14px;
  max-width: min(1420px, 100%);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}
body.embed-shell main.bug-reports-shell.admin-accounts-shell{
  padding-top: 14px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}
body.embed-shell main.bug-reports-shell.admin-usage-logs-shell{
  padding-top: 14px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}
body.embed-shell main.attendance-dashboard-shell{
  padding-top: 14px;
  max-width: min(1420px, 100%);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}
/* Reminders page (/reminders.html) — match attendance dashboard horizontal span */
main.bug-reports-shell.reminders-shell{
  max-width: min(1420px, 100%);
}
.reminders-layout{
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 24px;
  box-sizing: border-box;
}
.reminders-shell .reminders-plus-row{
  padding-left: 0;
  padding-right: 0;
}
/* Don’t use home’s fixed 50% .content-search column — it won’t shrink and clips/pushes the list above 700px. */
.reminders-shell .reminders-plus-row .content-search{
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
}
.reminders-shell .reminders-search-wrap{
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.reminders-shell .reminders-search-wrap .search{
  flex: 1 1 240px;
  max-width: none;
  min-width: 0;
}
.reminders-shell .reminders-search-wrap .search:has(.search-icon) input{
  padding-left: 44px;
}
.reminders-archive-toggle{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(11, 18, 32, 0.16);
  color: rgba(11, 18, 32, 0.75);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.reminders-archive-toggle:hover{
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.06);
}
.reminders-archive-toggle.is-active{
  border-color: rgba(37, 99, 235, 0.5);
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
}
.reminders-access-box{
  margin: 0;
  max-width: 420px;
}
.reminders-access-box p:last-child{
  margin-bottom: 0;
}
.reminders-compose-hint{
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.35;
}
.reminders-compose-label{
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.55);
  margin-bottom: 6px;
}
.reminders-textarea{
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(11, 18, 32, 0.14);
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  resize: vertical;
  min-height: 100px;
}
.reminders-nl-preview{
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.35;
}
.reminders-error{
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #b42318;
}
.reminder-card{
  padding: 14px 16px;
  text-align: left;
}
.reminder-card-head{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 4px;
}
.reminder-card-head-main{
  flex: 1;
  min-width: 0;
}
.reminder-card-title{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(11, 18, 32, 0.88);
  min-width: 0;
}
.reminder-card-due{
  margin: 4px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(11, 18, 32, 0.52);
}
.reminder-card-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.reminder-card-block{
  margin: 12px 0 0;
  padding-top: 2px;
}
.reminder-card-label{
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(11, 18, 32, 0.45);
  margin-bottom: 4px;
}
.reminder-card-pre{
  margin: 0;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(11, 18, 32, 0.82);
}
.reminder-card-meta{
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(11, 18, 32, 0.82);
}
/* Alumni directory (superuser / admin) — full width (overrides .bug-reports-shell 880px) */
main.bug-reports-shell.alumni-shell {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 22px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}
.alumni-meta-block{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 18px;
  max-width: 100%;
  font-size: 12.5px;
  line-height: 1.4;
}
.alumni-meta-block .alumni-header-meta{
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
}
.alumni-meta-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex-shrink: 0;
}
.alumni-notify-admin-block{
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(11, 18, 32, 0.1);
  max-width: 100%;
}
.alumni-notify-section-head{
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.88);
}
.alumni-notify-toolbar{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(18px, 3vw, 32px);
  row-gap: 10px;
  align-items: start;
  max-width: 100%;
}
.alumni-notify-picker-label{
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.55);
}
.alumni-notify-picker-label--recipients{
  grid-column: 1;
  grid-row: 1;
}
.alumni-notify-picker-label--test{
  grid-column: 2;
  grid-row: 1;
}
.alumni-notify-toolbar-picker{
  grid-column: 1;
  grid-row: 2;
}
.alumni-notify-save-status{
  margin-top: 4px;
}
.alumni-notify-toolbar-test-col{
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.alumni-notify-toolbar .alumni-notify-dropdown-wrap,
.alumni-notify-toolbar-picker.alumni-notify-dropdown-wrap{
  width: 100%;
  max-width: none;
  margin: 0;
}
.alumni-notify-toolbar-test-col .alumni-test-dropdown-wrap{
  width: 100%;
  max-width: none;
}
.alumni-notify-test-send-btn{
  align-self: flex-end;
}
/* Same in-flight treatment as instructor review comment tools (`.icon-tool.kitt-scan`). */
@keyframes alumni-kitt-dot-shuffle {
  0% {
    left: 0;
    transform: translateY(-50%);
  }
  100% {
    left: 100%;
    transform: translate(-100%, -50%);
  }
}
.alumni-notify-test-send-btn.kitt-scan{
  position: relative;
  overflow: hidden;
  border-color: rgba(160, 0, 0, 0.55) !important;
  background: linear-gradient(180deg, #1a0505 0%, #0a0202 42%, #0a0202 58%, #1a0505 100%) !important;
  box-shadow: inset 0 0 10px rgba(255, 0, 0, 0.28);
  color: #fff7f7 !important;
  cursor: wait;
}
.alumni-notify-test-send-btn.kitt-scan::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 32% 28%, #fff8f8, #ff5555 45%, #8b0000 100%);
  box-shadow:
    0 0 4px 1px rgba(255, 80, 80, 0.95),
    0 0 10px 3px rgba(255, 0, 0, 0.45);
  transform: translateY(-50%);
  animation: alumni-kitt-dot-shuffle 0.55s ease-in-out infinite alternate;
}
.alumni-notify-test-send-btn.kitt-scan .alumni-notify-test-send-label{
  position: relative;
  z-index: 1;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.95);
}
.alumni-notify-test-send-btn.kitt-scan:disabled{
  opacity: 1;
}
@media (max-width: 640px) {
  .alumni-notify-toolbar{
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
  .alumni-notify-picker-label--recipients{
    grid-column: 1;
    grid-row: 1;
  }
  .alumni-notify-toolbar-picker{
    grid-column: 1;
    grid-row: 2;
  }
  .alumni-notify-picker-label--test{
    grid-column: 1;
    grid-row: 3;
  }
  .alumni-notify-toolbar-test-col{
    grid-column: 1;
    grid-row: 4;
  }
}
.alumni-notify-dropdown-wrap{
  position: relative;
  max-width: 28rem;
  margin: 0 0 12px;
}
.alumni-notify-trigger{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(11, 18, 32, 0.2);
  background: #fff;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(11, 18, 32, 0.85);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.06);
}
.alumni-notify-trigger:hover{
  border-color: rgba(37, 99, 235, 0.35);
  background: #fafbff;
}
.alumni-notify-trigger:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}
.alumni-notify-trigger-label{
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
}
.alumni-notify-trigger-chevron.card-fold-toggle{
  flex-shrink: 0;
  margin-left: 0;
  color: rgba(11, 18, 32, 0.45);
}
.alumni-notify-trigger-chevron .card-fold-toggle-char::before{
  content: '\25BE';
}
.alumni-notify-dropdown-wrap.is-open .alumni-notify-trigger-chevron .card-fold-toggle-char::before{
  content: '\25B4';
}
.alumni-notify-panel{
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  bottom: auto;
  max-height: min(360px, 55vh);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(11, 18, 32, 0.16);
  background: #fff;
  box-shadow: 0 12px 40px rgba(11, 18, 32, 0.12);
  -webkit-overflow-scrolling: touch;
}
.alumni-notify-panel.alumni-notify-panel--up{
  top: auto;
  bottom: calc(100% + 4px);
  box-shadow: 0 -10px 36px rgba(11, 18, 32, 0.12);
}
.alumni-notify-checkbox-list{
  padding: 6px 0;
}
.alumni-notify-row{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  margin: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(11, 18, 32, 0.9);
}
.alumni-notify-row:hover{
  background: rgba(37, 99, 235, 0.06);
}
.alumni-notify-row input{
  margin: 2px 0 0;
  flex-shrink: 0;
}
.alumni-notify-row-text{
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.alumni-notify-status{
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
  min-height: 1.2em;
}
.alumni-notify-toolbar-test-col .alumni-notify-status{
  margin-top: 0;
}
@media (max-width: 640px){
  /* Bottom LinkedIn-alerts pickers: compact on phones (must follow base `.alumni-notify-*`). */
  .alumni-notify-admin-block{
    padding-top: 12px;
    margin-top: 16px;
  }
  .alumni-notify-admin-block .alumni-notify-section-head{
    font-size: 13px;
    margin-bottom: 8px;
  }
  .alumni-notify-toolbar .alumni-notify-picker-label{
    font-size: 12px;
  }
  .alumni-notify-toolbar .alumni-notify-trigger{
    min-height: 38px;
    padding: 7px 11px;
    font-size: 13px;
    border-radius: 9px;
    gap: 8px;
  }
  .alumni-notify-toolbar .alumni-notify-panel{
    max-height: min(260px, 42vh);
    border-radius: 9px;
  }
  .alumni-notify-toolbar .alumni-notify-checkbox-list{
    padding: 4px 0;
  }
  .alumni-notify-toolbar .alumni-notify-row{
    padding: 8px 11px;
    font-size: 13px;
    gap: 8px;
  }
  .alumni-notify-toolbar .alumni-notify-save-status,
  .alumni-notify-toolbar-test-col > .alumni-notify-status{
    font-size: 12px;
  }
}
.alumni-download-xlsx{
  flex-shrink: 0;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(11, 18, 32, 0.18);
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 400;
  color: rgba(11, 18, 32, 0.82);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.06);
}
.alumni-download-xlsx:hover{
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}
.alumni-download-xlsx:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}
.alumni-table-wrap{
  width: 100%;
  max-width: 100%;
  max-height: min(65vh, 560px);
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  border: 1px solid rgba(11, 18, 32, 0.12);
  background: #fff;
  box-shadow: 0 10px 40px rgba(11, 18, 32, 0.06);
}
.alumni-table{
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  line-height: 1.3;
}
/* Primary columns: cap width (ch ≈ average char width); ellipsis when collapsed */
/* Term / graduation: only as wide as content (no fixed min ch) */
.alumni-table thead th:nth-child(1),
.alumni-table tbody td:nth-child(1){
  width: auto;
  max-width: none;
  min-width: 0;
  white-space: nowrap;
  box-sizing: border-box;
}
.alumni-table thead th:nth-child(2),
.alumni-table tbody td:nth-child(2){
  width: 20ch;
  max-width: 20ch;
  min-width: 0;
  box-sizing: border-box;
}
.alumni-table thead th:nth-child(3),
.alumni-table tbody td:nth-child(3){
  width: 20ch;
  max-width: 20ch;
  min-width: 0;
  box-sizing: border-box;
}
.alumni-table thead th:nth-child(4),
.alumni-table tbody td:nth-child(4){
  width: 30ch;
  max-width: 30ch;
  min-width: 0;
  box-sizing: border-box;
}
.alumni-table thead th:nth-child(7),
.alumni-table tbody td:nth-child(7){
  width: 20ch;
  max-width: 20ch;
  min-width: 0;
  box-sizing: border-box;
}
.alumni-table thead th:nth-child(8),
.alumni-table tbody td:nth-child(8),
.alumni-table thead th:nth-child(9),
.alumni-table tbody td:nth-child(9){
  width: 50ch;
  max-width: 50ch;
  min-width: 0;
  box-sizing: border-box;
}
.alumni-table th,
.alumni-table td{
  padding: 0;
  border-bottom: 1px solid rgba(11, 18, 32, 0.1);
  text-align: left;
  vertical-align: top;
}
.alumni-table thead th{
  position: sticky;
  top: 0;
  padding: 0;
  background: hsl(152 32% 91%);
  font-weight: 650;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(152 22% 24%);
  z-index: 2;
  border-bottom: 1px solid hsl(152 24% 76%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  vertical-align: bottom;
}
.alumni-th-btn{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  box-sizing: border-box;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
}
.alumni-th-btn:hover{
  background: hsl(152 36% 84%);
}
.alumni-th-btn:focus-visible{
  outline: 2px solid hsl(152 42% 40%);
  outline-offset: -2px;
  z-index: 1;
}
.alumni-sort-ind{
  display: inline-block;
  min-width: 1em;
  margin-left: 3px;
  font-size: 9px;
  line-height: 1;
  flex-shrink: 0;
  font-family: inherit;
}
.alumni-sort-ind.alumni-sort-neutral{
  opacity: 0.42;
  color: rgba(11, 18, 32, 0.45);
}
.alumni-sort-ind.alumni-sort-active{
  opacity: 1;
  color: #0a0a0a;
  font-weight: 700;
}
.alumni-table tbody tr.alumni-row{
  cursor: pointer;
  transition: background 0.15s ease;
}
.alumni-table tbody tr.alumni-row td{
  background: #fff;
}
.alumni-table tbody tr.alumni-row:hover td{
  background: rgba(37, 99, 235, 0.06) !important;
}
.alumni-table tbody tr.alumni-row.expanded td{
  background: rgba(37, 99, 235, 0.1) !important;
}
.alumni-table tbody tr.alumni-row:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: -2px;
}
.alumni-cell{
  padding: 4px 8px;
  min-height: 1.75rem;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: rgba(11, 18, 32, 0.88);
}
.alumni-table tbody tr.alumni-row:not(.expanded) .alumni-cell{
  max-height: 2.35rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
/* Name, company, title, capstone, internship, practicum: single-line ellipsis at column cap */
.alumni-table tbody tr.alumni-row:not(.expanded) td:nth-child(2) .alumni-cell,
.alumni-table tbody tr.alumni-row:not(.expanded) td:nth-child(3) .alumni-cell,
.alumni-table tbody tr.alumni-row:not(.expanded) td:nth-child(4) .alumni-cell,
.alumni-table tbody tr.alumni-row:not(.expanded) td:nth-child(7) .alumni-cell,
.alumni-table tbody tr.alumni-row:not(.expanded) td:nth-child(8) .alumni-cell,
.alumni-table tbody tr.alumni-row:not(.expanded) td:nth-child(9) .alumni-cell{
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  max-height: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alumni-table tbody tr.alumni-row.expanded td:nth-child(2),
.alumni-table tbody tr.alumni-row.expanded td:nth-child(3),
.alumni-table tbody tr.alumni-row.expanded td:nth-child(4),
.alumni-table tbody tr.alumni-row.expanded td:nth-child(7),
.alumni-table tbody tr.alumni-row.expanded td:nth-child(8),
.alumni-table tbody tr.alumni-row.expanded td:nth-child(9){
  max-width: none;
  width: auto;
}
.alumni-table tbody tr.alumni-row.expanded .alumni-cell{
  max-height: none;
  -webkit-line-clamp: unset;
  display: block;
  min-height: 0;
  padding: 6px 8px;
}
.alumni-table tbody tr.alumni-row.expanded td:nth-child(2) .alumni-cell,
.alumni-table tbody tr.alumni-row.expanded td:nth-child(3) .alumni-cell,
.alumni-table tbody tr.alumni-row.expanded td:nth-child(4) .alumni-cell,
.alumni-table tbody tr.alumni-row.expanded td:nth-child(7) .alumni-cell,
.alumni-table tbody tr.alumni-row.expanded td:nth-child(8) .alumni-cell,
.alumni-table tbody tr.alumni-row.expanded td:nth-child(9) .alumni-cell{
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.alumni-name-link{
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.alumni-name-link:hover{
  text-decoration: underline;
}

/*
 * Opt out of global `--app-min-width` (600px) on html/body and chrome that otherwise forces horizontal scroll on phones.
 * Use `attendance-narrow-shell` on intake forms; `msai-adaptive-shell` on reminders / attendance admin surfaces.
 */
html.attendance-narrow-shell,
html.msai-adaptive-shell,
html.attendance-narrow-shell body,
html.msai-adaptive-shell body{
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
html.msai-adaptive-shell .topbar,
html.msai-adaptive-shell main.bug-reports-shell,
html.msai-adaptive-shell main.attendance-qr-main{
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
/* Feedback: adaptive shell overrides main to 100% wide; keep the original centered ~880px column + side gutters on phones (topbar stays full width). */
html.feedback-page.msai-adaptive-shell main.bug-reports-shell{
  max-width: min(880px, calc(100vw - 32px));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Attendance app */
.attendance-admin-shell{
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
.attendance-admin-controls{
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
}
.attendance-qr-stage{
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
#attendanceQrImage{
  width: min(80vmin, 720px);
  height: min(80vmin, 720px);
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(11, 18, 32, 0.14);
  padding: 10px;
}
.attendance-form-shell{
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  max-height: 100vh;
  max-height: 100dvh;
  max-height: 100svh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
}
.attendance-form-card{
  width: min(340px, 100%);
  margin: 0;
}
.attendance-form-heading{
  margin: 0 0 10px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(11, 18, 32, 0.9);
}
@media (max-width: 480px) {
  .attendance-form-shell{
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .attendance-form-card{
    width: 100%;
    max-width: none;
    align-self: stretch;
    padding: 12px 14px;
    border-radius: 0 14px 14px 0;
  }
  .attendance-form-heading{
    margin-bottom: 6px;
    font-size: 0.95rem;
  }
  #attendanceForm label{
    margin-bottom: 6px;
    gap: 4px;
    font-size: 12px;
  }
  #attendanceForm input{
    font-size: 16px;
    padding: 8px 10px;
    border-radius: 12px;
  }
  #attendanceForm .form-actions .btn{
    width: 100%;
    justify-content: center;
  }
}
.attendance-confirm-shell{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.attendance-confirm-text{
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.9);
}

/* Attendance dashboard (admin) */
.attendance-dashboard-workspace{
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.attendance-dashboard-section-title{
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 700;
  color: rgba(11, 18, 32, 0.88);
}
.attendance-dashboard-hint{
  margin: 0 0 12px 0;
  max-width: 52rem;
  line-height: 1.4;
}
.attendance-dashboard-data-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.attendance-dashboard-data-head .attendance-dashboard-section-title{
  margin: 0;
}
.attendance-dashboard-data-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Attendance admin: full-screen PIN gate — hide dashboard chrome and decorative bg */
body.attendance-admin-pin-gate .bg{
  display: none !important;
}
body.attendance-admin-pin-gate .attendance-admin-topbar,
body.attendance-admin-pin-gate .attendance-dashboard-shell{
  display: none !important;
}
.modal.attendance-pin-screen{
  position: fixed;
  inset: 0;
  z-index: 120;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  background: #ffffff !important;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal.attendance-pin-screen .modal-card{
  margin: auto;
}
.attendance-pin-card{
  width: min(400px, 100%) !important;
}
.modal.attendance-pin-screen .attendance-pin-card input[type="password"],
.modal.attendance-pin-screen .attendance-pin-card input[type="text"]{
  font-size: 16px;
  letter-spacing: 0.12em;
}
.modal.attendance-pin-screen .attendance-unlock-pin-input{
  letter-spacing: normal;
}
@media (max-width: 640px){
  .modal.attendance-pin-screen .password-toggle-btn{
    width: 36px;
    height: 36px;
    right: 10px;
  }
  .modal.attendance-pin-screen .password-toggle-icon-wrap,
  .modal.attendance-pin-screen .password-toggle-icon-wrap svg{
    width: 22px;
    height: 22px;
  }
  #attendanceUnlockForm .password-input-wrap input,
  #attendanceSetPasswordForm .password-input-wrap input,
  #attendanceChangePasswordForm .password-input-wrap input{
    padding-right: 54px;
  }
}

/* Attendance data: span wide main; narrow Code column so UUID wraps to ~2 lines */
.attendance-dashboard-data .admin-usage-logs-table.attendance-data-table{
  width: 100%;
  min-width: 0;
  table-layout: auto;
}
.attendance-data-table thead .attendance-th-stacked{
  font-weight: 600;
  line-height: 1.35;
  vertical-align: bottom;
  white-space: normal;
  text-align: center;
}
.attendance-data-table .attendance-data-code{
  word-break: break-all;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  max-width: 13rem;
  white-space: normal;
}
.attendance-data-table tbody tr.attendance-flag-row-red td{
  background: rgba(220, 38, 38, 0.12);
  color: #7f1d1d;
}
.attendance-data-table tbody tr.attendance-flag-row-orange td{
  background: rgba(234, 88, 12, 0.12);
  color: #9a3412;
}
.attendance-data-table tbody tr.attendance-flag-row-yellow td{
  background: rgba(202, 138, 4, 0.14);
  color: #854d0e;
}
.attendance-data-table .attendance-data-flags{
  font-size: 11px;
  white-space: pre-line;
  line-height: 1.25;
  max-width: 14rem;
  vertical-align: top;
}

/* Attendance data: nav-only header — Dashboard · Apps · Home clustered top-right (no brand block) */
body.attendance-data-page .topbar.attendance-data-topbar{
  justify-content: flex-end;
  align-items: center;
}
body.attendance-data-page .topbar.attendance-data-topbar .auth-strip{
  margin-left: 0;
  gap: 8px;
}
@media (max-width: 860px){
  body.attendance-data-page .topbar.attendance-data-topbar{
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
  }
  body.attendance-data-page .topbar.attendance-data-topbar .auth-strip{
    flex-direction: row;
    flex-wrap: nowrap;
    flex-basis: auto;
    width: auto;
    max-width: 100%;
    align-items: center;
    align-self: flex-end;
  }
}

/* Attendance data: review-style control strip (instructor-review `app-header` pattern) */
body.attendance-data-page .attendance-dashboard-data.panel > .attendance-review-app-header{
  margin: -14px -14px 14px -14px;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #d5dde8;
  background: #ffffff;
}
body.attendance-data-page .attendance-review-app-header{
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
body.attendance-data-page .attendance-review-app-header-title{
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.92);
}
body.attendance-data-page .attendance-review-app-header .assignment-picker{
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
body.attendance-data-page .attendance-review-app-header .assignment-picker label{
  font-size: 0.85rem;
  color: rgba(90, 101, 115, 0.95);
  white-space: nowrap;
}
body.attendance-data-page .attendance-review-app-header .assignment-picker-row{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
/* Date pill: fixed footprint so the control strip does not reflow when a date is chosen */
body.attendance-data-page .attendance-review-app-header .attendance-picker-datetime .assignment-picker-row{
  flex-wrap: nowrap;
  min-width: 0;
}
body.attendance-data-page .attendance-review-app-header button.attendance-date-pill.due-pill{
  flex: 0 0 auto;
  width: 11.25rem;
  min-width: 11.25rem;
  max-width: 11.25rem;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.attendance-data-page .attendance-review-app-header .meta{
  color: rgba(90, 101, 115, 0.95);
  font-size: 0.85rem;
}
body.attendance-data-page .attendance-review-app-header .actions{
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
body.attendance-data-page .attendance-review-filter-input{
  font: inherit;
  font-size: 0.85rem;
  min-width: 11rem;
  max-width: min(22rem, 40vw);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #d5dde8;
  background: #ffffff;
  color: rgba(11, 18, 32, 0.92);
}
body.attendance-data-page .attendance-review-filter-input::placeholder{
  color: rgba(90, 101, 115, 0.55);
}
body.attendance-data-page .attendance-review-filter-input:focus{
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  border-color: rgba(37, 99, 235, 0.45);
}

/* Sortable headers: same ▲/▼ indicators as alumni table */
.attendance-data-table thead .attendance-th-btn{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  box-sizing: border-box;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
}
.attendance-data-table thead .attendance-th-btn.attendance-th-btn--stacked{
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  min-height: 2.5rem;
}
.attendance-data-table thead .attendance-th-btn.attendance-th-btn--stacked .attendance-sort-ind{
  margin-left: 0;
}
.attendance-data-table thead .attendance-th-stacked-label{
  font-weight: 650;
  line-height: 1.35;
}
.attendance-data-table thead .attendance-th-btn:hover{
  background: rgba(11, 18, 32, 0.06);
}
.attendance-data-table thead .attendance-th-btn:focus-visible{
  outline: 2px solid #2563eb;
  outline-offset: -2px;
  z-index: 2;
}
.attendance-data-table thead .attendance-sort-ind{
  display: inline-block;
  min-width: 1em;
  margin-left: 3px;
  font-size: 9px;
  line-height: 1;
  flex-shrink: 0;
  font-family: inherit;
}
.attendance-data-table thead .attendance-sort-ind.attendance-sort-neutral{
  opacity: 0.42;
  color: rgba(11, 18, 32, 0.45);
}
.attendance-data-table thead .attendance-sort-ind.attendance-sort-active{
  opacity: 1;
  color: #0a0a0a;
  font-weight: 700;
}

body.attendance-data-page .due-pill{
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #c5d4e8;
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
  color: rgba(11, 18, 32, 0.92);
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.85rem;
}
body.attendance-data-page .due-pill--empty{
  font-weight: 400;
  color: rgba(11, 18, 32, 0.5);
  background: #fff;
  border-style: dashed;
}
body.attendance-data-page button.due-pill--clickable{
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
}
body.attendance-data-page button.due-pill--clickable:hover{
  filter: brightness(0.97);
}
body.attendance-data-page button.due-pill--clickable:focus-visible{
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

body.attendance-data-page .review-modal[hidden]{
  display: none !important;
}
body.attendance-data-page .review-modal{
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
body.attendance-data-page .review-modal-backdrop{
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(15, 23, 42, 0.35);
  cursor: pointer;
}
body.attendance-data-page .review-modal-panel{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid #d5dde8;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
body.attendance-data-page .review-modal-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
body.attendance-data-page .review-modal-close{
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: -0.15rem -0.15rem 0 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(11, 18, 32, 0.5);
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
}
body.attendance-data-page .review-modal-close:hover{
  background: rgba(0, 0, 0, 0.06);
  color: rgba(11, 18, 32, 0.88);
}
body.attendance-data-page .review-modal-title{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.92);
}
body.attendance-data-page .review-modal-hint{
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(11, 18, 32, 0.55);
}
body.attendance-data-page .review-modal-label{
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: rgba(11, 18, 32, 0.75);
}
body.attendance-data-page .review-modal-input{
  font: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #d5dde8;
  background: #fff;
  color: rgba(11, 18, 32, 0.92);
}
body.attendance-data-page .review-modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid #d5dde8;
  flex-wrap: wrap;
}

/* Full-screen QR page (projector): no site chrome, minimal nav */
body.attendance-qr-page{
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
}
/* Match standard topbar: logo + MSAI · CAT | title left, nav right */
.attendance-qr-topbar{
  flex: 0 0 auto;
  justify-content: space-between;
  min-height: 80px;
}
.attendance-qr-main{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 18px 24px;
}
.attendance-qr-page .attendance-qr-stage{
  min-height: calc(100vh - 168px);
}
.attendance-qr-page .bug-reports-gate{
  margin: 0;
  padding: 12px 0;
}
/* Soft notice when QR refresh can’t reach the server (network / deploy) — not error-red */
.attendance-qr-notice{
  margin: 0 0 14px;
  max-width: 38rem;
  border: 1px solid #d0d7e2;
  border-radius: 10px;
  background: #f4f6fa;
  color: rgba(17, 24, 39, 0.88);
}
.attendance-qr-notice[hidden]{
  display: none;
}
.attendance-qr-notice-inner{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px 12px 12px;
}
.attendance-qr-notice-icon{
  flex: 0 0 auto;
  color: #64748b;
  line-height: 0;
  margin-top: 2px;
}
.attendance-qr-notice-copy{
  flex: 1 1 auto;
  min-width: 0;
}
.attendance-qr-notice-title{
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #1e293b;
}
.attendance-qr-notice-text{
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: #475569;
}
.attendance-qr-notice-dismiss{
  flex: 0 0 auto;
  align-self: center;
  margin: -2px 0 0 4px;
}

/* ——— Showcase (admin preview gallery, /showcase*.html) ———
 * Deep backdrop; cool/neutral ambient only (no warm corner spotlight).
 * Opt out of global --app-min-width (600px) on html/body/.topbar — phones were laying out at 600px in ~390px viewports (left/right chop + broken portrait scroll).
 */
html.showcase-page{
  height: auto;
  min-height: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: #000000 !important;
  /* Keeps grid column width stable when search shortens the page and the scrollbar would otherwise disappear. */
  scrollbar-gutter: stable;
}
body.showcase-page{
  min-width: 0;
  max-width: 100%;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  /* Always reserve vertical scrollbar track so layout width doesn’t change when search results shorten the page (cards + search stay same size). */
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  position: relative;
  background: #000000 !important;
  color: rgba(248, 250, 252, 0.92);
  font-weight: 400;
}
body.showcase-page .brand h1{
  font-weight: 400;
}
body.showcase-page b,
body.showcase-page strong{
  font-weight: 400;
}
body.showcase-page .btn{
  font-weight: 400;
}
body.showcase-page .icon-btn{
  font-weight: 400;
}
html.showcase-page .topbar{
  min-width: 0;
}
.showcase-bg-aura{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: transparent;
}
/* No star overlays; keep a clean pure-black background. */
.showcase-bg-aura::before{
  content: none;
}
/* No starfield layer. */
.showcase-bg-aura::after{
  content: none;
}
/* Dark chrome for this page only */
body.showcase-page .topbar.bug-reports-topbar,
body.showcase-page .showcase-topbar{
  background: #000000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}
body.showcase-page .bug-reports-page-heading .brand-kicker,
body.showcase-page .bug-reports-heading-page{
  color: rgba(148, 163, 184, 0.92);
}
body.showcase-page .bug-reports-heading-sep{
  color: rgba(148, 163, 184, 0.5);
}
body.showcase-page .brand .subtitle{
  color: rgba(148, 163, 184, 0.9) !important;
  margin-top: 4px;
}
body.showcase-page .auth-strip .auth-link{
  color: rgba(226, 232, 240, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
}
body.showcase-page .auth-strip .auth-link:hover{
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}
/* Line-art cat (black on white PNG): gray strokes only; white mat drops out against topbar via screen */
body.showcase-page .brand-logo-link{
  background: transparent !important;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
body.showcase-page .brand-logo-link .logo{
  width: 44px;
  height: 44px;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none !important;
  /* invert → white strokes on black; brightness dims strokes to mid-gray; screen: black mat → shows #080808 topbar */
  filter: invert(1) brightness(0.46);
  mix-blend-mode: screen;
}
.showcase-topbar.bug-reports-topbar{
  position: relative;
  z-index: 2;
}
.showcase-shell{
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 64px;
}
.showcase-gate{
  max-width: 560px;
  margin: 28px auto 0;
  padding: 0 10px;
  text-align: center;
  color: rgba(148, 163, 184, 0.95);
}
.showcase-gate a{
  color: #93c5fd;
  font-weight: 400;
}
.showcase-gate a:hover{
  color: #bfdbfe;
}
.showcase-content{
  animation: showcaseFadeUp 0.55s ease-out both;
}
@keyframes showcaseFadeUp{
  from{
    opacity: 0;
    transform: translateY(10px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce){
  .showcase-content{
    animation: none;
  }
}
.showcase-hero{
  text-align: center;
  padding: 8px 12px 28px;
  max-width: 640px;
  margin: 0 auto;
}
.showcase-hero-dark{
  padding-bottom: 32px;
}
.showcase-studio-cue{
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(186, 230, 253, 0.68);
  text-shadow: 0 0 24px rgba(56, 189, 248, 0.18);
}
.showcase-title{
  margin: 0;
  font-size: clamp(1.75rem, 3.6vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: rgba(15, 23, 42, 0.94);
}
.showcase-title-darkpage{
  color: rgba(252, 252, 252, 0.98);
  text-shadow:
    0 0 40px rgba(56, 189, 248, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.5);
}
.showcase-lede{
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  color: rgba(51, 65, 85, 0.92);
}
.showcase-lede-darkpage{
  margin-top: 14px;
  color: rgba(148, 163, 184, 0.94);
}
.showcase-code-path{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 400;
  color: rgba(71, 85, 105, 0.95);
  word-break: break-all;
}
.showcase-code-path-darkpage{
  color: rgba(168, 181, 199, 0.96);
}

.showcase-stage{
  position: relative;
  margin-top: 8px;
  padding-top: 8px;
}

.showcase-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px 16px;
  align-items: stretch;
}
@media (min-width: 560px){
  .showcase-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 900px){
  .showcase-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.showcase-empty{
  grid-column: 1 / -1;
  text-align: center;
  margin: 24px 0 0;
  font-size: 14px;
  color: rgba(148, 163, 184, 0.95);
}

/* --- Showcase · catalog poster shelves (`showcase.html`, data-showcase-layout="netflix") --- */
html[data-showcase-layout="netflix"].showcase-page .showcase-shell{
  background: #000000;
}
html[data-showcase-layout="netflix"].showcase-page .showcase-netflix-host.showcase-grid{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  grid-template-columns: unset;
}
/* No extra shelf layer; keep rows on pure black background. */
html[data-showcase-layout="netflix"].showcase-page .showcase-netflix-host.showcase-grid::before{
  content: none;
}
@media (min-width: 560px){
  html[data-showcase-layout="netflix"].showcase-page .showcase-netflix-host.showcase-grid{
    grid-template-columns: unset;
  }
}
@media (min-width: 900px){
  html[data-showcase-layout="netflix"].showcase-page .showcase-netflix-host.showcase-grid{
    grid-template-columns: unset;
  }
}
.showcase-netflix-row-head{
  margin: 0 0 10px 2px;
}
.showcase-netflix-row-title{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #e5e5e5;
}
/* Netflix-style horizontal row: landscape poster tiles (3:2); same widths; contain + blurred backdrop fill slight ratio drift. */
.showcase-netflix-strip{
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  -webkit-overflow-scrolling: touch;
}
.showcase-netflix-strip::-webkit-scrollbar{
  height: 6px;
}
.showcase-netflix-strip::-webkit-scrollbar-thumb{
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.showcase-netflix-tile{
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: min(68vw, 248px);
}
@media (min-width: 560px){
  .showcase-netflix-tile{
    width: min(46vw, 284px);
  }
}
@media (min-width: 900px){
  .showcase-netflix-tile{
    width: min(32vw, 310px);
  }
}
.showcase-netflix-poster-frame{
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.showcase-netflix-tile:hover .showcase-netflix-poster-frame{
  transform: scale(1.06);
  z-index: 3;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}
.showcase-netflix-poster-hit{
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  background: #000000;
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
/* Full-bleed backdrop (cover + blur) soft-fills letterbox/pillarbox when asset ratio ≠ frame. */
.showcase-netflix-poster-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.14);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}
.showcase-netflix-poster-img{
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  z-index: 1;
}
.showcase-netflix-play-badge{
  position: absolute;
  inset: auto;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.showcase-netflix-play-badge svg{
  width: 18px;
  height: 18px;
  margin-left: 3px;
}
.showcase-netflix-tile:hover .showcase-netflix-play-badge{
  opacity: 1;
  transform: scale(1);
}
.showcase-netflix-corner-actions{
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}
.showcase-netflix-corner-btn.showcase-card-edit-tags,
.showcase-netflix-corner-btn.showcase-netflix-info-btn{
  position: relative;
  top: auto;
  right: auto;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(3, 3, 3, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(248, 250, 252, 0.95);
  flex-shrink: 0;
}
.showcase-netflix-corner-btn.showcase-card-edit-tags--guest{
  opacity: 0.85;
}
.showcase-netflix-corner-btn:hover{
  background: rgba(24, 24, 24, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
}
.showcase-netflix-corner-btn:focus-visible{
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 2px;
}

#showcaseNetflixMetaPopover.showcase-netflix-meta-popover{
  position: fixed;
  z-index: 100050;
  box-sizing: border-box;
  width: min(400px, calc(100vw - 24px));
  padding: 14px 38px 14px 14px;
  border-radius: 10px;
  background: #141414;
  color: #e5e5e5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.75);
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
  font-family: inherit;
}
.showcase-netflix-meta-dismiss{
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: rgba(226, 232, 240, 0.85);
  background: transparent;
  border: none;
}
.showcase-netflix-meta-dismiss:hover{
  background: rgba(255, 255, 255, 0.08);
}
.showcase-netflix-meta-summary{
  margin: 0;
  padding-right: 4px;
}
.showcase-netflix-meta-course-line{
  margin: 10px 0 0;
  padding: 0;
  border: none;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  color: #ffffff;
}
.showcase-netflix-meta-details{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 14px 0 0;
  padding: 14px 4px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.showcase-netflix-meta-detail-row{
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.55;
}
.showcase-netflix-meta-detail-row[hidden]{
  display: none !important;
}
.showcase-netflix-meta-detail-label{
  display: inline;
  margin-right: 4px;
  color: #777777;
  font-weight: 400;
}
.showcase-netflix-meta-detail-value{
  display: inline;
  color: #ffffff;
  font-weight: 400;
}
.showcase-netflix-meta-more-btn{
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-style: italic;
  font-size: inherit;
  line-height: inherit;
  color: #ffffff;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.showcase-netflix-meta-more-btn:hover{
  color: #e2e8f0;
}
.showcase-netflix-meta-more-btn:focus-visible{
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
  border-radius: 2px;
}
.showcase-netflix-meta-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 13px;
  color: #e5e5e5;
}
.showcase-netflix-meta-sep{
  opacity: 0.55;
  user-select: none;
}
.showcase-netflix-meta-hd-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #f8fafc;
  line-height: 1.25;
}
.showcase-card{
  --showcase-card-tags-row-h: calc(11px * 1.25 + 8px + 2px);
  --showcase-card-tags-collapsed-max: calc(2 * var(--showcase-card-tags-row-h) + 6px);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  padding: 0;
  border-radius: 18px;
  background: var(--showcase-pastel, #141414);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.35),
    0 18px 42px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.18s ease;
}
/* Guest tag hint (::after) must paint outside the card; thumb/body keep rounded corners. */
html.showcase-page .showcase-card{
  overflow: visible;
}
html.showcase-page .showcase-card:hover{
  z-index: 5;
}
.showcase-card:hover{
  transform: translateY(-5px);
  border-color: rgba(125, 211, 252, 0.28);
  box-shadow:
    0 8px 20px rgba(56, 189, 248, 0.06),
    0 22px 52px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(56, 189, 248, 0.08);
}
.showcase-card-main{
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
  background: transparent;
  border-radius: 0;
}
.showcase-card-main:focus-visible{
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 3px;
  z-index: 1;
}
.showcase-card-edit-tags{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 40;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(8, 8, 8, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(224, 242, 254, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  opacity: 0.92;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.showcase-card-edit-tags:hover{
  opacity: 1;
  background: rgba(20, 20, 20, 0.75);
  border-color: rgba(125, 211, 252, 0.35);
}
.showcase-card-edit-tags:focus-visible{
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 2px;
}
.showcase-card-edit-tags--guest{
  /* Avoid opacity < 1 here: it fades native title tooltips and any ::after hint on some browsers. */
  cursor: default;
  pointer-events: auto;
  box-shadow: none;
  opacity: 1;
  color: rgba(224, 242, 254, 0.42);
  background: rgba(8, 8, 8, 0.28);
  border-color: rgba(255, 255, 255, 0.1);
}
.showcase-card-edit-tags--guest:hover{
  color: rgba(224, 242, 254, 0.82);
  background: rgba(8, 8, 8, 0.52);
  border-color: rgba(255, 255, 255, 0.16);
}
.showcase-card-edit-tags--guest:focus-visible{
  outline: none;
}
/* Immediate hint (title="" is slow / flaky); floats above grid/chrome (showcase cards use overflow:visible). */
.showcase-card-edit-tags--guest::after{
  content: 'Log in to tag.';
  position: absolute;
  left: auto;
  right: 0;
  top: calc(100% + 8px);
  transform: none;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: rgba(248, 250, 252, 0.98);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
@media (hover: hover) and (pointer: fine){
  .showcase-card-edit-tags--guest:hover::after{
    opacity: 1;
    visibility: visible;
  }
}
.showcase-card-edit-tags--guest.showcase-guest-tag-tip-visible::after{
  opacity: 1;
  visibility: visible;
}
@media (prefers-reduced-motion: reduce){
  .showcase-card-edit-tags--guest::after{
    transition: none;
  }
}
@media (prefers-reduced-motion: reduce){
  .showcase-card:hover{
    transform: none;
  }
}
.showcase-thumb{
  position: relative;
  display: block;
  width: 100%;
  flex-shrink: 0;
  /* Wider than 2:1 so height is shorter while the thumb still spans the full card width */
  aspect-ratio: 5 / 2;
  background: transparent;
  overflow: hidden;
  transition: filter 0.28s ease;
}
html.showcase-page .showcase-thumb{
  border-radius: 17px 17px 0 0;
}
.showcase-card:hover .showcase-thumb{
  filter: brightness(1.06);
}
@media (prefers-reduced-motion: reduce){
  .showcase-card:hover .showcase-thumb{
    filter: none;
  }
}
.showcase-thumb-hero{
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  box-sizing: border-box;
  pointer-events: none;
}
.showcase-thumb-title-text{
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  align-self: flex-start;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 13px 48px 0 14px;
  text-align: left;
  font-size: clamp(12px, 1.85vw, 15.5px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.22;
  font-variant-numeric: proportional-nums;
  color: rgba(15, 23, 42, 0.88);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 28px rgba(15, 23, 42, 0.08);
  overflow-wrap: anywhere;
  word-break: break-word;
}
html.showcase-page .showcase-thumb-title-text{
  color: rgba(255, 255, 255, 0.98);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(0, 0, 0, 0.18);
}
.showcase-roster-slot{
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  margin-top: auto;
  box-sizing: border-box;
  padding: 0 40px 12px 14px;
}
html.showcase-page .showcase-roster-slot{
  padding-right: 14px;
}
.showcase-thumb-roster{
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  text-align: left;
  font-size: clamp(11px, 1.55vw, 13px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  color: rgba(15, 23, 42, 0.85);
}
html.showcase-page .showcase-thumb-roster,
html.showcase-page .showcase-roster-fold .showcase-roster-foldable{
  color: rgba(255, 255, 255, 0.93);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(0, 0, 0, 0.14);
}
.showcase-roster-measure{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-height: calc(3 * 1.35em);
}
html.showcase-page .showcase-roster-slot{
  min-width: 0;
}
html.showcase-page .showcase-roster-fold{
  width: 100%;
  min-width: 0;
}
html.showcase-page .showcase-roster-fold .showcase-roster-foldable{
  flex: 1;
  min-width: 0;
  margin: 0;
}
html.showcase-page .showcase-roster-fold:not([open]) .showcase-roster-foldable{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
html.showcase-page .showcase-roster-fold[open] .showcase-roster-foldable{
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
html.showcase-page .showcase-roster-fold > .card-fold-summary{
  align-items: flex-end;
}
html.showcase-page .showcase-roster-fold .card-fold-toggle{
  align-self: flex-end;
  padding-bottom: 2px;
  color: rgba(255, 255, 255, 0.92);
}
.showcase-play-badge{
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
  opacity: 0.95;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.showcase-play-badge svg{
  display: block;
  width: clamp(32px, 5.5vw, 40px);
  height: clamp(32px, 5.5vw, 40px);
  filter:
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9))
    drop-shadow(0 4px 14px rgba(0, 0, 0, 0.55));
}
.showcase-card:hover .showcase-play-badge{
  opacity: 1;
}
.showcase-card-body{
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 0;
  gap: 5px;
  padding: 14px 15px 16px;
}
/* Tags strip continues the card pastel (hue set on `.showcase-card`). */
html.showcase-page .showcase-card-body{
  background: transparent;
  border-radius: 0 0 17px 17px;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  padding-top: 10px;
  gap: 0;
  /* Fixed tag well: same footprint as Beyond Silos + one tag row; empty space until tags ship. */
  min-height: 76px;
  box-sizing: border-box;
  justify-content: flex-start;
}
.showcase-card-title{
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: rgba(15, 23, 42, 0.94);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.showcase-card-subtitle{
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(71, 85, 105, 0.95);
  word-break: break-word;
}
html.showcase-page .showcase-card-subtitle{
  color: rgba(148, 163, 184, 0.88);
}
.showcase-card-meta{
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(100, 116, 139, 0.97);
  white-space: normal;
}
html.showcase-page .showcase-card-title{
  color: rgba(248, 250, 252, 0.96);
}
.showcase-toolbar.bug-reports-toolbar{
  margin-top: 18px;
  margin-bottom: 22px;
  width: 100%;
  max-width: 100%;
}
body.showcase-page .showcase-toolbar.bug-reports-toolbar > .content-search{
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
}
body.showcase-page .showcase-toolbar .content-search{
  width: 100%;
  max-width: 100%;
}
/* One gray control: wrapper holds the field (avoids white sliver from global `input` / `.search input` rules). */
html.showcase-page .showcase-toolbar .content-search .search{
  background: hsl(220 14% 17%);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
html.showcase-page .showcase-toolbar .search input{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: rgba(248, 250, 252, 0.94) !important;
}
html.showcase-page .showcase-toolbar .search input:focus{
  outline: none !important;
  box-shadow: none !important;
}
html.showcase-page .showcase-toolbar .content-search .search:focus-within{
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(56, 189, 248, 0.12);
}
html.showcase-page .showcase-toolbar .content-search .search-icon{
  color: rgba(148, 163, 184, 0.88);
}
html.showcase-page .showcase-toolbar .content-search .search:focus-within .search-icon{
  color: rgba(125, 211, 252, 0.82);
}
html.showcase-page .showcase-toolbar .search input::placeholder{
  color: rgba(148, 163, 184, 0.72);
}
.showcase-card-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 2px;
  align-content: flex-start;
}
/* Pin tags to bottom when body grows; two wrapped rows + fold when more tags */
html.showcase-page .showcase-card .showcase-tags-fold{
  margin-top: 0;
  width: 100%;
  min-width: 0;
}
html.showcase-page .showcase-card .showcase-tags-fold .showcase-tags-foldable{
  margin-top: 0;
  min-height: 0;
  box-sizing: border-box;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  max-width: 100%;
  max-height: var(--showcase-card-tags-collapsed-max);
  overflow: hidden;
}
html.showcase-page .showcase-card .showcase-tags-fold[open] .showcase-tags-foldable{
  flex-wrap: wrap;
  max-height: none;
  overflow: visible;
}
html.showcase-page .showcase-card .showcase-tags-fold > .card-fold-summary{
  align-items: flex-end;
}
html.showcase-page .showcase-card .showcase-tags-fold .card-fold-toggle{
  align-self: flex-end;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.92);
}
html.showcase-page .showcase-tags-slot{
  width: 100%;
  min-width: 0;
}
html.showcase-page .showcase-card .showcase-tags-measure{
  margin-top: 0;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 6px 8px;
  max-width: 100%;
  max-height: var(--showcase-card-tags-collapsed-max);
  overflow: hidden;
}
/* Tag row sits under the divider (see `.showcase-card-body` padding-top). */
html.showcase-page .showcase-card .showcase-card-body > .showcase-tags-slot:last-child,
html.showcase-page .showcase-card .showcase-card-body > .showcase-card-tags:last-child{
  margin-top: 0;
}
.showcase-tag{
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(125, 211, 252, 0.22);
  color: rgba(224, 242, 254, 0.94);
  line-height: 1.25;
  max-width: 100%;
  word-break: break-word;
}
/* Grid cards only — brighter pills on dark chrome (dialog overrides separately) */
html.showcase-page .showcase-card .showcase-tag{
  flex-shrink: 0;
  max-width: min(14rem, 50vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  background: rgba(56, 189, 248, 0.26);
  border-color: rgba(186, 230, 253, 0.62);
  color: #f0f9ff;
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.22),
    0 0 14px rgba(56, 189, 248, 0.18),
    0 1px 8px rgba(0, 0, 0, 0.2);
}
html.showcase-page .showcase-card .showcase-tags-fold[open] .showcase-tag{
  max-width: none;
  white-space: normal;
  word-break: break-word;
}
html.showcase-page .showcase-card .showcase-tag.showcase-tag-compendium{
  background: rgba(134, 239, 172, 0.26);
  border-color: rgba(187, 247, 208, 0.58);
  color: #ecfdf5;
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.3),
    0 0 14px rgba(34, 197, 94, 0.16),
    0 1px 8px rgba(0, 0, 0, 0.2);
}
.showcase-tags-dialog{
  border: none;
  border-radius: 18px;
  padding: 0;
  width: min(480px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  /* Short viewports / phones: dialog content must scroll inside the modal (not the page behind). */
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  max-height: calc(
    100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px
  );
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: #ffffff;
  color: rgba(15, 23, 42, 0.94);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
}
.showcase-tags-dialog::backdrop{
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
}
html.showcase-page .showcase-tags-dialog::backdrop{
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}
.showcase-tags-dialog-inner{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
  box-sizing: border-box;
}
.showcase-tags-dialog-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.showcase-tags-dialog-head-text{
  flex: 1;
  min-width: 0;
}
.showcase-tags-dialog-close.showcase-dialog-close{
  margin-top: -2px;
}
.showcase-tags-dialog-title{
  margin: 0;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.showcase-tags-dialog-subtitle{
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(51, 65, 85, 0.95);
}
.showcase-tags-compendium-add-hint{
  margin: -2px 0 10px 2px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(100, 116, 139, 0.98);
}
.showcase-tags-add-compendium-tool-cluster{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.showcase-tags-add-compendium-tool-text{
  font-size: 13px;
  font-weight: 400;
  color: rgba(51, 65, 85, 0.92);
}
.showcase-tags-catalog-wrap{
  margin: -2px 0 4px;
}
.showcase-tags-catalog-clamp-row{
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
}
.showcase-tags-catalog-scroll-wrap{
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}
/**
 * Compendium chips: bordered well when populated. Long lists clamp to ~2 rows + mini +/− (see JS).
 */
.showcase-tags-catalog-scroll-wrap:not(:empty){
  padding: 4px 6px 10px 2px;
  margin: 0 -4px 0 -2px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(248, 250, 249, 0.85);
}
.showcase-tags-catalog-wrap.showcase-tags-catalog-wrap--clamped:not(.showcase-tags-catalog-wrap--expanded)
  .showcase-tags-catalog-scroll-wrap:not(:empty){
  max-height: 76px;
  overflow: hidden;
}
.showcase-tags-catalog-wrap.showcase-tags-catalog-wrap--expanded .showcase-tags-catalog-scroll-wrap:not(:empty){
  max-height: min(200px, 32vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.showcase-tags-dialog .showcase-dialog-clamp-expand.showcase-tags-catalog-expand-btn{
  flex-shrink: 0;
  margin-top: 2px;
  padding: 2px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: rgba(71, 85, 105, 0.82);
  line-height: 1;
}
.showcase-tags-dialog .showcase-dialog-clamp-expand.showcase-tags-catalog-expand-btn:hover{
  color: rgba(15, 23, 42, 0.92);
  background: rgba(15, 23, 42, 0.06);
}
.showcase-tags-dialog .showcase-dialog-clamp-expand.showcase-tags-catalog-expand-btn:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}
.showcase-tags-dialog .showcase-tags-catalog-expand-btn .card-fold-toggle{
  margin-left: 0;
  color: inherit;
}
@media (max-width: 640px){
  .showcase-tags-dialog .showcase-dialog-clamp-expand.showcase-tags-catalog-expand-btn{
    padding: 0;
    margin-top: 4px;
    border-radius: 0;
    background: transparent !important;
    -webkit-tap-highlight-color: transparent;
  }
  .showcase-tags-dialog .showcase-dialog-clamp-expand.showcase-tags-catalog-expand-btn:hover{
    background: transparent !important;
    color: rgba(15, 23, 42, 0.94);
  }
}
.showcase-tags-catalog-wrap--expanded .showcase-tags-catalog-expand-btn .card-fold-toggle-char::before{
  content: '\2212';
}
.showcase-tags-catalog-empty{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(100, 116, 139, 0.98);
}
/* Same capsule geometry as main-page `.tag-pill`; scoped green tint for compendium picker */
.showcase-tags-catalog button.tag-pill.showcase-tags-catalog-add{
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: hsl(142 42% 93%) !important;
  border: 1px solid hsl(142 32% 78%) !important;
  color: hsl(155 28% 22%) !important;
  box-shadow: none !important;
}
.showcase-tags-catalog button.tag-pill.showcase-tags-catalog-add:hover:not(.tag-pill-active){
  filter: brightness(0.96);
}
.showcase-tags-catalog button.tag-pill.showcase-tags-catalog-add:focus-visible{
  outline: 2px solid hsl(152 45% 42%);
  outline-offset: 2px;
}
/* Tags that match a compendium tool title — same mint as catalog picker */
#showcaseTagsForm .tag-pill.add-form-tag-chip.showcase-tag-compendium{
  background: hsl(142 42% 93%) !important;
  border: 1px solid hsl(142 32% 78%) !important;
  color: hsl(155 28% 22%) !important;
}
.showcase-tags-label{
  display: block;
  margin: 2px 0 8px 2px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.95);
}
#showcaseTagsForm > .showcase-tags-label:first-of-type{
  margin-top: 18px;
}
#showcaseTagsForm .showcase-tags-entry-composite{
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 4px;
}
.showcase-tags-error{
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #b91c1c;
}
.showcase-tags-dialog-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.showcase-video-dialog{
  border: none;
  border-radius: 20px;
  padding: 0;
  width: fit-content;
  max-width: min(920px, calc(100vw - 28px));
  min-width: min(280px, calc(100vw - 28px));
  /* Parchment / sepia shell — avoids a cold white “matte” around the player */
  background: linear-gradient(168deg, #faf6ef 0%, #f0e8db 48%, #e8dfd0 100%);
  color: rgba(42, 32, 24, 0.94);
  box-shadow:
    0 28px 80px rgba(45, 32, 20, 0.32),
    0 0 0 1px rgba(120, 83, 48, 0.12) inset;
}
/* Programmatic focus on open (not the ✕) — no extra chrome on the dialog shell */
.showcase-video-dialog:focus{
  outline: none;
}
.showcase-video-dialog::backdrop{
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
}
html.showcase-page .showcase-video-dialog::backdrop{
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}
.showcase-video-dialog-inner{
  padding: 16px 16px 18px;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
}
.showcase-video-dialog-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.showcase-dialog-eyebrow{
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: pre-line;
  color: rgba(100, 78, 56, 0.9);
  line-height: 1.45;
}
.showcase-video-dialog-titles .showcase-dialog-title{
  margin: 0;
}
.showcase-video-dialog-titles .showcase-dialog-clamp-block{
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
  max-width: min(720px, calc(100vw - 80px));
  margin: 8px 0 0;
}
.showcase-video-dialog-titles .showcase-dialog-clamp-block .showcase-dialog-eyebrow{
  flex: 1;
  min-width: 0;
  margin: 0 0 4px;
}
.showcase-video-dialog .showcase-dialog-clamp-expand{
  flex-shrink: 0;
  padding: 2px 4px;
  margin-top: 1px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: rgba(100, 78, 56, 0.82);
  line-height: 1;
}
.showcase-video-dialog .showcase-dialog-clamp-expand:hover{
  color: rgba(38, 30, 22, 0.92);
  background: rgba(120, 83, 48, 0.08);
}
.showcase-video-dialog .showcase-dialog-clamp-expand:focus-visible{
  outline: 2px solid rgba(120, 83, 48, 0.45);
  outline-offset: 2px;
}
.showcase-video-dialog .showcase-dialog-clamp-expand .card-fold-toggle{
  margin-left: 0;
  color: inherit;
}
@media (max-width: 640px){
  .showcase-video-dialog .showcase-dialog-clamp-expand{
    padding: 0;
    margin-top: 2px;
    border-radius: 0;
    background: transparent !important;
    -webkit-tap-highlight-color: transparent;
  }
  .showcase-video-dialog .showcase-dialog-clamp-expand:hover{
    background: transparent !important;
    color: rgba(38, 30, 22, 0.94);
  }
}
.showcase-dialog-clamp-block--expanded .showcase-dialog-clamp-expand .card-fold-toggle-char::before,
.showcase-dialog-tags-row--expanded .showcase-dialog-tags-expand-btn .card-fold-toggle-char::before{
  content: '\2212';
}
@media (max-width: 640px){
  .showcase-dialog-clamp-block:not(.showcase-dialog-clamp-block--expanded) .showcase-dialog-eyebrow.showcase-dialog-eyebrow--clamp-measure{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
  }
  .showcase-dialog-clamp-block--expanded .showcase-dialog-eyebrow{
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
}
.showcase-video-dialog .showcase-dialog-tags-row{
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  max-width: min(720px, calc(100vw - 80px));
}
.showcase-video-dialog .showcase-dialog-tags-row[hidden]{
  display: none !important;
}
.showcase-video-dialog .showcase-dialog-tags-scroll{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
}
@media (max-width: 640px){
  .showcase-video-dialog .showcase-dialog-tags-row.showcase-dialog-tags-row--clamped:not(.showcase-dialog-tags-row--expanded) .showcase-dialog-tags-scroll{
    max-height: 76px;
    overflow: hidden;
  }
}
.showcase-video-dialog .showcase-dialog-tags-expand-btn{
  margin-top: 2px;
}
.showcase-video-dialog .showcase-dialog-tags-prefix{
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(100, 78, 56, 0.88);
  line-height: 1.45;
}
.showcase-video-dialog .showcase-dialog-tags-row .showcase-dialog-tags{
  margin-top: 0;
  flex: 1 1 160px;
}
.showcase-video-dialog .showcase-dialog-tags{
  max-width: min(720px, calc(100vw - 80px));
}
.showcase-video-dialog .showcase-dialog-tags .showcase-tag{
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.28);
  color: rgba(30, 64, 110, 0.95);
}
.showcase-video-dialog .showcase-dialog-tags .showcase-tag.showcase-tag-compendium{
  background: hsl(142 40% 92%) !important;
  border: 1px solid hsl(142 30% 76%) !important;
  color: hsl(155 28% 22%) !important;
}
.showcase-dialog-roster{
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(52, 40, 30, 0.92);
}
.showcase-dialog-title{
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: rgba(38, 30, 22, 0.94);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.showcase-dialog-close{
  flex-shrink: 0;
  margin: -4px -4px 0 0;
}
/* Matches .modal-head .icon-btn: one hairline border, flat fill — fill is parchment like .showcase-video-dialog (not inset highlight). */
.showcase-video-dialog .showcase-dialog-close.icon-btn{
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 44px;
  height: 44px;
  font-size: 22px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  box-sizing: border-box;
  background: linear-gradient(168deg, #faf6ef 0%, #f0e8db 48%, #e8dfd0 100%);
  border: 1px solid rgba(11, 18, 32, 0.14);
  color: rgba(38, 30, 22, 0.92);
  box-shadow: none;
}
.showcase-video-dialog .showcase-dialog-close.icon-btn:hover{
  border-color: rgba(11, 18, 32, 0.22);
}
.showcase-video-dialog .showcase-dialog-close.icon-btn:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.38);
  outline-offset: 3px;
}
.showcase-video-dialog .showcase-dialog-close svg{
  display: block;
  flex-shrink: 0;
  margin: 0;
}
.showcase-video-frame-wrap{
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  /* Warm “stage” + sepia frame (replaces cool slate + gray hairline) */
  background: linear-gradient(145deg, #2a2218 0%, #1a1410 55%, #12100c 100%);
  border: 1px solid rgba(160, 110, 62, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 210, 0.05),
    0 3px 18px rgba(40, 26, 12, 0.45);
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.showcase-native-player-host{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: fit-content;
  max-width: 100%;
}
.showcase-native-player-host[hidden]{
  display: none !important;
}
.showcase-youtube-host{
  width: min(880px, calc(100vw - 60px));
  aspect-ratio: 16 / 9;
  height: auto;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  background: #14110e;
  overflow: hidden;
}
.showcase-youtube-host[hidden]{
  display: none !important;
}
.showcase-youtube-host iframe{
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.showcase-playback-skip-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(46, 36, 26, 0.95), #1a1410);
  border-top: 1px solid rgba(160, 120, 72, 0.25);
}
#showcasePlaybackSkipBar[hidden]{
  display: none !important;
}
.showcase-skip-btn.btn.ghost{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 112px;
  padding: 10px 14px;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  color: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(255, 255, 255, 0.06);
}
.showcase-skip-btn.btn.ghost:hover{
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.42);
}
.showcase-skip-btn .showcase-skip-svg{
  flex-shrink: 0;
  opacity: 0.96;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.showcase-skip-btn .showcase-skip-text{
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}
.showcase-video-frame{
  display: block;
  border: 0;
}
/* [hidden] loses to the rule above (same specificity, author beats UA) — both iframe + video were visible and stacked. */
iframe.showcase-video-frame[hidden],
video.showcase-video-frame[hidden]{
  display: none !important;
}
/* Direct uploads: box tracks intrinsic aspect (portrait/landscape/square). */
video.showcase-video-frame{
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(78vh, 880px);
  object-fit: contain;
}
/* Embedded video players: standard wide stage. */
iframe.showcase-video-frame{
  width: min(880px, calc(100vw - 60px));
  aspect-ratio: 16 / 9;
  height: auto;
}

/*
 * Showcase · narrow phones (~iPhone 15 Pro logical width 393px; safe areas + touch).
 * viewport-fit=cover is set on showcase.html only so home-indicator / Dynamic Island insets apply here.
 */
@media (max-width: 430px){
  /* Overlay scrollbars on phones — stable gutter narrows layout vs 100vw and clips full-bleed controls */
  /*
   * Global `html, body { height: 100% }` pins the root to one viewport; iOS then often won't momentum-scroll
   * long pages. Reset height so the document can extend; scroll on body (Safari-reliable).
   */
  /*
   * iOS: overflow-x hidden on html commonly kills vertical scrolling when paired with body overflow.
   * Keep horizontal bleed controlled on body only; let html stay scroll-transparent.
   */
  html.showcase-page{
    scrollbar-gutter: auto;
    height: auto !important;
    min-height: 100%;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto;
  }
  html.showcase-page body.showcase-page{
    height: auto !important;
    min-height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
  }
  body.showcase-page .topbar.bug-reports-topbar.showcase-topbar{
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 12px;
    row-gap: 10px;
    padding-top: calc(clamp(14px, calc(18px + (100vw - 700px) * 0.04), 18px) + env(safe-area-inset-top, 0px));
    padding-right: calc(clamp(14px, calc(22px + (100vw - 700px) * 0.08), 22px) + env(safe-area-inset-right, 0px));
    padding-bottom: clamp(14px, calc(18px + (100vw - 700px) * 0.04), 18px);
    padding-left: calc(clamp(14px, calc(22px + (100vw - 700px) * 0.08), 22px) + env(safe-area-inset-left, 0px));
  }
  body.showcase-page .topbar .brand{
    flex: 1 1 14rem;
    min-width: 0;
    align-items: center;
  }
  body.showcase-page .brand > div{
    min-width: 0;
  }
  body.showcase-page .bug-reports-page-heading{
    overflow-wrap: anywhere;
  }
  body.showcase-page .auth-strip{
    flex: 0 0 auto;
    margin-left: auto;
    align-self: flex-end;
  }
  body.showcase-page .brand h1{
    font-size: clamp(15px, 4.1vw, 18px);
    line-height: 1.2;
  }
  body.showcase-page .brand .subtitle{
    font-size: 12px;
    margin-top: 2px;
  }
  body.showcase-page .brand-logo-link .logo{
    width: 40px;
    height: 40px;
  }
  .showcase-shell{
    max-width: 100%;
    /* Don’t clip: focus ring on search uses outer box-shadow — clip chopped it at edges */
    overflow-x: visible;
    padding-top: 12px;
    padding-right: calc(12px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(12px + env(safe-area-inset-left, 0px));
  }
  .showcase-content{
    max-width: 100%;
    box-sizing: border-box;
  }
  .showcase-gate{
    padding-left: calc(8px + env(safe-area-inset-left, 0px));
    padding-right: calc(8px + env(safe-area-inset-right, 0px));
  }
  .showcase-hero-dark{
    padding: 4px 8px 18px;
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
    text-align: center;
  }
  .showcase-title-darkpage{
    font-size: clamp(1.45rem, 6.8vw, 1.85rem);
    text-align: center;
    max-width: 100%;
    margin-inline: auto;
    padding-inline: 4px;
    box-sizing: border-box;
    text-wrap: balance;
  }
  .showcase-toolbar.bug-reports-toolbar{
    margin-top: 12px;
    margin-bottom: 16px;
    max-width: 100%;
    box-sizing: border-box;
    /* Keeps 2px border + inset focus ring inside padded shell without horizontal scroll */
    padding-inline: 2px;
  }
  html.showcase-page .showcase-toolbar .content-search{
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  html.showcase-page .showcase-toolbar .content-search .search{
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  /* Inset-only focus so nothing paints outside the shell (avoids chop under overflow-x: hidden on body) */
  html.showcase-page .showcase-toolbar .content-search .search:focus-within{
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      inset 0 0 0 2px rgba(56, 189, 248, 0.45);
  }
  /* 16px prevents iOS Safari zooming the page when the search field is focused */
  html.showcase-page .showcase-toolbar .search input{
    font-size: 16px !important;
    line-height: 1.35;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  html[data-showcase-layout="netflix"].showcase-page .showcase-netflix-host.showcase-grid{
    gap: 22px;
  }
  /* Glow was wider than the row (100% + 56px); side bleed inflated document scroll width on phones */
  html[data-showcase-layout="netflix"].showcase-page .showcase-netflix-host.showcase-grid::before{
    width: 100%;
    left: 0;
    transform: none;
  }
  .showcase-netflix-row-head{
    margin-left: 0;
    margin-right: 0;
    padding-left: 2px;
    padding-right: 2px;
  }
  .showcase-netflix-row-title{
    font-size: 0.98rem;
  }
  .showcase-netflix-strip{
    gap: 10px;
    scroll-padding-inline: calc(4px + env(safe-area-inset-left, 0px)) calc(4px + env(safe-area-inset-right, 0px));
    padding-left: calc(4px + env(safe-area-inset-left, 0px));
    padding-right: calc(4px + env(safe-area-inset-right, 0px));
    padding-bottom: 12px;
    scrollbar-width: none;
  }
  .showcase-netflix-strip::-webkit-scrollbar{
    display: none;
    height: 0;
  }
  .showcase-netflix-poster-hit{
    touch-action: auto;
  }
  /* ~1.45 tiles visible at 393px width — clearer peek of the next poster */
  .showcase-netflix-tile{
    width: min(62vw, 234px);
  }
  #showcaseNetflixMetaPopover.showcase-netflix-meta-popover{
    width: min(400px, calc(100vw - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    box-sizing: border-box;
  }
  body.showcase-page .showcase-video-dialog{
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(168deg, #faf6ef 0%, #f0e8db 48%, #e8dfd0 100%);
    box-shadow: none;
  }
  body.showcase-page .showcase-video-dialog .showcase-video-dialog-inner{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    min-height: 0;
    max-height: min(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px, 100%);
    padding:
      calc(10px + env(safe-area-inset-top, 0px))
      calc(12px + env(safe-area-inset-right, 0px))
      calc(12px + env(safe-area-inset-bottom, 0px))
      calc(12px + env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    width: 100%;
    max-width: none;
  }
  body.showcase-page .showcase-video-dialog .showcase-video-dialog-head{
    flex: 0 0 auto;
    margin-bottom: 10px;
  }
  body.showcase-page .showcase-video-dialog .showcase-video-frame-wrap{
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }
  body.showcase-page .showcase-video-dialog .showcase-dialog-tags{
    max-width: none;
  }
  iframe.showcase-video-frame,
  .showcase-youtube-host{
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
  }
  video.showcase-video-frame{
    max-height: min(72dvh, 520px);
    margin-left: auto;
    margin-right: auto;
  }
  body.showcase-page .showcase-tags-dialog{
    width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 16px);
    max-width: none;
    margin: auto;
    border-radius: 16px;
    /* Reinforce scrollable modal height on mobile (dialog UA styles won’t add this). */
    max-height: calc(
      100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px
    );
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .showcase-tags-dialog-inner{
    padding-top: 16px;
    padding-right: calc(18px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(18px + env(safe-area-inset-left, 0px));
  }
}

/*
 * Landscape phones: logical width often > 430px so the block above doesn’t apply, but height is short —
 * iframe 16×9 sizing from width overflows the viewport. Constrain both axes so the player fits inside
 * the bordered frame (overflow: hidden on .showcase-video-frame-wrap must not clip).
 */
@media (orientation: landscape) and (max-height: 560px){
  body.showcase-page .showcase-video-dialog{
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(168deg, #faf6ef 0%, #f0e8db 48%, #e8dfd0 100%);
    box-shadow: none;
  }
  body.showcase-page .showcase-video-dialog .showcase-video-dialog-inner{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    min-height: 0;
    max-height: min(
      100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 12px,
      100%
    );
    padding:
      calc(8px + env(safe-area-inset-top, 0px))
      calc(12px + env(safe-area-inset-right, 0px))
      calc(8px + env(safe-area-inset-bottom, 0px))
      calc(12px + env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    width: 100%;
    max-width: none;
  }
  body.showcase-page .showcase-video-dialog .showcase-video-dialog-head{
    flex: 0 0 auto;
    margin-bottom: 8px;
  }
  /* Hug the (possibly letterboxed) player; overflow hidden keeps rounded corners without chopping a mis-sized iframe */
  body.showcase-page .showcase-video-dialog .showcase-video-frame-wrap{
    flex: 0 1 auto;
    width: fit-content;
    max-width: 100%;
    min-height: 0;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  /*
   * Fit 16×9 in both dimensions: min() ties width to height budget and height to width budget.
   * ~176px: title row + dialog padding + frame border + margin (was 128px and overstated video height).
   */
  body.showcase-page .showcase-youtube-host{
    width: min(
      calc(100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)),
      calc((100dvh - 176px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 16 / 9)
    );
    max-width: 100%;
    max-height: min(
      calc(100dvh - 176px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)),
      calc((100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) * 9 / 16)
    );
    height: auto;
    aspect-ratio: 16 / 9;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }
  iframe.showcase-video-frame{
    display: block;
    width: min(
      calc(100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)),
      calc((100dvh - 176px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 16 / 9)
    );
    max-width: 100%;
    max-height: min(
      calc(100dvh - 176px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)),
      calc((100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) * 9 / 16)
    );
    height: auto;
    aspect-ratio: 16 / 9;
    box-sizing: border-box;
  }
  body.showcase-page .showcase-native-player-host{
    width: 100%;
    max-width: min(
      calc(100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)),
      calc((100dvh - 176px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 16 / 9)
    );
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }
  /* Uploads: any aspect ratio — only cap to viewport; object-fit contains letterboxing inside the frame */
  video.showcase-video-frame{
    max-height: calc(100dvh - 176px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    width: auto;
    height: auto;
    object-fit: contain;
    box-sizing: border-box;
  }
}

@media (hover: none), (pointer: coarse){
  .showcase-netflix-tile:hover .showcase-netflix-poster-frame{
    transform: none;
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.65),
      0 0 0 1px rgba(255, 255, 255, 0.06);
  }
  .showcase-netflix-tile:active .showcase-netflix-poster-frame{
    transform: scale(0.985);
  }
  .showcase-netflix-tile .showcase-netflix-play-badge{
    opacity: 0.88;
    transform: scale(1);
  }
}
@media (pointer: coarse){
  .showcase-netflix-corner-btn.showcase-card-edit-tags,
  .showcase-netflix-corner-btn.showcase-netflix-info-btn{
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 10px;
  }
}
@media (prefers-reduced-motion: reduce){
  .showcase-netflix-tile:active .showcase-netflix-poster-frame{
    transform: none;
  }
}

/* ——— Handheld home shell (`html.msai-handheld-preview` on `/`): 600px layout opt-out + iOS scroll root + safe-area chrome (mirrors showcase mobile). ——— */
@media (max-width: 430px){
  html.msai-handheld-preview{
    scrollbar-gutter: auto;
    height: auto !important;
    min-height: 100%;
    min-width: 0 !important;
    max-width: 100%;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto;
  }
  html.msai-handheld-preview body.msai-handheld-preview{
    height: auto !important;
    min-width: 0 !important;
    max-width: 100%;
    min-height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
  }
  /* Apps hub: need a definite viewport height so the iframe/workspace flex chain can fill the screen */
  html.msai-handheld-preview body.tools-hub-shell.msai-handheld-preview{
    height: 100dvh !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
  }
  html.msai-handheld-preview .topbar,
  html.msai-handheld-preview .layout,
  html.msai-handheld-preview main.content{
    min-width: 0 !important;
  }
  html.msai-handheld-preview .topbar{
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 12px;
    row-gap: 10px;
    padding-top: calc(clamp(14px, calc(18px + (100vw - 700px) * 0.04), 18px) + env(safe-area-inset-top, 0px));
    padding-right: calc(clamp(14px, calc(22px + (100vw - 700px) * 0.08), 22px) + env(safe-area-inset-right, 0px));
    padding-bottom: clamp(14px, calc(18px + (100vw - 700px) * 0.04), 18px);
    padding-left: calc(clamp(14px, calc(22px + (100vw - 700px) * 0.08), 22px) + env(safe-area-inset-left, 0px));
  }
  html.msai-handheld-preview .topbar .brand{
    flex: 1 1 14rem;
    min-width: 0;
    align-items: center;
  }
  html.msai-handheld-preview .topbar .brand > div{
    min-width: 0;
  }
  html.msai-handheld-preview .topbar .brand h1.brand-kicker{
    font-size: clamp(15px, 4.1vw, 18px);
  }
  html.msai-handheld-preview .auth-strip{
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    align-self: stretch;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  html.msai-handheld-preview .layout{
    padding-top: 12px;
    padding-right: calc(14px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(14px + env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    max-width: 100%;
  }
  html.msai-handheld-preview main.content .search input{
    font-size: 16px !important;
    line-height: 1.35;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  /*
   * Apps hub (/tools.html): compact auth row like showcase; readable heading scale; iframe gets usable height on phones.
   */
  html.msai-handheld-preview body.tools-hub-shell .auth-strip{
    flex-basis: auto;
    width: auto;
    max-width: none;
    margin-left: auto;
    align-self: flex-end;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  html.msai-handheld-preview body.tools-hub-shell .bug-reports-page-heading{
    overflow-wrap: anywhere;
  }
  html.msai-handheld-preview body.tools-hub-shell .brand h1{
    font-size: clamp(15px, 4.1vw, 18px);
    line-height: 1.2;
  }
  html.msai-handheld-preview body.tools-hub-shell .brand .subtitle{
    font-size: 12px;
    margin-top: 2px;
  }
  html.msai-handheld-preview body.tools-hub-shell .brand-logo-link .logo{
    width: 40px;
    height: 40px;
  }
  html.msai-handheld-preview .layout.tools-hub-layout{
    gap: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  html.msai-handheld-preview .tools-hub-card{
    min-height: 44px;
    box-sizing: border-box;
  }
}

