/* Four page choices and the existing optional page/credit rules. */
.ym-pages-picker{display:flex;align-items:center;gap:4px}
.ym-shell .ym-pages-info{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:30px;min-height:0;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted,#7c8471);cursor:pointer}
.ym-pages-info svg{width:16px;height:16px;stroke-width:1.8}
.ym-shell .ym-pages-info[aria-expanded=true]{color:var(--ink,#20221e);background:var(--line,#eef1e4)}
.ym-shell .ym-pages-popover,.ym-shell .ym-pages-rules{box-sizing:border-box;width:min(292px,calc(100vw - 32px));left:var(--ym-page-popover-left,0px);max-height:min(60vh,var(--ym-page-popover-height,60vh));padding:14px;overflow-y:auto;overscroll-behavior:contain;background:var(--paper,#fff);border-color:var(--line,#e2e6d5);color:var(--ink,#20221e)}
.ym-shell .ym-pages-popover{display:grid;gap:12px;width:min(380px,calc(100vw - 32px))}
.ym-shell .ym-pages-title,.ym-pages-rules>strong{display:block;font-size:13px;line-height:1.4;font-weight:650;color:var(--ink,#20221e)}
/* Four equally spaced native range steps; tick text stays inside each end. */
.ym-shell .ym-pages-control{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:16px;align-items:center;min-width:0}
.ym-shell .ym-pages-shell{display:grid;gap:0;min-width:0;padding:0}
.ym-shell #ym-create-form .ym-pages-slider{display:block;width:100%;height:44px;margin:0;padding:0;appearance:none;-webkit-appearance:none;border:0;background:transparent;cursor:pointer;touch-action:pan-y;box-shadow:none}
.ym-shell .ym-pages-slider::-webkit-slider-runnable-track{height:6px;border-radius:999px;background:linear-gradient(90deg,#dce94a 0%,#dce94a var(--ym-pages-progress,0%),#d9ddd1 var(--ym-pages-progress,0%),#d9ddd1 100%)}
.ym-shell .ym-pages-slider::-webkit-slider-thumb{width:16px;height:26px;margin-top:-10px;border:4px solid #fff;border-radius:8px;appearance:none;-webkit-appearance:none;background:#e7f55a;box-shadow:0 2px 8px #20221e26}
.ym-shell .ym-pages-slider::-moz-range-track{height:6px;border-radius:999px;background:#d9ddd1}
.ym-shell .ym-pages-slider::-moz-range-progress{height:6px;border-radius:999px;background:#dce94a}
.ym-shell .ym-pages-slider::-moz-range-thumb{width:8px;height:18px;border:4px solid #fff;border-radius:8px;background:#e7f55a;box-shadow:0 2px 8px #20221e26}
.ym-shell .ym-pages-values{display:flex;justify-content:space-between;gap:0;min-width:0;margin-top:-4px;font-size:12px;color:var(--muted,#7c8471)}
.ym-shell #ym-create-form .ym-page-tick{flex:none;min-width:32px;min-height:32px;margin:0;padding:4px 0;border:0;border-radius:6px;background:transparent;color:var(--muted,#7c8471);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer;box-shadow:none;text-align:center}
.ym-shell #ym-create-form .ym-page-tick:first-child{min-width:16px;text-align:left}
.ym-shell #ym-create-form .ym-page-tick:last-child{min-width:16px;text-align:right}
.ym-shell #ym-create-form .ym-page-tick.active{color:var(--ink,#20221e);font-weight:650}
.ym-shell .ym-pages-readout{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;align-content:center;min-width:0;min-height:84px;padding:10px 12px;border:1px solid var(--line,#e2e6d5);border-radius:10px;background:var(--paper,#fff)}
.ym-shell .ym-pages-readout-label{font-size:10px;line-height:1.4;color:var(--muted,#7c8471);white-space:normal}
.ym-shell .ym-pages-readout strong{font-size:14px;line-height:1.4;font-weight:600;color:var(--ink,#20221e)}
.ym-shell #ym-pages-cost{font-size:12px;line-height:1.4;color:var(--muted,#7c8471);font-variant-numeric:tabular-nums;white-space:nowrap}
.ym-pages-rules p{margin:8px 0 0;color:var(--muted,#7c8471);font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.ym-pages-info:focus-visible,.ym-shell #ym-create-form .ym-page-tick:focus-visible,.ym-shell #ym-create-form .ym-pages-slider:focus-visible{outline:2px solid var(--character-accent,#55611b);outline-offset:2px;filter:none}
@media(hover:hover) and (pointer:fine){.ym-shell .ym-pages-info:hover{color:var(--ink,#20221e)}}
@media(max-width:700px){.ym-shell .ym-pages-control{grid-template-columns:minmax(0,1fr);gap:10px}.ym-shell .ym-pages-readout{grid-template-columns:minmax(0,1fr) auto;min-height:0}.ym-shell .ym-pages-readout-label{grid-column:1/-1}.ym-shell .ym-pages-info{height:32px}.ym-shell .ym-pages-readout{padding:9px 8px}}
@media(pointer:coarse){.ym-shell .ym-pages-info{width:36px;min-height:36px}}
.ym-shell .ym-pages-popover[hidden],.ym-shell .ym-pages-rules[hidden]{display:none}

