/* Replication assistant page. Uses the tokens from styles.css. */
.rp [hidden], .rp-dialog [hidden] { display: none !important; }
.rp { min-height: calc(100vh - 60px); display: flex; flex-direction: column; }
.rp-sr, .rp-offscreen { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rp-land, .rp-thread, .rp-dock-in { width: min(900px, 100% - 2.5rem); margin-inline: auto; }
body:has(.rp.is-chat) .foot { display: none; }

/* context bar */
.rp-bar { position: sticky; top: 60px; z-index: 20; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.rp-bar-in { display: flex; align-items: center; gap: 0.75rem 1.25rem; min-height: 52px; flex-wrap: wrap; padding: 0.25rem 0; }
.rp-back { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; font-size: var(--text-sm); font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.rp-back:hover { color: var(--accent-ink); }
.rp-reset { margin-left: auto; min-height: 44px; padding: 0 0.6rem; border: 0; background: none; font-size: var(--text-sm); font-weight: 500; color: var(--ink-3); border-radius: var(--r-sm); white-space: nowrap; }
.rp-reset:hover { color: var(--accent-ink); background: var(--accent-tint); }
.rp-steps { display: flex; gap: 0.35rem; margin: 0 auto; padding: 0; list-style: none; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rp-steps::-webkit-scrollbar { display: none; }
.rp-step { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0 0.7rem 0 0.4rem; border: 1px solid transparent; border-radius: 999px; background: none; font-size: var(--text-xs); font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.rp-step:hover { background: var(--accent-tint); color: var(--accent-ink); }
.rp-step-n { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-3); flex: none; }
.rp-step.cur { color: var(--ink); font-weight: 700; border-color: var(--line-2); }
.rp-step.cur .rp-step-n { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-ink); }
.rp-step.done { color: var(--ink); }
.rp-step.done .rp-step-n { background: var(--accent); box-shadow: none; color: #fff; }

/* landing */
.rp-land { padding: clamp(2rem, 6vh, 4.5rem) 0 1.25rem; }
.rp-h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem); letter-spacing: -0.035em; line-height: 1; margin-top: 0.6rem; }
.rp-h1 em { font-style: normal; color: var(--accent); }
.rp-sub { margin-top: 0.9rem; font-size: var(--text-base); color: var(--ink-2); max-width: 64ch; }
.rp-ctx { display: flex; align-items: center; gap: 0.9rem; margin-top: 1.4rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.rp-ctx img { width: 96px; height: 60px; object-fit: cover; object-position: top; border-radius: var(--r-sm); border: 1px solid var(--line); flex: none; background: #fff; }
.rp-ctx > div { min-width: 0; display: grid; gap: 0.15rem; }
.rp-ctx strong { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: -0.01em; }
.rp-ctx-one { font-size: var(--text-sm); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rp-facts { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; margin-top: 0.2rem; font-size: var(--text-xs); color: var(--ink-3); }
.rp-facts b { font-family: var(--font-mono); color: var(--accent-ink); font-weight: 600; }

/* composer */
.rp-dock { position: sticky; bottom: 0; z-index: 15; margin-top: auto; padding: 1.25rem 0 1rem; background: linear-gradient(to top, #fff 0, #fff 78%, rgba(255, 255, 255, 0)); }
.rp:not(.is-chat) .rp-dock { position: static; margin-top: 0; padding-top: 0.5rem; padding-bottom: 3.5rem; background: none; }
.rp-box { border: 1.5px solid var(--line-2); border-radius: 20px; background: #fff; box-shadow: var(--shadow-md); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.rp-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(21, 73, 230, 0.12), var(--shadow-md); }
.rp-input { display: block; width: 100%; min-height: 50px; max-height: 220px; resize: none; border: 0; outline: 0; background: none; padding: 1rem 1.15rem 0.4rem; font: inherit; font-size: var(--text-base); line-height: 1.5; color: var(--ink); border-radius: 20px 20px 0 0; }
.rp-input::placeholder { color: var(--ink-3); }
.rp-box-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.6rem 0.6rem 0.7rem; }
.rp-hint { margin-left: auto; font-size: var(--text-xs); color: var(--ink-3); }
.rp-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--accent); color: #fff; display: inline-grid; place-items: center; transition: background 0.15s ease, transform 0.15s ease; }
.rp-send:hover { background: var(--accent-ink); }
.rp-send:active { transform: translateY(1px); }
.rp-stop { background: var(--ink); }
.rp-stop:hover { background: var(--ink-2); }
.rp-model-wrap { position: relative; min-width: 0; }
.rp-model { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.75rem; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font-size: var(--text-sm); font-weight: 500; color: var(--ink); max-width: 100%; white-space: nowrap; }
.rp-model:hover, .rp-model[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-ink); }
.rp-model-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; display: inline-block; }
.rp-menu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 40; width: min(340px, calc(100vw - 2.5rem)); max-height: min(420px, 60vh); overflow: auto; padding: 0.35rem; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-lg); }
.rp-opt { display: grid; gap: 0.05rem; width: 100%; text-align: left; padding: 0.55rem 0.7rem; min-height: 48px; border: 0; background: none; border-radius: var(--r-md); }
.rp-opt:hover { background: var(--accent-tint); }
.rp-opt[aria-selected="true"] { background: var(--accent-tint); box-shadow: inset 2px 0 0 var(--accent); }
.rp-opt-l { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; font-size: var(--text-sm); }
.rp-opt-l i { font-style: normal; font-size: var(--text-xs); color: var(--ink-3); }
.rp-opt-n { font-size: var(--text-xs); color: var(--ink-3); }
.rp-quick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.rp-chip { min-height: 40px; padding: 0 0.9rem; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font-size: var(--text-sm); font-weight: 500; color: var(--ink-2); text-align: left; line-height: 1.25; }
.rp-chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-tint); }
.rp-chip-go { border-color: rgba(21, 73, 230, 0.45); color: var(--accent-ink); padding-block: 0.45rem; }
.rp-note { margin-top: 0.7rem; font-size: var(--text-xs); color: var(--ink-3); max-width: 80ch; }
.rp-ai-notice { margin-top: 0.6rem; font-size: var(--text-sm); color: var(--ink-2); }
.rp.is-chat .rp-note { display: none; }

/* thread */
.rp-thread { display: grid; gap: 1.5rem; align-content: start; padding: 1.5rem 0 1rem; min-width: 0; }
.rp-thread:empty { display: none; }
.rp-msg { min-width: 0; }
.rp-user { display: flex; justify-content: flex-end; }
.rp-bubble { max-width: min(680px, 88%); padding: 0.75rem 1rem; border-radius: 18px 18px 4px 18px; background: var(--surface); border: 1px solid var(--line); font-size: var(--text-base); white-space: pre-wrap; overflow-wrap: anywhere; }
.rp-who { display: flex; align-items: center; gap: 0.5rem; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.5rem; }
.rp-body { display: grid; gap: 0.9rem; min-width: 0; }
.rp-seg { min-width: 0; }
.rp-seg-text { font-size: var(--text-base); line-height: 1.62; color: var(--ink); overflow-wrap: anywhere; }
.rp-seg-text > * + * { margin-top: 0.7rem; }
.rp-seg-text h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; line-height: 1.15; margin-top: 1.3rem; }
.rp-seg-text h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.2; margin-top: 1.1rem; }
.rp-seg-text h4 { font-size: var(--text-base); font-weight: 700; margin-top: 1rem; }
.rp-seg-text > :first-child { margin-top: 0; }
.rp-seg-text ul, .rp-seg-text ol { padding-left: 1.35rem; display: grid; gap: 0.35rem; }
.rp-seg-text ul { list-style: disc; }
.rp-seg-text ol { list-style: decimal; }
.rp-seg-text li > ul, .rp-seg-text li > ol { margin-top: 0.35rem; }
.rp-seg-text li::marker { color: var(--accent); font-weight: 700; }
.rp-seg-text a, .rp-pfoot a, .rp-howl a, .rp-mres a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.rp-seg-text code, .rp-howl code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.05rem 0.3rem; overflow-wrap: anywhere; }
.rp-seg-text pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.8rem 1rem; overflow: auto; }
.rp-seg-text pre code { background: none; border: 0; padding: 0; font-size: 0.85rem; }
.rp-seg-text blockquote { margin: 0; padding: 0.1rem 0 0.1rem 0.9rem; border-left: 3px solid var(--accent); color: var(--ink-2); }
.rp-seg-text hr { border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0; }
.rp-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.rp-tablewrap table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
.rp-tablewrap th, .rp-tablewrap td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.rp-tablewrap th { background: var(--surface); font-weight: 700; }
.rp-tablewrap td, .rp-tablewrap th { font-family: var(--font-body); font-size: var(--text-sm); letter-spacing: 0; text-transform: none; color: var(--ink); }
.rp-tablewrap tr:last-child td { border-bottom: 0; }
.rp-next { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rp-stopped { font-size: var(--text-xs); color: var(--ink-3); margin-top: 0.5rem; }
.rp-typing { display: inline-flex; gap: 5px; padding: 0.4rem 0; }
.rp-typing.late { padding-top: 0.9rem; }
.rp-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.3; animation: rp-blink 1.1s infinite ease-in-out; }
.rp-typing i:nth-child(2) { animation-delay: 0.18s; }
.rp-typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes rp-blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.rp-err { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1.1rem; border: 1.5px solid var(--ink); border-radius: var(--r-lg); font-size: var(--text-sm); }
.rp-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(21, 73, 230, 0.25); border-top-color: var(--accent); display: inline-block; flex: none; animation: rp-rot 0.8s linear infinite; }
@keyframes rp-rot { to { transform: rotate(360deg); } }

/* panels */
.rp.is-chat .rp-input { padding-bottom: 0.2rem; }
.rp-panel { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-sm); padding: 1.1rem 1.2rem 1.2rem; min-width: 0; scroll-margin-top: 130px; }
.rp-prog { display: flex; align-items: center; gap: 0.7rem; font-size: var(--text-sm); color: var(--ink-2); background: var(--surface); }
.rp-phead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.6rem 1rem; margin-bottom: 0.9rem; }
.rp-phead h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.015em; line-height: 1.2; }
.rp-psub { font-size: var(--text-sm); color: var(--ink-3); margin-top: 0.15rem; max-width: 60ch; }
.rp-pact { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.rp-pfoot { font-size: var(--text-xs); color: var(--ink-3); margin-top: 0.8rem; max-width: 80ch; }
.rp-prow { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.rp-text { min-height: 44px; width: 100%; min-width: 0; padding: 0.55rem 0.8rem; border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff; font: inherit; font-size: var(--text-sm); color: var(--ink); }
.rp-text:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.rp-select { min-height: 44px; max-width: 100%; padding: 0 2rem 0 0.75rem; border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff; font: inherit; font-size: var(--text-sm); color: var(--ink); }
.rp-own { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.rp-own .btn, .rp-own .btn-rep { flex: none; }
.rp-btn-solid { min-height: 44px; font-size: var(--text-sm); padding: 0 1.2rem; border: 0; }
.rp-btn-solid:disabled, .rp-panel .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* domains */
.rp-dlist { display: grid; border-top: 1px solid var(--line); }
.rp-drow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.rp-dname { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 500; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.rp-dstat { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--text-xs); font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 5px; background: rgba(10, 20, 50, 0.07); color: var(--ink-2); white-space: nowrap; }
.rp-drow.is-available .rp-dstat { background: var(--accent-tint); color: var(--accent-ink); }
.rp-drow.is-available .rp-dstat::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.rp-drow.is-maybe .rp-dstat { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }
.rp-drow.is-taken .rp-dname { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(10, 20, 50, 0.35); }
.rp-drow.is-wait .rp-dstat { background: none; color: var(--ink-3); font-weight: 500; }
.rp-drow.is-picked { background: var(--accent-tint); box-shadow: -0.6rem 0 0 var(--accent-tint), 0.6rem 0 0 var(--accent-tint); }
.rp-dact { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem; }
.rp-use { min-height: 40px; padding: 0 0.9rem; border: 1.5px solid var(--accent); border-radius: var(--r-md); background: #fff; color: var(--accent-ink); font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.rp-use:hover { background: var(--accent-tint); }
.rp-drow.is-picked .rp-use { background: var(--accent); color: #fff; }
.rp-buy { display: inline-flex; align-items: center; min-height: 40px; font-size: var(--text-sm); font-weight: 500; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.rp-buy-alt { color: var(--ink-3); font-size: var(--text-xs); }


.rp-taken { margin-top: 0.75rem; font-size: var(--text-xs); color: var(--ink-3); font-family: var(--font-mono); letter-spacing: -0.02em; line-height: 1.7; overflow-wrap: anywhere; }
.rp-taken b { font-family: var(--font-body); letter-spacing: 0; color: var(--ink-2); }
.rp-dnone { font-size: var(--text-sm); color: var(--ink-2); }

/* site preview */
.rp-stage { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.rp-frame { display: block; width: 100%; height: 600px; border: 0; background: #fff; margin: 0 auto; }
.rp-stage.is-mobile .rp-frame { width: min(390px, 100%); box-shadow: 0 0 0 1px var(--line); }
.rp-segc { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff; }
.rp-segb { min-height: 38px; padding: 0 0.8rem; border: 0; background: none; border-radius: 7px; font-size: var(--text-sm); font-weight: 500; color: var(--ink-2); }
.rp-segb.on { background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; }
.rp-golive { margin-top: 1rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.rp-golive h4 { font-family: var(--font-display); font-size: var(--text-base); }
.rp-golive ol { list-style: decimal; padding-inline-start: 1.25rem; margin: 0.4rem 0 0.75rem; display: grid; gap: 0.25rem; font-size: var(--text-sm); color: var(--ink-2); }
.rp-golive li::marker { color: var(--accent-ink); font-weight: 700; }
.rp-golive p { margin-top: 0.5rem; font-size: var(--text-xs); color: var(--ink-3); }

/* ads */
.rp-adgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.rp-ad { min-width: 0; display: flex; flex-direction: column; }
.rp-adangle { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 0.5rem; }
.rp-admock { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; flex: 1; display: flex; flex-direction: column; }
.rp-adtop { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.8rem 0.4rem; }
.rp-adav { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 800; flex: none; }
.rp-adtop b { display: block; font-size: var(--text-sm); line-height: 1.2; }
.rp-adtop i, .rp-adbot i { display: block; font-style: normal; font-size: var(--text-xs); color: var(--ink-3); }
.rp-adtext { padding: 0.2rem 0.8rem 0.7rem; font-size: 0.9rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.rp-admedia { margin-top: auto; background: var(--surface); border-block: 1px solid var(--line); }
.rp-admedia img { width: 100%; height: auto; }
.rp-adph { aspect-ratio: 1 / 1; display: grid; place-content: center; justify-items: center; gap: 0.6rem; padding: 1rem; text-align: center; font-size: var(--text-xs); color: var(--ink-3); background: repeating-linear-gradient(135deg, rgba(21, 73, 230, 0.05) 0 12px, transparent 12px 24px); }
.rp-admedia.is-err .rp-adph { color: var(--ink); font-weight: 500; }
.rp-adbot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.65rem 0.8rem; background: var(--surface); }
.rp-adbot b { display: block; font-size: var(--text-sm); line-height: 1.25; overflow-wrap: anywhere; }
.rp-adcta { flex: none; padding: 0.4rem 0.75rem; border-radius: 6px; background: rgba(10, 20, 50, 0.09); font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.rp-addet { margin-top: 0.6rem; font-size: var(--text-sm); }
.rp-addet summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 0.4rem; color: var(--ink-2); font-weight: 500; list-style: none; }
.rp-addet summary::-webkit-details-marker { display: none; }
.rp-addet summary::before { content: '+'; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 0.8rem; line-height: 1; color: var(--accent-ink); }
.rp-addet[open] summary::before { content: '\2212'; }
.rp-prompt { resize: vertical; line-height: 1.45; font-size: var(--text-xs); }

/* meta */
.rp-how { margin: 0 0 0.4rem; padding: 0.2rem 0.9rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.rp-how[open] { padding-bottom: 0.9rem; }
.rp-howl { list-style: decimal; padding-left: 1.3rem; display: grid; gap: 0.4rem; font-size: var(--text-sm); color: var(--ink-2); }
.rp-howl li::marker { color: var(--accent); font-weight: 700; }
.rp-mstat { font-size: var(--text-sm); margin-top: 0.7rem; color: var(--ink-2); overflow-wrap: anywhere; }
.rp-mstat:empty { display: none; }
.rp-mstat.is-ok { color: var(--accent-ink); font-weight: 700; }
.rp-mstat.is-err { color: var(--ink); font-weight: 500; padding: 0.6rem 0.8rem; border: 1.5px solid var(--ink); border-radius: var(--r-md); }
.rp-mbody { display: grid; gap: 1rem; margin-top: 1rem; }
.rp-mstep { padding-top: 1rem; border-top: 1px solid var(--line); }
.rp-mstep h4 { font-size: var(--text-base); font-weight: 700; margin-bottom: 0.5rem; }
.rp-lab { display: grid; gap: 0.3rem; font-size: var(--text-xs); font-weight: 700; color: var(--ink-2); margin-top: 0.7rem; max-width: 520px; }
.rp-lab .rp-select { width: 100%; }
.rp-mres { display: grid; gap: 0.3rem; margin-top: 0.7rem; font-size: var(--text-sm); }
.rp-mres .is-ok { color: var(--accent-ink); }
.rp-mres .is-err { color: var(--ink); font-weight: 500; }
.rp-mres:empty { display: none; }

/* dialogs and toast */
.rp-dialog { padding: 0; border: 0; border-radius: var(--r-lg); background: #fff; color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
.rp-dialog[open] { display: flex; flex-direction: column; }
.rp-dialog::backdrop { background: rgba(10, 15, 30, 0.55); backdrop-filter: blur(3px); }
.rp-dbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.8rem 0.6rem 1.1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rp-dbtns { display: flex; align-items: center; gap: 0.5rem; }
.rp-dfull { width: 96vw; max-width: 1400px; height: 92vh; max-height: 92vh; }
.rp-stage-full { flex: 1; min-height: 0; border: 0; border-radius: 0; }
.rp-stage-full .rp-frame { height: 100%; }
.rp-dcode { width: min(900px, 96vw); height: min(640px, 88vh); }
.rp-code { flex: 1; min-height: 0; width: 100%; border: 0; outline: 0; resize: none; padding: 1rem 1.1rem; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.5; color: var(--ink); background: var(--surface); white-space: pre; }
.rp-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 20px); z-index: 200; max-width: calc(100vw - 2rem); padding: 0.65rem 1rem; border-radius: var(--r-md); background: var(--ink); color: #fff; font-size: var(--text-sm); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; }
.rp-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .rp-land, .rp-thread, .rp-dock-in { width: calc(100% - 2rem); }
  .rp-bar-in { gap: 0 0.5rem; }
  .rp-steps { order: 3; width: 100%; margin: 0 0 0.3rem; }
  .rp-hint { display: none; }
  .rp-send { margin-left: auto; }
  .rp-bubble { max-width: 94%; }
  .rp-panel { padding: 0.95rem 0.9rem 1rem; }
  .rp-frame { height: 520px; }
  .rp-dact { margin-left: 0; width: 100%; }
  .rp-buy-alt { display: none; }
  .rp-own { flex-wrap: wrap; }
  .rp-own .btn, .rp-own .btn-rep { width: 100%; }
  .rp-pact { width: 100%; }
  .rp-dock { padding-bottom: 0.75rem; }
  .rp-bar { position: static; }
  .rp.is-chat .rp-input { padding-top: 0.8rem; }
  .rp-ctx { align-items: flex-start; }
  .rp-ctx img { width: 72px; height: 46px; }
}

/* reference fidelity: original ad under each variant, page image status */
.rp-adref { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.6rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; text-decoration: none; min-height: 44px; }
.rp-adref:hover { border-color: var(--accent); }
.rp-adref img { flex: none; width: 56px; height: 70px; object-fit: cover; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.rp-adref span { min-width: 0; }
.rp-adref b { display: block; font-size: var(--text-sm); line-height: 1.25; }
.rp-adref i { display: block; font-style: normal; font-size: var(--text-xs); color: var(--ink-3); margin-top: 2px; }
.rp-imgrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.75rem; }
.rp-imgrow:has(.rp-imgstat[hidden]) { display: none; }
.rp-imgstat { font-size: var(--text-sm); color: var(--ink-2); display: flex; align-items: center; gap: 0.5rem; }
.rp-imgstat.is-busy::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-tint, #eaf0ff); border-top-color: var(--accent); animation: rp-rot 0.8s linear infinite; }
