



:root {
  
  --bg-base: #00E6FF;
  --hour-accent: #00E6FF;
  --date-accent: #ff5722;
  --neon-glow: rgba(0, 230, 255, 0.5);
  --neon-glow-strong: rgba(0, 230, 255, 0.8);
  --card-channel-color: #38bdf8;
  --bg-deep: rgba(10, 10, 15, 0.9);
  
  
  --header-bg: rgba(10, 15, 25, 0.7);
  --card-bg: rgba(30, 41, 59, 0.8);
  --card-bg-pc-body: #0f172a;
  --card-surface-wallpaper: none;
  --live-danger: #ef4444;
  --live-danger-glow: rgba(239, 68, 68, 0.5);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-smooth: 0.4s ease;
  --sticky-date-top: calc(106px + env(safe-area-inset-top, 0px));
}


body.mode-all {
  --bg-base: #FF0055;
  --hour-accent: #FF0055;
  --date-accent: #FF5500;
  --neon-glow: rgba(255, 0, 85, 0.5);
  --neon-glow-strong: rgba(255, 0, 85, 0.8);
  --card-channel-color: #ff4d7d;
}


*, *::before, *::after {
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--hour-accent);
  box-shadow: 0 0 10px var(--neon-glow);
}


html {
  background-color: #07111f;
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
  overscroll-behavior-y: contain;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  isolation: isolate;
  background-color: #07111f;
  position: relative;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  color: #f8fafc;
  transition: background-color var(--transition-smooth);
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

html.menu-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.menu-open {
  overflow: hidden;
  overscroll-behavior: none;
}


body::before,
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  pointer-events: none;
}



body::before {
  background-color: #07111f;
  background-image: var(--fav-portrait-wallpaper, none);
  opacity: 1;
}


@media (orientation: landscape) {
  body::before {
    background-image: var(--fav-landscape-wallpaper, none);
  }
}



body::after {
  background-color: #07111f;
  background-image: var(--all-portrait-wallpaper, none);
  opacity: 0;
}


@media (orientation: landscape) {
  body::after {
    background-image: var(--all-landscape-wallpaper, none);
  }
}


body.mode-all::before {
  opacity: 0;
}

body.mode-all::after {
  opacity: 1;
}


.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--header-bg); 
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: 16px; 
  padding-right: 16px;
  padding-bottom: 12px; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  transition: border-color var(--transition-smooth);
}

.monitor-warning {
  position: fixed;
  top: calc(108px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  z-index: 10000;
  padding: 9px 46px 9px 12px;
  border: 1px solid rgba(251, 191, 36, .9);
  border-radius: 10px;
  background: rgba(69, 26, 3, .96);
  color: #fef3c7;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .45);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.monitor-warning-close {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  color: #fef3c7;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.monitor-warning-close:hover { background: rgba(255,255,255,.2); }


.header-top { 
  height: 48px; 
  display: flex; 
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 0 15px;
}

.mode-switch {
  position: absolute;
  right: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 108px;
  height: 36px;
  padding: 3px;
  overflow: hidden;
  appearance: none;
  background: rgba(5, 10, 28, 0.78);
  border: 1px solid var(--hour-accent);
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  z-index: 10;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mode-switch:hover {
  box-shadow: 0 0 10px var(--neon-glow);
}

.mode-option {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  line-height: 1;
  text-align: center;
  transition: color var(--transition-normal), text-shadow var(--transition-normal);
}

.switch-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 16px;
  background: var(--hour-accent);
  box-shadow: 0 0 10px var(--neon-glow);
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.mode-switch[aria-checked="true"] {
  border-color: var(--hour-accent);
  box-shadow: 0 0 12px var(--neon-glow);
}

.mode-switch[aria-checked="false"] .mode-option-fav,
.mode-switch[aria-checked="true"] .mode-option-all {
  color: #07111f;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}

.mode-switch[aria-checked="true"] .switch-thumb {
  transform: translateX(100%);
}

.mode-switch:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.desktop-search-toggle {
  position: absolute;
  top: 50%;
  left: calc(50% - clamp(150px, 21vw, 230px));
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(125, 211, 252, .7);
  border-radius: 50%;
  background: rgba(6, 14, 38, .72);
  color: #e0f2fe;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(34, 211, 238, .2);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), color var(--transition-normal);
  z-index: 10;
}

@media screen and (min-width: 769px) {
  .desktop-search-toggle {
    left: auto;
    right: 147px;
  }
}

.desktop-search-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.desktop-search-toggle:hover,
.desktop-search-toggle[aria-expanded="true"] {
  border-color: var(--hour-accent);
  color: var(--hour-accent);
  box-shadow: 0 0 16px var(--neon-glow);
}

.desktop-search-panel {
  position: absolute;
  z-index: 10001;
  top: 72px;
  left: 100px;
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: min(520px, calc(100vw - 124px));
  padding: 12px;
  border: 1px solid rgba(34, 211, 238, .45);
  border-radius: 14px;
  background: rgba(5, 11, 30, .97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}

.desktop-search-panel.open {
  display: grid;
}

@media screen and (min-width: 769px) {
  .desktop-search-panel {
    top: 8px;
    right: 195px;
    left: auto;
    transform: none;
  }
}

.desktop-search-panel input {
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #475569;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font: inherit;
}

.desktop-search-panel > button {
  min-width: 56px;
  border: 1px solid #0891b2;
  border-radius: 8px;
  background: #0e7490;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.desktop-search-results {
  grid-column: 1 / -1;
  min-width: 0;
  max-height: 300px;
  overflow: auto;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
}

.desktop-search-results:not(:empty) {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--hour-accent) 24%, transparent);
}

.desktop-search-result {
  display: block;
  padding: 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #e2e8f0;
  text-decoration: none;
}

.desktop-search-result strong,
.desktop-search-result small {
  display: block;
}

.desktop-search-result strong {
  color: #cffafe;
  font-size: 13px;
  line-height: 1.4;
}

.desktop-search-result small {
  margin-top: 3px;
  color: #94a3b8;
}

.notification-toggle {
  position: absolute;
  top: 50%;
  left: calc(50% - clamp(198px, 25vw, 278px));
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(125, 211, 252, .7);
  border-radius: 50%;
  background: rgba(6, 14, 38, .72);
  color: #e0f2fe;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(34, 211, 238, .2);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), color var(--transition-normal);
  z-index: 10;
}

.notification-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.notification-toggle:hover,
.notification-toggle[aria-expanded="true"] {
  border-color: var(--hour-accent);
  color: var(--hour-accent);
  box-shadow: 0 0 16px var(--neon-glow);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  box-sizing: border-box;
  border: 2px solid #07111f;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font: 900 9px/13px system-ui, sans-serif;
  text-align: center;
  box-shadow: 0 0 8px rgba(239, 68, 68, .7);
  pointer-events: none;
}

.notification-badge[hidden] { display: none; }

.notification-panel {
  position: absolute;
  z-index: 10002;
  top: 58px;
  left: 16px;
  display: none;
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--hour-accent) 48%, transparent);
  border-radius: 14px;
  background: rgba(5, 11, 30, .97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .65), 0 0 20px color-mix(in srgb, var(--hour-accent) 18%, transparent);
  color: #e2e8f0;
}

.notification-panel.open { display: block; }

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 10px 0 15px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.notification-panel-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.notification-panel-header strong { font-size: 15px; letter-spacing: .05em; }
.notification-panel-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #cbd5e1;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.notification-panel-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.push-control { display: none; }
.push-control[hidden] { display: none !important; }
.push-control:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 7px;
}

.push-control-label {
  color: #a8b3c7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

.push-toggle {
  position: relative;
  width: 42px;
  height: 22px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .5);
  border-radius: 999px;
  background: rgba(71, 85, 105, .7);
  cursor: pointer;
  box-shadow: inset 0 0 7px rgba(0, 0, 0, .3);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.push-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -1px;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(148, 163, 184, .9);
  border-radius: 50%;
  box-sizing: border-box;
  background: #f8fafc;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .42);
  transform: translate(0, -50%);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .18s ease;
}

.push-toggle[aria-checked="true"] {
  border-color: color-mix(in srgb, var(--hour-accent) 80%, white);
  background: color-mix(in srgb, var(--hour-accent) 78%, #1e293b);
  box-shadow: 0 0 11px color-mix(in srgb, var(--hour-accent) 34%, transparent), inset 0 0 7px rgba(255, 255, 255, .14);
}

.push-toggle[aria-checked="true"]::after {
  border-color: color-mix(in srgb, var(--hour-accent) 80%, white);
  transform: translate(17px, -50%);
}

.push-toggle:hover:not(:disabled) { border-color: var(--hour-accent); }
.push-toggle:focus-visible { outline: 2px solid var(--hour-accent); outline-offset: 3px; }
.push-toggle:disabled { cursor: default; opacity: .45; }

.push-status {
  display: block;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: color-mix(in srgb, var(--hour-accent) 7%, transparent);
  color: #a8b3c7;
  font-size: 10px;
  line-height: 1.4;
  text-align: left;
}

.push-status[hidden] { display: none; }

.notification-list {
  max-height: min(520px, calc(100dvh - 132px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-empty {
  margin: 0;
  padding: 28px 18px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 82px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: inherit;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.notification-item::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: transparent;
}

.notification-item.unread { background: color-mix(in srgb, var(--hour-accent) 9%, transparent); }
.notification-item.unread::before { background: var(--hour-accent); box-shadow: 0 0 9px var(--neon-glow); }
.notification-item:hover { background: rgba(255, 255, 255, .075); }
.notification-item:last-child { border-bottom: 0; }
.notification-item img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; background: #0f172a; }
.notification-item-copy { display: grid; min-width: 0; gap: 4px; }
.notification-item-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.notification-item-heading .notification-kind { flex-shrink: 0; }
.notification-scheduled-start { color: #cbd5e1; font-size: 10px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.notification-item-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.notification-item-copy small { overflow: hidden; color: #94a3b8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.notification-kind { width: max-content; padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .04em; }
.notification-kind-new { border: 1px solid #60a5fa; background: rgba(59, 130, 246, .18); color: #bfdbfe; }
.notification-kind-upload { border: 1px solid #34d399; background: rgba(16, 185, 129, .16); color: #6ee7b7; }
.notification-format-shorts { border: 1px solid #fb7185; background: rgba(244, 63, 94, .14); color: #fda4af; }
.notification-kind-live { border: 1px solid rgba(248, 113, 113, .7); background: rgba(239, 68, 68, .18); color: #fca5a5; }
.notification-kind-time { border: 1px solid rgba(251, 191, 36, .72); background: rgba(245, 158, 11, .17); color: #fcd34d; }
.notification-kind-guest { border: 1px solid #79d9ff; background: #12506366; color: #a4eeff; }
.notification-guest-reason { display: block; color: #a4eeff; font-size: 12px; line-height: 1.5; margin-top: 6px; overflow-wrap: anywhere; }
.notification-time-change { color: #fde68a; font-size: 11px; font-weight: 800; letter-spacing: .01em; }

@media screen and (min-width: 769px) {
  .notification-toggle {
    left: auto;
    right: 195px;
  }

  .notification-panel {
    top: 62px;
    right: 195px;
    left: auto;
  }
}


#title-display {
  font-family: 'Chiq Pro', sans-serif;
  font-weight: 900;
  color: #ffffff;
  font-size: 20px;
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: none; 
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  -webkit-tap-highlight-color: transparent;
  transition: all var(--transition-normal);
  cursor: default;
  pointer-events: none;
  user-select: none;
  position: relative;
  display: flex;
  align-items: center; 
}

#title-display .title-text {
  display: none;
}

.title-logo {
  display: block;
  width: auto;
  height: clamp(36px, 11vw, 42px);
  opacity: .9;
  object-fit: contain;
}

#title-display .alpha-text {
  
  font-family: inherit;
  font-weight: 900; 
  font-size: 0.9em; 
  font-style: normal;
  text-transform: none;
  display: inline-block;
  transform: scale(0.92); 
  transform-origin: center center;
  vertical-align: baseline;
  line-height: 1;
}


.tabs { 
  display: flex; 
  gap: 10px; 
  height: 36px; 
  align-items: center;
  margin-top: 10px;
}

.tab-btn {
  flex: 1;
  padding: 6px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--hour-accent);
  border: 1px solid var(--hour-accent);
  box-shadow: inset 0 0 10px var(--neon-glow), 0 0 15px var(--neon-glow);
  text-shadow: 0 0 5px var(--hour-accent);
}

@media screen and (min-width: 769px) {
  .header-top { height: 60px; }
  #title-display { font-size: 26px; }
  .tabs { gap: 20px; max-width: 600px; margin: 15px auto 0; }
  .tab-btn { font-size: 15px; padding: 10px 0; }
}


#menu-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 16px;
  z-index: 100001;
  padding: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: rgba(10, 15, 25, 0.4);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-fast);
}

#menu-btn:hover {
  background: rgba(10, 15, 25, 0.8);
}

body.admin-open #menu-btn {
  visibility: hidden;
  pointer-events: none;
}

#menu-btn .bar {
  width: 22px;
  height: 2px;
  background-color: var(--hour-accent);
  margin: 5px 0;
  border-radius: 2px;
  display: block;
  box-shadow: 0 0 8px var(--neon-glow);
  transition: all var(--transition-normal);
}

#menu-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: auto;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100002;
  display: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
  touch-action: none;
}

#loading-overlay {
  position: fixed;
  top: 0; left: 0; 
  width: 100%; height: 100%;
  background: #0a0a0f;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200000;
}

.loading-text {
  margin-top: 20px;
  font-size: 14px;
  color: var(--hour-accent);
  font-weight: 800;
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  animation: pulse 1.5s infinite;
  transition: color var(--transition-smooth);
}

.stream-refresh-indicator {
  box-sizing: border-box;
  width: 100%;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: height .18s ease, opacity .14s ease;
}

.stream-refresh-indicator.visible {
  height: 42px;
  opacity: 1;
}

.stream-refresh-spinner {
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border: 2px solid color-mix(in srgb, var(--hour-accent) 24%, rgba(255,255,255,.2));
  border-top-color: var(--hour-accent);
  border-right-color: color-mix(in srgb, var(--hour-accent) 72%, white);
  border-radius: 50%;
  filter: drop-shadow(0 0 6px var(--hour-accent));
  transform-origin: center;
}

.stream-refresh-indicator.refreshing .stream-refresh-spinner {
  animation: stream-refresh-spin .72s linear infinite;
}

.stream-refresh-indicator.ready .stream-refresh-spinner {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hour-accent) 12%, transparent);
}

.stream-refresh-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes stream-refresh-spin {
  to { transform: rotate(360deg); }
}


#side-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(230px, 68vw);
  height: auto;
  background: rgba(10, 10, 15, 0.985);
  z-index: 100003;
  transform: translate3d(-100%, 0, 0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-smooth);
  border-right: 1px solid var(--neon-glow);
  overflow: hidden;
  box-sizing: border-box;
  will-change: transform;
  contain: layout paint;
}

body.menu-open #side-menu {
  transform: translate3d(0, 0, 0);
}

.menu-content-wrapper {
  height: 100%;
  padding-top: env(safe-area-inset-top, 20px);
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overflow-anchor: none;
  box-sizing: border-box;
}

.menu-header-box h2 {
  margin: 24px 25px 20px;
  border-bottom: 2px solid var(--hour-accent);
  display: inline-block;
  padding-bottom: 8px;
  font-size: 0;
  line-height: 0;
  transition: border-color var(--transition-smooth);
}

.menu-title-logo {
  display: block;
  width: min(170px, calc(68vw - 60px));
  height: auto;
  opacity: .92;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, .16));
}

.menu-label {
  padding: 25px 25px 10px;
  font-size: 10px;
  font-weight: 800;
  color: var(--hour-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
  transition: color var(--transition-smooth);
}

.menu-item, .accordion-header {
  padding: 16px 25px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  background: transparent;
  font-weight: 600;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.menu-item:active, .accordion-header:active,
.menu-item:hover, .accordion-header:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--hour-accent);
}

.accordion-header span { 
  font-size: 10px; 
  transition: transform var(--transition-normal); 
  margin-left: auto; 
}

.menu-link-group .accordion-header small {
  margin-left: 7px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 700;
}

.menu-link-group .menu-sub-link {
  min-height: 44px;
  padding: 12px 25px 12px 38px;
  font-size: 13px;
}

.menu-link-group .menu-sub-link::after {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.3);
  content: "↗";
  font-size: 11px;
}

.accordion-header.active { 
  color: var(--hour-accent); 
  background: rgba(255, 255, 255, 0.03);
}
.accordion-header.active span { transform: rotate(180deg); }

.accordion-content {
  display: none;
  background: rgba(0, 0, 0, 0.2);
}

.fav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: background var(--transition-fast);
}

.fav-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.fav-row a {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.sidebar-channel-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-channel-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-channel-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-row a:hover {
  color: var(--hour-accent);
}

.heart-btn {
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  color: rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.heart-btn.active {
  color: #ff3b30 !important;
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(255, 59, 48, 0.5);
}

.heart-btn:active {
  transform: scale(1.4);
}


#back-to-top {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 15, 25, 0.85);
  border: 1px solid var(--hour-accent);
  color: var(--hour-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px var(--neon-glow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  font: inherit;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background-color: var(--hour-accent);
  color: #000;
  box-shadow: 0 0 20px var(--hour-accent);
  transform: translateY(-3px);
}

#back-to-top:active {
  transform: translateY(0) scale(0.95);
}


#content {
  padding-top: calc(60px + 60px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
}


html.iphone-standalone,
html.iphone-standalone body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.iphone-standalone {
  scroll-snap-type: y mandatory;
}

html.iphone-standalone body {
  
  min-height: 100lvh;
  overflow: clip;
}

html.iphone-standalone body::before,
html.iphone-standalone body::after {
  position: absolute;
  transform: none;
  will-change: auto;
}

html.iphone-standalone :is(.app-header, .monitor-warning, #menu-btn, #back-to-top) {
  position: absolute;
}

html.iphone-standalone .app-header {
  scroll-snap-align: start;
}

html.iphone-standalone #stream-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden auto;
  overscroll-behavior: none;
}

html.iphone-standalone #content {
  min-height: 100%;
}

html.iphone-standalone.menu-open #stream-scroll {
  overflow-y: hidden;
}

#scheduled-section, #live-section, #recent-section, #watch-later-section {
  width: 100%; 
  display: none; 
  box-sizing: border-box;
  padding: 0 16px; 
}

.cards.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  align-items: stretch;
}

@media screen and (max-width: 480px) {
  .cards.grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  
  #scheduled-section, #live-section, #recent-section, #watch-later-section {
    padding: 0 10px;
  }
}

@media screen and (min-width: 769px) {
  .cards.grid {
    gap: 20px;
  }
  
  #scheduled-section, #live-section, #recent-section, #watch-later-section {
    padding: 0 40px;
  }
}


.date-band.live-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  padding-right: 12px;
}

.date-band.live-header > span {
  flex: 0 0 auto;
}

.ls-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--hour-accent);
  color: var(--hour-accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 80px;
  text-align: center;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.ls-toggle-btn:hover {
  background: var(--neon-glow);
  box-shadow: 0 0 12px var(--neon-glow);
  color: #fff;
}

.ls-toggle-btn:active {
  transform: scale(0.95);
}

@media screen and (max-width: 768px) {
  .ls-toggle-btn {
    padding: 3px 10px;
    font-size: 10px;
    min-width: 70px;
  }
}


.card {
  container-type: inline-size;
  background: var(--card-bg); 
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  text-decoration: none;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
  height: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
}

.card-thumb img {
  width: 100%; 
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card-body {
  padding: 8px 10px !important;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 2px;
  background-color: #0b1530;
  background-image: linear-gradient(145deg, rgba(5, 11, 30, .58), rgba(8, 20, 44, .48)), var(--card-surface-wallpaper);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.owner-icon-pc { display: none !important; }
.owner-icon-sp { display: inline-block; }

.card-channel {
  font-size: clamp(11px, 3.8cqw, 13px);
  font-weight: 800;
  color: var(--card-channel-color);
  display: flex;
  align-items: center;
  transition: color var(--transition-smooth);
}

.channel-name-link,
.channel-icon-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.channel-name-link {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  text-align: left;
}

.channel-icon-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.channel-name-link:hover,
.channel-name-link:focus-visible { text-decoration: underline; }
.channel-icon-link:hover,
.channel-icon-link:focus-visible { filter: brightness(1.14); }


@media screen and (max-width: 768px) {
  .card-guests .channel-icon-link { pointer-events: none; }

  .card-body {
    position: relative;
    padding-bottom: 12px;
    justify-content: flex-start !important;
    gap: 4px !important;
  }

  .card-channel .owner-icon-sp {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
    border: 1px solid #eee;
    background: #fff;
    object-fit: cover;
  }

  .card-title { 
    font-size: 14px; 
    font-weight: 700; 
    line-height: 1.5; 
    color: #ffffff; 
    display: -webkit-box;
    -webkit-line-clamp: 4; 
    -webkit-box-orient: vertical; 
    overflow: hidden;
    min-height: 0 !important;
    height: auto !important;
    margin-bottom: 0 !important; 
  }

.card-time {
    font-size: 11px; 
    font-weight: 800; 
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .live-viewers {
    position: static; 
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--card-channel-color);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    z-index: 5;
    margin-left: auto;
    transition: color var(--transition-smooth);
  }

  .live-viewers.max-live {
    color: var(--live-danger) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    font-weight: 900;
  }

  .card:not(.has-viewers) .live-viewers { display: none; }

  .card-guests {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 4px 0px !important; 
    margin: 0 !important; 
    padding: 0 !important;
    width: 100% !important;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
  }

  .card-guests img {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: 1.5px solid #1e293b !important;
    margin-right: -12px !important; 
    box-shadow: -2px 0 4px rgba(0,0,0,0.3);
    object-fit: cover;
    position: relative;
    background: #1e293b;
    z-index: calc(50 - var(--i, 0));
  }

  .card-guests > img:last-child,
  .card-guests > .channel-icon-link:last-child img { 
    margin-right: 12px !important; 
  }

  .card-keyword {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    font-size: 12px;
    font-weight: 700;
    color: #c4b5fd;
  }

  
  .card:has(.label-live) .card-body,
  .card:has(.label-ended) .card-body { position: static; }
  .card:has(.label-live) .live-viewers:not(.ended-stats),
  .card:has(.label-ended) .live-viewers.ended-stats {
    position: absolute !important;
    top: calc(56.25cqw - 25px) !important;
    z-index: 21;
    display: inline-flex !important;
    align-items: center;
    gap: 3px;
    margin: 0 !important;
    padding: 3px 5px !important;
    border-radius: 5px !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, .82), rgba(30, 41, 59, .88)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.25) !important;
    color: #f8fafc !important;
    font-size: 9px !important;
    font-weight: 700;
    line-height: 1 !important;
    text-shadow: none !important;
    white-space: nowrap;
  }
  .card:has(.label-live) .live-viewers:not(.ended-stats) {
    right: 4px !important;
    left: auto !important;
    border: 1px solid rgba(255, 119, 145, .48) !important;
  }
  .card:has(.label-ended) .live-viewers.ended-stats {
    right: auto !important;
    left: 4px !important;
    border: 1px solid rgba(56, 189, 248, .58) !important;
  }
  .card:has(.label-live) .live-viewers:not(.ended-stats) strong,
  .card:has(.label-ended) .live-viewers.ended-stats strong { color: #fff; font-size: 11px !important; letter-spacing: .03em; }
  .card:has(.label-live) .viewer-label { color: #fda4af; }
  .card:has(.label-ended) .ended-stat-label { color: #7dd3fc; }
  .card:has(.label-live) .viewer-live-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--live-danger);
    box-shadow: 0 0 7px rgba(255, 77, 125, .9);
    animation: pulse 1.5s infinite;
  }
  .card:has(.label-live) .live-viewers:not(.ended-stats) .viewer-chart-btn,
  .card:has(.label-ended) .live-viewers.ended-stats .viewer-chart-btn {
    margin-left: 1px;
    padding: 1px 2px;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.16);
    border-radius: 0;
    font-size: 8px;
    font-weight: 800;
  }
  .card:has(.label-live) .live-viewers:not(.ended-stats) .viewer-chart-btn { color: #bae6fd; }
  .card:has(.label-ended) .live-viewers.ended-stats .viewer-chart-btn { color: #bae6fd; }
  .card:has(.label-live) .viewer-chart-icon { display: none; }
}

.card-time > span { min-width: 0; }

.card-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin-left: auto;
}

.watch-later-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: -6px -4px -6px auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #94a3b8;
  font: 800 23px/30px system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.watch-later-btn:hover { background: rgba(255,255,255,.08); color: #f8fafc; }
.watch-later-btn:active { transform: scale(.88); }
.watch-later-btn.active { color: #ff3b4f; text-shadow: 0 0 10px rgba(255,59,79,.55); }
.watch-later-btn:disabled { opacity: .48; cursor: wait; }

.x-post-btn {
  flex: 0 0 auto;
  min-width: 30px;
  height: 30px;
  margin: -6px -4px -6px 0;
  padding: 0 5px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #94a3b8;
  font: 800 18px/30px system-ui, sans-serif;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.x-post-btn span { font-size: 9px; }
.x-post-btn:hover { color: #f8fafc; background: rgba(255,255,255,.08); }
.x-post-btn:active { transform: scale(.88); }


@media screen and (min-width: 769px) {
  #content {
    padding-top: calc(60px + 60px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box;
  }

  #scheduled-section, #live-section, #recent-section, #watch-later-section {
    padding: 0 4px !important; 
    width: 100% !important;
    max-width: none !important;
    display: none; 
    box-sizing: border-box;
  }

  .cards.grid {
    display: grid;
    gap: 4px !important; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    align-items: start;
  }

  .date-band, .hour-band {
    width: 100% !important;
    padding-left: 12px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
    border-radius: 0;
  }

  .owner-icon-sp { display: none !important; }
  .owner-icon-pc { display: block !important; }

  .card {
    height: auto !important;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
  }

  .card-body {
    padding: 12px 8px !important;
    background-color: var(--card-bg-pc-body) !important;
    background-image: linear-gradient(145deg, rgba(5, 11, 30, .58), rgba(8, 20, 44, .48)), var(--card-surface-wallpaper) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: auto !important;
  }

  .card-time {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--card-channel-color) !important;
    letter-spacing: 0.1em !important;
    order: 1;
    line-height: 1;
    text-align: center;
    transition: color var(--transition-smooth);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .card-time .card-actions {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    width: 100%;
    margin: 0;
    transform: translateY(-50%);
    flex-direction: row-reverse;
    justify-content: space-between;
    pointer-events: none;
  }

  .card-time .watch-later-btn { margin: 0; pointer-events: auto; }
  .card-time .x-post-btn { margin: 0; padding: 0; pointer-events: auto; }
  .card-time .x-post-btn span { display: none; }

  .card-guests .channel-icon-link { pointer-events: auto; }

  .card-guests {
    position: static !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    order: 2;
    width: 100% !important;
  }

  .card-guests img {
    border-radius: 50% !important;
    object-fit: cover;
  }

  .owner-icon-pc {
    width: 42px !important;
    height: 42px !important;
    border: 2.5px solid var(--card-channel-color) !important;
    transition: border-color var(--transition-smooth);
  }

  .guest-icon {
    width: 34px !important;
    height: 34px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  }

  .card-title, .card-channel, .card-keyword {
    position: absolute !important;
    opacity: 0;
    transition: all var(--transition-fast);
    z-index: 20;
    pointer-events: none;
    box-sizing: border-box !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 1), 0 0 10px rgba(0, 0, 0, 0.8) !important;
    color: #ffffff !important;
    bottom: auto !important;
  }

  .live-viewers {
     position: absolute !important;
     top: 135px !important;
     left: 14px !important; 
     font-size: 11px !important;
     background: rgba(239, 68, 68, 0.9) !important;
     padding: 2px 8px !important;
     border-radius: 4px;
     z-index: 21;
     opacity: 1 !important;
     pointer-events: auto !important;
     box-sizing: border-box !important;
     text-shadow: 0 1px 4px rgba(0, 0, 0, 1), 0 0 10px rgba(0, 0, 0, 0.8) !important;
     color: #ffffff !important;
   }

  .card-title {
    top: 55px !important; 
    left: 0 !important;
    width: 100% !important;
    padding: 20px 14px 40px 14px !important; 
    font-size: 14px !important;
    font-weight: 700 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    background: linear-gradient(
      180deg, 
      rgba(0, 0, 0, 0) 0%, 
      rgba(0, 0, 0, 0.8) 25%, 
      rgba(0, 0, 0, 0.8) 75%, 
      rgba(0, 0, 0, 0) 100%
    ) !important;
  }

  .card-channel {
    top: 10px !important;
    right: 10px !important;
    background: rgba(15, 23, 42, 0.9) !important;
    padding: 4px 10px !important;
    border-radius: 6px;
    font-size: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .card-keyword {
    top: 135px !important;
    left: 14px !important;
    font-size: 11px !important;
    z-index: 21;
  }

  .card-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 15;
  }

  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--neon-glow);
    border-color: var(--hour-accent);
  }

  .card:hover .card-thumb::after { opacity: 1; }
  .card:hover .card-thumb img { transform: scale(1.05); }
  .card:hover .card-title, .card:hover .card-channel, .card:hover .card-keyword {
    opacity: 1;
    transform: translateY(-5px);
  }

  
  .card:has(.label-live) .live-viewers:not(.ended-stats) {
    position: absolute !important;
    top: calc(56.25cqw - 30px) !important;
    right: 4px !important;
    left: auto !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin: 0 !important;
    padding: 4px 6px !important;
    border: 1px solid rgba(255, 119, 145, .48) !important;
    border-radius: 6px !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, .82), rgba(30, 41, 59, .88)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.25) !important;
    color: #f8fafc !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: .02em;
    text-shadow: none !important;
    white-space: nowrap;
  }

  .card:has(.label-live) .live-viewers:not(.ended-stats) strong {
    color: #ffffff;
    font-size: 13px;
    letter-spacing: .03em;
  }

  .card:has(.label-live) .viewer-label { color: #fda4af; }
  .card:has(.label-live) .viewer-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--live-danger);
    box-shadow: 0 0 7px rgba(255, 77, 125, .9);
    animation: pulse 1.5s infinite;
  }

  .card:has(.label-live) .live-viewers:not(.ended-stats) .viewer-chart-btn {
    margin-left: 1px;
    padding: 1px 3px;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.16);
    border-radius: 0;
    color: #bae6fd;
    font-size: 9px;
    font-weight: 800;
  }

  .card:has(.label-live) .viewer-chart-icon { display: none; }

  .card:has(.label-live) .live-viewers.max-live:not(.ended-stats) {
    border-color: rgba(251, 191, 36, .75) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 10px rgba(251, 191, 36, .18) !important;
  }
}


.card:has(.label-live) {
  border: 2px solid var(--live-danger) !important;
  box-shadow: 0 0 12px var(--live-danger-glow);
}

@media screen and (min-width: 769px) {
  .card:has(.label-live):hover {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
    transform: translateY(-4px);
  }
}

.label-live, .label-ended, .label-upcoming {
  position: absolute; top: 10px; left: 10px; padding: 3px 10px;
  border-radius: 8px; font-size: 10px; font-weight: 900; z-index: 2;
  letter-spacing: 0.05em;
  -webkit-backdrop-filter: blur(2px) saturate(120%);
  backdrop-filter: blur(2px) saturate(120%);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}
.label-live {
  border: 1px solid rgba(254, 202, 202, .25);
  background: rgba(239, 68, 68, .78);
  color: #fff;
  box-shadow: 0 0 8px var(--live-danger-glow), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.label-upcoming {
  border: 1px solid rgba(191, 219, 254, .28);
  background: rgba(59, 130, 246, .78);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.label-ended {
  border: 1px solid rgba(203, 213, 225, .2);
  background: rgba(15, 23, 42, .78);
  color: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.duration-badge { 
  position: absolute; right: 6px; bottom: 6px; 
  background: rgba(0,0,0,0.8); color: #fff; 
  padding: 1px 4px; border-radius: 3px; font-size: 10px; z-index: 10; 
  font-family: 'Roboto Mono', monospace;
}


.date-group { margin-top: 30px; }
.date-group.first-group { margin-top: 0 !important; }


.date-band.sticky-date-band {
  position: sticky !important;
  top: var(--sticky-date-top) !important;
  z-index: 80;
  isolation: isolate;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .32);
}


@media screen and (max-width: 768px) {
  body::before,
  body::after {
    top: calc(115px + env(safe-area-inset-top, 0px));
  }

  #content {
    padding-top: calc(115px + env(safe-area-inset-top, 0px)) !important;
  }

  .date-group.first-group,
  .date-group:first-child {
    margin-top: 0 !important;
  }

  .date-group:first-child .date-band,
  .first-group .date-band {
    margin-top: 0 !important;
  }

  .date-band {
    width: 100%;
    box-sizing: border-box;
    margin: 16px 0 6px !important;
    padding: 5px 10px !important;
    background: var(--bg-deep);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 4px solid var(--date-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    color: #ffffff;
    font-size: 13px !important;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1.2 !important;
    transition: border-color var(--transition-smooth);
  }

  .hour-band {
    width: 100%;
    box-sizing: border-box;
    margin: 10px 0 6px !important;
    padding: 3px 10px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    border-left: 3px solid var(--hour-accent);
    color: var(--hour-accent);
    font-family: 'Roboto Mono', monospace;
    font-size: 12px !important;
    font-weight: 900;
    line-height: 1.2 !important;
    text-shadow: 0 0 6px var(--neon-glow);
    transition: color var(--transition-smooth), border-color var(--transition-smooth), text-shadow var(--transition-smooth);
  }
}

@media screen and (min-width: 769px) {
  :root {
    --sticky-date-top: calc(123px + env(safe-area-inset-top, 0px));
  }

  body::before,
  body::after {
    top: 123px;
  }
}


@media screen and (min-width: 769px) {
  .date-band {
    width: 100%;
    box-sizing: border-box;
    margin: 50px 0 25px;
    padding: 14px 30px;
    background: linear-gradient(90deg, var(--bg-deep) 0%, rgba(0,0,0,0) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-left: 10px solid var(--date-accent);
    color: #ffffff;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: border-color var(--transition-smooth);
  }

  .hour-band {
    width: 100%;
    box-sizing: border-box;
    margin: 40px 0 20px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    border-left: 5px solid var(--hour-accent);
    color: var(--hour-accent);
    font-family: 'Roboto Mono', monospace;
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 0 15px var(--neon-glow-strong);
    transition: color var(--transition-smooth), border-color var(--transition-smooth), text-shadow var(--transition-smooth);
  }

  .hour-band::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--hour-accent), transparent);
    opacity: 0.4;
    margin-left: 20px;
    transition: background var(--transition-smooth);
  }
}


@media screen and (min-width: 769px) and (orientation: portrait) {
  .date-group {
    margin-top: 12px;
  }

  .date-band {
    margin: 16px 0 8px;
    padding: 8px 12px !important;
    border-left-width: 6px;
    font-size: 20px;
    line-height: 1.25;
  }

  .hour-band {
    margin: 10px 0 6px;
    padding: 6px 12px !important;
    gap: 10px;
    border-left-width: 4px;
    font-size: 16px;
    line-height: 1.25;
  }

  .hour-band::after {
    margin-left: 8px;
  }
}

#scheduled-section.desktop-timeline-enabled,
#recent-section.desktop-timeline-enabled {
  position: relative;
  padding-left: 32px !important;
}

.desktop-timeline-marker {
  position: relative;
}

.desktop-timeline-marker.date-band,
.desktop-timeline-marker.hour-band {
  display: flex;
  align-items: center;
}

.desktop-timeline-marker::before {
  content: '';
  position: absolute;
  z-index: 4;
  top: 50%;
  left: -23px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--timeline-marker-color);
  box-shadow: 0 0 10px var(--timeline-marker-color);
}

.desktop-timeline-marker.hour-band::before {
  width: 8px;
  height: 8px;
  left: -21px;
}

.desktop-timeline-marker.date-band::after,
.desktop-timeline-marker.hour-band::after {
  content: '';
  flex: 1 1 auto;
  min-width: 16px;
  height: 1px;
  margin-left: 12px;
  opacity: .7;
  background: linear-gradient(90deg, var(--timeline-marker-color), transparent);
}

.desktop-timeline-marker.hour-band {
  margin: 10px 0 6px !important;
  padding: 4px 10px !important;
  border-left: 0;
  background: linear-gradient(90deg, rgba(5, 8, 22, .88) 0%, rgba(5, 8, 22, .62) 32%, rgba(5, 8, 22, .16) 72%, transparent 100%);
  color: var(--timeline-marker-color);
  font-size: 16px !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 6px var(--timeline-marker-color);
}

.desktop-timeline-marker.hour-band::after {
  margin-left: 12px;
}

.desktop-timeline-segment {
  position: absolute;
  z-index: 1;
  left: 13px;
  display: block;
  width: 2px;
  min-height: 1px;
  pointer-events: none;
  background: var(--timeline-marker-color);
  box-shadow: 0 0 8px var(--timeline-marker-color);
}

.timeline-tone-a {
  --timeline-marker-color: var(--hour-accent);
}

.timeline-tone-b {
  --timeline-marker-color: #a855f7;
}

@media screen and (min-width: 769px) {
#scheduled-section.desktop-timeline-enabled,
#recent-section.desktop-timeline-enabled {
  padding-left: 56px !important;
  }

  .desktop-timeline-marker::before {
    left: -40px;
    width: 18px;
    height: 18px;
    border-width: 3px;
  }

  .desktop-timeline-marker.hour-band::before {
    left: -37px;
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .desktop-timeline-marker.hour-band {
    margin: 14px 0 10px !important;
    padding: 4px 16px !important;
  }

  .desktop-timeline-segment {
    left: 24px;
  }
}


@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

.slide-from-right { animation: fromRight 0.3s ease-out; }
.slide-from-left { animation: fromLeft 0.3s ease-out; }
html.stream-viewport-zoomed .slide-from-right,
html.stream-viewport-zoomed .slide-from-left { animation: none; }

@keyframes fromRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fromLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.empty-msg {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(480px, calc(100% - 32px));
  margin: clamp(28px, 7vh, 64px) auto;
  padding: 18px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.96);
  border: 1px solid color-mix(in srgb, var(--hour-accent) 65%, transparent);
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--hour-accent) 11%, rgba(5, 12, 28, 0.9)), rgba(5, 12, 28, 0.92));
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  backdrop-filter: blur(14px) saturate(125%);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.3),
    0 0 18px color-mix(in srgb, var(--hour-accent) 22%, transparent),
    inset 0 0 22px color-mix(in srgb, var(--hour-accent) 7%, transparent);
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 9px color-mix(in srgb, var(--hour-accent) 36%, transparent);
}

.empty-msg::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: var(--hour-accent);
  border-radius: 50%;
  margin-right: 10px;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--hour-accent) 15%, transparent),
    0 0 14px var(--hour-accent);
  vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
  transition: background-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.empty-msg::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 16%;
  right: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hour-accent), transparent);
  box-shadow: 0 0 10px var(--hour-accent);
  opacity: 0.85;
  pointer-events: none;
}

.empty-msg small {
  display: block;
  margin-top: 5px;
  color: rgba(203, 213, 225, 0.82);
  font: 600 12px/1.55 'Nunito', sans-serif;
  letter-spacing: 0.03em;
  text-shadow: none;
}

@media screen and (max-width: 480px) {
  .empty-msg {
    width: calc(100% - 24px);
    margin: 26px auto;
    padding: 16px 18px;
    border-radius: 12px;
  }
}

.mini-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 15, 25, 0.95);
  border: 1px solid #00ffff;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
  z-index: 10000;
}

.popup-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-top-color: #00ffff;
  border-radius: 50%;
  animation: popup-spin 0.8s linear infinite;
}

@keyframes popup-spin {
  to { transform: rotate(360deg); }
}

.admin-modal { position: fixed; inset: 0; z-index: 150000; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; background: rgba(0,0,0,.72); }
.admin-panel { position: relative; width: min(860px, calc(100vw - 32px)); max-width: 860px; max-height: calc(100dvh - 32px); margin: 0; padding: 20px; overflow: auto; overscroll-behavior: contain; border: 1px solid #00d9ff; border-radius: 16px; background: #111827; color: #f8fafc; box-shadow: 0 18px 60px rgba(0,0,0,.48); }
.admin-panel h2 { margin: 0 34px 4px 0; color: #67e8f9; font-size: 21px; }
.admin-intro { margin: 0 30px 14px 0; color: #cbd5e1; font-size: 12px; line-height: 1.45; }
.admin-section { margin: 9px 0; overflow: hidden; border: 1px solid rgba(125, 211, 252, .16); border-radius: 10px; background: rgba(255,255,255,.055); }
.admin-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 13px; color: #a5f3fc; font-weight: 800; cursor: pointer; list-style: none; user-select: none; }
.admin-section > summary::-webkit-details-marker { display: none; }
.admin-section > summary::after { flex: 0 0 auto; content: '⌄'; color: #67e8f9; font-size: 18px; transition: transform .16s ease; }
.admin-section[open] > summary { border-bottom: 1px solid rgba(125, 211, 252, .14); background: rgba(8,145,178,.12); }
.admin-section[open] > summary::after { transform: rotate(180deg); }
.admin-section-count { margin-left: auto; color: #94a3b8; font-size: 11px; font-weight: 600; }
.admin-section-body { padding: 12px; }
.admin-panel h3 { margin: 0 0 10px; color: #a5f3fc; }
.admin-panel input, .admin-panel select { min-width: 0; max-width: 100%; padding: 8px; border: 1px solid #64748b; border-radius: 6px; background: #0f172a; color: #fff; }
.admin-panel button { min-height: 34px; margin: 3px; padding: 7px 10px; border: 0; border-radius: 6px; background: #0891b2; color: #fff; cursor: pointer; }
.admin-help { margin: 0 0 9px; color: #94a3b8; font-size: 12px; line-height: 1.45; }
.admin-appearance-theme { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 8px; align-items: end; }
.admin-appearance-theme label { display: grid; gap: 4px; color: #cbd5e1; font-size: 12px; }
.admin-appearance-theme select { width: 100%; min-height: 38px; }
.admin-theme-group { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 7px; align-items: end; min-width: 0; }
.admin-theme-group > strong { grid-column: 1 / -1; color: #e0f2fe; font-size: 13px; }
.admin-theme-group [data-theme-select][hidden] { display: none; }
.admin-theme-swatches { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 4px; }
.admin-theme-swatches span { display: inline-flex; align-items: center; gap: 5px; color: #cbd5e1; font-size: 11px; }
.admin-theme-swatches span::before { width: 14px; height: 14px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: var(--swatch); box-shadow: 0 0 8px var(--swatch); content: ''; }
.admin-wallpaper-help { margin-top: 14px; }
.admin-wallpaper-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-wallpaper-card { min-width: 0; overflow: hidden; border: 1px solid rgba(103,232,249,.15); border-radius: 9px; background: rgba(15,23,42,.72); }
.admin-wallpaper-preview { aspect-ratio: 16 / 8; overflow: hidden; background: #020617; }
.admin-wallpaper-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-wallpaper-copy { display: grid; gap: 6px; padding: 9px; }
.admin-wallpaper-copy strong { color: #e0f2fe; }
.admin-wallpaper-copy small { color: #94a3b8; font-size: 11px; }
.admin-wallpaper-copy input[type="file"] { width: 100%; padding: 6px; font-size: 11px; }
.admin-wallpaper-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-wallpaper-actions button { flex: 1 1 110px; margin: 0; }
.admin-panel .admin-secondary { border: 1px solid #475569; background: transparent; color: #cbd5e1; }
.admin-wallpaper-status { min-height: 1.35em; color: #a5f3fc; font-size: 11px; overflow-wrap: anywhere; }
.admin-form, .admin-toggles { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-toggles label { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; background: #0f172a; border-radius: 6px; }
.admin-toggles label:has([data-notification-email]) { flex: 1 1 280px; }
.admin-toggles [data-notification-email] { flex: 1 1 180px; }
.admin-list > div, .admin-log > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.admin-list > div:last-child, .admin-log > div:last-child { border-bottom: 0; }
.admin-list strong { min-width: 92px; }
.admin-list small { min-width: 0; color: #cbd5e1; flex: 1; overflow-wrap: anywhere; }
.admin-list { max-height: min(420px, 48dvh); overflow-y: auto; overscroll-behavior: contain; padding: 0 5px 0 0; }
.admin-log { max-height: min(240px, 32dvh); overflow: auto; color: #e2e8f0; }
.admin-log > div { display: block; overflow-wrap: anywhere; }
.admin-chips { max-height: 175px; overflow: auto; padding-right: 3px; }
.admin-chips span { display: inline-flex; align-items: center; margin: 3px; padding: 3px 6px; border-radius: 12px; background: #164e63; }
.admin-chips button { min-height: 20px; margin: 0 0 0 4px; padding: 0 4px; background: transparent; }
.admin-close {
  position: sticky;
  z-index: 4;
  top: 0;
  float: right;
  min-width: 36px;
  min-height: 36px;
  margin: -4px -4px 0 8px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(17, 24, 39, .92) !important;
  font-size: 24px;
  line-height: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.admin-error { color: #fca5a5; }
.admin-rss-controls { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.admin-rss-controls input { flex: 1 1 260px; }
.admin-rss-result { margin-top: 10px; color: #e2e8f0; font-size: 13px; }
.admin-rss-result > p { line-height: 1.55; }
.admin-rss-entries { max-height: min(380px, 42dvh); overflow: auto; }
.admin-rss-entry { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-rss-entry a { color: #67e8f9; font-weight: 700; overflow-wrap: anywhere; }
.admin-rss-entry small { display: block; margin-top: 4px; color: #cbd5e1; line-height: 1.45; overflow-wrap: anywhere; }
.admin-rss-missing { color: #fbbf24; }
.admin-channel-categories { display: grid; gap: 8px; }
.admin-channel-category { overflow: hidden; border: 1px solid rgba(103, 232, 249, .16); border-radius: 8px; background: rgba(15, 23, 42, .7); }
.admin-channel-category > summary { min-height: 40px; padding: 0 11px; color: #e2e8f0; background: rgba(15, 23, 42, .9) !important; }
.admin-channel-category > summary, .admin-channel-group > summary { display: flex; align-items: center; cursor: pointer; list-style: none; user-select: none; }
.admin-channel-category > summary::-webkit-details-marker, .admin-channel-group > summary::-webkit-details-marker { display: none; }
.admin-channel-category > summary::after, .admin-channel-group > summary::after { margin-left: 8px; content: '⌄'; color: #67e8f9; font-size: 15px; transition: transform .16s ease; }
.admin-channel-category[open] > summary::after, .admin-channel-group[open] > summary::after { transform: rotate(180deg); }
.admin-channel-groups { display: grid; gap: 6px; padding: 8px; }
.admin-channel-group { overflow: hidden; border: 1px solid rgba(148, 163, 184, .13); border-radius: 7px; }
.admin-channel-group > summary { min-height: 36px; padding: 0 9px; color: #a5f3fc; font-size: 12px; background: rgba(255, 255, 255, .025) !important; }
.admin-channel-group > summary small { margin-left: auto; margin-right: 6px; color: #94a3b8; font-size: 10px; }
.admin-channel-group > .admin-list { max-height: none; padding: 0 9px; }
.admin-x-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-x-form { display: grid; align-content: start; gap: 8px; padding: 10px; border: 1px solid rgba(103,232,249,.15); border-radius: 8px; background: rgba(15,23,42,.65); }
.admin-x-form label { display: grid; gap: 4px; color: #cbd5e1; font-size: 12px; }
.admin-x-form textarea, .x-post-panel textarea { width: 100%; box-sizing: border-box; resize: vertical; padding: 9px; border: 1px solid #64748b; border-radius: 7px; background: #0f172a; color: #fff; font: inherit; line-height: 1.55; }
.admin-x-preview { margin-top: 10px; padding: 10px; border-radius: 8px; background: #0b1220; }
.admin-x-preview pre { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #e2e8f0; font: 13px/1.55 system-ui,sans-serif; }
.admin-x-configured { margin-top: 8px; }
.x-post-panel { width: min(680px, calc(100vw - 32px)); }
.x-post-panel.is-loading::after { content: '読み込み中…'; display: block; padding: 30px; text-align: center; color: #a5f3fc; }
.x-post-panel.is-loading > * { visibility: hidden; }
#x-post-text { min-height: 210px; }
.x-post-meter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 7px 0 12px; color: #cbd5e1; font-size: 12px; }
.x-post-meter .over, #x-post-warning { color: #fca5a5; }
.x-post-tags { display: grid; gap: 8px; }
.x-post-tags > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.x-post-tags strong { width: 92px; color: #cbd5e1; font-size: 12px; }
.x-tag-chip, .x-tag-candidate { min-height: 30px !important; margin: 0 !important; padding: 4px 9px !important; border: 1px solid #475569 !important; border-radius: 999px !important; background: transparent !important; color: #94a3b8 !important; }
.x-tag-chip.active { border-color: #22d3ee !important; background: rgba(8,145,178,.18) !important; color: #a5f3fc !important; }
.x-post-add { display: flex; gap: 6px; margin-top: 12px; }
.x-post-add input { flex: 1; }
.x-post-remember { display: flex; align-items: center; gap: 6px; margin: 8px 0; color: #cbd5e1; font-size: 12px; }
.x-post-candidate-block { padding: 9px; border-radius: 8px; background: rgba(15,23,42,.72); color: #cbd5e1; font-size: 12px; }
#x-post-candidates { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; color: #64748b; }
.x-post-submit { width: 100%; margin: 12px 0 0 !important; min-height: 46px !important; background: #111 !important; border: 1px solid #64748b !important; font-weight: 800; }
@media (max-width: 600px) {
  .admin-panel input:not([type="checkbox"]):not([type="radio"]),
  .admin-panel select,
  .admin-panel textarea {
    font-size: 16px;
  }
  .admin-modal { align-items: flex-end; padding: 0; }
  .admin-panel { width: 100%; max-width: none; max-height: min(88dvh, 760px); padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  .admin-panel::before { display: block; width: 36px; height: 4px; margin: -5px auto 11px; border-radius: 99px; background: #475569; content: ''; }
  .admin-panel h2 { font-size: 18px; }
  .admin-intro { margin-bottom: 10px; font-size: 11px; }
  .admin-section { margin: 7px 0; }
  .admin-section > summary { min-height: 42px; padding: 0 11px; font-size: 14px; }
  .admin-section-body { padding: 10px; }
  .admin-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .admin-appearance-theme { grid-template-columns: 1fr 1fr; }
  .admin-appearance-theme button { grid-column: 1 / -1; width: 100%; margin: 0; }
  .admin-wallpaper-grid { grid-template-columns: 1fr; }
  .admin-wallpaper-preview { aspect-ratio: 16 / 7; }
  .admin-form input, .admin-form select { width: 100%; box-sizing: border-box; min-height: 40px; }
  .admin-form button { min-height: 40px; margin: 0; }
  .admin-channel-form { grid-template-columns: 1fr 1fr; }
  .admin-channel-form input[name="channelId"], .admin-channel-form input[name="youtubeUrl"] { grid-column: 1 / -1; }
  .admin-channel-form label { display: flex; align-items: center; min-height: 36px; font-size: 12px; }
  .admin-channel-form label:last-of-type { justify-content: space-between; }
  .admin-channel-form input[type="number"] { width: 58px; min-height: 34px; margin-left: 4px; }
  .admin-channel-form button { grid-column: 1 / -1; width: 100%; }
  .admin-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .admin-toggles label { min-height: 38px; padding: 5px 7px; font-size: 12px; }
  .admin-toggles label:has([data-notification-email]) { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .admin-toggles [data-notification-email] { width: 100%; }
  .admin-list { max-height: 42dvh; }
  .admin-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; align-items: start; }
  .admin-list strong { min-width: 0; overflow-wrap: anywhere; }
  .admin-list small { grid-column: 1 / 2; font-size: 11px; line-height: 1.4; }
  .admin-list button { grid-column: 2; grid-row: 1 / 3; min-height: 36px; margin: 0; }
  .admin-log { max-height: 30dvh; font-size: 12px; }
  .admin-x-grid { grid-template-columns: 1fr; }
  .x-post-panel { max-height: 92dvh; }
  #x-post-text { min-height: 170px; }
  .x-post-tags strong { width: 100%; }
}


#admin-modal .admin-workspace-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, calc(100vw - 32px));
  max-width: 1180px;
  height: min(840px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
}
.admin-workspace-header {
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(103,232,249,.18);
  background: rgba(10,18,32,.96);
}
.admin-workspace-header .admin-intro { margin: 3px 0 0; }
.admin-workspace-header .admin-close { position: static; float: none; margin: 0 !important; }
.admin-save-status { min-width: 112px; color: #94a3b8; font-size: 12px; font-weight: 800; text-align: right; }
.admin-save-status[data-state="saved"] { color: #6ee7b7; }
.admin-save-status[data-state="error"] { color: #fca5a5; }
#admin-content { min-height: 0; overflow: hidden; }
.admin-workspace { display: grid; grid-template-columns: 210px minmax(0, 1fr); height: 100%; min-height: 0; }
.admin-navigation { min-height: 0; padding: 14px 10px; overflow-y: auto; border-right: 1px solid rgba(103,232,249,.13); background: rgba(8,15,28,.88); }
.admin-navigation-list { display: grid; gap: 3px; }
.admin-navigation-list > small { margin: 13px 10px 5px; color: #64748b; font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.admin-navigation-list > small:first-child { margin-top: 2px; }
.admin-navigation-list > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font-weight: 750;
  text-align: left;
}
.admin-navigation-list > button:hover { background: rgba(103,232,249,.07); }
.admin-navigation-list > button.active { border-color: rgba(34,211,238,.28); background: rgba(8,145,178,.2); color: #cffafe; box-shadow: inset 3px 0 #22d3ee; }
.admin-nav-badge, .admin-tab-badge { display: inline-grid; min-width: 20px; min-height: 20px; place-items: center; padding: 1px 6px; border-radius: 999px; background: #be123c; color: #fff; font-size: 10px; }
.admin-nav-badge[hidden], .admin-tab-badge[hidden] { display: none !important; }
.admin-error-log .admin-error-entry { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 9px; padding: 11px 10px; border-left: 3px solid transparent; }
.admin-error-log .admin-error-entry.unread { border-left-color: #fb7185; background: rgba(190,18,60,.08); }
.admin-error-state { display: inline-grid; min-width: 34px; min-height: 20px; place-items: center; padding: 1px 6px; border: 1px solid rgba(148,163,184,.28); border-radius: 999px; color: #94a3b8; font-size: 10px; font-weight: 900; white-space: nowrap; }
.admin-error-entry.unread .admin-error-state { border-color: rgba(251,113,133,.45); background: rgba(190,18,60,.18); color: #fecdd3; }
.admin-mobile-navigation { display: none; }
.admin-main { min-width: 0; min-height: 0; padding: 20px 22px 30px; overflow-y: auto; overscroll-behavior: contain; background: #111827; }
.admin-page[hidden], .admin-subtab-panel[hidden], .admin-inline-editor[hidden] { display: none !important; }
.admin-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(148,163,184,.14); }
.admin-page-heading h3 { margin: 0; color: #a5f3fc; font-size: 22px; }
.admin-page-heading p { margin: 4px 0 0; color: #94a3b8; font-size: 12px; }
.admin-page-heading-actions > button { flex: 0 0 auto; margin: 0; }
.admin-page-content, .admin-subtab-panel { min-width: 0; }
.admin-page .admin-section-body { padding: 0; }
.admin-page .admin-list, .admin-page .admin-log, .admin-page .admin-chips { max-height: none; }
.admin-subtabs { display: flex; gap: 5px; margin: -4px 0 14px; padding: 4px; border-radius: 9px; background: #0b1220; }
.admin-subtabs > button { flex: 0 1 150px; margin: 0; border: 1px solid transparent; background: transparent; color: #94a3b8; }
.admin-subtabs > button.active { border-color: rgba(34,211,238,.3); background: rgba(8,145,178,.2); color: #cffafe; }
.admin-inline-editor { margin-bottom: 14px; padding: 13px; border: 1px solid rgba(34,211,238,.25); border-radius: 10px; background: rgba(8,145,178,.08); }
.admin-inline-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #cffafe; }
.admin-list-search { width: 100%; min-height: 40px; margin-bottom: 12px; }
.admin-notification-layout { display: grid; gap: 12px; }
.admin-notification-master, .admin-notification-destination, .admin-notification-children { border: 1px solid rgba(103,232,249,.14); border-radius: 10px; background: rgba(15,23,42,.7); }
.admin-notification-master { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 12px 14px; color: #e0f2fe; font-weight: 850; }
.admin-notification-children { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 10px; transition: opacity .2s; }
.admin-notification-children.disabled { opacity: .42; }
.admin-notification-children label { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 10px; border-radius: 7px; background: #0f172a; }
.admin-notification-destination { padding: 12px; }
.admin-notification-destination label { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; color: #cbd5e1; }
.admin-notification-destination input { width: 100%; }
.admin-appearance-theme { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
.admin-wallpaper-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.admin-wallpaper-card { display: grid; grid-template-rows: auto minmax(0,1fr); }
.admin-wallpaper-preview {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: #020617 !important;
}
.admin-wallpaper-preview img { transition: transform .2s, opacity .2s; }
.admin-wallpaper-preview span { position: absolute; inset: auto 7px 7px auto; padding: 3px 7px; border-radius: 999px; background: rgba(2,6,23,.78); color: #e0f2fe; font-size: 10px; opacity: 0; transition: opacity .2s; }
.admin-wallpaper-preview:hover img, .admin-wallpaper-preview:focus img { transform: scale(1.025); opacity: .78; }
.admin-wallpaper-preview:hover span, .admin-wallpaper-preview:focus span { opacity: 1; }
.admin-wallpaper-copy { gap: 4px; padding: 8px; }
.admin-wallpaper-copy strong { font-size: 13px; }
.admin-wallpaper-copy small { min-height: 2.6em; line-height: 1.3; }
.admin-wallpaper-input { display: none; }
.admin-wallpaper-actions { margin-top: 3px; }
.admin-wallpaper-actions button { min-height: 30px; padding: 5px 7px; font-size: 11px; }
.admin-wallpaper-status { min-height: 0; }
.image-crop-panel { width: min(760px, calc(100vw - 32px)); }
.image-crop-panel > p { color: #cbd5e1; font-size: 13px; }
.image-crop-panel > canvas { display: block; width: auto; max-width: 100%; height: auto; max-height: 52dvh; margin: 12px auto; border: 1px solid rgba(148,163,184,.25); border-radius: 8px; background: #07111f; object-fit: contain; }
.image-crop-controls { display: grid; gap: 8px; }
.image-crop-controls label { display: grid; grid-template-columns: 64px minmax(0,1fr); align-items: center; gap: 10px; color: #cbd5e1; font-size: 13px; }
.image-crop-controls input { width: 100%; min-width: 0; }
.image-crop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.image-crop-actions button { min-height: 42px; margin: 0; }
.admin-wallpaper-status:empty { display: none; }

@media (max-width: 760px) {
  #admin-modal { align-items: flex-end; padding: 0; }
  #admin-modal .admin-workspace-panel { width: 100%; height: min(92dvh, 820px); max-width: none; max-height: 92dvh; border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  #admin-modal .admin-workspace-panel::before { display: none; }
  .admin-workspace-header { min-height: 62px; padding: 10px 12px; grid-template-columns: minmax(0,1fr) auto auto; }
  .admin-workspace-header .admin-intro { display: none; }
  .admin-workspace-header h2 { font-size: 18px; }
  .admin-save-status { min-width: 0; font-size: 10px; }
  .admin-workspace { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .admin-navigation { padding: 8px 12px; overflow: visible; border-right: 0; border-bottom: 1px solid rgba(103,232,249,.13); }
  .admin-navigation-list { display: none; }
  .admin-mobile-navigation { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; color: #94a3b8; font-size: 11px; }
  .admin-mobile-navigation select { width: 100%; min-height: 40px; font-size: 16px; }
  .admin-main { padding: 14px 12px calc(20px + env(safe-area-inset-bottom)); }
  .admin-page-heading { margin-bottom: 12px; }
  .admin-page-heading h3 { font-size: 19px; }
  .admin-page-heading p { font-size: 11px; }
  .admin-page-heading-actions { align-items: center; }
  .admin-page-heading-actions > button { padding: 6px 8px; font-size: 11px; }
  .admin-subtabs > button { flex: 1; padding: 7px 5px; }
  .admin-notification-children { grid-template-columns: 1fr; }
  .admin-notification-destination label { grid-template-columns: 1fr; }
  .admin-appearance-theme { grid-template-columns: 1fr; gap: 9px; }
  .admin-theme-group { grid-template-columns: 1fr; padding: 9px; border: 1px solid rgba(103,232,249,.14); border-radius: 8px; background: rgba(15,23,42,.58); }
  .admin-theme-group > strong { font-size: 12px; }
  .admin-theme-group label { min-width: 0; font-size: 10px; }
  .admin-theme-group select { min-height: 40px; padding: 6px; }
  .admin-appearance-section .admin-section-body { padding: 8px; }
  .admin-appearance-section .admin-wallpaper-grid { grid-template-columns: 1fr; gap: 8px; }
  .admin-appearance-section .admin-wallpaper-card { display: grid; grid-template-columns: 86px minmax(0,1fr); align-items: stretch; }
  .admin-appearance-section .admin-wallpaper-preview { align-self: stretch; height: 100%; min-height: 82px; aspect-ratio: auto; }
  .admin-appearance-section .admin-wallpaper-copy { min-width: 0; align-content: center; gap: 4px; padding: 7px; }
  .admin-appearance-section .admin-wallpaper-copy strong { font-size: 12px; }
  .admin-appearance-section .admin-wallpaper-copy small { min-height: 0; font-size: 10px; }
  .admin-appearance-section .admin-wallpaper-actions { gap: 5px; }
  .admin-appearance-section .admin-wallpaper-actions button { min-height: 36px; padding: 6px; font-size: 11px; }
  .admin-appearance-section .admin-wallpaper-subtitle { margin: 15px 0 7px; }
  .admin-appearance-section .admin-wallpaper-help { margin: 7px 0; font-size: 11px; }
  .admin-wallpaper-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
  .admin-wallpaper-preview { aspect-ratio: 16 / 8; }
  .admin-wallpaper-preview span { display: none; }
  .admin-wallpaper-copy { padding: 7px; }
  .admin-wallpaper-copy small { font-size: 10px; }
  .admin-x-grid { grid-template-columns: 1fr; }
  #header-crop-modal { align-items: flex-end; padding: 0; }
  #header-crop-modal .header-crop-panel { width: 100%; max-width: none; max-height: min(90dvh, 700px); padding: 18px 14px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto; border: 1px solid rgba(103,232,249,.2); border-width: 1px 0 0; border-radius: 18px 18px 0 0; background: #111827; color: #f8fafc; box-shadow: 0 -12px 36px rgba(0,0,0,.38); }
  #header-crop-modal #header-crop-canvas { display: block; width: 100%; height: auto; max-height: 22dvh; object-fit: contain; }
  #header-crop-modal .header-crop-controls { display: grid; gap: 9px; }
  #header-crop-modal .header-crop-controls label { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 8px; }
  #header-crop-modal .header-crop-controls input { width: 100%; min-width: 0; }
  #header-crop-modal .header-crop-actions { position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin: 12px -14px calc(-14px - env(safe-area-inset-bottom)); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(103,232,249,.14); background: #111827; }
  #header-crop-modal .header-crop-actions button { min-height: 44px; margin: 0; }
  #wallpaper-crop-modal { align-items: flex-end; padding: 0; }
  #wallpaper-crop-modal .image-crop-panel { width: 100%; max-width: none; max-height: min(90dvh, 760px); padding: 18px 14px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto; border: 1px solid rgba(103,232,249,.2); border-width: 1px 0 0; border-radius: 18px 18px 0 0; background: #111827; color: #f8fafc; box-shadow: 0 -12px 36px rgba(0,0,0,.38); }
  #wallpaper-crop-modal .image-crop-panel > canvas { width: auto; max-width: 100%; max-height: 34dvh; }
  #wallpaper-crop-modal .image-crop-controls { gap: 7px; }
  #wallpaper-crop-modal .image-crop-controls label { grid-template-columns: 42px minmax(0,1fr); gap: 8px; }
  #wallpaper-crop-modal .image-crop-actions { position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin: 12px -14px calc(-14px - env(safe-area-inset-bottom)); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(103,232,249,.14); background: #111827; }
  #wallpaper-crop-modal .image-crop-actions button { min-height: 44px; margin: 0; }
}

.viewer-chart-btn { padding: 2px 5px; border: 1px solid currentColor; border-radius: 5px; background: transparent; color: inherit; font-size: 11px; cursor: pointer; }
.viewer-chart { display: block; width: 100%; height: clamp(150px, 26vw, 200px); margin: 10px 0; border-radius: 8px; background: #0f172a; }
.viewer-chart-summary { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.viewer-chart-summary strong { color: #fda4af; font-size: 16px; }
.viewer-chart-summary span { color: #cbd5e1; }
.viewer-chart-grid line { stroke: rgba(148, 163, 184, .28); stroke-width: 1; vector-effect: non-scaling-stroke; }
.viewer-chart-grid text { fill: #94a3b8; font-size: 17px; font-weight: 600; }
.viewer-chart-line { fill: none; stroke: #22d3ee; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.viewer-chart-area { fill: none; pointer-events: none; }
.viewer-chart-peak-guide { stroke: rgba(253, 164, 175, .5); stroke-width: 1; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.viewer-chart-sample { fill: #67e8f9; stroke: #0f172a; stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.viewer-chart-sample:hover,
.viewer-chart-sample:focus,
.viewer-chart-sample.is-selected { fill: #fbbf24; stroke: #fff; stroke-width: 2.5; outline: none; }
.viewer-chart-peak circle { fill: #f43f5e; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.viewer-chart-peak text { fill: #fda4af; font-size: 18px; font-weight: 800; paint-order: stroke; stroke: #0f172a; stroke-width: 5; stroke-linejoin: round; }
.viewer-chart-detail { min-height: 1.5em; color: #e0f2fe !important; font-weight: 800; }

.card-comments-btn {
  align-self: flex-start;
  min-height: 30px;
  margin-top: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(103, 232, 249, .65);
  border-radius: 999px;
  background: rgba(8, 145, 178, .2);
  color: #a5f3fc;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.card-comments-btn:hover { background: rgba(8, 145, 178, .38); color: #fff; }
#chat-comments-modal { align-items: center; justify-content: center; }
#chat-comments-modal .admin-panel { display: flex; flex-direction: column; width: min(680px, calc(100vw - 24px)); max-width: 680px; max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; }
#chat-comments-modal .admin-close { z-index: 2; background: rgba(17, 24, 39, .92) !important; }
#chat-comments-content { min-height: 0; padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
.chat-comments-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-right: 34px; }
.chat-comments-heading h2, #chat-comments-content > h2 { margin: 0 0 12px; color: #cffafe; font-size: 18px; line-height: 1.4; }
.chat-comments-heading span { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; background: #164e63; color: #a5f3fc; font-size: 12px; font-weight: 800; }
.chat-comments-list { display: grid; gap: 9px; }
.chat-comment { padding: 11px; border: 1px solid rgba(125, 211, 252, .17); border-radius: 12px; background: rgba(15, 23, 42, .78); }
.chat-comment-author { display: flex; align-items: center; gap: 9px; }
.chat-comment-author img, .chat-comment-icon-fallback { width: 36px; height: 36px; flex: 0 0 36px; border: 2px solid #22d3ee; border-radius: 50%; object-fit: cover; }
.chat-comment-icon-fallback { display: grid; place-items: center; color: #22d3ee; }
.chat-comment-author strong { display: block; color: #67e8f9; font-size: 14px; line-height: 1.25; }
.chat-comment-author time { display: block; margin-top: 2px; color: #94a3b8; font-size: 11px; }
.chat-external-source { display: inline-block; margin-top: 3px; padding: 2px 6px; border: 1px solid rgba(251, 191, 36, .55); border-radius: 999px; background: rgba(120, 53, 15, .32); color: #fde68a; font-size: 10px; line-height: 1.35; text-decoration: none; }
a.chat-external-source:hover { color: #fff; text-decoration: underline; }
.chat-comment p { margin: 9px 0 0; color: #f8fafc; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-custom-emoji { display: inline-block; width: 1.55em; height: 1.55em; margin: 0 .08em; object-fit: contain; vertical-align: -.38em; }
.chat-translation-note { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: #94a3b8; font-size: 11px; }
.chat-translation-note::before { content: '◉'; color: #64748b; }
.chat-translation-note button { appearance: none; padding: 0; border: 0; background: transparent; color: #38bdf8; font: inherit; font-weight: 700; cursor: pointer; }
.chat-translation-note button:hover { color: #7dd3fc; text-decoration: underline; }
.chat-comment-original { display: none; }
.chat-comment.is-showing-original .chat-comment-translation { display: none; }
.chat-comment.is-showing-original .chat-comment-original { display: block; }
.chat-comments-loading, .chat-comments-empty { color: #cbd5e1; }


#viewer-modal { align-items: center; justify-content: center; }
#viewer-modal .admin-panel {
  box-sizing: border-box;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: min(580px, calc(100vw - 32px));
  max-width: 580px;
  max-height: calc(100dvh - 32px);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#viewer-modal .admin-panel::before { display: none; }
#viewer-modal .admin-close {
  position: relative;
  top: auto;
  float: none;
  flex: 0 0 48px;
  min-height: 48px;
  margin: 0 !important;
  z-index: 2;
  background: rgba(17, 24, 39, .92) !important;
}
#viewer-content {
  box-sizing: border-box;
  min-height: 0;
  max-height: calc(100vh - 84px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 84px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  padding: 18px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.admin-order-group { margin: 0 0 14px; }
.admin-order-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(148, 163, 184, .18); }
.admin-order-row button { min-width: 34px; padding: 4px 8px; margin-left: 4px; }
.admin-order-row button:disabled { opacity: .35; cursor: not-allowed; }
#viewer-content h3 { margin: 0 28px 6px 0; font-size: 16px; line-height: 1.4; }
#viewer-content p { margin: 6px 0; font-size: 12px; line-height: 1.5; color: #cbd5e1; }
@media (max-width: 600px) {
  #viewer-modal { padding: 12px; }
  #viewer-modal .admin-panel { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 0; }
  #viewer-content { padding: 14px; }
  #viewer-content h3 { font-size: 15px; }
  .viewer-chart { height: clamp(105px, 30vw, 150px); margin: 8px 0; }
  .viewer-chart-grid text { font-size: 15px; }
  .viewer-chart-summary strong { font-size: 15px; }
  .viewer-chart-detail { font-size: 12px !important; }
  #chat-comments-modal { align-items: flex-end; padding: 0; }
  #chat-comments-modal .admin-panel { width: 100%; max-width: none; max-height: 92dvh; padding: 0; border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  #chat-comments-content { padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); }
  .chat-comments-heading h2, #chat-comments-content > h2 { font-size: 16px; }
  .chat-comment { padding: 10px; }
  .chat-comment p { font-size: 15px; }
  .chat-custom-emoji { width: 1.7em; height: 1.7em; vertical-align: -.43em; }
  .card-comments-btn { min-height: 34px; }
}


.live-viewers.ended-stats {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  align-self: center;
  gap: 7px;
  margin: 4px auto 0 !important;
  padding: 6px 10px !important;
  border: 1px solid rgba(56, 189, 248, .55) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, rgba(14, 116, 144, .94), rgba(30, 41, 59, .96)) !important;
  color: #e0f2fe !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  letter-spacing: .02em;
  text-shadow: none !important;
}
.ended-stat-label { color: #bae6fd; font-weight: 700; }
.live-viewers.ended-stats strong { color: #fff; font-size: 15px; letter-spacing: .04em; }
.live-viewers.ended-stats .viewer-chart-btn { border-color: rgba(186, 230, 253, .7); color: #e0f2fe; }
@media screen and (min-width: 769px) {
  
  .card:has(.label-ended) .live-viewers.ended-stats {
    position: absolute !important;
    top: calc(56.25cqw - 30px) !important;
    right: auto !important;
    bottom: auto !important;
    left: 4px !important;
    z-index: 21;
    order: unset;
    gap: 4px;
    margin: 0 !important;
    padding: 4px 6px !important;
    border: 1px solid rgba(56, 189, 248, .58) !important;
    border-radius: 6px !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, .82), rgba(30, 41, 59, .88)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.25) !important;
    color: #f8fafc !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap;
  }
  .card:has(.label-ended) .live-viewers.ended-stats strong { font-size: 13px; }
  .card:has(.label-ended) .live-viewers.ended-stats .ended-stat-label { color: #7dd3fc; }
  .card:has(.label-ended) .live-viewers.ended-stats .viewer-chart-btn {
    margin-left: 1px;
    padding: 1px 3px;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.16);
    border-radius: 0;
    color: #bae6fd;
    font-size: 9px;
    font-weight: 800;
  }
}
#iphone-card-confirm{color:#edf3ff;background:#101d31;border:1px solid #79d9ff;border-radius:18px;width:min(420px,calc(100% - 32px));max-height:calc(100dvh - 40px);padding:24px;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;font-family:inherit;box-shadow:0 16px 60px #0008}#iphone-card-confirm::backdrop{background:rgba(0,0,0,.72)}#iphone-card-confirm h2{font-size:20px;line-height:1.5;margin:0;color:#bceaff}#iphone-card-confirm-title{font-size:15px;line-height:1.7;overflow-wrap:anywhere;margin:18px 0 24px;white-space:pre-wrap}.iphone-card-confirm-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.iphone-card-confirm-actions button,.iphone-card-confirm-actions a{box-sizing:border-box;min-width:0;display:flex;align-items:center;justify-content:center;min-height:48px;padding:12px 16px;border-radius:10px;border:1px solid #56718f;font:inherit;font-size:16px;line-height:1.5;text-decoration:none;text-align:center;color:#edf3ff;background:#172b43;cursor:pointer}.iphone-card-confirm-actions a{background:#285273;border-color:#79d9ff;font-weight:700}.iphone-card-confirm-actions :focus-visible{outline:2px solid #bceaff;outline-offset:3px}
.card .label-upcoming.label-premiere{background:linear-gradient(135deg,#a855f7,#6b21a8)!important;border:1px solid #d8b4fe!important;color:#fff!important;box-shadow:0 0 12px #a855f759!important;text-shadow:none!important}.notification-kind-premiere{border:1px solid #c084fc;background:#6b21a844;color:#e9d5ff}


#recent-section .recent-filter-header{flex-wrap:wrap}
#recent-section .recent-search{box-sizing:border-box;flex:0 1 340px;min-width:0;max-width:100%;min-height:40px;padding:8px 12px;border:1px solid var(--hour-accent);border-radius:10px;background:rgba(7,17,38,.82);color:#f8fafc;font:inherit;font-size:15px;letter-spacing:normal;text-transform:none}
#recent-section .recent-search::placeholder{color:#c0cbdc;opacity:1}
#recent-section .recent-search:focus-visible{outline:2px solid var(--hour-accent);outline-offset:2px}
@media(max-width:600px){#recent-section .recent-search{flex-basis:100%;width:100%;font-size:16px}#recent-section .recent-filter-header>span{flex-shrink:1;min-width:0}}
