.game-shell #world-shortcuts{position:absolute;right:12px;top:56px;display:flex;align-items:flex-start;gap:8px;z-index:12;max-width:calc(100% - 24px)}
.game-shell #world-shortcuts .journal-button{position:relative;inset:auto;width:68px;height:94px;margin:0;flex:0 0 68px}
.game-shell #world-shortcuts .journal-cover{width:64px;height:68px;object-fit:contain}
.game-shell #world-shortcuts .journal-label{font-size:12px;white-space:nowrap}
.at-start #world-shortcuts{display:none!important}
.milestone-notice{position:absolute;right:0;top:0;min-width:22px;height:22px;border-radius:50%;background:#f7cf6e;color:#3b2914;font-weight:bold;border:2px solid #866329;display:grid;place-items:center}
.milestone-notice[hidden]{display:none}.has-premium .journal-cover{animation:badge-beacon 2s ease-in-out infinite}
@keyframes badge-beacon{50%{filter:drop-shadow(0 0 9px #ffd35c);transform:translateY(-3px)}}
dialog.milestone-dialog{box-sizing:border-box;width:min(1160px,94vw);height:min(780px,88dvh);max-width:94vw;max-height:90dvh;padding:30px 42px 24px;border:5px double #bb904b;border-radius:24px;background:radial-gradient(ellipse at top,#fff8df,#efdfb3);color:#49341d;box-shadow:0 20px 60px #0009;overflow:hidden;font-family:system-ui,sans-serif}
dialog.milestone-dialog::backdrop{background:#061619bb;backdrop-filter:blur(4px)}
dialog.milestone-dialog[open]{display:flex;flex-direction:column;gap:8px}
.milestone-dialog h2{font:700 clamp(25px,3vw,38px)/1.15 Georgia,serif;text-align:center;margin:0 40px 2px}.milestone-dialog h3{font:700 25px/1.2 Georgia,serif;margin:8px 0}.milestone-dialog p{line-height:1.4;margin:6px 0}.milestone-dialog button{font-family:inherit;min-height:44px;cursor:pointer;border:2px solid #ad8245;border-radius:12px;background:linear-gradient(#fff1cc,#e4c994);color:#49341d;font-size:16px;padding:9px 15px}.milestone-dialog button:disabled{cursor:default;opacity:.7}.milestone-dialog button:focus-visible{outline:3px solid #167c8c;outline-offset:3px}.milestone-dialog button[aria-pressed=true]{background:#215452;color:#fff4d2;border-color:#c99f4a}.milestone-dialog .milestone-close{position:absolute;right:14px;top:12px;width:44px;padding:0;font-size:29px;z-index:2}.milestone-subtitle{text-align:center;font-size:14px}.milestone-tabs{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.milestone-message{font-size:14px;text-align:center;min-height:20px;flex-shrink:0}
#milestone-book{background-image:var(--album-art);background-size:100% 100%;padding:44px 55px 40px;border:0;border-radius:25px}
.milestone-pages{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:65px;margin-top:8px}.milestone-list,.milestone-detail{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:6px}.milestone-detail{text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px}.milestone-detail>img{width:clamp(108px,15vw,190px);height:clamp(108px,15vw,190px);object-fit:contain}.milestone-eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:1px;font-weight:700}.milestone-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.milestone-dialog .milestone-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:10px 5px;background:#fff9e778;border:1px solid #bd955a88;box-shadow:0 2px 4px #7d55251a;min-width:0}.milestone-card img{width:90px;height:90px;object-fit:contain}.milestone-card strong{font-size:14px}.milestone-card span,.milestone-card small{font-size:12px}.milestone-card.is-locked img{filter:grayscale(.75);opacity:.58}.milestone-dialog .milestone-card.is-ready{box-shadow:inset 0 0 18px #efbe5799;border-color:#b17b21}.milestone-dialog .milestone-card[aria-pressed=true]{background:#215452;color:#fff2ce}.milestone-dialog progress{width:90%;height:12px;accent-color:#38897a;border:0}.milestone-tiers{display:flex;gap:6px;margin:4px 0}.milestone-tiers button{width:44px;padding:6px}.milestone-count{font-size:14px}.milestone-dialog .milestone-claim{font-weight:700;width:100%;margin:5px 0}.milestone-stats{display:grid;grid-template-columns:1fr auto;gap:12px;width:100%;font-size:15px;text-align:left;margin:15px 0}.milestone-stats dt{border-bottom:1px solid #bfa27666;padding-bottom:8px}.milestone-stats dd{margin:0;font-weight:700}.milestone-note{font-size:13px}.milestone-empty{padding:24px;text-align:center}.rank-content{overflow-y:auto;flex:1;min-height:0}.rank-content table{border-collapse:collapse;width:100%;margin-top:12px}.rank-content th,.rank-content td{text-align:left;padding:12px;border-bottom:1px solid #bfa27666}.rank-content th:last-child,.rank-content td:last-child{text-align:right}.rank-content .rank-self{background:#d0e5ce;font-weight:bold}.milestone-dialog.menu-group-dialog{width:min(440px,92vw);height:auto;min-height:200px;padding:35px 25px}.menu-group-items{display:grid;gap:10px;margin-top:14px}.menu-group-items button{display:flex;align-items:center;gap:16px;font-size:18px}.menu-group-items img{width:56px;height:56px;object-fit:contain}
.game-shell .game-toolbar #player-menu img,.game-shell .game-toolbar #main-menu img{width:40px;height:40px;object-fit:contain}
@media(max-width:720px),(max-height:550px){.game-shell #world-shortcuts{gap:4px;top:49px;right:7px}.game-shell #world-shortcuts .journal-button{width:54px;height:70px;flex-basis:54px}.game-shell #world-shortcuts .journal-cover{width:48px;height:49px}.game-shell #world-shortcuts .journal-label{font-size:10px}#milestone-book{padding:22px 26px 16px;background-size:100% 100%}.milestone-dialog h2{font-size:24px}.milestone-dialog h3{font-size:20px}.milestone-subtitle{font-size:12px}.milestone-pages{gap:24px;margin-top:0}.milestone-grid{gap:6px}.milestone-card img{width:58px;height:58px}.milestone-detail>img{width:85px;height:85px}.milestone-dialog .milestone-card{padding:5px 3px}.milestone-card strong{font-size:12px}.milestone-dialog p{font-size:13px}.milestone-dialog .milestone-tabs button{padding:5px 10px;font-size:13px}.milestone-dialog{padding:24px 18px 16px;width:94vw;height:90dvh;max-height:90dvh}.milestone-message{min-height:0;font-size:12px}.milestone-stats{font-size:13px;gap:7px}}
@media(max-width:480px){#milestone-book{background-image:none;border:5px double #bb904b;background-color:#f4e8c6;padding:22px 14px 14px}.milestone-pages{grid-template-columns:1fr 1fr;gap:12px}.milestone-grid{grid-template-columns:1fr}.milestone-dialog .milestone-close{right:5px;top:5px}.milestone-dialog h2{font-size:21px;margin:0 25px 4px}.milestone-tiers{flex-wrap:wrap;justify-content:center}.milestone-detail>img{width:90px;height:90px}.milestone-stats{display:block}.milestone-stats dd{margin-bottom:8px}.milestone-tabs{gap:4px}}
@media(prefers-reduced-motion:reduce){.has-premium .journal-cover{animation:none;filter:drop-shadow(0 0 6px #ffd35c)}}
/* Existing dialog rules use pale text. Parchment requires explicit dark ink. */
body dialog.milestone-dialog :is(p,small,dt,dd,th,td){color:#49341d;text-shadow:none}
body dialog.milestone-dialog .milestone-card[aria-pressed=true] small{color:#fff2ce}
body dialog.milestone-dialog p{font-size:15px;line-height:1.35;margin:3px 0}
body dialog.milestone-dialog .milestone-eyebrow{font-size:12px}
body dialog.milestone-dialog .milestone-subtitle,body dialog.milestone-dialog .milestone-message{font-size:13px}
.milestone-detail>img{width:140px;height:140px;flex-shrink:0}.milestone-detail>*,.milestone-card>*{flex-shrink:0}
.milestone-dialog progress{appearance:none;background:#d5bd8d;border-radius:10px;overflow:hidden;min-height:10px;flex-shrink:0}
.milestone-dialog progress::-webkit-progress-bar{background:#d5bd8d}.milestone-dialog progress::-webkit-progress-value{background:#387d6c;border-radius:10px}.milestone-dialog progress::-moz-progress-bar{background:#387d6c}
@media(max-height:550px){
 #milestone-book{padding:20px 26px 27px}.milestone-dialog[open]{gap:4px}
 #milestone-book h2{font-size:22px;margin-bottom:0}.milestone-subtitle{display:none}
 .milestone-detail{gap:2px}.milestone-detail>img,.milestone-detail>.milestone-eyebrow,.milestone-detail>.milestone-count{display:none}
 .milestone-detail h3{font-size:18px;margin:0}.milestone-detail>p{font-size:12px!important;margin:2px 0!important}
 .milestone-detail .milestone-tiers{margin:0}.milestone-detail .milestone-claim{font-size:13px;margin:0;padding:5px}
 .milestone-dialog .milestone-message{position:absolute;bottom:6px;left:25px;right:25px;font-size:11px;background:#f4e5c3}
 .milestone-card img{width:56px;height:56px}
}

/* Equal shortcut cells include the labels, not only the pictures. */
.game-shell #world-shortcuts{gap:4px}
.game-shell #world-shortcuts .journal-button{width:84px;flex-basis:84px;height:100px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:2px;gap:5px}
.game-shell #world-shortcuts :is(.journal-cover,.map-globe){width:64px;height:68px;flex:none;object-fit:contain;margin:0}
.game-shell #world-shortcuts .journal-label{font-size:12px;max-width:100%;box-sizing:border-box;text-align:center}

/* The artwork has a leather cover, outer margin and a central binding.
   Keep content within its two parchment pages at every window size. */
#milestone-book{inset:0;margin:auto;width:min(1760px,98vw);max-width:98vw;height:min(1040px,96dvh);max-height:96dvh;padding:clamp(35px,6.5vh,72px) clamp(44px,7.2vw,130px) clamp(35px,7vh,76px);gap:10px;background-color:transparent;background-size:100% 100%;background-repeat:no-repeat;box-shadow:0 20px 60px #0008}
.milestone-heading{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;text-align:center;flex:none;align-self:center;width:max-content;max-width:92%;padding:8px 22px 10px;background:linear-gradient(110deg,#efdbb4ed,#fff2cf,#efdbb4ed);border:1px solid #bf985d88;border-radius:18px;box-shadow:0 3px 12px #63452225}
#milestone-book h2{font-size:clamp(26px,2.7vw,40px);margin:0 14px 5px;line-height:1.12}
#milestone-book .milestone-subtitle{display:block;margin:4px 0 8px}
#milestone-book .milestone-pages{width:100%;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(40px,7vw,122px);margin:0}
#milestone-book :is(.milestone-list,.milestone-detail){box-sizing:border-box;min-width:0;padding:10px 12px;scrollbar-color:#aa8956 #ebd6af55;scrollbar-gutter:stable}
#milestone-book .milestone-detail{gap:7px}
#milestone-book .milestone-list h3{margin:5px 0 18px;text-align:center}
#milestone-book .milestone-grid{gap:14px}
#milestone-book .milestone-card{padding:12px 8px;gap:6px}
#milestone-book .milestone-card strong{font-size:15px}
#milestone-book .milestone-detail>h3{font-size:clamp(22px,2.2vw,31px);margin:2px 0 4px}
#milestone-book .milestone-stats{width:100%;box-sizing:border-box;grid-template-columns:minmax(0,1fr) auto;column-gap:16px;row-gap:13px;font-size:16px;margin:8px 0;padding:14px 18px;background:#fff6ddbb;border:1px solid #bf985d66;border-radius:12px}
#milestone-book .milestone-stats dt{overflow-wrap:anywhere;min-width:0}
#milestone-book .milestone-stats dd{padding-right:3px;text-align:right;white-space:nowrap}
#milestone-book .milestone-note{font-size:13px;max-width:42ch}
#milestone-book .milestone-next{font-size:13px;padding:6px 12px;min-height:36px;background:#f9edcf}
#milestone-book .milestone-message:empty{display:none}
#milestone-book .milestone-message{position:static;align-self:center;max-width:90%;margin:0;padding:3px 10px;border-radius:6px;background:#f8e7c5;font-size:13px}
#milestone-book{padding-bottom:clamp(38px,11vh,120px)}

/* The original illustrated emblem stays the same; its rim shows the upgrade. */
[data-rarity=common]{--rank-ink:#65717a;--rank-rim:#d7e0e4;--rank-glow:#c7d7dc55;--rank-paper:#f1f5f4}
[data-rarity=rare]{--rank-ink:#1974c5;--rank-rim:#58bcff;--rank-glow:#258aff66;--rank-paper:#e2f4ff}
[data-rarity=epic]{--rank-ink:#9346c8;--rank-rim:#d18bff;--rank-glow:#ae55e766;--rank-paper:#f4e7ff}
[data-rarity=legendary]{--rank-ink:#bc5809;--rank-rim:#ffad3e;--rank-glow:#ff861c88;--rank-paper:#fff0ce}
.badge-medallion{position:relative;box-sizing:border-box;display:grid;place-items:center;width:112px;height:112px;padding:8px;border-radius:50%;border:3px solid var(--rank-rim);background:radial-gradient(circle,var(--rank-paper),var(--rank-glow));box-shadow:inset 0 0 0 2px var(--rank-ink),0 0 0 1px var(--rank-ink),0 2px 12px var(--rank-glow);isolation:isolate;flex:none}
.milestone-card .badge-medallion img,.milestone-detail .badge-medallion img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 2px #49341d55)}
.milestone-card.is-locked .badge-medallion img{filter:grayscale(.65);opacity:.7}
.badge-medallion .badge-rank-mark{position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);min-width:28px;padding:1px 5px;border:1px solid var(--rank-ink);border-radius:9px;background:var(--rank-paper);color:var(--rank-ink);font:700 12px/1.2 Georgia,serif;text-align:center}
#milestone-book .milestone-detail>.badge-medallion{width:154px;height:154px;margin:3px 0 8px}
.milestone-dialog .milestone-tiers button{border-color:var(--rank-ink);box-shadow:inset 0 -3px var(--rank-rim)}
.milestone-dialog .milestone-tiers button[aria-pressed=true]{background:var(--rank-paper);color:var(--rank-ink)}
.milestone-card .badge-rarity-label{font-weight:650}

@media(max-width:1000px),(max-height:650px){
 #milestone-book{padding:clamp(25px,6vh,42px) 7.2vw clamp(36px,11vh,90px);gap:6px}
 .milestone-heading{padding:6px 14px;max-width:94%}
 #milestone-book h2{font-size:26px}
 #milestone-book .milestone-subtitle{font-size:12px;margin:3px 0 5px}
 #milestone-book .milestone-pages{gap:6vw}
 #milestone-book :is(.milestone-list,.milestone-detail){padding:6px}
 #milestone-book .milestone-grid{gap:8px}
 #milestone-book .milestone-card{padding:8px 4px}
 #milestone-book .milestone-card strong{font-size:13px}
 .badge-medallion{width:84px;height:84px;padding:6px}
 #milestone-book .milestone-detail>.badge-medallion{width:112px;height:112px}
 #milestone-book .milestone-stats{font-size:14px;gap:10px}
}
@media(max-width:720px),(max-height:550px){
 .game-shell #world-shortcuts{gap:4px;right:6px}
 .game-shell #world-shortcuts .journal-button{width:70px;flex-basis:70px;height:76px;padding:1px;gap:3px}
 .game-shell #world-shortcuts :is(.journal-cover,.map-globe){width:48px;height:49px}
 .game-shell #world-shortcuts .journal-label{font-size:10px}
}
@media(max-height:550px){
 #milestone-book{padding:6.5vh 7.2vw 11vh;gap:4px}
 #milestone-book h2{font-size:22px;margin:0 24px 4px}
 #milestone-book .milestone-subtitle{display:none}
 .milestone-heading{padding:4px 9px}
 #milestone-book .milestone-tabs button{font-size:12px;padding:4px 9px;min-height:36px}
 #milestone-book .milestone-grid{gap:6px}
 #milestone-book .milestone-card{gap:4px;padding:6px 3px}
 .badge-medallion{width:62px;height:62px;padding:4px;border-width:2px}
 .badge-medallion .badge-rank-mark{min-width:20px;font-size:10px;bottom:-5px}
 #milestone-book .milestone-detail>.badge-medallion{display:none}
 #milestone-book .milestone-detail>.milestone-eyebrow{display:block;font-size:10px}
 #milestone-book .milestone-detail{gap:3px}
 #milestone-book .milestone-detail h3{font-size:19px}
 #milestone-book .milestone-tiers{gap:4px}
 #milestone-book .milestone-tiers button{min-height:36px;width:36px;padding:4px}
 #milestone-book .milestone-stats{font-size:12px;gap:7px;padding:7px}
 #milestone-book .milestone-list h3{font-size:17px;margin:0 0 8px}
 #milestone-book .milestone-detail>small{font-size:11px}
 #milestone-book .milestone-message{font-size:11px}
}
@media(max-width:480px){
 #milestone-book{padding:24px 14px 20px;background-image:none;background-color:#f4e8c6;border:4px double #bb904b}
 .milestone-heading{padding:5px;max-width:100%}
 #milestone-book h2{font-size:20px;margin:0 23px 6px}
 #milestone-book .milestone-pages{gap:14px}
 #milestone-book .milestone-stats{display:block}
}

/* Book-native index tabs and a quiet printed title replace the floating plaque. */
#milestone-book{padding-top:clamp(64px,11.5vh,120px);padding-bottom:clamp(110px,18vh,188px)}
#milestone-book .milestone-heading{width:100%;max-width:none;align-self:stretch;display:flex;flex-direction:row;justify-content:space-between;align-items:center;background:none;border:0;border-radius:0;box-shadow:none;padding:0;gap:7%;min-height:40px}
#milestone-book .milestone-heading h2{width:46%;max-width:46%;font-size:clamp(20px,2.3vw,34px);margin:0;text-align:center;line-height:1.2}
#milestone-book .milestone-subtitle{width:44%;max-width:44%;margin:0;font-style:italic;text-align:center;font-size:13px}
#milestone-book .book-index{position:absolute;right:2.2%;top:23%;display:flex;flex-direction:column;gap:10px;margin:0;width:42px;z-index:4}
#milestone-book .book-index button{position:relative;writing-mode:vertical-rl;text-orientation:mixed;width:42px;height:112px;min-width:0;min-height:0;padding:12px 9px;border:1px solid #95733e;border-left:3px double #b89a64;border-radius:0 10px 10px 0;background:linear-gradient(90deg,#ddc493,#f6e4bc 35%,#e7cb91);box-shadow:2px 3px 5px #3e2b1b44,inset 0 0 0 3px #ffedc455;color:#51381e;font:600 14px/1.2 system-ui;letter-spacing:.02em;transition:transform .16s,background .16s}
#milestone-book .book-index button[aria-selected=true]{transform:translateX(4px);background:linear-gradient(90deg,#173d3c,#286360 38%,#21524e);color:#fff0c9;border-color:#c4a05b;box-shadow:3px 4px 7px #1d241f55,inset 0 0 0 3px #dfc08155}
#milestone-book .book-index button:focus-visible{outline:3px solid #c37421;outline-offset:3px}
#milestone-book .milestone-pages{position:relative;isolation:isolate;overflow:hidden;perspective:1400px}
#milestone-book .milestone-pages.is-turning:after{content:"";pointer-events:none;position:absolute;top:0;bottom:0;left:54%;width:46%;z-index:3;background:linear-gradient(90deg,#b9986177,#f3e2bcee 12%,#ffefcddd 80%,#aa824977);border-radius:3px 12px 12px 3px;box-shadow:0 4px 14px #4e351833;transform-origin:left center;animation:album-leaf-turn .46s ease-out both}
#milestone-book .milestone-pages.turn-back:after{left:0;transform-origin:right center;animation-name:album-leaf-back}
@keyframes album-leaf-turn{0%{transform:rotateY(0);opacity:.85}65%{transform:rotateY(-115deg);opacity:.5}100%{transform:rotateY(-170deg);opacity:0}}
@keyframes album-leaf-back{0%{transform:rotateY(0);opacity:.85}65%{transform:rotateY(115deg);opacity:.5}100%{transform:rotateY(170deg);opacity:0}}
#milestone-book .book-folio{position:absolute;bottom:11.5%;left:8.5%;right:8.5%;display:flex;justify-content:space-between;align-items:center;gap:12px;color:#78532d;font:italic 15px Georgia,serif}
#milestone-book .folio-arrows{display:flex;gap:14px}
#milestone-book .folio-arrows button{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:2px solid #ac864e;border-radius:50%;background:#f5e3b7;color:#563815;box-shadow:0 2px 0 #ac864e55;font:30px/1 Georgia,serif}
#milestone-book .folio-arrows button:disabled{opacity:.3}
#milestone-book .milestone-message{position:absolute;bottom:7.9%;left:8%;right:8%;margin:0;background:#faeacccc;text-align:center;font-size:12px}
@media(max-width:1000px),(max-height:650px){#milestone-book .book-index{width:34px;gap:7px;right:2%;top:23%}#milestone-book .book-index button{width:34px;height:90px;padding:8px 6px;font-size:12px}#milestone-book .milestone-heading h2{font-size:24px}#milestone-book .book-folio{bottom:11.5%;font-size:13px}}
@media(max-height:550px){#milestone-book{padding-top:11vh;padding-bottom:25vh}#milestone-book .milestone-heading{min-height:27px}#milestone-book .milestone-heading h2{font-size:20px;width:100%;max-width:none;text-align:left;margin-left:8px}#milestone-book .milestone-subtitle{display:none}#milestone-book .book-index{top:22%;width:44px;gap:5px;right:2%}#milestone-book .book-index button{width:44px;height:64px;font-size:10px;padding:5px 4px}#milestone-book .folio-arrows button{width:44px;height:44px;min-height:44px;font-size:25px}#milestone-book .book-folio{bottom:11.5%;font-size:12px}#milestone-book .milestone-message{bottom:7.8%;font-size:10px}}
@media(prefers-reduced-motion:reduce){#milestone-book .milestone-pages.is-turning:after{display:none}#milestone-book .book-index button{transition:none}}

/* A physical catch action remains available to touch and keyboard players. */
#goblin-catch{position:absolute;z-index:9;min-height:44px;padding:7px 13px;border:2px solid #bb914b;border-radius:14px;background:linear-gradient(#fff0c6,#e9c98a);color:#49331d;box-shadow:0 3px 0 #806030,0 4px 12px #0005;font:700 15px system-ui;white-space:nowrap}
#goblin-catch[hidden]{display:none}
#goblin-catch:focus-visible{outline:3px solid #fff0a6;outline-offset:3px}

