/* ===== Dotory · 활용사례 4컷 — Editorial Line system ===== */
:root {
  --paper:  #fbfaf9;
  --sand:   #f4f2ee;
  --ink:    #46332a;
  --acorn:  #7a5238;
  --accent: #c95820;

  /* derived flat fills (warm, shallow) */
  --skin:   #f1e3d6;
  --skin-2: #ecd9c8;
  --shirt-1:#e7e0d6;
  --shirt-2:#d8c8b8;
  --shirt-3:#c9b6a3;
  --hair-1: #5a4636;
  --hair-2: #8a6a52;
  --surface:#efe8df;
  --paper-2:#fff;

  --serif: 'Noto Serif KR', 'Spectral', Georgia, serif;
  --sans:  'Pretendard', system-ui, -apple-system, sans-serif;

  --stroke: 2;            /* svg stroke width */
  --frame-radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  word-break: keep-all;
  background:
    radial-gradient(120% 90% at 50% -10%, #ffffff 0%, var(--paper) 60%);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { display: block; }

/* ---------- Section shell ---------- */
.usecase {
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px) 45px;
  overflow-x: auto;
}

/* ---------- Case meta header ---------- */
.case-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(18px, 4vw, 42px);
  max-width: 100%;
}
.case-eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--serif);
}
.case-no {
  font-style: italic;
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 30px);
  color: var(--accent);
  letter-spacing: 0.01em;
}
.case-kicker {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acorn);
  font-family: var(--sans);
  font-weight: 600;
  transform: translateY(-1px);
  white-space: nowrap;
}
.case-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3.8vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
}
.title-em {
  color: #B85C38;
}
.case-lead {
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.6;
  color: var(--acorn);
  max-width: 56ch;
  text-wrap: pretty;
  margin: 0;
}
.case-lead b { color: var(--ink); font-weight: 600; }

/* ---------- 4-panel strip ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 38px;
}
@media (max-width: 880px) { .strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .strip { grid-template-columns: 1fr; } }

.panel {
  position: relative;
  background: var(--paper);
  border-radius: var(--frame-radius);
  margin: 0;
  padding: 8px 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel[data-tone="us"] { background: var(--sand); }

/* border style variants */
.panel[data-border="solid"] { border: 2px solid var(--ink); }
.panel[data-border="dotted"] { border: 2px dashed color-mix(in srgb, var(--ink) 70%, transparent); }
.panel[data-border="none"] { border: 2px solid transparent; }
.panel[data-border="none"] + .panel[data-border="none"] { }

/* entrance — base state is the VISIBLE end-state; reveal is a non-destructive
   WAAPI animation (fill:none) so content is never stuck hidden in inactive iframes */
.panel { opacity: 1; transform: none; }


/* art frame */
.art {
  position: relative;
  border-radius: 9px;
  overflow: hidden;
  aspect-ratio: 240 / 248;
  background: transparent;
}
.art svg { display: block; width: 100%; height: 100%; }

/* speech bubble */
.bubble {
  position: absolute;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 13px;
  padding: 5px 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(12px, 1vw, 13.5px);
  line-height: 1.26;
  color: var(--ink);
  box-shadow: 0 6px 14px -8px rgba(70,51,42,.45);
  max-width: 150px;
  text-align: center;
  text-wrap: normal;
  z-index: 3;
}
.bubble::after, .bubble::before {
  content: "";
  position: absolute;
  width: 0; height: 0;
}
/* tail down-left */
.bubble[data-tail="left"]::before  { left: 18px; bottom: -11px; border: 6px solid transparent; border-top-color: var(--ink); }
.bubble[data-tail="left"]::after   { left: 19px; bottom: -7px;  border: 5px solid transparent; border-top-color: #fff; }
.bubble[data-tail="center"]::before{ left: 50%; transform: translateX(-50%); bottom: -11px; border: 6px solid transparent; border-top-color: var(--ink); }
.bubble[data-tail="center"]::after { left: 50%; transform: translateX(-50%); bottom: -7px;  border: 5px solid transparent; border-top-color: #fff; }
.bubble[data-tail="right"]::before { right: 18px; bottom: -11px; border: 6px solid transparent; border-top-color: var(--ink); }
.bubble[data-tail="right"]::after  { right: 19px; bottom: -7px;  border: 5px solid transparent; border-top-color: #fff; }

/* ---------- bottom flow band ---------- */
.flow {
  margin-top: clamp(28px, 4vw, 52px);
  border-top: 2px solid color-mix(in srgb, var(--ink) 16%, transparent);
  padding-top: clamp(20px, 2.6vw, 30px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(8px, 1.4vw, 22px);
}
.flow-step {
  font-family: var(--serif);
  font-size: clamp(15px, 1.7vw, 21px);
  font-weight: 500;
  color: var(--acorn);
  white-space: nowrap;
}
.flow-step.end { color: var(--ink); font-weight: 600; }
.flow-arrow { color: var(--accent); flex: 0 0 auto; }

/* small caption under strip */
.strip-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: color-mix(in srgb, var(--acorn) 80%, transparent);
  font-family: var(--sans);
  line-height: 1.5;
}
.strip-note b { color: var(--acorn); font-weight: 600; }
