.rb { padding: 22px 0 10px; }
.rb [hidden] { display: none !important; }
.rb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rb input[type=text], .rb input[type=email], .rb input[type=tel], .rb select, .rb textarea { width: 100%; font: inherit; font-size: 15px; border: 1px solid #ddd6cb; border-radius: 10px; padding: 8px 10px; background: var(--card); color: var(--text); min-height: 42px; box-sizing: border-box; }
.rb textarea { min-height: 64px; resize: vertical; line-height: 1.45; }
.rb input:focus, .rb select:focus, .rb textarea:focus { outline: 3px solid rgba(245, 158, 11, .35); border-color: var(--gold); }
.rb input[type=checkbox] { width: 18px; height: 18px; accent-color: #d97706; margin: 0; flex: none; }
.rb input[type=range] { width: 100%; accent-color: #d97706; }
.rb input[type=color] { width: 40px; height: 30px; border: 1px solid #ddd6cb; border-radius: 8px; padding: 2px; background: var(--card); cursor: pointer; }
.rb-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rb-sp { flex: 1; }
.rb-link { font: inherit; font-size: 13.5px; border: 0; background: none; color: var(--gold-text); font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.rb-link:disabled { opacity: .35; cursor: default; }
.rb-del { color: #b42318; }
.rb-hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }
.rb-msg { min-height: 22px; font-size: 14px; font-weight: 700; color: #15803d; margin: 10px 0 4px; }
.rb-msg.rb-err { color: #b42318; } .rb-msg.rb-warn { color: #b45309; } .rb-msg.rb-stay { color: var(--muted); }

/* steps */
.rb-steps { display: flex; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; margin-bottom: 14px; }
.rb-steps button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; padding: 12px 10px; font: inherit; font-weight: 800; font-size: 14.5px; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.rb-steps i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.rb-steps .on { color: var(--text); border-bottom-color: var(--gold); }
.rb-steps .on i { background: var(--gold); border-color: var(--gold); color: #1f1d1a; }

.rb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 20px; align-items: start; }
.rb-left { min-width: 0; }
.rb-right { position: sticky; top: 10px; max-height: calc(100vh - 20px); overflow: auto; background: #ebe7e0; border-radius: 16px; padding: 12px; }
:root[data-theme="dark"] .rb-right { background: #2a2723; }
.rb-pvbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; }
.rb-pvbar span { color: var(--muted); font-weight: 700; font-size: 13px; }
.rb-pvbar .rb-warnc { color: #b45309; }
.rb-pages { display: flex; flex-direction: column; gap: 14px; }
.rb-pg { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 6px 22px rgba(0, 0, 0, .16); border-radius: 2px; }
.rb-note { font-size: 12.5px; color: var(--muted); margin: 10px 2px 0; text-align: center; }

/* editor */
.rb-start { background: var(--gold-soft); border: 1px solid var(--feat-line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.rb-start > label { display: block; font-size: 12.5px; font-weight: 800; color: var(--gold-text); margin-bottom: 6px; }
.rb-start select { width: auto; flex: 1 1 200px; }
.rb-card, .rb-sec, .rb-box { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 14px; margin-bottom: 12px; }
.rb-card h2 { font-size: 16px; margin: 0 0 12px; }
.rb-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rb-g2 > * { min-width: 0; }
.rb-f { min-width: 0; }
.rb-f > label { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.rb-f > label output { margin-left: auto; color: var(--text); }
.rb-f small { display: block; font-size: 12px; color: var(--gold-text); font-weight: 600; margin-top: 4px; }
.rb-w { grid-column: 1 / -1; }
.rb-photo { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.rb-photo img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.rb-crop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.rb-crop label.rb-off { opacity: .45; }
.rb-crop input:disabled { cursor: not-allowed; }
.rb-crophint { grid-column: 1 / -1; margin: -2px 0 0; font-size: 12px; font-weight: 600; color: var(--gold-text); }
.rb-crophint:empty { display: none; }
.rb-more { display: block; margin: 12px 0 8px; text-decoration: none; font-size: 13px; text-align: left; line-height: 1.4; }
.rb-exnote { margin: 10px 0 0; font-size: 13.5px; color: var(--gold-text); font-weight: 600; line-height: 1.45; }
.rb-count { font-size: 12.5px; color: var(--muted); font-weight: 700; }
#rbSummary .rb-row { margin-top: 8px; align-items: flex-end; }
#rbSummary .rb-row .rb-f { flex: 0 1 220px; }

.rb-sec { padding: 0; }
.rb-sec.rb-over { outline: 2px dashed var(--gold); }
.rb-sec.rb-hidden .rb-stitle { opacity: .45; text-decoration: line-through; }
.rb-shead { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 6px; }
.rb-handle { cursor: grab; color: #b8b1a6; font-size: 18px; padding: 4px 6px; user-select: none; }
.rb-stitle { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; font-weight: 800; font-size: 15px; color: var(--text); cursor: pointer; text-align: left; padding: 8px 4px; min-width: 0; }
.rb-stt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-ic { font-size: 16px; }
.rb-n { margin-left: auto; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.rb-ib { border: 1px solid transparent; background: none; color: var(--muted); border-radius: 8px; width: 30px; height: 30px; font-size: 14px; cursor: pointer; flex: none; }
.rb-ib:hover { border-color: var(--line); background: var(--soft); }
.rb-ib:disabled { opacity: .3; cursor: default; }
.rb-sbody { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.rb-item { border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.rb-item.rb-open { background: var(--card); box-shadow: 0 4px 14px rgba(0, 0, 0, .05); }
.rb-ihead { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--text); padding: 10px 12px; cursor: pointer; text-align: left; }
.rb-isum { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-chev { color: var(--muted); }
.rb-ibody { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.rb-ym { display: flex; gap: 6px; }
.rb-ym select { flex: 1.3; min-width: 0; padding-left: 6px; }
.rb-ym input { flex: 1; min-width: 0; }
.rb-off { opacity: .4; pointer-events: none; }
.rb-cur { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; margin-top: 6px; }
.rb-iacts { display: flex; gap: 14px; align-items: center; }
.rb-add { border: 2px dashed #d8d1c4; background: none; border-radius: 12px; padding: 10px; font: inherit; font-weight: 800; font-size: 14px; color: var(--gold-text); cursor: pointer; }
.rb-add:hover { border-color: var(--gold); background: var(--gold-soft); }
.rb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-chip { border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text); cursor: pointer; }
.rb-chip:hover { border-color: var(--gold); }
.rb-strength .rb-row { flex-wrap: nowrap; }
.rb-meter { flex: 1; height: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.rb-meter i { display: block; height: 100%; width: 0; transition: width .3s; border-radius: 6px; }
.rb-meter i.rb-low { background: #ef4444; } .rb-meter i.rb-ok { background: #f59e0b; } .rb-meter i.rb-good { background: #16a34a; }
.rb-tips { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.rb-next { margin-top: 10px; }

/* design step */
.rb-box h3 { font-size: 15px; margin: 0 0 10px; }
.rb-box h3 small { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.rb-tgroup { margin-bottom: 12px; }
.rb-tgroup > b { display: block; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.rb-tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rb-tpl { border: 2px solid var(--line); background: var(--soft); border-radius: 10px; padding: 6px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; color: var(--text); display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.rb-tpl canvas { width: 100%; height: auto; background: #fff; border-radius: 3px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.rb-tpl.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); }
.rb-sws { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rb-sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #c9c2b6; cursor: pointer; padding: 0; }
.rb-sw.on { box-shadow: 0 0 0 3px var(--gold); }
.rb-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-left: 6px; }
.rb-colrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.rb-colrow:last-child { border-bottom: 0; }
.rb-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; flex: none; }
.rb-seg button { border: 0; background: var(--card); padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.rb-seg button.on { background: #1f1d1a; color: #fff; }

/* download step */
.rb-dl { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.rb-dl .btn { margin: 0 !important; }
.rb-checks { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13.5px; line-height: 1.7; }
.rb-checks .rb-warn { color: #b45309; font-weight: 700; } .rb-checks .rb-okc { color: #15803d; font-weight: 700; }

/* phone preview */
.rb-fab { display: none; }
.rb-pv { position: fixed; inset: 0; z-index: 90; background: #ebe7e0; display: flex; flex-direction: column; }
:root[data-theme="dark"] .rb-pv { background: #1f1d1a; }
.rb-pvhead { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.rb-pvbody { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.rb-x { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 9px; width: 36px; height: 36px; font-size: 20px; cursor: pointer; }
body.rb-noscroll { overflow: hidden; }

@media (max-width: 980px) {
  .rb-grid { grid-template-columns: minmax(0, 1fr); }
  .rb-right { display: none; }
  .rb-fab { display: flex; position: fixed; right: 14px; bottom: 14px; z-index: 60; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 12px 18px; background: #1f1d1a; color: #fff; font: inherit; font-weight: 800; font-size: 14.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); cursor: pointer; }
}
@media (max-width: 560px) {
  .rb-g2 { grid-template-columns: 1fr; }
  .rb-crop { grid-template-columns: 1fr; }
  .rb-tpls { grid-template-columns: repeat(2, 1fr); }
  .rb-steps button { font-size: 12.5px; padding: 10px 4px; gap: 5px; }
  .rb-ib { width: 28px; }
}
