/* Roles guide (/roles.html) in the town look: jungle backdrop, paper cards with an ink
   border and the hard pixel shadow the town panels use. Tokens come from kp.css. */
body.rl-body { margin: 0; min-height: 100vh; background: oklch(0.62 0.09 140); color: var(--text); font-family: var(--font-body); }
/* kp.css centers body children; both rows take the full width up to their max. */
.rl-top, .rl-main { width: 100%; box-sizing: border-box; }
.rl-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; max-width: 1100px; margin: 0 auto; padding: 14px 16px 0; }
.rl-brand, .rl-tool, .rl-card, .rl-btn, .rl-chip { border: 2px solid var(--ink); box-shadow: 3px 3px 0 oklch(0.21 0.02 55 / 0.85); }
.rl-brand { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; background: var(--surface); border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 700; }
.rl-brand b { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1; }
.rl-brand b span { color: var(--lantern-ink); }
.rl-tools { display: flex; gap: 6px; }
.rl-tool { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; background: var(--surface); border-radius: var(--r-sm); color: var(--text); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.rl-tool:hover, .rl-btn:hover, .rl-chip:hover { background: var(--lantern-soft); }
.rl-main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 64px; display: grid; gap: 18px; }
.rl-hero { color: var(--paper); text-shadow: 2px 2px 0 oklch(0.21 0.02 55 / 0.7); }
.rl-hero h1 { margin: 6px 0 6px; font-family: var(--font-display); font-size: 34px; font-weight: 800; }
.rl-hero p { margin: 0; max-width: 46em; font-size: 16px; line-height: 1.6; }
.rl-card { background: var(--surface); border-radius: var(--r-md); padding: 16px 18px; }
.rl-card h2 { margin: 0 0 10px; font-size: 18px; }
.rl-card p { margin: 0 0 12px; line-height: 1.6; }
.rl-mine { background: var(--paper-2); }
.rl-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.rl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--surface); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 14px; }
.rl-chip b, .rl-tag { padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; }
.rl-group-title { margin: 6px 0 10px; color: var(--paper); font-size: 15px; font-family: var(--font-mono); letter-spacing: .04em; text-shadow: 1px 1px 0 oklch(0.21 0.02 55 / 0.7); }
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.rl-role { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.rl-role.is-mine { background: var(--lantern-soft); }
.rl-role header { display: flex; align-items: center; gap: 8px; }
.rl-role h3 { margin: 0; font-size: 16px; flex: 1; }
.rl-icon { font-size: 22px; line-height: 1; }
.rl-role dl { margin: 0; flex: 1; }
.rl-role dt { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.rl-role dd { margin: 2px 0 8px; font-size: 14px; line-height: 1.55; }
.rl-btn { align-self: flex-start; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; background: var(--surface); border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.rl-btn-accent { background: var(--accent); color: #fff; }
.rl-rel { margin: 0; padding-left: 20px; line-height: 1.8; }
.rl-main :focus-visible, .rl-top :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 640px) {
  .rl-hero h1 { font-size: 26px; }
  .rl-grid { grid-template-columns: 1fr; }
}
/* Town workbench (?embed): the top row becomes the page's one header (name, 任务, ×); only main scrolls. */
.rl-bar-title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1.2; }
html.kp-workbench body.rl-body { height: 100dvh; min-height: 0; overflow: hidden; }
html.kp-workbench .kp-dev-banner, html.kp-workbench .rl-brand, html.kp-workbench .rl-tools, html.kp-workbench .rl-hero h1 { display: none; }
html.kp-workbench .rl-top { flex: none; max-width: none; height: 64px; margin: 0; padding: 0 14px 0 26px; background: var(--surface); border-bottom: 2px solid var(--ink); }
html.kp-workbench .rl-main { flex: 1; min-height: 0; max-width: none; margin: 0; padding: 22px max(16px, calc(50% - 534px)) 48px; overflow: auto; }
@media (max-width: 640px) {
  html.kp-workbench .rl-top { height: 56px; padding: 0 10px 0 16px; }
  html.kp-workbench .rl-bar-title { font-size: 17px; }
}
