/* Home links preview real products; purchase remains inside the shop. */
.title-screen .title-actions:has(>.home-shop){flex-wrap:wrap}
.title-screen .title-actions>.home-shop{
  flex:0 0 100%;width:100%;min-width:0;margin-top:4px;padding:10px;
  border:1px solid #b49b6b55;border-radius:5px;background:#202a22;
  color:var(--text);font-family:var(--sans);text-align:left;
}
.home-shop-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.home-shop-title{min-width:0;margin:0;font:600 var(--type-body)/1.3 var(--sans);overflow-wrap:anywhere}
.home-shop-copy{margin:0 0 8px;font:400 var(--type-caption)/1.4 var(--sans);color:var(--muted);white-space:normal;overflow-wrap:anywhere}
.home-shop .home-shop-entry,
.title-screen .header-shop-entry[data-commerce-entry]{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  flex:0 1 auto;min-width:48px;min-height:48px;max-width:100%;margin:0;padding:8px 10px;
  border:1px solid #b49b6b88;border-radius:5px;background:#cbb17a14;color:var(--text);
  font:600 var(--type-caption)/1.3 var(--sans);text-align:center;
  white-space:normal;overflow-wrap:anywhere;letter-spacing:0;box-shadow:none;
}
.title-screen .header-shop-entry[data-commerce-entry]{flex-shrink:0}
.header-shop-entry svg{flex:0 0 24px;width:24px;height:24px}
.home-shop-products{
  display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);grid-template-rows:auto;
  align-items:stretch;gap:8px;min-width:0;max-width:100%;overflow-x:auto;
  padding:3px;scroll-padding-inline:3px;
}
.home-shop-product{
  display:grid;grid-template-columns:48px minmax(0,1fr);align-content:center;align-items:center;
  column-gap:8px;row-gap:2px;min-width:0;min-height:72px;margin:0;padding:8px;
  border:1px solid #b49b6b66;border-radius:4px;background:#2b3326;color:var(--text);
  font:400 var(--type-caption)/1.3 var(--sans);text-align:left;white-space:normal;
}
.home-shop-art{display:block;grid-column:1;grid-row:1/span 3;width:48px;height:48px;object-fit:contain;pointer-events:none}
.home-shop-name,.home-shop-category,.home-shop-price{grid-column:2;min-width:0;white-space:normal;overflow-wrap:anywhere}
.home-shop-name{font-weight:600}
.home-shop-category{color:var(--muted)}
.home-shop-price{color:#e3c68e}
.home-shop :is(button,a):focus-visible,
.title-screen .header-shop-entry:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media(hover:hover){
  .home-shop-product:hover,.home-shop .home-shop-entry:hover,
  .title-screen .header-shop-entry[data-commerce-entry]:hover{background:#38402e;border-color:var(--gold);color:var(--text)}
}
@media(max-width:699px){
  .home-shop-products{grid-auto-columns:min(220px,85%)}
  .home-shop-heading{align-items:flex-start}
  .title-screen .title-actions>.home-shop{padding:8px}
}
/* General shop entries are storefront controls, not purchase/resource buttons. */
button.shop-entry-cta[data-commerce-entry][aria-label]{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 60px;width:60px;min-width:60px;max-width:60px;height:60px;min-height:60px;
  margin:3px;padding:10px;border:1px solid #936427;border-radius:9px;overflow:visible;
  background:linear-gradient(145deg,#f5dfa3,#d6a449);color:#543616;
  box-shadow:inset 0 0 0 3px #fff0c280,0 2px 0 #8e662e,0 3px 7px #3b281d2b;
  line-height:1;vertical-align:middle;
}
button.shop-entry-cta[data-commerce-entry][aria-label]>.shop-entry-icon{
  display:block;flex:0 0 34px;width:34px;height:34px;max-width:none;
  stroke-width:1.7;filter:drop-shadow(0 1px 0 #fff0c2);pointer-events:none;
}
button.shop-entry-cta[data-commerce-entry][aria-label]:focus-visible{outline:3px solid #6b421c;outline-offset:4px}
button.shop-entry-cta[data-commerce-entry][aria-label][data-shop-reward-ready="true"]>.shop-attention-mark:not([hidden]){
  position:absolute;top:-3px;right:-3px;display:inline-grid;place-items:center;
  width:18px;min-width:18px;height:18px;padding:0;border:1px solid #f6b7a2;
  border-radius:50%;background:#ba302b;color:#fff4d7;box-shadow:0 0 0 2px #f0d9a2;
  font:600 var(--type-caption)/1 var(--sans);pointer-events:none;
}
@media(hover:hover){
  button.shop-entry-cta[data-commerce-entry][aria-label]:hover{background:linear-gradient(145deg,#ffedba,#e0b359);border-color:#80551f;color:#493014;box-shadow:inset 0 0 0 3px #fff0c299,0 2px 0 #8e662e,0 3px 8px #3b281d33}
}
@media(max-width:999px){
  button.shop-entry-cta[data-commerce-entry][aria-label]{flex-basis:56px;width:56px;min-width:56px;max-width:56px;height:56px;min-height:56px;padding:9px}
  button.shop-entry-cta[data-commerce-entry][aria-label]>.shop-entry-icon{flex-basis:32px;width:32px;height:32px}
}
/* Web header grimoire tools: real buttons, distinct engraved inline SVGs. */
html:not([data-platform="android"]) .topbar .toolbar:has(>.header-grimoire-entry){
  display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;
  min-width:0;max-width:100%;padding:4px;overflow:visible;
}
html:not([data-platform="android"]) .topbar .header-right:has(.header-grimoire-entry){min-width:0;flex-wrap:wrap}
html:not([data-platform="android"]) .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry){
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 64px;width:64px;min-width:64px;max-width:64px;height:64px;min-height:64px;
  margin:0;padding:12px;border:1px solid #936427;border-radius:8px;overflow:visible;
  background:linear-gradient(145deg,#f5dfa3,#d6ad63);color:#543616;
  box-shadow:inset 0 0 0 3px #fcebc1,inset 0 0 0 4px #99703d7a,0 2px 0 #77532c,0 3px 7px #15110d55;
  font:600 var(--type-caption)/1 var(--sans);transform:none;animation:none;
  transition:background .18s,border-color .18s,color .18s,box-shadow .18s;
}
html:not([data-platform="android"]) .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry)>svg{
  display:block;flex:0 0 36px;width:36px;height:36px;max-width:none;
  filter:drop-shadow(0 1px 0 #fff1c9);pointer-events:none;
}
html:not([data-platform="android"]) .topbar .header-collection-icon rect:last-of-type{fill:#ecd39c}
html:not([data-platform="android"]) .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry):is(:hover,:active){
  transform:none;background:linear-gradient(145deg,#ffebba,#deba78);color:#472c13;border-color:#80551f;
}
html:not([data-platform="android"]) .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry):focus-visible{
  outline:3px solid #fff0bd;outline-offset:3px;transform:none;
}
html:not([data-platform="android"]) .topbar .toolbar>.header-shop-entry>.shop-attention-mark{z-index:2}
@media(max-width:999px){
  html:not([data-platform="android"]) .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry){
    flex-basis:56px;width:56px;min-width:56px;max-width:56px;height:56px;min-height:56px;padding:10px;
  }
  html:not([data-platform="android"]) .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry)>svg{flex-basis:34px;width:34px;height:34px}
}
@media(prefers-reduced-motion:reduce){
  html:not([data-platform="android"]) .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry){transition:none}
}
/* The menu tools form one full-width row; the in-run toolbar keeps its compact size. */
html:not([data-platform="android"]) .title-screen .topbar{
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;
  height:auto;min-height:0;
}
html:not([data-platform="android"]) .title-screen .topbar>.brand{grid-column:1;grid-row:1;min-width:0;max-width:100%}
html:not([data-platform="android"]) .title-screen .topbar .brand h1{white-space:normal;overflow-wrap:anywhere}
html:not([data-platform="android"]) .title-screen .topbar>.header-right{display:contents}
html:not([data-platform="android"]) .title-screen .topbar .stamina-meter{grid-column:2;grid-row:1;min-width:0;max-width:100%;flex-wrap:wrap;justify-self:end}
html:not([data-platform="android"]) .title-screen .topbar .toolbar{
  grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  width:100%;min-width:0;max-width:none;gap:8px;padding:4px;border:0;
}
html:not([data-platform="android"]) .title-screen .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry){
  width:100%;min-width:0;max-width:none;height:82px;min-height:82px;flex:none;padding:12px;
}
html:not([data-platform="android"]) .title-screen .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry)>svg{flex-basis:40px;width:40px;height:40px}
html:not([data-platform="android"]) .title-screen .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry):active{
  background:#d9b573;box-shadow:inset 0 0 0 3px #f5dfad,inset 0 3px 8px #65432355;transform:none;
}
@media(max-width:999px){
  html:not([data-platform="android"]) .title-screen .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry){height:72px;min-height:72px;padding:10px}
  html:not([data-platform="android"]) .title-screen .topbar .toolbar>button:is(.header-grimoire-entry,.header-shop-entry)>svg{flex-basis:38px;width:38px;height:38px}
}
@media(min-width:1000px){
  html:not([data-platform="android"]) .title-screen>.shell{grid-template-rows:auto minmax(0,1fr)}
  html:not([data-platform="android"]) .title-screen .title-body{position:relative;inset:auto;min-height:0;height:auto;padding:12px 0}
}
/* Two result destinations sit directly beneath the title, apart from the main action. */
html:not([data-platform="android"]) .result-modal .result-shortcuts{
  display:flex;align-items:center;flex-wrap:wrap;gap:12px;min-width:0;max-width:100%;
  margin:10px 0 14px;padding:4px;overflow:visible;
}
html:not([data-platform="android"]) .result-modal .result-shortcuts>button{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 56px;width:56px;min-width:56px;max-width:56px;height:56px;min-height:56px;
  margin:0;padding:10px;border:1px solid #936427;border-radius:8px;background:linear-gradient(145deg,#f5dfa3,#d6ad63);
  color:#543616;box-shadow:inset 0 0 0 3px #fcebc1,inset 0 0 0 4px #99703d7a,0 2px 0 #77532c;
  overflow:visible;transform:none;transition:background .18s,border-color .18s,color .18s;
}
html:not([data-platform="android"]) .result-shortcuts>button>svg{
  display:block;flex:0 0 34px;width:34px;height:34px;max-width:none;pointer-events:none;
}
html:not([data-platform="android"]) .result-shortcuts .header-collection-icon rect:last-of-type{fill:#ecd39c}
html:not([data-platform="android"]) .result-modal .result-shortcuts>button:is(:hover,:active){background:#efd49b;color:#472c13;transform:none}
html:not([data-platform="android"]) .result-modal .result-shortcuts>button:focus-visible{outline:3px solid #fff0bd;outline-offset:3px;box-shadow:0 0 0 2px #4d341d;transform:none}
@media(prefers-reduced-motion:reduce){html:not([data-platform="android"]) .result-modal .result-shortcuts>button{transition:none}}
