/* page-shell — detail screen frame: page head, summary bar, review states. Shared by 02~06. */
.screen main {
  min-height:calc(100svh - var(--header-height));
  display:flex;
  flex-direction:column;
}

.page-head {
  height:104px;
  padding:0 var(--gutter);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  border-bottom:1px solid #e5e5e5;
}

.page-head h1 {
  font-size:32px;
  line-height:1.25;
  font-weight:500;
  letter-spacing:-.03em;
}

.page-back {
  display:flex;
  align-items:baseline;
  gap:16px;
}

.page-back-icon {
  font-size:24px;
  transition:transform .2s;
}

.page-back:hover .page-back-icon,
.page-back:focus-visible .page-back-icon {
  transform:translateX(-4px);
}

.page-title .char {
  display:inline-block;
}

.page-step {
  font-size:12px;
  letter-spacing:.06em;
  color:#777;
}

/* Summary bar: states what the next step carries, so the step is never taken blind. */
.summary-bar {
  margin-top:auto;
  min-height:120px;
  padding:24px var(--gutter);
  border-top:1px solid #d9d9d9;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.summary-text {
  font-size:17px;
  line-height:1.7;
}

.summary-bar .button {
  min-width:240px;
}

.summary-bar .button:disabled {
  background:var(--gray);
  border-color:#c9c9c9;
}

/* Review states: published as static states; the screen never fails for real. */
.picker-state {
  display:none;
  flex-direction:column;
  align-items:flex-start;
  gap:24px;
  padding:64px 0;
  font-size:17px;
}

body[data-state=empty] .picker-state,
body[data-state=error] .picker-state {
  display:flex;
}

body[data-state=empty] .picker-gallery,
body[data-state=error] .picker-gallery,
body[data-state=empty] .picker-intro .persona-rail,
body[data-state=error] .picker-intro .persona-rail {
  display:none;
}

body[data-state=empty] .summary-bar .button,
body[data-state=error] .summary-bar .button {
  pointer-events:none;
  opacity:.4;
}

.picker-alert {
  margin-top:16px;
  padding:14px 16px;
  min-height:52px;
  border:1px solid #b42318;
  background:#fff4f2;
  color:#b42318;
  font-size:14px;
  line-height:1.6;
}

@media(max-width:760px) {
  .page-head {
    height:auto;
    padding:20px var(--gutter);
    align-items:flex-start;
    flex-direction:column;
    gap:8px;
  }

  .page-head h1 {
    font-size:24px;
  }

  .summary-bar {
    min-height:0;
    flex-direction:column;
    align-items:stretch;
    gap:16px;
  }

  .summary-bar .button {
    min-width:0;
    width:100%;
  }
}

/* Overlay head — shared by every screen panel (03A search, 04B persona swap). */
.search-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:28px;
}

.search-head h2 {
  font-size:24px;
  font-weight:500;
}

.search-head button {
  font-size:24px;
  line-height:1;
  width:32px;
  height:32px;
  flex-shrink:0;
  border:1px solid var(--ink);
}
