﻿/* ==========================================================================
   Neuropa Labs — unified stylesheet
   Naming: single hyphen only (no BEM __ / --)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600&display=swap');

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand */
  --brand: #fd9f00;
  --brand-hover: #f59e0b;
  --logo-text: #919191;

  /* Menu accents — icon / primary */
  --search: #fb923c;
  --search-muted: rgba(251, 146, 60, 0.4);
  --search-btn: #ea580c;
  --search-btn-hover: #c2410c;

  --general-icon: #818cf8;
  --general: #6366f1;
  --general-btn: #4f46e5;
  --general-btn-hover: #4338ca;

  --copyright-icon: #fbbf24;
  --copyright: #f59e0b;
  --copyright-btn: #f59e0b;
  --copyright-btn-hover: #d97706;

  --character-icon: #34d399;
  --character: #10b981;
  --character-btn: #059669;
  --character-btn-hover: #047857;

  --rating-icon: #a78bfa;
  --rating: #8b5cf6;
  --rating-btn: #8b5cf6;
  --rating-btn-hover: #7c3aed;

  --carplate-icon: #60a5fa;
  --carplate: #2563eb;
  --carplate-hover: #1d4ed8;

  /* Surfaces — dark (Labs) */
  --dark-bg: #1a1a1f;
  --dark-card: #161616;
  --dark-card-hover: #222222;
  --dark-border: #27272a;
  --dark-border-hover: #3f3f46;
  --dark-tag-bg: #1f1f23;
  --dark-muted: #a1a1aa;

  /* Surfaces — light (tools) */
  --light-bg: #f8fafc;
  --light-surface: #ffffff;
  --light-border: #e2e8f0;
  --light-border-soft: #f1f5f9;
  --light-text: #0f172a;
  --light-text-secondary: #1e293b;
  --light-muted: #64748b;
  --light-faint: #94a3b8;
  --light-line: #cbd5e1;

  /* Shared */
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --content-wide: 80rem;
  --content: 72rem;
  --content-narrow: 56rem;

  /* Labs 카드 영역 폭 (section · index 푸터 공통) */
  --labs-content-width: 1600px;
  --labs-content-pad: 2rem;

  /* ========== Footer ==========
     --footer-height : index 높이
     2줄 전환        : @media (max-width: 1000px)
  */
  --footer-height: 38px;
  --footer-font: 0.9rem;
  --footer-name-font: 0.8rem;
  --footer-bg: #0f172a;
  --footer-text: #64748b;
  --footer-line: #1e293b;
  --footer-strong: #cbd5e1;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--dark-bg);
  color: #ffffff;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img,
video,
canvas {
  display: block;
  max-width: 100%;
}

/* Cropper / canvas: avoid global max-width breaking layout */
.dropzone > img,
.dropzone .cropper-container img,
.cropper-container img,
.plate-canvas-wrap canvas,
.chart-wrap canvas {
  max-width: none;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.hidden {
  display: none !important;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

.heading {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.text-shadow-soft {
  text-shadow:
    0 1px 30px rgba(0, 0, 0, 0.9),
    0 4px 12px rgba(0, 0, 0, 0.8),
    0 16px 40px rgba(0, 0, 0, 0.7);
}

/* Theme text / fill / button / slider */
.text-search { color: var(--search); }
.text-general { color: var(--general); }
.text-copyright { color: var(--copyright); }
.text-character { color: var(--character); }
.text-rating { color: var(--rating); }
.text-carplate { color: var(--carplate); }
.text-brand { color: var(--brand); }
.text-logo { color: var(--logo-text); }

.fill-search { background-color: var(--search); }
.fill-general { background-color: var(--general); }
.fill-copyright { background-color: var(--copyright); }
.fill-character { background-color: var(--character); }
.fill-rating { background-color: var(--rating); }
.fill-carplate { background-color: var(--carplate); }

.slider-search { accent-color: var(--search); }
.slider-general { accent-color: var(--general); }
.slider-copyright { accent-color: var(--copyright); }
.slider-character { accent-color: var(--character); }
.slider-rating { accent-color: var(--rating); }

/* --------------------------------------------------------------------------
   Page background (Labs dark)
   -------------------------------------------------------------------------- */

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  background-color: var(--dark-bg);
}

.page-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(-45deg, #222226, #1a1a1f, #1f1f24, #222226);
  background-size: 400% 400%;
  animation: bg-shift 6s ease infinite;
}

.page-bg-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 30%, var(--brand) 0%, transparent 50%);
  opacity: 0.09;
  animation: move-light 28s ease-in-out infinite;
}

.page-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  mix-blend-mode: screen;
}

@keyframes bg-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes move-light {
  0% { transform: translate(0%, 0%); }
  50% { transform: translate(10%, 7%); }
  100% { transform: translate(0%, 0%); }
}

/* --------------------------------------------------------------------------
   Brand / logo (shared)
   -------------------------------------------------------------------------- */

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  cursor: pointer;
}

.brand-name,
.logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--logo-text);
  cursor: pointer;
  transition: color 0.2s ease;
}

.brand:hover .brand-name,
.logo:hover {
  color: var(--brand);
}

.brand-badge {
  padding: 0 0.625rem;
  font-size: 10px;
  font-weight: 700;
  background: rgba(253, 159, 0, 0.15);
  color: var(--brand);
  border-radius: 9999px;
  align-self: flex-end;
  margin-bottom: 7px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Labs nav / hero / sections
   -------------------------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-nav-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 2rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-signin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    color: #e5e7eb;
    background: #1a1a1f;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: none;
}

    .btn-signin:hover {
        background: #222228;
        color: #fff;
    }

    .btn-signin .fa-brands,
    .btn-signin i.fa-google {
        font-family: "Font Awesome 6 Brands" !important;
        font-weight: 400 !important;
        font-style: normal !important;
        font-size: 0.95rem;
        line-height: 1;
        color: #e5e7eb;
        -webkit-font-smoothing: antialiased;
    }

/* 툴 페이지에서 덮어쓰지 못하게 */
body.page-tool .btn-signin {
    color: #e5e7eb;
    background: #1a1a1f;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

    body.page-tool .btn-signin .fa-brands {
        color: #e5e7eb;
    }

.btn-signin:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Hero */
.hero {
  position: relative;
  height: 520px;
  min-height: 520px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: var(--content-narrow);
  padding: 0 1.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-xl);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  margin: 0 0 1rem;
  color: #ffffff;
  line-height: 1.1;
}

.hero-desc {
  margin: 0 auto;
  max-width: 32rem;
  font-size: 1.25rem;
  color: #ffffff;
}

/* Sections — 카드 그리드 영역 (푸터 글자 폭과 동일하게 유지) */
.section {
  max-width: var(--labs-content-width, 1600px);
  margin: 0 auto;
  padding: 0 var(--labs-content-pad, 2rem) 3rem;
}

.section-top {
  padding-top: 4rem;
}

.section-bottom {
  padding-bottom: 5rem;
}

.section-header {
  margin-bottom: 1rem;
}

.section-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.section-desc {
  margin: 0.5rem 0 0;
  color: #ffffff;
  line-height: 1.625;
}

.section-powered {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 0.5rem;
  transform: translateY(-1px);
  border-radius: 9999px;
  background: rgba(253, 159, 0, 0.1);
  border: 1px solid rgba(253, 159, 0, 0.2);
  padding: 0.25rem 0.75rem;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.025em;
  color: rgba(253, 159, 0, 0.8);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Demo cards (Labs)
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  max-width: 496px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  min-height: 156px;
  height: 100%;
}

a.card {
  display: flex;
}

.card:hover {
  background: var(--dark-card-hover);
  border-color: var(--dark-border-hover);
  transform: translateY(-3px);
}

.card:active {
  background: var(--dark-card-hover);
  border-color: #52525b;
  transform: translateY(-1px) scale(0.98);
}

.card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-color: var(--brand);
}

.card-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.card-disabled:hover,
.card-disabled:active {
  background: var(--dark-card);
  border-color: var(--dark-border);
  transform: none;
}

.card-placeholder {
  opacity: 0.5;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
}

.card-placeholder:hover,
.card-placeholder:active {
  background: var(--dark-card);
  border-color: rgba(255, 255, 255, 0.2);
  transform: none;
}

.card-body {
  flex: 1;
  padding: 1.25rem 1.5rem 0.75rem;
}

.card-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.card-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.card-icon-search {
  background: rgba(249, 115, 22, 0.1);
  color: var(--search);
}

.card-icon-search-muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--search-muted);
}

.card-icon-general {
  background: rgba(99, 102, 241, 0.1);
  color: var(--general-icon);
}

.card-icon-copyright {
  background: rgba(245, 158, 11, 0.1);
  color: var(--copyright-icon);
}

.card-icon-character {
  background: rgba(16, 185, 129, 0.1);
  color: var(--character-icon);
}

.card-icon-rating {
  background: rgba(139, 92, 246, 0.1);
  color: var(--rating-icon);
}

.card-icon-brand {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(253, 159, 0, 0.7);
}

.card-icon-purple {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(168, 85, 247, 0.7);
}

.card-icon-carplate {
  background: rgba(59, 130, 246, 0.1);
  color: var(--carplate-icon);
}

.card-title {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.25;
}

.card-desc {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.375;
}

.card-desc-muted {
  color: rgba(255, 255, 255, 0.4);
}

.card-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 1.5rem;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.card-placeholder-plus {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.card-placeholder-title {
  font-weight: 600;
}

.card-placeholder-desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}

.tech-tag {
  font-size: 11px;
  padding: 2px 9px;
  background: var(--dark-tag-bg);
  border: 1px solid var(--dark-border);
  border-radius: 9999px;
  color: var(--dark-muted);
}

/* --------------------------------------------------------------------------
   Light tool pages (predictor + carplate)
   -------------------------------------------------------------------------- */

body.page-tool {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--light-bg);
  color: var(--light-text-secondary);
  font-family: var(--font-sans);
}

body.page-tool main {
  flex: 1;
}

body.page-tool button,
body.page-tool input,
body.page-tool select,
body.page-tool textarea {
  font-family: inherit;
}

/* Tool nav */
.tool-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--light-surface);
  border-bottom: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
}

.tool-nav-sub {
  top: 4rem;
  z-index: 40;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tool-nav-mode {
    z-index: 40;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tool-nav-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-nav-inner-sm {
  height: 3.5rem;
}

.tool-nav-right {
    display: flex;
    align-items: center;
}

.tool-nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.tool-nav-left-wide {
  gap: 2.5rem;
}

.tool-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tool-nav-divider {
  color: var(--light-line);
}

.tool-nav-title {
    font-weight: 700;
    color: #334155;
    position: relative;
    top: 3px; /* 필요 시 조절 */
}

.tool-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-nav-tabs-sm {
  font-size: 0.875rem;
}

.nav-link {
  transition: all 0.25s ease-in-out;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  background: transparent;
  border: none;
  color: inherit;
}

.nav-link-wide {
  padding: 0.5rem 1.25rem;
}

.nav-link.active {
  background-color: #eff6ff;
  color: #1e40af;
  font-weight: 700;
}

.nav-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.tool-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 11px;
  font-weight: 700;
}

.tool-engine {
  padding: 0.25rem 0.5rem;
  background: #d1fae5;
  color: #047857;
  border-radius: 0.375rem;
}

#system-status {
  color: var(--light-faint);
}

#system-status.is-processing {
  color: #3b82f6;
}

/* Page visibility */
.tab-page,
.page,
.search-subpage {
  display: none;
}

.tab-page.active {
  display: block !important;
}

.page.active,
.search-subpage.active {
  display: block;
  animation: fade-in 0.3s ease-in;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Tool layout */
.tool-main {
  max-width: var(--content-narrow);
  margin: 0 auto;
  width: 100%;
  padding: 2rem;
}

.tool-main-tight {
  padding-bottom: 1rem;
}

.tool-main-wide {
  max-width: var(--content);
  padding: 2.5rem 1.5rem;
}

.tool-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.tool-header-title {
  margin: 0 0 0.5rem;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.tool-header-sub {
  margin: 0;
  color: var(--light-muted);
  font-weight: 500;
}

.tool-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--light-surface);
  padding: 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-border-soft);
}

.toolbar-mb {
  margin-bottom: 1rem;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toolbar-left-tight {
  gap: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
  color: #ffffff;
  border-radius: var(--radius);
  padding: 0.625rem 1.5rem;
  box-shadow: var(--shadow);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-lg {
  padding: 0.75rem 2rem;
  border-radius: var(--radius-lg);
}

.btn-search {
  background: var(--search-btn);
}

.btn-search:hover:not(:disabled) {
  background: var(--search-btn-hover);
}

.btn-search:disabled {
  background: var(--search);
}

.btn-general {
  background: var(--general-btn);
}

.btn-general:hover:not(:disabled) {
  background: var(--general-btn-hover);
}

.btn-copyright {
  background: var(--copyright-btn);
}

.btn-copyright:hover:not(:disabled) {
  background: var(--copyright-btn-hover);
}

.btn-ensemble {
  background: var(--brand);
  color: #1a1a1f;
}

.btn-ensemble:hover:not(:disabled) {
  background: var(--brand-hover);
}

.btn-character {
  background: var(--character-btn);
}

.btn-character:hover:not(:disabled) {
  background: var(--character-btn-hover);
}

.btn-rating {
  background: var(--rating-btn);
}

.btn-rating:hover:not(:disabled) {
  background: var(--rating-btn-hover);
}

.btn-carplate {
  background: var(--carplate);
}

.btn-carplate:hover:not(:disabled) {
  background: var(--carplate-hover);
}

.btn-secondary {
  background: var(--light-surface);
  border: 1px solid var(--light-line);
  color: #334155;
  font-size: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  padding: 0.5rem 1rem;
}

.btn-secondary:hover:not(:disabled) {
  background: #f1f5f9;
}

.btn-cancel {
  margin-top: 1rem;
  padding: 0.625rem 2rem;
  background: #ffedd5;
  color: #c2410c;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-cancel:hover {
  background: #fed7aa;
}

/* Model switch */
.model-switch {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 0.25rem;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--light-border);
}

.model-btn {
  flex: 1;
  min-width: 64px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 800;
  border-radius: 0.65rem;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--light-faint);
  cursor: pointer;
  transition: all 0.15s ease;
}

.model-btn:hover {
  color: #475569;
}

.model-btn.is-active {
  background: var(--light-surface);
  color: var(--light-text-secondary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Threshold */
.threshold {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--light-bg);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--light-border);
}

.threshold-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--light-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.threshold-range {
  width: 10rem;
  height: 0.375rem;
  background: var(--light-border);
  border-radius: var(--radius-sm);
  appearance: none;
  cursor: pointer;
}

.threshold-value {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Warning */
.warn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fffbeb;
  border-left: 4px solid #fbbf24;
  padding: 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.warn-danger {
  background: #fef2f2;
  border-left-color: #f87171;
}

.warn-icon {
  color: #d97706;
}

.warn-text {
  margin: 0;
  font-weight: 700;
  font-size: 0.875rem;
  color: #92400e;
}

.warn-danger .warn-text {
  color: #991b1b;
}

/* Dropzone (shared) */
.dropzone {
  position: relative;
  width: 100%;
  min-height: 420px;
  height: 520px;
  background: var(--light-surface);
  border: 2px dashed var(--light-line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
}

.dropzone:hover {
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1);
}

.dropzone.drag-hover,
.dropzone.dragover {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
}

/* Predictor dropzones use dark surface */
.dropzone-dark {
  background-color: #000 !important;
  border-color: #334155 !important;
  height: 520px;
}

.dropzone.lens-cropper.cropper-active,
.dropzone.lens-cropper.lens-has-image {
  background-color: #000 !important;
  border-color: #000 !important;
}

.preview {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  z-index: 10;
}

.guide {
  text-align: center;
  transition: transform 0.3s ease;
}

.dropzone:hover .guide {
  transform: scale(1.05);
}

.guide-text {
  margin: 0;
  color: var(--light-line);
  font-weight: 700;
}

.guide-icon {
  font-size: 3rem;
  color: var(--light-line);
  margin-bottom: 1rem;
}

.guide-title {
  margin: 0;
  font-weight: 700;
  color: #334155;
}

.guide-hint {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--light-faint);
}

.file-input {
  display: none;
}

/* Loading overlay */
.loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 4rem;
  height: 4rem;
  border: 4px solid var(--search);
  border-top-color: transparent;
  border-radius: 9999px;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 2.5rem;
  height: 2.5rem;
  border-width: 4px;
  border-color: #3b82f6;
  border-top-color: transparent;
  margin-bottom: 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #c2410c;
}

.loading-sub {
  font-size: 0.875rem;
  color: var(--search-btn);
}

.loading-text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--carplate-hover);
}

/* Chart panel */
.chart-panel {
  background: var(--light-surface);
  padding: 2rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-border-soft);
  min-height: 400px;
}

.chart-panel-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-bar {
  width: 0.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  display: inline-block;
}

.chart-wrap {
  position: relative;
  height: 500px;
}

.chart-wrap-sm {
  height: 300px;
}

.view-tabs {
  display: flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 1rem;
  background: #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 0.25rem;
  border: 1px solid var(--light-border);
}

.view-tab {
  min-width: 72px;
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 800;
  border-radius: 0.65rem;
  border: none;
  background: transparent;
  color: var(--light-faint);
  cursor: pointer;
}

.view-tab:hover {
  color: #475569;
}

.view-tab.is-active {
  background: var(--light-surface);
  color: var(--light-text-secondary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

#page-ensemble .result-json {
  max-height: 70vh;
}

.result-json {
  margin: 0;
  max-height: 500px;
  overflow: auto;
  padding: 1rem 1.25rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  white-space: pre;
}

/* Search result */
.search-result {
  margin: 2rem 0;
}

.search-result-card {
  background: var(--light-surface);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.search-empty {
  padding: 2rem;
  text-align: center;
}

.search-empty-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.search-empty-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #334155;
}

.search-empty-sub {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--light-muted);
}

.search-detail {
  padding: 1.5rem;
}

.search-detail-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--search-btn);
}

.accuracy {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
}

.accuracy-high {
  background: #dcfce7;
  color: #15803d;
}

.accuracy-mid {
  background: #fef9c3;
  color: #a16207;
}

.accuracy-low {
  background: #fee2e2;
  color: #dc2626;
}

.search-artist {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light-text);
  margin-top: 0.125rem;
}

.search-meta {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.search-meta-row {
  display: flex;
}

.search-meta-key {
  width: 6rem;
  flex-shrink: 0;
  color: var(--light-muted);
}

.search-meta-val {
  color: #334155;
  word-break: break-all;
}

.search-link {
  color: var(--carplate);
  word-break: break-all;
}

.search-link:hover {
  text-decoration: underline;
}

.search-sns {
  margin-top: 0.75rem;
}

.search-sns-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--search-btn);
  margin-bottom: 0.25rem;
}

.search-sns a {
  display: block;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 0.125rem;
}

.search-sns a:hover {
  color: var(--search-btn);
  text-decoration: underline;
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2rem;
  font-size: 0.875rem;
  margin-top: 1rem;
}

.search-grid-full {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
}

.search-grid-val {
  color: #334155;
  margin-top: 0.125rem;
}

/* AI banner */
.ai-banner {
  margin-bottom: 1rem;
}

.ai-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}

.ai-banner-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-banner-icon {
  color: var(--search-btn);
}

.ai-banner-title {
  font-weight: 700;
  color: #9a3412;
}

.ai-banner-sub {
  font-size: 0.875rem;
  color: #c2410c;
}

.ai-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-banner-yes {
  padding: 0.5rem 1rem;
  background: var(--search-btn);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
}

.ai-banner-yes:hover {
  background: var(--search-btn-hover);
}

.ai-banner-no {
  padding: 0.5rem 1rem;
  background: var(--light-surface);
  color: #c2410c;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: 1px solid #fed7aa;
  cursor: pointer;
}

.ai-banner-no:hover {
  background: #ffedd5;
}

/* Rating breakdown */
.rating-result {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius-lg);
}

.rating-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.rating-result-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
}

.rating-result-badge {
  padding: 0.25rem 1rem;
  background: var(--light-surface);
  border-radius: 9999px;
  border: 1px solid #ddd6fe;
  font-size: 0.875rem;
  font-weight: 700;
}

.rating-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .rating-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.rating-card {
  padding: 1rem;
  background: var(--light-surface);
  border-radius: var(--radius-lg);
}

.rating-card-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.rating-card-badge {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.rating-card-name {
  font-weight: 700;
}

.rating-card-score {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 900;
}

.rating-card-desc {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.375;
}

.rating-card-g {
  border: 1px solid #a7f3d0;
}
.rating-card-g .rating-card-badge { background: #10b981; }
.rating-card-g .rating-card-name { color: #047857; }
.rating-card-g .rating-card-score { color: #059669; }
.rating-card-g .rating-card-desc { color: #059669; }

.rating-card-s {
  border: 1px solid #fef08a;
}
.rating-card-s .rating-card-badge { background: #eab308; }
.rating-card-s .rating-card-name { color: #a16207; }
.rating-card-s .rating-card-score { color: #ca8a04; }
.rating-card-s .rating-card-desc { color: #ca8a04; }

.rating-card-q {
  border: 1px solid #fed7aa;
}
.rating-card-q .rating-card-badge { background: #f97316; }
.rating-card-q .rating-card-name { color: #c2410c; }
.rating-card-q .rating-card-score { color: #ea580c; }
.rating-card-q .rating-card-desc { color: #ea580c; }

.rating-card-e {
  border: 1px solid #fecaca;
}
.rating-card-e .rating-card-badge { background: #ef4444; }
.rating-card-e .rating-card-name { color: #b91c1c; }
.rating-card-e .rating-card-score { color: #dc2626; }
.rating-card-e .rating-card-desc { color: #dc2626; }

.rating-confidence {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e9d5ff;
  display: flex;
  justify-content: flex-end;
}

.rating-confidence-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: right;
}

.rating-confidence-value {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Car plate
   -------------------------------------------------------------------------- */

.tool-intro {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: var(--content-narrow);
}

.tool-intro-title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--light-text);
}

.tool-intro-sub {
  margin: 0.5rem 0 0;
  color: var(--light-muted);
  font-weight: 500;
}

.tool-feature-box {
  margin: 2rem auto 0;
  max-width: var(--content);
  padding: 1.25rem 1.5rem;
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.tool-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  font-size: 1rem;
  color: #475569;
  font-weight: 500;
}

.tool-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.tool-feature-list i {
  margin-top: 0.125rem;
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.icon-bolt { color: #3b82f6; }
.icon-quote { color: #0c812d; }
.icon-truck { color: var(--light-muted); }
.icon-burst { color: #ef4444; }
.icon-shield {
  color: var(--brand);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.tool-feature-list strong {
  font-weight: 700;
  color: var(--light-text-secondary);
}

.plate-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: var(--content);
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .plate-workspace {
    grid-template-columns: 3fr 2fr;
  }
}

.plate-dropzone {
  height: auto;
  min-height: 420px;
  padding: 2rem;
  text-align: center;
}

.plate-dropzone:hover {
  border-color: var(--carplate-icon);
  box-shadow: none;
}

.plate-dropzone .btn {
  margin-top: 1.5rem;
}

.plate-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.plate-canvas-wrap canvas {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--light-border);
}

.plate-canvas-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 30;
}

.plate-results {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  height: 100%;
}

.plate-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.plate-results-title {
  font-weight: 700;
  color: #334155;
}

.plate-results-badge {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  background: #dbeafe;
  color: var(--carplate-hover);
  border-radius: 9999px;
}

.plate-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 380px;
  overflow-y: auto;
}

.plate-results-empty {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: var(--light-faint);
}

.plate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: var(--light-surface);
  transition: background-color 0.15s ease;
}

.plate-item:hover {
  background: var(--light-bg);
}

.plate-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.plate-item-index {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: var(--carplate);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
}

.plate-item-number {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--light-text-secondary);
  display: flex;
  align-items: center;
  height: 1.75rem;
}

.plate-item-confidence {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  color: var(--light-muted);
}

/* --------------------------------------------------------------------------
   Modal (shared)
   -------------------------------------------------------------------------- */

.modal-overlay {
  display: none;
  position: fixed;
  z-index: 60;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: #fff;
  margin: 10% auto;
  width: 90%;
  max-width: 42rem;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  color: var(--light-text-secondary);
}

.modal-close {
  position: absolute;
  top: 0;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #fff;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.modal-body {
  display: flex;
  flex-direction: column;
  height: 450px;
}

@media (min-width: 768px) {
  .modal-body {
    flex-direction: row;
  }
}

.modal-media {
  background: var(--light-border);
}

@media (min-width: 768px) {
  .modal-media {
    width: 33.333%;
  }
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-panel {
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

@media (min-width: 768px) {
  .modal-panel {
    width: 66.666%;
  }
}

.modal-panel-head {
  margin-bottom: 1.5rem;
}

.modal-panel-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--carplate);
}

.modal-panel-sub {
  margin: 0;
  color: var(--light-faint);
  font-size: 0.875rem;
  font-weight: 500;
}

.modal-panel-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
  color: #475569;
  line-height: 1.625;
  font-size: 0.875rem;
}

.modal-panel-content h3 {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--light-text-secondary);
}

.modal-panel-content p {
  margin: 0 0 1rem;
}

.modal-panel-foot {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--light-border-soft);
  display: flex;
  justify-content: flex-end;
}

.modal-ok {
  background: var(--carplate);
  color: #ffffff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1);
}

.modal-ok:hover {
  background: var(--carplate-hover);
}

/* --------------------------------------------------------------------------
   Footer
   >1000px : left(copy) | right(links)
   <=1000px: two rows (copy top / links bottom)
   -------------------------------------------------------------------------- */

.footer {
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
  box-sizing: border-box;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: var(--footer-font);
  line-height: 1.5;
  border-top: 1px solid var(--footer-line);
}

/* index only */
.footer-labs {
  --footer-bg: transparent;
  --footer-line: rgba(255, 255, 255, 0.1);
  height: var(--footer-height);
  min-height: var(--footer-height);
  display: flex;
  align-items: center;
}

.footer-inner {
  width: 100%;
  max-width: var(--labs-content-width, 1600px);
  margin: 0 auto;
  padding: 12px var(--labs-content-pad, 2rem);
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

/* predictor / carplate: 위 여백 30% 축소 (12px → 8.4px) */
.footer:not(.footer-labs) .footer-inner {
  padding-top: 8.4px;
}

/* index 푸터: 카드(.section)와 동일 너비·좌우 패딩 */
.footer-labs .footer-inner {
  height: 100%;
  max-width: var(--labs-content-width, 1600px);
  padding: 0 var(--labs-content-pad, 2rem);
}

.footer-left {
  margin: 0;
  text-align: left;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0 0.75rem;
  white-space: nowrap;
}

.footer-name {
  margin: 0;
  color: var(--footer-strong);
  font-weight: 700;
  font-size: var(--footer-name-font);
}

.footer-copy {
  margin: 0;
  font-size: var(--footer-font);
}

.footer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 8px;
  font-weight: 200;
}

.footer-right a {
  padding: 0 8px;
}

.footer-right a:hover {
  color: var(--footer-strong);
}

.footer-sep {
  opacity: 0.6;
}

/* <=1000px: 두 줄 스택
   - index (footer-labs): center
   - predictor / carplate: center  */
@media (max-width: 1000px) {
  /* --- index (그대로) --- */
  .footer-labs {
    height: auto;
    min-height: var(--footer-height);
    padding: 10px 0;
  }

  .footer-labs .footer-inner {
    height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }

  .footer-labs .footer-left {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
    white-space: normal;
  }

  .footer-labs .footer-right {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  /* --- predictor / carplate: 좁을 때 중앙 --- */
  .footer:not(.footer-labs) .footer-inner {
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 8px;
  }

  .footer:not(.footer-labs) .footer-left {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: center;
    text-align: center !important;
    white-space: normal;
  }

  .footer:not(.footer-labs) .footer-right {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: center;
    text-align: center !important;
  }
}
/* --------------------------------------------------------------------------
   Lens cropper overrides
   -------------------------------------------------------------------------- */

.lens-cropper {
  --crop-radius: 16px;
  --bracket-size: 28px;
  --bracket-thick: 4px;
  --bracket-radius: 16px;
}

.lens-cropper .cropper-crop-box {
  overflow: visible !important;
  border-radius: var(--crop-radius) !important;
}

.lens-cropper .cropper-view-box,
.lens-cropper .cropper-face {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: var(--crop-radius) !important;
}

.lens-cropper .cropper-view-box {
  overflow: hidden !important;
}

.lens-cropper .cropper-line,
.lens-cropper .cropper-dashed,
.lens-cropper .cropper-center {
  background: transparent !important;
  border: none !important;
  opacity: 0 !important;
}

.lens-cropper .cropper-face {
  background: transparent !important;
  opacity: 1 !important;
}

.lens-cropper .cropper-point.point-nw,
.lens-cropper .cropper-point.point-ne,
.lens-cropper .cropper-point.point-sw,
.lens-cropper .cropper-point.point-se {
  width: var(--bracket-size) !important;
  height: var(--bracket-size) !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  border: none !important;
}

.lens-cropper .cropper-point.point-nw {
  top: -2px !important;
  left: -2px !important;
  border-top: var(--bracket-thick) solid #fff !important;
  border-left: var(--bracket-thick) solid #fff !important;
  border-top-left-radius: var(--bracket-radius) !important;
}

.lens-cropper .cropper-point.point-ne {
  top: -2px !important;
  right: -2px !important;
  left: auto !important;
  border-top: var(--bracket-thick) solid #fff !important;
  border-right: var(--bracket-thick) solid #fff !important;
  border-top-right-radius: var(--bracket-radius) !important;
}

.lens-cropper .cropper-point.point-sw {
  bottom: -2px !important;
  left: -2px !important;
  top: auto !important;
  border-bottom: var(--bracket-thick) solid #fff !important;
  border-left: var(--bracket-thick) solid #fff !important;
  border-bottom-left-radius: var(--bracket-radius) !important;
}

.lens-cropper .cropper-point.point-se {
  bottom: -2px !important;
  right: -2px !important;
  top: auto !important;
  left: auto !important;
  border-bottom: var(--bracket-thick) solid #fff !important;
  border-right: var(--bracket-thick) solid #fff !important;
  border-bottom-right-radius: var(--bracket-radius) !important;
}

.lens-cropper .cropper-point.point-n,
.lens-cropper .cropper-point.point-s,
.lens-cropper .cropper-point.point-e,
.lens-cropper .cropper-point.point-w {
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Labs index.html compatibility (original BEM class names)
   ========================================================================== */

.page-bg__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(-45deg, #222226, #1a1a1f, #1f1f24, #222226);
  background-size: 400% 400%;
  animation: bg-shift 6s ease infinite;
}

.page-bg__light {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 30%, var(--brand) 0%, transparent 50%);
  opacity: 0.09;
  animation: move-light 28s ease-in-out infinite;
}

.page-bg__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  mix-blend-mode: screen;
}

.site-nav__inner {
    max-width: var(--labs-content-width, 1600px);
    margin: 0 auto;
    padding: 0 2rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand__name {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #fd9f00;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.brand:hover .brand__name {
  color: #f59e0b;
}

.brand__badge {
  padding: 0 0.625rem;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 9999px;
  align-self: flex-end;
  margin-bottom: 7px;
  line-height: 1.6;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero__content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  padding: 0 1.5rem;
  text-align: center;
}

.hero__badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  margin: 0 0 1rem;
  color: #ffffff;
  line-height: 1.1;
}

.hero__desc {
  margin: 0 auto;
  max-width: 32rem;
  font-size: 1.25rem;
  color: #ffffff;
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section--tools-top {
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.section--tools-bottom {
  padding-bottom: 5rem;
}

.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.section__desc {
  margin: 0.5rem 0 0;
  color: #ffffff;
  line-height: 1.625;
}

.section__powered {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 0.5rem;
  transform: translateY(-1px);
  border-radius: 9999px;
  background: rgba(253, 159, 0, 0.1);
  border: 1px solid rgba(253, 159, 0, 0.2);
  padding: 0.25rem 0.75rem;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.025em;
  color: rgba(253, 159, 0, 0.8);
  white-space: nowrap;
}

.demo-card {
  display: flex;
  flex-direction: column;
  max-width: 496px;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  background: #161616;
  border: 1px solid #27272a;
  min-height: 156px;
  height: 100%;
}

a.demo-card {
  display: flex;
}

.demo-card:hover {
  background: #222222;
  border-color: #3f3f46;
  transform: translateY(-3px);
}

.demo-card:active {
  background: #222222;
  border-color: #52525b;
  transform: translateY(-1px) scale(0.98);
}

.demo-card:focus-visible {
  outline: 2px solid #fd9f00;
  outline-offset: 2px;
  border-color: #fd9f00;
}

.demo-card--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.demo-card--disabled:hover,
.demo-card--disabled:active {
  background: #161616;
  border-color: #27272a;
  transform: none;
}

.demo-card--placeholder {
  opacity: 0.5;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
}

.demo-card--placeholder:hover,
.demo-card--placeholder:active {
  background: #161616;
  border-color: rgba(255, 255, 255, 0.2);
  transform: none;
}

.demo-card__body {
  flex: 1;
  padding: 1.25rem 1.5rem 0.75rem;
}

.demo-card__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.demo-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Link icons — same main accents as predictor / carplate menus */

.demo-card__icon--orange {
    background: rgb(from var(--search) r g b / 0.1);
    color: var(--search);
}

.demo-card__icon--orange-muted {
    background: rgba(255, 255, 255, 0.05);
    color: var(--search-muted);
}

.demo-card__icon--indigo {
    background: rgb(from var(--general) r g b / 0.1);
    color: var(--general);
}

.demo-card__icon--amber {
    background: rgb(from var(--copyright) r g b / 0.1);
    color: var(--copyright);
}

.demo-card__icon--emerald {
    background: rgb(from var(--character) r g b / 0.1);
    color: var(--character);
}

.demo-card__icon--violet {
    background: rgb(from var(--rating) r g b / 0.1);
    color: var(--rating);
}

.demo-card__icon--brand {
    background: rgba(255, 255, 255, 0.05);
    color: rgb(from var(--brand) r g b / 0.7);
}

.demo-card__icon--purple {
    background: rgba(255, 255, 255, 0.05);
    color: rgb(168 85 247 / 0.7);
}

.demo-card__icon--blue {
    background: rgb(from var(--carplate) r g b / 0.1);
    color: var(--carplate);
}

.demo-card__title {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.25;
}

.demo-card__desc {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.375;
}

.demo-card__desc--muted {
  color: rgba(255, 255, 255, 0.4);
}

.demo-card__footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 1.5rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.demo-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.demo-card__placeholder-plus {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.demo-card__placeholder-title {
  font-weight: 600;
}

.demo-card__placeholder-desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}

/* 메뉴 */
.profile-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.profile-initial {
    background: #fd9f00;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.profile-menu {
    position: absolute;
    top: 56px;
    right: 0;
    width: 280px;
    background: #212121;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 100;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.profile-menu-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-menu-info {
    overflow: hidden;
}

.profile-menu-name {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-email {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

    .profile-menu-item:hover {
        background: rgba(255,255,255,0.1);
    }

    .profile-menu-item i {
        width: 20px;
        text-align: center;
        color: #ccc;
    }
/* JSON 결과 복사 아이콘 버튼 */
.view-tabs-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.view-tabs-row > .view-tabs,
.view-tabs-row > .chart-panel-title {
  margin: 0;
}

.copy-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  /* .view-tab 높이와 동일: font-size 0.875rem x line-height 1.5 + 상하 padding 0.375rem x 2 = 33px */
  height: calc(0.875rem * 1.5 + 0.75rem);
  width: calc(0.875rem * 1.5 + 0.75rem);
  margin: 0;
  padding: 0;
  line-height: 1;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--light-faint);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.copy-icon-btn:hover {
  background: #f1f5f9;
  color: #475569;
}

.copy-icon-btn.hidden {
  display: none !important;
}

.copy-icon-btn svg.icon-copy { display: inline-block !important; }
.copy-icon-btn svg.icon-check { display: none !important; }
.copy-icon-btn.copied svg.icon-copy { display: none !important; }
.copy-icon-btn.copied svg.icon-check { display: inline-block !important; }
.copy-icon-btn.copied { color: #4caf50; border-color: #4caf50; }
.copy-icon-btn.error { color: #ef4444; border-color: #ef4444; }