.rb { max-width: 1240px; margin-inline: auto; }
.rb-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 8px 0 16px; }
.rb-top .note { color: var(--muted); font-size: 13.5px; }
.rb-grid { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); gap: 22px; align-items: start; }
.rb-form { display: grid; gap: 14px; }
.rb-card { background: var(--glass-strong); border: 1px solid var(--edge); border-radius: 18px; padding: 16px 16px 14px; box-shadow: 0 10px 30px -22px rgba(40,30,130,.5); }
.rb-card h2 { font-size: 17px; margin: 0 0 10px; line-height: 1.2; }
.rb-f { display: block; margin: 0 0 10px; min-width: 0; flex: 1; }
.rb-f > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 3px; font-weight: 500; }
.rb input:not([type=radio]):not([type=color]), .rb textarea, .rb select { width: 100%; font: 15px/1.4 var(--body); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.rb textarea { resize: vertical; }
.rb input:focus, .rb textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.rb-row { display: flex; gap: 10px; }
.rb-entry { border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 2px; margin-bottom: 10px; background: rgba(255,255,255,.6); }
.rb-eh { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.rb-eh b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-ea { display: flex; gap: 4px; flex: none; }
.rb-ea button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.rb-ea button:hover { border-color: var(--brand); color: var(--brand); }
.rb-add, .rb-btn { font: 600 14.5px var(--body); border-radius: 12px; padding: 9px 14px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.rb-add:hover, .rb-btn:hover { border-color: var(--brand); color: var(--brand); }
.rb-btn.pri { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; padding: 11px 18px; box-shadow: 0 10px 24px -12px rgba(91,77,255,.8); }
.rb-btn.pri:hover { color: #fff; filter: brightness(1.06); }
.rb-set { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.rb-set .full { grid-column: 1 / -1; }
.rb-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.rb-seg label { cursor: pointer; }
.rb-seg input { position: absolute; opacity: 0; pointer-events: none; }
.rb-seg span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 500; }
.rb-seg input:checked + span { border-color: var(--brand); background: rgba(91,77,255,.1); color: var(--brand); font-weight: 600; }
.rb-seg input:focus-visible + span { outline: 2px solid var(--brand); }
.rb-sw { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rb-sw button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.rb-sw input[type=color] { width: 34px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }
.rb-prev { position: sticky; top: 76px; min-width: 0; }
.rb-pbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.rb-pbar small { color: var(--muted); }
.rb-sheetbox { background: rgba(21,20,43,.06); border-radius: 16px; padding: 10px; overflow: hidden; }
.sheet { position: relative; width: 100%; }
.paper { position: absolute; top: 0; left: 0; transform-origin: top left; background: #fff; color: #1b1b1f; box-sizing: border-box; padding: 14mm; box-shadow: 0 6px 30px -10px rgba(20,20,60,.4); }
.rb-tabs { display: none; }

/* resume typography (shared by screen and print) */
.paper { font-family: Arial, Helvetica, "Liberation Sans", sans-serif; line-height: 1.38; }
.paper.f-serif { font-family: Georgia, "Times New Roman", "Liberation Serif", serif; }
.paper.z-s { font-size: 9.5pt; } .paper.z-m { font-size: 10.5pt; } .paper.z-l { font-size: 11.5pt; }
.paper h1 { font-size: 2.1em; line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.paper h2 { font-size: .95em; margin: 0 0 .45em; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--ac); }
.paper .r-t { font-size: 1.15em; margin-top: .2em; color: #3b3b45; }
.paper .r-c { margin-top: .5em; font-size: .92em; color: #3b3b45; }
.paper .r-c i { font-style: normal; color: #9a9aa5; }
.paper .r-s { margin-top: 1.1em; }
.paper p { margin: 0 0 .25em; }
.paper ul { margin: .25em 0 0; padding-left: 1.2em; }
.paper li { margin: 0 0 .15em; }
.paper .r-e { margin-bottom: .75em; break-inside: avoid; }
.paper .r-eh { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.paper .r-d { white-space: nowrap; color: #55555f; font-size: .92em; }
.paper .r-pl { color: #55555f; }
.paper .r-et span:not(.r-pl) { font-weight: 400; }
.t-classic .r-h { text-align: center; border-bottom: 2px solid var(--ac); padding-bottom: .7em; }
.t-classic h1 { color: var(--ac); }
.t-classic h2 { border-bottom: 1px solid #d6d6dd; padding-bottom: .2em; color: #1b1b1f; }
.t-modern .r-h { border-left: 6px solid var(--ac); padding-left: 14px; }
.t-modern h1 { color: var(--ac); }
.t-modern .r-t { font-weight: 600; }
.t-modern h2 { color: var(--ac); }
.t-compact h1 { font-size: 1.8em; }
.t-compact .r-s { margin-top: .8em; }
.t-compact .r-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; border-bottom: 1px solid var(--ac); padding-bottom: .5em; }
.t-compact .r-t, .t-compact .r-c { margin-top: 0; }
.t-compact h2 { background: color-mix(in srgb, var(--ac) 12%, #fff); padding: .2em .5em; color: var(--ac); }
.t-compact .r-e { margin-bottom: .55em; }

@media (max-width: 900px) {
  .rb-grid { grid-template-columns: 1fr; }
  .rb-prev { position: static; }
  .rb-tabs { display: flex; gap: 6px; margin-bottom: 12px; position: sticky; top: 64px; z-index: 5; padding: 6px; background: var(--glass-strong); border-radius: 14px; border: 1px solid var(--edge); }
  .rb-tabs button { flex: 1; font: 600 14.5px var(--body); padding: 9px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
  .rb-tabs button[aria-selected=true] { background: var(--brand); color: #fff; }
  body[data-tab=edit] .rb-prev, body[data-tab=prev] .rb-form { display: none; }
}
@media (max-width: 520px) { .rb-row { flex-direction: column; gap: 0; } .rb-set { grid-template-columns: 1fr; } }

@media print {
  body { background: #fff !important; padding: 0 !important; }
  body::before, body::after, .gnav, body > footer, .crumbs, .rb-top, .rb-form, .rb-tabs, .rb-pbar, .rb-more, h1.pg, .pg-intro, .faq, .tools-more, #bump { display: none !important; }
  main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .rb, .rb-grid, .rb-prev, .rb-sheetbox, .sheet { display: block !important; position: static !important; padding: 0 !important; margin: 0 !important; background: none !important; height: auto !important; width: auto !important; overflow: visible !important; border-radius: 0 !important; }
  .paper { position: static !important; transform: none !important; box-shadow: none !important; padding: 0 !important; width: auto !important; min-height: 0 !important; }
  .paper h2 { break-after: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
