:root {
  --bg: #fffaf4;
  --panel: #ffffff;
  --ink: #202124;
  --muted: #73777f;
  --line: #f0e6dc;
  --orange: #ff6b00;
  --orange-dark: #e95e00;
  --orange-soft: #fff1e6;
  --green: #08a64b;
  --shadow: 0 14px 32px rgba(49, 36, 21, .08);
  --sidebar: 174px;
  font-family: "DM Sans", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 4% 12%, rgba(255, 107, 0, .10), transparent 18%),
    radial-gradient(circle at 96% 82%, rgba(255, 107, 0, .12), transparent 22%),
    var(--bg);
  color: var(--ink);
  font-size: 14px;
}

button,
select {
  font: inherit;
}

button {
  color: inherit;
}

.demo-frame {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  width: min(1180px, calc(100vw - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: hidden;
  border: 10px solid #0c0d0f;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 22px 65px rgba(0, 0, 0, .20);
}

.sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 20px 12px;
  border-right: 1px solid #f0f0f0;
  background: #fffdf9;
}

.brand {
  display: block;
  margin-bottom: 26px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

.brand span:first-child,
.brand .paw {
  color: var(--orange);
}

.brand .paw {
  font-size: 10px;
}

.side-nav {
  display: grid;
  gap: 7px;
}

.nav-label {
  margin: 18px 9px 4px;
  color: #a3a0a0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #565a61;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.nav-item:hover,
.filter:hover,
.tab:hover,
.date-button:hover,
.icon-button:hover,
.ghost-button:hover,
.primary-button:hover,
.video-card:hover,
.platform-card:hover {
  transform: translateY(-1px);
}

.nav-item span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #868a92;
  font-size: 12px;
}

.nav-item[data-source="TikTok"] span,
.nav-item[data-source="X"] span,
.nav-item[data-source="Threads"] span {
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
}

.nav-item[data-source="Instagram"] span {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 110%, #ffd35c, #ff4e88 45%, #8f45ff);
  color: #ffffff;
}

.nav-item[data-source="YouTube Shorts"] span {
  border-radius: 7px;
  background: #ff2d2d;
  color: #ffffff;
}

.nav-item.active {
  background: var(--orange);
  color: #ffffff;
}

.nav-item.active span {
  color: #ffffff;
}

.collector-card {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff8f1;
}

.collector-card strong,
.collector-card small {
  display: block;
}

.collector-card strong {
  font-size: 11px;
}

.collector-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(8, 166, 75, .12);
}

.main {
  min-width: 0;
  padding: 22px 26px 28px;
  background: linear-gradient(180deg, #ffffff, #fffaf5);
}

.topbar,
.top-actions,
.filters,
.section-heading,
.tabs {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.top-actions {
  gap: 10px;
}

.date-button,
.icon-button,
.filter,
.tab,
.ghost-button,
.primary-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.date-button,
.icon-button,
.filter,
.tab {
  border-radius: 8px;
  background: #f7f7f8;
}

.date-button {
  padding: 9px 12px;
  font-size: 11px;
}

.icon-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
}

.hello {
  color: #70747c;
  font-size: 11px;
}

.avatar {
  font-size: 24px;
}

.filters {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.filter,
.tab {
  min-height: 30px;
  padding: 8px 16px;
  color: #555b63;
  font-size: 11px;
}

.filter.active,
.tab.active {
  background: var(--orange);
  color: #ffffff;
}

.select-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f7f7f8;
  color: #555b63;
  font-size: 11px;
  font-weight: 800;
}

.select-filter span {
  pointer-events: none;
}

.select-filter select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 224px;
  gap: 18px;
  margin-top: 18px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.platform-grid.single {
  grid-template-columns: minmax(180px, 260px);
}

.platform-card,
.ai-summary,
.video-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.platform-card {
  min-height: 142px;
  padding: 15px 10px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
}

.platform-card h3 {
  margin: 0 0 10px;
  font-size: 12px;
}

.platform-logo {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.logo-tiktok {
  background: #050505;
}

.logo-instagram {
  background: radial-gradient(circle at 30% 110%, #ffd35c, #ff4e88 45%, #8f45ff);
}

.logo-x {
  background: #050505;
}

.logo-threads {
  background: #111111;
}

.logo-youtube {
  border-radius: 13px;
  background: #ff2d2d;
}

.platform-card span,
.platform-card small {
  display: block;
}

.platform-card span {
  color: #4b4f57;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
}

.platform-card strong {
  display: inline-block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1;
}

.platform-card small {
  margin-top: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.ai-summary {
  min-height: 142px;
  padding: 16px;
  border-radius: 12px;
}

.ai-summary h2 {
  margin-bottom: 12px;
}

.ai-summary ul {
  display: grid;
  gap: 9px;
  margin: 0 0 13px;
  padding: 0;
  list-style: none;
}

.ai-summary li {
  position: relative;
  padding-left: 20px;
  color: #4e535a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.ai-summary li::before {
  position: absolute;
  left: 0;
  top: 2px;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange);
  content: "!";
  font-size: 9px;
}

.primary-button,
.ghost-button {
  min-height: 34px;
  padding: 9px 14px;
  border-radius: 7px;
  background: var(--orange);
  color: #ffffff;
  font-size: 11px;
}

.primary-button {
  width: 100%;
}

.primary-button.loading span,
.ghost-button.loading {
  animation: pulse .6s ease-in-out infinite alternate;
}

@keyframes pulse {
  to {
    opacity: .65;
  }
}

.section-heading {
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.ghost-button {
  border: 1px solid #ffd4b2;
  background: #fff5ed;
  color: var(--orange-dark);
}

.tabs {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.video-grid.single {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-grid.single .sns-column {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.video-grid.single .sns-head {
  grid-column: 1 / -1;
}

.sns-column {
  min-width: 0;
}

.sns-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
  box-shadow: 0 8px 20px rgba(49, 36, 21, .05);
}

.sns-head strong,
.sns-head span {
  display: block;
}

.sns-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.sns-head span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.sns-mini-logo {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.video-card {
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.sns-column .video-card + .video-card {
  margin-top: 10px;
}

.video-grid.single .sns-column .video-card + .video-card {
  margin-top: 0;
}

.empty-column {
  display: grid;
  min-height: 178px;
  place-items: center;
  padding: 16px;
  border: 1px dashed #efd9c7;
  border-radius: 12px;
  background: #fffaf4;
  color: #aa8061;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ddd;
}

.text-post-card {
  min-height: 270px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 247, 237, .72), #ffffff),
    var(--panel);
}

.text-post-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.text-post-head .video-rank,
.text-post-head .video-platform {
  position: static;
}

.text-source {
  color: #70747c;
  font-size: 10px;
  font-weight: 800;
}

.text-post-title {
  margin: 16px 0 10px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.text-post-copy {
  min-height: 92px;
  margin: 0;
  color: #42464d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.75;
}

.video-thumb::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .78)),
    var(--thumb);
  content: "";
}

.video-rank,
.video-platform,
.play-button {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.video-rank {
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 0 0 9px 0;
  background: var(--orange);
  color: #ffffff;
  font-size: 14px;
}

.video-platform {
  left: 34px;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  font-size: 10px;
}

.play-button {
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.video-title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.video-body {
  padding: 10px 11px 12px;
}

.video-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #6f737b;
  font-size: 10px;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.tag {
  padding: 5px 7px;
  border-radius: 7px;
  background: #f3f6f8;
  color: #64707a;
  font-size: 10px;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  padding: 12px 16px;
  border-radius: 10px;
  background: #202124;
  color: #ffffff;
  font-size: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: .2s;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(25, 20, 15, .42);
  backdrop-filter: blur(6px);
}

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

.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  padding: 24px;
  border: 1px solid #ffd3ad;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff3e9;
  color: var(--orange);
  cursor: pointer;
  font-size: 20px;
  font-weight: 800;
}

.modal-kicker {
  margin: 0 0 5px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

.modal h2 {
  margin: 0 36px 16px 0;
  font-size: 22px;
}

.modal-content {
  display: grid;
  gap: 18px;
}

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

.detail-metric,
.idea-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fffaf5;
}

.detail-metric span,
.detail-metric strong {
  display: block;
}

.detail-metric span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.detail-metric strong {
  margin-top: 5px;
  font-size: 18px;
}

.idea-box {
  padding: 15px 16px;
  border-radius: 12px;
}

.idea-box h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 11px;
  color: #2a2d33;
  font-size: 13px;
  letter-spacing: .01em;
}

.idea-box h3::before {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  content: "";
}

.idea-box p,
.idea-box li {
  color: #4d5259;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.8;
}

.idea-box p {
  margin: 0;
}

.idea-box ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.idea-box li {
  padding-left: 2px;
}

.idea-box li + li {
  padding-top: 2px;
  border-top: 1px dashed #f0e2d3;
}

@media (max-width: 1080px) {
  .demo-frame {
    width: min(940px, calc(100vw - 20px));
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .brand {
    text-align: center;
  }

  .brand,
  .nav-item {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
  }

  .nav-item span {
    font-size: 13px;
  }

  .collector-card {
    display: none;
  }

  .summary-layout,
  .platform-grid,
  .video-grid,
  .detail-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-grid.single .sns-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .demo-frame {
    display: block;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: block;
    overflow-x: auto;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(49, 36, 21, .08);
  }

  .brand {
    display: none;
  }

  .side-nav {
    display: flex;
    gap: 8px;
    min-width: max-content;
  }

  .nav-label {
    display: none;
  }

  .nav-item {
    width: auto;
    min-width: 112px;
    justify-content: flex-start;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(49, 36, 21, .06);
    font-size: 11px;
  }

  .nav-item span {
    flex: 0 0 auto;
    font-size: 12px;
  }

  .main {
    padding: 18px 14px 28px;
  }

  .topbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid #f6ede5;
  }

  .summary-layout,
  .detail-strip {
    grid-template-columns: 1fr;
  }

  .platform-grid,
  .video-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(162px, 72vw);
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }

  .platform-card,
  .sns-column {
    scroll-snap-align: start;
  }

  .video-grid.single,
  .video-grid.single .sns-column {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 78vw);
    grid-template-columns: none;
    overflow-x: auto;
  }

  .video-grid.single .sns-head {
    grid-column: auto;
  }

  .sns-column {
    display: grid;
    grid-auto-flow: row;
    align-content: start;
  }

  .text-post-card {
    min-height: 252px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .modal h2 {
    margin-right: 30px;
    font-size: 18px;
  }

  .detail-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .detail-metric {
    padding: 9px 8px;
  }

  .detail-metric strong {
    font-size: 15px;
  }
}
