.shop-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.shop-sidebar, .shop-content { min-width: 0; }
.shop-categories { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.shop-page .menu-button { --button-face-color: var(--menu-face); --button-base-color: var(--depth); color: var(--muted); }
.shop-page .menu-button:is(:hover, :focus-visible, :active, [aria-current="page"]) { color: var(--accent); }
.shop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.shop-grid-item { min-width: 0; }
.shop-item { position: relative; aspect-ratio: 3 / 4; display: flex; flex-direction: column; min-width: 0; padding: 18px; color: var(--text); overflow-wrap: anywhere; }
.shop-item-open { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.shop-item:has(.shop-item-open:hover), .shop-item:has(.shop-item-open:focus-visible) { outline: 2px solid var(--accent); outline-offset: -6px; }
.shop-category-image { flex: 0 0 18px; object-fit: contain; }
.shop-item-modal { width: 680px; max-width: min(90vw, 680px); max-height: 85dvh; overflow: auto; overflow-wrap: anywhere; }
.shop-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.shop-modal-header h2 { min-width: 0; margin: 0; }
.shop-modal-header form { flex: 0 0 auto; margin: 0; }
.shop-modal-header .shop-modal-close { margin: 0; min-width: 40px; min-height: 40px; }
.shop-modal-close .menu-button-content { font-size: 26px; }
.shop-modal-image { display: block; max-width: 100%; max-height: 240px; margin: 0 auto 20px; object-fit: contain; }
.shop-modal-description { color: var(--muted); margin-bottom: 20px; }
.shop-modal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.shop-modal-actions button { margin-top: 0; }
.shop-modal-actions form { margin: 0; }
.shop-purchase-status { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.shop-item-duration { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.shop-modal-actions button:disabled { cursor: default; filter: none; }
.shop-markdown { line-height: 1.7; margin-bottom: 24px; }
.shop-markdown :is(p, ul, ol, blockquote, pre, table) { margin: 0 0 1em; }
.shop-markdown :is(h1, h2, h3, h4, h5, h6) { color: var(--accent); margin: 1em 0 .5em; line-height: 1.3; }
.shop-markdown :is(ul, ol) { padding-left: 24px; }
.shop-markdown ul { list-style: disc; }
.shop-markdown ol { list-style: decimal; }
.shop-markdown a { color: var(--accent); text-decoration: underline; }
.shop-markdown img { max-width: 100%; height: auto; }
.shop-markdown pre { padding: 12px; overflow-x: auto; background: color-mix(in srgb, var(--text) 8%, transparent); }
.shop-markdown code { font-family: Consolas, monospace; }
.shop-markdown blockquote { border-left: 4px solid var(--accent); padding-left: 16px; }
.shop-markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.shop-markdown :is(td, th) { border: 1px solid var(--muted); padding: 8px; }
.shop-item-art { display: grid; place-items: center; flex: 1 1 auto; min-height: 64px; margin-bottom: 16px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.shop-item-art > img { width: 100%; height: 100%; max-height: 160px; object-fit: contain; }
.shop-item-placeholder { width: 40px; height: 40px; background: var(--muted); mask: url('/static/images/icon-shop.svg') center / contain no-repeat; }
.shop-item-details h3 { margin: 0; color: var(--accent); font-size: 16px; line-height: 1.4; }
.shop-item-details p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.shop-item-footer { margin-top: 16px; }
.shop-item-price { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 15px; line-height: 1.4; }
.shop-price-unit { font-size: 12px; color: var(--muted); }
.shop-empty { padding: 28px; color: var(--text); }
.shop-empty h3 { margin: 0 0 10px; color: var(--accent); font-size: 20px; }
.shop-empty p { margin: 0; font-size: 16px; line-height: 1.6; }
.shop-subscriptions { min-width: 0; margin-bottom: 24px; padding: 24px; color: var(--text); }
.shop-subscriptions-scroll { max-width: 100%; overflow-x: auto; }
.shop-subscriptions-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.shop-subscriptions-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.5; }
.shop-subscriptions-table caption { padding: 0 0 24px; color: var(--accent); text-align: left; font-size: 24px; font-weight: 650; }
.shop-subscriptions-emblem { display: inline-block; width: 24px; height: 24px; margin-right: 10px; vertical-align: -3px; background: currentColor; mask: url('/static/images/icon-crown.svg') center / contain no-repeat; }
.shop-subscriptions-table :is(th, td) { --plan-accent: var(--plan-color, var(--accent)); --plan-readable-accent: color-mix(in srgb, var(--plan-accent) 40%, var(--text)); padding: 16px; border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent); overflow-wrap: anywhere; }
.shop-subscriptions-table th { font-weight: 600; }
.shop-subscriptions-table th:first-child { position: sticky; left: 0; z-index: 2; min-width: 180px; max-width: 260px; text-align: left; background: var(--ink); border-right: 1px solid color-mix(in srgb, var(--text) 12%, transparent); }
.shop-subscriptions-table td, .shop-subscriptions-table thead th:not(:first-child) { min-width: 160px; text-align: center; }
.shop-subscriptions-table thead th { padding: 0 8px 20px; color: var(--plan-readable-accent); font-size: 18px; vertical-align: bottom; border-bottom: 2px solid var(--depth); }
.shop-subscriptions-table thead th:first-child { padding: 16px; color: var(--muted); font-size: 13px; }
.shop-plan-banner { height: 100%; padding: 20px 12px 16px; background: color-mix(in srgb, var(--plan-accent) 9%, var(--ink)); border-top: 4px solid var(--plan-accent); clip-path: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% 100%, 0 100%, 0 8px, 8px 8px); }
.shop-subscriptions-table thead th:nth-child(odd) .shop-plan-banner { background: color-mix(in srgb, var(--plan-accent) 14%, var(--ink)); }
.shop-plan-art { position: relative; display: grid; place-items: center; width: 104px; height: 96px; margin: 0 auto 16px; background: linear-gradient(var(--depth), var(--depth)) center bottom / 72px 6px no-repeat, linear-gradient(color-mix(in srgb, var(--plan-accent) 14%, transparent), color-mix(in srgb, var(--plan-accent) 14%, transparent)) center bottom 6px / 88px 6px no-repeat; }
.shop-plan-art::before, .shop-plan-art::after { content: ''; position: absolute; width: 6px; height: 6px; background: var(--plan-accent); pointer-events: none; }
.shop-plan-art::before { left: 0; top: 20px; }
.shop-plan-art::after { right: 0; top: 44px; width: 4px; height: 4px; background: var(--edge); }
.shop-subscription-image { display: block; width: 72px; height: 72px; object-fit: contain; transition: transform 180ms ease-out; }
.shop-plan-placeholder { width: 52px; height: 52px; background: var(--plan-accent); mask: url('/static/images/icon-crown.svg') center / contain no-repeat; transition: transform 180ms ease-out; }
.shop-plan-banner:hover :is(.shop-subscription-image, .shop-plan-placeholder) { transform: translateY(-4px); }
.shop-plan-name { display: block; line-height: 1.35; }
.shop-subscriptions-table tbody tr:nth-child(even) > * { background: color-mix(in srgb, var(--text) 3%, var(--ink)); }
.shop-subscriptions-table tbody tr:hover > * { background: color-mix(in srgb, var(--plan-accent) 9%, var(--ink)); }
.shop-feature-check { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--ink); background: var(--plan-readable-accent); font-size: 20px; font-weight: 750; clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px); }
.shop-feature-absent { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--muted); }
.shop-feature-value { display: inline-block; padding: 4px 10px; color: var(--text); border-bottom: 2px solid var(--depth); background: color-mix(in srgb, var(--plan-accent) 10%, var(--ink)); }
.shop-subscriptions-table tfoot :is(th, td) { padding-top: 24px; border-bottom: 0; border-top: 2px solid var(--depth); vertical-align: top; }
.shop-subscriptions-table tfoot td { background: color-mix(in srgb, var(--plan-accent) 5%, var(--ink)); }
.shop-subscription-price { margin: 0; color: var(--plan-readable-accent); font-size: 26px; font-weight: 700; white-space: nowrap; line-height: 1.2; }
.shop-subscription-duration { display: inline-block; margin: 10px 0 22px; padding: 4px 8px; color: var(--muted); background: var(--ink); font-size: 12px; }
@media (prefers-reduced-motion: reduce) {
  .shop-subscription-image, .shop-plan-placeholder { transition: none; }
  .shop-plan-banner:hover :is(.shop-subscription-image, .shop-plan-placeholder) { transform: none; }
}
@media (max-width: 639px) {
  .shop-subscriptions { padding: 16px; }
  .shop-subscriptions-table th:first-child { min-width: 140px; max-width: 180px; }
  .shop-subscriptions-table :is(th, td) { padding: 12px; }
  .shop-subscription-price { font-size: 23px; }
}
.shop-comparison-error { color: var(--page-foreground); margin: 0 0 20px; font-size: 16px; }
@media (max-width: 1000px) {
  .shop-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 20px; }
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 767px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); }
  .shop-categories { flex-direction: row; flex-wrap: wrap; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .shop-grid { grid-template-columns: minmax(0, 1fr); }
}
.shop-payment-field { display: grid; gap: 6px; margin-bottom: 12px; }
.shop-payment-field input, .shop-payment-field select { box-sizing: border-box; max-width: 100%; min-width: 0; padding: 8px; font: inherit; color: var(--text); background: var(--menu-face); border: 1px solid var(--muted); }
.shop-payment-order { padding: 16px; overflow-wrap: anywhere; }

.shop-subscriptions-table tfoot .pixel-button-raised { --button-face-color: var(--plan-readable-accent); --button-base-color: color-mix(in srgb, var(--plan-accent) 45%, var(--depth)); }
.shop-subscriptions-table tfoot .pixel-button-raised:is(:hover, :active) { --button-face-color: color-mix(in srgb, var(--plan-readable-accent) 85%, var(--text)); }
