.rulebook-dialog {
    position: fixed;
    inset: 0;
    width: min(100%, 760px);
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 0;
    background: #132a21;
    color: #f5eddc;
}

.rulebook-dialog[open] { display: flex; flex-direction: column; }
.rulebook-dialog::backdrop { background: #08150edb; }

.rulebook-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    padding: 6px 12px;
    background: #1c392e;
    border-bottom: 1px solid #775d3d;
    font: 16px/1.5 system-ui, "Microsoft YaHei", sans-serif;
}

.rulebook-toolbar button {
    min-height: 44px;
    padding: 0 12px;
    background: #f2e4c9;
    color: #271f13;
    border: 1px solid #bca078;
    border-radius: 8px;
    font: inherit;
    cursor: pointer;
}

.rulebook-dialog iframe { flex: 1; min-height: 0; width: 100%; border: none; }
