/* planinblue — blueprint agent (questions → brief → booking) */

/* The drafting frame wraps the whole page and scrolls with it (not pinned to the screen). */
body.app { position: relative; height: auto; min-height: 100%; background-attachment: fixed; }
.app .frame { position: absolute; }
[hidden] { display: none !important; }

.app-sheet {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1320px;
  margin: 0 auto;
  padding: calc(var(--frame) + 22px) calc(var(--frame) + 38px) calc(var(--frame) + 22px);
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */
.app-top {
  display: grid;
  grid-template-columns: 1fr minmax(0, 520px) 1fr;
  align-items: center;
  gap: 24px;
}
.app-top-right { display: flex; align-items: center; justify-content: flex-end; gap: 22px; }

.back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  font: 400 16px/1 var(--hand);
  letter-spacing: 0.05em;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.back:hover:not(:disabled) { transform: translateX(-2px); }
.back:disabled { opacity: 0; pointer-events: none; }
.back:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* progress as a dimension line: |<—— filled ——>| */
.progress { display: flex; flex-direction: column; align-items: stretch; gap: 7px; transition: opacity 0.3s; }
.progress.is-hidden { opacity: 0; }
.progress-line {
  position: relative;
  height: 12px;
  border-left: 1.3px solid var(--line);
  border-right: 1.3px solid var(--line);
}
.progress-line::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.2px;
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%);
}
.progress-fill {
  position: absolute;
  left: 0; top: 50%;
  height: 3px;
  width: 0;
  background: var(--yellow);
  transform: translateY(-50%);
  transition: width 0.6s cubic-bezier(.2, .8, .2, 1);
}
.progress-fill::after { /* arrowhead riding the front of the fill */
  content: "";
  position: absolute;
  right: -7px; top: 50%;
  border: 5px solid transparent;
  border-left: 8px solid var(--yellow);
  border-right: 0;
  transform: translateY(-50%);
}
.progress-fill[style*="width: 0"]::after, .progress-fill:not([style])::after { display: none; }
.progress-ticks { position: absolute; inset: 0; }
.progress-ticks i {
  position: absolute;
  top: 2px; bottom: 2px;
  width: 1.2px;
  background: rgba(255, 255, 255, 0.7);
}
.progress-label {
  text-align: center;
  font: 400 13.5px/1 var(--hand);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ---------- Stage & screen transitions ---------- */
.stage {
  flex: 1;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 36px 0 20px;
}
.screen {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 740px;
}
.screen.is-leaving { pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .screen.enter { animation: enterUp 0.55s cubic-bezier(.2, .8, .2, 1) both; }
  .screen.enter.rev { animation-name: enterDown; }
  .screen.is-leaving { animation: leaveUp 0.35s ease-in both; }
  .screen.is-leaving.rev { animation-name: leaveDown; }
}
@keyframes enterUp { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }
@keyframes enterDown { from { opacity: 0; transform: translateY(-46px); } to { opacity: 1; transform: none; } }
@keyframes leaveUp { to { opacity: 0; transform: translateY(-46px); } }
@keyframes leaveDown { to { opacity: 0; transform: translateY(46px); } }

/* ---------- Agent avatar ---------- */
.avatar { display: inline-block; width: 48px; height: 48px; flex: none; }
.avatar svg { display: block; width: 100%; height: 100%; overflow: visible; }
.avatar .av-line { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.avatar .av-fill { fill: var(--blue); }
.avatar .av-ring { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 3 8; opacity: 0.6; transform-origin: 50px 50px; }
.avatar .av-eye { fill: #fff; transform-box: fill-box; transform-origin: center; }
.avatar .av-mouth { fill: #fff; opacity: 0; transform-box: fill-box; transform-origin: center; }
.avatar .av-bulb { fill: var(--yellow); }
.avatar .av-halo { fill: none; stroke: var(--yellow); stroke-width: 2.4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.avatar--lg { width: 116px; height: 116px; }
.avatar--lg .av-line { stroke-width: 2.4; }
.avatar--lg .av-ring { stroke-width: 1.4; }

@media (prefers-reduced-motion: no-preference) {
  .avatar .av-ring { animation: spin 24s linear infinite; }
  .avatar .av-eye { animation: blink 4.6s infinite; }
  .avatar .av-halo { animation: halo 2.2s ease-out infinite; }
  .avatar.is-thinking .av-eyes { animation: look 1.5s ease-in-out infinite; }
  .avatar.is-thinking .av-halo { animation-duration: 0.9s; }
  .avatar.is-speaking .av-smile { opacity: 0; }
  .avatar.is-speaking .av-mouth { opacity: 1; animation: talk 0.24s ease-in-out infinite alternate; }
  .avatar.is-listening .av-ring { stroke: var(--yellow); opacity: 1; animation-duration: 7s; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 92%, 100% { transform: none; } 95% { transform: scaleY(0.12); } }
@keyframes look { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-4px); } 70% { transform: translateX(4px); } }
@keyframes talk { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes halo { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(2.8); } }

/* ---------- Agent row ---------- */
.agent-row { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.agent-name { display: block; font: 600 14.5px/1.2 var(--sans); letter-spacing: -0.005em; }
.agent-status {
  display: block;
  margin-top: 3px;
  font: 400 13.5px/1.2 var(--hand);
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.agent-status.is-busy::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: dots 1.2s steps(4) infinite;
}
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- Question ---------- */
.q-context {
  margin: 0 0 12px;
  min-height: 1.4em;
  font: 400 18px/1.4 var(--hand);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.q-title {
  position: relative;
  margin: 0;
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.022em;
  text-wrap: pretty;
}
.q-title em { font-style: italic; color: var(--yellow); }
.q-num {
  position: absolute;
  right: 100%;
  top: 0.32em;
  margin-right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 400 17px/1 var(--hand);
  color: var(--yellow);
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.caret {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 3px;
  vertical-align: -0.08em;
  background: var(--yellow);
  animation: caret 0.8s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.q-context, .q-text { position: relative; }
.q-text { display: block; }
.ghost { visibility: hidden; }
.live { position: absolute; inset: 0 0 auto 0; }
.q .q-help { opacity: 0; transition: opacity 0.4s ease; }
.q.is-typed .q-help { opacity: 1; }
.q-help {
  margin: 14px 0 0;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.q-body {
  margin-top: 30px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.q-body.is-ready { opacity: 1; transform: none; }

/* ---------- Composer ---------- */
.composer {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 18px;
  border: 1.3px solid rgba(255, 255, 255, 0.6);
  background: var(--panel);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.composer::before, .composer::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
  bottom: -11px;
}
.composer::before { right: -11px; border-bottom: 1.3px solid var(--line); border-right: 1.3px solid var(--line); }
.composer::after { left: -11px; border-bottom: 1.3px solid var(--line); border-left: 1.3px solid var(--line); }
.composer:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(246, 201, 69, 0.2); }
.composer textarea {
  flex: 1;
  min-height: 52px;
  max-height: 220px;
  padding: 14px 0 12px;
  font-size: 18px;
  line-height: 1.45;
  border: 0;
  background: none;
  box-shadow: none;
  resize: none;
  overflow-y: auto;
}
.composer textarea:focus { background: none; box-shadow: none; }
.composer--small textarea { min-height: 46px; font-size: 16px; padding: 12px 0 10px; }

.mic {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 1px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1.2px solid var(--line-soft);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.15s;
}
.mic:hover { border-color: #fff; background: rgba(255, 255, 255, 0.12); transform: scale(1.05); }
.mic { position: relative; --lvl: 0; }
.mic-ring {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  transform: rotate(-90deg);
  overflow: visible;
  pointer-events: none;
}
.mic-ring circle { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 145; stroke-dashoffset: 145; opacity: 0; }
.mic.is-counting .mic-ring circle { opacity: 1; animation: countdown 1.8s linear forwards; }
@keyframes countdown { to { stroke-dashoffset: 0; } }
.composer { --lvl: 0; }
.composer.is-dictating { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(246, 201, 69, 0.2); }
.composer.is-dictating .mic {
  color: var(--btn-ink);
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 0 0 calc(3px + var(--lvl) * 16px) rgba(246, 201, 69, 0.22);
  transition: box-shadow 0.08s linear, background-color 0.15s, color 0.15s;
}
.composer.is-dictating .mic:hover { transform: none; }
.composer.is-dictating textarea::placeholder { color: var(--yellow); opacity: 0.8; }
.dictate-note {
  margin: 18px 0 0;
  font: 400 13px/1.4 var(--hand);
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.mic:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.q-actions { display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.nudge-msg {
  font: 400 15px/1.3 var(--hand);
  letter-spacing: 0.04em;
  color: var(--yellow);
}
.shake { animation: shake 0.4s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- Choices ---------- */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.options { display: flex; flex-direction: column; gap: 10px; max-width: 470px; }
.chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 40px 12px 12px;
  text-align: left;
  font: 400 15.5px/1.3 var(--sans);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  border: 1.2px solid var(--line-soft);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.12s;
}
.chip:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.chip:active { transform: scale(0.99); }
.chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.chip .key {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  font: 400 13px/1 var(--hand);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.chip .tick {
  color: var(--yellow);
  position: absolute;
  right: 13px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  opacity: 0;
}
.chip .tick path { stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset 0.3s ease 0.05s; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] {
  border-color: var(--yellow);
  background: rgba(246, 201, 69, 0.12);
}
.chip[aria-pressed="true"] .key, .chip[aria-checked="true"] .key { background: var(--yellow); border-color: var(--yellow); color: var(--btn-ink); }
.chip[aria-pressed="true"] .tick, .chip[aria-checked="true"] .tick { opacity: 1; }
.chip[aria-pressed="true"] .tick path, .chip[aria-checked="true"] .tick path { stroke-dashoffset: 0; }
.chip.flash { animation: flash 0.35s ease 2; }
@keyframes flash { 50% { background: rgba(246, 201, 69, 0.3); } }

.q-body .composer--small { margin-top: 18px; }

.ideas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.idea {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 6px;
  font: 400 14.5px/1 var(--hand);
  letter-spacing: 0.04em;
  color: var(--ink);
  background: none;
  border: 1.2px dashed var(--line-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.idea:hover { border-style: solid; border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.idea:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.idea span { color: var(--yellow); font-size: 16px; }

/* ---------- Intro ---------- */
.screen.intro, .screen.done { text-align: center; max-width: 660px; }
.intro .avatar--lg { margin: 0 auto 26px; }
.intro .q-context { margin-bottom: 14px; }
.intro .q-title { font-size: clamp(32px, 3.6vw, 48px); }
.intro .q-help { max-width: 34em; margin-left: auto; margin-right: auto; }
.intro-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.intro .dim { max-width: 320px; margin: 30px auto 0; color: var(--ink-soft); }

/* ---------- Brief (technical-drawing title block) ---------- */
.screen.brief { max-width: 820px; }
.titleblock {
  position: relative;
  border: 1.3px solid rgba(255, 255, 255, 0.7);
  background: var(--panel);
}
.titleblock::after {
  content: "";
  position: absolute;
  right: -11px; bottom: -11px;
  width: 14px; height: 14px;
  border-right: 1.3px solid var(--line);
  border-bottom: 1.3px solid var(--line);
}
.tb-head { display: grid; grid-template-columns: 1fr auto auto auto; border-bottom: 1.3px solid rgba(255, 255, 255, 0.7); }
.tb-head > div { padding: 10px 16px 11px; }
.tb-head > div + div { border-left: 1px solid var(--line-soft); }
.tb-head small {
  display: block;
  font: 400 11.5px/1 var(--hand);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.tb-head strong { display: block; margin-top: 5px; font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap; }
.tb-rows { margin: 0; }
.tb-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 14px 16px;
}
.tb-row + .tb-row { border-top: 1px solid rgba(255, 255, 255, 0.22); }
.tb-row dt { font: 400 15px/1.4 var(--hand); letter-spacing: 0.05em; color: var(--ink-soft); }
.tb-row dd { margin: 0; font-size: 15.5px; line-height: 1.5; text-wrap: pretty; }
.tb-row dd .tag {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 4px 9px 3px;
  font-size: 13.5px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
.tb-row dd .muted { color: var(--ink-mute); }
.edit {
  font: 400 14px/1 var(--hand);
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--line-soft);
  padding: 2px 0;
  cursor: pointer;
}
.edit:hover { color: var(--yellow); border-bottom-color: var(--yellow); }
.edit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Booking (Cal-style) ---------- */
.screen.booking { max-width: 1080px; }
.cal {
  position: relative;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 240px;
  border: 1.3px solid rgba(255, 255, 255, 0.7);
  background: var(--panel);
  min-height: 470px;
}
.cal::after {
  content: "";
  position: absolute;
  left: -11px; bottom: -11px;
  width: 14px; height: 14px;
  border-left: 1.3px solid var(--line);
  border-bottom: 1.3px solid var(--line);
}
.cal > * { padding: 24px 22px; min-width: 0; }
.cal > * + * { border-left: 1px solid rgba(255, 255, 255, 0.28); }

.cal-host { display: flex; align-items: center; gap: 10px; }
.cal-host .avatar { width: 38px; height: 38px; }
.cal-host .team-chip {
  width: 38px; height: 38px;
  margin-left: -14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.3px solid #fff;
  background: var(--blue);
  color: #fff;
  overflow: hidden;
}
.cal-host .team-chip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cal-host span { font: 400 14px/1.2 var(--hand); letter-spacing: 0.05em; color: var(--ink-soft); }
.cal-info h3 { margin: 16px 0 16px; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.cal-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.cal-meta li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-soft); }
.cal-meta svg { flex: none; }
.cal-info p { margin: 18px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.cal-brief {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 7px 11px 6px;
  font: 400 13.5px/1 var(--hand);
  letter-spacing: 0.05em;
  border: 1.2px dashed rgba(246, 201, 69, 0.8);
  border-radius: 999px;
  color: var(--yellow);
}
.cal-picked {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-soft);
  font-size: 14.5px;
  line-height: 1.45;
}
.cal-picked strong { display: block; font-weight: 600; color: var(--yellow); }

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.cal-head h4 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cal-head h4 span { font-weight: 400; color: var(--ink-soft); }
.cal-nav { display: flex; gap: 6px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1.2px solid var(--line-soft);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, opacity 0.15s;
}
.icon-btn:hover:not(:disabled) { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.cal-week, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-week { margin-bottom: 8px; }
.cal-week span {
  text-align: center;
  font: 400 12.5px/1 var(--hand);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.day {
  position: relative;
  height: 50px;
  display: grid;
  place-items: center;
  font: 500 15px/1 var(--sans);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  border: 1.2px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.12s;
}
.day:hover:not(:disabled) { border-color: #fff; background: rgba(255, 255, 255, 0.16); }
.day:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.day:disabled { background: none; border-color: transparent; color: var(--ink-mute); cursor: default; font-weight: 400; }
.day.is-blank { visibility: hidden; }
.day.is-today::after {
  content: "";
  position: absolute;
  bottom: 18%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.day[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--btn-ink); font-weight: 600; }

.cal-slots { display: flex; flex-direction: column; }
.cal-slots .cal-head h4 { font-size: 15.5px; }
.seg { display: inline-flex; border: 1.2px solid var(--line-soft); border-radius: 2px; }
.seg button {
  padding: 6px 8px 5px;
  font: 500 12px/1 var(--sans);
  color: var(--ink-soft);
  background: none;
  border: 0;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.16); color: #fff; }
.seg button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.slot-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 390px; padding: 2px 4px 4px 2px; margin: 0 -4px 0 -2px; }
.slot-row { display: flex; gap: 8px; }
.slot {
  flex: 1 1 100%;
  padding: 12px 8px;
  font: 500 15px/1 var(--sans);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1.2px solid var(--line-soft);
  border-radius: 2px;
  cursor: pointer;
  transition: flex-basis 0.25s ease, border-color 0.15s, background-color 0.15s;
}
.slot:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.slot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.slot-row.is-picked .slot { flex-basis: 45%; background: rgba(255, 255, 255, 0.16); border-color: #fff; }
.slot-row .btn { flex: 1 1 55%; justify-content: center; padding: 12px 10px; font-size: 14.5px; }
.slot-empty { margin: auto 0; text-align: center; font: 400 15px/1.5 var(--hand); letter-spacing: 0.05em; color: var(--ink-mute); }
.slot-empty svg { display: block; margin: 0 auto 10px; }

.details { display: grid; gap: 12px; }
.details .field { display: grid; gap: 6px; }
.details .btn { justify-content: center; margin-top: 4px; }

.tz { margin-top: 14px; font: 400 13px/1.3 var(--hand); letter-spacing: 0.05em; color: var(--ink-mute); }

/* ---------- Done ---------- */
.done-check { display: block; width: 104px; height: 104px; margin: 0 auto 20px; overflow: visible; }
.done-check circle { fill: none; stroke: #fff; stroke-width: 1.4; stroke-dasharray: 4 7; transform-origin: 52px 52px; }
.done-check path { fill: none; stroke: var(--yellow); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; }
@media (prefers-reduced-motion: no-preference) {
  .done-check circle { animation: spin 30s linear infinite; }
  .done-check path { animation: draw 0.7s cubic-bezier(.6, .1, .3, 1) 0.3s forwards; }
}
@media (prefers-reduced-motion: reduce) { .done-check path { stroke-dashoffset: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done .q-title { font-size: clamp(32px, 3.6vw, 46px); }
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 22px;
  align-items: center;
  margin: 30px auto 0;
  max-width: 480px;
  padding: 20px 24px;
  text-align: left;
  border: 1.3px dashed rgba(255, 255, 255, 0.7);
  background: var(--panel);
}
.ticket .t-date { grid-row: span 3; text-align: center; padding-right: 22px; border-right: 1px dashed var(--line-soft); }
.ticket .t-date b { display: block; font-size: 40px; line-height: 1; font-weight: 600; color: var(--yellow); }
.ticket .t-date small { display: block; margin-top: 6px; font: 400 13px/1 var(--hand); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.ticket .t-row { font-size: 15px; color: var(--ink-soft); }
.ticket .t-row strong { color: #fff; font-weight: 600; }
.done-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.next-steps {
  counter-reset: step;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 40px 0 0;
  padding: 22px 0 0;
  text-align: left;
  border-top: 1px dashed var(--line-soft);
}
.next-steps li { counter-increment: step; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.next-steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 6px;
  font: 400 18px/1 var(--hand);
  color: var(--yellow);
}
.next-steps b { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.home-link { display: inline-block; margin-top: 32px; font: 400 15px/1 var(--hand); letter-spacing: 0.05em; color: var(--ink-soft); text-decoration: none; border-bottom: 1px dashed var(--line-soft); padding-bottom: 3px; }
.home-link:hover { color: #fff; border-bottom-color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .q-num { position: static; margin: 0 0 10px; }
}
@media (max-width: 960px) {
  .cal { grid-template-columns: 1fr 1fr; }
  .cal-info { grid-column: 1 / -1; border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
  .cal > .cal-month { border-left: 0; }
  .cal-info p { display: none; }
}
@media (max-width: 720px) {
  .app-sheet { padding: calc(var(--frame) + 18px) calc(var(--frame) + 16px) calc(var(--frame) + 18px); }
  .app-top { grid-template-columns: auto 1fr auto; gap: 10px 14px; }
  .app-top .progress { grid-column: 1 / -1; grid-row: 2; }
  .app-top-right { gap: 12px; }
  .stage { padding-top: 26px; align-items: start; }
  .chips { grid-template-columns: 1fr; }
  .cal { grid-template-columns: 1fr; }
  .cal > * + * { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.28); }
  .cal > * { padding: 20px 16px; }
  .slot-list { max-height: none; }
  .tb-head { grid-template-columns: 1fr 1fr; }
  .tb-head > div:nth-child(3) { border-left: 0; }
  .tb-head > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .tb-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .tb-row dt { grid-column: 1; }
  .tb-row dd { grid-column: 1 / -1; grid-row: 2; }
  .tb-row .edit { grid-column: 2; grid-row: 1; }
  .next-steps { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; text-align: center; }
  .ticket .t-date { grid-row: auto; border-right: 0; padding: 0 0 12px; border-bottom: 1px dashed var(--line-soft); }
}

@media (prefers-reduced-motion: reduce) {
  .q-body { transition: none; }
  .caret { animation: none; }
}

.api-error { margin:22px 0; border:1px solid currentColor; padding:16px; font-size:14px; }
.api-error .home-link { display:block; margin-top:12px; }
.reference { font-size:12px; overflow-wrap:anywhere; margin:16px 0; }
.screen.brief { max-width:850px; }
.btn:disabled { opacity:.6; cursor:wait; }
@media(max-width:600px) { .tb-row { grid-template-columns:90px minmax(0,1fr) auto; } .q-actions .btn { white-space:normal; text-align:left; } }
