/* Compact one-page shop catalog and full deck detail sheet. */
.shop-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
#page-shop{padding-bottom:calc(112px + env(safe-area-inset-bottom))}
#page-shop .page-title-row{padding-top:max(6px,env(safe-area-inset-top))}
#page-shop .shop-buy-guide{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;margin:8px 0 10px}
#page-shop .shop-buy-guide strong,#page-shop .shop-buy-guide span{margin:0;font-size:12px}
.shop-catalog-toolbar{position:sticky;top:0;z-index:40;margin:0 -4px 12px;padding:8px 4px 6px;background:linear-gradient(180deg,rgba(10,0,0,.98),rgba(10,0,0,.94) 82%,transparent);backdrop-filter:blur(14px)}
.shop-search{display:grid;grid-template-columns:28px minmax(0,1fr) 38px;align-items:center;min-height:46px;padding:0 4px 0 10px;border-radius:16px;color:var(--text2);background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);box-shadow:0 8px 24px rgba(0,0,0,.14)}
.shop-search:focus-within{border-color:rgba(240,192,64,.58);box-shadow:0 0 0 3px rgba(240,192,64,.11),0 8px 24px rgba(0,0,0,.14)}
.shop-search>span{font-size:22px;font-weight:900;text-align:center}
.shop-search input{width:100%;min-width:0;height:44px;padding:0 8px;border:0;outline:0;color:var(--text);background:transparent;font-size:15px}
.shop-search input::-webkit-search-cancel-button{display:none}
.shop-search-clear{width:34px;height:34px;border:0;border-radius:999px;color:var(--text2);background:rgba(255,255,255,.08);font-size:14px;font-weight:900}
.shop-search-clear[hidden]{display:block;visibility:hidden;pointer-events:none}
#page-shop .shop-balance-row{margin:8px 0 4px;gap:8px}
#page-shop .balance-chip{min-height:32px;padding:5px 10px;font-size:11px}
#page-shop .shop-filter-row{display:flex;flex-wrap:nowrap;gap:7px;margin:6px -4px 5px;padding:2px 4px 5px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;overscroll-behavior-inline:contain}
#page-shop .shop-filter-row::-webkit-scrollbar{display:none}
#page-shop .shop-filter-btn{flex:0 0 auto;min-height:36px;padding:7px 11px;scroll-snap-align:start;font-size:11px;white-space:nowrap}
#page-shop .shop-filter-count{margin:0 2px;font-size:11px}
#page-shop .shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))!important;gap:12px!important;align-items:stretch!important;padding-bottom:16px}
#page-shop .shop-catalog-tile{position:relative;display:flex;flex-direction:column;width:100%;min-width:0;height:100%;min-height:0;border-radius:18px;overflow:hidden;background:radial-gradient(circle at 20% 0%,rgba(212,160,23,.12),transparent 30%),linear-gradient(180deg,rgba(255,255,255,.065),rgba(255,255,255,.025))}
#page-shop .shop-catalog-tile .compact-pack-hero{position:relative;padding:0;min-height:0;overflow:hidden}
.shop-tile-open{display:block;width:100%;padding:0;border:0;color:inherit;background:transparent;text-align:inherit}
#page-shop .shop-single-teaser{aspect-ratio:16/9!important}
#page-shop .shop-catalog-tile .pack-badge{top:7px;right:7px;max-width:calc(100% - 14px);padding:4px 6px;border-radius:8px;overflow:hidden;font-size:8px;line-height:1;text-overflow:ellipsis;white-space:nowrap}
.shop-tile-badges{position:absolute;z-index:4;left:7px;right:7px;bottom:7px;display:flex;align-items:flex-end;gap:4px;pointer-events:none}
.shop-tile-badges .pack-type-labels{display:flex;min-width:0;margin:0;gap:4px}
.shop-tile-badges .pack-type-label{min-height:19px;max-width:82px;padding:3px 6px;overflow:hidden;font-size:8px;text-overflow:ellipsis;white-space:nowrap;background:rgba(18,8,20,.78);backdrop-filter:blur(8px)}
.shop-tile-badges .pack-rights-label{flex:0 1 auto;width:auto;min-width:0;max-width:108px;min-height:19px;margin:0 0 0 auto;padding:3px 6px;overflow:hidden;font-size:8px;line-height:1.15;text-overflow:ellipsis;white-space:nowrap;background:rgba(18,8,20,.78);backdrop-filter:blur(8px)}
#page-shop .shop-catalog-tile .compact-pack-content{display:flex;flex:1;flex-direction:column;padding:10px}
#page-shop .shop-catalog-tile .pack-name{display:-webkit-box;min-height:34px;max-height:34px;margin:0 0 7px;overflow:hidden;font-size:14px;line-height:17px;letter-spacing:.055em;-webkit-box-orient:vertical;-webkit-line-clamp:2}
#page-shop .shop-catalog-tile .compact-pack-chips{display:flex;flex-wrap:nowrap;min-width:0;margin:0 0 8px;gap:4px;overflow:hidden}
#page-shop .shop-catalog-tile .compact-pack-chips span{min-width:0;max-width:58%;padding:4px 6px;overflow:hidden;font-size:9px;text-overflow:ellipsis;white-space:nowrap}
#page-shop .shop-catalog-tile .pack-card-footer{display:grid;gap:7px;margin-top:auto}
#page-shop .shop-catalog-tile .pack-purchase-status{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:5px!important;min-height:24px;margin:0!important}
#page-shop .shop-catalog-tile .pack-status-pill{min-width:0;max-width:64%;padding:4px 6px;overflow:hidden;font-size:8px;text-overflow:ellipsis;white-space:nowrap}
#page-shop .shop-catalog-tile .pack-price{flex:0 0 auto;font-size:14px!important;line-height:1;white-space:nowrap}
#page-shop .shop-catalog-tile .custom-offer-price{display:grid;gap:1px}
.shop-tile-actions{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;gap:5px}
.shop-tile-actions .btn{width:100%;min-width:0;min-height:44px!important;margin:0!important;padding:7px!important;border-radius:12px!important;font-size:12px!important}
.shop-tile-actions .shop-tile-preview{display:flex;align-items:center;justify-content:center;gap:5px}
.shop-tile-actions .shop-tile-details{font-size:11px!important}
.shop-tile-actions .shop-tile-cart{font-size:17px!important}
.shop-tile-actions .shop-tile-cart::after{display:none!important}
.shop-empty-state{grid-column:1/-1;display:grid;place-items:center;gap:8px;min-height:280px;padding:30px;border:1px dashed rgba(255,255,255,.16);border-radius:22px;color:var(--text2);text-align:center}
.shop-empty-state>span{font-size:42px;color:var(--gold)}
.shop-empty-state h3,.shop-empty-state p{margin:0}
.shop-empty-state .btn{margin-top:8px}
.shop-detail-bg{position:fixed;z-index:2150;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:18px 14px 0;background:rgba(0,0,0,.76);backdrop-filter:blur(10px)}
.shop-detail-open{overflow:hidden}
.shop-detail-sheet{position:relative;display:flex;flex-direction:column;width:min(640px,100%);max-height:min(92dvh,880px);overflow:hidden;border:1px solid rgba(240,192,64,.3);border-bottom:0;border-radius:26px 26px 0 0;background:radial-gradient(circle at 18% 0%,rgba(212,160,23,.18),transparent 32%),linear-gradient(180deg,#20090a,#100405);box-shadow:0 -24px 80px rgba(0,0,0,.56);animation:shopDetailEnter .24s ease both}
@keyframes shopDetailEnter{from{transform:translateY(24px);opacity:.65}to{transform:translateY(0);opacity:1}}
.shop-detail-close{position:absolute;z-index:8;top:12px;right:12px;width:42px;height:42px;border:1px solid rgba(255,255,255,.22);border-radius:999px;color:#fff;background:rgba(0,0,0,.66);font-size:18px;font-weight:900;backdrop-filter:blur(8px)}
.shop-detail-hero{flex:0 0 auto;overflow:hidden;background:#080b14}
.shop-detail-teaser{aspect-ratio:16/8.5;max-height:300px}
.shop-detail-scroll{min-height:0;padding:18px 20px 14px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.shop-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.shop-detail-heading .pack-kicker{margin:0 0 5px}
.shop-detail-heading h2{margin:0;font-size:clamp(23px,5vw,34px);line-height:1.03}
.shop-detail-heading .pack-price{flex:0 0 auto;color:#ff7469;font-size:24px;font-weight:950;white-space:nowrap}
.shop-detail-badges{display:flex;flex-wrap:wrap;gap:7px;margin:13px 0}
.shop-detail-badges .pack-type-labels{display:flex;flex-wrap:wrap;gap:7px;margin:0}
.shop-detail-badges .pack-rights-label{margin:0}
.shop-detail-count{display:inline-flex;align-items:center;min-height:24px;padding:4px 9px;border:1px solid rgba(255,255,255,.12);border-radius:999px;color:var(--text2);background:rgba(255,255,255,.065);font-size:11px;font-weight:900}
.shop-detail-description{margin:0 0 14px;color:var(--text2);font-size:14px;line-height:1.55}
.shop-detail-promise{margin-top:12px;padding:10px 12px;border-radius:14px;color:#f6df9b;background:rgba(212,160,23,.10);border:1px solid rgba(212,160,23,.22);font-size:12px;font-weight:850}
.shop-detail-actions{position:sticky;bottom:0;z-index:3;display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1.2fr);gap:8px;align-items:center;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid rgba(255,255,255,.10);background:rgba(20,5,6,.97);box-shadow:0 -12px 30px rgba(0,0,0,.25)}
.shop-detail-actions .btn{width:100%;min-height:48px;margin:0}
.shop-detail-actions .btn-add-cart::after{display:none}
html[data-theme="day"] .shop-catalog-toolbar{background:linear-gradient(180deg,rgba(255,250,240,.98),rgba(255,250,240,.94) 82%,transparent)}
html[data-theme="day"] .shop-search{color:#475569;background:rgba(15,23,42,.05);border-color:rgba(15,23,42,.12)}
html[data-theme="day"] .shop-search input{color:#0f172a}
html[data-theme="day"] .shop-detail-sheet{background:linear-gradient(180deg,#fffaf0,#fff);border-color:rgba(146,101,7,.28)}
html[data-theme="day"] .shop-detail-description{color:#475569}
html[data-theme="day"] .shop-detail-actions{background:rgba(255,250,240,.98);border-color:rgba(15,23,42,.10)}
@media(max-width:640px){
  #page-shop .page-subtitle{margin-bottom:6px;font-size:12px;line-height:1.35}
  #page-shop .shop-buy-guide{display:flex;justify-content:space-between;margin-bottom:7px}
  #page-shop .shop-balance-row{display:block;height:0;margin:0}
  #page-shop .shop-balance-row .balance-chip{display:none}
  #page-shop .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  #page-shop .shop-catalog-tile .compact-pack-content{padding:9px}
  #page-shop .shop-catalog-tile .pack-name{font-size:13px;line-height:16px;min-height:32px;max-height:32px}
  .shop-tile-actions{grid-template-columns:minmax(0,1fr) 42px 42px}
  .shop-tile-actions .btn{min-height:42px!important}
  .shop-tile-actions .shop-tile-preview{font-size:11px!important}
  .shop-detail-bg{padding:10px 0 0}
  .shop-detail-sheet{width:100%;max-height:calc(100dvh - max(8px,env(safe-area-inset-top)));border-radius:24px 24px 0 0}
  .shop-detail-teaser{aspect-ratio:16/9}
  .shop-detail-scroll{padding:16px 16px 12px}
  .shop-detail-actions{grid-template-columns:auto 1fr 1.15fr;padding-left:12px;padding-right:12px}
  .shop-detail-actions .pack-status-pill{max-width:86px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .cart-chip.cart-chip-floating{bottom:calc(78px + env(safe-area-inset-bottom))!important}
}
@media(max-width:360px){
  #page-shop .shop-grid{gap:7px!important}
  #page-shop .shop-catalog-tile .compact-pack-content{padding:8px}
  .shop-tile-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .shop-tile-actions .btn{min-height:40px!important;padding:5px!important}
  .shop-tile-badges .pack-rights-label{max-width:82px}
  .shop-detail-actions{grid-template-columns:1fr 1.1fr}
  .shop-detail-actions>.pack-status-pill{display:none}
}
@media(min-width:900px){#page-shop .shop-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(prefers-reduced-motion:reduce){.shop-detail-sheet{animation:none}}

/* Day mode loads after the shared stylesheet, so the shop keeps the same
   accessible light hierarchy and touch targets as the rest of the app. */
html[data-theme="day"] #page-shop .shop-filter-btn{
  min-height:44px;
  padding:9px 13px;
  color:#253047;
  background:#fff;
  border-color:#94a3b8;
  box-shadow:0 2px 5px rgba(15,23,42,.08);
}
html[data-theme="day"] #page-shop .shop-filter-btn:hover{
  color:#0f172a;
  background:#f1f5f9;
  border-color:#475569;
}
html[data-theme="day"] #page-shop .shop-filter-btn.active{
  color:#422800;
  background:#fff0b5;
  border-color:#a96f00;
  box-shadow:inset 0 0 0 1px rgba(169,111,0,.22),0 4px 10px rgba(138,90,0,.12);
}
html[data-theme="day"] .shop-detail-bg{background:rgba(15,23,42,.46)}
html[data-theme="day"] .shop-detail-sheet{
  color:#172033;
  background:radial-gradient(circle at 18% 0%,rgba(246,197,71,.22),transparent 32%),linear-gradient(180deg,#fff,#f8fafc);
  border-color:#cbd5e1;
  box-shadow:0 -24px 80px rgba(15,23,42,.24);
}
html[data-theme="day"] .shop-detail-heading h2{color:#172033}
html[data-theme="day"] .shop-detail-count,
html[data-theme="day"] .shop-detail-promise{
  color:#334155;
  background:#f1f5f9;
  border-color:#cbd5e1;
}
html[data-theme="day"] .shop-detail-close{
  color:#253047;
  background:#fff;
  border-color:#94a3b8;
}
@media(max-width:640px){
  html[data-theme="day"] #page-shop .shop-filter-btn{min-height:44px}
}
