:root {
  color-scheme: light;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f6f8fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --primary: #0b94f6;
  --primary-dark: #0675dc;
  --primary-soft: #eaf5ff;
  --ink: #101827;
  --muted: #657083;
  --line: #dce3ec;
  --line-strong: #cbd5e1;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --green: #18a957;
  --green-soft: #eaf9f0;
  --orange: #d98909;
  --orange-soft: #fff5de;
  --shadow: 0 18px 48px rgba(26, 48, 82, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #f6f8fb;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(11, 148, 246, 0.22);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.demo-shell {
  min-height: 100vh;
  background: #f6f8fb;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  padding: 12px 28px;
}

.app-logo {
  display: block;
  width: 146px;
  height: auto;
}

.app-header__meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-pill {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 7px 13px;
  color: #2d3748;
  font-size: 12px;
  font-weight: 700;
}

.header-pill__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-pill__copy small {
  margin-top: 2px;
  color: #7a8596;
  font-size: 9px;
  font-weight: 600;
}

.credit-bar {
  width: 44px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dff2e7;
}

.credit-bar::after {
  display: block;
  width: 86%;
  height: 100%;
  border-radius: inherit;
  background: #22b35e;
  content: "";
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #e1ebf7;
  color: #34516f;
  font-size: 15px;
  font-weight: 800;
}

.page {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.page-title-row h1 {
  color: var(--ink);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-title-row p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #475569;
  font-size: 20px;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(var(--step-count), minmax(96px, 1fr));
  margin: 22px auto 26px;
  padding: 0 42px;
}

.progress-step {
  position: relative;
  min-width: 0;
  text-align: center;
}

.progress-step:not(:last-child)::after {
  position: absolute;
  top: 17px;
  left: calc(50% + 21px);
  width: calc(100% - 42px);
  height: 3px;
  border-radius: 999px;
  background: #dce4ed;
  content: "";
}

.progress-step.is-complete:not(:last-child)::after {
  background: var(--primary);
}

.progress-step__dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 35px;
  height: 35px;
  margin: 0 auto;
  place-items: center;
  border: 2px solid #d9e1eb;
  border-radius: 50%;
  background: #fff;
  color: #8b96a7;
  font-size: 13px;
  font-weight: 800;
}

.progress-step.is-active .progress-step__dot,
.progress-step.is-complete .progress-step__dot {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.progress-step__label {
  display: block;
  overflow: hidden;
  margin-top: 9px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-step.is-active .progress-step__label {
  color: var(--primary-dark);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.wizard-panel {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.section-heading {
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-lead {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.task-card,
.sns-option {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: 160ms ease;
}

.task-card {
  min-height: 176px;
  padding: 20px;
}

.task-card:hover,
.sns-option:hover {
  border-color: #7fc4f7;
  transform: translateY(-1px);
}

.task-card.is-selected,
.sns-option.is-selected {
  border-color: var(--primary);
  background: linear-gradient(180deg, #fff, #f4faff);
  box-shadow: 0 0 0 3px rgba(11, 148, 246, 0.11);
}

.selected-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.is-selected .selected-mark {
  display: grid;
}

.task-card__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 22px;
}

.task-card h3 {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 800;
}

.task-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.channel-icons {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}

.brand-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d9e1e9;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.brand-icon--large {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 17px;
}

.brand-icon--linkedin {
  border-color: #0a78c8;
  background: #0a78c8;
  color: #fff;
}

.brand-icon--facebook {
  border-color: #1877f2;
  background: #1877f2;
  color: #fff;
}

.brand-icon--instagram {
  border-color: #ff416c;
  color: #f43f6c;
}

.brand-icon--form {
  border-color: #7ba5d7;
  background: #eaf3ff;
  color: #1e6fc0;
}

.sns-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.sns-option {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.sns-option strong {
  display: block;
  font-size: 14px;
}

.sns-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-top: 24px;
}

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

.field label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.field label span {
  margin-left: 4px;
  color: #ef4444;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #182133;
  font-size: 13px;
}

.field input,
.field select {
  height: 44px;
  padding: 0 13px;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
  padding: 11px 13px;
  line-height: 1.65;
}

.field-note {
  margin-top: 7px;
  color: #8490a2;
  font-size: 10px;
}

.login-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  border: 1px solid #cfe6f9;
  border-radius: 9px;
  background: #f4faff;
  padding: 11px 13px;
  color: #315474;
  font-size: 12px;
}

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

.login-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  background: #fff;
}

.login-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.login-card__name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
}

.login-card__meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.login-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: #e5f4ff;
  padding: 6px 9px;
  color: #0878d8;
  font-size: 10px;
  font-weight: 800;
}

.login-complete {
  display: flex;
  width: 100%;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: default;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  border-top: 1px solid #edf0f4;
  padding-top: 18px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 800;
  transition: 150ms ease;
}

.button--primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 148, 246, 0.2);
}

.button--primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.button--secondary {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #475569;
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.strategy-panel {
  width: min(760px, 100%);
  margin: 40px auto 0;
  padding: 34px;
  text-align: center;
}

.ai-orb {
  position: relative;
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, #077df0, #29adff);
  box-shadow: 0 18px 40px rgba(11, 148, 246, 0.28);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.ai-orb::after {
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(11, 148, 246, 0.16);
  border-radius: 28px;
  content: "";
  animation: ai-pulse 1.5s ease-in-out infinite;
}

@keyframes ai-pulse {
  50% {
    transform: scale(1.05);
    opacity: 0.4;
  }
}

.strategy-panel h2 {
  font-size: 22px;
  font-weight: 800;
}

.strategy-panel > p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.strategy-progress {
  height: 10px;
  overflow: hidden;
  margin-top: 28px;
  border-radius: 999px;
  background: #e9eef4;
}

.strategy-progress__bar {
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087bf0, #25b5ff);
  transition: width 240ms ease;
}

.strategy-percent {
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.strategy-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.strategy-stage {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 10px 7px;
  color: #8a94a4;
  font-size: 10px;
  font-weight: 700;
}

.strategy-stage.is-done {
  border-color: #aee4c2;
  background: var(--green-soft);
  color: #168447;
}

.strategy-stage.is-current {
  border-color: #9fd4fa;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.dashboard-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 27px 0 44px;
}

.dashboard-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.dashboard-title-row h1 {
  font-size: 25px;
  font-weight: 800;
}

.dashboard-tabs {
  display: inline-flex;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-tab {
  min-height: 38px;
  border: 0;
  background: #fff;
  padding: 0 16px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-tab.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.dashboard-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.dashboard-toolbar h2 {
  font-size: 19px;
  font-weight: 800;
}

.dashboard-toolbar p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.filter-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.filter-chip.is-active {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.table-card {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

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

.data-table th {
  background: #f7f9fc;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.entity-cell {
  display: flex;
  min-width: 190px;
  align-items: flex-start;
  gap: 10px;
}

.person-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #dbeafe, #e8eef8);
  color: #31567b;
  font-size: 11px;
  font-weight: 900;
}

.company-avatar {
  border-radius: 8px;
  background: #edf5ff;
  color: #1976c8;
}

.entity-cell strong {
  display: block;
  color: #182133;
  font-size: 12px;
}

.entity-cell small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  margin-top: 3px;
  color: #667085;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-badge,
.dm-badge,
.history-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.stage-badge--blue {
  background: #eaf5ff;
  color: #0878d8;
}

.stage-badge--orange {
  background: var(--orange-soft);
  color: #b76c00;
}

.stage-badge--green,
.dm-badge--green,
.history-status--done {
  background: var(--green-soft);
  color: #148445;
}

.stage-badge--gray,
.dm-badge--gray {
  background: #eef1f5;
  color: #657083;
}

.action-chips {
  display: flex;
  max-width: 310px;
  flex-wrap: wrap;
  gap: 5px;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #dce3ec;
  border-radius: 6px;
  background: #fafbfd;
  padding: 4px 6px;
  color: #596579;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.action-chip.is-done {
  border-color: #b9e5c9;
  background: #f0fbf4;
  color: #168447;
}

.message-preview {
  display: block;
  max-width: 190px;
  overflow: hidden;
  color: #4f5d70;
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: 1.05fr repeat(var(--metric-count), minmax(0, 1fr));
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 16px;
}

.metric {
  min-height: 66px;
  border-left: 1px solid var(--line);
  padding: 4px 18px;
}

.metric:first-child {
  border-left: 0;
  padding-left: 0;
}

.metric__label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
}

.metric small {
  display: block;
  margin-top: 4px;
  color: #7b8798;
  font-size: 9px;
}

.tasks-layout {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 16px;
  margin-top: 16px;
}

.tasks-column,
.history-column {
  min-width: 0;
  padding: 16px;
}

.column-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.column-heading h2 {
  font-size: 18px;
  font-weight: 800;
}

.task-group {
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.task-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 900;
}

.task-row {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr 0.42fr;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  color: #596579;
  font-size: 10px;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row strong {
  color: #253044;
  font-size: 11px;
}

.history-tabs {
  display: inline-flex;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-tabs span {
  padding: 8px 13px;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.history-tabs span:first-child {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.history-list {
  margin-top: 15px;
}

.history-item {
  display: grid;
  grid-template-columns: 62px 28px 1fr;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.history-time {
  color: #6f7b8d;
  font-size: 9px;
  line-height: 1.45;
}

.history-copy strong {
  display: block;
  color: #273144;
  font-size: 11px;
}

.history-copy small {
  display: block;
  max-width: 320px;
  overflow: hidden;
  margin-top: 3px;
  color: #738094;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-status {
  margin-top: 5px;
}

.history-status--waiting {
  background: var(--orange-soft);
  color: #b76c00;
}

.empty-note {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .app-header {
    padding: 10px 16px;
  }

  .header-pill--workspace,
  .header-pill--trial {
    display: none;
  }

  .page,
  .dashboard-page {
    width: min(100% - 24px, 760px);
  }

  .task-grid,
  .field-grid,
  .login-grid,
  .tasks-layout {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  .task-card {
    min-height: 142px;
  }

  .progress-steps {
    overflow-x: auto;
    padding: 0 8px 8px;
  }

  .progress-step__label {
    font-size: 10px;
  }

  .dashboard-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-card {
    overflow-x: auto;
  }

  .data-table {
    min-width: 900px;
  }

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

  .metric {
    border: 0;
    border-top: 1px solid var(--line);
    padding: 12px;
  }

  .metric:first-child {
    grid-column: 1 / -1;
    border-top: 0;
    padding: 4px 12px 12px;
  }
}

@media (max-width: 600px) {
  .app-logo {
    width: 116px;
  }

  .header-pill--credits,
  .avatar {
    display: none;
  }

  .page-title-row h1,
  .dashboard-title-row h1 {
    font-size: 20px;
  }

  .wizard-panel,
  .strategy-panel {
    padding: 20px 16px;
  }

  .sns-grid,
  .strategy-stages {
    grid-template-columns: 1fr;
  }

  .wizard-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .button {
    width: 100%;
  }

  .progress-steps {
    grid-template-columns: repeat(var(--step-count), 98px);
  }
}
