/* ============================================================
   alphadoo studio — 나만의 컨텐츠 만들기
   색과 글꼴은 alphadoo.net 과 맞춘다.
   ============================================================ */
:root {
  color-scheme: light;
  --paper: #f5f3e9;
  --ink: #252b24;
  --green: #cff177;
  --muted: #6a7065;
  --line: #d6d9ca;
  --card: #fffef8;
  --card-line: #bfc6b0;
  --leaf: #5d7838;
  --leaf-deep: #527719;
  --danger: #b5322a;
  /* 작품마다 바뀌는 색 (후보·스토리보드 안에서는 그 작품의 색 분위기로 덮어쓴다) */
  --acc: #5d7838;
  --tint: #eef3df;
  --deep: #3c4f22;
  --r: 16px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-size: 16px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
::selection { background: var(--green); }
:focus-visible { outline: 3px solid var(--leaf-deep); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; letter-spacing: -.045em; font-weight: 900; }
h2 { font-size: 20px; letter-spacing: -.03em; }
h3 { font-size: 16px; letter-spacing: -.02em; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { touch-action: manipulation; }
svg.pt, svg.sc { display: block; width: 100%; height: auto; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pad { padding: 40px 16px; }
.grow { flex: 1 1 200px; }
.link { color: var(--leaf-deep); font-weight: 700; }
.eyebrow { font-size: 11.5px; letter-spacing: .16em; font-weight: 800; color: var(--leaf); margin: 0 0 6px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 14px; font-size: 14px; }

/* ---------- 단추 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border: 1.5px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--ink);
  font-weight: 700; line-height: 1.3; text-decoration: none; cursor: pointer; transition: transform .1s, box-shadow .1s;
}
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active:not(:disabled) { transform: none; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover:not(:disabled) { box-shadow: 2px 2px 0 var(--leaf); }
.btn.big { min-height: 50px; padding: 11px 22px; font-size: 17px; }
.btn.small { min-height: 32px; padding: 4px 11px; font-size: 13.5px; border-width: 1px; border-radius: 7px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover:not(:disabled) { box-shadow: none; transform: none; background: #252b2412; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn .sub { font-weight: 400; font-size: .82em; opacity: .8; }
.danger-text { color: var(--danger); }
.icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; flex: none;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 15px; line-height: 1;
}
.icon:hover:not(:disabled) { background: #252b2414; }
.icon:disabled { opacity: .3; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border: 1px solid var(--card-line); border-radius: 999px;
  background: var(--card); font-size: 13.5px; line-height: 1.4; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.dot {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; vertical-align: middle;
}

/* ---------- 입력 칸 ---------- */
.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field > span { font-size: 13.5px; font-weight: 700; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .in, select, .ai-pop textarea {
  width: 100%; padding: 9px 11px; border: 1.5px solid var(--card-line); border-radius: 8px; background: #fff;
}
select { padding-right: 6px; cursor: pointer; }
textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .in:focus, select:focus, .ai-pop textarea:focus { outline: 3px solid #52771944; outline-offset: 0; border-color: var(--leaf-deep); }
.check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--leaf-deep); }
.form { display: grid; }
.form-error { margin: 0 0 14px; padding: 9px 12px; border: 1px solid var(--danger); border-radius: 8px; background: #fbe3e0; color: #7a1f19; font-size: 14.5px; }
.notice { margin-bottom: 12px; padding: 12px 14px; border-radius: 10px; background: var(--tint); font-size: 13.5px; }
.notice ul { margin: 4px 0 6px; padding-left: 1.2em; }

/* 눌러서 바로 고치는 글 (평소에는 그냥 글처럼 보인다) */
.ed {
  display: block; width: 100%; min-width: 0; margin: 0; padding: 2px 6px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; line-height: inherit; resize: none; overflow: hidden; field-sizing: content; text-overflow: ellipsis;
}
textarea.ed { min-height: 1lh; }
.ed:hover { background: #252b240d; }
.ed:focus { background: #fff; border-color: var(--acc); outline: 2px solid #5d783855; outline: 2px solid color-mix(in srgb, var(--acc) 35%, transparent); outline-offset: 0; text-overflow: clip; }
.ed::placeholder { color: #a3a898; }

/* ---------- 틀 ---------- */
.top { border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; width: min(1240px, 100%); margin: 0 auto; padding: 12px 16px; }
.wordmark { display: flex; align-items: center; font-size: 24px; font-weight: 900; letter-spacing: -1.3px; text-decoration: none; flex: none; }
.wordmark span { color: #5d7838; }
.wordmark i { margin-left: 6px; font-size: 24px; font-style: normal; font-weight: 500; color: #66853e; }
.top-title {
  padding: 2px 10px; border: 2px solid var(--ink); background: var(--green); box-shadow: 3px 3px 0 var(--ink);
  font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; transform: rotate(-1.5deg);
}
.top-nav { display: flex; align-items: center; gap: 4px 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nav-link { padding: 6px 8px; border-radius: 8px; font-size: 14.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-link:hover { background: #252b2412; }
.quota { padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.quota.low { border-color: var(--danger); color: var(--danger); }
.menu { position: relative; }
.menu summary {
  max-width: 11em; padding: 5px 12px; border: 1.5px solid var(--ink); border-radius: 99px; font-size: 14px; font-weight: 700;
  list-style: none; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; z-index: 50; top: calc(100% + 6px); right: 0; display: grid; min-width: 210px; padding: 8px;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card); box-shadow: 4px 4px 0 var(--ink);
}
.menu-list a, .menu-list button { display: block; padding: 8px 10px; border: 0; border-radius: 6px; background: none; text-align: left; text-decoration: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--tint); }
.menu-mail { margin: 0 0 4px; padding: 4px 10px 8px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
main:focus { outline: none; }
.narrow { width: min(500px, 100%); margin: 0 auto; padding: 36px 16px 90px; }
.narrow > h1 { margin-bottom: 8px; }
.narrow > h2 { margin: 30px 0 10px; }
.narrow > .muted { margin: 8px 0 16px; }
.narrow.center .row { margin-top: 20px; }
.wide { width: min(1100px, 100%); margin: 0 auto; padding: 30px 16px 90px; }
.wide > h2 { margin: 30px 0 10px; }
.card { padding: 20px; border: 1px solid var(--card-line); border-radius: var(--r); background: var(--card); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; }
.prose h2 { margin: 26px 0 6px; font-size: 18px; }
.prose ul { margin: 0; padding-left: 1.2em; }
.prose p { margin: 0 0 8px; }
.prose .btn { margin-top: 20px; }
.boot { padding: 90px 16px; text-align: center; color: var(--muted); }
.boot .btn { margin-top: 14px; }
.empty { padding: 56px 16px; border: 2px dashed var(--card-line); border-radius: var(--r); text-align: center; }
.empty .btn, .empty .row { margin-top: 18px; }
.empty-big { font-size: 20px; font-weight: 800; }
.banner {
  display: block; margin-bottom: 18px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 10px;
  background: var(--green); box-shadow: 3px 3px 0 var(--ink); font-weight: 600; text-decoration: none;
}
.banner.warn { background: #ffe2a8; }
.stamp {
  display: inline-block; margin: 26px 0 22px; padding: 6px 18px; border: 3px solid var(--ink); border-radius: 8px;
  background: var(--green); box-shadow: 4px 4px 0 var(--ink); font-size: 18px; font-weight: 900; transform: rotate(-4deg);
}
.stamp.rejected, .stamp.suspended { background: #f3c9c4; }

/* ---------- 소개 ---------- */
.hero { width: min(780px, 100%); margin: 0 auto; padding: 60px 16px 26px; text-align: center; }
.hero h1 { font-size: clamp(36px, 6.6vw, 62px); line-height: 1.13; letter-spacing: -.055em; }
.hero .q { color: #63843a; }
.hero-copy { margin: 20px 0 26px; color: var(--muted); line-height: 1.8; letter-spacing: -.02em; }
.hero .row { justify-content: center; margin-bottom: 12px; }
.demo { width: min(1100px, 100%); margin: 0 auto; padding: 20px 16px 90px; }
.flow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 0 0 20px; padding: 0; list-style: none; font-size: 14px; font-weight: 700; }
.flow b { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: var(--ink); color: var(--green); font-size: 12px; }
.demo-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cut { margin: 0; border: 1px solid var(--card-line); border-radius: 12px; background: var(--card); overflow: hidden; }
.cut figcaption { padding: 8px 10px 10px; font-size: 13px; line-height: 1.45; }
.demo-strip figcaption { font-weight: 700; }
.demo-strip figcaption span { display: block; font-size: 10.5px; letter-spacing: .08em; color: var(--leaf); }
.demo-cast { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; color: var(--muted); font-size: 14px; }
.demo-cast p { margin-left: 8px; }
.face { display: inline-block; width: 44px; height: 44px; flex: none; border: 2px solid var(--ink); border-radius: 50%; background: #fff; overflow: hidden; }
.face svg { width: 100%; height: 100%; }

/* ---------- 내 작품 ---------- */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.work { position: relative; border: 1px solid var(--card-line); border-radius: var(--r); background: var(--card); transition: border-color .15s, box-shadow .15s; }
.work:hover { border-color: #7b934e; box-shadow: 0 8px 0 #e3e6d6; }
.work-main { display: block; height: 100%; padding: 18px 18px 14px; text-decoration: none; }
.work h2 { margin-bottom: 6px; padding-right: 30px; font-size: 19px; }
.work p { display: -webkit-box; margin-bottom: 10px; color: var(--muted); font-size: 14px; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.work .icon { position: absolute; top: 10px; right: 8px; opacity: .45; }
.work .icon:hover, .work .icon:focus-visible { opacity: 1; }

/* ---------- 운영자 ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 10px; }
.tile { display: grid; align-content: start; gap: 4px; padding: 16px; border: 1px solid var(--card-line); border-radius: var(--r); background: var(--card); }
.tile > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.tile > b { font-size: 28px; line-height: 1.2; letter-spacing: -.03em; }
.tile > b.ok { color: var(--leaf-deep); }
.tile > b.bad { color: var(--danger); }
.tile small { color: var(--muted); font-size: 12.5px; }
.tile .btn { justify-self: start; margin-top: 6px; }
.tile.hot { border: 2px solid var(--ink); background: var(--green); box-shadow: 3px 3px 0 var(--ink); }
.tile.hot > span, .tile.hot small { color: var(--ink); }
.tile.chart svg { display: block; width: 100%; height: auto; margin-top: 4px; }
.bar { height: 8px; margin: 4px 0; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--leaf); }
.bar i.full { background: var(--danger); }
.table-wrap { border: 1px solid var(--card-line); border-radius: 12px; background: var(--card); overflow-x: auto; }
table.users { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 14.5px; }
.users th, .users td { padding: 10px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.users tr:first-child > * { border-top: 0; }
.users th { font-size: 12.5px; color: var(--muted); }
.users .num { white-space: nowrap; }
.users .acts { text-align: right; white-space: nowrap; }
.users .acts .btn { margin: 2px 0 2px 4px; }
.users .note { margin-top: 4px; font-size: 13px; color: var(--muted); white-space: normal; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; background: var(--line); font-size: 12px; font-weight: 800; }
.badge.pending { background: #ffe2a8; }
.badge.approved { background: var(--green); }
.badge.suspended, .badge.rejected { background: #f3c9c4; }
.tag { padding: 0 5px; border-radius: 4px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 800; }

/* ---------- 알림 · 창 ---------- */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 20px; display: grid; gap: 8px; width: min(92vw, 470px); transform: translateX(-50%); pointer-events: none; }
body.is-gen .toasts { bottom: 88px; }
.toast {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 10px;
  background: var(--ink); color: var(--paper); box-shadow: 0 6px 20px #0003; font-size: 14.5px; pointer-events: auto;
}
.toast.err { background: #7a1f19; }
.toast button { padding: 2px 4px; border: 0; background: none; color: var(--green); font-weight: 800; white-space: nowrap; cursor: pointer; }
dialog.dlg { width: min(92vw, 440px); padding: 22px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
dialog.dlg::backdrop { background: #252b2470; }
.dlg h2 { margin-bottom: 8px; font-size: 19px; }
.dlg p { margin-bottom: 16px; color: var(--muted); }
.dlg .field input { font-size: 13.5px; }
.drawer {
  position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(400px, 100vw);
  border-left: 2px solid var(--ink); background: var(--card); box-shadow: -10px 0 30px #0002;
}
.drawer.drawer-wide { width: min(460px, 100vw); }
.drawer > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.drawer h2 { font-size: 17px; }
.drawer-body { flex: 1; padding: 14px 16px 50px; overflow-y: auto; overscroll-behavior: contain; }
.drawer fieldset { min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.drawer legend { margin-bottom: 6px; padding: 0; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.drawer legend small { font-weight: 400; }
.pop { position: absolute; z-index: 70; padding: 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); box-shadow: 4px 4px 0 var(--ink); }
.pop form { display: grid; gap: 10px; }
.pop .field, .pop .check { margin: 0; }
.pop-h { font-size: 15px; }
.ai-pop textarea { min-height: 76px; font-size: 14.5px; }
.kinds .chip i { width: 9px; height: 9px; border-radius: 50%; }

/* ---------- 만들기 화면: 윗줄 ---------- */
.st-bar {
  position: sticky; z-index: 40; top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 16px;
  border-bottom: 1px solid var(--line); background: var(--paper);
}
.back { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-size: 18px; text-decoration: none; flex: none; }
.back:hover { background: #252b2414; }
.st-title { flex: 1 1 150px; min-width: 110px; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 17px; font-weight: 800; text-overflow: ellipsis; }
.st-title:hover { background: #252b240d; }
.st-title:focus { background: #fff; border-color: var(--leaf-deep); outline: none; }
.steps { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.steps button { display: flex; align-items: center; gap: 6px; padding: 5px 11px 5px 6px; border: 0; border-radius: 99px; background: none; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.steps b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink); font-size: 12px; }
.steps button:hover:not(:disabled):not(.on) { background: #252b2412; }
.steps button.on { background: var(--ink); color: var(--paper); }
.steps button.on b { background: var(--green); }
.steps button:disabled { opacity: .4; cursor: default; }
.st-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.save { padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 13px; white-space: nowrap; cursor: pointer; }
.save.saved::before { content: "✓ "; }
.save.error { color: var(--danger); font-weight: 800; }
.stage { width: min(1240px, 100%); margin: 0 auto; padding: 26px 16px 130px; }
.narrow-l { width: min(760px, 100%); margin: 0 auto; }
.stage > div > .muted { margin: 6px 0 16px; }
.genbar {
  position: fixed; z-index: 80; left: 50%; bottom: 16px; display: flex; align-items: center; gap: 12px; width: min(94vw, 620px);
  padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--ink); color: var(--paper); box-shadow: 0 10px 30px #0005; transform: translateX(-50%);
}
.gen-t { display: grid; flex: 1; min-width: 0; line-height: 1.4; }
.gen-t .think { display: flex; justify-content: flex-end; font-size: 12.5px; opacity: .72; white-space: nowrap; overflow: hidden; }
.genbar .btn { border-color: var(--paper); background: transparent; color: var(--paper); }
.spin { width: 18px; height: 18px; flex: none; border: 3px solid #ffffff40; border-top-color: var(--green); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 1. 아이디어 ---------- */
.idea h1 { margin-bottom: 16px; }
.idea-box { display: block; width: 100%; min-height: 136px; padding: 16px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: 4px 4px 0 var(--ink); font-size: 18px; line-height: 1.6; }
.idea-box:focus { outline: 3px solid #52771955; outline-offset: 2px; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 22px; }
.hints { display: grid; gap: 18px; }
.hint { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: start; }
.hint-l { padding-top: 5px; font-size: 14.5px; font-weight: 700; }
.hint-l small { display: block; font-weight: 400; color: var(--muted); }
.hint-l b { display: block; color: var(--leaf-deep); font-size: 13px; }
.seg { display: inline-flex; justify-self: start; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; }
.seg button { min-width: 44px; padding: 6px 12px; border: 0; border-left: 1px solid var(--line); background: var(--card); font-weight: 700; cursor: pointer; }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--ink); color: var(--paper); }
input[type="range"] { width: 100%; accent-color: var(--leaf-deep); }
.range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.cta { margin-top: 24px; gap: 10px; }
.cta + .muted { margin-top: 10px; }

/* ---------- 2. 브레인스토밍 ---------- */
.core { margin: 14px 0; padding: 14px 18px; border-left: 5px solid var(--leaf); border-radius: 0 12px 12px 0; background: var(--card); font-size: 18px; font-weight: 700; }
.questions { margin: 0 0 18px; padding-left: 1.2em; }
.seeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.seed { position: relative; }
.seed-main { display: block; width: 100%; height: 100%; padding: 12px 14px; border: 1.5px solid var(--card-line); border-radius: 12px; background: var(--card); text-align: left; }
button.seed-main { cursor: pointer; }
button.seed-main:hover { border-color: var(--ink); }
.seed.on .seed-main { border-color: var(--ink); background: var(--green); box-shadow: 3px 3px 0 var(--ink); }
.seed .kind { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; color: var(--leaf); }
.seed b { display: block; margin: 2px 0 4px; font-size: 15.5px; }
.seed p { font-size: 13.5px; color: var(--muted); }
.seed.on p, .seed.on .kind { color: var(--ink); }
.seed-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; font-size: 12px; }
.seed-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 14px; }
.seed-add select, .seed-add .in { width: auto; padding: 6px 9px; font-size: 14px; }
.cta.sticky { position: sticky; z-index: 5; bottom: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 6px 24px #0002; }

/* ---------- 3. 후보 이야기 ---------- */
.cands { display: grid; gap: 22px; }
.cand { border: 1px solid var(--card-line); border-top: 6px solid var(--acc); border-radius: var(--r); background: var(--card); overflow: hidden; }
.cand-h { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 0; }
.cand-no { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 8px; background: var(--acc); color: #fff; font-weight: 900; }
.cand-t { flex: 1; min-width: 0; }
.cand h2 { font-size: 23px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; font-size: 12.5px; }
.tags span { padding: 1px 8px; border-radius: 99px; background: var(--tint); color: var(--deep); font-weight: 700; }
.cand-tag { margin: 10px 18px 0; font-size: 17px; font-weight: 800; color: var(--deep); }
.cand-log { margin: 6px 18px 0; }
.cand-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; padding: 10px 18px 12px; }
.cand h3 { margin: 10px 0 4px; font-size: 12px; letter-spacing: .08em; color: var(--acc); }
.cand-text p, .cand-text ul { margin: 0 0 6px; font-size: 14.5px; }
.cand-text ul { padding-left: 1.1em; }
.ending summary { font-size: 13.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.cand-cast { display: grid; align-content: start; gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.cand-cast li { display: flex; align-items: flex-start; gap: 10px; }
.cand-cast p { font-size: 13px; color: var(--muted); }
.role { font-size: 12px; font-weight: 700; color: var(--acc); }
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 6px 18px 16px; }
.strip figcaption span { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 5px; border-radius: 50%; background: var(--acc); color: #fff; font-size: 11px; font-weight: 800; }
.strip figcaption p { display: -webkit-box; margin-top: 3px; font-size: 12.5px; color: var(--muted); -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cand-f { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 18px 14px; border-top: 1px solid var(--line); background: var(--tint); }

/* ---------- AI가 만드는 동안 ---------- */
.live h1 { margin-bottom: 10px; }
.dots::after { content: "…"; animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.think-box { min-height: 3.2em; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: 14px; font-style: italic; }
.live-body { margin-top: 18px; }
.live-world h3 { margin: 18px 0 8px; padding-top: 8px; border-top: 3px solid var(--acc); }
.live-world .strip { padding: 0; }
.live-cast { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; }
.live-cast li { display: grid; justify-items: center; gap: 2px; font-size: 13px; }
.live-cast li span:last-child { color: var(--muted); font-size: 12px; }
.live-cast .face { width: 56px; height: 56px; }
.live-list { margin: 0; padding-left: 1.2em; font-size: 14.5px; }

/* ---------- 4. 스토리보드 · 인물 · 관계도 · 세계 ---------- */
.bd-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; padding-bottom: 12px; }
.bd-title { font-size: clamp(26px, 4.4vw, 40px); font-weight: 900; line-height: 1.18; letter-spacing: -.045em; }
.bd-tagline { font-size: 18px; font-weight: 800; color: var(--deep); }
.bd-logline { font-size: 15.5px; }
.bd-meta { display: flex; flex-wrap: wrap; gap: 2px 18px; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.bd-meta label { display: flex; align-items: center; gap: 4px; min-width: 0; }
.bd-meta label > span { font-size: 11.5px; font-weight: 800; flex: none; }
.bd-meta .ed { min-width: 7em; color: var(--ink); }
.bd-side { display: grid; gap: 8px; width: 216px; }
.pickrow { display: grid; gap: 2px; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.pickrow select { padding: 6px 8px; font-size: 14px; font-weight: 400; color: var(--ink); }
.tabs { position: sticky; z-index: 30; top: var(--bar-h, 51px); display: flex; gap: 4px; margin: 0 0 18px; padding-top: 8px; border-bottom: 2px solid var(--ink); background: var(--paper); overflow-x: auto; }
.tabs button { padding: 9px 16px; border: 2px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; background: none; color: var(--muted); font-size: 15.5px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.tabs span { margin-left: 6px; font-size: 12.5px; font-weight: 600; opacity: .75; }
.tabs span:empty { display: none; }
.pic-tip { position: absolute; right: 8px; bottom: 8px; padding: 3px 9px; border-radius: 99px; background: #252b24d0; color: #fff; font-size: 12px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.beat-pic:hover .pic-tip, .beat-pic:focus-visible .pic-tip, .person-pic:hover .pic-tip, .person-pic:focus-visible .pic-tip { opacity: 1; }
.flash { animation: flash 1.8s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 4px var(--green); } 100% { box-shadow: 0 0 0 4px transparent; } }

.act { margin-bottom: 32px; }
.act-h { margin-bottom: 12px; padding-top: 10px; border-top: 3px solid var(--acc); }
.act-line { display: flex; align-items: center; gap: 10px; }
.act-t { flex: 1; font-size: 20px; font-weight: 900; letter-spacing: -.03em; }
.act-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.act-d { color: var(--muted); font-size: 14.5px; }
.beats { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 14px; }
.beat { display: flex; flex-direction: column; border: 1px solid var(--card-line); border-radius: 14px; background: var(--card); overflow: hidden; }
.beat-pic { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--tint); cursor: pointer; }
.beat-in { display: grid; gap: 1px; padding: 8px 12px 12px; }
.beat-top { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.no { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--acc); }
.beat-tools { display: flex; }
.beat-tools .icon { width: 30px; height: 30px; font-size: 14px; }
.beat-t { font-size: 16.5px; font-weight: 800; }
.beat-x { font-size: 14.5px; }
.say { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px; margin: 6px 0 2px; padding: 3px 4px 3px 8px; border-left: 3px solid var(--acc); border-radius: 0 8px 8px 0; background: var(--tint); }
.say select { width: auto; max-width: 8.5em; padding: 2px 4px; border-width: 1px; font-size: 13px; font-weight: 700; }
.say .ed { font-size: 14px; }
.why { font-size: 12.5px; color: var(--muted); }
.beat-new { display: grid; place-content: center; justify-items: center; gap: 2px; min-height: 130px; border: 2px dashed var(--card-line); border-radius: 14px; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.beat-new:hover { border-color: var(--ink); color: var(--ink); }
.beat-new span { font-size: 26px; line-height: 1; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.person { display: grid; grid-template-columns: 118px minmax(0, 1fr); border: 1px solid var(--card-line); border-radius: 14px; background: var(--card); overflow: hidden; }
.person-pic { position: relative; padding: 0; border: 0; background: var(--tint); cursor: pointer; }
.person-pic svg.pt { height: 100%; min-height: 150px; }
.person-in { display: grid; align-content: start; gap: 1px; min-width: 0; padding: 10px 12px; }
.person-name { font-size: 18px; font-weight: 900; }
.person-role { font-size: 12.5px; font-weight: 800; color: var(--acc); }
.trio { display: grid; grid-template-columns: 1fr 1.4fr 1.3fr; font-size: 12.5px; color: var(--muted); }
.person-one { font-size: 14.5px; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 6px; margin: 6px 0 0; font-size: 13.5px; }
.facts dt { padding-top: 4px; font-size: 11.5px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.facts dd { margin: 0; min-width: 0; }
.person-f { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }

.rel-cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.rel-map { border: 1px solid var(--card-line); border-radius: 14px; background: var(--card); overflow: hidden; }
.rel-map svg { display: block; width: 100%; height: auto; -webkit-user-select: none; user-select: none; }
.rm-node { cursor: grab; touch-action: none; }
.rm-node.drag { cursor: grabbing; }
.rm-edge { cursor: pointer; }
.rm-node:focus { outline: none; }
.rm-node:focus-visible, .rm-edge:focus-visible { outline: 3px solid var(--leaf-deep); outline-offset: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 4px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 0; margin-right: 5px; border-top: 2.5px solid; vertical-align: middle; }
.rel-h { margin-bottom: 8px; }
.edges { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.edge-row { display: grid; gap: 3px; padding: 8px 10px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--card); }
.edge-row.on { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.edge-who, .edge-end { display: flex; align-items: center; gap: 6px; }
.edge-row select { flex: 1; min-width: 0; padding: 4px 6px; border-width: 1px; font-size: 13.5px; }
.edge-who select { font-weight: 700; }
.edge-end .ed { flex: 1; }
.edge-end select { flex: none; width: auto; max-width: 7.5em; }
.edge-end .icon { width: 30px; height: 30px; }

.world { display: grid; gap: 26px; width: min(900px, 100%); }
.wl h3 { margin-bottom: 8px; padding-top: 10px; border-top: 3px solid var(--acc); font-size: 17px; }
.rows { display: grid; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.wrow { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 6px 8px 10px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--card); }
.wrow.one { grid-template-columns: minmax(0, 1fr) auto; }
.wkey { font-weight: 800; }
.wvals { display: grid; gap: 1px; min-width: 0; }
.wvals label { display: block; min-width: 0; }
.wvals .sub { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px; align-items: baseline; font-size: 13.5px; color: var(--muted); }
.wvals .sub span { font-size: 11.5px; font-weight: 800; white-space: nowrap; }

/* 옆 서랍 안 */
.sc-preview, .look-preview { position: sticky; z-index: 2; top: -14px; margin: -14px -16px 12px; padding: 14px 16px 8px; border-bottom: 1px solid var(--line); background: var(--card); }
.sc-preview svg { border: 1px solid var(--card-line); border-radius: 10px; }
.sc-preview p { margin-top: 4px; }
.sc-cast { display: grid; gap: 6px; }
.sc-person { display: flex; align-items: center; gap: 8px; }
.face-chip { padding: 3px 12px 3px 3px; }
.face-chip .face { width: 28px; height: 28px; border-width: 1px; }
.sc-person select { width: auto; padding: 4px 8px; font-size: 13.5px; }
.look-preview { display: flex; align-items: center; gap: 14px; }
.look-preview .btn { margin-top: 8px; }
.pt-box { width: 104px; height: 120px; flex: none; border: 1px solid var(--card-line); border-radius: 12px; overflow: hidden; }
.pt-box svg { height: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.sw { width: 28px; height: 28px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--card-line); cursor: pointer; }
.sw.on { box-shadow: 0 0 0 2.5px var(--ink); }
.sw.custom { position: relative; display: block; background: conic-gradient(#e33, #ee3, #3c3, #3cc, #33e, #e3e, #e33); overflow: hidden; }
.sw.custom input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); padding: 0; border: 0; opacity: 0; cursor: pointer; }
.sw.custom:focus-within { outline: 3px solid var(--leaf-deep); outline-offset: 2px; }
.picgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.picopt { display: grid; gap: 2px; padding: 0 0 4px; border: 2px solid transparent; border-radius: 10px; background: var(--paper); font-size: 11.5px; line-height: 1.3; overflow: hidden; cursor: pointer; }
.picopt svg.pt { aspect-ratio: 1; }
.picopt:hover { border-color: var(--card-line); }
.picopt.on { border-color: var(--ink); background: var(--green); font-weight: 700; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 980px) {
  .rel-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .cand-cols, .bd-head { grid-template-columns: minmax(0, 1fr); }
  .bd-side { display: flex; flex-wrap: wrap; align-items: flex-end; width: auto; }
  .pickrow { flex: 1 1 150px; }
  .strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; }
  .strip .cut { scroll-snap-align: start; }
  .demo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps span { display: none; }
  .steps button { padding: 5px 6px; }
  .steps button.on span { display: inline; }
  .steps button.on { padding-right: 11px; }
}
@media (max-width: 640px) {
  .top-in { gap: 10px; padding: 10px 14px; }
  .wordmark { font-size: 21px; }
  .wordmark i { font-size: 20px; margin-left: 4px; }
  .top-title { font-size: 12px; padding: 1px 7px; }
  .nav-link { padding: 6px 4px; font-size: 13.5px; }
  .hero { padding-top: 40px; }
  .hero-copy br { display: none; }
  .demo-cast { flex-wrap: wrap; }
  .demo-cast p { flex-basis: 100%; margin: 4px 0 0; text-align: center; }
  .hint { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .hint-l b, .hint-l small { display: inline; margin-left: 6px; }
  .cta .btn.big { flex: 1 1 100%; }
  .people { grid-template-columns: minmax(0, 1fr); }
  .person { grid-template-columns: 96px minmax(0, 1fr); }
  .wrow { grid-template-columns: minmax(0, 1fr) auto; }
  .wrow .wvals { grid-column: 1 / -1; grid-row: 2; }
  .pic-tip { opacity: .92; }
  .drawer, .drawer.drawer-wide { top: auto; left: 0; width: 100%; height: 74vh; height: 74dvh; border-left: 0; border-top: 2px solid var(--ink); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px #0003; }
}
@media (hover: none) {
  .pic-tip { opacity: .92; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .spin { animation-duration: 3s; }
  .flash, .dots::after { animation: none; }
}
@media print {
  .top, .st-bar, .genbar, .toasts { display: none; }
}
