/* ============================================
   KIRINUKI!! — Design System (lp-02 base)
   Bold Creative / Neon Yellow + Grey + Black
   ============================================ */

/* ---------- Fonts (Bebas Neue for lp-02) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  /* lp-02 Colors */
  --bg-gray: #E8E8E8;
  --bg-dark: #0A0A0A;
  --bg-yellow: #F5E500;
  --bg-light: #FFFFFF;
  --accent: #F5E500;
  --accent-hover: #E0D000;
  --text-black: #0A0A0A;
  --text-white: #FFFFFF;
  --text-gray: #6B6B6B;
  --text-gray-dark: #4A4A4A;
  --border-dark: #0A0A0A;
  --border-light: #C8C8C8;
  --card-dark: rgba(255, 255, 255, 0.06);

  /* Dashboard Colors */
  --dash-bg: #FFFFFF;
  --dash-surface: #F5F5F5;
  --dash-border: #E0E0E0;
  --dash-text: #0A0A0A;
  --dash-text-sub: #6B6B6B;
  --dash-text-light: #9A9A9A;
  --success: #10B981;
  --success-bg: #ECFDF5;
  --success-text: #065F46;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --warning-text: #92400E;
  --error: #EF4444;
  --error-bg: #FEF2F2;
  --error-text: #991B1B;
  --info-bg: #FFFDE7;
  --info-text: #7B6B00;

  /* Typography */
  --font-display: 'Bebas Neue', 'Anton', 'Impact', sans-serif;
  --font-en: 'Inter', 'Helvetica Neue', sans-serif;
  --font-jp: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;

  /* Spacing */
  --section-pad: 100px;
  --section-pad-mobile: 56px;
  --container-max: 1200px;
  --sidebar-width: 240px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-en), var(--font-jp);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-black);
  background: var(--bg-gray);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

/* ---------- LP Sections ---------- */
.section { padding: var(--section-pad) 0; }
.section--gray { background: var(--bg-gray); color: var(--text-black); }
.section--dark { background: var(--bg-dark); color: var(--text-white); }
.section--light { background: var(--bg-light); color: var(--text-black); }
.section--yellow { background: var(--bg-yellow); color: var(--text-black); }

@media (max-width: 768px) {
  .section { padding: var(--section-pad-mobile) 0; }
}

/* ---------- LP Typography (lp-02: BOLD / CONDENSED / UPPERCASE) ---------- */
.hero-title {
  font-family: var(--font-jp), var(--font-display);
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gray);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 2px;
  background: currentColor;
}

.section-title {
  font-family: var(--font-display), var(--font-jp);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.section-desc {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-gray);
  max-width: 600px;
}

.section--dark .section-desc { color: rgba(255,255,255,0.6); }
.section--dark .section-label { color: var(--accent); }
.section--dark .section-label::before { background: var(--accent); }

/* ---------- LP Buttons (lp-02: SHARP / NO RADIUS) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 0;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-en), var(--font-jp);
  border: 2px solid var(--text-black);
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-black);
  border-color: var(--text-black);
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--text-black);
  border: 2px solid var(--text-black);
}
.btn--secondary:hover {
  background: var(--text-black);
  color: var(--text-white);
}

.btn--dark {
  background: var(--text-black);
  color: var(--text-white);
  border-color: var(--text-black);
}
.btn--dark:hover {
  background: #222;
}

.btn--white {
  background: var(--bg-light);
  color: var(--text-black);
  border-color: var(--text-black);
}

/* ---------- LP Cards (lp-02: SHARP BORDERS / NO RADIUS) ---------- */
.card--dark {
  background: var(--bg-dark);
  border: 2px solid #333;
  border-radius: 0;
  padding: 32px;
  color: var(--text-white);
  transition: all 0.2s ease;
}
.card--dark:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card--light {
  background: var(--bg-light);
  border: 2px solid var(--text-black);
  border-radius: 0;
  padding: 32px;
  transition: all 0.2s ease;
}
.card--light:hover {
  transform: translateY(-4px);
}

.card--accent {
  background: var(--accent);
  border: 2px solid var(--text-black);
  border-radius: 0;
  padding: 32px;
  color: var(--text-black);
}

/* ---------- LP Nav (lp-02 style) ---------- */
.lp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.3s ease;
}
.lp-nav.scrolled {
  background: rgba(232, 232, 232, 0.95);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 2px solid var(--text-black);
}
.lp-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-nav__logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--text-black);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lp-nav__logo span { color: var(--text-black); }
.lp-nav__links { display: flex; gap: 32px; align-items: center; }
.lp-nav__links a {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-black);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.lp-nav__links a:hover { color: var(--text-gray); }

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-black);
  transition: all 0.2s;
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .lp-nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-gray);
    border-bottom: 2px solid var(--text-black);
    flex-direction: column;
    padding: 20px 40px;
    gap: 16px;
  }
  .lp-nav__links.open { display: flex; }
  .lp-nav__links a { font-size: 16px; }
  .lp-nav__links .btn { width: 100%; justify-content: center; }
}

/* ---------- Number Badge (lp-02) ---------- */
.num-badge {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 400;
  color: var(--accent);
  line-height: 0.9;
  margin-bottom: 16px;
}

/* ---------- Icon Box (lp-02: yellow circle) ---------- */
.icon-box {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-black);
  font-size: 24px;
  margin-bottom: 20px;
  border: 1.5px solid var(--text-black);
  flex-shrink: 0;
}

/* ---------- Arrow Shape (lp-02 geometric) ---------- */
.arrow-shape {
  background: var(--accent);
  clip-path: polygon(0 0, 85% 0, 100% 15%, 100% 100%, 15% 100%, 0 85%);
}

.arrow-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--text-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.arrow-circle:hover {
  background: var(--accent);
  transform: rotate(45deg);
}

/* ---------- Grid Helpers ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Fade-in Animation (lp-02: slideUp) ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Image Placeholder (lp-02: sharp) ---------- */
.img-placeholder {
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.img-placeholder--hero {
  background: var(--bg-dark);
  border: 2px solid #333;
}
.img-placeholder--feature {
  background: #1A1A1A;
  border: 2px solid #333;
}

/* ---------- Stats Bar (lp-02) ---------- */
.stats-bar {
  display: flex;
  border: 2px solid var(--text-black);
  background: var(--bg-light);
}
.stats-bar__item {
  flex: 1;
  padding: 32px;
  text-align: center;
  border-right: 2px solid var(--text-black);
}
.stats-bar__item:last-child { border-right: none; }
.stats-bar__num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-black);
}
.stats-bar__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
}

/* ---------- Stats Bar Responsive ---------- */
@media (max-width: 768px) {
  .stats-bar { flex-direction: column; }
  .stats-bar__item { border-right: none; border-bottom: 2px solid var(--text-black); }
  .stats-bar__item:last-child { border-bottom: none; }
  .stats-bar__num { font-size: 40px; }
  .hero-title { font-size: clamp(36px, 8vw, 56px) !important; }
  .section-title { font-size: clamp(28px, 6vw, 48px) !important; }
  .lp-nav__links { gap: 16px; }
  .arrow-shape { width: 200px !important; height: 240px !important; }
  .grid-3 { gap: 2px !important; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 32px !important; }
  .num-badge { font-size: 56px; }
}

/* ---------- Geometric Decorations ---------- */
.geo-circle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
}
.geo-rect {
  position: absolute;
  background: var(--accent);
  pointer-events: none;
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */

/* ---------- Dashboard Layout ---------- */
.dash {
  display: flex;
  min-height: 100vh;
  background: var(--dash-bg);
}

.dash-sidebar {
  width: var(--sidebar-width);
  background: var(--dash-surface);
  border-right: 1px solid var(--dash-border);
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 50;
}

.dash-sidebar__logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  padding: 0 24px 24px;
  color: var(--dash-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dash-sidebar__logo span { color: var(--dash-text); }

.dash-sidebar__nav { padding: 0 12px; }
.dash-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--dash-text-sub);
  cursor: pointer;
  transition: all 0.15s;
}
.dash-sidebar__item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--dash-text);
}
.dash-sidebar__item--active {
  background: var(--accent);
  color: var(--text-black);
  font-weight: 700;
}

.dash-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px 40px;
}

/* ---------- Dashboard Header ---------- */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.dash-header__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--dash-text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.dash-header__sub {
  font-size: 14px;
  color: var(--dash-text-sub);
  margin-top: 4px;
}

/* ---------- Dashboard Buttons ---------- */
.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.dash-btn--primary {
  background: var(--accent);
  color: var(--text-black);
  border: 2px solid var(--text-black);
}
.dash-btn--primary:hover { background: var(--accent-hover); }
.dash-btn--secondary {
  background: var(--dash-bg);
  color: var(--dash-text-sub);
  border: 1px solid var(--dash-border);
}
.dash-btn--secondary:hover { background: var(--dash-surface); }
.dash-btn--destructive {
  background: var(--error);
  color: #FFF;
}

/* ---------- KPI Cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.kpi-card {
  background: var(--dash-bg);
  border: 2px solid var(--dash-border);
  border-radius: 0;
  padding: 20px 24px;
}
.kpi-card__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--dash-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.kpi-card__value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  color: var(--dash-text);
  line-height: 1.1;
}
.kpi-card__change {
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 0;
}
.kpi-card__change--up { background: var(--success-bg); color: var(--success-text); }
.kpi-card__change--down { background: var(--error-bg); color: var(--error-text); }

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .dash-main { margin-left: 0; padding: 20px; }
}

/* ---------- Badge / Status ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge--success { background: var(--success-bg); color: var(--success-text); }
.badge--warning { background: var(--warning-bg); color: var(--warning-text); }
.badge--error { background: var(--error-bg); color: var(--error-text); }
.badge--info { background: var(--info-bg); color: var(--info-text); }

/* ---------- Table ---------- */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dash-table thead th {
  background: var(--dash-surface);
  border-bottom: 2px solid var(--dash-border);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--dash-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dash-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #F0F0F0;
  color: var(--dash-text);
  vertical-align: middle;
}
.dash-table tbody tr:hover { background: #FAFAFA; }

/* ---------- Project Card ---------- */
.project-card {
  background: var(--dash-bg);
  border: 2px solid var(--dash-border);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.project-card:hover {
  border-color: var(--text-black);
  transform: translateY(-2px);
}
.project-card__thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  position: relative;
  overflow: hidden;
}
.project-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-card__duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 2px 8px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.project-card__body { padding: 16px; }
.project-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dash-text);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-card__clips {
  font-size: 12px;
  color: var(--dash-text-sub);
}

/* ---------- Create Card ---------- */
.create-card {
  border: 2px dashed var(--dash-border);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--dash-text-sub);
  gap: 12px;
}
.create-card:hover {
  border-color: var(--text-black);
  color: var(--text-black);
  background: var(--accent);
}
.create-card__icon { font-size: 32px; }
.create-card__text { font-size: 14px; font-weight: 700; text-transform: uppercase; }

/* ============================================
   PROJECT / EDITOR STYLES
   ============================================ */

/* ---------- Editor Layout ---------- */
.editor {
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-rows: auto 1fr auto;
  height: calc(100vh - 64px);
  gap: 0;
}

.editor-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 2px solid var(--text-black);
  background: var(--dash-bg);
}
.editor-header__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dash-text);
}
.editor-header__back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dash-text-sub);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.editor-header__back:hover { color: var(--text-black); }

/* ---------- Video Player ---------- */
.editor-player {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.editor-player video {
  max-width: 100%;
  max-height: 100%;
}
/* Sprint 8.2: Telop overlay replaced with draggable #telop-preview in HTML */
/* Old .editor-player__overlay gradient removed — telop now freely positioned */
.editor-player__telop-dragging {
  cursor: grabbing !important;
  opacity: 0.9;
}

/* ---------- Clip Panel ---------- */
.clip-panel {
  background: var(--dash-surface);
  border-left: 2px solid var(--text-black);
  overflow-y: auto;
  padding: 20px;
}
.clip-panel__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dash-text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clip-item {
  background: var(--dash-bg);
  border: 2px solid var(--dash-border);
  border-radius: 0;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.clip-item:hover { border-color: var(--text-black); }
.clip-item--active {
  border-color: var(--text-black);
  background: var(--accent);
  color: var(--text-black);
}
.clip-item--active .clip-item__score {
  background: var(--text-black);
  color: var(--accent);
}
.clip-item--active .clip-item__time,
.clip-item--active .clip-item__reason {
  color: rgba(10, 10, 10, 0.7);
}
.clip-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.clip-item__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--dash-text);
  flex: 1;
}
.clip-item__score {
  background: var(--accent);
  color: var(--text-black);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 0;
  min-width: 36px;
  text-align: center;
  border: 1px solid var(--text-black);
}
.clip-item__time {
  font-size: 12px;
  color: var(--dash-text-sub);
  margin-bottom: 6px;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.clip-item__reason {
  font-size: 12px;
  color: var(--dash-text-light);
  line-height: 1.5;
}

/* ---------- Timeline ---------- */
.editor-timeline {
  grid-column: 1 / -1;
  background: var(--dash-surface);
  border-top: 2px solid var(--text-black);
  padding: 16px 24px;
}
.timeline-track {
  height: 48px;
  background: var(--dash-bg);
  border-radius: 0;
  border: 2px solid var(--dash-border);
  position: relative;
  overflow: hidden;
}
.timeline-clip {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background: rgba(245, 229, 0, 0.3);
  border: 2px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.timeline-clip:hover { background: rgba(245, 229, 0, 0.5); }
.timeline-clip--active {
  background: rgba(245, 229, 0, 0.8);
  border-width: 3px;
  top: 0;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 0 6px rgba(245, 229, 0, 0.6);
}
.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--error);
  z-index: 10;
  pointer-events: none;
}
.timeline-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.timeline-controls button {
  background: none;
  border: none;
  color: var(--dash-text-sub);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}
.timeline-controls button:hover { color: var(--text-black); }
.timeline-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--dash-text);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Telop Editor ---------- */
.telop-editor {
  background: var(--dash-bg);
  border: 2px solid var(--dash-border);
  border-radius: 0;
  padding: 16px;
  margin-top: 16px;
}
.telop-editor__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--dash-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.telop-editor textarea {
  width: 100%;
  border: 2px solid var(--dash-border);
  border-radius: 0;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-en), var(--font-jp);
  resize: vertical;
  min-height: 60px;
  color: var(--dash-text);
}
.telop-editor textarea:focus {
  outline: none;
  border-color: var(--text-black);
  box-shadow: none;
}
.telop-suggestions {
  margin-top: 10px;
}
.telop-suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 0;
  font-size: 13px;
  color: var(--dash-text);
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.telop-suggestion:hover {
  background: var(--accent);
  border-color: var(--text-black);
}
.telop-suggestion__icon { color: var(--text-black); font-size: 16px; }

/* ---------- Format Selector ---------- */
.format-selector {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.format-option {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--dash-border);
  border-radius: 0;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--dash-text-sub);
  transition: all 0.15s;
  text-transform: uppercase;
}
.format-option:hover { border-color: var(--text-black); color: var(--text-black); }
.format-option--active {
  border-color: var(--text-black);
  background: var(--accent);
  color: var(--text-black);
}
.format-option__ratio {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.format-option__ratio div {
  border: 2px solid currentColor;
  border-radius: 0;
}

/* ---------- Upload Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--dash-bg);
  border-radius: 0;
  border: 2px solid var(--text-black);
  padding: 0;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 8px 0 var(--text-black);
  transform: translateY(10px);
  transition: transform 0.2s;
}
.modal__header {
  padding: 32px 40px 0;
  flex-shrink: 0;
}
.modal__body {
  padding: 0 40px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.modal__footer {
  padding: 16px 40px 32px;
  flex-shrink: 0;
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--dash-text);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.modal__desc {
  font-size: 14px;
  color: var(--dash-text-sub);
  margin-bottom: 24px;
}

.upload-zone {
  border: 2px dashed var(--text-black);
  border-radius: 0;
  padding: 48px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover {
  background: var(--accent);
}
.upload-zone__icon { font-size: 40px; color: var(--text-black); margin-bottom: 12px; }
.upload-zone__text { font-size: 14px; color: var(--dash-text-sub); font-weight: 600; }
.upload-zone__hint { font-size: 12px; color: var(--dash-text-light); margin-top: 6px; }

/* ---------- Progress Bar ---------- */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--dash-surface);
  border-radius: 0;
  overflow: hidden;
  margin-top: 16px;
}
.progress-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 0;
  transition: width 0.3s ease;
}

/* ---------- AI Model Select ---------- */
.model-select {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.model-option {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--dash-border);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.15s;
}
.model-option:hover { border-color: var(--text-black); }
.model-option--active {
  border-color: var(--text-black);
  background: var(--accent);
}
.model-option__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dash-text);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.model-option__desc {
  font-size: 12px;
  color: var(--dash-text-sub);
}

/* ---------- Footer ---------- */
.lp-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.5);
  padding: 40px 0;
  font-size: 13px;
  text-align: center;
  border-top: 2px solid #333;
}

/* ============================================
   MOBILE RESPONSIVE — KIRINUKI!!
   ============================================ */

/* ── Navigation Hamburger Button ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-black);
  transition: 0.3s;
}

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 40px; }
  .stats-bar { flex-wrap: wrap; }
  .stats-bar__item { flex: 1 1 45%; }

  /* Editor: narrower clip panel on tablet */
  .editor { grid-template-columns: 1fr 300px; }
  .clip-panel { padding: 14px; }
  .editor-timeline { padding: 12px 16px; }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .hero-title { font-size: 32px; }
  .section-title { font-size: 28px; }
  .num-badge { font-size: 40px; }

  /* LP Navigation */
  .lp-nav .container { padding: 0 16px; }
  .lp-nav__links {
    display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: #1a1a1a; padding: 20px; gap: 16px; z-index: 100; border-top: 2px solid var(--accent);
  }
  .lp-nav__links.open { display: flex; }
  .nav-toggle { display: flex; }

  /* Dashboard */
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .dashboard-stats > div:nth-child(5) { grid-column: span 2; }
  .project-card { padding: 16px; }
  .project-grid { grid-template-columns: 1fr !important; }

  /* Filter bar responsive */
  #project-search { width: 100%; margin-bottom: 8px; }
  #project-status-filter, #project-sort { width: 48%; }

  /* App nav (bottom bar) */
  .app-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; }
  .app-nav .container { padding: 0 8px; }
  .app-nav__user-name { display: none; }

  /* Project editor — full mobile layout */
  .editor {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto 1fr auto !important;
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto;
  }
  body:has(.editor) { overflow: auto !important; }
  .editor-header { padding: 8px 12px; }
  .editor-header__title { font-size: 13px; }
  .editor-player {
    min-height: 200px;
    max-height: 40vh;
    aspect-ratio: 16/9;
  }
  .clip-panel {
    border-left: none !important;
    border-top: 2px solid var(--text-black);
    padding: 12px;
    max-height: none;
    overflow-y: visible;
  }
  .clip-panel__title { font-size: 13px; }
  #clip-list { max-height: 200px; }
  .clip-item { padding: 10px; margin-bottom: 6px; }
  .clip-item__title { font-size: 12px; }
  .clip-item__time { font-size: 11px; }
  .clip-item__reason { font-size: 11px; }
  .editor-timeline { padding: 8px 12px; }
  .timeline-track { height: 36px; }

  /* Clip edit panel responsive */
  .acc-header { padding: 6px 8px; font-size: 11px; }
  .time-btn { width: 32px; height: 32px; }
  .time-input { height: 32px; font-size: 12px; }
  .telop-style-btn { padding: 4px 2px; font-size: 9px; }
  .telop-pos-btn { min-width: 44px; font-size: 8px; }

  .clip-list { max-height: 300px; overflow-y: auto; }
  .clip-controls { flex-wrap: wrap; gap: 8px; }
  .clip-controls button { flex: 1 1 auto; min-width: 0; font-size: 12px; padding: 8px 12px; }

  /* Video preview area */
  .video-preview { width: 100%; height: auto; aspect-ratio: 16/9; }

  /* Pricing cards stack */
  .card--accent, .card--dark, .card--light { margin-bottom: 2px; }

  /* Auth forms */
  .auth-container { padding: 16px; }
  .auth-card { padding: 24px 20px; width: 100%; max-width: 100%; }

  /* Stats bar */
  .stats-bar { gap: 0; }
  .stats-bar__item { padding: 16px 12px; border-bottom: 1px solid #eee; }
  .stats-bar__num { font-size: 28px; }

  /* Admin page */
  .admin-grid { grid-template-columns: 1fr; }

  /* Modals */
  .modal-content, [class*="modal"] > div {
    width: 95vw !important; max-width: 95vw !important; margin: 8px auto;
    max-height: 85vh; overflow-y: auto;
  }

  /* Footer */
  .lp-footer { padding: 32px 16px; text-align: center; }

  /* Tables */
  table { display: block; overflow-x: auto; white-space: nowrap; }

  /* Notification panel */
  .notif-panel { width: 95vw !important; right: -40px !important; }

  /* Toast notifications */
  #kirinuki-toast-container { left: 8px; right: 8px; max-width: none; }
}

/* ── Small Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .section-title { font-size: 24px; }
  .btn { padding: 12px 20px; font-size: 13px; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .stats-bar__item { flex: 1 1 100%; }
  #project-status-filter, #project-sort { width: 100%; }
}

/* ── Touch-friendly targets ── */
@media (hover: none) and (pointer: coarse) {
  button, .btn, a.btn, select, input[type="checkbox"], input[type="radio"] {
    min-height: 44px; min-width: 44px;
  }
  select { font-size: 16px; /* prevents iOS zoom */ }
  input[type="text"], input[type="email"], input[type="password"], textarea {
    font-size: 16px; /* prevents iOS zoom on focus */
  }
}

/* ── Safe area padding (notch devices) ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .app-nav { padding-bottom: env(safe-area-inset-bottom); }
  body { padding-bottom: env(safe-area-inset-bottom); }
}
