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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

button,
input {
  font-family: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Offline status bar */
.offline-banner {
  background-color: var(--warning-soft);
  border-bottom: 1px solid var(--warning);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  padding: 0.5rem 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 4.1rem;
  max-width: 1280px;
  min-width: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
  margin-inline: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.header-nav::-webkit-scrollbar {
  display: none;
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 0.54rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.header-nav-link:hover {
  background-color: var(--surface-elevated);
  color: var(--ink);
}

.header-nav-link.is-active {
  background-color: var(--surface-elevated);
  border-color: var(--border-strong);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  height: 36px;
  padding: 0 0.68rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 0.81rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.header-btn:hover {
  background-color: var(--surface-elevated);
  border-color: var(--border-strong);
}

.header-cart-btn {
  position: relative;
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

.header-cart-btn:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background-color: var(--accent);
  color: #090d16;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

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

/* Shared Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-sm {
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  font-size: 0.84rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-ink);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--surface-elevated);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--surface-hover);
}

.btn-ghost {
  background-color: transparent;
  border-color: var(--border);
  color: var(--ink-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background-color: var(--surface-elevated);
  color: var(--ink);
}

.btn-outline-light {
  background-color: rgba(248, 250, 252, 0.08);
  border-color: rgba(248, 250, 252, 0.28);
  color: #f8fafc;
}

.btn-outline-light:hover {
  background-color: rgba(248, 250, 252, 0.16);
}

/* Gen-Z Swipeable Multi-Banner Carousel */
.promo-banner-section {
  padding-top: 0.9rem;
  padding-bottom: 1.05rem;
}

.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: #0b1120;
  box-shadow: var(--shadow-card);
  touch-action: pan-y;
  user-select: none;
}

.banner-carousel.is-dragging {
  cursor: grabbing;
}

.banner-track {
  display: grid;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.promo-banner-frame.banner-slide {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  min-height: 214px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  content-visibility: hidden;
  z-index: 0;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.promo-banner-frame.banner-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  content-visibility: visible;
  z-index: 2;
  transform: translate3d(0, 0, 0);
}

.promo-banner-frame.banner-slide.is-active.is-entering {
  transition: none;
  opacity: 0;
}

.promo-banner-frame.banner-slide.is-active.is-entering.is-dir-next {
  transform: translate3d(24px, 0, 0);
}

.promo-banner-frame.banner-slide.is-active.is-entering.is-dir-prev {
  transform: translate3d(-24px, 0, 0);
}

.promo-banner-frame.banner-slide.is-leaving {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  content-visibility: visible;
  z-index: 1;
}

.promo-banner-frame.banner-slide.is-leaving.is-dir-next {
  transform: translate3d(-16px, 0, 0);
}

.promo-banner-frame.banner-slide.is-leaving.is-dir-prev {
  transform: translate3d(16px, 0, 0);
}

.banner-slide[data-banner-href] {
  cursor: pointer;
}

.promo-banner-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: #0b1120;
  min-height: 214px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.promo-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.96;
  pointer-events: none;
}

.promo-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(7, 11, 22, 0.94) 0%, rgba(10, 17, 36, 0.82) 44%, rgba(10, 17, 36, 0.34) 68%, rgba(10, 17, 36, 0.06) 100%);
}

.promo-banner-scrim.scrim-prayer {
  background: linear-gradient(95deg, rgba(5, 24, 34, 0.94) 0%, rgba(8, 42, 56, 0.8) 44%, rgba(8, 42, 56, 0.3) 68%, rgba(5, 24, 34, 0.06) 100%);
}

.promo-banner-scrim.scrim-emerald {
  background: linear-gradient(95deg, rgba(4, 28, 24, 0.94) 0%, rgba(6, 54, 44, 0.8) 44%, rgba(6, 54, 44, 0.28) 68%, rgba(4, 28, 24, 0.06) 100%);
}

.promo-banner-scrim.scrim-weather {
  background: linear-gradient(95deg, rgba(9, 19, 42, 0.94) 0%, rgba(16, 42, 78, 0.8) 44%, rgba(16, 42, 78, 0.28) 68%, rgba(9, 19, 42, 0.06) 100%);
}

.promo-banner-scrim.scrim-world {
  background: linear-gradient(95deg, rgba(12, 14, 38, 0.94) 0%, rgba(28, 28, 76, 0.8) 44%, rgba(28, 28, 76, 0.28) 68%, rgba(12, 14, 38, 0.06) 100%);
}

.promo-banner-scrim.scrim-downloader {
  background: linear-gradient(95deg, rgba(24, 9, 36, 0.94) 0%, rgba(58, 14, 72, 0.8) 44%, rgba(36, 16, 62, 0.28) 68%, rgba(24, 9, 36, 0.06) 100%);
}

.promo-banner-scrim.scrim-violet {
  background: linear-gradient(95deg, rgba(22, 11, 46, 0.94) 0%, rgba(48, 20, 92, 0.8) 44%, rgba(48, 20, 92, 0.28) 68%, rgba(22, 11, 46, 0.06) 100%);
}

.promo-banner-scrim.scrim-crimson {
  background: linear-gradient(95deg, rgba(32, 9, 18, 0.94) 0%, rgba(68, 16, 30, 0.8) 44%, rgba(68, 16, 30, 0.28) 68%, rgba(32, 9, 18, 0.06) 100%);
}

.promo-banner-scrim.scrim-amber {
  background: linear-gradient(95deg, rgba(30, 17, 7, 0.94) 0%, rgba(64, 34, 10, 0.8) 44%, rgba(64, 34, 10, 0.28) 68%, rgba(30, 17, 7, 0.06) 100%);
}

.banner-slide-downloader {
  background: radial-gradient(circle at 86% 24%, rgba(236, 72, 153, 0.36), transparent 46%),
    radial-gradient(circle at 18% 85%, rgba(139, 92, 246, 0.3), transparent 48%),
    linear-gradient(112deg, #10091e 0%, #24113f 56%, #14254a 100%);
}

.banner-slide-gradient {
  background: radial-gradient(circle at 86% 24%, rgba(56, 189, 248, 0.36), transparent 46%),
    radial-gradient(circle at 18% 85%, rgba(16, 185, 129, 0.28), transparent 48%),
    linear-gradient(112deg, #090e1c 0%, #101c38 56%, #132c4e 100%);
}

.banner-mesh-art {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent 15%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

.promo-banner-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.78rem;
  padding: 1.45rem 3.3rem 2.55rem;
  color: #f8fafc;
}

.promo-banner-copy {
  max-width: min(560px, 60%);
}

.promo-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 0.28rem;
}

.promo-heading {
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 2.35vw, 1.72rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 2px 14px rgba(2, 6, 23, 0.55);
  margin: 0 0 0.34rem;
}

.promo-sub {
  font-size: clamp(0.81rem, 1.25vw, 0.91rem);
  color: #e2e8f0;
  line-height: 1.42;
  margin: 0;
  text-shadow: 0 1px 8px rgba(2, 6, 23, 0.5);
}

.promo-banner-cta {
  flex-shrink: 0;
}

.banner-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.24);
  background-color: rgba(9, 13, 22, 0.62);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.banner-nav-btn:hover {
  background-color: rgba(15, 23, 42, 0.88);
}

.banner-nav-btn.is-prev {
  left: 0.65rem;
}

.banner-nav-btn.is-next {
  right: 0.65rem;
}

.banner-controls-bar {
  position: absolute;
  left: 50%;
  bottom: 0.62rem;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: calc(100% - 1.5rem);
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  background-color: rgba(9, 13, 22, 0.58);
  border: 1px solid rgba(248, 250, 252, 0.14);
  backdrop-filter: blur(8px);
}

.banner-dots {
  position: static;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  overflow: hidden;
}

.banner-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background-color: rgba(248, 250, 252, 0.36);
  cursor: pointer;
  flex-shrink: 0;
  transition: width 0.25s var(--ease), background-color 0.25s var(--ease);
}

.banner-dot.is-active {
  width: 18px;
  background-color: #38bdf8;
}

.banner-slide-counter {
  font-size: 0.69rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.88);
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-left: 0.36rem;
  border-left: 1px solid rgba(248, 250, 252, 0.2);
}

/* Catalog Section & Controls */
.catalog-section {
  scroll-margin-top: 5rem;
  padding-top: 0.25rem;
  padding-bottom: 2.5rem;
}

.catalog-top-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.12rem;
}

.section-subtitle {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin: 0;
}

.catalog-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Compact Menu Utilitas Callout Card */
.utilities-callout-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.66rem 0.92rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.13), rgba(14, 165, 233, 0.07));
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 6px 20px -14px rgba(37, 99, 235, 0.38);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.utilities-callout-card[hidden] {
  display: none !important;
}

[data-theme='light'] .utilities-callout-card {
  border-color: rgba(37, 99, 235, 0.26);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.05));
  box-shadow: 0 8px 20px -14px rgba(15, 23, 42, 0.14);
}

.utilities-callout-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px -12px rgba(56, 189, 248, 0.38);
}

.utilities-callout-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 11px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.28));
}

.utilities-callout-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.utilities-callout-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.utilities-callout-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.utilities-callout-sub-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 6px;
  padding: 0.12rem 0.46rem;
  line-height: 1.3;
  white-space: nowrap;
}

[data-theme='light'] .utilities-callout-sub-tag {
  color: #0284c7;
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.24);
}

.utilities-callout-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.utilities-callout-desc[hidden] {
  display: none !important;
}

.utilities-callout-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  padding: 0.42rem 0.78rem;
  border-radius: var(--radius-sm);
  background-color: var(--primary);
  color: var(--primary-ink);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease);
}

.utilities-callout-card:hover .utilities-callout-cta {
  background-color: var(--primary-hover);
}

@media (max-width: 480px) {
  .utilities-callout-card {
    padding: 0.6rem 0.78rem;
    gap: 0.68rem;
  }
  .utilities-callout-icon {
    width: 36px;
    height: 36px;
  }
  .utilities-callout-cta {
    padding: 0.38rem 0.66rem;
    font-size: 0.76rem;
  }
}

.filter-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.filter-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1 1 280px;
  max-width: 440px;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 2.5rem 0 2.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  transition: border-color 0.2s var(--ease);
}

.search-input::placeholder {
  color: var(--ink-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-clear-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-clear-btn[hidden] {
  display: none;
}

.stock-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
}

.stock-filter-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cat-tab.is-tools-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border-color: var(--accent);
  color: var(--ink);
}

.cat-tab:hover {
  background-color: var(--surface-elevated);
  color: var(--ink);
}

.cat-tab.is-active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

/* Codashop-Style Product Tile Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.95rem;
}

.product-tile {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--ink);
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.product-tile:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-card);
}

.product-tile.is-restock {
  opacity: 0.72;
}

.tile-stage {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
  padding: 0.85rem;
}

.tile-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: contain;
  transition: transform 0.2s var(--ease);
}

.product-tile:hover .tile-logo {
  transform: scale(1.05);
}

.tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  padding: 0.78rem 0.65rem 0.88rem;
  width: 100%;
}

.tile-title {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.28;
  color: var(--ink);
  margin-bottom: auto;
}

.tile-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-hover);
  padding-top: 0.2rem;
}

[data-theme='light'] .tile-price {
  color: var(--primary);
}

.tile-kicker {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.tile-kicker.is-hot {
  color: var(--accent);
}

.tile-kicker.is-warn {
  color: var(--warning);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--ink-muted);
}

.empty-state h3 {
  color: var(--ink);
  margin: 0.75rem 0 0.3rem;
}

.empty-state p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

/* FAQ Section */
.faq-section {
  scroll-margin-top: 5rem;
  padding-top: 2.25rem;
  padding-bottom: 3.5rem;
  border-top: 1px solid var(--border);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  min-width: 0;
}

.faq-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-width: 0;
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.faq-trigger span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
}

.faq-panel {
  padding: 0 1.2rem 1.1rem;
  font-size: 0.89rem;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.faq-panel p {
  margin: 0;
  line-height: 1.55;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg-subtle);
  padding: 2.25rem 0 5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand p {
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin: 0.5rem 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.footer-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.footer-link-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

/* Modal (Variant Picker) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 1.4rem;
  box-shadow: var(--shadow-float);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-brand-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-logo {
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.modal-subtitle {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin: 0;
}

.icon-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-notice {
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--ink-secondary);
  margin-bottom: 1rem;
}

.modal-notice.is-warn {
  background-color: var(--warning-soft);
  color: var(--ink);
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.variant-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  transition: border-color 0.2s var(--ease);
}

.variant-card.is-in-cart {
  border-color: var(--primary);
}

.variant-card.is-disabled {
  opacity: 0.6;
}

.variant-name {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.3;
}

.variant-desc {
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin: 0.25rem 0 0;
}

.variant-restock {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--warning);
}

.variant-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.variant-price-stack {
  display: flex;
  flex-direction: column;
}

.variant-old-price {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.variant-price {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.add-variant-btn.is-added {
  border-color: var(--success);
  color: var(--success);
}

.modal-footer {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-hint {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Cart Drawer */
.drawer-root {
  position: fixed;
  inset: 0;
  z-index: 65;
}

.drawer-root[hidden] {
  display: none;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  z-index: 2;
  background-color: var(--surface);
  border-left: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-float);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0;
}

.drawer-sub {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin: 0.1rem 0 0;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.15rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.discount-progress-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
}

.discount-progress-text {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.discount-track {
  height: 7px;
  border-radius: 999px;
  background-color: var(--border);
  overflow: hidden;
}

.discount-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.25s var(--ease);
}

.cart-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-muted);
}

.cart-empty p {
  color: var(--ink);
  font-weight: 600;
  margin: 0.75rem 0 0.25rem;
}

.cart-empty span {
  font-size: 0.85rem;
}

.cart-items-list {
  display: grid;
  gap: 0.65rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
}

.cart-item-logo {
  border-radius: 9px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 700;
}

.cart-item-variant {
  font-size: 0.76rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.qty-value {
  min-width: 22px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.remove-item-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.checkout-form {
  display: grid;
  gap: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.summary-breakdown {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.summary-row.is-discount {
  color: var(--success);
  font-weight: 600;
}

.summary-row.is-fee {
  color: var(--warning);
  font-weight: 600;
}

.summary-row.is-total {
  padding-top: 0.45rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.form-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}

.form-field label,
.field-label {
  font-size: 0.84rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.req {
  color: var(--danger);
}

.form-field input[type='text'] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  color: var(--ink);
  font-size: 0.9rem;
}

.voucher-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.voucher-input-row input[type='text'] {
  flex: 1;
  text-transform: uppercase;
}

.voucher-feedback {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--surface-elevated);
  color: var(--ink-secondary);
}

.voucher-feedback[hidden] {
  display: none;
}

.voucher-feedback.is-applied {
  background-color: var(--success-soft);
  color: var(--success);
}

.voucher-feedback.is-ineligible {
  background-color: var(--warning-soft);
  color: var(--warning);
}

.voucher-feedback.is-pending_admin {
  background-color: var(--accent-soft);
  color: var(--ink);
}

.voucher-feedback.is-invalid,
.voucher-feedback.is-used {
  background-color: var(--danger-soft);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}

.payment-options {
  display: grid;
  gap: 0.5rem;
}

.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  cursor: pointer;
}

.payment-option.is-selected {
  border-color: var(--primary);
}

.payment-option input {
  margin-top: 0.25rem;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.payment-option-body {
  flex: 1;
  min-width: 0;
}

.payment-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.payment-title {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
}

.payment-fee-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background-color: var(--success-soft);
  color: var(--success);
}

.payment-fee-tag.is-surcharge {
  background-color: var(--warning-soft);
  color: var(--warning);
}

.payment-note {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

.pay-later-notice {
  margin-top: 0.35rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--warning-soft);
  border: 1px solid var(--warning);
  font-size: 0.79rem;
  color: var(--ink);
  line-height: 1.45;
  display: grid;
  gap: 0.2rem;
}

.form-error {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background-color: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 600;
}

/* Dedicated Order Confirmation & Receipt Page (order.html) */
.order-page-shell {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

.order-empty-card {
  max-width: 520px;
  margin: 2rem auto;
  padding: 2.25rem 1.5rem;
  border-radius: var(--radius-xl);
  background-color: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-card);
}

.order-empty-card h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0;
}

.order-empty-card p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
}

.order-page-stack {
  max-width: 680px;
  margin-inline: auto;
  display: grid;
  gap: 1.15rem;
}

.order-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.25rem;
  align-items: start;
}

.order-summary-col,
.order-receipt-col {
  display: grid;
  gap: 1rem;
}

.order-panel-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: grid;
  gap: 0.95rem;
  box-shadow: var(--shadow-card);
}

.order-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.order-eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--success);
  margin: 0 0 0.15rem;
}

.order-page-title {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 700;
  margin: 0;
}

.order-size-tag {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 7px;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
}

.order-lead {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  margin: 0;
}

.order-actions-stack {
  display: grid;
  gap: 0.6rem;
}

.order-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.order-tip {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.45;
}

.order-subhead {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.order-meta-list {
  display: grid;
  gap: 0.45rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.order-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
}

.order-meta-row span {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.order-meta-row strong {
  text-align: right;
}

.order-meta-row strong.is-warn-text {
  color: var(--warning);
}

.order-items-summary {
  display: grid;
  gap: 0.55rem;
}

.order-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.order-item-title {
  font-weight: 600;
}

.order-item-sub {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.order-receipt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.order-receipt-hint {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.receipt-preview-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background-color: #ffffff;
}

.receipt-loading {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #475569;
}

.receipt-preview-img {
  width: 100%;
  height: auto;
  display: block;
}

/* PWA Inline Strip & Floating Minimized Dock */
.pwa-banner-root {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding: 0.9rem 1.25rem 0;
}

.pwa-banner-root[hidden] {
  display: none;
}

.pwa-card {
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 0.95rem 1.15rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pwa-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.pwa-card-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pwa-card-icon {
  border-radius: 10px;
  flex-shrink: 0;
}

.pwa-card-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  margin: 0 0 0.1rem;
}

.pwa-card-desc {
  font-size: 0.81rem;
  color: var(--ink-muted);
  margin: 0;
}

.pwa-window-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.pwa-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pwa-icon-btn:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.pwa-guide-box {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.pwa-feedback {
  margin: 0;
  font-size: 0.8rem;
  color: var(--warning);
}

.pwa-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pwa-minimized-dock {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 48;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.pwa-mini-restore {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 40px;
  padding: 0 0.9rem;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.pwa-mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background-color: var(--accent);
}

.pwa-mini-close {
  width: 36px;
  height: 40px;
  border: none;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Mobile Floating Cart Bar */
.mobile-cart-bar {
  display: none;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 80;
  width: max-content;
  max-width: calc(100vw - 2rem);
  text-align: center;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-sm);
  background-color: var(--ink);
  color: var(--bg);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-float);
}

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

/* Admin Preview Bar on Storefront */
.admin-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background-color: var(--accent-soft);
  border-bottom: 1px solid var(--accent);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.admin-preview-bar[hidden] {
  display: none;
}

.admin-preview-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-link-btn {
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* Static Admin Panel */
.admin-shell {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-shell .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

.admin-lock-card {
  max-width: 680px;
  width: 100%;
  margin-inline: auto;
  min-width: 0;
  box-sizing: border-box;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.admin-dashboard[hidden] {
  display: none;
}

.token-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.token-input-row input {
  flex: 1;
  min-width: 0;
  text-transform: none;
}

.admin-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.admin-card-head > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 100%;
}

.admin-title,
.admin-section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.admin-subhead {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin: 0.5rem 0 0;
}

.admin-subtitle {
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-subtitle code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  box-sizing: border-box;
}

.admin-badge.is-ok {
  background-color: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

.admin-badge.is-warn {
  background-color: var(--warning-soft);
  border-color: var(--warning);
  color: var(--warning);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.admin-form-grid > * {
  min-width: 0;
  max-width: 100%;
}

.admin-shell input[type='text'],
.admin-shell input[type='number'],
.admin-shell input[type='password'],
.admin-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
}

.admin-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.admin-status-box {
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

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

.admin-status-box.is-ok {
  background-color: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

.admin-status-box.is-error {
  background-color: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.admin-status-box.is-info {
  background-color: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.admin-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.admin-panel[hidden] {
  display: none;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.admin-toolbar .search-box {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
}

.admin-product-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.admin-product-card {
  --card-accent: #6366f1;
  --card-tint: rgba(99, 102, 241, 0.08);
  background: linear-gradient(155deg, var(--card-tint) 0%, var(--surface) 44%);
  border: 1px solid color-mix(in srgb, var(--card-accent) 34%, var(--border));
  border-left: 5px solid var(--card-accent);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.95rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: var(--shadow-card);
}

.admin-product-card[data-card-tone='0'] {
  --card-accent: #6366f1;
  --card-tint: rgba(99, 102, 241, 0.11);
}

.admin-product-card[data-card-tone='1'] {
  --card-accent: #10b981;
  --card-tint: rgba(16, 185, 129, 0.11);
}

.admin-product-card[data-card-tone='2'] {
  --card-accent: #06b6d4;
  --card-tint: rgba(6, 182, 212, 0.11);
}

.admin-product-card[data-card-tone='3'] {
  --card-accent: #f59e0b;
  --card-tint: rgba(245, 158, 11, 0.11);
}

.admin-product-card[data-card-tone='4'] {
  --card-accent: #f43f5e;
  --card-tint: rgba(244, 63, 94, 0.11);
}

.admin-product-card[data-card-tone='5'] {
  --card-accent: #a855f7;
  --card-tint: rgba(168, 85, 247, 0.11);
}

.admin-product-card .admin-order-badge {
  border-color: var(--card-accent);
  background-color: var(--card-tint);
}

.admin-prod-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.admin-prod-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.admin-prod-title-wrap {
  min-width: 0;
}

.admin-prod-name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-prod-meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.admin-prod-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.admin-prod-action-pair {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.is-danger-confirm {
  border-color: var(--danger);
  color: var(--danger);
  background-color: var(--danger-soft);
}

.admin-prod-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.admin-variant-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  min-width: 0;
  max-width: 100%;
}

.admin-variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
}

.admin-variant-row.is-restock {
  opacity: 0.75;
}

.admin-var-fields {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem;
  min-width: 0;
  max-width: 100%;
}

.admin-var-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.2rem;
  min-width: 0;
}

.admin-add-variant-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  gap: 0.6rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border);
  min-width: 0;
  max-width: 100%;
}

.admin-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.admin-voucher-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
}

.admin-voucher-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
}

.admin-voucher-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 220px;
}

.admin-voucher-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.admin-voucher-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.admin-voucher-mode-select {
  width: auto;
  min-width: 140px;
  height: 38px;
  font-size: 0.8rem;
}

.admin-voucher-max-input {
  width: 78px;
  height: 38px;
  padding: 0 0.55rem;
  font-size: 0.82rem;
}

/* Admin Reorder + Mobile-Ready Logo Manager */
.admin-shell input[type='search'] {
  width: 100%;
}

.admin-order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 0.5rem;
  border-radius: 8px;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}

.admin-order-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.admin-order-btn {
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.admin-shell .admin-order-select {
  width: auto;
  min-width: 104px;
  height: 36px;
  padding: 0 0.6rem;
  font-size: 0.8rem;
}

.admin-sum-field {
  grid-column: span 2;
}

.admin-logo-manager {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-logo-manager-full {
  grid-column: 1 / -1;
}

.admin-logo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.admin-logo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 1 1 220px;
}

.admin-logo-preview-wrap > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 0;
}

.admin-logo-title {
  font-size: 0.86rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-logo-thumb {
  background-color: var(--surface);
  object-fit: contain;
  flex-shrink: 0;
}

.admin-logo-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  border: 1px solid var(--border);
  max-width: 100%;
}

.admin-logo-mode-btn {
  min-height: 36px;
  padding: 0.35rem 0.78rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.admin-logo-mode-btn.is-active {
  background-color: var(--primary);
  color: var(--primary-ink);
}

.admin-logo-pane {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  min-width: 0;
}

.admin-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
}

.admin-file-row .admin-prod-meta {
  min-width: 0;
  flex: 1 1 200px;
  overflow-wrap: anywhere;
}

.admin-file-trigger {
  min-height: 44px;
  max-width: 100%;
  cursor: pointer;
}

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

.admin-logo-link-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 0.7rem;
  min-width: 0;
  max-width: 100%;
}

/* Dedicated Menu Utilitas Page & Hub */
.tools-page-shell {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
  display: grid;
  gap: 1.25rem;
}

.tools-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.tools-hub {
  display: grid;
  gap: 1.15rem;
  min-width: 0;
}

.tools-subnav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.tools-subtab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.tools-subtab-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
}

.tools-subtab:hover {
  background-color: var(--surface-elevated);
  color: var(--ink);
  transform: translateY(-1px);
}

.tools-subtab.is-active {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.tool-location-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  background-color: var(--surface);
  border: 1px solid var(--border);
}

.tool-loc-info {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.tool-loc-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.94rem;
}

.tool-loc-meta {
  font-size: 0.79rem;
  color: var(--ink-muted);
}

.tool-city-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.tool-search-box {
  max-width: 560px;
}

.tool-city-results {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.7rem;
  border-radius: var(--radius-md);
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
}

.tool-city-option {
  min-height: 38px;
  padding: 0.42rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  cursor: pointer;
}

.tool-city-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.tool-city-option:hover {
  border-color: var(--primary);
}

.tool-loading-box {
  padding: 2rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background-color: var(--surface);
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.tool-kicker {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.tool-subhead {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0;
}

.tool-hint {
  font-size: 0.81rem;
  color: var(--ink-muted);
  margin: 0.15rem 0 0;
}

/* Jadwal Sholat */
.prayer-hero-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(125deg, var(--surface) 0%, var(--surface-elevated) 100%);
  box-shadow: var(--shadow-card);
}

.prayer-next-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-weight: 800;
  margin: 0.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
}

.prayer-date-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.prayer-countdown-box {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg);
  border: 1px solid var(--border-strong);
  text-align: right;
  min-width: 170px;
}

.prayer-countdown-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.prayer-countdown-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent);
}

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.prayer-slot-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
}

.prayer-slot-card.is-next {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.prayer-slot-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.prayer-slot-time {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

/* Prakiraan Cuaca */
.weather-hero-card {
  display: grid;
  gap: 1.1rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(125deg, var(--surface) 0%, var(--surface-elevated) 100%);
  box-shadow: var(--shadow-card);
}

.weather-hero-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.weather-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background-color: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.weather-temp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem;
  margin-top: 0.2rem;
}

.weather-temp-big {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
}

.weather-condition {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.weather-sub {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.weather-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.weather-metric {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  border: 1px solid var(--border);
}

.weather-metric span {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.weather-metric strong {
  font-size: 1rem;
}

.weather-block {
  display: grid;
  gap: 0.65rem;
}

.weather-hourly-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(86px, 1fr);
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.weather-hour-card {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  text-align: center;
}

.weather-hour-time {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.weather-hour-icon {
  color: var(--accent);
}

.weather-hour-icon svg {
  width: 24px;
  height: 24px;
}

.weather-hour-temp {
  font-size: 0.95rem;
}

.weather-hour-rain {
  font-size: 0.73rem;
  color: var(--accent);
}

.weather-daily-list {
  display: grid;
  gap: 0.5rem;
}

.weather-daily-row {
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  font-size: 0.86rem;
}

.weather-daily-day {
  font-weight: 700;
}

.weather-daily-cond {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-secondary);
}

.weather-daily-cond svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.weather-daily-rain {
  font-size: 0.78rem;
  color: var(--accent);
}

.weather-daily-temps {
  text-align: right;
}

/* Jam Dunia & Bola Dunia Interaktif */
.world-master-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.world-clock-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
}

.world-clock-card.is-utc {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.world-clock-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
}

.world-clock-digits {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 700;
  color: var(--ink);
}

.world-clock-sub {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.world-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.globe-card,
.converter-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--surface);
  min-width: 0;
}

.globe-card-head,
.converter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.globe-toolbar {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.globe-canvas-wrap {
  display: grid;
  place-items: center;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  background-color: var(--bg);
  border: 1px solid var(--border);
}

.world-globe-canvas {
  display: block;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  height: auto;
  cursor: grab;
  touch-action: none;
}

.world-globe-canvas:active {
  cursor: grabbing;
}

.globe-target-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-md);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-strong);
}

.globe-target-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-top: 0.1rem;
}

.globe-search-input {
  padding-left: 0.9rem;
}

.world-quick-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.world-quick-countries .cat-tab {
  height: 34px;
  padding: 0 0.72rem;
  font-size: 0.79rem;
}

.world-country-select-row {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.converter-inputs-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 1fr;
  gap: 0.65rem;
}

.tool-native-input,
.world-country-select-row .admin-select,
.converter-inputs-grid .admin-select {
  width: 100%;
  height: 42px;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.86rem;
}

.converter-results-list {
  display: grid;
  gap: 0.5rem;
}

.converter-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
}

.converter-result-row.is-highlight {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.conv-zone-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
}

.conv-zone-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.conv-time-col {
  display: grid;
  justify-items: end;
  flex-shrink: 0;
}

.conv-time-col strong {
  font-size: 1.1rem;
}

.conv-time-col span {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* Speedtest Internet Workspace */
.speedtest-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 1rem;
  align-items: start;
}

.speed-gauge-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.speed-gauge-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.speed-phase-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-secondary);
  padding: 0.28rem 0.65rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  white-space: nowrap;
}

.speed-phase-text.is-running {
  border-color: var(--accent);
  color: var(--accent);
}

.speed-canvas-wrap {
  display: grid;
  place-items: center;
  padding: 0.45rem;
  border-radius: var(--radius-md);
  background-color: var(--bg);
  border: 1px solid var(--border);
}

.speedtest-gauge-canvas {
  display: block;
  width: 100%;
  max-width: 340px;
  height: 245px;
}

.speed-progress-track {
  height: 7px;
  border-radius: 999px;
  background-color: var(--border);
  overflow: hidden;
}

.speed-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.2s var(--ease);
}

.speed-wave-strip {
  display: grid;
  grid-template-columns: repeat(28, minmax(0, 1fr));
  align-items: end;
  gap: 3px;
  height: 36px;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  border: 1px solid var(--border);
}

.speed-wave-bar {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 3px;
  background-color: var(--border-strong);
  transition: height 0.16s var(--ease);
}

.speed-wave-bar.is-live {
  background-color: var(--accent);
}

.speed-cta-row {
  margin-top: 0.1rem;
}

.speed-details-col {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.speed-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.speed-kpi-card {
  display: grid;
  gap: 0.18rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  min-width: 0;
}

.speed-kpi-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.speed-kpi-val {
  font-size: clamp(1.32rem, 2.4vw, 1.75rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}

.speed-kpi-val small {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.speed-kpi-sub {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.speed-quality-card,
.speed-meta-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.05rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  min-width: 0;
}

.speed-quality-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.86rem;
}

.speed-quality-head strong {
  color: var(--accent);
}

.speed-suit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.speed-suit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  font-size: 0.8rem;
}

.speed-suit-item.is-ok strong {
  color: var(--success);
}

.speed-suit-item.is-limit strong {
  color: var(--warning);
}

.speed-meta-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  margin: 0;
}

.speed-meta-list {
  display: grid;
  gap: 0.45rem;
}

.speed-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.speed-meta-row:first-child {
  border-top: none;
  padding-top: 0;
}

.speed-meta-row span {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.speed-meta-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

/* Social Video Downloader No Watermark */
.dl-hero-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: grid;
  gap: 0.95rem;
  min-width: 0;
  box-shadow: var(--shadow-card);
}

.dl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.dl-platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dl-plat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  color: var(--ink-secondary);
  font-size: 0.76rem;
  font-weight: 600;
}

.dl-plat-pill.is-detected {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  color: var(--accent);
}

.dl-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
}

.dl-url-box {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.dl-form-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dl-result-card {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.15rem;
  min-width: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
}

.dl-result-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #090d16;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  min-height: 180px;
  min-width: 0;
}

.dl-video-preview,
.dl-thumb-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

.dl-thumb-fallback {
  padding: 2rem 1rem;
  font-size: 0.84rem;
  color: #cbd5e1;
  font-weight: 600;
}

.dl-result-info {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  min-width: 0;
}

.dl-result-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.dl-dur-pill {
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.dl-result-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dl-result-author {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.dl-audio-wrap {
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
}

.dl-audio-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.dl-audio-preview {
  width: 100%;
  height: 36px;
}

.dl-links-grid {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.dl-save-btn {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  white-space: normal;
  text-align: left;
  height: auto;
  min-height: 44px;
}

.dl-quality-tag {
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Responsive Breakpoints */
@media (max-width: 1180px) {
  .header-inner {
    padding-inline: 0.9rem;
    gap: 0.35rem;
  }
  .brand-link {
    gap: 0.5rem;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .header-nav {
    gap: 0.08rem;
    margin-inline: 0.15rem;
  }
  .header-nav-link {
    height: 32px;
    padding: 0 0.36rem;
    font-size: 0.74rem;
  }
  .header-actions {
    gap: 0.3rem;
  }
  .header-btn {
    padding: 0 0.52rem;
    font-size: 0.77rem;
  }
  #header-install-btn .hide-xs {
    display: none;
  }
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .header-nav {
    display: none;
  }
}

@media (max-width: 900px) {
  .order-page-grid,
  .world-workspace-grid,
  .speedtest-workspace {
    grid-template-columns: 1fr;
  }
  .prayer-grid,
  .world-master-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-form-grid,
  .admin-prod-meta-grid,
  .admin-var-fields,
  .admin-logo-link-grid,
  .converter-inputs-grid {
    grid-template-columns: 1fr;
  }
  .admin-sum-field {
    grid-column: span 1;
  }
  .admin-variant-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tools-subnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .tools-subtab:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .weather-daily-row {
    grid-template-columns: 88px 1fr;
    gap: 0.35rem 0.75rem;
  }
  .weather-daily-temps {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .hide-xs {
    display: none;
  }
  .header-inner {
    min-height: 3.65rem;
  }
  .header-btn {
    padding: 0 0.65rem;
    height: 36px;
  }
  .promo-banner-frame,
  .promo-banner-frame.banner-slide {
    min-height: 192px;
  }
  .promo-banner-img {
    object-position: 82% center;
  }
  .promo-banner-scrim {
    background: linear-gradient(95deg, rgba(7, 11, 22, 0.94) 0%, rgba(10, 17, 36, 0.84) 56%, rgba(10, 17, 36, 0.36) 82%, rgba(10, 17, 36, 0.12) 100%);
  }
  .promo-banner-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.05rem 2.6rem 2.55rem;
    gap: 0.6rem;
  }
  .promo-banner-copy {
    max-width: 78%;
  }
  .promo-sub {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .banner-nav-btn {
    width: 30px;
    height: 30px;
  }
  .banner-nav-btn.is-prev {
    left: 0.35rem;
  }
  .banner-nav-btn.is-next {
    right: 0.35rem;
  }
  .banner-controls-bar {
    gap: 0.4rem;
    padding: 0.2rem 0.48rem;
  }
  .banner-dot {
    width: 5px;
    height: 5px;
  }
  .banner-dot.is-active {
    width: 14px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
  }
  .tile-stage {
    aspect-ratio: 16 / 9;
    padding: 0.65rem;
  }
  .tile-logo {
    width: 50px;
    height: 50px;
  }
  .tile-body {
    padding: 0.65rem 0.5rem 0.75rem;
  }
  .tile-title {
    font-size: 0.88rem;
  }
  .variant-grid {
    grid-template-columns: 1fr;
  }
  .faq-trigger {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
  }
  .faq-panel {
    padding: 0 1rem 0.95rem;
    font-size: 0.85rem;
  }
  .tools-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .tools-subnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .tools-subtab {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.42rem;
    min-height: 76px;
    padding: 0.65rem 0.75rem;
    font-size: 0.81rem;
    line-height: 1.25;
  }
  .tools-subtab:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    min-height: 56px;
  }
  .tools-subtab-icon {
    width: 32px;
    height: 32px;
  }
  .dl-input-row,
  .dl-result-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .dl-form-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
  }
  .dl-form-actions > #dl-clear-btn {
    grid-column: 1 / -1;
  }
  .admin-card {
    padding: 1rem;
  }
  .admin-action-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  #unlock-vault-form .admin-action-bar,
  #setup-vault-form .admin-action-bar {
    grid-template-columns: 1fr;
  }
  .admin-action-bar > .btn-primary {
    grid-column: 1 / -1;
  }
  .admin-action-bar > .btn {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 44px;
    justify-content: center;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.25;
    font-size: 0.79rem;
    padding: 0.5rem 0.65rem;
  }
  .admin-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }
  .admin-tabs .cat-tab {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 42px;
    text-align: center;
    justify-content: center;
    white-space: normal;
    line-height: 1.25;
    padding: 0.45rem 0.6rem;
    font-size: 0.81rem;
  }
  .admin-add-variant-row {
    grid-template-columns: 1fr;
  }
  .admin-product-card {
    padding: 0.95rem;
  }
  .admin-prod-head {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-prod-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .admin-order-controls {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    width: 100%;
    gap: 0.4rem;
  }
  .admin-prod-action-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.45rem;
  }
  .admin-prod-action-pair .btn {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 40px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
    justify-content: center;
    padding: 0.45rem 0.6rem;
  }
  .admin-logo-head {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-logo-preview-wrap {
    flex: 0 0 auto;
  }
  .admin-logo-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .admin-var-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--border);
  }
  .admin-history-row {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-history-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
  }
  .admin-history-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .admin-history-actions .btn,
  .admin-history-toolbar .btn {
    min-width: 0;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
    height: auto;
    min-height: 40px;
  }
  .site-footer {
    padding-bottom: 4.25rem;
  }
  .weather-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .speed-suit-grid {
    grid-template-columns: 1fr;
  }
  .speedtest-gauge-canvas {
    height: 225px;
  }
  .speed-meta-row {
    flex-direction: column;
    gap: 0.15rem;
  }
  .speed-meta-row strong {
    text-align: left;
  }
  .prayer-countdown-box {
    width: 100%;
    text-align: left;
  }
  .pwa-minimized-dock {
    right: 1rem;
    bottom: 4.85rem;
  }
  .mobile-cart-bar:not([hidden]) {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 0.85rem;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-md);
    background-color: var(--primary);
    color: var(--primary-ink);
    box-shadow: var(--shadow-float);
  }
  .mobile-cart-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.82rem;
  }
  .mobile-cart-meta strong {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Admin Real-time Publish Progress Bar & History Panel */
.admin-progress-box {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
}

.admin-progress-box[hidden] {
  display: none;
}

.admin-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.admin-progress-label {
  font-weight: 600;
  color: var(--ink);
}

.admin-progress-pct {
  font-size: 0.85rem;
  color: var(--accent);
}

.admin-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.admin-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, #06b6d4 55%, #10b981 100%);
  transition: width 0.18s ease-out;
}

.admin-history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.admin-history-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  min-width: 0;
  max-width: 100%;
}

.admin-history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
}

.admin-history-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 240px;
}

.admin-history-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.admin-history-latest {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background-color: var(--accent-soft);
  color: var(--accent);
}

.admin-history-summary {
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-history-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

/* Floating Non-Intrusive Ad-Free Music Dock & Popover (Draggable) */
.music-widget-root {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 46;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  pointer-events: none;
}

.music-widget-root.is-custom-pos {
  width: 44px;
  height: 44px;
  display: block;
}

.music-widget-root.is-custom-pos .music-popover {
  position: absolute;
}

.music-widget-root.is-custom-pos[data-v-anchor='open-up'] .music-popover {
  bottom: calc(100% + 0.6rem);
  top: auto;
}

.music-widget-root.is-custom-pos[data-v-anchor='open-down'] .music-popover {
  top: calc(100% + 0.6rem);
  bottom: auto;
}

.music-widget-root.is-custom-pos[data-h-anchor] .music-popover {
  left: var(--music-pop-offset-x, 0px);
  right: auto;
}

.music-widget-root > * {
  pointer-events: auto;
}

@media (max-width: 640px) {
  .music-widget-root {
    left: 0.75rem;
    bottom: 0.75rem;
  }
  .music-widget-root.is-custom-pos {
    width: 40px;
    height: 40px;
  }
  .music-widget-root.is-above-mobile-cart {
    bottom: 5.15rem;
  }
  .music-fab-btn {
    width: 40px;
    height: 40px;
    opacity: 0.94;
  }
}

/* Hidden YT Music IFrame Engine (inside viewport margins so Chrome never throttles playback) */
.yt-music-engine-shell {
  position: fixed;
  right: 6px;
  bottom: 6px;
  width: 24px;
  height: 24px;
  opacity: 0.004;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.music-fab-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.music-fab-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.music-fab-btn.is-dragging,
.music-fab-btn:active {
  cursor: grabbing;
  transform: scale(1.08);
}

.music-head-btns {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.music-icon-mini-btn,
.music-reset-pos-btn,
.music-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.music-icon-mini-btn:hover,
.music-close-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.music-icon-mini-btn.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-elevated));
}

.music-drag-tip {
  font-size: 0.7rem;
  color: var(--ink-muted);
  text-align: center;
}

.music-fab-btn.is-playing {
  background: linear-gradient(135deg, #06b6d4 0%, #6366f1 55%, #ec4899 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.42), 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.music-fab-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.music-fab-btn.is-playing .music-fab-eq {
  display: inline-flex;
}

.music-fab-btn.is-playing .music-fab-note {
  display: none;
}

.music-fab-eq span {
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  animation: musicBarBounce 0.9s infinite ease-in-out;
}

.music-fab-eq span:nth-child(1) {
  height: 7px;
  animation-delay: 0s;
}

.music-fab-eq span:nth-child(2) {
  height: 13px;
  animation-delay: 0.2s;
}

.music-fab-eq span:nth-child(3) {
  height: 9px;
  animation-delay: 0.4s;
}

@keyframes musicBarBounce {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1.1); }
}

.music-popover {
  width: min(314px, calc(100vw - 2rem));
  padding: 0.92rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--border-strong) 82%, rgba(99, 102, 241, 0.35));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink);
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.34);
  display: grid;
  gap: 0.62rem;
}

.music-popover[hidden] {
  display: none;
}

.music-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.music-pop-track {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.music-art-wrap {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}

.music-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.music-meta {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.music-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  font-size: 0.73rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-status-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.71rem;
}

.music-source-tag {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.music-time {
  color: var(--ink-muted);
}

.music-progress-row {
  display: flex;
  align-items: center;
}

.music-seek-slider {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  height: 5px;
}

.music-modern-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.42rem;
}

.music-ctrl-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), transform 0.15s var(--ease), color 0.18s var(--ease);
}

.music-ctrl-icon-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.music-ctrl-icon-btn.is-muted {
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 45%, var(--border));
}

.music-ctrl-primary-btn {
  height: 34px;
  padding: 0 0.75rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}

.music-ctrl-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.36);
}

.music-search-row {
  display: flex;
  gap: 0.4rem;
}

.music-search-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  color: var(--ink);
  font-size: 0.78rem;
}

.music-search-submit-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.music-search-note {
  font-size: 0.74rem;
  color: var(--warning);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  background-color: var(--warning-soft);
}

.music-search-results {
  display: grid;
  gap: 0.3rem;
  max-height: 142px;
  overflow-y: auto;
}

.music-search-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.38rem 0.58rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  color: var(--ink);
  font-size: 0.74rem;
  text-align: left;
  cursor: pointer;
}

.music-search-hit.is-active {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.music-search-hit-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-search-hit-dur {
  color: var(--ink-muted);
  font-size: 0.69rem;
  flex-shrink: 0;
}

.music-pop-footer {
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.music-open-hub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.music-open-hub-link:hover {
  text-decoration: underline;
}

/* Complete YT Music Hub inside Menu Utilitas (tools.html?tab=music) */
.music-hub-panel {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.music-hub-hero-card,
.music-hub-browser-wrap {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.music-hub-stage-wrap {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.music-hub-hero-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}

.music-hub-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}

.music-hub-hero-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.music-hub-hero-sub {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.music-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 1rem;
  align-items: start;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.music-hub-stage-card {
  display: grid;
  gap: 1rem;
}

.music-hub-now-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.music-hub-art-box {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 2.4rem;
}

.music-hub-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.music-hub-eq-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: none;
  align-items: flex-end;
  gap: 2.5px;
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(9, 13, 22, 0.74);
  backdrop-filter: blur(6px);
}

.music-hub-art-box.is-playing .music-hub-eq-badge {
  display: inline-flex;
}

.music-hub-eq-badge span {
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: #38bdf8;
  animation: musicBarBounce 0.85s infinite ease-in-out;
}

.music-hub-eq-badge span:nth-child(2) { animation-delay: 0.15s; height: 15px; }
.music-hub-eq-badge span:nth-child(3) { animation-delay: 0.3s; height: 9px; }
.music-hub-eq-badge span:nth-child(4) { animation-delay: 0.45s; height: 13px; }

.music-hub-now-meta {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.music-hub-kicker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.music-hub-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.music-hub-status-dot {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.music-hub-status-dot.is-live {
  color: var(--success);
}

.music-hub-track-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.2vw, 1.42rem);
  line-height: 1.25;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.music-hub-track-artist {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.music-hub-genre-inline {
  color: var(--ink-muted);
}

.music-hub-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.music-hub-info-cell {
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.music-hub-info-cell span {
  font-size: 0.69rem;
  color: var(--ink-muted);
}

.music-hub-info-cell strong {
  font-size: 0.79rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-hub-ext-link {
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.music-hub-ext-link:hover {
  text-decoration: underline;
}

.music-hub-timeline {
  display: grid;
  gap: 0.32rem;
}

.music-hub-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.music-hub-seek-slider,
.music-hub-volume-slider {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.music-hub-deck-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.music-hub-play-btn {
  flex: 1 1 130px;
  justify-content: center;
  min-height: 40px;
}

.music-hub-mode-btn.is-active {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  color: var(--accent);
}

.music-hub-volume-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.music-hub-mute-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.music-hub-volume-slider {
  flex: 1 1 110px;
  max-width: 180px;
}

.music-hub-vol-pct {
  font-size: 0.76rem;
  color: var(--ink-muted);
  min-width: 38px;
}

.music-hub-random-btn {
  margin-left: auto;
}

.music-hub-browser-wrap {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.music-hub-queue-wrap {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.music-hub-search-form {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.music-hub-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.music-hub-search-input-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.music-hub-search-input {
  width: 100%;
  height: 40px;
  padding: 0 0.85rem 0 2.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  color: var(--ink);
  font-size: 0.86rem;
  box-sizing: border-box;
}

.music-hub-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}

.music-hub-preset-btn {
  padding: 0.38rem 0.75rem;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.music-hub-preset-btn.is-active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.music-hub-queue-inner {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}

.music-hub-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.music-hub-tracklist {
  display: grid;
  gap: 0.42rem;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.music-hub-row {
  display: grid;
  grid-template-columns: 22px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.48rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.music-hub-row:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-elevated);
}

.music-hub-row.is-active {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.music-hub-row-num {
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-align: center;
}

.music-hub-row.is-active .music-hub-row-num {
  color: var(--accent);
  font-weight: 700;
}

.music-hub-row-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.music-hub-row-info {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.music-hub-row-title {
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-hub-row-sub {
  font-size: 0.74rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-hub-row-dur {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.music-hub-empty {
  padding: 1.25rem 0.9rem;
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-muted);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 920px) {
  .music-hub-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .music-hub-now-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .music-hub-art-box {
    width: 96px;
    height: 96px;
  }
  .music-hub-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .music-hub-random-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
  .music-hub-search-form {
    flex-wrap: wrap;
  }
  .music-hub-search-input-wrap {
    flex: 1 1 100%;
  }
}

/* Footer Social Media Icons */
.footer-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
}

.footer-social-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Admin Categories, Brand, Socials, FAQ & Itemized History Logs */
.admin-textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 76px;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
}

.admin-category-list,
.admin-social-list,
.admin-faq-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.admin-category-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
}

.admin-category-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  flex: 1 1 260px;
  min-width: 0;
  max-width: 100%;
}

.admin-category-fields .form-field {
  flex: 1 1 200px;
  min-width: 0;
}

.admin-category-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
  min-width: 0;
  max-width: 100%;
}

.admin-category-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.admin-social-card,
.admin-faq-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-social-top,
.admin-faq-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
}

.admin-social-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 1 1 220px;
  max-width: 100%;
}

.admin-social-brand > div {
  min-width: 0;
  flex: 1 1 0;
  max-width: 100%;
}

.admin-social-title {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-history-details-list {
  margin: 0.25rem 0 0.35rem;
  padding: 0.6rem 0.85rem 0.6rem 1.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.28rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  min-width: 0;
  max-width: 100%;
}

.admin-history-detail-item {
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Scrim for Compressor Banner & Custom Gradients */
.promo-banner-scrim.scrim-compressor,
.banner-slide-compressor {
  background: linear-gradient(120deg, rgba(6, 78, 59, 0.92) 0%, rgba(15, 118, 110, 0.84) 52%, rgba(30, 58, 138, 0.82) 100%);
}

/* Admin OpenGraph Social Share Card Preview */
.admin-og-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  align-items: center;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-og-preview-media,
.admin-og-preview-img-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1200 / 630;
  background-color: #090d16;
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
}

.admin-og-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-og-preview-badge {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: rgba(9, 13, 22, 0.82);
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 700;
}

.admin-og-preview-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem;
  min-width: 0;
}

.admin-og-preview-domain {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.admin-og-preview-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.admin-og-preview-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Admin Multi-Banner Manager */
.admin-banner-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  min-width: 0;
  max-width: 100%;
}

.admin-banner-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-banner-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  min-width: 0;
  max-width: 100%;
}

.admin-banner-visual-preview,
.admin-banner-preview-mini {
  position: relative;
  min-height: 132px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: linear-gradient(112deg, #090e1c 0%, #101c38 56%, #132c4e 100%);
  display: flex;
  align-items: flex-end;
  min-width: 0;
  max-width: 100%;
}

.admin-banner-preview-mini::after,
.admin-banner-visual-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 13, 22, 0.24) 0%, rgba(9, 13, 22, 0.82) 100%);
  pointer-events: none;
}

.admin-banner-preview-mini.is-emerald::after {
  background: linear-gradient(120deg, rgba(6, 78, 59, 0.42) 0%, rgba(4, 47, 46, 0.88) 100%);
}

.admin-banner-preview-mini.is-sky::after {
  background: linear-gradient(120deg, rgba(12, 74, 110, 0.4) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.admin-banner-preview-mini.is-indigo::after {
  background: linear-gradient(120deg, rgba(49, 46, 129, 0.44) 0%, rgba(17, 24, 39, 0.88) 100%);
}

.admin-banner-preview-mini.is-cyan::after {
  background: linear-gradient(120deg, rgba(22, 78, 99, 0.42) 0%, rgba(9, 13, 22, 0.88) 100%);
}

.admin-banner-preview-mini.is-violet::after {
  background: linear-gradient(120deg, rgba(88, 28, 135, 0.44) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.admin-banner-preview-grad {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 86% 24%, rgba(56, 189, 248, 0.36), transparent 46%),
    radial-gradient(circle at 18% 85%, rgba(16, 185, 129, 0.28), transparent 48%),
    linear-gradient(112deg, #090e1c 0%, #101c38 56%, #132c4e 100%);
}

.admin-banner-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-banner-preview-overlay {
  position: relative;
  z-index: 2;
  padding: 0.9rem 1rem;
  color: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.22rem;
  width: 100%;
  max-width: 680px;
  min-width: 0;
}

.admin-banner-preview-overlay .admin-order-badge {
  justify-self: start;
  background-color: rgba(15, 23, 42, 0.78);
  border-color: rgba(255, 255, 255, 0.28);
  color: #f8fafc;
}

.admin-banner-preview-overlay strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.3;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  overflow-wrap: anywhere;
}

.admin-banner-preview-overlay small,
.admin-banner-preview-overlay p {
  margin: 0;
  font-size: 0.79rem;
  color: rgba(248, 250, 252, 0.9);
  overflow-wrap: anywhere;
}

/* Weather High-Accuracy 4-KPI & Calibration Bar */
.weather-metrics-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.weather-calibration-bar {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-md);
  background-color: var(--bg);
  border: 1px solid var(--border-strong);
}

.weather-cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}

.weather-cal-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}

.weather-cal-hint {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.weather-cal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.weather-cal-pill {
  min-height: 34px;
  padding: 0.3rem 0.72rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--ease);
}

.weather-cal-pill:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.weather-cal-pill.is-active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Downloader Feature Chips, Caption Box & Multi-Photo Carousel Grid */
.dl-feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dl-feature-chip {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.24rem 0.6rem;
  border-radius: 7px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
}

.dl-caption-box {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
}

.dl-caption-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.dl-caption-text {
  margin: 0;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow-y: auto;
}

.dl-photo-gallery {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
}

.dl-photo-gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.84rem;
}

.dl-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.6rem;
}

.dl-photo-item {
  display: grid;
  gap: 0.4rem;
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
}

.dl-photo-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background-color: #090d16;
}

.dl-photo-save-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.75rem;
}

.dl-progress-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.95rem 1.05rem;
  scroll-margin-top: 88px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
}

.dl-progress-card.is-download {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border-strong));
  background-color: var(--surface-elevated);
}

.dl-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}

.dl-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.dl-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, #6366f1 100%);
  transition: width 0.28s var(--ease);
}

.dl-progress-fill.is-download {
  background: linear-gradient(90deg, #10b981 0%, var(--primary) 100%);
}

.dl-progress-sub {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

/* HD Zero-Loss Media Compressor */
.compressor-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.05rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.compressor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.compressor-head > div {
  min-width: 0;
  max-width: 100%;
}

.comp-section-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.comp-block-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.comp-config-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.95rem;
  min-width: 0;
  max-width: 100%;
}

.comp-dropdowns-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.comp-dd-wrapper {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.comp-dd-trigger {
  width: 100%;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background-color: var(--surface-elevated);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.comp-dd-trigger:hover {
  border-color: var(--accent);
}

.comp-dd-trigger.is-open {
  border-color: var(--primary);
  background-color: var(--surface);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent);
}

.comp-dd-trigger-main {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  flex: 1 1 auto;
}

.comp-dd-trigger-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  min-width: 0;
}

.comp-dd-trigger-top strong {
  font-size: 0.86rem;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.comp-dd-trigger-sub {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comp-dd-chevron {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  transition: transform 0.2s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.comp-dd-trigger.is-open .comp-dd-chevron {
  transform: rotate(180deg);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.comp-dd-menu {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0.4rem;
  border-radius: var(--radius-md);
  border: 1.5px solid color-mix(in srgb, var(--primary) 35%, var(--border-strong));
  background-color: var(--surface);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  animation: compDdFadeIn 0.16s ease-out;
}

@keyframes compDdFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comp-dd-option {
  width: 100%;
  display: grid;
  gap: 0.26rem;
  padding: 0.78rem 0.92rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  background-color: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  min-height: 48px;
  box-sizing: border-box;
  transition: background-color 0.14s var(--ease);
}

.comp-dd-option:last-child {
  border-bottom: 0;
}

.comp-dd-option:hover {
  background-color: var(--surface-elevated);
}

.comp-dd-option.is-active {
  background-color: var(--accent-soft);
}

.comp-dd-option-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.comp-dd-option-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.comp-dd-option-title strong {
  font-size: 0.84rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.comp-dd-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.comp-dd-option-desc {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-secondary);
  line-height: 1.42;
}

.comp-method-badge {
  font-size: 0.69rem;
  font-weight: 700;
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
  background-color: var(--bg);
  color: var(--accent);
  border: 1px solid var(--border);
  white-space: normal;
  max-width: 100%;
  line-height: 1.25;
}

.comp-method-badge.is-ai {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, var(--bg)), color-mix(in srgb, #6366f1 18%, var(--bg)));
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
}

.comp-bottom-action-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border-strong));
  background-color: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.comp-bottom-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  font-size: 0.78rem;
  color: var(--ink-secondary);
  line-height: 1.4;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.comp-bottom-summary strong {
  color: var(--ink);
}

.comp-run-cta {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 48px;
  padding: 0.7rem 1rem;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.3;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-sizing: border-box;
}

.tool-panel .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  box-sizing: border-box;
}

.comp-ai-insight-box {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 8%, var(--surface-elevated)),
    color-mix(in srgb, #6366f1 7%, var(--surface-elevated))
  );
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.comp-ai-insight-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.79rem;
  color: var(--ink);
}

.comp-ai-psnr-tag {
  font-size: 0.71rem;
  font-weight: 700;
  padding: 0.14rem 0.48rem;
  border-radius: 6px;
  background-color: var(--surface);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
}

.comp-ai-insight-box p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.comp-dropzone {
  padding: 1.1rem;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--border-strong);
  background-color: var(--bg);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.comp-dropzone.is-dragover {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.comp-dropzone-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.comp-dropzone-copy {
  display: grid;
  gap: 0.2rem;
  flex: 1 1 240px;
  min-width: 0;
}

.comp-dropzone-copy strong {
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.comp-dropzone-copy span {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.comp-dropzone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comp-plan-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  font-size: 0.79rem;
  color: var(--ink-secondary);
}

.comp-result-card {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.comp-result-preview {
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #090d16;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  min-height: 180px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.comp-result-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-content: start;
  min-width: 0;
  max-width: 100%;
}

.comp-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  min-width: 0;
  max-width: 100%;
}

.comp-stat-box {
  display: grid;
  gap: 0.12rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.comp-stat-box.is-highlight {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.comp-stat-box span {
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.comp-stat-box strong {
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.comp-stat-box small {
  font-size: 0.71rem;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}

.comp-guard-list {
  margin: 0;
  padding: 0.65rem 0.85rem;
  list-style: none;
  border-radius: var(--radius-sm);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.28rem;
  font-size: 0.78rem;
  color: var(--ink-secondary);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.comp-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .tools-subnav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .tools-subnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .weather-metrics-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .comp-dropdowns-grid,
  .comp-result-card,
  .comp-stats-grid,
  .admin-og-preview-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .compressor-hero-card,
  .comp-result-card {
    padding: 0.88rem;
  }
  .comp-dd-trigger {
    min-height: 64px;
    padding: 0.72rem 0.82rem;
  }
  .comp-bottom-action-bar {
    padding: 0.8rem 0.85rem;
  }
  .comp-run-cta {
    font-size: 0.87rem;
    padding: 0.65rem 0.85rem;
  }
}

/* ==========================================================================
   YouTube Music Authentic Player UI (Main Hub Stage & Mini Floating Player)
   ========================================================================== */
:root {
  --ytm-red: #ff0033;
  --ytm-red-soft: rgba(255, 0, 51, 0.14);
}

.ytm-stage-card {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, var(--surface-elevated), var(--surface));
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.ytm-stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.ytm-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.ytm-logo-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--ytm-red);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px var(--ytm-red-soft);
}

.ytm-brand-pill span:nth-child(2) {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.ytm-live-dot,
.ytm-status-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-muted);
}

.ytm-live-dot.is-live,
.ytm-status-chip.is-live {
  background-color: var(--ytm-red-soft);
  border-color: rgba(255, 0, 51, 0.35);
  color: var(--ytm-red);
}

.ytm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.ytm-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.ytm-chip-btn:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
}

.ytm-chip-btn.is-active {
  border-color: rgba(255, 0, 51, 0.4);
  background-color: var(--ytm-red-soft);
  color: var(--ytm-red);
}

.ytm-artwork-showcase {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1.05rem;
  align-items: center;
}

.ytm-art-frame {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background-color: #090d16;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}

.ytm-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease);
}

.ytm-art-frame.is-playing .ytm-art-img {
  transform: scale(1.04);
}

.ytm-art-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--ink-muted);
}

.ytm-eq-pill {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  padding: 4px 6px;
  border-radius: 6px;
  background-color: rgba(9, 13, 22, 0.78);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.ytm-art-frame.is-playing .ytm-eq-pill {
  opacity: 1;
}

.ytm-eq-pill span {
  width: 3px;
  height: 9px;
  border-radius: 2px;
  background-color: var(--ytm-red);
  animation: musicEqBounce 0.72s ease-in-out infinite alternate;
}

.ytm-eq-pill span:nth-child(2) { animation-delay: 0.14s; height: 12px; }
.ytm-eq-pill span:nth-child(3) { animation-delay: 0.28s; height: 7px; }
.ytm-eq-pill span:nth-child(4) { animation-delay: 0.42s; height: 10px; }

.ytm-track-header {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  align-content: center;
}

.ytm-track-titles {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.ytm-track-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.ytm-queue-pill,
.ytm-watch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.56rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  color: var(--ink-secondary);
  text-decoration: none;
}

.ytm-watch-pill:hover {
  border-color: var(--ytm-red);
  color: var(--ytm-red);
}

.ytm-track-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ytm-track-artist {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.ytm-scrubber-wrap {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.2rem;
}

.ytm-scrubber {
  width: 100%;
  height: 6px;
  accent-color: var(--ytm-red);
  cursor: pointer;
}

.ytm-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.ytm-transport-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.35rem 0;
}

.ytm-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.15s var(--ease);
}

.ytm-icon-btn:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background-color: var(--surface-elevated);
}

.ytm-icon-btn.is-active {
  color: var(--ytm-red);
  border-color: rgba(255, 0, 51, 0.4);
  background-color: var(--ytm-red-soft);
}

.ytm-repeat-one-badge,
.ytm-repeat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--ytm-red);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ytm-play-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background-color: var(--ytm-red);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 0, 51, 0.35);
  transition: transform 0.16s var(--ease), background-color 0.16s var(--ease);
}

.ytm-play-fab:hover {
  transform: scale(1.05);
  background-color: #e6002e;
}

.ytm-bottom-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.ytm-volume-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 180px;
}

.ytm-volume-slider {
  width: 100%;
  max-width: 140px;
  accent-color: var(--ytm-red);
  cursor: pointer;
}

.ytm-vol-pct {
  font-size: 0.74rem;
  color: var(--ink-muted);
  min-width: 34px;
}

.ytm-bg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
}

.ytm-bg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
}

.ytm-queue-panel {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ytm-queue-tabs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.ytm-queue-tab-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.ytm-queue-tab-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--ytm-red);
  display: inline-block;
  flex-shrink: 0;
}

.ytm-queue-count {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.ytm-tracklist {
  display: grid;
  gap: 0.42rem;
  max-height: 440px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ytm-track-row-block {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

.ytm-track-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.42rem 0.58rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--ink);
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.ytm-track-row:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-elevated);
}

.ytm-track-row.is-active {
  border-color: rgba(255, 0, 51, 0.45);
  background-color: var(--ytm-red-soft);
}

.ytm-track-row-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 0.68rem;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.ytm-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  flex-shrink: 0;
}

.ytm-row-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.ytm-row-action-btn:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
}

.ytm-row-action-btn.is-active {
  color: var(--ytm-red);
  border-color: rgba(255, 0, 51, 0.42);
  background-color: var(--ytm-red-soft);
}

.ytm-row-action-btn.is-danger:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
}

.ytm-row-thumb-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #090d16;
}

.ytm-row-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ytm-row-overlay-icon {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.44);
  color: #ffffff;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.16s var(--ease);
}

.ytm-track-row:hover .ytm-row-overlay-icon,
.ytm-track-row.is-active .ytm-row-overlay-icon {
  opacity: 1;
}

.ytm-row-info {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.ytm-row-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytm-row-sub {
  font-size: 0.74rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytm-row-dur {
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
  margin-right: 0.12rem;
}

/* Browser Tabs, Playlist & Watch Later Management */
.ytm-browser-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem;
  padding: 0.26rem;
  border-radius: 12px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ytm-browser-tab-btn {
  padding: 0.44rem 0.35rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  width: 100%;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.ytm-browser-tab-btn.is-active {
  background-color: var(--ytm-red);
  color: #ffffff;
}

.ytm-playlist-create-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ytm-playlist-create-form .music-search-input {
  flex: 1 1 170px;
  min-width: 0;
  max-width: 100%;
  height: 38px;
  box-sizing: border-box;
}

.ytm-playlist-create-form .btn {
  flex-shrink: 0;
  height: 38px;
}

.ytm-hub-pl-picker {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ytm-hub-pl-picker-inline {
  padding: 0.58rem;
  background-color: var(--surface-elevated);
}

.ytm-hub-pl-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  min-width: 0;
}

.ytm-hub-pl-quicklist {
  display: grid;
  gap: 0.32rem;
  max-height: 165px;
  overflow-y: auto;
  min-width: 0;
}

.ytm-playlist-list {
  display: grid;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ytm-playlist-card {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ytm-playlist-card.is-active {
  border-color: rgba(255, 0, 51, 0.45);
  background-color: var(--ytm-red-soft);
}

.ytm-playlist-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ytm-playlist-card-main {
  flex: 1 1 160px;
  min-width: 0;
  display: grid;
  gap: 0.14rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.ytm-playlist-card-main strong {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytm-playlist-card-main span {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.ytm-playlist-card-actions,
.ytm-playlist-detail-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.ytm-playlist-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-color: var(--bg);
}

.ytm-playlist-detail-title {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  flex: 1 1 150px;
}

.ytm-playlist-detail-title strong {
  font-size: 0.86rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytm-playlist-detail-title span {
  font-size: 0.71rem;
  color: var(--ink-muted);
}

.ytm-queue-pill.is-mode {
  border-color: rgba(255, 0, 51, 0.35);
  background-color: var(--ytm-red-soft);
  color: var(--ytm-red);
}

/* Keep native <audio> actively renderable inside viewport bounds so mobile OS never suspends background playback */
.music-bg-audio-el {
  display: block !important;
  position: fixed;
  width: 2px;
  height: 2px;
  left: 2px;
  bottom: 2px;
  opacity: 0.004;
  pointer-events: none;
  z-index: -1;
}

/* Mini Floating Player (YouTube Music Compact Popover) */
.ytm-mini-popover {
  padding-top: 0.9rem;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100dvh - 5.25rem);
  z-index: 48;
}

.ytm-mini-save-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
}

.ytm-mini-playlist-drawer {
  display: grid;
  gap: 0.42rem;
  padding: 0.52rem;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
}

.ytm-mini-pl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--ink-secondary);
}

.ytm-mini-create-pl-form {
  display: flex;
  gap: 0.35rem;
}

.ytm-mini-pl-list {
  display: grid;
  gap: 0.26rem;
  max-height: 98px;
  overflow-y: auto;
}

.music-search-hit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.32rem;
}

.ytm-mini-top-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--border);
  overflow: hidden;
}

.ytm-mini-top-progress-fill {
  height: 100%;
  background-color: var(--ytm-red);
  transition: width 0.25s linear;
}

.ytm-mini-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.ytm-mini-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.ytm-mini-logo-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--ytm-red);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ytm-mini-brand-name {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink);
}

.ytm-mini-live-pill {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-muted);
}

.ytm-mini-live-pill.is-live {
  background-color: var(--ytm-red-soft);
  border-color: rgba(255, 0, 51, 0.35);
  color: var(--ytm-red);
}

.ytm-mini-art-wrap {
  width: 46px;
  height: 46px;
  border-radius: 8px;
}

.ytm-mini-scrubber-wrap {
  display: grid;
  gap: 0.22rem;
  margin: 0.45rem 0;
}

.ytm-mini-seek-slider {
  accent-color: var(--ytm-red);
}

.ytm-mini-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.ytm-mini-repeat-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.ytm-mini-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.35rem 0.2rem 0.55rem;
}

.ytm-mini-tool-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.ytm-mini-tool-btn:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.ytm-mini-tool-btn.is-active {
  color: var(--ytm-red);
  border-color: rgba(255, 0, 51, 0.4);
  background-color: var(--ytm-red-soft);
}

.ytm-mini-repeat-one {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background-color: var(--ytm-red);
  color: #ffffff;
  font-size: 0.56rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ytm-mini-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: var(--ytm-red);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 0, 51, 0.32);
  transition: transform 0.15s var(--ease), background-color 0.15s var(--ease);
}

.ytm-mini-play-btn:hover {
  transform: scale(1.05);
  background-color: #e6002e;
}

.ytm-fab-btn.is-playing {
  border-color: rgba(255, 0, 51, 0.55);
  box-shadow: 0 8px 24px rgba(255, 0, 51, 0.28);
}

/* Admin Utilities Editor Layout */
.admin-utilities-editor {
  min-width: 0;
  max-width: 100%;
}

.admin-utilities-sections,
.admin-utilities-items-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  min-width: 0;
  max-width: 100%;
}

/* Picture-in-Picture (Gambar dalam Gambar) & Headset Audio-Only Mode */
.ytm-pip-video-hidden {
  position: fixed;
  right: 2px;
  bottom: 2px;
  width: 2px;
  height: 2px;
  opacity: 0.01;
  pointer-events: none;
  z-index: -1;
}

.music-pip-card {
  position: fixed;
  right: 14px;
  bottom: 74px;
  width: min(328px, calc(100vw - 24px));
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(13, 18, 30, 0.97), rgba(9, 13, 22, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 0, 51, 0.22);
  color: #f8fafc;
  padding: 0.72rem 0.82rem;
  z-index: 1250;
  display: grid;
  gap: 0.58rem;
  backdrop-filter: blur(14px);
}

.music-pip-card[hidden] {
  display: none !important;
}

.music-pip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.music-pip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fda4af;
  background: rgba(255, 0, 51, 0.16);
  border: 1px solid rgba(255, 0, 51, 0.35);
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
}

.music-pip-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.music-pip-headset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.48);
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  font-size: 0.71rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.14s var(--ease);
}

.music-pip-headset-btn:hover {
  background: rgba(14, 165, 233, 0.28);
  border-color: rgba(125, 211, 252, 0.75);
  color: #e0f2fe;
  transform: translateY(-1px);
}

.music-pip-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.music-pip-body {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.music-pip-art-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #090d16;
}

.music-pip-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.music-pip-meta {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.music-pip-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-pip-artist {
  font-size: 0.73rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-pip-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.music-pip-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.music-pip-ctrl-btn.is-primary {
  background: var(--ytm-red);
  border-color: var(--ytm-red);
  box-shadow: 0 6px 14px rgba(255, 0, 51, 0.32);
}

.music-pip-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.music-pip-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff0033, #38bdf8);
  transition: width 0.25s linear;
}

.music-pip-foot-tip {
  font-size: 0.68rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.ytm-chip-btn.is-headset-active,
.music-icon-mini-btn.is-headset-active {
  border-color: rgba(56, 189, 248, 0.55);
  background-color: rgba(14, 165, 233, 0.16);
  color: #38bdf8;
}

[data-theme='light'] .ytm-chip-btn.is-headset-active,
[data-theme='light'] .music-icon-mini-btn.is-headset-active {
  border-color: rgba(2, 132, 199, 0.5);
  background-color: rgba(2, 132, 199, 0.14);
  color: #0369a1;
}

.ytm-headset-status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-size: 0.76rem;
  line-height: 1.4;
  font-weight: 600;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ytm-headset-status-banner > span {
  flex: 1 1 200px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ytm-headset-status-banner > .ytm-chip-btn {
  flex-shrink: 0;
}

[data-theme='light'] .ytm-headset-status-banner {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.35);
  color: #0c4a6e;
}

/* ==========================================================================
   v39: YT Music Icon Category Drawer, Live Trends & Animated Progress UI
   ========================================================================== */
@keyframes ytmSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ytmProgressSweep {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes ytmShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.ytm-spin {
  animation: ytmSpin 0.85s linear infinite;
}

.ytm-tab-desktop {
  display: inline;
}

.ytm-tab-mobile {
  display: none;
}

.ytm-cat-toolbar {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  max-width: 100%;
}

.ytm-cat-icon-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  color: var(--ink);
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.ytm-cat-icon-trigger:hover {
  border-color: var(--ytm-red);
}

.ytm-cat-icon-trigger.is-open {
  background-color: var(--ytm-red-soft);
  border-color: rgba(255, 0, 51, 0.48);
  color: var(--ytm-red);
}

.ytm-cat-chevron {
  transition: transform 0.22s var(--ease);
}

.ytm-cat-icon-trigger.is-open .ytm-cat-chevron {
  transform: rotate(90deg);
}

.ytm-active-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.4rem 0.68rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.ytm-active-cat-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.ytm-active-cat-pill svg {
  flex-shrink: 0;
  color: var(--ytm-red);
}

.ytm-active-cat-pill span:not(.ytm-hot-dot) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytm-hot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--ytm-red);
  box-shadow: 0 0 0 3px var(--ytm-red-soft);
  flex-shrink: 0;
  margin-left: auto;
}

.ytm-trend-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.ytm-trend-sync-btn:hover,
.ytm-trend-sync-btn.is-syncing {
  border-color: rgba(16, 185, 129, 0.5);
  background-color: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

[data-theme='light'] .ytm-trend-sync-btn:hover,
[data-theme='light'] .ytm-trend-sync-btn.is-syncing {
  color: #047857;
}

.ytm-cat-slide-shell {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateX(-18px);
  pointer-events: none;
  margin-top: 0;
  transition:
    grid-template-rows 0.28s var(--ease),
    opacity 0.22s var(--ease),
    transform 0.28s var(--ease),
    margin-top 0.22s var(--ease);
}

.ytm-cat-slide-shell.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  margin-top: 0.25rem;
}

.ytm-cat-slide-inner {
  overflow: hidden;
  min-width: 0;
  display: grid;
  gap: 0.55rem;
  padding: 0;
  border-radius: 14px;
  border: 1px solid transparent;
  background-color: var(--bg);
  transition: padding 0.24s var(--ease), border-color 0.24s var(--ease);
}

.ytm-cat-slide-shell.is-open .ytm-cat-slide-inner {
  padding: 0.72rem;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.ytm-cat-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.ytm-cat-drawer-title {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.78rem;
  color: var(--ink);
  min-width: 0;
  flex-wrap: wrap;
}

.ytm-cat-sync-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.ytm-cat-minimize-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  color: var(--ink-secondary);
  font-size: 0.71rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.ytm-cat-minimize-btn:hover {
  color: var(--ink);
  border-color: var(--ytm-red);
}

.ytm-cat-scroll-rail {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.24rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

.ytm-cat-rail-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.42rem 0.74rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-elevated);
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    background-color 0.16s var(--ease),
    border-color 0.16s var(--ease),
    color 0.16s var(--ease),
    transform 0.14s var(--ease);
}

.ytm-cat-rail-btn:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
  transform: translateY(-1px);
}

.ytm-cat-rail-btn.is-active {
  background-color: var(--ytm-red);
  border-color: var(--ytm-red);
  color: #ffffff;
}

.ytm-cat-tag {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.08rem 0.34rem;
  border-radius: 6px;
}

.ytm-cat-tag.is-live {
  background-color: rgba(16, 185, 129, 0.16);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.ytm-cat-tag.is-hot {
  background-color: rgba(249, 115, 22, 0.16);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

[data-theme='light'] .ytm-cat-tag.is-live {
  color: #047857;
}

[data-theme='light'] .ytm-cat-tag.is-hot {
  color: #c2410c;
}

.ytm-cat-rail-btn.is-active .ytm-cat-tag {
  background-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.38);
}

.ytm-live-trends-row {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: 0.42rem;
  padding-bottom: 0.16rem;
  border-top: 1px dashed var(--border);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

.ytm-trends-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.ytm-trend-chip-btn {
  padding: 0.25rem 0.58rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.71rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.ytm-trend-chip-btn:hover {
  border-color: var(--ytm-red);
  color: var(--ink);
  background-color: var(--ytm-red-soft);
}

/* Animated Progress Bars, Inline Spinners & Skeletons */
.ytm-progress-banner,
.ytm-stage-buffer-bar {
  display: grid;
  gap: 0.4rem;
  padding: 0.56rem 0.72rem;
  border-radius: 12px;
  background-color: var(--ytm-red-soft);
  border: 1px solid rgba(255, 0, 51, 0.3);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ytm-progress-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}

.ytm-progress-spin-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  min-width: 0;
  flex: 1 1 auto;
}

.ytm-progress-spin-wrap > span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytm-progress-pct {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--ytm-red);
  flex-shrink: 0;
}

.ytm-inline-spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 0, 51, 0.25);
  border-top-color: var(--ytm-red);
  display: inline-block;
  flex-shrink: 0;
  animation: ytmSpin 0.75s linear infinite;
}

.ytm-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background-color: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.ytm-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff0033, #ff6b81, #ff0033);
  background-size: 200% 100%;
  animation: ytmProgressSweep 1.25s linear infinite;
  transition: width 0.26s ease-out;
}

.ytm-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background-color: var(--ytm-red-soft);
  border: 1px solid rgba(255, 0, 51, 0.32);
  color: var(--ytm-red);
  font-size: 0.71rem;
  font-weight: 800;
}

.ytm-skeleton-list {
  display: grid;
  gap: 0.42rem;
}

.ytm-skeleton-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 0.68rem;
  padding: 0.45rem 0.58rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-color: var(--bg);
}

.ytm-skeleton-thumb,
.ytm-skeleton-bar {
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.14) 25%,
    rgba(148, 163, 184, 0.28) 50%,
    rgba(148, 163, 184, 0.14) 75%
  );
  background-size: 200% 100%;
  animation: ytmShimmer 1.35s ease-in-out infinite;
}

.ytm-skeleton-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
}

.ytm-skeleton-lines {
  display: grid;
  gap: 0.38rem;
}

.ytm-skeleton-bar {
  display: block;
  height: 11px;
  border-radius: 6px;
}

.ytm-skeleton-bar.is-title {
  width: 74%;
}

.ytm-skeleton-bar.is-sub {
  width: 48%;
  height: 9px;
}

.ytm-mini-loader-strip {
  display: grid;
  gap: 0.28rem;
  padding: 0.42rem 0.55rem;
  margin-bottom: 0.42rem;
  border-radius: 10px;
  background-color: var(--ytm-red-soft);
  border: 1px solid rgba(255, 0, 51, 0.28);
}

.ytm-mini-loader-strip[hidden] {
  display: none !important;
}

.ytm-mini-loader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--ink);
}

.ytm-mini-loader-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ytm-mini-loader-pct {
  color: var(--ytm-red);
  font-weight: 800;
  flex-shrink: 0;
}

.ytm-mini-loader-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background-color: rgba(148, 163, 184, 0.24);
  overflow: hidden;
}

.ytm-mini-loader-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff0033, #ff6b81, #ff0033);
  background-size: 200% 100%;
  animation: ytmProgressSweep 1.2s linear infinite;
  transition: width 0.24s ease-out;
}

@media (max-width: 640px) {
  .music-hub-panel {
    padding-bottom: 4.5rem;
  }
  .music-hub-hero-card,
  .music-hub-browser-wrap,
  .ytm-stage-card {
    padding: 0.85rem;
    border-radius: 16px;
  }
  .music-hub-hero-head {
    gap: 0.72rem;
  }
  .music-hub-hero-icon {
    width: 38px;
    height: 38px;
    padding: 6px;
  }
  .music-hub-hero-title {
    font-size: 1.06rem;
  }
  .music-hub-hero-sub {
    font-size: 0.78rem;
    line-height: 1.4;
  }
  .ytm-tab-desktop {
    display: none;
  }
  .ytm-tab-mobile {
    display: inline;
  }
  .ytm-cat-toolbar {
    gap: 0.34rem;
  }
  .ytm-cat-icon-trigger,
  .ytm-active-cat-pill,
  .ytm-trend-sync-btn {
    padding: 0.36rem 0.56rem;
    font-size: 0.72rem;
  }
  .ytm-trend-sync-text {
    display: none;
  }
  .ytm-cat-drawer-title strong {
    font-size: 0.74rem;
  }
  .ytm-cat-rail-btn {
    padding: 0.38rem 0.62rem;
    font-size: 0.72rem;
  }
  .ytm-stage-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .ytm-brand-pill {
    justify-content: space-between;
    width: 100%;
  }
  .ytm-topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
  }
  .ytm-topbar-actions .ytm-chip-btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 0.38rem 0.5rem;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ytm-artwork-showcase {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
  }
  .ytm-art-frame {
    width: 88px;
    height: 88px;
  }
  .ytm-track-title {
    font-size: 1.02rem;
  }
  .ytm-track-artist {
    font-size: 0.8rem;
  }
  .ytm-track-badges {
    gap: 0.34rem;
  }
  .ytm-track-badges .ytm-chip-btn,
  .ytm-track-badges .ytm-queue-pill,
  .ytm-track-badges .ytm-watch-pill {
    font-size: 0.7rem;
    padding: 0.24rem 0.52rem;
  }
  .ytm-transport-toolbar {
    gap: 0.55rem;
  }
  .ytm-bottom-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }
  .ytm-volume-group {
    width: 100%;
    flex: 1 1 auto;
  }
  .ytm-volume-slider {
    max-width: none;
    flex: 1;
  }
  .ytm-bg-badge {
    width: 100%;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
  .ytm-headset-status-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .ytm-headset-status-banner > span {
    flex: 1 1 auto;
  }
  .ytm-headset-status-banner > .ytm-chip-btn {
    width: 100%;
    justify-content: center;
  }
  .ytm-playlist-create-form {
    flex-direction: column;
    align-items: stretch;
  }
  .ytm-playlist-create-form .music-search-input {
    flex: 1 1 auto;
    width: 100%;
  }
  .ytm-playlist-create-form .btn {
    width: 100%;
    justify-content: center;
  }
  .ytm-track-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.42rem;
    padding: 0.42rem 0.5rem;
  }
  .ytm-track-row-main {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.52rem;
  }
  .ytm-row-thumb-wrap,
  .ytm-skeleton-thumb {
    width: 40px;
    height: 40px;
  }
  .ytm-skeleton-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.52rem;
    padding: 0.42rem 0.5rem;
  }
  .ytm-row-dur {
    display: none;
  }
  .ytm-browser-tab-btn {
    font-size: 0.72rem;
    padding: 0.42rem 0.25rem;
  }
  .tools-subnav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.4rem;
    overflow: visible;
    padding-bottom: 0;
  }
  .tools-subtab {
    flex: 0 1 calc(25% - 0.34rem);
    min-width: 72px;
    min-height: 60px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    padding: 0.44rem 0.22rem;
    gap: 0.28rem;
    font-size: 0.67rem;
    line-height: 1.15;
    border-radius: 12px;
  }
  .tools-subtab:last-child:nth-child(odd) {
    grid-column: auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60px;
  }
  .tools-subtab span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
  }
  .tools-subtab-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }
  .tools-hero {
    padding: 0.78rem 0.92rem;
  }
  .tools-hero-title {
    font-size: 1.12rem;
  }
  .tools-hero-sub {
    font-size: 0.76rem;
  }
  .music-hub-hero-card {
    padding: 0.78rem 0.88rem;
    gap: 0.65rem;
  }
  .music-pip-card {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 78px;
  }
}

/* ==========================================================================
   v43 — Top Upload Dropzone, Auto-Detect Format & Dropdown Converter Bar,
         and Real-Time Percentage Progress Bar
   ========================================================================== */
.conv-auto-dropdown-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.35fr);
  gap: 0.9rem;
  align-items: stretch;
  margin-top: 0.85rem;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
}

.conv-detected-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
}

.conv-detected-box.is-detected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.conv-detected-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}

.conv-detected-copy {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  min-width: 0;
}

.conv-detected-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.conv-detected-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-detected-sub {
  font-size: 0.74rem;
  color: var(--ink-secondary);
  line-height: 1.35;
}

.conv-select-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.42rem;
  min-width: 0;
}

.conv-select-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.conv-select-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.conv-target-select {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.conv-target-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tool-live-progress-box {
  margin-top: 0.85rem;
  padding: 0.82rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
}

.tool-live-progress-box.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tool-live-progress-box.is-done {
  border-color: rgba(16, 185, 129, 0.45);
}

.tool-live-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.48rem;
}

.tool-live-progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.tool-live-progress-pct {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--accent);
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.tool-live-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.tool-live-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #4f46e5 55%, #10b981 100%);
  transition: width 0.22s ease;
}

@media (max-width: 768px) {
  .conv-auto-dropdown-bar {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding: 0.8rem;
  }
  .conv-select-row {
    flex-direction: column;
    align-items: stretch;
  }
  .conv-target-select,
  .conv-select-row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   v46 — Responsive Overflow Guards & Song/Lyrics/Video Identifier Polish
   ========================================================================== */
.conv-auto-dropdown-bar,
.tool-live-progress-box,
.comp-dropzone {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.conv-detected-title,
.tool-live-progress-label {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dl-result-badges {
  min-width: 0;
  max-width: 100%;
}

.dl-plat-pill,
.dl-dur-pill,
.comp-method-badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.sf-audio-preview-wrap {
  padding: 0.65rem 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.sf-audio-el {
  width: 100%;
  max-width: 100%;
  display: block;
}

.sf-artist-line {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.sf-ai-summary-box,
.sf-lyrics-box {
  margin-top: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.sf-lyrics-box {
  border-color: rgba(16, 185, 129, 0.35);
  background: var(--surface-elevated);
}

.sf-ai-summary-box strong,
.sf-lyrics-box strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.24rem;
}

.sf-whisper-tag {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #10b981;
  overflow-wrap: anywhere;
}

.sf-lyrics-excerpt {
  margin: 0;
  white-space: pre-line;
  font-size: 0.78rem;
  color: var(--ink-secondary);
  max-height: 130px;
  overflow-y: auto;
}

.sf-ai-summary-box p {
  margin: 0;
  color: var(--ink-secondary);
}

.sf-links-section {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.sf-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.sf-sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr));
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
}

.sf-source-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0.78rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.sf-source-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.sf-source-card.is-video-source {
  border-style: dashed;
}

.sf-source-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-width: 0;
}

.sf-source-top strong {
  font-size: 0.84rem;
  color: var(--ink);
}

.sf-source-label {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sf-video-exclusive-box {
  padding: 0.85rem 0.9rem;
  border-radius: 13px;
  border: 1px solid var(--accent);
  background: var(--surface-elevated);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.sf-video-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  min-width: 0;
}

.sf-video-head .sf-section-title {
  margin: 0;
}

.sf-video-hash-pill {
  font-size: 0.7rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.sf-keyframes-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  min-width: 0;
  max-width: 100%;
}

.sf-keyframe-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
  box-sizing: border-box;
}

.sf-keyframe-item img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  border-radius: 7px;
}

.sf-keyframe-item span {
  font-size: 0.67rem;
  color: var(--ink-secondary);
  text-align: center;
  overflow-wrap: anywhere;
}

.sf-sublist-title {
  margin: 0.75rem 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.sf-matched-videos-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.sf-matched-video-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.68rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.sf-matched-video-row:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.sf-matched-video-thumb {
  width: 70px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-elevated);
}

.sf-matched-video-copy {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  min-width: 0;
  flex: 1 1 auto;
}

.sf-matched-video-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
}

.sf-matched-video-copy strong {
  font-size: 0.82rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.sf-matched-video-copy small {
  font-size: 0.72rem;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}

.sf-sim-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.sf-alt-list {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
  max-width: 100%;
}

.sf-alt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.48rem 0.68rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.79rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.sf-alt-copy {
  min-width: 0;
  flex: 1 1 180px;
  overflow-wrap: anywhere;
}

.sf-alt-row span {
  color: var(--ink-secondary);
}

@media (max-width: 640px) {
  .sf-sources-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sf-keyframes-strip {
    grid-template-columns: minmax(0, 1fr);
  }
  .sf-matched-video-row {
    align-items: flex-start;
  }
  .sf-matched-video-thumb {
    width: 56px;
    height: 42px;
  }
}

/* ==========================================================================
   Drama China (Dracin) Gratis Tanpa Iklan — 18+ Platform Short-Drama Cinema
   ========================================================================== */

html.dracin-fs-lock,
body.dracin-fs-lock {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.dracin-fs-lock .ytm-mini-fab,
body.dracin-fs-lock .ytm-mini-player,
body.dracin-fs-lock .site-header {
  display: none !important;
}

.dracin-app {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.dracin-topbar-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.3rem;
  border-radius: 14px;
  background: var(--surface-alt, var(--surface));
  border: 1px solid var(--border);
  scrollbar-width: none;
}
.dracin-topbar-tabs::-webkit-scrollbar {
  display: none;
}

.dracin-nav-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.48rem 0.92rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.dracin-nav-tab:hover {
  color: var(--ink);
  background: var(--surface);
}

.dracin-nav-tab.is-active {
  background: #e11d48;
  color: #ffffff;
  border-color: #e11d48;
}

.dracin-discover {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.dracin-unified-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
}

.dracin-unified-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 220px;
}

.dracin-unified-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
}

.dracin-unified-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  line-height: 1.4;
}

.dracin-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.dracin-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
}

.dracin-search-input-wrap {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.85rem;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
}

.dracin-search-btns {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.dracin-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
}

.dracin-search-clear {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  font-size: 0.9rem;
}

.dracin-filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.dracin-filter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}

.dracin-filter-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.dracin-filter-meta {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.dracin-platform-dropdown {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.dracin-dropdown-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.dracin-dropdown-trigger:hover,
.dracin-platform-dropdown.is-open .dracin-dropdown-trigger {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.dracin-dropdown-trigger-left {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
}

.dracin-dropdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dracin-dropdown-trigger-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dracin-dropdown-trigger-sub {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.dracin-dropdown-chevron {
  flex-shrink: 0;
  color: var(--ink-secondary);
  transition: transform 160ms ease;
}

.dracin-platform-dropdown.is-open .dracin-dropdown-chevron,
.dracin-continue-dropdown.is-open .dracin-dropdown-chevron {
  transform: rotate(180deg);
}

.dracin-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.22);
  overflow: hidden;
}

.dracin-dropdown-menu[hidden],
.dracin-continue-menu[hidden] {
  display: none;
}

.dracin-dropdown-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-secondary);
  background: var(--bg);
}

.dracin-dropdown-search {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.85rem;
  outline: none;
}

.dracin-dropdown-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dracin-dropdown-item {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease;
}

.dracin-dropdown-item:hover {
  background: rgba(225, 29, 72, 0.08);
}

.dracin-dropdown-item.is-active {
  background: rgba(225, 29, 72, 0.14);
  color: #e11d48;
}

.dracin-dropdown-item-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dracin-dropdown-item-region {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.dracin-dropdown-check {
  font-weight: 800;
  color: #e11d48;
}

.dracin-dropdown-empty {
  padding: 0.85rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  text-align: center;
}

.dracin-genre-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.42rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: thin;
}

.dracin-chip-btn,
.dracin-genre-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.36rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.dracin-chip-btn:hover,
.dracin-genre-btn:hover {
  color: var(--ink);
  border-color: rgba(225, 29, 72, 0.45);
}

.dracin-chip-btn.is-active {
  background: #e11d48;
  color: #ffffff;
  border-color: #e11d48;
}

.dracin-genre-btn.is-highlight {
  border-color: rgba(16, 185, 129, 0.55);
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
}

[data-theme='dark'] .dracin-genre-btn.is-highlight {
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
}

.dracin-genre-btn.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.dracin-genre-btn.is-highlight.is-active {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

.dracin-section-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dracin-section-heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.dracin-section-sub {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.dracin-text-link {
  border: 0;
  background: transparent;
  color: #e11d48;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
}

.dracin-continue-dropdown {
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.dracin-continue-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.dracin-continue-trigger:hover {
  background: rgba(225, 29, 72, 0.05);
}

.dracin-continue-trigger-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-size: 0.86rem;
}

.dracin-continue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.14);
  color: #e11d48;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dracin-continue-trigger-right {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.dracin-continue-preview {
  font-size: 0.76rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

@media (max-width: 480px) {
  .dracin-continue-preview {
    display: none;
  }
}

.dracin-continue-menu {
  border-top: 1px solid var(--border);
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dracin-continue-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 290px;
  overflow-y: auto;
}

.dracin-continue-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.dracin-continue-row:hover {
  border-color: #e11d48;
  background: rgba(225, 29, 72, 0.05);
}

.dracin-continue-thumb {
  width: 38px;
  height: 52px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
  background: #0f172a;
}

.dracin-continue-copy {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  min-width: 0;
  flex: 1 1 auto;
}

.dracin-continue-copy strong {
  font-size: 0.82rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dracin-continue-copy span {
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.dracin-continue-action {
  font-size: 0.76rem;
  font-weight: 700;
  color: #e11d48;
  flex-shrink: 0;
}

.dracin-continue-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.15rem;
}

.dracin-server-row-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.dracin-inline-notice {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.dracin-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.9rem;
}

.dracin-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
  transition: border-color 160ms ease, transform 160ms ease;
}

.dracin-card:hover {
  border-color: rgba(225, 29, 72, 0.55);
  transform: translateY(-2px);
}

.dracin-card-poster-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 0;
  background: #0f172a;
  overflow: hidden;
  cursor: pointer;
}

.dracin-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dracin-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.58) 0%, rgba(2, 6, 23, 0.05) 38%, rgba(2, 6, 23, 0.84) 100%);
  pointer-events: none;
}

.dracin-card-platform {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.78);
  padding: 0.18rem 0.48rem;
  border-radius: 6px;
  max-width: calc(100% - 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dracin-card-platform.is-full-free {
  background: rgba(5, 150, 105, 0.92);
}

.dracin-card-epcount {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.69rem;
  font-weight: 700;
  color: #fde68a;
  background: rgba(2, 6, 23, 0.68);
  padding: 0.14rem 0.42rem;
  border-radius: 5px;
  max-width: calc(100% - 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dracin-card-resume {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffffff;
  background: #e11d48;
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
}

.dracin-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.7rem;
  flex: 1 1 auto;
}

.dracin-card-title-btn {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dracin-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.dracin-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dracin-watch-btn {
  flex: 1 1 auto;
  min-height: 36px;
  justify-content: center;
}

.dracin-icon-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  cursor: pointer;
}

.dracin-icon-btn.is-fav {
  color: #e11d48;
  border-color: rgba(225, 29, 72, 0.5);
  background: rgba(225, 29, 72, 0.1);
}

/* Vertical Short-Drama Player & 2-Column Desktop Cinema Layout */
.dracin-app,
.dracin-discover {
  overflow-anchor: none;
}

.dracin-card-platform.is-indo {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  border: 1px solid rgba(254, 202, 202, 0.45);
}

.dracin-player-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
  overflow-anchor: none;
}

.dracin-player-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  overflow-anchor: none;
}

.dracin-fyp-banner {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff1f2 0%, #f5f3ff 100%);
  border: 1px solid rgba(225, 29, 72, 0.28);
  color: #0f172a;
}

[data-theme='dark'] .dracin-fyp-banner {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.2), rgba(124, 58, 237, 0.24));
  border-color: rgba(244, 63, 94, 0.36);
  color: #f8fafc;
}

.dracin-fyp-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.dracin-fyp-banner-title {
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #0f172a;
}

[data-theme='dark'] .dracin-fyp-banner-title {
  color: #f8fafc;
}

.dracin-fyp-banner-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
}

[data-theme='dark'] .dracin-fyp-banner-sub {
  color: #cbd5e1;
}

.dracin-fyp-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dracin-fyp-banner-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
  white-space: nowrap;
}

.dracin-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 15.5;
  max-height: 760px;
  border-radius: 18px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #ffffff;
  user-select: none;
}

.dracin-stage.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  background: #000000;
  touch-action: pan-x;
  overscroll-behavior: contain;
  contain: layout style;
}

.dracin-stage:fullscreen,
.dracin-stage:-webkit-full-screen {
  position: relative;
  inset: auto;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  background: #000000;
}

.dracin-stage.is-fullscreen .dracin-stage-tap-layer {
  touch-action: none;
}

.dracin-stage.is-fullscreen .dracin-stage-topbar,
.dracin-stage.is-fullscreen .dracin-action-rail,
.dracin-stage.is-fullscreen .dracin-stage-bottom {
  touch-action: manipulation;
}

.dracin-stage.is-fullscreen .dracin-stage-topbar {
  padding-top: max(0.75rem, env(safe-area-inset-top));
}

.dracin-stage.is-fullscreen .dracin-fs-drawer {
  touch-action: pan-y;
}

.dracin-stage-iframe,
.dracin-stage-video,
.dracin-cinema-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.dracin-stage-iframe {
  z-index: 2;
  background: #000000;
}

.dracin-stage-video {
  object-fit: contain;
  background: #000000;
  z-index: 1;
}

.dracin-stage-video.is-preload-standby {
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.dracin-stage-tap-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
}

.dracin-media-loader,
.dracin-media-error {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 4.5rem 4.6rem 5.4rem 0.9rem;
  text-align: center;
  background: rgba(2, 6, 23, 0.88);
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
  overflow-y: auto;
}

.dracin-media-loader {
  justify-content: center;
}

.dracin-error-card {
  margin: auto 0;
  width: 100%;
  max-width: 264px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0.75rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.dracin-media-loader[hidden],
.dracin-media-error[hidden],
.dracin-unmute-banner[hidden],
.dracin-restore-hud-btn[hidden],
.dracin-swipe-toast[hidden],
.dracin-live-subtitle[hidden],
.dracin-stage-pill-btn[hidden],
.dracin-rail-btn[hidden],
.dracin-error-actions button[hidden] {
  display: none !important;
}

.dracin-media-error p {
  margin: 0;
  max-width: 100%;
  font-size: 0.77rem;
  line-height: 1.42;
  color: #f1f5f9;
  overflow-wrap: anywhere;
}

.dracin-error-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
}

.dracin-error-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.36rem;
  width: 100%;
}

.dracin-error-actions .btn {
  width: 100%;
  justify-content: center;
  white-space: normal;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.25;
  padding: 0.44rem 0.5rem;
  min-height: 34px;
  text-decoration: none;
}

.dracin-sansekai-btn {
  background: #059669 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  font-weight: 700;
}

.dracin-sansekai-btn:hover:not(:disabled) {
  background: #047857 !important;
}

.dracin-sansekai-note {
  margin: 0.2rem 0 0;
  padding: 0.45rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.07);
  color: var(--ink-secondary);
  font-size: 0.75rem;
  line-height: 1.4;
}

.dracin-dm-ext-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dracin-cross-box {
  margin-top: 0.75rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.dracin-cross-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dracin-cross-head-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 200px;
}

.dracin-cross-head-copy strong {
  font-size: 0.86rem;
  color: var(--text);
}

.dracin-cross-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: var(--surface-alt);
}

.dracin-cross-status.is-error {
  color: #e11d48;
}

.dracin-cross-summary {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dracin-cross-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dracin-cross-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.dracin-cross-poster {
  width: 56px;
  height: 78px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 56px;
  background: #0f172a;
}

.dracin-cross-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dracin-cross-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.dracin-cross-title-row strong {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}

.dracin-cross-score {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.14);
  color: #e11d48;
  white-space: nowrap;
}

.dracin-cross-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dracin-cross-platform {
  font-weight: 700;
  color: var(--text);
}

.dracin-cross-reasons {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.dracin-cross-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.dracin-spinner {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #e11d48;
  animation: dracin-spin 0.8s linear infinite;
}

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

.dracin-unmute-banner {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  min-height: 36px;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(225, 29, 72, 0.92);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.dracin-cinema-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.86);
  transition: transform 8s ease;
}

.dracin-cinema-img.is-playing {
  transform: scale(1.04);
}

.dracin-cinema-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.78) 0%,
    rgba(2, 6, 23, 0.12) 24%,
    rgba(2, 6, 23, 0.14) 58%,
    rgba(2, 6, 23, 0.92) 100%
  );
  pointer-events: none;
}

.dracin-cinema-center-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.dracin-center-play-btn {
  pointer-events: auto;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dracin-stage-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: max(0.7rem, env(safe-area-inset-top)) 0.7rem 1.25rem;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0) 100%);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.dracin-stage-top-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dracin-stage-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.dracin-stage-ep-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fda4af;
}

.dracin-stage-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dracin-stage-pill-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0.32rem 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.84);
  color: #ffffff;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.dracin-clean-btn {
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(225, 29, 72, 0.82);
}

.dracin-swipe-toast {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  max-width: calc(100% - 28px);
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  background: rgba(225, 29, 72, 0.92);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.dracin-restore-hud-btn {
  position: absolute;
  right: 14px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.36rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(2, 6, 23, 0.78);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 150ms ease, background 150ms ease;
}

.dracin-restore-hud-btn:hover,
.dracin-restore-hud-btn:focus-visible {
  opacity: 1;
  background: rgba(15, 23, 42, 0.88);
}

.dracin-action-rail {
  position: absolute;
  right: 10px;
  bottom: 126px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.dracin-rail-btn {
  width: 50px;
  min-height: 46px;
  padding: 0.28rem 0.18rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(2, 6, 23, 0.82);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.14rem;
  cursor: pointer;
}

.dracin-rail-btn span {
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.1;
}

.dracin-rail-speed-val {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
}

.dracin-rail-btn.is-active {
  background: #e11d48;
  border-color: #fb7185;
}

.dracin-stage-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 0.85rem max(0.85rem, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.62) 68%, rgba(2, 6, 23, 0) 100%);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.dracin-live-subtitle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 122px;
  z-index: 8;
  max-width: calc(100% - 88px);
  padding: 0.42rem 0.78rem;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.84);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  transition: bottom 180ms ease;
}

/* Fullscreen Clean Screen ("Layar Bersih") hides ALL floating HUD icons & bars */
.dracin-stage.is-clean-screen .dracin-stage-topbar,
.dracin-stage.is-clean-screen .dracin-action-rail,
.dracin-stage.is-clean-screen .dracin-stage-bottom,
.dracin-stage.is-clean-screen .dracin-fs-drawer {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.dracin-stage.is-clean-screen .dracin-live-subtitle {
  bottom: 66px;
  max-width: calc(100% - 32px);
}

.dracin-stage-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.dracin-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.dracin-progress-track.is-seekable {
  height: 8px;
  cursor: pointer;
}

.dracin-progress-fill {
  height: 100%;
  background: #e11d48;
  border-radius: 999px;
  transition: width 220ms linear;
}

.dracin-stage-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.dracin-inline-play-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #e11d48;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dracin-ep-step-btn {
  min-height: 36px;
  padding: 0.32rem 0.65rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.dracin-ep-step-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.dracin-time-label {
  font-size: 0.74rem;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Loading Skeletons & Load More Pagination */
.dracin-skeleton-card {
  pointer-events: none;
}

.dracin-skeleton-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.14) 25%, rgba(148, 163, 184, 0.26) 50%, rgba(148, 163, 184, 0.14) 75%);
  background-size: 200% 100%;
  animation: dracin-shimmer 1.3s ease-in-out infinite;
}

.dracin-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.14) 25%, rgba(148, 163, 184, 0.26) 50%, rgba(148, 163, 184, 0.14) 75%);
  background-size: 200% 100%;
  animation: dracin-shimmer 1.3s ease-in-out infinite;
}

.dracin-skeleton-line.is-short {
  width: 62%;
}

@keyframes dracin-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.dracin-load-more-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.5rem;
}

/* Fullscreen Episode & Resolution Picker Drawer */
.dracin-fs-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  max-height: 68dvh;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 20px 20px 0 0;
  background: #0f172a;
  color: #f8fafc;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.dracin-fs-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.dracin-rail-quality-val {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: #fef08a;
}

.dracin-quality-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dracin-sub-status-banner {
  margin-bottom: 0.65rem;
  padding: 0.58rem 0.78rem;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.4;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
}

.dracin-sub-status-banner.is-active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.dracin-sub-status-banner.is-hardsub {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.38);
  color: #fde68a;
}

.dracin-quality-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.88);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dracin-quality-option:hover,
.dracin-quality-option:focus-visible {
  border-color: rgba(244, 63, 94, 0.75);
  background: rgba(51, 65, 85, 0.95);
}

.dracin-quality-option.is-active {
  border-color: #f43f5e;
  background: rgba(225, 29, 72, 0.22);
}

.dracin-quality-opt-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.dracin-quality-opt-main strong {
  font-size: 0.88rem;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dracin-quality-opt-main span {
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.3;
}

.dracin-quality-opt-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.dracin-quality-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  white-space: nowrap;
}

.dracin-quality-badge.is-smooth {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}

.dracin-quality-badge.is-hd {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}

.dracin-quality-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e11d48;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

/* Player Toolbar (Subtitle & Server Failover) */
.dracin-player-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.dracin-toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dracin-toolbar-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}

.dracin-toolbar-note {
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.dracin-select,
.dracin-text-input {
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.78rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.86rem;
  box-sizing: border-box;
}

.dracin-server-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.dracin-server-btn {
  min-height: 36px;
  padding: 0.35rem 0.72rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
}

.dracin-server-btn.is-active {
  background: #e11d48;
  color: #ffffff;
  border-color: #e11d48;
}

.dracin-server-btn.is-sansekai {
  border-color: rgba(16, 185, 129, 0.55);
  color: #059669;
}

.dracin-server-btn.is-sansekai.is-active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.dracin-sansekai-switch-btn {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.09);
  color: #059669;
}

.dracin-sansekai-switch-btn:hover:not(:disabled) {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.dracin-autonext-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-left: auto;
  cursor: pointer;
}

/* Right Side Column: Free Episode Picker + Info + AI Insights */
.dracin-side-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.dracin-ep-picker,
.dracin-info-box,
.dracin-clip-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
}

.dracin-ep-picker.is-compact {
  background: transparent;
  border: 0;
  padding: 0;
}

.dracin-ep-picker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.dracin-ep-picker-sub {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-secondary);
  margin-top: 0.12rem;
}

.dracin-jump-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dracin-jump-input {
  width: 72px;
  min-height: 36px;
  padding: 0.3rem 0.55rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.dracin-ep-ranges {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.dracin-range-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0.28rem 0.68rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.dracin-range-btn.is-active {
  background: #e11d48;
  color: #ffffff;
  border-color: #e11d48;
}

.dracin-ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 0.45rem;
}

.dracin-ep-btn {
  min-height: 42px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.dracin-ep-btn:hover {
  border-color: #e11d48;
}

.dracin-ep-btn.is-active {
  background: #e11d48;
  color: #ffffff;
  border-color: #e11d48;
}

.dracin-info-head h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--ink);
}

.dracin-info-alt {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.dracin-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.dracin-synopsis,
.dracin-cast {
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--ink);
}

.dracin-ai-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.dracin-ai-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dracin-ai-text,
.dracin-ai-hint {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.dracin-ai-engine {
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.dracin-similar-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.45rem;
}

.dracin-similar-btn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.68rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.dracin-similar-btn span {
  font-size: 0.8rem;
  font-weight: 600;
}

.dracin-similar-btn small {
  font-size: 0.72rem;
  color: var(--ink-secondary);
}

/* Clip Video / Screenshot AI Identifier View */
.dracin-clip-view,
.dracin-list-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dracin-clip-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.dracin-clip-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.dracin-clip-upload-zone {
  position: relative;
}

.dracin-clip-drop-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1.5px dashed var(--border);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.dracin-clip-preview-thumb {
  width: 68px;
  height: 92px;
  object-fit: cover;
  border-radius: 9px;
}

.dracin-clip-drop-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.dracin-clip-drop-copy strong {
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.dracin-clip-drop-copy span {
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.dracin-sr-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.dracin-clip-clue-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dracin-clip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dracin-error-text {
  margin: 0;
  font-size: 0.82rem;
  color: #f43f5e;
  font-weight: 600;
}

.dracin-clip-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.dracin-clip-results {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dracin-ai-summary-banner {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dracin-ai-summary-banner p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink);
}

.dracin-visual-meta {
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

.dracin-match-list,
.dracin-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dracin-match-row,
.dracin-history-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.dracin-match-poster,
.dracin-history-poster {
  width: 58px;
  height: 82px;
  object-fit: cover;
  border-radius: 9px;
  flex-shrink: 0;
  background: #0f172a;
}

.dracin-match-info,
.dracin-history-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dracin-match-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.dracin-match-rank {
  font-size: 0.78rem;
  font-weight: 800;
  color: #e11d48;
}

.dracin-match-score {
  font-size: 0.78rem;
  font-weight: 700;
  color: #10b981;
  font-variant-numeric: tabular-nums;
}

.dracin-match-reason {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.dracin-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.dracin-history-copy strong {
  font-size: 0.9rem;
  color: var(--ink);
}

.dracin-history-copy span {
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.dracin-empty-state {
  padding: 1.5rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-secondary);
}

.dracin-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

@media (max-width: 960px) {
  .dracin-player-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .dracin-stage:not(.is-fullscreen) {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .dracin-topbar-tabs {
    gap: 0.3rem;
    padding: 0.25rem;
  }
  .dracin-nav-tab {
    min-height: 36px;
    padding: 0.38rem 0.68rem;
    font-size: 0.78rem;
  }
  .dracin-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .dracin-stage:not(.is-fullscreen) {
    max-width: 100%;
    aspect-ratio: 9 / 15;
  }
  .dracin-action-rail {
    right: 8px;
    bottom: 118px;
    gap: 0.38rem;
  }
  .dracin-rail-btn {
    width: 44px;
    min-height: 42px;
    border-radius: 10px;
  }
  .dracin-rail-btn span {
    font-size: 0.6rem;
  }
  .dracin-stage-pill-btn {
    padding: 0.28rem 0.52rem;
    font-size: 0.7rem;
  }
  .dracin-match-row,
  .dracin-history-item {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   AUDIO EDITOR STUDIO AI (v59)
   Tactile DAW workbench: Waveform trim/cut-middle, Equalizer + SVG curve +
   rotary Bass/Virtualizer dials, scrollable bottom icon dock & Simpan modal.
   Dual-theme parity (Deep Studio Navy in Dark Mode, Crisp Studio in Light).
   ========================================================================== */

.audioeditor-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ae-studio {
  --ae-bg: #f5f6fb;
  --ae-card: #ffffff;
  --ae-card-elev: #f1f3fa;
  --ae-card-soft: #e7eaf6;
  --ae-border: rgba(15, 23, 42, 0.085);
  --ae-border-strong: rgba(15, 23, 42, 0.16);
  --ae-ink: #0f172a;
  --ae-ink-2: #334155;
  --ae-ink-muted: #64748b;
  --ae-blue: #4f46e5;
  --ae-blue-bright: #06b6d4;
  --ae-blue-soft: rgba(79, 70, 229, 0.1);
  --ae-cta-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #06b6d4 100%);
  --ae-modal-bg: #ffffff;
  --ae-modal-field: #f1f5f9;
  --ae-dock-bg: #ffffff;
  --ae-shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.05);

  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  box-sizing: border-box;
  padding: 1rem;
  border-radius: 24px;
  background: var(--ae-bg);
  border: 1px solid var(--ae-border);
  color: var(--ae-ink);
}

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

:root[data-theme='dark'] .ae-studio {
  --ae-bg: #0b1020;
  --ae-card: #131b31;
  --ae-card-elev: #1b2542;
  --ae-card-soft: #233054;
  --ae-border: rgba(148, 163, 184, 0.13);
  --ae-border-strong: rgba(148, 163, 184, 0.24);
  --ae-ink: #f8fafc;
  --ae-ink-2: #cbd5e1;
  --ae-ink-muted: #94a3b8;
  --ae-blue: #818cf8;
  --ae-blue-bright: #22d3ee;
  --ae-blue-soft: rgba(129, 140, 248, 0.16);
  --ae-cta-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 52%, #06b6d4 100%);
  --ae-modal-bg: #151e36;
  --ae-modal-field: #1e2946;
  --ae-dock-bg: #121a30;
  --ae-shadow-soft: 0 14px 36px rgba(2, 6, 23, 0.45);
}

.ae-val-mono {
  font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Top App Header Bar (Back + Title + Undo/Redo + Gradient SIMPAN) */
.ae-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.25rem;
}

.ae-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.ae-header-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.ae-header-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ae-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ae-header-sub {
  font-size: 0.77rem;
  color: var(--ae-ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.ae-header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.ae-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card);
  color: var(--ae-ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.16s ease, transform 0.14s ease;
}

.ae-icon-btn:hover:not(:disabled) {
  background: var(--ae-card-elev);
  color: var(--ae-ink);
  border-color: var(--ae-border-strong);
}

.ae-icon-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.ae-icon-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.ae-save-cta-btn {
  min-height: 40px;
  padding: 0 1.15rem;
  border-radius: 10px;
  border: none;
  background: var(--ae-cta-grad);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.32);
  transition: filter 0.16s ease, transform 0.14s ease, opacity 0.16s ease;
}

.ae-save-cta-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.ae-save-cta-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.ae-save-cta-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Source Action Strip */
.ae-source-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ae-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card);
  color: var(--ae-ink);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s ease, transform 0.14s ease;
}

.ae-source-pill:hover {
  background: var(--ae-card-elev);
  border-color: var(--ae-border-strong);
}

.ae-source-pill.is-primary {
  background: var(--ae-blue-soft);
  border-color: color-mix(in srgb, var(--ae-blue) 42%, transparent);
  color: var(--ae-blue);
}

.ae-source-pill.is-success {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.ae-rec-active {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #ef4444 !important;
}

/* Progress Box */
.ae-progress-bar-box {
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: var(--ae-card);
  border: 1px solid var(--ae-border-strong);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ae-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--ae-ink-2);
}

.ae-progress-track {
  height: 7px;
  border-radius: 999px;
  background: var(--ae-card-elev);
  overflow: hidden;
}

.ae-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  transition: width 0.18s ease;
}

/* Main Waveform Stage */
.ae-stage {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  padding: 1rem;
  border-radius: 20px;
  background: var(--ae-card);
  border: 1px solid var(--ae-border);
  box-shadow: var(--ae-shadow-soft);
  transition: border-color 0.18s ease;
}

.ae-stage.is-dragover {
  border-color: var(--ae-blue);
  background: color-mix(in srgb, var(--ae-blue) 8%, var(--ae-card));
}

/* Timecode Stepper Row: (- 00:00.0 +)   Total 00:08.0   (- 00:08.0 +) */
.ae-stepper-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.ae-time-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem;
  padding: 0.22rem 0.3rem;
  border-radius: 14px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
  max-width: 100%;
  min-width: 0;
}

.ae-time-pill:first-child {
  justify-self: start;
}

.ae-time-pill:last-child {
  justify-self: end;
}

.ae-time-pill span {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ae-ink);
  padding: 0 0.35rem;
  line-height: 1.35;
  white-space: nowrap;
}

.ae-step-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: var(--ae-card);
  color: var(--ae-ink);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.ae-step-btn:hover:not(:disabled) {
  background: var(--ae-blue-soft);
  color: var(--ae-blue);
}

.ae-step-btn:active:not(:disabled) {
  transform: scale(0.93);
}

.ae-step-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.ae-total-readout {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ae-ink-2);
  letter-spacing: -0.01em;
  text-align: center;
  padding: 0.3rem 0.72rem;
  border-radius: 10px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
  white-space: nowrap;
}

/* Interactive Waveform Canvas */
.ae-waveform-canvas {
  width: 100%;
  max-width: 100%;
  height: 204px;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--ae-border);
  cursor: ew-resize;
  touch-action: none;
}

/* Pangkas / Potong Tengah + Zoom Bar */
.ae-wave-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.ae-trim-mode-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem;
  border-radius: 14px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
  max-width: 100%;
}

.ae-pill-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 38px;
  padding: 0.4rem 0.92rem;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ae-ink-2);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.ae-pill-action:hover:not(:disabled) {
  color: var(--ae-ink);
}

.ae-pill-action.is-active {
  background: var(--ae-card);
  border-color: color-mix(in srgb, var(--ae-blue) 45%, transparent);
  color: var(--ae-blue);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.12);
}

.ae-pill-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ae-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.22rem 0.32rem;
  border-radius: 14px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
  flex-shrink: 0;
}

.ae-zoom-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: var(--ae-card);
  color: var(--ae-ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ae-zoom-btn:hover:not(:disabled) {
  background: var(--ae-blue-soft);
  color: var(--ae-blue);
}

.ae-zoom-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.ae-zoom-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ae-ink-2);
  padding: 0 0.35rem;
  min-width: 28px;
  text-align: center;
}

/* Circular Transport Row */
.ae-transport-circle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.25rem 0;
  width: 100%;
  min-width: 0;
}

.ae-transport-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.ae-circle-btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card-elev);
  color: var(--ae-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.14s ease, border-color 0.16s ease;
}

.ae-circle-btn:hover:not(:disabled) {
  background: var(--ae-card-soft);
  border-color: var(--ae-border-strong);
}

.ae-circle-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.ae-circle-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.ae-circle-play {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: none;
  background: var(--ae-cta-grad);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.34);
  transition: transform 0.14s ease, filter 0.16s ease;
}

.ae-circle-play:hover:not(:disabled) {
  filter: brightness(1.07);
}

.ae-circle-play:active:not(:disabled) {
  transform: scale(0.94);
}

.ae-circle-play:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.ae-transport-extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.ae-timecode {
  font-size: 0.82rem;
  color: var(--ae-ink-muted);
  padding: 0.3rem 0.6rem;
  border-radius: 9px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
}

.ae-timecode strong {
  color: var(--ae-ink);
}

.ae-mini-chip {
  min-height: 36px;
  padding: 0.32rem 0.72rem;
  border-radius: 10px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card-elev);
  color: var(--ae-ink-2);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, transform 0.14s ease;
}

.ae-mini-chip:hover:not(:disabled) {
  border-color: var(--ae-border-strong);
  color: var(--ae-ink);
}

.ae-mini-chip.is-active {
  background: var(--ae-blue-soft);
  border-color: var(--ae-blue);
  color: var(--ae-blue);
}

.ae-mini-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ae-telemetry-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--ae-border);
  font-size: 0.75rem;
  color: var(--ae-ink-muted);
}

.ae-telemetry-strip strong {
  color: var(--ae-ink-2);
  font-weight: 700;
}

/* Equalizer Top Mini Now-Playing Card (matches Screenshot 4) */
.ae-mini-player-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: var(--ae-card);
  border: 1px solid var(--ae-border);
  box-shadow: var(--ae-shadow-soft);
}

.ae-mini-player-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ae-mini-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--ae-blue-soft);
  border: 1px solid color-mix(in srgb, var(--ae-blue) 28%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ae-mini-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ae-mini-meta strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ae-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ae-mini-meta span {
  font-size: 0.78rem;
  color: var(--ae-ink-muted);
}

.ae-mini-play-btn {
  width: 44px;
  height: 44px;
}

.ae-mini-scrub-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ae-mini-scrub-row input[type='range'] {
  flex: 1 1 auto;
  accent-color: var(--ae-blue);
  cursor: pointer;
}

.ae-mini-scrub-row span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ae-ink-2);
  flex-shrink: 0;
}

/* Equalizer Studio Shell (Preset Chips + Connected Curve 10-Band + Rotary Knobs) */
.ae-eq-studio-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: var(--ae-card);
  border: 1px solid var(--ae-border);
  box-shadow: var(--ae-shadow-soft);
}

.ae-eq-preset-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 0.25rem;
}

.ae-eq-reset-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--ae-border-strong);
  background: var(--ae-card-elev);
  color: var(--ae-ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ae-eq-reset-circle:hover {
  background: var(--ae-blue-soft);
  color: var(--ae-blue);
  border-color: var(--ae-blue);
}

.ae-eq-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border-radius: 11px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card-elev);
  color: var(--ae-ink-2);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ae-eq-chip:hover {
  color: var(--ae-ink);
  border-color: var(--ae-border-strong);
}

.ae-eq-chip.is-active {
  background: var(--ae-blue-soft);
  border-color: var(--ae-blue);
  color: var(--ae-blue);
  font-weight: 700;
}

.ae-eq-rack-visual {
  position: relative;
  padding: 0.65rem 0.35rem;
  border-radius: 16px;
  background: var(--ae-bg);
  border: 1px solid var(--ae-border);
  overflow-x: auto;
}

.ae-eq-curve-overlay {
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: 0.35rem;
  right: 0.35rem;
  min-width: 520px;
  pointer-events: none;
  z-index: 2;
}

.ae-eq-curve-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ae-eq-rack-cols {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(10, minmax(52px, 1fr));
  min-width: 520px;
}

.ae-eq-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.ae-eq-db {
  height: 20px;
  line-height: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ae-ink-muted);
}

.ae-eq-slider-track {
  position: relative;
  height: 164px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ae-eq-slider-track::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--ae-border-strong);
  pointer-events: none;
}

.ae-eq-fill-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 3.5px;
  max-height: calc(100% - 16px);
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8, #0284c7);
  pointer-events: none;
  z-index: 1;
}

.ae-eq-slider-vertical {
  position: relative;
  z-index: 4;
  width: 152px;
  height: 28px;
  margin: 0;
  transform: rotate(-90deg);
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.ae-eq-slider-vertical::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.ae-eq-slider-vertical::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  cursor: pointer;
}

.ae-eq-slider-vertical::-moz-range-track {
  height: 4px;
  background: transparent;
}

.ae-eq-slider-vertical::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  cursor: pointer;
}

.ae-eq-freq {
  height: 20px;
  line-height: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ae-ink-2);
}

/* Rotary Dials Grid: Peningkat Bass + Virtualizer */
.ae-rotary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ae-knob-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 0.85rem;
  border-radius: 16px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
}

.ae-knob-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ae-ink);
}

.ae-knob-dial {
  position: relative;
  width: 118px;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ae-ink);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.ae-knob-dial:active {
  cursor: grabbing;
}

.ae-knob-svg {
  width: 112px;
  height: 112px;
  display: block;
}

.ae-knob-val {
  position: absolute;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ae-ink);
  pointer-events: none;
}

.ae-knob-step-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ae-step-mini {
  min-height: 32px;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card);
  color: var(--ae-ink-2);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ae-step-mini:hover {
  background: var(--ae-blue-soft);
  color: var(--ae-blue);
}

/* Workbench Body & Drawer Cards */
.ae-workbench-body {
  min-width: 0;
}

.ae-drawer-card,
.ae-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 16px;
  background: var(--ae-card);
  border: 1px solid var(--ae-border);
  min-width: 0;
}

.ae-drawer-compact {
  gap: 0.65rem;
}

.ae-hint-line {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ae-ink-muted);
}

.ae-hint-line strong {
  color: var(--ae-ink);
}

.ae-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.ae-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.ae-group-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ae-ink);
  letter-spacing: -0.01em;
}

.ae-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.65rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: var(--ae-card-elev);
  border: 1px solid transparent;
}

.ae-slider-row.is-focused {
  border-color: var(--ae-blue);
  background: var(--ae-blue-soft);
}

.ae-slider-row label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ae-ink-2);
}

.ae-slider-row .ae-val-mono {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ae-ink);
}

.ae-slider-row input[type='range'] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--ae-blue);
  cursor: pointer;
}

.ae-dual-sliders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ae-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding-top: 0.15rem;
}

.ae-toggle-stack {
  flex-direction: column;
  gap: 0.55rem;
}

.ae-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ae-ink-2);
  cursor: pointer;
}

.ae-checkbox-label input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--ae-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.ae-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.ae-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ae-preset-btn,
.ae-choice-btn {
  min-height: 40px;
  padding: 0.45rem 0.82rem;
  border-radius: 11px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card-elev);
  color: var(--ae-ink-2);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.ae-preset-btn:hover,
.ae-choice-btn:hover {
  border-color: var(--ae-border-strong);
  color: var(--ae-ink);
}

.ae-preset-btn.is-active,
.ae-choice-btn.is-active {
  background: var(--ae-blue-soft);
  border-color: var(--ae-blue);
  color: var(--ae-blue);
}

.ae-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.ae-choice-btn {
  text-align: center;
}

.ae-diag-note,
.ae-empty-hint,
.ae-ai-status {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ae-ink-2);
}

.ae-ai-status strong {
  color: var(--ae-ink);
}

.ae-stem-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem;
}

.ae-stem-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card-elev);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.ae-stem-card strong {
  font-size: 0.85rem;
  color: var(--ae-ink);
}

.ae-stem-card span {
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--ae-ink-muted);
}

.ae-stem-card.is-active {
  border-color: var(--ae-blue);
  background: var(--ae-blue-soft);
}

.ae-mix-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ae-mix-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
}

.ae-mix-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ae-mix-info strong {
  font-size: 0.85rem;
  color: var(--ae-ink);
  word-break: break-word;
}

.ae-mix-info span {
  font-size: 0.75rem;
  color: var(--ae-ink-muted);
}

.ae-mix-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.ae-mix-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: var(--ae-ink-2);
}

.ae-mix-controls input[type='range'] {
  width: 120px;
  accent-color: var(--ae-blue);
}

.ae-meta-matches {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
}

.ae-meta-matches-head {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ae-ink-muted);
}

.ae-meta-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.5rem;
}

.ae-meta-match-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card);
  text-align: left;
  cursor: pointer;
}

.ae-meta-match-btn:hover {
  border-color: var(--ae-blue);
}

.ae-meta-match-btn img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.ae-meta-match-btn div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ae-meta-match-btn strong {
  font-size: 0.82rem;
  color: var(--ae-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ae-meta-match-btn span {
  font-size: 0.73rem;
  color: var(--ae-ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ae-meta-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ae-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.ae-field span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ae-ink-2);
}

.ae-field input,
.ae-field select {
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--ae-border-strong);
  background: var(--ae-card-elev);
  color: var(--ae-ink);
  font-size: 0.85rem;
  font-family: inherit;
}

.ae-field input:focus,
.ae-field select:focus {
  outline: none;
  border-color: var(--ae-blue);
}

.ae-field-wide {
  grid-column: 1 / -1;
}

.ae-cover-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
}

.ae-cover-preview {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px dashed var(--ae-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.72rem;
  color: var(--ae-ink-muted);
  flex-shrink: 0;
}

.ae-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ae-cover-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Scrollable Bottom Icon Dock Bar (matches Screenshot 3 bottom bar) */
.ae-bottom-dock-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.45rem;
  border-radius: 20px;
  background: var(--ae-dock-bg);
  border: 1px solid var(--ae-border);
  box-shadow: var(--ae-shadow-soft);
}

.ae-dock-scroll-btn {
  width: 32px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--ae-border);
  background: var(--ae-card-elev);
  color: var(--ae-ink-2);
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, transform 0.14s ease;
}

.ae-dock-scroll-btn:hover {
  background: var(--ae-blue-soft);
  color: var(--ae-blue);
}

.ae-bottom-dock {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.1rem;
}

.ae-bottom-dock::-webkit-scrollbar {
  display: none;
}

.ae-dock-item {
  flex: 0 0 auto;
  min-width: 78px;
  min-height: 62px;
  padding: 0.48rem 0.65rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ae-ink-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.ae-dock-item:hover {
  background: var(--ae-card-elev);
  color: var(--ae-ink);
}

.ae-dock-item.is-active {
  background: var(--ae-blue-soft);
  border-color: color-mix(in srgb, var(--ae-blue) 45%, transparent);
  color: var(--ae-blue);
}

.ae-dock-item:active {
  transform: scale(0.96);
}

.ae-dock-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
}

.ae-dock-dot {
  position: absolute;
  top: -2px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 0 2px var(--ae-dock-bg);
}

.ae-dock-label {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.15;
}

/* "Simpan sebagai" Modal Dialog (matches Screenshots 1 & 2) */
.ae-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(5, 10, 26, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.ae-save-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 1.4rem 1.25rem 1.35rem;
  border-radius: 22px;
  background: var(--ae-modal-bg);
  border: 1px solid var(--ae-border-strong);
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.55);
  color: var(--ae-ink);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.ae-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--ae-border);
  background: var(--ae-modal-field);
  color: var(--ae-ink-2);
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ae-modal-close:hover {
  color: var(--ae-ink);
  border-color: var(--ae-border-strong);
}

.ae-modal-title {
  margin: 0;
  text-align: center;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ae-ink);
}

.ae-modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ae-modal-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ae-ink-muted);
}

.ae-filename-row {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
}

.ae-filename-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--ae-border-strong);
  background: var(--ae-modal-field);
  color: var(--ae-ink);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
}

.ae-filename-input:focus {
  outline: none;
  border-color: var(--ae-blue);
}

.ae-format-dropdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 84px;
  min-height: 46px;
  padding: 0 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--ae-border-strong);
  background: var(--ae-modal-field);
  color: var(--ae-ink);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.ae-format-dropdown-btn:hover {
  border-color: var(--ae-blue);
}

/* Format Picker Sheet inside Modal (Screenshot 2) */
.ae-format-picker-sheet {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.95rem;
  border-radius: 16px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-border);
}

.ae-fmt-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.ae-fmt-chip {
  position: relative;
  min-height: 48px;
  padding: 0.5rem 0.4rem;
  border-radius: 12px;
  border: 1.5px solid var(--ae-border);
  background: var(--ae-modal-field);
  color: var(--ae-ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ae-fmt-chip strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.ae-fmt-chip.is-active {
  border-color: var(--ae-blue);
  background: var(--ae-blue-soft);
  color: var(--ae-blue);
}

.ae-fmt-orig-tag {
  position: absolute;
  top: -8px;
  right: 6px;
  padding: 0.08rem 0.42rem;
  border-radius: 6px;
  background: #475569;
  color: #f8fafc;
  font-size: 0.64rem;
  font-weight: 700;
}

.ae-fmt-pro-head {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.ae-free-unlocked {
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
}

/* Quality Cards Strip (Screenshot 1) */
.ae-quality-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.ae-quality-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 92px;
  padding: 0.6rem 0.45rem;
  border-radius: 13px;
  border: 1.5px solid var(--ae-border);
  background: var(--ae-modal-field);
  color: var(--ae-ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ae-quality-card.is-active {
  border-color: var(--ae-blue);
  background: var(--ae-blue-soft);
}

.ae-quality-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ae-quality-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--ae-border);
}

.ae-quality-top strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ae-ink);
}

.ae-quality-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding-top: 0.35rem;
  font-size: 0.74rem;
  color: var(--ae-ink-2);
}

.ae-quality-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f59e0b;
}

.ae-sr-inline-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.79rem;
  color: var(--ae-ink-muted);
  margin-top: 0.25rem;
}

.ae-est-size-line {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ae-ink-muted);
}

.ae-est-size-line strong {
  color: var(--ae-ink);
}

.ae-modal-save-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 13px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9 0%, #22a7ff 100%);
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.32);
  transition: filter 0.16s ease, transform 0.14s ease;
}

.ae-modal-save-btn:hover:not(:disabled) {
  filter: brightness(1.07);
}

.ae-modal-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ae-download-ready-btn {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.ae-export-result {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--ae-card-elev);
  border: 1px solid var(--ae-blue);
}

.ae-export-result-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ae-export-result-meta strong {
  font-size: 0.86rem;
  color: var(--ae-ink);
  word-break: break-word;
}

.ae-export-result-meta span {
  font-size: 0.74rem;
  color: var(--ae-ink-muted);
}

.ae-result-audio {
  width: 100%;
  height: 38px;
}

@media (max-width: 860px) {
  .ae-panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ae-transport-circle-row {
    justify-content: center;
  }
  .ae-transport-extras {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .ae-studio {
    padding: 0.72rem;
    border-radius: 20px;
    gap: 0.75rem;
  }
  .ae-app-header {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0.05rem;
  }
  .ae-header-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.4rem;
  }
  .ae-header-title {
    font-size: 0.96rem;
  }
  .ae-header-sub {
    font-size: 0.71rem;
    max-width: 100%;
  }
  .ae-header-right {
    flex-shrink: 0;
    gap: 0.3rem;
    margin-left: auto;
  }
  .ae-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }
  .ae-save-cta-btn {
    min-height: 38px;
    padding: 0 0.92rem;
    font-size: 0.8rem;
    border-radius: 11px;
  }
  .ae-source-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }
  .ae-source-pill {
    width: 100%;
    min-width: 0;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 0.7rem;
    font-size: 0.81rem;
    border-radius: 14px;
  }
  .ae-source-pill.is-primary,
  .ae-source-pill.is-success {
    grid-column: 1 / -1;
  }
  .ae-stage,
  .ae-drawer-card,
  .ae-control-group,
  .ae-eq-studio-shell,
  .ae-mini-player-card {
    padding: 0.78rem;
    border-radius: 18px;
  }
  /* Zero-overflow 2-col grid for timecode steppers + centered total bar on top */
  .ae-stepper-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }
  .ae-total-readout {
    grid-column: 1 / -1;
    order: -1;
    width: 100%;
    font-size: 0.8rem;
    padding: 0.32rem 0.65rem;
  }
  .ae-time-pill,
  .ae-time-pill:first-child,
  .ae-time-pill:last-child {
    justify-self: stretch;
    width: 100%;
    padding: 0.2rem 0.24rem;
    gap: 0.12rem;
  }
  .ae-time-pill span {
    font-size: 0.77rem;
    padding: 0 0.14rem;
  }
  .ae-step-btn {
    width: 30px;
    height: 32px;
    font-size: 1rem;
  }
  .ae-waveform-canvas {
    height: 180px;
  }
  /* Zero-overflow segmented mode bar + crisp zoom strip */
  .ae-wave-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }
  .ae-trim-mode-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.25rem;
  }
  .ae-pill-action {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    gap: 0.32rem;
  }
  .ae-pill-action svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }
  .ae-zoom-group {
    justify-self: center;
    padding: 0.2rem 0.35rem;
    gap: 0.25rem;
  }
  .ae-zoom-btn {
    width: 36px;
    height: 36px;
  }
  .ae-zoom-val {
    display: inline-block;
    font-size: 0.78rem;
  }
  .ae-transport-circle-row {
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
  }
  .ae-transport-extras {
    width: 100%;
    justify-content: center;
    gap: 0.42rem;
  }
  .ae-timecode {
    width: 100%;
    text-align: center;
  }
  .ae-mini-chip {
    min-height: 38px;
  }
  /* Fit all 10 Equalizer bands + SVG curve side-by-side on mobile */
  .ae-eq-rack-visual {
    padding: 0.55rem 0.2rem;
    overflow-x: hidden;
  }
  .ae-eq-curve-overlay {
    min-width: 0;
    left: 0.2rem;
    right: 0.2rem;
    top: 30px;
    bottom: 30px;
  }
  .ae-eq-rack-cols {
    min-width: 0;
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  .ae-eq-col {
    gap: 0.35rem;
  }
  .ae-eq-db,
  .ae-eq-freq {
    font-size: 0.64rem;
    height: 18px;
    line-height: 18px;
  }
  .ae-eq-slider-track {
    height: 148px;
    width: 24px;
  }
  .ae-eq-slider-vertical {
    width: 138px;
    height: 24px;
  }
  .ae-eq-slider-vertical::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    margin-top: -5px;
  }
  .ae-eq-slider-vertical::-moz-range-thumb {
    width: 14px;
    height: 14px;
  }
  .ae-dual-sliders,
  .ae-meta-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ae-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ae-quality-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ae-rotary-grid {
    gap: 0.55rem;
  }
  .ae-knob-card {
    padding: 0.72rem 0.45rem;
  }
  .ae-dock-scroll-btn {
    display: none;
  }
  .ae-dock-item {
    min-width: 72px;
    min-height: 58px;
    padding: 0.42rem 0.5rem;
  }
  .ae-mix-controls input[type='range'] {
    width: 100%;
    max-width: 120px;
  }
}

/* ============================================================================
   Manifest AI — Multi-Model Chat Workspace (v60)
   ============================================================================ */

.manifestai-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mai-shell {
  position: relative;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 540px;
  height: min(74vh, 740px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.mai-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
}

.mai-sidebar-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.mai-new-chat-btn {
  flex: 1 1 auto;
  justify-content: center;
  min-height: 40px;
  gap: 0.45rem;
}

.mai-drawer-close {
  display: none;
}

.mai-sidebar-search {
  padding: 0.65rem 0.85rem 0.5rem;
}

.mai-input,
.mai-select {
  width: 100%;
  min-height: 38px;
  padding: 0.45rem 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  box-sizing: border-box;
  transition: border-color 150ms var(--ease);
}

.mai-input:focus,
.mai-select:focus {
  outline: none;
  border-color: var(--primary);
}

.mai-thread-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.35rem 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mai-thread-empty {
  padding: 1.25rem 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.mai-thread-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease;
}

.mai-thread-item:hover {
  background: var(--surface-hover);
}

.mai-thread-item.is-active {
  background: var(--surface);
  border-color: var(--border-strong);
}

.mai-thread-select {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.6rem;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.mai-thread-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mai-thread-meta {
  font-size: 0.71rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mai-thread-actions {
  display: flex;
  align-items: center;
  padding-right: 0.3rem;
  opacity: 0.72;
}

.mai-thread-item:hover .mai-thread-actions,
.mai-thread-item.is-active .mai-thread-actions {
  opacity: 1;
}

.mai-thread-act-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mai-thread-act-btn:hover {
  background: var(--surface-elevated);
  color: var(--ink);
}

.mai-thread-act-btn.is-danger:hover {
  color: var(--danger);
}

.mai-thread-rename-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.3rem;
}

.mai-rename-input {
  min-height: 32px;
  font-size: 0.8rem;
}

.mai-sidebar-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--border);
}

.mai-foot-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.mai-foot-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.mai-foot-btn.is-danger {
  color: var(--danger);
}

.mai-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--surface);
}

.mai-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}

.mai-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1 1 180px;
}

.mai-icon-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mai-icon-btn:hover {
  border-color: var(--border-strong);
}

.mai-icon-btn.mai-menu-trigger,
.mai-icon-btn.mai-drawer-close {
  display: none;
}

.mai-topbar-title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mai-topbar-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mai-topbar-sub {
  font-size: 0.74rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mai-topbar-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mai-mode-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.mai-mode-btn {
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.mai-mode-btn.is-active {
  background: var(--primary);
  color: var(--primary-ink);
}

.mai-focus-select {
  width: auto;
  min-width: 112px;
  min-height: 36px;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
}

.mai-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 36px;
  padding: 0.35rem 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.mai-top-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.mai-top-btn.is-accent {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--accent-soft);
}

.mai-messages-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.15rem;
}

.mai-messages-inner {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.mai-welcome {
  margin: auto 0;
  padding: 0.75rem 0 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.05rem;
  text-align: center;
}

.mai-welcome-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  max-width: 560px;
}

.mai-welcome-logo {
  border-radius: 14px;
}

.mai-welcome-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mai-welcome-sub {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.mai-welcome-meta {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.mai-starter-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.mai-starter-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms var(--ease), background 150ms var(--ease);
}

.mai-starter-card:hover {
  border-color: var(--primary);
  background: var(--surface-elevated);
}

.mai-starter-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.mai-starter-sub {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.mai-msg {
  display: flex;
  gap: 0.75rem;
  min-width: 0;
}

.mai-msg-user {
  justify-content: flex-end;
}

.mai-user-bubble {
  max-width: min(82%, 600px);
  padding: 0.75rem 1rem;
  border-radius: 16px 16px 4px 16px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.mai-msg-assistant {
  align-items: flex-start;
}

.mai-assistant-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  margin-top: 2px;
}

.mai-assistant-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mai-md-content {
  font-size: 0.91rem;
  line-height: 1.65;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.mai-md-p {
  margin: 0 0 0.65rem;
}

.mai-md-p:last-child {
  margin-bottom: 0;
}

.mai-md-h {
  margin: 0.9rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.mai-md-h:first-child {
  margin-top: 0;
}

.mai-md-list {
  margin: 0 0 0.65rem;
  padding-left: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mai-md-quote {
  margin: 0.5rem 0;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 0.86rem;
}

.mai-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.65rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.mai-md-table {
  width: 100%;
  min-width: 350px;
  border-collapse: collapse;
  font-size: 0.84rem;
  line-height: 1.5;
  text-align: left;
}

.mai-md-table th,
.mai-md-table td {
  padding: 0.55rem 0.72rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

.mai-md-table th {
  background: var(--bg-subtle);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.mai-md-table tbody tr:last-child td {
  border-bottom: none;
}

.mai-md-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--bg-subtle) 45%, transparent);
}

.mai-md-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mai-md-content code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 0.12rem 0.36rem;
  border-radius: 5px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--ink);
}

.mai-code-block {
  margin: 0.65rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}

.mai-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.mai-code-lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: lowercase;
}

.mai-code-copy {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}

.mai-code-copy:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.mai-code-block pre {
  margin: 0;
  padding: 0.8rem 0.9rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.81rem;
  line-height: 1.55;
  color: var(--ink);
}

.mai-msg-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.2rem;
}

.mai-msg-meta-line {
  font-size: 0.74rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.mai-msg-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mai-msg-act-btn {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  cursor: pointer;
}

.mai-msg-act-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--surface-elevated);
}

.mai-contrib-details {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 0.45rem 0.7rem;
}

.mai-contrib-summary {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  list-style: none;
}

.mai-contrib-summary::-webkit-details-marker {
  display: none;
}

.mai-contrib-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.mai-contrib-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mai-contrib-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.77rem;
}

.mai-contrib-head strong {
  color: var(--ink);
}

.mai-contrib-sub {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--ink-muted);
}

.mai-contrib-excerpt {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.mai-thinking-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.mai-spinner {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  animation: mai-spin 0.75s linear infinite;
}

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

.mai-thinking-text {
  font-size: 0.83rem;
  color: var(--ink-secondary);
}

.mai-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 2px;
}

.mai-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-secondary);
  opacity: 0.35;
  animation: maiDotPulse 1.15s infinite ease-in-out;
}

.mai-typing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.mai-typing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes maiDotPulse {
  0%, 80%, 100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.mai-stream-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--accent, #2563eb);
  animation: maiCursorBlink 0.85s steps(1) infinite;
}

@keyframes maiCursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.mai-error-box {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--danger);
  background: var(--danger-soft);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mai-error-msg {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink);
}

.mai-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mai-composer-wrap {
  padding: 0.75rem 1.15rem 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mai-composer-form {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  padding: 0.42rem 0.45rem 0.42rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg);
}

.mai-composer-form:focus-within {
  border-color: var(--primary);
}

.mai-composer-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  max-height: 180px;
  padding: 0.62rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.45;
  resize: none;
  outline: none;
}

.mai-send-btn {
  min-height: 42px;
  padding: 0.45rem 0.95rem;
  flex-shrink: 0;
  gap: 0.4rem;
}

.mai-status-strip {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  font-size: 0.73rem;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.4;
}

/* Modals (Live Models Registry & Multi-Provider BYOK Vault) */
.mai-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.mai-modal {
  width: 100%;
  max-width: 680px;
  max-height: min(86dvh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.mai-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.mai-modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
}

.mai-modal-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.mai-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mai-sync-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.mai-sync-info {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
  flex: 1 1 240px;
}

.mai-sync-info strong {
  font-size: 0.86rem;
  color: var(--ink);
}

.mai-sync-info span {
  font-size: 0.77rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

.mai-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mai-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mai-model-row {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.mai-model-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}

.mai-model-row-top strong {
  font-size: 0.86rem;
  color: var(--ink);
}

.mai-model-vendor {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.mai-model-id-line code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
  word-break: break-all;
}

.mai-model-role {
  margin: 0;
  font-size: 0.74rem;
  color: var(--ink-secondary);
  line-height: 1.4;
}

.mai-limit-box {
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mai-limit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.83rem;
}

.mai-limit-ok {
  margin: 0;
  font-size: 0.79rem;
  color: var(--success);
}

.mai-limit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mai-limit-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

/* BYOK Form & Cards */
.mai-byok-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.mai-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mai-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.mai-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink);
  cursor: pointer;
}

.mai-byok-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.mai-privacy-note {
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.mai-byok-combine-row {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
}

.mai-sub-heading {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.mai-empty-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.mai-byok-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mai-byok-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.mai-byok-card.is-disabled {
  opacity: 0.62;
}

.mai-byok-card-main {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
  flex: 1 1 240px;
}

.mai-byok-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
}

.mai-byok-card-top strong {
  font-size: 0.86rem;
  color: var(--ink);
}

.mai-byok-provider-meta {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.mai-byok-model-line {
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.mai-byok-model-line code {
  font-family: var(--font-mono);
  color: var(--accent);
}

.mai-byok-feedback {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.mai-byok-feedback.is-ok {
  color: var(--success);
}

.mai-byok-feedback.is-err {
  color: var(--danger);
}

.mai-byok-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mai-mini-btn {
  min-height: 32px;
  padding: 0.24rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.mai-mini-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.mai-mini-btn.is-danger {
  color: var(--danger);
}

.mai-drawer-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .mai-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: 580px;
    height: min(82dvh, 780px);
  }

  .mai-icon-btn.mai-menu-trigger,
  .mai-icon-btn.mai-drawer-close {
    display: inline-flex;
  }

  .mai-sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    z-index: 30;
    transform: translateX(-105%);
    transition: transform 220ms var(--ease);
    box-shadow: var(--shadow-float);
  }

  .mai-sidebar.is-open {
    transform: translateX(0);
  }

  .mai-drawer-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 25;
    background: rgba(2, 6, 23, 0.58);
  }
}

@media (max-width: 600px) {
  .mai-topbar {
    padding: 0.65rem 0.75rem;
    gap: 0.55rem;
  }

  .mai-topbar-controls {
    width: 100%;
    justify-content: space-between;
  }

  .mai-messages-scroll {
    padding: 0.9rem 0.75rem;
  }

  .mai-starter-grid,
  .mai-model-grid,
  .mai-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mai-user-bubble {
    max-width: 92%;
  }

  .mai-composer-wrap {
    padding: 0.65rem 0.75rem 0.75rem;
  }

  .mai-send-btn span {
    display: none;
  }

  .mai-send-btn {
    padding: 0.45rem 0.75rem;
  }

  .mai-modal-backdrop {
    padding: 0.5rem;
  }

  .mai-modal-head,
  .mai-modal-body {
    padding: 0.85rem;
  }
}

/* ============================================================================
 * Manifest AI v64 — Fullscreen Workspace & Natural Multilingual Voice Controls
 * ============================================================================ */
body.mai-fullscreen-open {
  overflow: hidden !important;
}

body.mai-fullscreen-open .ytm-mini-fab,
body.mai-fullscreen-open .ytm-mini-player {
  display: none !important;
}

.mai-shell.is-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 100dvh;
  z-index: 950;
  border-radius: 0;
  border: 0;
  margin: 0;
  box-shadow: none;
}

.mai-shell.is-fullscreen .mai-messages-inner {
  max-width: 880px;
}

.mai-modal-backdrop {
  z-index: 980;
}

.mai-voice-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--accent-soft);
  font-size: 0.8rem;
  color: var(--ink);
}

.mai-voice-bar[hidden] {
  display: none;
}

.mai-voice-bar-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary);
  flex-shrink: 0;
  animation: maiDotPulse 1.1s infinite ease-in-out;
}

.mai-voice-bar-text {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mai-msg-act-btn.is-speaking,
.mai-mini-btn.is-speaking {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--accent-soft);
}

.mai-mini-btn.is-primary,
.mai-mini-btn.is-primary:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

.mai-mini-btn.is-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

body.mai-fullscreen-open .toast-notification {
  z-index: 1050;
}

.mai-voice-modal {
  max-width: 720px;
}

.mai-voice-settings-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  margin-bottom: 0.85rem;
}

.mai-voice-sliders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.mai-voice-sliders input[type='range'] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.mai-voice-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.mai-voice-lang-select {
  width: auto;
  min-width: 165px;
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

.mai-voice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.mai-voice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.72rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  min-width: 0;
}

.mai-voice-card.is-selected {
  border-color: var(--primary);
  background: var(--accent-soft);
}

.mai-voice-card-info {
  min-width: 0;
  flex: 1 1 auto;
}

.mai-voice-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.mai-voice-card-head strong {
  font-size: 0.84rem;
  color: var(--ink);
}

.mai-voice-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.mai-voice-card-style {
  margin: 0.2rem 0 0;
  font-size: 0.73rem;
  line-height: 1.4;
  color: var(--ink-secondary);
}

.mai-voice-card-actions {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .mai-voice-sliders,
  .mai-voice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mai-voice-lang-select {
    width: 100%;
  }
}

/* ==========================================================================
   Manifestudio Integrated Plagiarism Checker (Turnitin Latest-Style Workspace)
   ========================================================================== */

.plg-studio {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}

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

.plg-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.plg-studio-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.plg-head-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.plg-head-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.2vw, 1.38rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.plg-head-copy p {
  margin: 0.35rem 0 0;
  font-size: 0.87rem;
  line-height: 1.52;
  color: var(--ink-secondary);
}

.plg-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Buttons */
.plg-btn-primary,
.plg-btn-secondary,
.plg-btn-danger,
.plg-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.14s var(--ease), color 0.16s var(--ease);
}

.plg-btn-primary,
.plg-dl-btn.is-primary {
  background: var(--primary);
  border-color: transparent;
  color: var(--primary-ink);
}

.plg-btn-primary:hover:not(:disabled),
.plg-dl-btn.is-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.plg-btn-secondary,
.plg-dl-btn {
  background: var(--surface-elevated);
  color: var(--ink);
  border-color: var(--border);
}

.plg-btn-secondary:hover:not(:disabled),
.plg-dl-btn:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.plg-btn-secondary.is-connected {
  border-color: rgba(16, 185, 129, 0.45);
  background: var(--success-soft);
  color: var(--success);
}

.plg-btn-danger {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.plg-btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #ffffff;
}

.plg-btn-primary:disabled,
.plg-btn-secondary:disabled,
.plg-btn-danger:disabled,
.plg-dl-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

/* No Repository Guarantee Banner */
.plg-norepo-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.72rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, 0.34);
  background: var(--success-soft);
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.48;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.plg-norepo-banner svg {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.plg-norepo-banner strong {
  color: var(--success);
}

/* Input Mode Switcher (Upload File vs Paste Text) */
.plg-input-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  width: 100%;
  max-width: 100%;
}

.plg-mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.48rem 0.75rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius-md) - 4px);
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
  min-width: 0;
}

.plg-mode-tab:hover:not(:disabled) {
  color: var(--ink);
}

.plg-mode-tab.is-active {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}

.plg-mode-tab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Uploaded File Ready Card (replaces textarea completely in Upload mode) */
.plg-uploaded-file-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(16, 185, 129, 0.38);
  background: var(--surface-elevated);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.plg-uf-top {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-width: 0;
}

.plg-uf-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--success-soft);
  color: var(--success);
  flex-shrink: 0;
}

.plg-uf-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 auto;
}

.plg-uf-meta strong {
  font-size: 0.92rem;
  color: var(--ink);
  word-break: break-word;
}

.plg-uf-meta span {
  font-size: 0.77rem;
  line-height: 1.44;
  color: var(--ink-secondary);
  word-break: break-word;
}

.plg-uf-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  padding: 0.48rem 0.7rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

.plg-uf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.plg-btn-compact {
  min-height: 36px !important;
  padding: 0.42rem 0.8rem !important;
  font-size: 0.79rem !important;
}

.plg-extract-track {
  margin-top: 0.45rem;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.plg-extract-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
  transition: width 0.25s var(--ease);
}

/* Input Card & Universal Dropzone */
.plg-input-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.plg-dropzone {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1.05rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--border-strong);
  background: var(--surface-elevated);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}

.plg-dropzone:hover,
.plg-dropzone.is-dragover {
  border-color: var(--primary);
  background: var(--accent-soft);
}

.plg-dropzone.is-busy {
  opacity: 0.78;
  cursor: wait;
}

.plg-drop-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  flex-shrink: 0;
}

.plg-drop-text {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}

.plg-drop-text strong {
  font-size: 0.92rem;
  color: var(--ink);
  word-break: break-word;
}

.plg-drop-text span {
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.plg-file-loaded {
  margin-top: 0.2rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: var(--success-soft);
  color: var(--success) !important;
  font-size: 0.78rem !important;
  font-weight: 500;
}

.plg-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.plg-editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.plg-editor-bar label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}

.plg-editor-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.plg-textarea {
  width: 100%;
  min-height: 190px;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.65;
  resize: vertical;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.plg-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.plg-textarea::placeholder {
  color: var(--ink-muted);
}

.plg-options-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.95rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.plg-option-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.34rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.plg-option-item label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.plg-select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  padding: 0.38rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plg-checks-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
  padding-top: 0.15rem;
  min-width: 0;
}

.plg-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

.plg-check-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.plg-action-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* Progress Panel & Live Multi-Engine Grid */
.plg-progress-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 99, 235, 0.32);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.plg-progress-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.plg-progress-top strong {
  display: block;
  font-size: 0.92rem;
  color: var(--ink);
}

.plg-elapsed-line {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.plg-progress-pct {
  font-size: 1.35rem !important;
  font-weight: 800;
  color: var(--primary) !important;
  flex-shrink: 0;
}

.plg-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-elevated);
  overflow: hidden;
  border: 1px solid var(--border);
}

.plg-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 55%, #10b981 100%);
  transition: width 0.28s var(--ease);
}

.plg-engine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 0.65rem;
}

.plg-engine-card {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.72rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  min-width: 0;
}

.plg-engine-card.is-done {
  border-color: rgba(16, 185, 129, 0.34);
}

.plg-engine-card.is-running {
  border-color: rgba(37, 99, 235, 0.45);
}

.plg-engine-card.is-warn {
  border-color: rgba(245, 158, 11, 0.35);
}

.plg-engine-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.plg-engine-top strong {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
}

.plg-engine-state {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.plg-engine-card.is-done .plg-engine-state {
  color: var(--success);
}

.plg-engine-card.is-running .plg-engine-state {
  color: var(--primary);
}

.plg-engine-card.is-warn .plg-engine-state {
  color: var(--warning);
}

.plg-engine-note {
  font-size: 0.73rem;
  line-height: 1.38;
  color: var(--ink-muted);
  word-break: break-word;
}

/* Turnitin-Style Report Shell */
.plg-report-shell {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  scroll-margin-top: 88px;
}

.plg-report-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.plg-report-title-block {
  flex: 1 1 280px;
  min-width: 0;
}

.plg-kicker-sm {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.plg-report-title-block h3 {
  margin: 0.2rem 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.06rem, 2vw, 1.32rem);
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.plg-meta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.plg-download-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.48rem;
}

/* KPI Strip (Turnitin Summary Bar) */
.plg-kpi-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(0, 1.65fr);
  gap: 0.9rem;
  align-items: stretch;
}

.plg-kpi-hero {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.95rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
}

.plg-gauge {
  position: relative;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  color: var(--ink);
}

.plg-gauge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.plg-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.plg-gauge-center strong {
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1;
}

.plg-gauge-center span {
  margin-top: 0.16rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.plg-kpi-verdict {
  min-width: 0;
}

.plg-risk-label {
  display: inline-block;
  padding: 0.22rem 0.56rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.plg-risk-label.is-high {
  background: var(--danger-soft);
  color: var(--danger);
}

.plg-risk-label.is-moderate {
  background: var(--warning-soft);
  color: var(--warning);
}

.plg-risk-label.is-guarded {
  background: var(--accent-soft);
  color: var(--accent);
}

.plg-risk-label.is-low {
  background: var(--success-soft);
  color: var(--success);
}

.plg-kpi-verdict p {
  margin: 0.42rem 0 0;
  font-size: 0.81rem;
  line-height: 1.48;
  color: var(--ink-secondary);
}

.plg-kpi-cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.plg-kpi-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  min-width: 0;
}

.plg-kpi-cell strong {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}

.plg-kpi-cell strong.is-ocean {
  color: #0284c7;
}

[data-theme='dark'] .plg-kpi-cell strong.is-ocean {
  color: #38bdf8;
}

.plg-kpi-cell strong.is-violet {
  color: #7c3aed;
}

[data-theme='dark'] .plg-kpi-cell strong.is-violet {
  color: #a78bfa;
}

.plg-kpi-cell strong.is-emerald {
  color: #059669;
}

[data-theme='dark'] .plg-kpi-cell strong.is-emerald {
  color: #34d399;
}

.plg-kpi-cell strong.is-amber {
  color: #d97706;
}

[data-theme='dark'] .plg-kpi-cell strong.is-amber {
  color: #fbbf24;
}

.plg-kpi-cell span {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

/* Split Turnitin Workspace */
.plg-split-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.plg-doc-pane,
.plg-inspector-pane {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  overflow: hidden;
  min-width: 0;
}

.plg-pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.78rem 0.95rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-elevated);
}

.plg-pane-head strong {
  font-size: 0.85rem;
  color: var(--ink);
}

.plg-pane-head span {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.plg-manuscript-view {
  padding: 1.05rem 1.1rem;
  max-height: 540px;
  overflow-y: auto;
  line-height: 1.85;
  font-size: 0.92rem;
  color: var(--ink);
  word-break: break-word;
}

.plg-sent-hl,
.plg-sent-plain {
  display: inline;
  margin: 0;
  padding: 0.1rem 0.24rem;
  border: none;
  border-radius: 5px;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
  color: inherit;
  transition: opacity 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.plg-sent-hl {
  background: var(--hl-soft, rgba(225, 29, 72, 0.15));
  border-bottom: 2px solid var(--hl-color, #e11d48);
}

[data-theme='dark'] .plg-sent-hl {
  background: color-mix(in srgb, var(--hl-color, #e11d48) 22%, transparent);
}

.plg-sent-hl.is-dimmed {
  opacity: 0.34;
}

.plg-sent-hl.is-selected,
.plg-sent-plain.is-selected {
  box-shadow: 0 0 0 2px var(--primary);
}

.plg-sent-plain:hover {
  background: var(--surface-hover);
}

.plg-sent-plain.is-excluded {
  color: var(--ink-muted);
  font-style: italic;
}

.plg-inline-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  margin-right: 4px;
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: text-top;
}

/* Selected Sentence Detail Banner */
.plg-sentence-detail {
  margin: 0.85rem 0.95rem 0;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.34);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.plg-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.plg-detail-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.plg-detail-title strong {
  font-size: 0.84rem;
  color: var(--ink);
  word-break: break-word;
}

.plg-close-mini {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.plg-close-mini:hover {
  background: var(--surface-hover);
}

.plg-detail-quote {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-left: 3px solid var(--primary);
  background: var(--surface-elevated);
  font-size: 0.81rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.plg-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.plg-detail-reason {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.48;
  color: var(--ink-secondary);
}

.plg-detail-suggest {
  padding: 0.5rem 0.68rem;
  border-radius: 8px;
  background: var(--success-soft);
  color: var(--ink);
  font-size: 0.79rem;
  line-height: 1.48;
}

.plg-source-ext-link {
  align-self: flex-start;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.plg-source-ext-link:hover {
  text-decoration: underline;
}

/* Inspector Pane */
.plg-inspector-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
  background: var(--surface-elevated);
}

.plg-itab {
  min-height: 40px;
  padding: 0.45rem 0.35rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plg-itab:hover {
  color: var(--ink);
}

.plg-itab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--surface);
}

.plg-inspector-body {
  padding: 0.9rem;
  max-height: 540px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plg-sources-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.plg-link-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.plg-link-btn:hover {
  text-decoration: underline;
}

.plg-source-list,
.plg-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.plg-source-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}

.plg-source-item:hover,
.plg-source-item.is-active {
  border-color: var(--primary);
  background: var(--surface-elevated);
}

.plg-rank-sq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.plg-source-body {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  flex: 1 1 auto;
  min-width: 0;
}

.plg-source-body strong {
  font-size: 0.81rem;
  line-height: 1.35;
  color: var(--ink);
  word-break: break-word;
}

.plg-source-meta,
.plg-source-url {
  font-size: 0.71rem;
  color: var(--ink-muted);
  word-break: break-word;
}

.plg-source-pct {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink);
  flex-shrink: 0;
}

.plg-empty-box {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  text-align: center;
}

.plg-empty-box strong {
  display: block;
  font-size: 0.9rem;
  color: var(--success);
  margin-bottom: 0.25rem;
}

.plg-empty-box p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.48;
  color: var(--ink-muted);
}

/* AI Writing & Stylometrics Tab */
.plg-ai-panel,
.plg-filters-panel,
.plg-history-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plg-ai-score-banner {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.plg-ai-big {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--warning);
}

.plg-ai-score-banner p {
  margin: 0.35rem 0 0;
  font-size: 0.79rem;
  line-height: 1.48;
  color: var(--ink-secondary);
}

.plg-metric-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.plg-mbar-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: var(--ink-secondary);
  margin-bottom: 0.26rem;
}

.plg-mbar-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.plg-mbar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.plg-ai-models-note {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.plg-ai-summaries p {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.plg-recs-box {
  padding: 0.78rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.plg-recs-box strong {
  display: block;
  font-size: 0.81rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.plg-recs-box ul {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  font-size: 0.78rem;
  line-height: 1.46;
  color: var(--ink-secondary);
}

/* Filters Tab */
.plg-filter-intro {
  margin: 0;
  font-size: 0.79rem;
  line-height: 1.48;
  color: var(--ink-secondary);
}

.plg-toggle-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.plg-toggle-card input {
  margin-top: 0.18rem;
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.plg-toggle-card strong {
  display: block;
  font-size: 0.81rem;
  color: var(--ink);
}

.plg-toggle-card span {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.74rem;
  line-height: 1.42;
  color: var(--ink-muted);
}

.plg-small-src-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.plg-small-src-box label {
  font-size: 0.8rem;
  color: var(--ink);
}

/* History Tab */
.plg-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.68rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.plg-history-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.plg-history-meta strong {
  font-size: 0.8rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plg-history-meta span {
  font-size: 0.71rem;
  color: var(--ink-muted);
}

.plg-history-score {
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.plg-history-score.is-high {
  background: var(--danger-soft);
  color: var(--danger);
}

.plg-history-score.is-moderate {
  background: var(--warning-soft);
  color: var(--warning);
}

.plg-history-score.is-guarded {
  background: var(--accent-soft);
  color: var(--accent);
}

.plg-history-score.is-low {
  background: var(--success-soft);
  color: var(--success);
}

.plg-engines-footer {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.plg-engines-footer .plg-pane-head {
  padding: 0;
  border-bottom: none;
  background: transparent;
}

/* Turnitin & Multi-AI Settings Modal */
.plg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.plg-modal-card {
  width: min(540px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.plg-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plg-modal-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}

.plg-modal-desc {
  margin: 0;
  font-size: 0.81rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.plg-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.plg-field-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.plg-field-group input {
  width: 100%;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.plg-field-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.plg-sync-info {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  font-size: 0.78rem;
  line-height: 1.48;
  color: var(--ink-secondary);
}

.plg-sync-info strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.plg-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .plg-kpi-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .plg-split-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .plg-studio-head,
  .plg-input-card,
  .plg-progress-panel,
  .plg-report-shell {
    padding: 0.95rem;
  }

  .plg-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plg-dropzone {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem;
  }

  .plg-options-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.8rem;
  }

  .plg-option-item {
    flex-direction: column;
    align-items: stretch;
  }

  .plg-checks-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .plg-uf-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .plg-inspector-tabs {
    grid-template-columns: 1.2fr 1.05fr 0.72fr 0.88fr;
  }

  .plg-itab {
    font-size: 0.71rem;
    padding: 0.48rem 0.16rem;
    letter-spacing: -0.01em;
  }

  .plg-action-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .plg-download-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plg-download-bar .is-primary {
    grid-column: 1 / -1;
  }

  .plg-kpi-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .plg-kpi-cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plg-engine-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .plg-manuscript-view,
  .plg-inspector-body {
    max-height: 420px;
  }
}

/* ==========================================================================
   Plagiarism Checker v69 — Real Original Document Multi-Page Viewer & Fullscreen
   ========================================================================== */
body.plg-fs-lock {
  overflow: hidden !important;
}

.plg-doc-viewer {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.plg-viewer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-elevated);
}

.plg-viewer-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-wrap: wrap;
}

.plg-viewer-title strong {
  font-size: 0.86rem;
  color: var(--ink);
}

.plg-page-counter {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.16rem 0.5rem;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
}

.plg-viewer-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.plg-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.14rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.plg-zoom-val {
  font-size: 0.73rem;
  font-weight: 700;
  min-width: 38px;
  text-align: center;
  color: var(--ink-secondary);
}

.plg-vbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  min-height: 28px;
  min-width: 28px;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.plg-vbtn:hover:not(:disabled) {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
}

.plg-vbtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.plg-vbtn.is-fs-btn {
  border-color: var(--border-strong);
  background: var(--surface);
  padding: 0.28rem 0.68rem;
}

.plg-vbtn.is-fs-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.plg-dl-btn.is-fs-exit {
  border-color: color-mix(in srgb, var(--danger, #e11d48) 45%, var(--border));
  color: var(--danger, #e11d48);
}

/* Scrollable Multi-Page Document Desk */
.plg-pages-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  padding: 1rem 0.85rem 1.4rem;
  max-height: 680px;
  overflow-y: auto;
  overflow-x: auto;
  background: color-mix(in srgb, var(--bg) 82%, var(--border) 18%);
  scroll-behavior: smooth;
}

.plg-orig-page-card {
  width: min(100%, calc(720px * var(--plg-zoom, 1)));
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  flex-shrink: 0;
}

.plg-orig-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.44rem 0.8rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.plg-orig-page-head > span:first-child {
  white-space: nowrap;
  flex-shrink: 0;
}

.plg-orig-page-head > span:last-child {
  text-align: right;
  min-width: 0;
}

.plg-orig-page-body {
  display: flex;
  align-items: stretch;
  padding: 0.55rem 0.65rem 0.65rem 0.25rem;
  background: #ffffff;
}

.plg-orig-page-gutter {
  position: relative;
  width: 30px;
  flex-shrink: 0;
}

.plg-margin-badge {
  position: absolute;
  left: 3px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  transition: transform 0.14s ease, opacity 0.14s ease;
  padding: 0;
}

.plg-margin-badge:hover,
.plg-margin-badge.is-selected {
  transform: translateY(-50%) scale(1.16);
  z-index: 4;
}

.plg-margin-badge.is-dimmed {
  opacity: 0.22;
}

.plg-orig-page-canvas-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.plg-orig-page-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.plg-orig-hl-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.plg-hl-rect {
  position: absolute;
  pointer-events: auto;
  border: none;
  padding: 0;
  margin: 0;
  border-radius: 2px;
  background: var(--hl-color, #e11d48);
  opacity: 0.28;
  cursor: pointer;
  transition: opacity 0.14s ease, outline-color 0.14s ease;
}

.plg-hl-rect:hover {
  opacity: 0.44;
}

.plg-hl-rect.is-selected {
  opacity: 0.46;
  outline: 2px solid var(--hl-color, #e11d48);
  outline-offset: 1px;
  z-index: 3;
}

.plg-hl-rect.is-dimmed {
  opacity: 0.06;
}

/* Rich DOCX & A4 Document Sheet Layout (Always Crisp White Paper Sheet) */
.plg-rich-a4-page {
  padding: 1.75rem 2rem;
  background: #ffffff;
  color: #1e293b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(0.92rem * var(--plg-zoom, 1));
  line-height: 1.72;
  word-break: break-word;
}

.plg-rich-h {
  font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  color: #0f172a;
  margin: 0.85rem 0 0.45rem;
  line-height: 1.3;
}

.plg-rich-h.is-lvl-1 {
  font-size: 1.24em;
  font-weight: 800;
}

.plg-rich-h.is-lvl-2 {
  font-size: 1.06em;
  font-weight: 700;
}

.plg-rich-h.is-lvl-3 {
  font-size: 0.98em;
  font-weight: 700;
}

.plg-rich-p,
.plg-rich-li {
  margin: 0 0 0.7rem;
}

.plg-rich-li {
  padding-left: 0.8rem;
}

.plg-rich-tbl-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0.75rem 0;
}

.plg-rich-tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.82em;
}

.plg-rich-tbl th,
.plg-rich-tbl td {
  border: 1px solid #cbd5e1;
  padding: 0.42rem 0.55rem;
  text-align: left;
  color: #0f172a;
}

.plg-rich-tbl th {
  background: #f1f5f9;
  font-weight: 700;
}

.plg-rich-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.7rem auto;
  border-radius: 6px;
}

.plg-rich-hl {
  display: inline;
  padding: 0.08rem 0.24rem;
  border: none;
  border-bottom: 2px solid var(--hl-color, #e11d48);
  border-radius: 3px;
  background: var(--hl-soft, rgba(225, 29, 72, 0.16));
  color: #0f172a;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  transition: opacity 0.14s ease;
}

.plg-rich-hl.is-dimmed {
  opacity: 0.35;
}

.plg-rich-hl.is-selected {
  outline: 2px solid var(--hl-color, #e11d48);
  outline-offset: 1px;
}

.plg-rich-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  margin-right: 4px;
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.66rem;
  font-weight: 800;
  vertical-align: middle;
}

/* Fullscreen Studio Mode (True Full-Viewport Turnitin Original-Document Experience) */
.plg-report-shell.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 980;
  margin: 0;
  padding: 0.85rem 1.1rem;
  border-radius: 0;
  border: none;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
  max-width: none;
  width: 100vw;
  height: 100dvh;
}

.plg-report-shell.is-fullscreen .plg-report-topbar {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.plg-report-shell.is-fullscreen .plg-split-workspace {
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.plg-report-shell.is-fullscreen .plg-doc-viewer,
.plg-report-shell.is-fullscreen .plg-inspector-pane {
  height: 100%;
  min-height: 0;
}

.plg-report-shell.is-fullscreen .plg-pages-stage {
  flex: 1;
  max-height: none;
}

.plg-report-shell.is-fullscreen .plg-inspector-body {
  flex: 1;
  max-height: none;
}

@media (max-width: 960px) {
  .plg-report-shell.is-fullscreen {
    overflow-y: auto;
    height: 100dvh;
  }

  .plg-report-shell.is-fullscreen .plg-split-workspace {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .plg-report-shell.is-fullscreen .plg-doc-viewer {
    height: auto;
    min-height: 62dvh;
  }

  .plg-report-shell.is-fullscreen .plg-pages-stage {
    max-height: 64dvh;
  }
}

@media (max-width: 640px) {
  .plg-viewer-bar {
    padding: 0.55rem 0.68rem;
  }

  .plg-pages-stage {
    padding: 0.65rem 0.45rem 1rem;
    max-height: 520px;
  }

  .plg-orig-page-body {
    padding: 0.35rem 0.35rem 0.45rem 0.12rem;
  }

  .plg-orig-page-gutter {
    width: 24px;
  }

  .plg-margin-badge {
    width: 19px;
    height: 19px;
    font-size: 0.62rem;
    left: 2px;
  }

  .plg-rich-a4-page {
    padding: 1rem 0.95rem;
    font-size: 0.88rem;
  }
}

/* ============================================================================
   NOVEL TERPADU HUB & FULLSCREEN READER (v70)
   Top-5 Play Store / App Store Novel App UI + 122+ Themes + Audiobook Mode
   ========================================================================== */

body.nvl-reader-locked {
  overflow: hidden;
}

.novel-panel {
  overflow-x: clip;
}

.nvl-app {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.nvl-app .sr-only,
.nvl-reader-overlay .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Top Bar & Sub-Tabs */
.nvl-topbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: var(--surface-card, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.18));
}

.nvl-topbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nvl-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nvl-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.nvl-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.24));
  background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.nvl-refresh-btn:hover {
  border-color: var(--accent-primary, #3b82f6);
}

.nvl-refresh-btn.is-spinning svg {
  animation: nvlSpin 0.85s linear infinite;
}

@keyframes nvlSpin {
  to {
    transform: rotate(360deg);
  }
}

.nvl-subtabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.16));
  overflow-x: auto;
  scrollbar-width: none;
}

.nvl-subtabs::-webkit-scrollbar {
  display: none;
}

.nvl-subtab {
  position: relative;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.nvl-subtab.is-active {
  color: var(--accent-primary, #3b82f6);
}

.nvl-subtab.is-active::after {
  content: '';
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent-primary, #3b82f6);
}

.nvl-tab-count {
  font-size: 0.76rem;
  opacity: 0.8;
}

/* Shared Buttons & Form Controls */
.nvl-btn-primary,
.nvl-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, opacity 0.14s ease, border-color 0.16s ease;
}

.nvl-btn-primary {
  border: none;
  background: var(--accent-primary, #2563eb);
  color: #ffffff;
}

.nvl-btn-primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.nvl-btn-secondary {
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.28));
  background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
  color: var(--text-primary);
}

.nvl-btn-secondary:hover:not(:disabled) {
  border-color: var(--accent-primary, #3b82f6);
}

.nvl-btn-secondary.is-saved {
  border-color: #f59e0b;
  color: #f59e0b;
}

.nvl-btn-sm {
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 10px;
}

.nvl-full-btn {
  width: 100%;
  margin-top: 0.6rem;
}

.nvl-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.24));
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
}

.nvl-link-btn {
  border: none;
  background: transparent;
  color: var(--accent-primary, #3b82f6);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}

.nvl-danger-link {
  color: #ef4444;
}

.nvl-input,
.nvl-textarea,
.nvl-sort-select {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.28));
  background: var(--surface-elevated, rgba(15, 23, 42, 0.35));
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
}

[data-theme='light'] .nvl-input,
[data-theme='light'] .nvl-textarea,
[data-theme='light'] .nvl-sort-select {
  background: #ffffff;
}

.nvl-textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}

.nvl-input-sm {
  min-height: 38px;
  padding: 0.42rem 0.75rem;
  font-size: 0.84rem;
}

.nvl-input-num {
  width: 78px;
  flex-shrink: 0;
  text-align: center;
  min-height: 38px;
  padding: 0.4rem 0.5rem;
}

/* Hero Spotlight (Top-5 Play Store / App Store Featured Novel Card) */
.nvl-hero {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 1.35rem;
  align-items: center;
  padding: 1.35rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(124, 58, 237, 0.1));
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.2));
}

[data-theme='light'] .nvl-hero {
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border-color: rgba(37, 99, 235, 0.18);
}

.nvl-hero-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.28);
  display: block;
}

.nvl-hero-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary, #3b82f6);
}

.nvl-hero-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nvl-hero-meta {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.nvl-hero-synopsis {
  margin: 0.65rem 0 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nvl-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Sections & Shelves */
.nvl-body {
  display: flex;
  flex-direction: column;
  gap: 1.45rem;
  min-width: 0;
}

.nvl-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.nvl-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.nvl-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.nvl-section-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Continue Reading Resume Shelf */
.nvl-resume-shelf {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x proximity;
}

.nvl-resume-card {
  flex: 0 0 265px;
  scroll-snap-align: start;
  display: flex;
  gap: 0.75rem;
  padding: 0.7rem;
  border-radius: 14px;
  background: var(--surface-card, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.18));
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.nvl-resume-card:hover {
  border-color: var(--accent-primary, #3b82f6);
  transform: translateY(-2px);
}

.nvl-resume-cover {
  width: 56px;
  height: 82px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.nvl-resume-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.22rem;
}

.nvl-resume-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nvl-resume-sub,
.nvl-resume-time {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nvl-mini-progress {
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
  margin: 0.15rem 0;
}

.nvl-mini-progress span {
  display: block;
  height: 100%;
  background: var(--accent-primary, #3b82f6);
  border-radius: 99px;
}

/* Filter Strip */
.nvl-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nvl-genre-strip {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
}

.nvl-genre-strip::-webkit-scrollbar {
  display: none;
}

.nvl-genre-btn {
  min-height: 38px;
  padding: 0.42rem 0.88rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.22));
  background: var(--surface-card, rgba(255, 255, 255, 0.03));
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.nvl-genre-btn.is-active {
  background: var(--accent-primary, #2563eb);
  border-color: var(--accent-primary, #2563eb);
  color: #ffffff;
}

.nvl-sort-wrap {
  min-width: 160px;
}

/* Book Cards & Shelves */
.nvl-horizontal-shelf {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.45rem;
  scroll-snap-type: x proximity;
}

.nvl-horizontal-shelf .nvl-book-card {
  flex: 0 0 148px;
  scroll-snap-align: start;
}

.nvl-book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 1rem;
  width: 100%;
}

.nvl-book-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  min-width: 0;
  transition: transform 0.16s ease;
}

.nvl-book-card:hover {
  transform: translateY(-3px);
}

.nvl-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #1e293b;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.22);
}

.nvl-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nvl-rank-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 0.18rem 0.48rem;
  border-radius: 7px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

.nvl-free-tag {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 0.14rem 0.42rem;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.92);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
}

.nvl-rating-tag {
  position: absolute;
  bottom: 7px;
  left: 7px;
  padding: 0.14rem 0.44rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.78);
  color: #fde047;
  font-size: 0.7rem;
  font-weight: 700;
}

.nvl-card-info {
  min-width: 0;
}

.nvl-card-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nvl-card-meta {
  margin: 0.22rem 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nvl-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

/* Search, Excerpt/Screenshot/File Matcher & Library Panels */
.nvl-search-layout,
.nvl-library-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nvl-panel {
  padding: 1.2rem;
  border-radius: 16px;
  background: var(--surface-card, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.18));
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.nvl-panel-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-primary);
}

.nvl-panel-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.nvl-search-form {
  display: flex;
  gap: 0.6rem;
}

.nvl-mode-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nvl-seg-btn {
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.24));
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.nvl-seg-btn.is-active {
  background: var(--accent-primary, #2563eb);
  border-color: var(--accent-primary, #2563eb);
  color: #ffffff;
}

.nvl-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  min-height: 112px;
  padding: 1.1rem;
  border-radius: 14px;
  border: 1.5px dashed var(--accent-primary, #3b82f6);
  background: rgba(59, 130, 246, 0.06);
  cursor: pointer;
}

.nvl-dropzone-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nvl-dropzone-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.nvl-matcher-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.nvl-progress-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nvl-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.nvl-progress-track span {
  display: block;
  height: 100%;
  background: var(--accent-primary, #3b82f6);
  transition: width 0.25s ease;
}

.nvl-progress-label,
.nvl-status-inline,
.nvl-mini-status {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.nvl-alert-warn {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  font-size: 0.84rem;
}

.nvl-local-reader-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.nvl-local-reader-banner p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.nvl-extracted-preview {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.nvl-match-results,
.nvl-match-list,
.nvl-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nvl-match-card,
.nvl-history-row {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: 14px;
  background: var(--surface-elevated, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.18));
}

.nvl-match-cover,
.nvl-history-cover {
  width: 62px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.nvl-match-body,
.nvl-history-info {
  min-width: 0;
  flex: 1;
}

.nvl-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nvl-match-head h4,
.nvl-history-info h4 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nvl-match-score {
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.nvl-match-score.is-high {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
}

.nvl-match-score.is-mid {
  background: rgba(59, 130, 246, 0.18);
  color: #3b82f6;
}

.nvl-match-score.is-low {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.nvl-match-reason {
  margin: 0.3rem 0 0.55rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.nvl-match-actions,
.nvl-history-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.nvl-empty-box {
  padding: 1.6rem 1.2rem;
  text-align: center;
  border-radius: 14px;
  border: 1px dashed var(--border-subtle, rgba(148, 163, 184, 0.25));
  color: var(--text-secondary);
}

.nvl-mt-md {
  margin-top: 0.8rem;
}

/* Loading Skeletons */
.nvl-skeleton-hero {
  height: 220px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.1), rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.1));
  background-size: 200% 100%;
  animation: nvlShimmer 1.3s infinite;
}

.nvl-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.nvl-skeleton-card {
  aspect-ratio: 2 / 3.3;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.09), rgba(148, 163, 184, 0.18), rgba(148, 163, 184, 0.09));
  background-size: 200% 100%;
  animation: nvlShimmer 1.3s infinite;
}

@keyframes nvlShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Book Detail Modal */
.nvl-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.nvl-detail-modal {
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--bg-surface, #0f172a);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.22));
  overflow: hidden;
}

[data-theme='light'] .nvl-detail-modal {
  background: #ffffff;
}

.nvl-detail-header {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.18));
  background: inherit;
}

.nvl-detail-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.nvl-detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.1rem 1.15rem 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.nvl-detail-top {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.nvl-detail-head-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.nvl-detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.24);
  display: block;
}

.nvl-detail-head-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.nvl-detail-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}

.nvl-detail-meta {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.nvl-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.nvl-detail-free-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 7px;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  font-size: 0.72rem;
  font-weight: 700;
}

[data-theme='dark'] .nvl-detail-free-pill {
  color: #34d399;
}

.nvl-detail-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.nvl-detail-synopsis {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  word-break: break-word;
}

.nvl-detail-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.nvl-chapters-section {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.nvl-chapters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nvl-chapters-head h4 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
}

.nvl-chapters-head .nvl-input {
  max-width: 240px;
}

.nvl-chapter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.45rem;
  max-height: 310px;
  overflow-y: auto;
}

.nvl-chapter-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 42px;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.16));
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.nvl-chapter-row:hover,
.nvl-chapter-row.is-current {
  border-color: var(--accent-primary, #3b82f6);
  background: rgba(59, 130, 246, 0.1);
}

.nvl-ch-num {
  font-size: 0.76rem;
  font-weight: 700;
  opacity: 0.7;
  min-width: 28px;
}

.nvl-ch-title {
  flex: 1;
  min-width: 0;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nvl-ch-free {
  font-size: 0.7rem;
  font-weight: 700;
  color: #10b981;
}

/* ============================================================================
   IMMERSIVE FULLSCREEN NOVEL READER OVERLAY
   ========================================================================== */

.nvl-reader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  color: var(--nvl-r-text);
  overflow: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

.nvl-reader-motif {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-size: 420px 420px;
  pointer-events: none;
  z-index: 0;
}

.nvl-reader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Compact Top Bar (<= 52px) */
.nvl-reader-topbar {
  position: relative;
  z-index: 3;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0 0.85rem;
  background: var(--nvl-r-surface);
  border-bottom: 1px solid var(--nvl-r-border);
  backdrop-filter: blur(10px);
}

.nvl-reader-top-left,
.nvl-reader-top-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.nvl-reader-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nvl-r-book-title {
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nvl-r-ch-title {
  font-size: 0.73rem;
  color: var(--nvl-r-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nvl-r-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  border-radius: 9px;
  border: 1px solid var(--nvl-r-border);
  background: transparent;
  color: var(--nvl-r-text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.nvl-r-btn.is-active {
  background: var(--nvl-r-accent);
  border-color: var(--nvl-r-accent);
  color: #ffffff;
}

/* Reading Stage */
.nvl-reader-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  padding: 1.35rem 1rem 2.2rem;
  display: flex;
  justify-content: center;
}

.nvl-reader-paper {
  width: 100%;
  max-width: 780px;
  min-height: 100%;
  padding: 1.85rem 2.1rem;
  border-radius: 18px;
  background: var(--nvl-r-surface);
  border: 1px solid var(--nvl-r-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  font-family: var(--nvl-r-font);
  font-size: var(--nvl-r-size);
  line-height: var(--nvl-r-lh);
  text-align: var(--nvl-r-align);
  height: fit-content;
}

.nvl-chapter-heading-wrap {
  margin-bottom: 1.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--nvl-r-border);
}

.nvl-chapter-kicker {
  margin: 0 0 0.3rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--nvl-r-accent);
  letter-spacing: 0.03em;
}

.nvl-chapter-heading {
  margin: 0;
  font-size: 1.38em;
  font-weight: 800;
  line-height: 1.28;
}

.nvl-chapter-paragraphs {
  display: flex;
  flex-direction: column;
  gap: 0.95em;
}

.nvl-para {
  margin: 0;
  border-radius: 8px;
  transition: background 0.18s ease;
}

.nvl-para.is-speaking {
  background: color-mix(in srgb, var(--nvl-r-accent) 22%, transparent);
  padding: 0.35rem 0.55rem;
  margin-left: -0.55rem;
  margin-right: -0.55rem;
}

.nvl-reader-loading {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.92rem;
}

.nvl-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--nvl-r-border);
  border-top-color: var(--nvl-r-accent);
  animation: nvlSpin 0.8s linear infinite;
}

.nvl-reader-nav-footer {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--nvl-r-border);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.nvl-page-turn-bar,
.nvl-chapter-turn-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.55rem;
  align-items: center;
}

.nvl-r-nav-btn,
.nvl-r-page-pill {
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  border-radius: 11px;
  border: 1px solid var(--nvl-r-border);
  background: transparent;
  color: var(--nvl-r-text);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.nvl-r-nav-btn.is-primary {
  background: var(--nvl-r-accent);
  border-color: var(--nvl-r-accent);
  color: #ffffff;
}

.nvl-r-nav-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

/* Compact Bottom Thumb Bar (<= 54px -> Total top+bottom = 106px < 13% on mobile!) */
.nvl-reader-bottombar {
  position: relative;
  z-index: 4;
  height: 54px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--nvl-r-surface);
  border-top: 1px solid var(--nvl-r-border);
  backdrop-filter: blur(10px);
}

.nvl-r-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--nvl-r-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.nvl-r-tab.is-active {
  color: var(--nvl-r-accent);
}

/* Reader Drawers (Chapters, Page Jump, 122+ Themes, Typography, Voice) */
.nvl-drawer {
  position: relative;
  z-index: 4;
  max-height: 48vh;
  overflow-y: auto;
  padding: 0.95rem 1.1rem;
  background: var(--nvl-r-surface);
  color: var(--nvl-r-text);
  border-top: 1px solid var(--nvl-r-border);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.nvl-reader-overlay .nvl-input,
.nvl-reader-overlay .nvl-sort-select {
  background: color-mix(in srgb, var(--nvl-r-text) 8%, var(--nvl-r-bg));
  color: var(--nvl-r-text);
  border-color: var(--nvl-r-border);
}

.nvl-reader-overlay .nvl-input::placeholder {
  color: var(--nvl-r-muted);
  opacity: 0.85;
}

.nvl-reader-overlay .nvl-btn-secondary,
.nvl-reader-overlay .nvl-icon-btn,
.nvl-reader-overlay .nvl-seg-btn {
  background: color-mix(in srgb, var(--nvl-r-text) 8%, transparent);
  color: var(--nvl-r-text);
  border-color: var(--nvl-r-border);
}

.nvl-reader-overlay .nvl-seg-btn.is-active {
  background: var(--nvl-r-accent);
  border-color: var(--nvl-r-accent);
  color: #ffffff;
}

.nvl-drawer-tall {
  max-height: 62vh;
}

.nvl-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.nvl-drawer-head h4 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
}

.nvl-drawer-jump-row,
.nvl-ai-theme-row,
.nvl-page-jump-inline {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nvl-drawer-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
}

.nvl-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.nvl-drawer-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--nvl-r-muted);
}

.nvl-range {
  width: 100%;
  accent-color: var(--nvl-r-accent);
}

/* 122+ Theme Studio Grid */
.nvl-theme-tools-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--nvl-r-border);
}

.nvl-custom-theme-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.nvl-upload-lbl {
  cursor: pointer;
}

.nvl-theme-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.nvl-theme-cats {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}

.nvl-cat-btn {
  min-height: 34px;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--nvl-r-border);
  background: transparent;
  color: var(--nvl-r-muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.nvl-cat-btn.is-active {
  background: var(--nvl-r-accent);
  border-color: var(--nvl-r-accent);
  color: #ffffff;
}

.nvl-theme-filter-row .nvl-input {
  max-width: 220px;
}

.nvl-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 0.65rem;
}

.nvl-theme-item {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.nvl-theme-swatch {
  position: relative;
  height: 62px;
  width: 100%;
  border-radius: 12px;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.22);
}

.nvl-swatch-aa {
  font-size: 1rem;
  font-weight: 800;
}

.nvl-swatch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.nvl-swatch-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 0.08rem 0.3rem;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
}

.nvl-theme-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.nvl-theme-name {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nvl-theme-del {
  border: none;
  background: transparent;
  color: #ef4444;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0 0.2rem;
}

/* Typography & Voice Drawers */
.nvl-typo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.nvl-stepper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nvl-font-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nvl-voice-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nvl-voice-transport {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.nvl-voice-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 0.7rem;
  align-items: end;
}

.nvl-voice-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.nvl-voice-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  cursor: pointer;
  min-height: 40px;
}

/* Mobile Responsive Polish (360px - 640px, Zero Horizontal Overflow) */
@media (max-width: 640px) {
  .dracin-unified-header {
    padding: 0.85rem 0.9rem;
    align-items: flex-start;
  }

  .dracin-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dracin-search-input-wrap {
    flex: 1 1 auto;
    width: 100%;
  }

  .dracin-search-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .dracin-search-btns .btn {
    width: 100%;
    justify-content: center;
  }

  .dracin-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
  }

  .nvl-topbar {
    padding: 0.85rem 0.9rem;
  }

  .nvl-subtabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
    overflow: hidden;
  }

  .nvl-subtab {
    min-width: 0;
    padding: 0.5rem 0.3rem;
    font-size: 0.79rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nvl-hero {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.95rem;
    align-items: start;
  }

  .nvl-hero-title {
    font-size: 1.08rem;
  }

  .nvl-hero-synopsis {
    -webkit-line-clamp: 2;
    font-size: 0.82rem;
    margin: 0.45rem 0 0.7rem;
  }

  .nvl-hero-actions .nvl-btn-primary,
  .nvl-hero-actions .nvl-btn-secondary {
    flex: 1 1 auto;
    min-height: 40px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }

  .nvl-book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .nvl-horizontal-shelf .nvl-book-card {
    flex: 0 0 132px;
  }

  .nvl-search-form {
    flex-direction: column;
  }

  .nvl-modal-backdrop {
    padding: 0.6rem;
    align-items: flex-end;
  }

  .nvl-detail-modal {
    max-height: 90dvh;
    border-radius: 18px 18px 14px 14px;
  }

  .nvl-detail-head-row {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.85rem;
  }

  .nvl-detail-title {
    font-size: 1.05rem;
  }

  .nvl-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .nvl-detail-actions .nvl-btn-primary,
  .nvl-detail-actions .nvl-btn-secondary {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
  }

  .nvl-chapters-head .nvl-input {
    max-width: 100%;
  }

  .nvl-reader-stage {
    padding: 0.75rem 0.55rem 1.4rem;
  }

  .nvl-reader-paper {
    padding: 1.15rem 1rem;
    border-radius: 14px;
  }

  .nvl-r-btn span {
    display: none;
  }

  .nvl-page-turn-bar,
  .nvl-chapter-turn-bar {
    grid-template-columns: 1fr 1fr;
  }

  .nvl-r-page-pill,
  .nvl-chapter-turn-bar > button:nth-child(2) {
    grid-column: 1 / -1;
    order: -1;
  }

  .nvl-theme-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .nvl-match-card,
  .nvl-history-row {
    align-items: flex-start;
  }
}

/* ============================================================
   v74: Mobile Cart FAB Clearance + Banner & Header Polish + Admin Sync UI
   ============================================================ */
.header-nav {
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 92%, transparent 100%);
  padding-right: 1.25rem;
}

@media (max-width: 768px) {
  body.has-mobile-cart .music-widget-root:not(.is-custom-pos),
  .music-widget-root.is-above-mobile-cart:not(.is-custom-pos) {
    bottom: calc(5.85rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 640px) {
  .banner-slide-content {
    padding: 1.1rem 2.7rem 2.6rem !important;
  }

  .banner-nav-btn {
    width: 28px !important;
    height: 28px !important;
  }

  .banner-nav-btn.is-prev {
    left: 6px !important;
  }

  .banner-nav-btn.is-next {
    right: 6px !important;
  }
}

.admin-banner-preview-mini.emerald::after {
  background: linear-gradient(105deg, rgba(4, 34, 28, 0.88) 0%, rgba(6, 78, 59, 0.36) 72%, rgba(4, 34, 28, 0.14) 100%);
}
.admin-banner-preview-mini.weather::after {
  background: linear-gradient(105deg, rgba(10, 24, 52, 0.88) 0%, rgba(14, 65, 110, 0.36) 72%, rgba(10, 24, 52, 0.14) 100%);
}
.admin-banner-preview-mini.world::after {
  background: linear-gradient(105deg, rgba(18, 18, 52, 0.88) 0%, rgba(49, 46, 129, 0.36) 72%, rgba(18, 18, 52, 0.14) 100%);
}
.admin-banner-preview-mini.prayer::after {
  background: linear-gradient(105deg, rgba(7, 32, 44, 0.88) 0%, rgba(22, 78, 99, 0.36) 72%, rgba(7, 32, 44, 0.14) 100%);
}
.admin-banner-preview-mini.downloader::after {
  background: linear-gradient(105deg, rgba(36, 12, 48, 0.88) 0%, rgba(112, 26, 117, 0.36) 72%, rgba(36, 12, 48, 0.14) 100%);
}
.admin-banner-preview-mini.violet::after {
  background: linear-gradient(105deg, rgba(28, 14, 56, 0.88) 0%, rgba(88, 28, 135, 0.36) 72%, rgba(28, 14, 56, 0.14) 100%);
}
.admin-banner-preview-mini.crimson::after {
  background: linear-gradient(105deg, rgba(44, 12, 22, 0.88) 0%, rgba(127, 29, 29, 0.36) 72%, rgba(44, 12, 22, 0.14) 100%);
}
.admin-banner-preview-mini.amber::after {
  background: linear-gradient(105deg, rgba(42, 22, 8, 0.88) 0%, rgba(120, 53, 15, 0.36) 72%, rgba(42, 22, 8, 0.14) 100%);
}

/* Admin Status Sinkronisasi Panel */
.admin-sync-panel {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.8rem;
}

.admin-sync-panel.is-synced {
  border-color: rgba(16, 185, 129, 0.35);
}

.admin-sync-panel.is-draft {
  border-color: rgba(245, 158, 11, 0.42);
}

.admin-sync-panel.is-attention {
  border-color: rgba(239, 68, 68, 0.45);
}

.admin-sync-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-sync-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.admin-sync-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
  background-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.admin-sync-dot.is-draft {
  background-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}

.admin-sync-dot.is-attention {
  background-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}

.admin-sync-time {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.admin-sync-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.admin-sync-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.admin-sync-tile {
  padding: 0.68rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.admin-sync-tile.is-ok {
  border-color: rgba(16, 185, 129, 0.28);
}

.admin-sync-tile.is-draft {
  border-color: rgba(245, 158, 11, 0.34);
}

.admin-sync-tile.is-warn {
  border-color: rgba(239, 68, 68, 0.38);
}

.admin-sync-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.admin-sync-tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.admin-sync-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.08rem 0.38rem;
  border-radius: 5px;
  white-space: nowrap;
}

.admin-sync-pill.is-ok {
  color: #10b981;
  background: rgba(16, 185, 129, 0.14);
}

.admin-sync-pill.is-draft {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
}

.admin-sync-pill.is-warn {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
}

.admin-sync-tile-value {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.admin-sync-tile-detail {
  font-size: 0.74rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

/* Tab Counters */
.admin-tabs .cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.admin-tab-count {
  font-size: 0.71rem;
  font-weight: 700;
  padding: 0.06rem 0.38rem;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.18);
  color: inherit;
  line-height: 1.35;
}

.admin-tabs .cat-tab.is-active .admin-tab-count {
  background: rgba(255, 255, 255, 0.22);
}

/* Collapsible Tidy Admin Cards (Banners & Utilities) */
.admin-collapsible-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}

.admin-collapsible-card.is-disabled-item {
  opacity: 0.68;
  border-style: dashed;
}

.admin-collapsible-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
}

.admin-collapsible-summary::-webkit-details-marker {
  display: none;
}

.admin-collapsible-body {
  padding: 0.85rem 0.95rem 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.85rem;
}

.admin-util-summary-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 1 1 auto;
}

.admin-util-summary-meta {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.admin-util-summary-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.admin-util-summary-right {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.admin-banner-summary-thumb {
  width: 84px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  object-position: right center;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: #0b1120;
}

.admin-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 0.25rem 0.52rem;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.admin-switch-label input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.admin-callout-live-preview {
  padding: 0.72rem 0.88rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(56, 189, 248, 0.42);
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-callout-live-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

@media (max-width: 960px) {
  .admin-sync-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-sync-grid {
    grid-template-columns: 1fr;
  }
  .admin-sync-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .admin-sync-actions > .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .admin-collapsible-summary {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-util-summary-right {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   v75 — Cek Nomor & Caller ID Anti-Spam Multi-API Hub (.cid-*)
   ========================================================================== */
.cid-app {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.cid-tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.cid-search-shell {
  display: grid;
  gap: 0.72rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.cid-search-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
}

.cid-region-select {
  height: 46px;
  max-width: 170px;
  padding: 0 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.cid-phone-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 600;
}

.cid-phone-input:focus,
.cid-region-select:focus,
.cid-inline-search:focus,
.cid-claim-box textarea:focus,
.cid-field input:focus,
.cid-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.cid-submit-btn {
  min-height: 46px;
  padding-inline: 1.25rem;
  white-space: nowrap;
}

.cid-search-subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.cid-quick-samples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.cid-quick-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.cid-sample-btn {
  min-height: 32px;
  padding: 0.25rem 0.62rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.cid-sample-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: var(--accent-soft);
}

.cid-link-toggle {
  min-height: 34px;
  padding: 0.25rem 0.65rem;
  border-radius: 7px;
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--accent);
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
}

.cid-link-toggle:hover {
  background: var(--accent-soft);
}

.cid-claim-box {
  display: grid;
  gap: 0.38rem;
  padding-top: 0.2rem;
}

.cid-claim-box label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.cid-claim-box textarea {
  width: 100%;
  padding: 0.62rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.84rem;
  resize: vertical;
}

.cid-error-banner {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 600;
}

.cid-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.65rem;
}

.cid-tab-btn {
  min-height: 44px;
  padding: 0.48rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.cid-tab-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--surface-elevated);
}

.cid-tab-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

.cid-workspace-body {
  min-width: 0;
}

.cid-loading-card {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
}

.cid-loading-card strong {
  display: block;
  font-size: 0.96rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.cid-loading-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.cid-loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  flex-shrink: 0;
  animation: ytmSpin 0.8s linear infinite;
}

.cid-empty-workspace {
  display: grid;
  gap: 0.95rem;
  padding: 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.cid-empty-head h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--ink);
}

.cid-empty-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.cid-engine-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.cid-overview-row {
  display: grid;
  gap: 0.22rem;
  padding: 0.82rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
}

.cid-overview-row strong {
  font-size: 0.85rem;
  color: var(--ink);
}

.cid-overview-row span {
  font-size: 0.79rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.cid-transparency-note {
  margin: 0;
  padding: 0.72rem 0.88rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: var(--bg-subtle);
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.48;
}

.cid-result-grid {
  display: grid;
  gap: 0.95rem;
  min-width: 0;
}

.cid-verdict-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  border-left-width: 4px;
}

.cid-verdict-card.is-safe {
  border-left-color: var(--success);
}

.cid-verdict-card.is-warn {
  border-left-color: var(--warning);
}

.cid-verdict-card.is-danger {
  border-left-color: var(--danger);
}

.cid-verdict-card.is-info {
  border-left-color: var(--accent);
}

.cid-verdict-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.cid-verdict-identity {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  flex: 1 1 auto;
}

.cid-verdict-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.cid-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cid-status-dot.is-safe {
  background: var(--success);
}

.cid-status-dot.is-warn {
  background: var(--warning);
}

.cid-status-dot.is-danger {
  background: var(--danger);
}

.cid-status-dot.is-info {
  background: var(--accent);
}

.cid-verdict-label {
  color: var(--ink);
  font-size: 0.86rem;
}

.cid-primary-number {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.62rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.cid-meta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.77rem;
  color: var(--ink-muted);
}

.cid-trust-gauge {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.cid-score-box {
  min-width: 84px;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  display: grid;
  justify-items: center;
  line-height: 1.1;
}

.cid-score-box.is-safe {
  border-color: rgba(16, 185, 129, 0.45);
  background: var(--success-soft);
  color: var(--success);
}

.cid-score-box.is-warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--warning-soft);
  color: var(--warning);
}

.cid-score-box.is-danger {
  border-color: rgba(239, 68, 68, 0.48);
  background: var(--danger-soft);
  color: var(--danger);
}

.cid-score-box.is-info {
  border-color: rgba(6, 182, 212, 0.42);
  background: var(--accent-soft);
  color: var(--accent);
}

.cid-score-num {
  font-size: 1.45rem;
  font-weight: 800;
}

.cid-score-cap {
  font-size: 0.67rem;
  font-weight: 700;
  opacity: 0.9;
  margin-top: 0.14rem;
}

.cid-risk-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.cid-verdict-summary {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.cid-official-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.78rem 0.92rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.42);
  background: var(--success-soft);
}

.cid-official-callout strong {
  display: block;
  font-size: 0.88rem;
  color: var(--success);
}

.cid-official-callout p {
  margin: 0.12rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.cid-telecom-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.58rem;
}

.cid-spec-item {
  display: grid;
  gap: 0.16rem;
  padding: 0.62rem 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  min-width: 0;
}

.cid-spec-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.cid-spec-val {
  font-size: 0.82rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.cid-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.cid-action-bar .btn {
  min-height: 40px;
}

.cid-panel-card {
  display: grid;
  gap: 0.8rem;
  padding: 1.05rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
}

.cid-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.cid-panel-head h3,
.cid-panel-head h4 {
  margin: 0 0 0.18rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--ink);
}

.cid-panel-head p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.cid-muted-line {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-muted);
}

.cid-tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.cid-tag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.72rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  font-size: 0.8rem;
}

.cid-tag-item.is-safe {
  border-color: rgba(16, 185, 129, 0.42);
  background: var(--success-soft);
}

.cid-tag-item.is-nuisance {
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--warning-soft);
}

.cid-tag-item.is-spam {
  border-color: rgba(239, 68, 68, 0.45);
  background: var(--danger-soft);
}

.cid-tag-name {
  font-weight: 700;
  color: var(--ink);
}

.cid-tag-meta {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.cid-tag-form {
  display: grid;
  gap: 0.75rem;
  padding: 0.88rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
}

.cid-tag-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.cid-preset-btn {
  min-height: 32px;
  padding: 0.24rem 0.58rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.cid-preset-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.cid-tag-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.cid-field {
  display: grid;
  gap: 0.28rem;
}

.cid-field label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.cid-field input,
.cid-field select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
}

.cid-tag-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cid-signal-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.83rem;
  color: var(--warning);
  font-weight: 600;
}

.cid-engines-table {
  display: grid;
  gap: 0.45rem;
}

.cid-engine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.66rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  min-width: 0;
}

.cid-engine-main {
  display: flex;
  align-items: flex-start;
  gap: 0.62rem;
  min-width: 0;
  flex: 1 1 auto;
}

.cid-engine-main strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
}

.cid-engine-main p {
  margin: 0.1rem 0 0;
  font-size: 0.77rem;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}

.cid-engine-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cid-engine-mark.is-ok,
.cid-engine-status.is-ok {
  background: var(--success-soft);
  color: var(--success);
}

.cid-engine-mark.is-alert,
.cid-engine-status.is-alert {
  background: var(--danger-soft);
  color: var(--danger);
}

.cid-engine-mark.is-warn,
.cid-engine-status.is-warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.cid-engine-mark.is-offline,
.cid-engine-status.is-offline,
.cid-engine-mark.is-muted,
.cid-engine-status.is-muted {
  background: var(--surface-elevated);
  color: var(--ink-muted);
}

.cid-engine-right {
  display: grid;
  justify-items: end;
  gap: 0.15rem;
  flex-shrink: 0;
}

.cid-engine-status {
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.cid-engine-ms {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.cid-evidence-box {
  display: grid;
  gap: 0.28rem;
  padding: 0.74rem 0.86rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
}

.cid-evidence-box strong {
  font-size: 0.82rem;
  color: var(--ink);
}

.cid-evidence-box p {
  margin: 0;
  font-size: 0.77rem;
  color: var(--ink-secondary);
}

.cid-osint-list {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.cid-osint-list li {
  font-size: 0.79rem;
  color: var(--ink-secondary);
}

.cid-osint-list a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.cid-osint-list a:hover {
  text-decoration: underline;
}

.cid-osint-list span {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.cid-inline-search {
  min-width: 220px;
  min-height: 42px;
  padding: 0 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--ink);
  font-size: 0.84rem;
}

.cid-directory-list {
  display: grid;
  gap: 0.45rem;
}

.cid-dir-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.cid-dir-info {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 220px;
}

.cid-dir-info strong {
  font-size: 0.85rem;
  color: var(--ink);
}

.cid-dir-info span {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.cid-dir-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cid-dir-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.cid-vault-stack {
  display: grid;
  gap: 0.9rem;
}

.cid-vault-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cid-file-btn {
  cursor: pointer;
}

.cid-patterns-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.cid-pattern-card {
  display: grid;
  gap: 0.42rem;
  padding: 0.88rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.cid-pattern-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.cid-pattern-top strong {
  font-size: 0.86rem;
  color: var(--ink);
}

.cid-pattern-risk {
  font-size: 0.71rem;
  font-weight: 700;
  padding: 0.16rem 0.46rem;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  white-space: nowrap;
}

.cid-pattern-desc,
.cid-pattern-tip {
  margin: 0;
  font-size: 0.79rem;
  color: var(--ink-secondary);
  line-height: 1.48;
}

@media (max-width: 780px) {
  .cid-telecom-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cid-engine-overview-grid,
  .cid-patterns-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cid-search-shell,
  .cid-panel-card,
  .cid-verdict-card,
  .cid-empty-workspace {
    padding: 0.88rem;
  }
  .cid-search-row {
    grid-template-columns: 1fr;
  }
  .cid-region-select {
    max-width: none;
    width: 100%;
  }
  .cid-submit-btn {
    width: 100%;
  }
  .cid-subnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cid-tab-btn {
    width: 100%;
    padding: 0.45rem 0.5rem;
    font-size: 0.77rem;
    text-align: center;
  }
  .cid-verdict-top {
    flex-direction: column;
    align-items: stretch;
  }
  .cid-trust-gauge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .cid-score-box {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
  }
  .cid-telecom-specs,
  .cid-tag-form-grid {
    grid-template-columns: 1fr;
  }
  .cid-engine-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cid-engine-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .cid-inline-search {
    width: 100%;
    min-width: 0;
  }
}

/* ============================================================================
 * v76 — Zero-Freeze Adaptive Performance Engine & Instant Tool Lazy Loader
 * ========================================================================== */

.tool-lazy-loading-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 150px;
  padding: 2rem 1.25rem;
  margin-top: 0.65rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

.tool-lazy-spinner {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  animation: toolLazySpin 0.72s linear infinite;
  flex-shrink: 0;
}

@keyframes toolLazySpin {
  to {
    transform: rotate(360deg);
  }
}

/* Off-screen paint skipping for large catalog/media grids (preserves exact UI!) */
.product-tile,
.dracin-card,
.nvl-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
}

/* Adaptive low-spec mobile GPU guard: replaces costly live backdrop-filter
 * blur compositing passes with crisp tinted translucent glass so visual craft
 * stays intact while preventing GPU hangs on low-RAM Android phones. */
html[data-perf="lite"] .site-header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background-color: rgba(248, 250, 252, 0.96);
}

html[data-perf="lite"][data-theme="dark"] .site-header {
  background-color: rgba(9, 13, 22, 0.96);
}

html[data-perf="lite"] .banner-nav-btn,
html[data-perf="lite"] .banner-controls-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(10, 17, 34, 0.76);
}

html[data-perf="lite"] .music-fab,
html[data-perf="lite"] .music-popover,
html[data-perf="lite"] .modal-backdrop,
html[data-perf="lite"] .drawer-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-perf="lite"] .music-popover {
  background: var(--surface);
}

/* ============================================================================
 * Dual-Domain Cross-Link & Store Access Key Gate Modal (v80)
 * ============================================================================ */
.header-nav-link.is-cross-link {
  color: var(--accent);
  font-weight: 600;
}

.store-gate-modal {
  width: min(440px, calc(100vw - 1.5rem));
  max-width: 440px;
}

.store-gate-head-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.store-gate-lock-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--border));
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.store-gate-form {
  display: grid;
  gap: 0.9rem;
  padding: 0 1.25rem 1.25rem;
}

.store-gate-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.store-gate-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.store-gate-input-row input {
  flex: 1;
  min-width: 0;
}

.store-gate-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 0.2rem;
}

.admin-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.9rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.admin-checkbox-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

/* ============================================================================
 * Standalone Manifestudio Flagship Homepage Layout (v81)
 * ============================================================================ */
.studio-main {
  padding-bottom: 2rem;
}

.studio-hero-section {
  padding-bottom: 0.35rem;
}

.studio-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.85rem 0.15rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.studio-workspace-section {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  scroll-margin-top: 76px;
}

.studio-workspace-head {
  align-items: flex-end;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.studio-workspace-heading {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.studio-section {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
  display: grid;
  gap: 1.25rem;
  scroll-margin-top: 76px;
}

.studio-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.studio-section-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
  letter-spacing: 0.01em;
}

.studio-directory-toolbar {
  display: grid;
  gap: 0.85rem;
}

.studio-search-box {
  max-width: 480px;
}

.studio-feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.studio-feat-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.18s var(--ease), box-shadow 0.2s var(--ease);
}

.studio-feat-card:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border-strong));
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.studio-feat-card.is-current {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.studio-feat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.studio-feat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
}

.studio-feat-meta-text {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-align: right;
}

.studio-feat-card.is-current .studio-feat-meta-text {
  color: var(--accent);
  font-weight: 600;
}

.studio-feat-body {
  display: grid;
  gap: 0.42rem;
  flex: 1;
}

.studio-feat-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  text-wrap: balance;
}

.studio-feat-summary {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.52;
  color: var(--ink-secondary);
}

.studio-feat-highlights {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.studio-feat-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0.25rem;
}

.studio-feat-open-btn {
  min-height: 40px;
}

.studio-empty-state {
  grid-column: 1 / -1;
}

.studio-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.studio-pillar-item {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  padding: 1rem 0 0.25rem;
}

.studio-pillar-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.studio-pillar-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.studio-pillar-desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.56;
  color: var(--ink-muted);
}

.studio-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 1.75rem;
  align-items: start;
}

.studio-footer-summary {
  margin: 0.45rem 0 0.75rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 42ch;
}

.studio-footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.studio-footer-col {
  display: grid;
  gap: 0.65rem;
}

.studio-footer-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.studio-footer-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
}

.studio-footer-text-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0;
  min-height: 36px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: color 0.16s var(--ease);
}

.studio-footer-text-btn:hover {
  color: var(--accent);
}

@media (max-width: 1024px) {
  .studio-feat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .studio-hero-section .promo-banner-img {
    object-position: 78% center;
  }

  .studio-workspace-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .studio-workspace-head .btn {
    min-height: 44px;
  }

  .studio-section {
    padding-top: 2rem;
    gap: 1rem;
  }

  .studio-meta-strip {
    font-size: 0.76rem;
    gap: 0.35rem 0.5rem;
  }

  .studio-feat-grid,
  .studio-pillars-grid,
  .studio-footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-feat-card {
    padding: 1rem;
  }

  .studio-feat-open-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .studio-footer-text-btn {
    min-height: 44px;
  }
}


