:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #fafafa;
  --line: #e7e8ec;
  --text: #111318;
  --muted: #737989;
  --primary: #6f57ff;
  --primary-2: #8d7dff;
  --success: #0ea56b;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Pretendard", "Noto Sans KR", system-ui, sans-serif;
}

body {
  min-height: 100vh;
}

button, input, textarea, select, video {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #fcfcfd;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #111318);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text strong {
  font-size: 16px;
}

.brand-text span {
  font-size: 13px;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  background: transparent;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  color: var(--muted);
  transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  background: #f0edff;
  color: var(--primary);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
}

.plan-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.plan-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f0edff;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.plan-card p {
  margin: 0;
  line-height: 1.5;
  color: var(--muted);
  font-size: 13px;
}

.main {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.main-chat {
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.topbar-sub {
  margin: 6px 0 0;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

.status-pill.subtle {
  color: var(--primary);
  font-weight: 700;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.dot.online {
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(14, 165, 107, 0.12);
}

.hero {
  background: linear-gradient(180deg, #ffffff, #faf7ff);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #f0edff;
  color: var(--primary);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.hero-copy h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.3;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero-preview-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.hero-preview-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}

.hero-preview-image {
  border-radius: 18px;
  overflow: hidden;
  background: #f3f4f8;
  min-height: 260px;
  display: grid;
  place-items: center;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.attach-btn {
  border-radius: 999px;
  padding: 12px 18px;
  transition: 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(111, 87, 255, 0.25);
}

.secondary-btn {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.ghost-btn {
  background: #f6f7fb;
  color: var(--text);
}

.attach-btn {
  background: #111318;
  color: #fff;
}

.workspace {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 22px;
}

.workspace.single-column {
  grid-template-columns: 1fr;
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.card-head h3,
.card-head h4 {
  margin: 0;
}

.mini-badge {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-badge.ok {
  background: #ecfdf3;
  color: #047857;
}

.mini-badge.error {
  background: #fef2f2;
  color: #b91c1c;
}

.form-grid,
.discover-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.discover-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px 14px;
  outline: none;
}

.meta-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.meta-item strong {
  color: var(--text);
}

.progress-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #eef0f5;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  transition: width 0.3s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

.job-info-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.job-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.job-box span {
  color: var(--muted);
  font-size: 12px;
}

.feature-card {
  min-height: 400px;
}

.featured-preview {
  border-radius: 20px;
  overflow: hidden;
  background: #f3f4f8;
  min-height: 260px;
  display: grid;
  place-items: center;
}

.featured-preview img {
  width: 100%;
  display: block;
}

.featured-empty {
  color: var(--muted);
  padding: 24px;
}

.masonry-grid {
  column-count: 3;
  column-gap: 16px;
}

.gallery-empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 24px;
  background: #fbfcfe;
}

.masonry-card {
  break-inside: avoid;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.masonry-card img {
  width: 100%;
  display: block;
}

.masonry-content {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.masonry-title {
  font-weight: 700;
  font-size: 14px;
}

.masonry-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.thread-list,
.job-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thread-card,
.job-monitor-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfe;
  padding: 16px;
}

.thread-card.result {
  background: #f8f7ff;
}

.thread-top,
.job-monitor-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.thread-role {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.thread-role.user {
  background: #eef2ff;
  color: var(--primary);
}

.thread-role.system {
  background: #f3f4f6;
  color: #4b5563;
}

.thread-time {
  color: var(--muted);
  font-size: 12px;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  min-height: 0;
  flex: 1;
}

.thread-panel {
  min-height: 0;
}

.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble {
  max-width: 880px;
  border-radius: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.chat-bubble.user {
  align-self: flex-end;
  background: #f3f0ff;
}

.chat-bubble.system {
  align-self: flex-start;
  background: #fff;
}

.chat-bubble.job {
  align-self: flex-start;
  background: #fbfcfe;
}

.chat-bubble.result {
  align-self: flex-start;
  background: #ffffff;
}

.bubble-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bubble-role {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.bubble-meta {
  color: var(--muted);
  font-size: 12px;
}

.chat-bubble p {
  margin: 0;
  line-height: 1.6;
}

.result-gallery {
  margin-top: 14px;
}

.result-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-video {
  margin-top: 14px;
}

.result-video video {
  width: 100%;
  min-height: 220px;
  background: #000;
  border-radius: 18px;
}

.inspector-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.composer-shell {
  position: sticky;
  bottom: 0;
  padding-bottom: 8px;
}

.composer-card {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.chip {
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.dropzone {
  border: 1px dashed #c7c9d1;
  border-radius: 20px;
  background: #fbfcfe;
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.dropzone.dragover {
  border-color: var(--primary);
  background: #f6f3ff;
}

.dropzone p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.prompt-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
}

.prompt-box textarea {
  width: 100%;
  min-height: 110px;
  border: 0;
  resize: vertical;
  outline: none;
  background: transparent;
  color: var(--text);
  line-height: 1.6;
}

.prompt-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
}

.jobs-table-wrap {
  overflow-x: auto;
}

.jobs-table {
  width: 100%;
  border-collapse: collapse;
}

.jobs-table th,
.jobs-table td {
  text-align: left;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
}

.jobs-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-tag {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-tag.idle {
  background: #f3f4f6;
  color: #6b7280;
}

.status-tag.queued {
  background: #fff7ed;
  color: var(--warning);
}

.status-tag.active,
.status-tag.rendering,
.status-tag.encoding {
  background: #eef2ff;
  color: var(--primary);
}

.status-tag.completed {
  background: #ecfdf5;
  color: var(--success);
}

.status-tag.failed {
  background: #fef2f2;
  color: var(--danger);
}

@media (max-width: 1280px) {
  .workspace,
  .content-layout,
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .masonry-grid {
    column-count: 2;
  }

  .discover-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .masonry-grid {
    column-count: 1;
  }

  .form-grid,
  .job-info-grid,
  .discover-filters {
    grid-template-columns: 1fr;
  }

  .prompt-actions,
  .hero-actions {
    justify-content: stretch;
  }

  .prompt-actions > *,
  .hero-actions > * {
    width: 100%;
  }
}

.upgrade-banner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:24px;
  border:1px solid var(--line);
  border-radius:22px;
  background:#ffffff;
  box-shadow:var(--shadow);
}

.upgrade-text h3{
  margin:0 0 6px;
}

.upgrade-text p{
  margin:0;
  color:var(--muted);
}

.upgrade-actions{
  display:flex;
  gap:10px;
}

.upgrade-btn{
  display:block;
  margin-top:12px;
  text-align:center;
  padding:10px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#fff;
  font-weight:600;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pricing-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pricing-card.featured {
  border-color: rgba(111, 87, 255, 0.35);
  box-shadow: 0 16px 40px rgba(111, 87, 255, 0.14);
  background: linear-gradient(180deg, #ffffff, #faf7ff);
}

.pricing-card-top h3 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.pricing-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-badge {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pricing-badge.muted {
  background: #f3f4f6;
  color: #6b7280;
}

.pricing-badge.primary {
  background: #f0edff;
  color: var(--primary);
}

.pricing-badge.dark {
  background: #111318;
  color: #fff;
}

.pricing-price,
.pricing-price-lg {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.pricing-price span,
.pricing-price-lg span {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 4px;
}

.pricing-features,
.pricing-highlight-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.8;
}

.pricing-actions {
  margin-top: auto;
}

.full-width {
  width: 100%;
}

.pricing-highlight {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  justify-content: center;
}

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=SUIT:wght@400;500;700;800&display=swap");

:root {
  --bg: #f4efe6;
  --panel: #fffdf9;
  --panel-2: #fff7ea;
  --line: #e9dcc8;
  --text: #1f1c16;
  --muted: #6e6558;
  --primary: #c4612d;
  --primary-2: #de7f49;
  --success: #0f9a76;
  --warning: #c97a18;
  --danger: #cb3f3f;
  --shadow: 0 14px 36px rgba(63, 37, 9, 0.12);
}

html,
body {
  font-family: "SUIT", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% -10%, rgba(238, 161, 93, 0.32), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(119, 191, 173, 0.22), transparent 35%),
    linear-gradient(180deg, #f7f1e9 0%, #efe7da 100%);
}

.app-shell {
  position: relative;
}

.sidebar {
  background: linear-gradient(180deg, #fffcf6 0%, #fff5e7 100%);
}

.brand-mark {
  background: linear-gradient(135deg, #e0863f, #bf4f29);
  border-radius: 12px;
}

.brand-text strong,
.topbar h1,
.card-head h3,
.hero-copy h2 {
  font-family: "Space Grotesk", "SUIT", sans-serif;
  letter-spacing: -0.02em;
}

.nav-item:hover,
.nav-item.active {
  background: #ffe8cd;
  color: #8f3a1f;
}

.main {
  animation: pageFadeIn 0.5s ease both;
}

.hero,
.card,
.plan-card,
.status-pill {
  border-color: #eadcc9;
  box-shadow: var(--shadow);
}

.hero {
  background: linear-gradient(135deg, #fff8ee 0%, #fff2dd 45%, #f8f4ec 100%);
}

.primary-btn,
.upgrade-btn {
  background: linear-gradient(135deg, #c9612b, #df8b4a);
}

.secondary-btn {
  border: 1px solid #dfc6a7;
  background: #fffaf1;
}

.dot.online {
  box-shadow: 0 0 0 5px rgba(15, 154, 118, 0.18);
}

.chat-bubble {
  animation: bubbleUp 0.35s ease both;
}

.job-monitor-card {
  background: linear-gradient(180deg, #fffdf8 0%, #fff7eb 100%);
}

.mini-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #f3e5cf;
  overflow: hidden;
  margin: 8px 0 2px;
}

.mini-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #d66b33 0%, #f0a856 100%);
  transition: width 0.35s ease;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bubbleUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.visible-banner {
  display: flex;
}

.pricing-table td:first-child,
.pricing-table th:first-child {
  font-weight: 700;
}

@media (max-width: 1280px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer{
  margin-top:60px;
  border-top:1px solid var(--line);
  background:#fafafa;
  padding:40px 30px;
}

.footer-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:40px;
  max-width:1200px;
  margin:auto;
}

.footer-brand strong{
  font-size:18px;
}

.footer-brand p{
  margin-top:10px;
  color:var(--muted);
  line-height:1.6;
}

.footer-section h4{
  margin-bottom:12px;
}

.footer-section ul{
  list-style:none;
  padding:0;
  margin:0;
  line-height:1.8;
  color:var(--muted);
}

.footer-bottom{
  margin-top:30px;
  text-align:center;
  font-size:13px;
  color:var(--muted);
}

.full-width {
  width: 100%;
}

button.full-width {
  justify-content: center;
}

.payment-result-shell {
  display: block;
  min-height: 100vh;
}

.payment-result-main {
  max-width: 900px;
  margin: 0 auto;
}

.payment-result-actions {
  margin-top: 20px;
}

.logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffffff, #f6f3ff);
  border: 1px solid rgba(111, 87, 255, 0.14);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(111, 87, 255, 0.12);
}

.site-logo {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.upload-status,
.action-status {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.upload-status.ok,
.action-status.ok {
  color: var(--success);
  font-weight: 600;
}

.upload-status.error,
.action-status.error {
  color: var(--danger);
  font-weight: 600;
}