/* A readable page on the workshop's dark leather desk; chrome never covers paper. */
.rulesReader{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;min-width:0;height:max(440px,calc(100dvh - 188px));max-height:1400px;border:1px solid #b99b625b;border-radius:5px;overflow:hidden;background:#111a17;box-shadow:inset 0 1px #f6dda01a,0 12px 32px #0005}
.rulesReaderHeader{display:flex;align-items:center;gap:14px;padding:12px 16px;background:linear-gradient(110deg,#35382c,#19221d);border-bottom:1px solid #c3a56b40;min-width:0}
.rulesReaderIdentity{min-width:0;flex:1}.rulesReaderIdentity h2{font:600 21px/1.25 var(--font-display,serif);color:#ecdcbc;margin:0;overflow-wrap:anywhere}.rulesReaderIdentity small{display:block;font-size:10px;color:#b8ab8c;margin-top:3px;letter-spacing:.05em}
.rulesReader button,.rulesReader a{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;min-height:38px;border-radius:4px;font-size:12px;touch-action:manipulation}
.rulesReader button.secondary{background:#101a16;border:1px solid #b69b6657;color:#ddcea9;box-shadow:inset 0 1px #f0d3a00e}
.rulesReader button.secondary[aria-pressed="true"]{border-color:#c9ad76;background:#685a312e;color:#f5e1b5}
.rulesReader button:focus-visible,.rulesReader a:focus-visible,.rulesReader input:focus-visible,.rulesReader select:focus-visible,.rulesPageViewport:focus-visible{outline:2px solid #e3c17f;outline-offset:3px}
.rulesReader svg{width:18px;height:18px;flex:none}.rulesReaderLinks{display:flex;gap:6px}.rulesReaderLinks a{padding:8px 10px;color:#d5be8e;text-decoration:none;border:1px solid #b69b6657;background:#101a16}
.rulesReaderToolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:9px 16px;background:#19221eea;border-bottom:1px solid #baa36e2c;position:relative;z-index:2;min-width:0}
.rulesPageControls,.rulesZoomControls{display:flex;align-items:center;gap:6px;min-width:0}.rulesZoomControls{margin-left:auto}.rulesReader .rulesIconButton{padding:7px;min-width:38px;width:38px}.rulesReader .rulesFit{padding:8px 10px;margin-left:2px}
.rulesPageInput{display:flex;align-items:center;gap:6px;font-size:11px;color:#b8ad92;white-space:nowrap}.rulesReader .rulesPageInput input{width:58px;min-height:38px;padding:5px 6px;text-align:center;background:#09120f;border-color:#ab956557;color:#f0e1c0;font-size:14px;font-variant-numeric:tabular-nums;border-radius:3px;appearance:textfield}.rulesReader .rulesPageInput input::-webkit-inner-spin-button,.rulesReader .rulesPageInput input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.rulesChapterInput{flex:1;min-width:160px;max-width:320px;margin:0}.rulesReader .rulesChapterInput select{min-height:38px;font-size:12px;border-radius:3px;background:#101a16;border-color:#ab956557;padding:6px 26px 6px 10px;color:#e1d4b5}.rulesZoomControls output{min-width:42px;font-size:11px;color:#cec1a4;text-align:center;font-variant-numeric:tabular-nums}
.rulesPageViewport{position:relative;min-width:0;min-height:0;overflow:auto;padding:20px;background:linear-gradient(#131c1ccc,#131c1ccc),url('/art/slate-leather-v1.webp');background-size:auto,600px;overscroll-behavior:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;touch-action:pan-x pan-y pinch-zoom}
.rulesPageMount{width:max-content;min-width:100%;min-height:100%;display:flex;justify-content:center;align-items:flex-start}.rulesPdfPage{position:relative;flex:none;background:white;box-shadow:0 0 0 1px #0003,0 8px 20px #0007}.rulesPdfPage canvas{display:block;max-width:none;border:0;border-radius:0}
.rulesReader.hasError .rulesPageMount{display:none}
.rulesReaderFooter{display:flex;align-items:center;gap:7px;padding:7px 16px;min-height:31px;font-size:11px;color:#b9ad90;border-top:1px solid #b89b6230;background:#18211c}.rulesReaderFooter small{margin-left:auto;font-size:10px;color:#9d927c}.rulesLoadingGlyph{width:10px;height:10px;border:1.5px solid #bda57533;border-top-color:#dec285;border-radius:50%;visibility:hidden}.rulesReader.isLoading .rulesLoadingGlyph{visibility:visible;animation:rulesLoadingTurn .8s linear infinite}
.rulesReaderError{position:relative;display:grid;justify-items:start;gap:14px;max-width:420px;margin:30px auto;padding:24px;background:#1b241f;border:1px solid #b69a6273;box-shadow:0 8px 25px #0004;color:#e5d5b3}.rulesReaderError[hidden]{display:none}.rulesReaderError b{font:600 22px var(--font-display,serif)}.rulesReaderError p{font-size:13px;line-height:1.65;margin:0;color:#cfc2a3}.rulesReaderError a{color:#d5bc84;text-decoration:underline;text-underline-offset:3px;font-size:12px}.rulesReaderError button{background:linear-gradient(#d5b779,#ae8b53);color:#271f13;border:1px solid #e5cc97;padding:8px 16px}
.rulesSrOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* PDF.js TextLayer positioning rules, scoped to this reader (Apache-2.0). */
.rulesPdfText{position:absolute;inset:0;overflow:clip;opacity:1;line-height:1;text-align:initial;transform-origin:0 0;caret-color:#231e16;z-index:1;-webkit-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none;--min-font-size:1;--text-scale-factor:calc(var(--total-scale-factor) * var(--min-font-size));--min-font-size-inv:calc(1 / var(--min-font-size))}
.rulesPdfText :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0 0}
.rulesPdfText>:not(.markedContent),.rulesPdfText .markedContent span:not(.markedContent){z-index:1;--font-height:0;font-size:calc(var(--text-scale-factor) * var(--font-height));--scale-x:1;--rotate:0deg;transform:rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv))}
.rulesPdfText .markedContent{display:contents}.rulesPdfText span[role="img"]{user-select:none;cursor:default}.rulesPdfText ::selection{color:transparent;background:#588aaa70}
@keyframes rulesLoadingTurn{to{transform:rotate(360deg)}}
@media(hover:hover) and (pointer:fine){.rulesReader button.secondary:not(:disabled):hover,.rulesReaderLinks a:hover{background:#584c292a;border-color:#c9ad76;color:#f0dfbb}}
@media(max-width:1050px){.rulesReaderIdentity h2{font-size:18px}.rulesReaderToolbar{gap:8px}.rulesChapterInput{max-width:240px}.rulesReader .rulesFit span{display:none}.rulesReader .rulesFit{padding:8px;min-width:38px}.rulesPageInput>span:first-child{display:none}}
@media(max-width:760px){.rulesReader{height:max(400px,calc(100dvh - 170px - var(--mobile-tabs-height,60px)));border-radius:3px}.rulesReaderHeader{gap:9px;padding:10px}.rulesReaderIdentity h2{font-size:16px}.rulesReaderIdentity small{font-size:9px}.rulesReader .rulesBack{min-width:40px;padding:8px}.rulesBack span{display:none}.rulesReaderLinks{gap:4px}.rulesReaderLinks a{padding:8px;min-width:40px}.rulesReaderLinks a span{display:none}.rulesReaderToolbar{padding:8px;gap:7px}.rulesPageControls{gap:4px;order:1}.rulesZoomControls{gap:2px;order:2}.rulesReader .rulesIconButton{width:36px;min-width:36px;min-height:40px}.rulesReader .rulesPageInput input{width:47px;min-height:40px;font-size:16px;padding:5px 2px}.rulesPageInput{gap:4px;font-size:10px}.rulesZoomControls output{min-width:36px;font-size:10px}.rulesReader .rulesFit{margin-left:0;min-width:36px;padding:8px}.rulesChapterInput{order:3;min-width:0;max-width:none;flex-basis:100%}.rulesReader .rulesChapterInput select{min-height:40px;font-size:14px}.rulesPageViewport{padding:10px;scrollbar-gutter:auto}.rulesReaderFooter{padding:7px 10px;font-size:10px}.rulesReaderFooter small{font-size:9px}.rulesReaderError{padding:18px;margin:18px auto;gap:12px}.rulesReaderError b{font-size:19px}}
@media(max-width:360px){.rulesReaderToolbar{gap:5px;padding:6px}.rulesZoomControls output{display:none}.rulesReader .rulesFit{min-width:34px}.rulesReader .rulesIconButton{min-width:34px;width:34px}}
@media(prefers-reduced-motion:reduce){.rulesLoadingGlyph{animation:none!important}}
