/* Merchant counters use the same flat illustrations and ink as the map. */
.shop-sheet{height:92vh;height:calc(var(--minitool-vh,1vh) * 92);height:min(760px,92dvh)}
.shop-sheet .modal-heading:before{background:#bb9a59}
.shop-experience .modal-heading:before{background:#9a8aab}
.shop-keys .modal-heading:before{background:#87a29a}
.shop-relic .modal-heading:before{background:#bc8c70}
.shop-sheet .modal-heading{min-width:0}
.shop-purse-line{display:grid;grid-template-columns:1fr 1fr;--minitool-row-gap:9px;--minitool-column-gap:9px;grid-gap:9px;gap:9px;flex-shrink:0;margin-bottom:10px}
.shop-purse-line.single-currency{grid-template-columns:minmax(0,1fr)}
.shop-balance{display:flex;align-items:center;--minitool-row-gap:6px;--minitool-column-gap:6px;grid-gap:6px;gap:6px;padding:9px 10px;border:1px solid #b8bda5;border-radius:5px 8px 5px 6px;background:#eeeede;min-width:0}
.shop-balance>svg{width:18px;height:18px;flex-shrink:0;color:#95804d}
.shop-balance>span{font-size:10px;color:#627151}
.shop-balance>strong{margin-left:auto;font-size:17px;font-variant-numeric:tabular-nums;color:#47573a;overflow-wrap:break-word;overflow-wrap:anywhere;min-width:0}
.shop-balance.main-currency{background:#eee3bb;border-color:#aa965e}
.shop-experience .shop-balance.main-currency{background:#e8dfeb;border-color:#a89caf}
.shop-balance.exp-balance>svg{color:#8e789f}
.shop-balance>span{flex-shrink:0;white-space:nowrap}
.shop-balance.large-balance{display:grid;grid-template-columns:18px minmax(0,1fr);--minitool-row-gap:2px;--minitool-column-gap:5px;grid-gap:2px 5px;gap:2px 5px;padding-top:6px;padding-bottom:6px;padding-block:6px}
.shop-balance.large-balance>strong{grid-column:1 / -1;margin:0;font-size:15px;line-height:1.2;text-align:right}
.shop-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#aeb79a transparent;padding:1px 3px 7px}
.merchant-counter{display:flex;align-items:center;--minitool-row-gap:13px;--minitool-column-gap:13px;grid-gap:13px;gap:13px;min-height:90px;margin:0 3px 7px}
.merchant-figure{position:relative;width:80px;height:86px;flex-shrink:0;display:flex;align-items:center;justify-content:center;padding-bottom:9px}
.shop-sheet .merchant-figure>.speaker-portrait{width:76px;height:80px;object-fit:contain;position:relative;z-index:1}
.counter-line{position:absolute;bottom:5px;left:0;right:0;height:10px;background:#d6c7a8;border:1.5px solid #7c8065;border-radius:50% 40% 3px 4px;transform:rotate(-2deg)}
.merchant-greeting{position:relative;border:1px solid #b1b69b;border-radius:9px 12px 9px 4px;background:#f1eddd;padding:12px 13px;flex:1;min-width:0}
.merchant-greeting:before{content:"";position:absolute;width:10px;height:10px;border-bottom:1px solid #b1b69b;border-left:1px solid #b1b69b;background:#f1eddd;transform:rotate(45deg);left:-6px;top:35px}
.merchant-label{display:inline-block;font-size:10px;color:#787a59;padding-bottom:5px;border-bottom:1px dashed #bec0a5;letter-spacing:1px}
.merchant-greeting p{font-size:12px;line-height:1.9;color:#536144;margin:6px 0 0}
.shop-held-resources{display:grid;grid-template-columns:repeat(3,1fr);--minitool-row-gap:5px;--minitool-column-gap:5px;grid-gap:5px;gap:5px;padding:9px 3px 11px;border-bottom:1px solid #b6bda0;margin-bottom:13px}
.shop-held-resources>span{display:flex;align-items:center;justify-content:center;--minitool-row-gap:4px;--minitool-column-gap:4px;grid-gap:4px;gap:4px;min-width:0}
.shop-held-resources img,.shop-held-resources svg{width:19px;height:21px;object-fit:contain;flex-shrink:0;color:#7f8f68}
.shop-held-resources small{font-size:9px;color:#667556}
.shop-held-resources b{font-size:12px;font-variant-numeric:tabular-nums;overflow-wrap:break-word;overflow-wrap:anywhere;color:#465638}
.counter-caption{display:flex;align-items:center;justify-content:space-between;--minitool-row-gap:7px;--minitool-column-gap:7px;grid-gap:7px;gap:7px;margin-bottom:13px}
.counter-caption>span{font-size:12px;color:#4d5e3f;font-weight:650;letter-spacing:.5px}
.counter-caption small{font-size:9px;color:#6f795f}
.shop-display{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));--minitool-row-gap:9px;--minitool-column-gap:9px;grid-gap:9px;gap:9px;align-items:stretch;padding:2px 1px 5px}
.shop-offer{position:relative;display:flex;align-items:stretch;flex-direction:column;text-align:center;min-width:0;background:#f6efdb;border:1.5px solid #8b9678;border-radius:7px 9px 6px 8px;padding:11px 7px 0;box-shadow:2px 3px 0 #cbd0b7;color:#425435;transition:transform .12s,box-shadow .12s,background .12s}
.shop-offer:nth-child(2){border-radius:9px 6px 8px 6px;background:#eef0df}
.shop-offer:nth-child(3){border-radius:6px 9px 5px 8px;background:#e7eee0}
.offer-art{position:relative;height:59px;display:flex;align-items:center;justify-content:center;margin-bottom:8px}.offer-art>img,.offer-art>canvas{width:58px;height:57px;max-width:100%;object-fit:contain}
.offer-title{font-size:12px;line-height:1.5;font-weight:650;overflow-wrap:break-word;overflow-wrap:anywhere}
.offer-effects{display:flex;flex:1;flex-direction:column;--minitool-row-gap:3px;--minitool-column-gap:3px;grid-gap:3px;gap:3px;justify-content:flex-start;min-height:42px;margin-top:6px;margin-bottom:8px}
.offer-primary{font-size:25px;font-weight:750;letter-spacing:-.5px;font-variant-numeric:tabular-nums;line-height:1.2;overflow-wrap:break-word;overflow-wrap:anywhere}
.offer-primary>small{font-size:10px;letter-spacing:0;font-weight:550;margin-left:2px}
.offer-extra{font-size:10px;line-height:1.6;white-space:nowrap;color:#5c6a4e}
.offer-price{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;--minitool-row-gap:4px;--minitool-column-gap:4px;grid-gap:4px;gap:4px;border-top:1px dashed #b5bea0;padding:9px 0 10px;min-height:42px;font-size:10px;line-height:1.3}
.offer-price>small{font-size:9px;color:#6c795e}
.offer-price>span{display:flex;align-items:center;justify-content:center;--minitool-row-gap:3px;--minitool-column-gap:3px;grid-gap:3px;gap:3px;min-width:0}
.offer-price svg,.offer-price img{width:15px;height:17px;object-fit:contain;color:#8b794b;flex-shrink:0}
.offer-price b{font-size:15px;letter-spacing:-.2px;font-variant-numeric:tabular-nums;color:#6a5935;overflow-wrap:break-word;overflow-wrap:anywhere}
.price-unit{font-size:9px;color:#6d755e}
.offer-action{display:flex;--minitool-row-gap:4px;--minitool-column-gap:4px;grid-gap:4px;gap:4px;align-items:center;justify-content:center;background:#dce4c9;border-top:1px solid #a0ad8b;padding:10px 3px;margin:0 -7px;min-height:42px;border-radius:0 0 6px 6px;color:#425d35;font-size:11px;line-height:1.5;font-weight:650}
.offer-action i{font-style:normal;font-size:16px}
.shop-offer:not(:disabled):hover{border-color:#536c45;background:#f4eac7}
.shop-offer:not(:disabled):active{transform:translateY(3px);box-shadow:none}
.shop-offer:disabled{opacity:1;cursor:default;background:#e9e8da;border-color:#b0b6a0;box-shadow:1px 2px 0 #dbddcf}.shop-offer:disabled .offer-art>img,.shop-offer:disabled .offer-art>canvas{opacity:.55}
.shop-offer:disabled .offer-primary,.shop-offer:disabled .offer-title{color:#7c816e}
.shop-offer:disabled .offer-action{background:#e7dfd0;color:#906950;border-color:#c2b59f;font-size:10px;font-weight:550}
.shop-display.single-offer{grid-template-columns:minmax(0,1fr);max-width:230px;margin-left:auto;margin-right:auto;margin-inline:auto}
.single-offer .shop-offer{padding:13px 14px 0}
.single-offer .offer-art{height:95px;margin-bottom:12px}.single-offer .offer-art>img,.single-offer .offer-art>canvas{width:90px;height:91px}
.single-offer .offer-effects{min-height:32px}
.single-offer .offer-action{margin-left:-14px;margin-right:-14px;margin-inline:-14px}
.relic-tag{position:absolute;top:2px;right:-7px;font-size:10px;background:#ddc28c;color:#6b5735;border:1px solid #aa945f;padding:4px 8px;transform:rotate(6deg);border-radius:2px}
.shop-footer{margin-top:8px;padding-top:9px}
.shop-receipt{min-height:32px;display:flex;align-items:center;justify-content:center;--minitool-row-gap:6px;--minitool-column-gap:6px;grid-gap:6px;gap:6px;font-size:10px;color:#6b775c;line-height:1.7;margin:0 0 7px;text-align:center}
.shop-receipt.received{background:#e8edd9;border-radius:4px;color:#4d6838;padding:5px 7px;animation:stamp-bookmark .2s ease-out}
.shop-receipt svg{width:16px;height:16px;flex-shrink:0}
.shop-leave{width:100%;justify-content:space-between;background:#efeada;border-color:#9aa78a}
.shop-restocked{animation:none}
@media(max-width:359px){
  .shop-display{--minitool-row-gap:6px;--minitool-column-gap:6px;grid-gap:6px;gap:6px}
  .shop-offer{padding:8px 5px 0}
  .offer-art{height:56px;margin-bottom:7px}.offer-art>img,.offer-art>canvas{width:51px;height:55px}
  .offer-title{font-size:11px}
  .offer-primary{font-size:22px}
  .offer-extra{font-size:9px}
  .offer-action{margin-left:-5px;margin-right:-5px;margin-inline:-5px;font-size:10px}
  .offer-price{--minitool-row-gap:2px;--minitool-column-gap:2px;grid-gap:2px;gap:2px;font-size:9px;padding-top:8px;padding-bottom:8px;padding-block:8px}
  .offer-price>small{display:none}
  .offer-price b{font-size:13px}
  .offer-price svg,.offer-price img{width:12px;height:15px}
  .price-unit{font-size:8px}
  .merchant-counter{--minitool-row-gap:10px;--minitool-column-gap:10px;grid-gap:10px;gap:10px;margin-left:0;margin-right:0;margin-inline:0}
  .merchant-figure{width:69px;height:84px}
  .shop-sheet .merchant-figure>.speaker-portrait{width:66px;height:78px}
  .merchant-greeting{padding:9px 10px}
  .merchant-greeting p{font-size:11px}
  .shop-held-resources small{font-size:8px}
  .shop-held-resources b{font-size:11px}
}
@media(max-height:740px){
  .shop-purse-line{margin-bottom:5px}
  .shop-balance{padding-top:7px;padding-bottom:7px;padding-block:7px}
  .merchant-counter{min-height:88px;margin-top:0;margin-bottom:4px}
  .merchant-figure{height:84px}
  .shop-sheet .merchant-figure>.speaker-portrait{height:78px;width:69px}
  .merchant-greeting p{line-height:1.7;margin-top:4px}
  .shop-held-resources{padding-top:6px;padding-bottom:6px;padding-block:6px;margin-bottom:9px}
  .counter-caption{margin-bottom:9px}
  .offer-art{height:54px;margin-bottom:6px}.offer-art>img,.offer-art>canvas{width:49px;height:52px}
  .offer-effects{min-height:30px;margin-top:4px}
  .offer-action{min-height:37px;padding-top:7px;padding-bottom:7px;padding-block:7px}
  .offer-price{min-height:34px;padding-top:6px;padding-bottom:6px;padding-block:6px}
  .shop-footer{margin-top:5px;padding-top:5px}
  .shop-receipt{min-height:26px;margin-bottom:5px}
  .single-offer .offer-art{height:65px;margin-bottom:5px}.single-offer .offer-art>img,.single-offer .offer-art>canvas{height:63px;width:63px}
}
@media(max-height:820px){
  .shop-body{padding-bottom:4px}
  .merchant-counter{min-height:61px;margin-bottom:3px;--minitool-row-gap:9px;--minitool-column-gap:9px;grid-gap:9px;gap:9px}
  .merchant-figure{width:57px;height:60px}
  .shop-sheet .merchant-figure>.speaker-portrait{width:53px;height:57px}
  .merchant-greeting{padding:6px 9px}
  .merchant-label{font-size:9px;padding-bottom:3px}
  .merchant-greeting p{font-size:10px;line-height:1.5;margin-top:3px}
  .merchant-greeting:before{top:25px}
  .shop-held-resources{padding-top:5px;padding-bottom:5px;padding-block:5px;margin-bottom:7px}
  .counter-caption{margin-bottom:8px}
  .shop-display:not(.single-offer){grid-template-columns:1fr;--minitool-row-gap:8px;--minitool-column-gap:8px;grid-gap:8px;gap:8px}
  .shop-display .shop-offer{display:grid;grid-template-columns:39px minmax(0,1fr) 82px;grid-template-rows:auto auto;--minitool-column-gap:8px;grid-column-gap:8px;column-gap:8px;padding:7px 9px;min-height:73px;text-align:left}
  .shop-display .offer-art{grid-column:1;grid-row:1/3;width:39px;height:50px;margin:0;align-self:center}.shop-display .offer-art>img,.shop-display .offer-art>canvas{width:39px;height:48px}
  .shop-display .offer-title{grid-column:2;grid-row:1;font-size:11px;align-self:end}
  .shop-display .offer-effects{grid-column:2;grid-row:2;flex-direction:row;flex-wrap:wrap;--minitool-row-gap:2px;--minitool-column-gap:6px;grid-gap:2px 6px;gap:2px 6px;min-height:0;margin:3px 0 0;align-self:start}
  .shop-display .offer-primary{font-size:18px;flex-basis:100%}
  .shop-display .offer-extra{font-size:9px;line-height:1.4}
  .shop-display .offer-price{grid-column:3;grid-row:1/3;align-self:start;min-height:24px;border:0;margin:0;padding:0;justify-content:center}
  .shop-display .offer-price>small{display:none}
  .shop-display .offer-action{grid-column:3;grid-row:1/3;align-self:end;min-height:28px;margin:0;padding:4px 2px;border:1px solid #a0ad8b;border-radius:4px;font-size:10px;text-align:center}
  .shop-display .unavailable .offer-action{font-size:9px}
  .shop-display.single-offer{max-width:none;margin-top:12px;margin-bottom:0;margin-block:12px 0}
  .single-offer .shop-offer{grid-template-columns:54px minmax(0,1fr) 82px;min-height:113px}
  .single-offer .offer-art{width:54px;height:72px}.single-offer .offer-art>img,.single-offer .offer-art>canvas{width:54px;height:65px}
  .single-offer .offer-title{font-size:14px}
  .single-offer .offer-primary{font-size:24px}
  .single-offer .relic-tag{top:-13px;right:-8px;font-size:8px;padding:3px 5px}
  .shop-receipt:not(.received){display:none}
}
/* Keep the counter's controls outside the scrolling stock on short screens. */
@media(max-height:600px){
  .shop-sheet.adventure-sheet.minitool-has-feedback{overflow:hidden}
  .shop-sheet.adventure-sheet:has(.feedback-notice){overflow:hidden}
  .shop-sheet.adventure-sheet>.feedback-host{min-height:0;max-height:25vh;max-height:calc(var(--minitool-vh,1vh) * 25);max-height:min(128px,25dvh);overflow:auto;overscroll-behavior:contain}
}
@media(max-height:480px){
  .shop-sheet.adventure-sheet{height:calc(100vh - 24px - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));height:calc(calc(var(--minitool-vh,1vh) * 100) - 24px - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));height:calc(100dvh - 24px - var(--safe-area-inset-top,env(safe-area-inset-top,0px)) - var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));overflow:hidden}
  .shop-body{flex:1;min-height:0;overflow-y:auto}
  .shop-balance>strong{font-size:14px}
  .shop-footer{flex-shrink:0}
}
@media(min-width:540px) and (max-height:480px){
  .shop-sheet.adventure-sheet{width:100%;width:min(820px,100%);display:grid;grid-template-columns:minmax(130px,.7fr) minmax(0,1.3fr);grid-template-rows:auto minmax(0,1fr) auto;--minitool-row-gap:8px;--minitool-column-gap:12px;grid-gap:8px 12px;gap:8px 12px;padding:10px 12px}
  .shop-sheet .modal-header{grid-column:1;grid-row:1;min-height:44px;margin:0;padding:0;border:0}
  .shop-sheet .modal-header h2{font-size:17px}
  .shop-sheet .modal-heading{padding-left:9px}
  .shop-sheet .modal-heading:before{top:-10px;height:26px}
  .shop-sheet .modal-header{position:static}
  .shop-sheet .close-button{position:absolute;top:10px;right:12px}
  .shop-purse-line{grid-column:2;grid-row:1;align-self:center;--minitool-row-gap:6px;--minitool-column-gap:6px;grid-gap:6px;gap:6px;margin:0 54px 0 0}
  .shop-balance{--minitool-row-gap:4px;--minitool-column-gap:4px;grid-gap:4px;gap:4px;padding:7px 6px}
  .shop-balance>svg{width:14px;height:14px}
  .shop-balance>span{font-size:9px}
  .shop-balance>strong{font-size:13px}
  .shop-body{grid-column:1 / -1;grid-row:2;display:grid;grid-template-columns:134px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);--minitool-row-gap:5px;--minitool-column-gap:12px;grid-gap:5px 12px;gap:5px 12px;overflow:hidden;padding:0 3px 3px}
  .shop-counter-summary{grid-column:1;grid-row:1 / -1;min-width:0}
  .merchant-counter{min-height:42px;margin:0 0 5px;--minitool-row-gap:5px;--minitool-column-gap:5px;grid-gap:5px;gap:5px}
  .merchant-figure{width:39px;height:43px;padding-bottom:3px}
  .shop-sheet .merchant-figure>.speaker-portrait{width:36px;height:41px}
  .counter-line{bottom:0;height:6px}
  .merchant-greeting{padding:6px;flex:1}
  .merchant-greeting:before{top:14px}
  .merchant-label{border:0;padding:0;font-size:10px;letter-spacing:0}
  .merchant-greeting p{display:none}
  .shop-held-resources{grid-template-columns:1fr;--minitool-row-gap:5px;--minitool-column-gap:5px;grid-gap:5px;gap:5px;padding:6px 1px 0;margin:0;border:0}
  .shop-held-resources>span{justify-content:flex-start;--minitool-row-gap:5px;--minitool-column-gap:5px;grid-gap:5px;gap:5px}
  .shop-held-resources small{font-size:10px}
  .shop-held-resources small{flex-shrink:0;white-space:nowrap}
  .shop-held-resources b{font-size:11px;min-width:0}
  .counter-caption{grid-column:2;grid-row:1;margin:0;padding:1px 2px 3px}
  .shop-display,.shop-display.single-offer{grid-column:2;grid-row:2;min-height:0;max-width:none;margin:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#aeb79a transparent;align-content:start;padding:1px 4px 4px 1px;scroll-padding-top:4px;scroll-padding-bottom:4px;scroll-padding-block:4px}
  /* One row per offer: effect, price and action read together, three rows per screen. */
  .shop-display .shop-offer{grid-template-columns:34px minmax(0,1fr) auto 84px;min-height:50px;padding:4px 8px;align-items:center}
  .shop-display .offer-art{width:34px;height:42px}.shop-display .offer-art>img,.shop-display .offer-art>canvas{width:34px;height:40px}
  .shop-display .offer-title{font-size:12px}
  .shop-display .offer-primary{font-size:16px;line-height:1.15}
  .shop-display .offer-extra{font-size:10px}
  .shop-display .offer-price{grid-column:3;grid-row:1 / 3;align-self:center;flex-wrap:nowrap;white-space:nowrap}
  .shop-display .offer-action{grid-column:4;grid-row:1 / 3;align-self:center;min-height:34px}
  .shop-display.single-offer{padding-top:5px}
  .single-offer .shop-offer{grid-template-columns:42px minmax(0,1fr) auto 84px;min-height:64px}
  .single-offer .offer-art{width:42px;height:52px}.single-offer .offer-art>img,.single-offer .offer-art>canvas{width:42px;height:50px}
  .single-offer .relic-tag{top:-6px}
  .shop-footer{grid-column:1 / -1;grid-row:3;display:flex;align-items:center;--minitool-row-gap:12px;--minitool-column-gap:12px;grid-gap:12px;gap:12px;padding-top:6px;margin:0;min-width:0}
  .shop-receipt.received{flex:1;min-width:0;min-height:0;margin:0;padding:3px 6px;font-size:10px;animation:none}
  .shop-leave{width:auto;min-width:200px;margin-left:auto;flex-shrink:0}
  .shop-sheet.adventure-sheet.minitool-has-feedback{grid-template-rows:auto auto minmax(0,1fr) auto}
  .shop-sheet.adventure-sheet:has(.feedback-notice){grid-template-rows:auto auto minmax(0,1fr) auto}
  .shop-sheet.adventure-sheet>.feedback-host{grid-column:1 / -1;grid-row:2;max-height:64px;margin:0}
  .shop-sheet.minitool-has-feedback .shop-body{grid-row:3;grid-template-rows:minmax(0,1fr)}
  .shop-sheet:has(.feedback-notice) .shop-body{grid-row:3;grid-template-rows:minmax(0,1fr)}
  .shop-sheet.minitool-has-feedback .merchant-counter,.shop-sheet.minitool-has-feedback .counter-caption{display:none}
  .shop-sheet:has(.feedback-notice) .merchant-counter,.shop-sheet:has(.feedback-notice) .counter-caption{display:none}
  .shop-sheet.minitool-has-feedback .shop-display{grid-row:1}
  .shop-sheet:has(.feedback-notice) .shop-display{grid-row:1}
  .shop-sheet.minitool-has-feedback .shop-footer{grid-row:4}
  .shop-sheet:has(.feedback-notice) .shop-footer{grid-row:4}
}
@media(prefers-reduced-motion:reduce){.shop-sheet *{animation:none!important;transition:none!important}}
