:root {
  color-scheme: light;
  --ink: #20201d;
  --muted: #6f6a61;
  --line: #ded8cc;
  --soft: #f4f0e8;
  --paper: #fbfaf6;
  --stone: #b8ad9d;
  --moss: #596a55;
  --water: #7e9ea1;
  --charcoal: #30302d;
  --accent: #8f5f42;
  --radius: 8px;
  --shadow: 0 20px 60px rgba(48, 48, 45, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(32, 32, 29, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(32, 32, 29, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 56px 56px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.agent-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.94);
  backdrop-filter: blur(20px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 50%;
  font-family: Georgia, serif;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.05;
}

h3 {
  margin-bottom: 18px;
  font-size: 18px;
  line-height: 1.25;
}

.steps {
  display: grid;
  gap: 8px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.step span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 11px;
}

.step.is-active {
  color: var(--ink);
  background: var(--soft);
  border-color: var(--line);
}

.agent-note,
.brief-summary,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
}

.agent-note {
  padding: 20px;
}

.agent-note h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.agent-note p:last-child,
.strategy-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.brief-summary {
  margin-top: auto;
  padding: 18px;
}

.summary-item {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

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

.summary-item strong {
  font-size: 14px;
  line-height: 1.35;
}

.workspace {
  min-width: 0;
  padding: 34px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.primary-action,
.secondary-action,
.ghost-action {
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
}

.primary-action {
  color: #fff;
  background: var(--charcoal);
  border: 1px solid var(--charcoal);
}

.secondary-action,
.ghost-action {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  padding: 22px;
}

.panel.wide {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.input-row {
  display: flex;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.hint {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 9px 11px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.chip.is-selected {
  color: #fff;
  background: var(--moss);
  border-color: var(--moss);
}

.dense .chip {
  padding: 8px 10px;
  font-size: 13px;
}

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

.direction-card,
.concept-card,
.reference-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.direction-visual,
.reference-visual,
.concept-visual {
  min-height: 154px;
  background: var(--soft);
}

.visual-architecture {
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(255, 255, 255, 0.62) 28% 31%, transparent 31%),
    linear-gradient(135deg, #d7d0c2, #696b63);
}

.visual-wellness {
  background:
    radial-gradient(circle at 70% 28%, rgba(255, 255, 255, 0.7), transparent 22%),
    linear-gradient(135deg, #d7c4aa, #7e9ea1 55%, #40514d);
}

.visual-material {
  background:
    repeating-linear-gradient(90deg, rgba(71, 54, 41, 0.2) 0 6px, transparent 6px 15px),
    linear-gradient(135deg, #b19373, #efe6d4);
}

.visual-investor {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    linear-gradient(135deg, #292a28, #828273);
  background-size: 38px 100%, auto;
}

.visual-editorial {
  background:
    linear-gradient(90deg, #f4f0e8 0 62%, #353631 62% 100%);
}

.visual-japanese {
  background:
    radial-gradient(circle at 50% 50%, rgba(126, 158, 161, 0.52), transparent 24%),
    linear-gradient(135deg, #efe5d2, #9b8f7b);
}

.card-body {
  padding: 18px;
}

.card-body p {
  color: var(--muted);
  line-height: 1.55;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mini-button {
  padding: 8px 10px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mini-button.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter {
  padding: 9px 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.filter.is-active {
  color: #fff;
  background: var(--charcoal);
}

.moodboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.reference-visual {
  min-height: 180px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  padding: 5px 7px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 999px;
  font-size: 11px;
}

.rating {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.reason {
  padding: 6px 8px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.reason.is-selected {
  color: var(--ink);
  border-color: var(--stone);
  background: #e7dfd1;
}

.strategy-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1.35fr;
  gap: 16px;
}

.strategy-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
}

.strategy-list {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
}

.strategy-list div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

dt {
  margin-bottom: 5px;
  font-weight: 700;
}

dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.palette {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}

.swatch {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(32, 32, 29, 0.12);
  border-radius: 50%;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(20px);
  padding: 12px 14px;
  color: #fff;
  background: var(--charcoal);
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

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

  .agent-panel {
    position: static;
    height: auto;
  }

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

  .brief-summary {
    margin-top: 0;
  }

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

  .strategy-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace,
  .agent-panel {
    padding: 18px;
  }

  h2 {
    font-size: 28px;
  }

  .view-header,
  .input-row {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action,
  .ghost-action {
    width: 100%;
  }

  .steps,
  .brief-grid,
  .direction-grid,
  .moodboard-grid,
  .concept-grid {
    grid-template-columns: 1fr;
  }
}
