/**
 * 「물어보기」 /search v1 (F-UX-982) — a STATIC ASSET linked from the (redef) /search page only, on top of
 * `redef-v1.css` (tokens = common-frame §6.7). Px = search-page (a)–(l) and search 7판: box 1080 × 48; page beneath
 * 48 px down / 40 % on focus; door rows ≤ 6 × 44; answer block sunken paper with 1-px rules; headline serif 20/30 600;
 * sentences 17/27; thread + receipt 13/18; nav doors 14.5 accent 700; cards 3 across, 24-px gutters, 28 px below the
 * block. Motion = (i): flight 220 ms, leave 160 ms, close ranks 240 ms, ink-in 240 ms. Phone (≤ 480) = row 224 / B3.
 */

[data-redef="v1"] .rd-nw { white-space: nowrap; }
[data-redef="v1"] .rd-phone-only { display: none; }
[data-redef="v1"] .rd-door { color: var(--accent); font-weight: 700; font-size: 14.5px; white-space: nowrap; }

/* ── The box ───────────────────────────────────────────────────────────────────────────────────────────────── */
[data-redef="v1"] .rd-ask { position: relative; padding-top: 24px; }
[data-redef="v1"] .rd-ask__box {
  display: block; width: 100%; max-width: 1080px; height: 48px; padding: 0 18px; border: 1.5px solid var(--ink);
  border-radius: var(--radius-box); background: var(--surface); color: var(--ink); font: inherit; font-size: 17px;
}
[data-redef="v1"] .rd-ask__box::placeholder { color: var(--muted); }
[data-redef="v1"] .rd-ask__ex { margin: 8px 0 0 2px; font-size: 13px; color: var(--muted); }
[data-redef="v1"] .rd-ask__ex a { color: var(--muted); }
[data-redef="v1"] .rd-ask__rows { margin-top: 4px; border: 1px solid var(--line); border-radius: var(--radius-box); background: var(--surface); }
[data-redef="v1"] .rd-row {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-top: 1px solid var(--line); font-size: 15px;
}
[data-redef="v1"] .rd-row:first-child { border-top: 0; }
[data-redef="v1"] .rd-row b { font-weight: 700; }
[data-redef="v1"] .rd-row__k { color: var(--muted); font-size: 13.5px; }

/* ── The page beneath (focus: 48 px down, 40 %) ─────────────────────────────────────────────────────────────── */
[data-redef="v1"] .rd-ask__beneath { margin-top: 28px; transition: transform 240ms cubic-bezier(.22,.61,.36,1), opacity 240ms; }
[data-redef="v1"] .rd-ask[data-state="focus"] .rd-ask__beneath,
[data-redef="v1"] .rd-ask[data-state="typing"] .rd-ask__beneath { transform: translateY(48px); opacity: 0.4; cursor: default; }

/* ── ② 동네 doors · ③ 전국 다음 기일 ─────────────────────────────────────────────────────────────────────────── */
[data-redef="v1"] .rd-dd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
[data-redef="v1"] .rd-dd__door {
  display: flex; align-items: center; height: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font-size: 15px; font-weight: 600;
}
[data-redef="v1"] .rd-days { margin-top: 32px; }
[data-redef="v1"] .rd-days__t { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
[data-redef="v1"] .rd-day {
  display: flex; align-items: baseline; gap: 16px; height: 44px; padding: 12px 4px 0; border-top: 1px solid var(--line); font-size: 15px;
}
[data-redef="v1"] .rd-day b { width: 120px; font-weight: 600; }
[data-redef="v1"] .rd-day span { color: var(--ink-2); }
[data-redef="v1"] .rd-days__fold summary { height: 44px; padding: 12px 4px 0; border-top: 1px solid var(--line); color: var(--ink-2); list-style: none; cursor: pointer; }
[data-redef="v1"] .rd-days__fold summary::-webkit-details-marker { display: none; }

/* ── The answer block ──────────────────────────────────────────────────────────────────────────────────────── */
[data-redef="v1"] .rd-ab {
  max-width: 1080px; padding: 20px 24px 14px; background: var(--sunken); border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
[data-redef="v1"] .rd-ab__re { font-size: 13px; line-height: 18px; color: var(--ink-2); margin-bottom: 6px; }
[data-redef="v1"] .rd-ab__thread { font-size: 13px; line-height: 18px; color: var(--muted); margin-bottom: 4px; }
[data-redef="v1"] .rd-ab__head {
  margin: 0 0 10px; font: 600 20px/30px "Noto Serif KR", "Nanum Myeongjo", serif; color: var(--ink);
}
[data-redef="v1"] .rd-ab__head[data-fly="1"] { animation: rd-fly 220ms cubic-bezier(.22,.61,.36,1); }
@keyframes rd-fly { from { transform: translateY(-64px); font-size: 17px; opacity: 0.6; } to { transform: none; } }
[data-redef="v1"] .rd-ab__sen { font-size: 17px; line-height: 27px; color: var(--ink); margin: 0 0 6px; animation: rd-ink 240ms ease-out; }
@keyframes rd-ink { from { opacity: 0; } to { opacity: 1; } }
[data-redef="v1"] .rd-ab__reply { display: flex; flex-wrap: wrap; gap: 20px; margin: 2px 0 8px; }
[data-redef="v1"] .rd-ab__rows { margin: 4px 0 8px; border: 1px solid var(--line); border-radius: var(--radius-box); background: var(--surface); }
[data-redef="v1"] .rd-ab__ph { display: block; height: 12px; margin: 10px 0; border-radius: 6px; background: var(--line); opacity: 0.6; }
[data-redef="v1"] .rd-ab__ph--b { width: 62%; }
/* two speeds: fixed slot heights while pending and after it settles (ink slot = the last sentence, 2 × 33, ask-back 33 + 38, receipt 2 × 18) */
[data-redef="v1"] .rd-ab[data-reserve="1"] .rd-ab__ink { position: relative; min-height: 66px; }
/* while pending the ink sentence is laid out hidden (it sizes the slot) and the placeholders sit over it */
[data-redef="v1"] .rd-ab[data-pending="1"] .rd-ab__ink .rd-ab__sen { visibility: hidden; animation: none; }
[data-redef="v1"] .rd-ab[data-pending="1"] .rd-ab__sen--held { visibility: hidden; animation: none; }
[data-redef="v1"] .rd-ab__phs { position: absolute; top: 0; left: 0; right: 0; }
/* while pending the asking-back and the worst-case shown-back words are laid out hidden (they reserve their height) */
[data-redef="v1"] .rd-ab[data-pending="1"] .rd-ab__askslot > *, [data-redef="v1"] .rd-rc__held { visibility: hidden; }
[data-redef="v1"] .rd-ab[data-reserve="1"] .rd-ab__askslot { min-height: 71px; }
[data-redef="v1"] .rd-ab[data-reserve="1"] .rd-rc__line { min-height: 36px; }
[data-redef="v1"] .rd-ab[data-pending="1"] .rd-ab__ph { margin: 0 0 21px; height: 12px; }
[data-redef="v1"] .rd-ab__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
[data-redef="v1"] .rd-ab__reset { color: var(--accent); font-weight: 700; font-size: 14.5px; }
[data-redef="v1"] .rd-ab__doors { display: flex; gap: 20px; }

/* receipt line: 「적용 조건: 인천 × · 빌라 ×」 above a 1-px rule, 13/18 */
[data-redef="v1"] .rd-rc { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 13px; line-height: 18px; }
[data-redef="v1"] .rd-rc__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--ink-2); }
[data-redef="v1"] .rd-rc__lb { color: var(--muted); }
[data-redef="v1"] .rd-rc__cd { white-space: nowrap; color: var(--ink); font-weight: 600; }
[data-redef="v1"] .rd-rc__x { margin-left: 2px; padding: 0 4px; color: var(--muted); font-size: 14px; line-height: 18px; }
[data-redef="v1"] .rd-rc__sep { margin: 0 8px 0 0; color: var(--line-2); }
[data-redef="v1"] .rd-rc__dp { color: var(--muted); }
[data-redef="v1"] .rd-rc__w { color: var(--ink-2); }
[data-redef="v1"] .rd-rc__law { margin-top: 8px; }

/* statute line (words.md §Line fit): locator alone on line 1; paragraph; a real space, then the small source word */
[data-redef="v1"] .rd-lw { font-size: 13px; line-height: 18px; color: var(--ink-2); }
[data-redef="v1"] .rd-lw__loc { font-weight: 700; color: var(--ink); }
[data-redef="v1"] .rd-lw__badge { font-weight: 600; color: var(--accent); }
[data-redef="v1"] .rd-lw__text { white-space: pre-line; }
[data-redef="v1"] .rd-lw__src { font-size: 11.5px; color: var(--muted); }
[data-redef="v1"] .rd-lw__ed, [data-redef="v1"] .rd-lw__std, [data-redef="v1"] .rd-lw__nh, [data-redef="v1"] .rd-lw__ax { margin-top: 4px; color: var(--muted); }
[data-redef="v1"] .rd-lw__door summary { list-style: none; cursor: pointer; margin-top: 4px; font-size: 13px; }
[data-redef="v1"] .rd-lw__door summary::-webkit-details-marker { display: none; }
[data-redef="v1"] .rd-lw__door[open] summary { display: none; }
[data-redef="v1"] .rd-lw--quote { font-size: 15px; line-height: 24px; margin: 4px 0 8px; }
[data-redef="v1"] .rd-lw--quote .rd-lw__text { margin-top: 4px; color: var(--ink); }

/* ── Group head + cards (3 across, 24-px gutters) ─────────────────────────────────────────────────────────── */
[data-redef="v1"] .rd-gh { display: flex; align-items: baseline; gap: 12px; margin: 28px 0 12px; }
[data-redef="v1"] .rd-gh__h { margin: 0; font-size: 17px; font-weight: 700; }
[data-redef="v1"] .rd-gh__o { font-size: 13px; color: var(--muted); }
[data-redef="v1"] .rd-gh__all { margin-left: auto; }
[data-redef="v1"] .rd-sc__grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 24px; }
[data-redef="v1"] .rd-sc__ghost { position: absolute; pointer-events: none; animation: rd-leave 160ms ease-in forwards; }
@keyframes rd-leave { to { opacity: 0; } }
[data-redef="v1"] .rd-ask__closing { margin: 8px 0 0; font-size: 15px; line-height: 24px; color: var(--ink-2); }

@media (max-width: 1100px) {
  [data-redef="v1"] .rd-sc__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Phone (≤ 480): row 224 / B3 ──────────────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  [data-redef="v1"] .rd-pc-only { display: none; }
  [data-redef="v1"] .rd-phone-only { display: initial; }
  [data-redef="v1"] .rd-days__ph.rd-phone-only { display: block; }
  [data-redef="v1"] .rd-ask { padding: 12px 16px 48px; }
  [data-redef="v1"] .rd-ask__box { height: 44px; font-size: 16px; padding: 0 14px; }
  [data-redef="v1"] .rd-dd { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  [data-redef="v1"] .rd-dd__door {
    flex: none; height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; white-space: nowrap;
  }
  [data-redef="v1"] .rd-ab { margin: 0 -16px; padding: 16px; }
  [data-redef="v1"] .rd-ab__sen { font-size: 16px; line-height: 25px; }
  /* two speeds on the phone: the reply doors wrap to two rows, the receipt chips to two lines with the 4-px row gap */
  [data-redef="v1"] .rd-ab[data-reserve="1"] .rd-ab__askslot { min-height: 95px; }
  [data-redef="v1"] .rd-ab[data-reserve="1"] .rd-rc__line { min-height: 41px; }
  [data-redef="v1"] .rd-lw__door summary { display: inline; }
  [data-redef="v1"] .rd-sc__grid { grid-template-columns: 1fr; gap: 12px; }
}
