:root {
  --brand-primary: #3e55be;
  --brand-secondary: #87487d;
  --brand-tertiary: #2f6953;
  --brand-accent: #ffd362;
  --surface-base: #f8f9fe;
  --surface-container: #eceef3;
  --surface-container-low: #f2f3f8;
  --surface-container-high: #e7e8ed;
  --on-surface: #191c1f;
  --on-surface-variant: #444653;
  --outline: #757684;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-sm: 0 1px 2px rgba(25, 28, 31, 0.06);
  --shadow-md: 0 8px 24px rgba(25, 28, 31, 0.08);
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.ks-body {
  margin: 0;
  background: var(--surface-base);
  color: var(--on-surface);
  font-family: var(--font-sans);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.ks-container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.ks-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-container-high);
  box-shadow: var(--shadow-sm);
}
.ks-header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
@media (min-width: 640px) {
  .ks-header-inner { min-height: 80px; }
}
.ks-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.ks-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--brand-primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(62,85,190,.2);
  transition: transform .3s ease;
  font-weight: 800;
}
.ks-logo:hover .ks-logo-mark { transform: rotate(12deg); }
.ks-logo-text { color: var(--brand-primary); font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; }

.ks-search-wrap { flex: 1; max-width: 520px; }
.ks-search-desktop { display: none; }
.ks-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f2f3f8;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
}
.ks-search:focus-within {
  background: #fff;
  border-color: #c5c5d5;
}
.ks-search input {
  border: 0;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: .85rem;
  font-weight: 600;
}
.ks-search-icon { color: var(--outline); }

.ks-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.ks-header-actions button {
  appearance: none;
  -webkit-appearance: none;
}
.ks-lang-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.ks-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(0,0,0,.08);
  background: #f8f9fa;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  color: var(--on-surface-variant);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
@media (min-width: 640px) {
  .ks-lang-toggle {
    height: 38px;
    padding: 0 14px;
    font-size: .8125rem;
  }
}
.ks-lang-toggle span[aria-hidden="true"] {
  font-size: .65rem;
  line-height: 1;
  opacity: .6;
}
.ks-lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--surface-container);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 50;
}
.ks-lang-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 600;
}
.ks-lang-menu a:hover { background: #f2f3f8; }

.ks-nav-desktop {
  display: none;
  align-items: center;
  gap: 16px;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1;
  color: var(--on-surface-variant);
}
.ks-nav-desktop a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  line-height: 1;
  white-space: nowrap;
}
.ks-nav-desktop a:hover { color: var(--brand-primary); }
.ks-nav-submit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: auto;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(135,72,125,.05);
  border: 1px solid rgba(135,72,125,.1);
  color: var(--brand-secondary);
}

.ks-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.ks-btn:active { transform: scale(.96); }
.ks-btn-primary { background: var(--brand-primary); color: #fff; box-shadow: var(--shadow-sm); }
.ks-btn-accent {
  background: var(--brand-accent);
  color: #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 10px rgba(255,211,98,.25);
}
.ks-btn-ghost {
  background: #fff;
  border: 1px solid var(--surface-container);
  color: var(--on-surface-variant);
}
.ks-btn-muted { background: #e1e2e7; color: var(--on-surface); }
.ks-btn-outline {
  background: #fff;
  border: 1px solid var(--surface-container);
  color: var(--brand-primary);
}
.ks-btn-warm {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  color: #9a3412;
}
.ks-header .ks-btn.ks-btn-surprise {
  white-space: nowrap;
  height: 36px;
  padding: 0 12px;
  font-size: .75rem;
  line-height: 1;
  background: var(--brand-accent);
  color: #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 6px -1px rgba(255,211,98,.2);
}
@media (min-width: 640px) {
  .ks-header .ks-btn.ks-btn-surprise {
    height: 40px;
    padding: 0 16px;
    font-size: .8125rem;
  }
}
.ks-header .ks-btn-surprise:hover { transform: rotate(3deg); }
.ks-btn-surprise {
  white-space: nowrap;
  background: var(--brand-accent);
  color: #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 6px -1px rgba(255,211,98,.2);
}
.ks-btn-surprise:hover { transform: rotate(3deg); }
.ks-btn-sm { padding: 6px 10px; font-size: .68rem; }
.ks-btn-block { width: 100%; }

.ks-main { padding: 24px 0 48px; }
.ks-home { display: grid; gap: 40px; }

.ks-hero { text-align: center; max-width: 640px; margin: 0 auto; }
.ks-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  color: var(--brand-primary);
}
.ks-hero p {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: .92rem;
  font-weight: 600;
}

.ks-featured-card {
  display: grid;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--surface-container);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 20px 25px -5px rgba(25,28,31,.08), 0 8px 10px -6px rgba(25,28,31,.06);
  overflow: hidden;
}
@media (min-width: 640px) {
  .ks-featured-card { padding: 16px; }
}
.ks-featured-media-link {
  display: block;
  min-height: 0;
}
.ks-featured-media {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  height: 240px;
  background: #0f172a;
}
@media (min-width: 640px) {
  .ks-featured-media { height: 350px; }
}
.ks-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}
.ks-featured-media-link:hover .ks-featured-media img { transform: scale(1.05); }
.ks-featured-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.ks-featured-media-link:hover .ks-featured-hover { opacity: 1; }
.ks-featured-hover span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.ks-featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #fef08a;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .68rem;
  font-weight: 800;
  color: #B9770E;
  text-transform: uppercase;
  letter-spacing: .04em;
  box-shadow: 0 8px 16px rgba(0,0,0,.12);
}
.ks-featured-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  min-height: 0;
}
@media (min-width: 640px) {
  .ks-featured-content { padding: 20px; }
}
.ks-featured-body {
  display: grid;
  gap: 16px;
}
.ks-featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ks-featured-content h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}
@media (min-width: 640px) {
  .ks-featured-content h2 { font-size: 1.875rem; }
}
.ks-featured-content p {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.6;
}
@media (min-width: 640px) {
  .ks-featured-content p { font-size: .875rem; }
}
.ks-featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--surface-container-high);
}
.ks-featured-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 700;
}
.ks-featured-action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ks-featured-action-btns .ks-btn-accent {
  padding: 10px 18px;
  font-size: .82rem;
}
.ks-featured-action-btns .ks-btn-ghost {
  padding: 10px 16px;
  font-size: .82rem;
}
.ks-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-container);
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ks-tag-green {
  background: rgba(47,105,83,.1);
  color: var(--brand-tertiary);
}

.ks-feed-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-container-high);
}
.ks-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ks-tab {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #e1e2e7;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.175,.885,.32,1.275), background .2s ease;
}
.ks-tab:active { transform: scale(.96); }
.ks-tab.is-active {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(62,85,190,.15);
}
.ks-feed-count {
  font-size: .75rem;
  font-weight: 800;
  color: var(--on-surface-variant);
}

.ks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
}
.ks-card {
  background: #fff;
  border: 1px solid var(--surface-container);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.ks-card-media {
  position: relative;
  height: 200px;
  background: #111622;
  overflow: hidden;
}
.ks-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.4), transparent);
  pointer-events: none;
}
.ks-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.ks-card:hover .ks-card-media img { transform: scale(1.05); }
.ks-card-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(0,0,0,.6);
  color: rgba(255,255,255,.92);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ks-card-body { padding: 18px; flex: 1; }
.ks-card-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.ks-card:hover .ks-card-title { color: var(--brand-primary); }
.ks-card-tagline {
  margin: 0 0 12px;
  color: var(--on-surface-variant);
  font-size: .78rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ks-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ks-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--surface-container);
}
.ks-card-footer .ks-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f9fafb;
}
.ks-card-footer .ks-stat:hover { color: #e74c3c; background: #fff1f2; }
.ks-stat {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  color: var(--on-surface-variant);
}
.ks-card-actions { display: flex; gap: 6px; }

.ks-empty {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-container);
}
.ks-load-more-wrap { text-align: center; margin-top: 20px; }

.bouncy-hover { transition: transform .35s cubic-bezier(.175,.885,.32,1.275), box-shadow .35s ease; }
.bouncy-hover:hover { transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow-md); }

.ks-detail { display: grid; gap: 24px; }
.ks-breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--on-surface-variant);
}
.ks-breadcrumb span:last-child { color: var(--brand-primary); }
.ks-detail-grid {
  display: grid;
  gap: 28px;
}
.ks-detail-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2vw, 2rem);
}
.ks-detail-tagline {
  margin: 0 0 20px;
  color: var(--on-surface-variant);
}
.ks-panel {
  background: #fff;
  border: 1px solid var(--surface-container);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.ks-panel h2, .ks-panel h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.ks-panel-heart h2 { display: flex; align-items: center; gap: 8px; }
.ks-panel-icon { font-size: 1.1rem; }
.ks-panel-icon-primary { color: var(--brand-primary); }
.ks-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.ks-checklist li {
  display: flex;
  gap: 10px;
  font-size: .88rem;
  color: var(--on-surface-variant);
}
.ks-checklist li::before {
  content: "✓";
  color: var(--brand-primary);
  font-weight: 800;
}
.ks-screenshots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.ks-screenshots img {
  border-radius: 12px;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--surface-container);
}
.ks-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.ks-stats div {
  text-align: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(62,85,190,.05);
  border: 1px solid rgba(62,85,190,.1);
}
.ks-stats strong { display: block; font-size: 1.4rem; color: var(--brand-primary); }
.ks-stats span {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}
.ks-creator {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.ks-creator img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--surface-container);
}
.ks-creator span {
  display: block;
  font-size: .68rem;
  color: #6b7280;
  font-family: var(--font-mono);
  font-weight: 700;
}
.ks-related-list { display: grid; gap: 8px; }
.ks-related-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
}
.ks-related-item:hover { background: #f2f3f8; }
.ks-related-item img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}
.ks-related-item span {
  display: block;
  font-size: .68rem;
  color: var(--on-surface-variant);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Theater player — matches React DemoPreviewPlayer HTML structure */
.ks-theater {
  background: #fff;
  border: 1px solid rgba(229,231,235,.8);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(25,28,31,.08);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}
.ks-theater-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.ks-theater-chrome-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ks-theater-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.ks-theater-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: block;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.ks-theater-dots span:nth-child(1) { background: #fb7185; }
.ks-theater-dots span:nth-child(2) { background: #fbbf24; }
.ks-theater-dots span:nth-child(3) { background: #34d399; }
.ks-theater-label {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9ca3af;
  display: none;
}
.ks-theater-url {
  flex: 1;
  min-width: 0;
  max-width: 420px;
  background: #fff;
  border: 1px solid rgba(229,231,235,.6);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: #6b7280;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ks-theater-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-accent);
  color: #000;
  font-size: .62rem;
  font-weight: 800;
  flex-shrink: 0;
}
.ks-theater-ping {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #000;
  animation: ks-ping 1.2s cubic-bezier(0,0,.2,1) infinite;
}
.ks-theater.is-paused .ks-theater-ping { animation: none; opacity: .5; }
@keyframes ks-ping {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: .4; }
}
.ks-theater-viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
  overflow: hidden;
  min-height: 280px;
}
@media (min-width: 768px) {
  .ks-theater-viewport { min-height: 400px; aspect-ratio: auto; height: 400px; }
}
.ks-theater-slides {
  position: absolute;
  inset: 0;
}
.ks-theater-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
  transform: scale(1);
  filter: brightness(.75) contrast(1.03);
}
.ks-theater-slide.is-active { opacity: 1; z-index: 1; }
.ks-theater.is-paused .ks-theater-slide.is-active {
  filter: brightness(.4);
  transform: scale(.95);
}
.ks-theater-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,.5) 100%),
    linear-gradient(to bottom, rgba(255,255,255,.03), transparent);
}
.ks-theater-wave {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
}
.ks-theater-wave span {
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: var(--brand-accent);
  animation: ks-bounce-bar .8s ease-in-out infinite alternate;
}
.ks-theater-wave span:nth-child(2) { animation-delay: .12s; }
.ks-theater-wave span:nth-child(3) { animation-delay: .24s; }
.ks-theater-wave span:nth-child(4) { animation-delay: .36s; }
.ks-theater-wave span:nth-child(5) { animation-delay: .48s; }
.ks-theater-wave em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-accent);
}
@keyframes ks-bounce-bar {
  from { transform: scaleY(.4); }
  to { transform: scaleY(1); }
}
.ks-theater-play-overlay {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-accent);
  color: #000;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  transition: transform .2s ease;
}
.ks-theater-play-overlay:hover { transform: translate(-50%, -50%) scale(1.1); }
.ks-theater-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 72px;
  z-index: 4;
  text-align: center;
  pointer-events: none;
}
.ks-theater-caption-inner {
  display: inline-block;
  max-width: 520px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  animation: ks-caption-pulse 2.5s ease-in-out infinite;
}
@keyframes ks-caption-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .92; }
}
.ks-theater-step-label {
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 4px;
}
.ks-theater-caption-inner p {
  margin: 0;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.5;
}
.ks-theater-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.ks-theater-nav:hover { background: rgba(0,0,0,.8); transform: translateY(-50%) scale(1.05); }
.ks-theater-nav-prev { left: 12px; }
.ks-theater-nav-next { right: 12px; }
.ks-theater-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.8) 50%, transparent 100%);
}
.ks-theater-track {
  position: relative;
  height: 4px;
  width: 100%;
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.ks-theater-track-bar {
  height: 100%;
  width: 35%;
  background: var(--brand-accent);
  border-radius: inherit;
  transition: width .1s linear;
}
.ks-theater-hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: #d1d5db;
}
.ks-theater-hud-left,
.ks-theater-hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ks-theater-hud-left button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: .75rem;
}
.ks-theater-hud-left button:hover { color: #fff; }
.ks-theater-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
}
.ks-theater-hud-right span:last-child {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: .62rem;
  text-transform: uppercase;
  color: #34d399;
}
.ks-theater-thumbs {
  padding: 16px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ks-theater-thumb-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.ks-theater-thumb {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(209,213,219,.6);
  padding: 0;
  cursor: pointer;
  opacity: .6;
  background: #0f172a;
  transition: opacity .2s, border-color .2s, transform .2s;
}
.ks-theater-thumb.is-active {
  opacity: 1;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 2px rgba(255,211,98,.35);
  transform: scale(1.02);
}
.ks-theater-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ks-theater-thumb-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .5rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.ks-theater-disclaimer {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  font-size: .62rem;
  color: #6b7280;
  line-height: 1.5;
}
.ks-theater-visit { align-self: flex-start; }
.ks-theater-iframe iframe {
  width: 100%;
  min-height: 480px;
  border: 0;
  display: block;
  background: #fff;
}

@media (min-width: 640px) {
  .ks-theater-label { display: inline-block; }
}
.ks-detail-sidebar {
  display: grid;
  gap: 16px;
}
.ks-detail-meta-card {
  background: #fff;
  border: 1px solid var(--surface-container);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.ks-detail-meta-card h3 {
  margin: 0 0 12px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}
.ks-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.ks-lang-switcher {
  display: flex;
  gap: 4px;
  background: var(--surface-container-low);
  border: 1px solid var(--surface-container);
  border-radius: 999px;
  padding: 3px;
}
.ks-lang-switcher a {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--on-surface-variant);
  text-decoration: none;
}
.ks-lang-switcher a.is-active {
  background: #fff;
  color: var(--brand-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.ks-submit-page { max-width: 760px; }
.ks-submit-card { padding: 28px; }
.ks-submit-header {
  border-bottom: 1px solid var(--surface-container-high);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.ks-submit-header h1 { margin: 0 0 8px; color: var(--brand-primary); }
.ks-submit-form label {
  display: grid;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.ks-submit-form input,
.ks-submit-form textarea {
  border: 1px solid #eceef3;
  background: #f8f9fe;
  border-radius: 10px;
  padding: 12px;
  font-size: .82rem;
  font-weight: 600;
}
.ks-form-row {
  display: grid;
  gap: 12px;
}
.ks-form-locale {
  border: 1px dashed #eceef3;
  border-radius: 14px;
  padding: 14px;
  margin: 16px 0;
  background: rgba(248,249,254,.9);
}
.ks-form-locale-ja { background: rgba(250,248,252,.9); }
.ks-form-error { color: #b42318; font-size: .82rem; font-weight: 700; }
.ks-submit-success {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}
.ks-success-title {
  color: #14532d;
  font-weight: 800;
}

.ks-footer {
  border-top: 1px solid var(--surface-container-high);
  background: rgba(236,238,243,.5);
  padding: 28px 0;
}
.ks-footer-inner {
  display: grid;
  gap: 16px;
  text-align: center;
  font-size: .72rem;
  color: #6b7280;
}
.ks-footer-brand {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.ks-footer-brand strong { color: var(--brand-primary); }
.ks-footer-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  font-weight: 700;
}

.ks-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  place-items: center;
  padding: 16px;
}
.ks-modal.is-open {
  display: grid;
}
.ks-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.8);
  backdrop-filter: blur(8px);
}
.ks-modal-dialog {
  position: relative;
  width: min(900px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--surface-container);
  box-shadow: var(--shadow-md);
}
.ks-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--surface-container-high);
  background: #f9fafb;
}
.ks-modal-header h3 { margin: 0; font-size: 1rem; }
.ks-modal-header p { margin: 4px 0 0; font-size: .75rem; color: var(--on-surface-variant); }
.ks-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: #e5e7eb;
  cursor: pointer;
  font-weight: 800;
}
.ks-modal-body { padding: 18px; background: #f8fafc; }

.ks-search-mobile { padding-bottom: 12px; }
.ks-card.is-hidden { display: none !important; }

.ks-rich-text {
  color: var(--on-surface-variant);
  font-size: .88rem;
  line-height: 1.65;
}
.ks-rich-text p { margin: 0 0 10px; }
.ks-rich-text p:last-child { margin-bottom: 0; }
.ks-rich-text a { color: var(--brand-primary); text-decoration: underline; }
.ks-rich-text ul, .ks-rich-text ol { margin: 0 0 10px; padding-left: 20px; }

@media (min-width: 768px) {
  .ks-search-desktop { display: block; }
  .ks-search-mobile { display: none; }
  .ks-grid { grid-template-columns: repeat(2, 1fr); }
  .ks-form-row { grid-template-columns: 1fr 1fr; }
  .ks-screenshots { grid-template-columns: repeat(3, 1fr); }
  .ks-detail-grid { grid-template-columns: 2fr 1fr; align-items: start; }
  .ks-footer-inner { grid-template-columns: 1fr auto 1fr; align-items: center; text-align: left; }
  .ks-footer-copy { text-align: right; }
}

@media (min-width: 1024px) {
  .ks-nav-desktop { display: inline-flex; }
  .ks-grid { grid-template-columns: repeat(3, 1fr); }
  .ks-featured-card {
    grid-template-columns: 7fr 5fr;
    align-items: stretch;
  }
}
