/* layouts/create.html — creating a plan (founder wireframes v3 + v4).
   Phones: one screen, × closes (it saves as you go), ? help, Back and Continue.
   Laptops: chapters | the screen | live preview. Marigold marks progress and choices; actions stay ink. */
.layout-create { background: var(--bg); }
.create-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 1020; background: var(--bg); border-bottom: 1px solid var(--line); }
.create-head .bar { height: 56px; display: flex; align-items: center; gap: 8px; max-width: 1240px; margin: 0 auto; padding-inline: var(--space-3); }
.create-head .head-label { flex: 1; text-align: center; font-weight: 600; font-size: 14px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.create-head .help-btn { font-weight: 800; font-size: 16px; border: 1.5px solid var(--line-strong); }
.create-head .progress-line { height: 3px; background: var(--line); }
.create-head .progress-line i { display: block; height: 100%; background: var(--cmu-marigold); transition: width var(--dur-slow) var(--ease-standard); }

.create-grid { max-width: 640px; margin: 0 auto; padding: var(--space-5) var(--space-4) calc(120px + env(safe-area-inset-bottom)); }
.create-chapters, .create-preview { display: none; }
.create-main { min-width: 0; }
.create-main h1 { font-size: 26px; margin-bottom: 6px; text-wrap: balance; }
.create-main .intro { color: var(--text-muted); margin-bottom: var(--space-5); }
@media (min-width: 1100px) {
  .create-grid { max-width: 1240px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: var(--space-6); align-items: start; }
  .create-chapters, .create-preview { display: block; position: sticky; top: 80px; }
  .create-main { max-width: 620px; }
}
@media (min-width: 820px) and (max-width: 1099.98px) {
  .create-grid { max-width: 920px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
  .create-chapters { display: block; position: sticky; top: 80px; }
}
.chapters { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.chapters a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; font-size: 14.5px; }
.chapters a:hover { background: var(--tint); color: var(--text); }
.chapters .is-on a { background: var(--tint); color: var(--text); font-weight: 700; }
.chapters .is-done a { color: var(--text); }
.chapters .tick { width: 18px; height: 18px; border-radius: 50%; background: var(--cmu-lagoon); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.chapters .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.chapters .sep { height: 1px; background: var(--line); margin: 8px 0; }
.preview-card { pointer-events: none; }
.preview-card .cv img { opacity: 1 !important; }

.create-actions { position: fixed; z-index: 1020; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left, 0px)); }
.create-actions .inner { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.create-actions .btn-primary { min-width: 170px; }
@media (min-width: 1100px) { .create-actions .inner { max-width: 1240px; padding-left: calc(220px + var(--space-6)); padding-right: calc(300px + var(--space-6)); } }

/* Quick create parts */
.q-part { padding-block: var(--space-4); border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.q-part:first-of-type { border-top: 0; }
.q-label { font-family: var(--font-body, inherit); font-size: 15px; font-weight: 700; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.need-pill { font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 2px 9px; background: var(--cmu-marigold-light); color: var(--cmu-ink); }
.need-pill.is-done { background: color-mix(in srgb, var(--cmu-lagoon) 18%, transparent); color: var(--text); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-md); background: var(--surface); color: var(--text); text-decoration: none; width: 100%; }
.row-link:hover { border-color: var(--line-strong); }
.place-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-align: left; width: 100%; }
.cover-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cover-tile { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--tint);
  display: grid; place-items: center; color: var(--text-muted); text-decoration: none; font-size: 12px; }
.cover-tile img { width: 100%; height: 100%; object-fit: cover; }
.cover-tile.is-on { border-color: var(--cmu-marigold); }
.cover-tile.upload { border: 1.5px dashed var(--line-strong); gap: 2px; }
.save-state { min-height: 1.2em; margin: 0; }
.extra-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; }
.extra-row input { position: absolute; opacity: 0; }
.extra-row .switch { margin-left: auto; flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line-strong); position: relative; transition: background var(--dur-base); }
.extra-row .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--dur-base); }
.extra-row:has(input:checked) { border-color: var(--cmu-marigold); }
.extra-row:has(input:checked) .switch { background: var(--cmu-lagoon); }
.extra-row:has(input:checked) .switch::after { transform: translateX(16px); }
.extra-row:has(input:focus-visible) { outline: 3px solid var(--cmu-marigold); outline-offset: 2px; }
.format-all summary { list-style: none; cursor: pointer; display: inline-flex; }
.format-all summary::-webkit-details-marker { display: none; }
.look-preview { max-width: 360px; }
.sent { text-align: center; padding-top: var(--space-6); }
.sent-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--cmu-lagoon); color: #fff; display: inline-grid; place-items: center; font-size: 30px; font-weight: 800; margin-bottom: var(--space-3); }
.sent-steps { text-align: left; max-width: 360px; margin: var(--space-4) auto 0; display: grid; gap: 8px; }
.help-sheet { height: auto !important; max-height: 70vh; border-radius: 18px 18px 0 0; }
.crop-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--tint); border-radius: var(--radius-md); overflow: hidden; touch-action: none; cursor: grab; }
.crop-stage canvas { width: 100%; height: 100%; display: block; }
@media (min-width: 1100px) { .create-main .look-preview { display: none; } }
.sep-comma + .sep-comma::before { content: ", "; }

/* Price step: ticket types as rows (name · price · seats). */
.type-row { display: grid; grid-template-columns: 1fr 6rem 5.5rem; gap: 8px; }
.type-row .err { grid-column: 1 / -1; margin: 0; }
.crop-stage.is-square { aspect-ratio: 1 / 1; max-width: 26rem; margin-inline: auto; }
.crop-stage.is-square::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgb(0 0 0 / .35); pointer-events: none; }
