/* NrityaBook: dark temple. Near-black and maroon, temple gold, ivory text; typing boxes stay light ivory for easy reading */
:root {
  --bg: #140d0b; --card: #1f1512; --ink: #f3e9d6; --soft: #c4b29b; --line: #4a382b; --brand: #d6a64f; --brand-ink: #1c120e;
  --gold: #d6a64f; --ok: #8fd19e; --err: #ff9b8c; --focus: #e2b75f; --tint: #2b1f17;
  --serif: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: rgba(20,13,11,.9);
  backdrop-filter: blur(6px); }
.brand { font: 700 21px/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand span { color: var(--brand); }
.save { margin-left: auto; font-size: 13px; color: var(--soft); }
.save.err { color: var(--err); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; max-width: 1180px; margin: 0 auto; padding: 20px; }
.editor { min-width: 0; }
.preview { position: sticky; top: 72px; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.phone { width: 360px; height: 720px; border-radius: 36px; padding: 10px; background: #111; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 28px; background: #000; }
.preview-bar { display: flex; gap: 8px; }
.mobile-only { display: none; }

.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.steps button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--soft); }
.steps button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.steps button .n { opacity: .6; margin-right: 6px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.panel h2 { font: 700 26px/1.15 var(--serif); letter-spacing: -.02em; margin: 0 0 4px; }
.panel .lead { color: var(--soft); margin: 0 0 18px; }
.panel h3 { font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 26px 0 10px; }

.field { display: grid; gap: 5px; margin-bottom: 14px; align-content: start; }
.field > span { font-weight: 700; font-size: 13px; }
.field small, .hint { color: var(--soft); font-size: 12.5px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
input[type=text], input[type=date], input[type=time], input[type=email], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; min-height: 42px; }
input[type=text], input[type=date], input[type=time], input[type=email], select { height: 44px; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.btn { border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-ink); padding: 11px 18px; font-weight: 700; cursor: pointer; min-height: 42px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; min-height: 34px; font-size: 13px; }
.btn.link { background: none; color: var(--brand); padding: 4px 6px; min-height: 0; text-decoration: underline; }
.btn.danger { color: var(--err); }
.nav-row { display: flex; justify-content: space-between; margin-top: 16px; }

.list-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #fff; }
.list-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.list-head b { font: 600 20px/1.1 var(--serif); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-head .num { font-size: 12px; color: var(--soft); }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; }
.list-item.item { padding: 0; }
.item-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.item-head:hover { background: var(--tint); }
.item-head .num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--brand); font-weight: 700; }
.item-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.item-text b { font: 600 19px/1.2 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-text small { color: var(--soft); font-size: 14px; }
.item-text small.ok { color: var(--brand); }
.item-edit { flex: none; padding: 9px 18px; border: 1.5px solid var(--brand); border-radius: 999px; color: var(--brand); font-weight: 700; font-size: 15px; }
.list-item.item.open { border-color: var(--brand); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.list-item.item.open .item-edit { background: var(--brand); color: #fff; }
.item-body { padding: 16px; border-top: 1px solid var(--line); }
.item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
details.more { margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--soft); }
details.more[open] summary { margin-bottom: 14px; }

.photo-pick { display: flex; align-items: center; gap: 12px; }
.photo-pick .thumb { width: 64px; height: 80px; border-radius: 8px; background: #eee center/cover no-repeat; border: 1px solid var(--line); flex: none; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.gallery .g { position: relative; aspect-ratio: 4/5; border-radius: 10px; background: #eee center/cover no-repeat; border: 1px solid var(--line); }
.gallery .g button { position: absolute; top: 6px; right: 6px; }
.gallery .g.pickable { cursor: pointer; }
.gallery .g.pickable:hover { outline: 3px solid var(--focus); }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--soft); margin-bottom: 14px; }
.drop.on { border-color: var(--focus); background: var(--tint); }
.file-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.file-pick:hover, .file-pick.on { border-color: var(--brand); background: var(--tint); }
.file-pick.has { border-style: solid; border-color: var(--brand); }
.file-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--brand); font-size: 19px; }
.file-pick > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.file-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pick small { color: var(--soft); font-size: 12.5px; }
.file-pick .btn { flex: none; pointer-events: none; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }

.suggest { position: relative; }
.suggest ul { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.1); max-height: 220px; overflow: auto; }
.suggest li { padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.suggest li:hover, .suggest li.on { background: var(--tint); }
.suggest li small { display: block; color: var(--soft); }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.swatch { border: 2px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; background: #fff; text-align: left; }
.swatch.on { border-color: var(--ink); }
.swatch .chips { display: flex; height: 34px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.swatch .chips i { flex: 1; }
.swatch b { display: block; font-size: 14px; }
.swatch small { color: var(--soft); font-size: 12px; }

.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 4px; width: 18px; height: 18px; }
.notice { border-radius: 10px; padding: 12px 14px; margin: 12px 0; background: #fff6e0; border: 1px solid #ecd59c; }
.notice.ok { background: #eaf5ec; border-color: #b7dcbf; }
.notice.err { background: #fbeaea; border-color: #ebbcbc; }
.todo li { margin-bottom: 4px; }
.price { font: 600 34px/1 var(--serif); }
.slug-row { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow: hidden; }
.slug-row span { padding: 0 4px 0 12px; color: var(--soft); white-space: nowrap; font-size: 14px; }
.slug-row input { border: 0; min-width: 0; padding-left: 0; }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(24,20,44,.55); display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--card); border-radius: 16px; width: min(980px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px; }
.modal-card h2 { font: 600 26px/1.1 var(--serif); margin: 0 0 6px; }
.crop-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: start; }
.crop-stage { position: relative; user-select: none; touch-action: none; background: #222; border-radius: 10px; overflow: hidden; }
.crop-stage img { display: block; width: 100%; height: auto; pointer-events: none; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); cursor: move; }
.crop-box i { position: absolute; width: 22px; height: 22px; background: #fff; border-radius: 50%; border: 2px solid var(--brand); }
.crop-box i.nw { left: -11px; top: -11px; cursor: nwse-resize; } .crop-box i.ne { right: -11px; top: -11px; cursor: nesw-resize; }
.crop-box i.sw { left: -11px; bottom: -11px; cursor: nesw-resize; } .crop-box i.se { right: -11px; bottom: -11px; cursor: nwse-resize; }
.mini { width: 220px; aspect-ratio: 3/5; border-radius: 18px; overflow: hidden; position: relative; background: var(--mini-bg, #0d1618); border: 6px solid #111; }
.mini .mp { position: absolute; left: 0; top: 0; width: 100%; height: 66%; }
.mini::after { content: ""; position: absolute; left: 0; right: 0; top: 38%; bottom: 0;
  background: linear-gradient(180deg, transparent, var(--mini-bg, #0d1618) 50%); }
.mini .mt { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 18px; color: #f3e9d6; font: 600 22px/1.1 var(--serif); }
.mini .mt small { display: block; font: 400 11px/1.4 var(--sans); opacity: .7; margin-top: 6px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; max-width: calc(100% - 32px); }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; padding: 14px; }
  .preview { position: fixed; inset: 0; z-index: 40; background: #15110e; justify-content: center; padding: 16px; display: none; }
  .preview.open { display: flex; }
  .phone { width: min(360px, 92vw); height: min(720px, calc(100vh - 90px)); }
  .mobile-only { display: inline-block; }
  .panel { padding: 16px; }
  .crop-wrap { grid-template-columns: 1fr; }
  .mini { width: 160px; margin: 0 auto; }
}
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
@media (max-width: 980px) { .preview .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); } }

/* ---------- item cards fold up, so long programmes stay easy to scroll on a phone ---------- */
.desktop-only { display: block; }
body.modal-open { overflow: hidden; }

/* ---------- framing tool: the photo always fits on screen ---------- */
.crop-left { text-align: center; }
.crop-stage { display: inline-block; max-width: 100%; vertical-align: top; }
.crop-stage img { width: auto; max-width: 100%; max-height: 58vh; }

/* ---------- phones ---------- */
@media (max-width: 980px), (pointer: coarse) {
  input[type=text], input[type=date], input[type=time], input[type=email], select, textarea { font-size: 16px; } /* stops iOS zooming in on focus */
  .crop-box i { width: 30px; height: 30px; }
  .crop-box i.nw { left: -15px; top: -15px; } .crop-box i.ne { right: -15px; top: -15px; }
  .crop-box i.sw { left: -15px; bottom: -15px; } .crop-box i.se { right: -15px; bottom: -15px; }
  .icon-btn { width: 40px; height: 40px; }
}
@media (max-width: 980px) {
  .desktop-only { display: none; }
  .top { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .brand { font-size: 19px; }
  .save { font-size: 12px; text-align: right; }
  .steps { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 12px; padding: 0 14px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .steps::-webkit-scrollbar { display: none; }
  .steps button { flex: none; }
  .panel h2 { font-size: 26px; }
  .nav-row { position: sticky; bottom: 0; z-index: 10; margin: 12px -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(20,13,11,.96); border-top: 1px solid var(--line); }
  .nav-row .btn { min-width: 110px; }
  .modal { padding: 0; place-items: stretch; }
  .modal-card { width: 100%; max-height: none; height: 100%; border-radius: 0; padding: 16px 14px 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .modal-card .sticky-actions { position: sticky; bottom: 0; background: var(--card); margin: 12px -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .crop-wrap { grid-template-columns: 1fr; gap: 12px; }
  .crop-stage img { max-height: 52vh; }
  .mini { width: 132px; border-width: 4px; border-radius: 14px; }
  .mini .mt { font-size: 15px; left: 10px; bottom: 10px; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .photo-pick { flex-wrap: wrap; }
  .preview { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); gap: 8px; }
  .phone { width: min(380px, 100%); height: calc(100vh - 90px); height: calc(100dvh - 90px); border-radius: 24px; padding: 6px; flex: none; }
  .preview { top: 0; bottom: 0; height: 100vh; height: 100dvh; z-index: 45; overflow: hidden; }
  .phone iframe { border-radius: 19px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* guided start: one big question per screen */
body.guided-on .editor, body.guided-on #openPreview, body.guided-on .preview:not(.open) { display: none; }
body.guided-on .layout { display: block; padding: 0; }
body.guided-on .preview.open { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; padding: 16px; background: #15110e; }
body.guided-on .preview .phone.scaled { --s: 1; position: relative; width: calc(410px * var(--s)); height: calc(864px * var(--s)); max-width: none; aspect-ratio: auto;
  padding: 0; border-radius: calc(46px * var(--s)); background: #0a0706; box-shadow: 0 0 0 1px rgba(214,166,79,.35), 0 24px 60px rgba(0,0,0,.6); overflow: hidden; }
body.guided-on .preview .phone.scaled iframe { position: absolute; left: calc(10px * var(--s)); top: calc(10px * var(--s)); width: 390px; height: 844px;
  transform: scale(var(--s)); transform-origin: 0 0; border-radius: 36px; }
@media (max-width: 560px) {
  /* on a phone the preview is the real screen: no fake frame, full width and height */
  body.guided-on .preview.open { padding: 0; gap: 0; justify-content: flex-start; }
  body.guided-on .preview .phone { width: 100vw; height: calc(100dvh - 64px); max-width: none; aspect-ratio: auto; padding: 0; border: 0; border-radius: 0; background: #000; box-shadow: none; }
  body.guided-on .preview .phone iframe { width: 100%; height: 100%; border-radius: 0; }
  body.guided-on .preview .preview-bar { height: 64px; align-items: center; padding-bottom: env(safe-area-inset-bottom); }
}
body.guided-on #closePreview { display: inline-block; font-size: 17px; min-height: 48px; padding: 10px 22px; }
body.guided-on .preview .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.guided { display: flex; flex-direction: column; align-items: center; padding: 8px 20px 48px; }
.g-top, .g-card { width: 100%; max-width: 620px; }
.g-top { margin: 6px 0 30px; }
.g-bar { height: 14px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.g-bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.g-pct { margin: 10px 0 0; font-size: 17px; font-weight: 700; color: var(--brand); }
.g-step { margin: 0 0 8px; font-size: 16px; color: var(--soft); }
.g-card h1 { font: 700 clamp(30px, 6.5vw, 42px)/1.15 var(--serif); letter-spacing: -.02em; margin: 0 0 10px; }
.g-hint { margin: 0 0 22px; font-size: 19px; color: var(--soft); }
.g-card input[type=text], .g-card input[type=date], .g-card input[type=time] { width: 100%; height: 66px; padding: 0 18px; font-size: 24px;
  border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.g-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.g-label { display: grid; gap: 8px; margin-bottom: 18px; font-size: 18px; font-weight: 700; }
.g-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.g-chips .btn, .g-fill { min-height: 50px; padding: 10px 18px; font-size: 17px; }
.g-fill { width: 100%; margin-bottom: 14px; border-style: dashed; }
.g-list { display: grid; gap: 12px; }
.g-add { margin-top: 12px; min-height: 50px; font-size: 17px; }
.g-err { margin: 12px 0 0; font-size: 17px; font-weight: 700; color: var(--err); }
.g-err:empty { display: none; }
.g-next { display: block; width: 100%; min-height: 62px; margin-top: 26px; font-size: 21px; border-radius: 14px; }
.g-second { margin-top: 12px; }
.g-skip { display: block; margin: 16px auto 0; font-size: 17px; color: var(--soft); }
.g-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; }
.g-foot .btn.link { font-size: 16px; color: var(--soft); }
.g-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 20px; padding: 12px 14px;
  border-radius: 12px; background: var(--tint); font-weight: 700; color: var(--brand); }
.g-publish h2 { font: 700 clamp(30px, 6.5vw, 40px)/1.15 var(--serif); margin: 0 0 16px; }
.g-publish h3 { font: 700 13px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 28px 0 10px; }
.g-publish .field > span { font-size: 18px; }
.g-publish input[type=email] { width: 100%; height: 62px; padding: 0 16px; font-size: 21px; border: 2px solid var(--line); border-radius: 14px; }
.g-publish .slug-row input { height: 56px; font-size: 20px; border: 0; box-shadow: none; }
.g-publish > .btn:not(.ghost):not(.link) { width: 100%; min-height: 62px; font-size: 20px; border-radius: 14px; }
.g-publish .hint { font-size: 15px; }
.g-row { display: flex; align-items: center; gap: 8px; border-radius: 16px; transition: box-shadow .15s, transform .15s; }
.g-row.dragging { position: relative; z-index: 2; transform: scale(1.02); box-shadow: 0 10px 28px rgba(0,0,0,.16); background: #fff; }
.g-grip { flex: none; width: 48px; height: 66px; display: grid; place-items: center; font-size: 30px; color: var(--soft); cursor: grab; touch-action: none; user-select: none; border-radius: 12px; }
.g-grip:hover { background: var(--tint); color: var(--brand); }
.g-row.dragging .g-grip { cursor: grabbing; color: var(--brand); }

/* simple mode: home screen tiles, choice cards and roomier fields */
.g-sub { font: 700 13px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 40px 0 14px; }
.g-tiles { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .g-tiles:not(.one) { grid-template-columns: 1fr 1fr; } }
.g-tile { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff;
  cursor: pointer; text-align: left; font: inherit; color: inherit; box-shadow: 0 4px 14px rgba(0,0,0,.04); }
.g-tile:hover { border-color: var(--brand); background: var(--tint); }
.g-tile-ico { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--tint); }
.g-tile.done .g-tile-ico { background: var(--brand); color: #fff; font-weight: 700; }
.g-tile-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.g-tile-text b { font: 700 18px/1.25 var(--serif); }
.g-tile-text small { font-size: 15px; color: var(--soft); }
.g-tile-go { flex: none; font-size: 30px; line-height: 1; color: var(--soft); }
.g-choices { display: grid; gap: 12px; }
.g-choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 2px solid var(--line); border-radius: 16px; background: #fff;
  cursor: pointer; text-align: left; font: inherit; color: inherit; }
.g-choice:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.g-choice.on { border-color: var(--brand); background: var(--tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.g-sw { flex: none; display: flex; }
.g-sw i { width: 22px; height: 44px; }
.g-sw i:first-child { border-radius: 10px 0 0 10px; }
.g-sw i:last-child { border-radius: 0 10px 10px 0; }
.g-sample { flex: none; min-width: 120px; font-size: 26px; color: var(--ink); }
.g-choice-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.g-choice-text b { font-size: 19px; }
.g-choice-text small { font-size: 15px; color: var(--soft); }
.g-tick { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; }
.g-choice.on .g-tick { background: var(--brand); }
.g-card textarea { width: 100%; padding: 14px 16px; font-size: 19px; line-height: 1.5; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.g-card select { width: 100%; height: 62px; padding: 0 14px; font-size: 20px; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.g-card textarea:focus, .g-card select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.g-label small { font-size: 15px; font-weight: 400; color: var(--soft); }
.g-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-line { display: flex; align-items: center; gap: 8px; }
.g-line .btn.link { flex: none; font-size: 16px; }
.g-sec { padding: 16px; border: 1.5px solid var(--line); border-radius: 16px; }
.g-card details.more { margin: 6px 0 0; }
.g-card details.more .g-label { margin-top: 12px; }
.g-card .btn.link.danger { color: var(--err); }
.g-card input, .g-card textarea, .g-card select { font-weight: 400; }
.g-card h1 + .g-label { margin-top: 18px; }
.g-photo-row { padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; }
.g-photo-name { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.g-photo-name .num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--brand); font-weight: 700; }
.g-photo-name b { font: 700 19px/1.2 var(--serif); }
.g-card .photo-pick .btn { min-height: 46px; font-size: 16px; padding: 10px 16px; }

/* phone fixes: suggestion buttons fill the width; date and time boxes never spill off the screen; a bigger drag handle */
.g-chips { display: grid; grid-template-columns: 1fr 1fr; }
.g-chips .btn { width: 100%; text-align: center; }
.g-label, .g-label > * { min-width: 0; }
.g-card input[type=date], .g-card input[type=time] { display: block; max-width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; text-align: left; line-height: 62px; }
.g-card input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.g-row .g-grip { width: 52px; height: 66px; font-size: 26px; border: 1.5px solid var(--line); background: #fff; color: var(--soft); -webkit-touch-callout: none; }
.g-row.dragging .g-grip { border-color: var(--brand); background: var(--tint); }
/* home screen cards: 2 by 2 on every screen size, icon on the left */
.g-tiles:not(.one) { grid-template-columns: 1fr 1fr; }
.g-tile.done { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.g-tile.done .g-tile-ico { background: var(--tint); color: inherit; font-weight: 400; }
.g-tile-ico { position: relative; }
.g-tile-done { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font: normal 700 13px/1 var(--sans); border: 2px solid #fff; }
@media (max-width: 560px) {
  .g-tiles:not(.one) { gap: 10px; }
  .g-tiles:not(.one) .g-tile { gap: 8px; padding: 12px 8px 12px 10px; }
  .g-tiles:not(.one) .g-tile-ico { width: 38px; height: 38px; font-size: 18px; }
  .g-tiles:not(.one) .g-tile-text b { font-size: 15px; }
  .g-tiles:not(.one) .g-tile-text small { font-size: 13px; }
  .g-tiles:not(.one) .g-tile-go { font-size: 22px; }
}
@media (max-width: 440px) {
  .g-tiles:not(.one) .g-tile-go { display: none; }
  .g-tiles:not(.one) .g-tile { gap: 10px; padding: 12px 10px; }
  .g-tiles:not(.one) .g-tile-ico { width: 36px; height: 36px; font-size: 17px; }
}
/* question 1: the title is centred while typing */
.g-card input.g-center { text-align: center; letter-spacing: .04em; }
/* framing: short instructions and the live preview beside the photo on phones */
.crop-short { display: none; }
.mini-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--soft); text-align: center; }
@media (max-width: 640px) {
  .modal-card .crop-long { display: none; }
  .modal-card .crop-short { display: block; margin: 0 0 10px; font-size: 15px; }
  .modal-card h2 { font-size: 24px; }
  .modal-card .crop-wrap { grid-template-columns: minmax(0, 1fr) 40%; gap: 12px; align-items: start; }
  .modal-card .crop-stage img { max-height: 50vh; }
  .modal-card .mini { width: 100%; border-width: 5px; border-radius: 16px; margin: 0; }
  .modal-card .mini .mt { font-size: 17px; left: 10px; right: 10px; bottom: 12px; }
  .modal-card .mini .mt small { display: block; font-size: 10px; margin-top: 4px; }
  .modal-card .crop-left .row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .modal-card .crop-left .row .btn { padding: 8px 4px; font-size: 13px; min-height: 40px; }
}

/* temple touches: a gold rule under the header, a gold-to-maroon progress bar */
.top { border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.g-bar { background: #f1e4d3; }
.g-bar i { background: linear-gradient(90deg, #d6a64f, var(--brand)); }
.g-pct { color: var(--brand); }
.brand span { color: var(--gold); }

/* ===== dark temple, applied everywhere ===== */
html { color-scheme: dark; }
html, body { background: radial-gradient(120% 50% at 70% 0%, #3d0f16 0%, rgba(61,15,22,0) 60%) fixed, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='1.1' fill='%23d6a64f' fill-opacity='.18'/%3E%3Cpath d='M18 6c6 0 12 6 12 12M18 30C12 30 6 24 6 18' fill='none' stroke='%23d6a64f' stroke-opacity='.06'/%3E%3C/svg%3E"), #140d0b; }
.top { background: rgba(20,13,11,.9); border-bottom: 1px solid rgba(214,166,79,.3); }
.brand { color: var(--ink); }
.brand span { color: var(--gold); }
/* buttons: gold for the main action, gold-edged outline for the rest */
.btn { background: linear-gradient(180deg, #e2b75f, #c9953f); color: #1c120e; box-shadow: 0 6px 18px rgba(214,166,79,.18); }
.btn.ghost { background: rgba(255,255,255,.02); color: var(--ink); border: 1px solid rgba(214,166,79,.45); box-shadow: none; }
.btn.link { background: none; color: var(--gold); box-shadow: none; }
.btn.link.danger, .btn.danger, .g-card .btn.link.danger { color: var(--err); }
/* typing boxes stay light, with dark text, so it is always obvious where to type */
input[type=text], input[type=date], input[type=time], input[type=email], select, textarea,
.g-card input[type=text], .g-card input[type=date], .g-card input[type=time], .g-card textarea, .g-card select, .g-publish input[type=email] {
  background: #fbf6ee; color: #2a1a17; border-color: #8a6a3e; color-scheme: light; }
input::placeholder, textarea::placeholder { color: #8f7d6c; }
.slug-row { background: #fbf6ee; border-color: #8a6a3e; }
.slug-row span { color: #6f5f55; }
.check input { accent-color: #d6a64f; }
/* cards and panels */
.panel, .list-item, .icon-btn, .file-pick, .suggest ul, .swatch, .g-tile, .g-choice, .g-grip, .g-row .g-grip, .g-row.dragging, .modal-card, .g-sec, .g-photo-row { background: var(--card); }
.g-tile, .g-choice, .g-sec, .g-photo-row, details.more, .file-pick { border-color: rgba(214,166,79,.28); }
.g-tile:hover, .g-choice:hover { border-color: var(--gold); background: #2a1d17; }
.g-tile-ico { background: rgba(214,166,79,.13); }
.g-tile.done { border-color: rgba(214,166,79,.6); }
.g-tile.done .g-tile-ico { background: rgba(214,166,79,.13); }
.g-tile-done { background: var(--gold); color: #1c120e; border-color: var(--card); }
.g-choice.on { background: #2e2016; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,166,79,.2); }
.g-choice.on .g-tick { background: var(--gold); color: #1c120e; }
.g-sample { color: var(--ink); }
.g-bar { background: rgba(255,255,255,.08); }
.g-bar i { background: linear-gradient(90deg, #a8742e, #e8c27a); }
.g-pct { color: var(--gold); }
.g-photo-name .num, .item-head .num { background: rgba(214,166,79,.15); color: var(--gold); }
.gallery .g { background-color: #2b1f17; }
.notice { background: rgba(214,166,79,.1); border-color: rgba(214,166,79,.4); }
.notice.ok { background: rgba(143,209,158,.1); border-color: rgba(143,209,158,.4); }
.notice.err { background: rgba(255,155,140,.1); border-color: rgba(255,155,140,.4); }
.progress { background: rgba(255,255,255,.1); }
.toast { background: #fbf6ee; color: #1c120e; }
.modal { background: rgba(8,5,4,.75); }
.modal-card .sticky-actions { background: var(--card); border-top-color: rgba(214,166,79,.3); }
.g-sub { color: var(--gold); }
.drop { border-color: rgba(214,166,79,.4); }

/* book-ordered flow: which part of the book you are filling, and the sample programme */
.g-top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.g-top-row .g-pct { margin: 0; }
.g-sample-phone { width: min(330px, 86vw); aspect-ratio: 9 / 18.5; margin: 4px auto 8px; border: 8px solid #0a0706; border-radius: 34px; overflow: hidden;
  background: #000; box-shadow: 0 0 0 1px rgba(214,166,79,.45), 0 24px 60px rgba(0,0,0,.6); }
.g-sample-phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.g-center-text { text-align: center; }
.g-center-text a { color: var(--gold); }
.g-small { font-size: 15px; margin: -4px 0 14px; }
.g-book .g-tile { padding: 12px 14px; }
.g-book .g-tile-ico { width: 40px; height: 40px; font-size: 19px; }

/* wishes wall: a small example of each style beside its name */
.wx { flex: none; order: -1; display: flex; gap: 6px; padding: 9px 8px; border-radius: 8px; width: 132px; }
.wx-note { position: relative; flex: 1; display: grid; gap: 3px; padding: 7px 6px 6px; min-height: 52px; box-shadow: 0 3px 6px rgba(0,0,0,.4); }
.wx-note i { font: 10px/1.2 Georgia, serif; font-style: normal; }
.wx-note b { font: 700 7px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.wx-notes .wx-note:nth-child(1) { transform: rotate(-2deg); border-radius: 2px; }
.wx-notes .wx-note:nth-child(2) { transform: rotate(1.5deg); border-radius: 2px; }
.wx-letters .wx-note { margin-top: 5px; border-radius: 1px; }
.wx-letters .wx-note:nth-child(1) { transform: rotate(-3deg); }
.wx-letters .wx-note:nth-child(2) { transform: rotate(2.5deg); }
.wx-letters .wx-note::before { content: ""; position: absolute; top: -5px; left: 50%; width: 26px; height: 9px; margin-left: -13px; background: var(--tape); opacity: .75; transform: rotate(-4deg); }
.wx-letters .wx-note i { font: 13px/1.05 Caveat, "Segoe Print", cursive; }
.wx-letters .wx-note b { font: 700 11px/1 Caveat, "Segoe Print", cursive; letter-spacing: 0; text-transform: none; }

/* the colour change while choosing the look fades rather than jumps */
body.live-look, body.live-look .top, body.live-look .g-choice, body.live-look .btn { transition: background-color .4s, border-color .4s, color .4s; }

/* page-turn options: a tiny phone turning one page on a loop */
.tx { flex: none; order: -1; position: relative; width: 76px; height: 128px; border-radius: 13px; border: 3px solid #050403; overflow: hidden;
  perspective: 320px; isolation: isolate; box-shadow: 0 0 0 1px rgba(214,166,79,.55), 0 6px 14px rgba(0,0,0,.45); }
.tx-pg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; padding: 0 5px 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.tx-pg i { position: absolute; left: 0; right: 0; top: 0; height: 70%; background-position: center top; background-size: cover; background-repeat: no-repeat; }
.tx-pg b { position: relative; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Georgia, serif; font-weight: 600; letter-spacing: .02em; line-height: 1.1; }
.tx-pg em { position: relative; display: block; width: 46%; height: 2px; border-radius: 2px; opacity: .55; }
.tx-a { z-index: 2; transform-origin: left center; box-shadow: 2px 0 6px rgba(0,0,0,.35); }
.tx-b { z-index: 1; }
.tx-book .tx-a { animation: tx-book 3.2s ease-in-out infinite; }
.tx-slide .tx-a { animation: tx-slide 3.2s ease-in-out infinite; }
.tx-fade .tx-a { animation: tx-fade 3.2s ease-in-out infinite; }
@keyframes tx-book { 0%, 22% { transform: rotateY(0); } 52%, 82% { transform: rotateY(-180deg); } 100% { transform: rotateY(0); } }
@keyframes tx-slide { 0%, 22% { transform: translateX(0); } 52%, 82% { transform: translateX(-110%); } 100% { transform: translateX(0); } }
@keyframes tx-fade { 0%, 22% { opacity: 1; } 52%, 82% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tx-pg { animation: none !important; } }

/* included music */
.lib-head { margin: 18px 0 4px; font-weight: 700; font-size: 17px; color: var(--ink); }
.lib { display: grid; gap: 8px; margin: 10px 0 8px; }
.lib-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(214,166,79,.28); border-radius: 14px; background: var(--card); }
.lib-play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: #1c120e; font-size: 15px; cursor: pointer; }
.lib-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lib-text b { font-size: 15.5px; }
.lib-text small { color: var(--soft); font-size: 13px; }
.lib-row .btn { flex: none; }

/* Skip sits beside See how it looks, quieter */
.g-links { display: flex; justify-content: center; align-items: center; gap: 28px; margin-top: 16px; }
.g-links .btn.link { font-size: 17px; }
.g-links .g-skip-quiet { color: var(--soft); opacity: .65; font-weight: 600; }
.g-links .g-skip-quiet:hover { opacity: 1; }
/* the address above the link box, so the name has the full width */
.g-publish .slug-row { flex-direction: column; align-items: stretch; padding: 8px 4px 2px; }
.g-publish .slug-row span { padding: 0 14px; font-size: 13px; }
.g-publish .slug-row input { padding: 0 14px; height: 48px; }
/* price, then what's included */
.price-box { display: grid; gap: 6px; margin: 20px 0 16px; }
.price-box .hint { font-size: 15px; }
/* page-turn examples: a real photo on each page */

/* included music folds away under the upload */
.lib-more { margin-top: 30px !important; }
.lib-more summary { font-size: 17px; color: var(--ink); }
.lib-more summary small { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--soft); }
.lib-more[open] .lib { margin-bottom: 0; }

/* the gentle "nothing added yet" note under Continue on optional pages */
.g-nudge { margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: rgba(214,166,79,.1); border: 1px solid rgba(214,166,79,.35);
  animation: g-nudge-in .25s ease-out; }
.g-nudge p { margin: 0 0 10px; font-size: 16px; color: var(--ink); }
.g-nudge div { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.g-nudge .btn.small { min-height: 44px; font-size: 15px; padding: 9px 16px; }
@keyframes g-nudge-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* "Need help?" in the top bar, opens the support page */
.top .save { margin-left: auto; }
.help-link { flex: none; margin-left: 12px; padding: 7px 12px; border: 1px solid rgba(214,166,79,.5); border-radius: 999px; color: var(--gold); font-size: 14px; font-weight: 700; text-decoration: none; }
.top .brand + .help-link { margin-left: auto; }
/* small text links (See how it looks, Back, Skip this page) read cleanly without underlines; underline only on hover */
.btn.link { text-decoration: none; }
.btn.link:hover, .btn.link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* live page: QR code with a dancer in the middle */
.qr-box { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; margin: 18px 0 8px; }
.qr-canvas { width: 220px; height: 220px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(214,166,79,.4); }
.qr-side p { margin: 0 0 10px; }
.qr-label { font-weight: 700; color: var(--gold); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.qr-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.qr-picks button { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 1.5px solid rgba(214,166,79,.3); border-radius: 12px; background: #fbf6ee; cursor: pointer; }
.qr-picks button.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,166,79,.3); }
.qr-picks img, .qr-plain { height: 44px; width: auto; display: block; }
.qr-plain { font-size: 34px; line-height: 44px; color: #1c120e; }
.qr-picks small { font-size: 11px; color: #3a2a20; line-height: 1.15; text-align: center; }
.receipt-to { margin: 0 0 12px; color: var(--soft); }
.receipt-to b { color: var(--ink); }
@media (max-width: 560px) { .qr-box { grid-template-columns: 1fr; justify-items: center; } .qr-canvas { width: 240px; height: 240px; } .qr-side { width: 100%; } }
.qr-side a.btn { display: block; text-align: center; text-decoration: none; min-height: 48px; line-height: 28px; font-size: 16px; margin-bottom: 10px; }

/* remove button at the end of each dancer / item row */
.g-row input { flex: 1; min-width: 0; }
.g-del { flex: none; width: 48px; height: 66px; border-radius: 12px; border: 1.5px solid rgba(214,166,79,.3); background: var(--card); color: var(--soft);
  font-size: 28px; line-height: 1; cursor: pointer; }
.g-del:hover, .g-del:focus-visible { color: var(--err); border-color: var(--err); }
@media (max-width: 420px) { .g-row { gap: 6px; } .g-row .g-grip, .g-del { width: 42px; } }

/* "Pick one of ours" reads as a button, not a line of text */
details.lib-more { padding: 0; border: 1.5px solid var(--gold); border-radius: 16px; background: rgba(214,166,79,.08); overflow: hidden; }
details.lib-more summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; }
details.lib-more summary::-webkit-details-marker { display: none; }
details.lib-more summary:hover { background: rgba(214,166,79,.14); }
.lib-ico { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1c120e; font-size: 22px; }
.lib-sum { flex: 1; min-width: 0; display: grid; gap: 3px; }
.lib-sum b { font-size: 17px; color: var(--ink); line-height: 1.25; }
.lib-sum small { margin: 0 !important; font-size: 14px; color: var(--soft); }
.lib-chev { flex: none; display: flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; background: var(--gold); color: #1c120e; font-weight: 800; font-size: 15px; transition: transform .2s; }
.lib-chev em { font-style: normal; font-size: 14px; }
details.lib-more[open] .lib-chev { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
details.lib-more[open] .lib-chev em { display: none; }
details.lib-more[open] .lib-chev { transform: rotate(180deg); }
details.lib-more[open] summary { border-bottom: 1px solid rgba(214,166,79,.3); }
details.lib-more .lib { margin: 12px; }

/* your own dancer for the QR code */
.qr-picks { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.qr-own { display: block; width: 100%; margin: 0 0 10px; min-height: 48px; font-size: 16px; }
.qr-status { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: rgba(214,166,79,.1); border: 1px solid rgba(214,166,79,.35); font-size: 15px; }
.qr-status.err { background: rgba(255,155,140,.1); border-color: rgba(255,155,140,.45); color: #ffd5cd; }

.qr-picks.qr-two { grid-template-columns: repeat(2, minmax(0, 120px)); }
.qr-add { font-size: 30px; color: #6f5f55; }
.qr-tip { margin: 0 0 8px !important; }
.qr-again { display: block; margin: 0 0 10px; padding: 0; font-size: 15px; }
.qr-keep { display: block; width: 100%; margin: 12px 0 0; }

/* file pickers: the visible button is a label around an invisible (but present) input, so iPhones open it natively */
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); pointer-events: none; }
label.file-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
label.file-pick { position: relative; }

/* the progress / result message sits right under the QR code, where people are looking while it updates */
.qr-left { display: grid; gap: 10px; justify-items: center; }
.qr-left .qr-status { width: 100%; max-width: 260px; margin: 0; text-align: center; }
