.random-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 13px; padding: 12px 16px; background: var(--blue); color: white; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; }
.random-button:hover { background: var(--blue-bright); }
.random-button:disabled { opacity: .6; cursor: wait; }
.random-dialog { width: min(520px, calc(100% - 28px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.random-dialog::backdrop { background: rgba(45, 63, 84, .45); backdrop-filter: blur(4px); }
.random-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.random-heading h2 { margin: 0; font-size: 1.4rem; }
.random-close { flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--bg); color: var(--text); font-size: 1.6rem; cursor: pointer; }
#random-form label { display: block; font-weight: 750; margin-bottom: 8px; }
#random-chapter { width: 140px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; color: var(--text); background: white; }
#random-help, #random-category { color: var(--muted); line-height: 1.5; }
#random-pool { color: var(--muted); line-height: 1.5; font-size: .9rem; }
#random-status { line-height: 1.5; }
#random-status:empty { display: none; }
.random-result { margin-top: 20px; padding: 18px; border: 1px solid var(--green); border-radius: 14px; background: rgba(115, 204, 128, .12); }
.random-result[hidden] { display: none; }
#random-category { margin: 0 0 8px; font-size: .9rem; }
#random-name { margin: 0 0 18px; font-size: 1.15rem; line-height: 1.4; }
.random-dialog :focus-visible, #random-open:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.random-dialog { box-sizing: border-box; position: fixed; inset: 0; margin: auto; background: #fff; color: #0c355c; border: 2px solid #0c355c; border-radius: 12px; font: 16px/1.5 system-ui, sans-serif; text-align: left; }
.random-dialog .random-heading h2 { color: #0c355c; }
.random-dialog .random-button { width: auto; margin: 0; background: #126581; color: white; }
.random-dialog .random-button:hover { background: #0c355c; }
.random-dialog .random-button:disabled { opacity: .6; }
#random-close { display: inline-block; width: 44px; height: 44px; padding: 0; margin: 0; background: #f3f7f8; color: #0c355c; line-height: 1; }
#random-chapter { display: block; letter-spacing: normal; text-align: left; }
#random-help, #random-category, #random-pool { color: #496574; }
#random-form { margin: 0; }
.random-types { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 18px 0; padding: 14px; border: 1px solid #bdcfd5; border-radius: 8px; }
.random-types legend { padding: 0 5px; font-size: .9rem; font-weight: 700; }
#random-form .random-types label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: .9rem; cursor: pointer; }
.random-types input { appearance: auto; position: static; width: 17px; height: 17px; margin: 0; accent-color: #126581; }
#random-result { background: #f2f6e8; border-color: #becf9a; }
@media (max-width: 600px) { #random-open { grid-column: 1 / -1; justify-self: center; } .random-dialog { padding: 18px; } }
.site-global-actions { display: flex; justify-content: flex-end; max-width: 1180px; margin: 0 auto; padding: 18px 20px 0; }
#random-open { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; flex: 0 0 auto; margin: 0; padding: 9px 12px; border: 0; border-radius: 8px; background: #f3f7f8; color: #496574; font: 650 13px/1.5 system-ui, sans-serif; cursor: pointer; }
#random-open:hover { background: #d9edf1; color: #0c355c; }
.site-editor > header { flex-wrap: wrap; }
