#shop-section .shop-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.shop-card.card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-width: 0;
    min-height: 294px;
    padding: 18px 18px 18px 16px;
    border: 1px solid #d9e0dd;
    border-left: 4px solid var(--shop-rarity, #95a5a6);
    border-radius: 5px;
    box-shadow: none;
}
.shop-card-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.shop-item-name { display: block; font-size: 18px; line-height: 1.5; color: #25312d; overflow-wrap: anywhere; }
.shop-card-rarity { max-width: 4em; padding-top: 4px; font-size: 13px; line-height: 1.5; font-weight: 600; color: var(--shop-rarity-ink, #657679); overflow-wrap: anywhere; }
.shop-card-supply { margin-top: 5px; font-size: 12px; line-height: 1.5; color: #6c7b74; }
.shop-card-supply.is-special { color: #7745a0; font-weight: 600; }
.shop-card-facts { margin: 14px 0; padding: 12px 0; border-top: 1px solid #e3e8e5; border-bottom: 1px solid #e3e8e5; }
.shop-card-facts > div { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.shop-card-facts > div + div { margin-top: 8px; }
.shop-card-facts dt { color: #829087; font-size: 13px; line-height: 1.6; }
.shop-card-facts dd { margin: 0; color: #35443d; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.shop-card-footer { margin-top: auto; }
.shop-card-pricing { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; margin-bottom: 14px; }
.shop-card-price { min-width: 0; font-size: 21px; line-height: 1.4; font-weight: 700; color: #c34d0b; overflow-wrap: anywhere; }
.shop-card-stock { font-size: 12px; line-height: 1.5; color: #397c52; }
.shop-card-out.card { background: #f8faf9; }
.shop-card-out .shop-card-stock { color: #aa4a40; }
.shop-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shop-card .btn-buy, .shop-card .shop-detail-trigger { margin: 0; min-width: 0; min-height: 44px; padding: 9px 6px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.5; border-radius: 4px; cursor: pointer; }
.shop-card .btn-buy { color: #fff; background: #245d49; border: 1px solid #245d49; }
.shop-card .btn-buy:hover { color: #fff; background: #194a39; border-color: #194a39; }
.shop-card .btn-buy:disabled { color: #8b9791; background: #e9efeb; border-color: #dce4df; cursor: not-allowed; }
.shop-card .shop-detail-trigger { background: #fff; border-color: #39785e; color: #245d49; }
.shop-card .shop-detail-trigger:hover { background: #eff7f3; }
.shop-card-remove { width: 100%; min-height: 36px; margin-top: 10px; border: 1px solid #e3c3bf; border-radius: 4px; background: #fff; color: #a0473e; font: inherit; font-size: 12px; cursor: pointer; }
.shop-card-remove:hover { background: #fff4f2; }
.shop-card .btn-buy:focus-visible, .shop-card-remove:focus-visible { outline: 2px solid #277b6e; outline-offset: 3px; }
.shop-detail-trigger {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    margin-top: auto;
    border: 1px solid #b7d2ca;
    border-radius: 4px;
    background: #eff7f3;
    color: #277b6e;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
}
.shop-detail-trigger:hover { background: #e1f0e9; border-color: #77a795; }
.shop-detail-trigger:focus-visible,
.shop-item-dialog-close:focus-visible,
.shop-item-source-link:focus-visible { outline: 2px solid #277b6e; outline-offset: 3px; }
.shop-item-dialog {
    box-sizing: border-box;
    width: min(960px, calc(100% - 32px));
    max-height: calc(100dvh - 40px);
    padding: 0;
    overflow: hidden;
    border: 1px solid #b8c9c5;
    border-radius: 6px;
    color: #293b37;
    background: white;
    box-shadow: 0 16px 64px #0003;
}
.shop-item-dialog[open] { display: flex; flex-direction: column; }
.shop-item-dialog::backdrop { background: #14282280; }
.shop-item-dialog-header {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 24px 10px;
    flex: none;
}
.shop-item-dialog-header h2 {
    min-width: 0;
    margin: 0;
    font-size: 22px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    color: #245d50;
}
.shop-item-dialog-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    border: 1px solid #d3dfdc;
    border-radius: 4px;
    background: #fff;
    color: #3b5650;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.shop-item-dialog-close:hover { background: #eff5f2; }
.shop-item-dialog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 0 24px 16px;
    border-bottom: 1px solid #e0e8e5;
    font-size: 13px;
    line-height: 1.6;
    color: #60746e;
    flex: none;
}
.shop-item-dialog-meta a, .shop-item-dialog-body a { color: #227b69; overflow-wrap: anywhere; }
.shop-item-dialog-meta .shop-item-source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    margin-left: auto;
    padding: 9px 16px;
    border: 1px solid #b7d2ca;
    border-radius: 4px;
    background: #eff7f3;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.shop-item-dialog-meta .shop-item-source-link:hover { background: #e1f0e9; border-color: #77a795; }
.shop-item-dialog-status { padding: 8px 24px; font-size: 12px; color: #8a652f; flex: none; }
.shop-item-dialog-status:empty { display: none; }
.shop-item-dialog-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 8px 24px 24px;
    font-size: 15px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.shop-item-dialog-body p { margin: 12px 0; }
.shop-item-dialog-body h2, .shop-item-dialog-body h3, .shop-item-dialog-body h4 {
    margin: 22px 0 10px;
    line-height: 1.5;
    font-size: 18px;
    color: #245d50;
}
.shop-item-dialog-body ul, .shop-item-dialog-body ol { padding-left: 24px; }
.shop-item-dialog-body li { margin: 6px 0; }
.shop-item-dialog-body blockquote { margin: 14px 0; padding-left: 16px; border-left: 3px solid #acc9bd; color: #53665e; }
.shop-item-dialog-body pre { white-space: pre-wrap; padding: 12px; background: #f2f5f3; }
.shop-item-plain-text { white-space: pre-wrap; }
.shop-item-table-scroll { max-width: 100%; overflow-x: auto; margin: 16px 0; }
.shop-item-table-scroll table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.shop-item-table-scroll th, .shop-item-table-scroll td { padding: 11px 14px; border: 1px solid #dce5e0; text-align: left; vertical-align: top; }
.shop-item-table-scroll th { background: #f1f6f3; white-space: nowrap; }
.shop-item-table-scroll tbody tr:nth-child(even) { background: #f8faf9; }
.shop-item-empty { color: #87958f; }
@media (max-width: 540px) {
    .shop-item-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 24px); }
    .shop-item-dialog-header { padding: 16px 16px 10px; gap: 10px; }
    .shop-item-dialog-header h2 { font-size: 20px; }
    .shop-item-dialog-meta { padding: 0 16px 12px; }
    .shop-item-dialog-meta .shop-item-source-link { margin-left: 0; }
    .shop-item-dialog-body { padding: 4px 16px 20px; }
    .shop-item-dialog-status { padding: 8px 16px; }
}
.shop-item-dialog .shop-item-purchase-actions { display:flex;flex:none;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:16px 20px;border-top:1px solid #c9c1b8; }
.shop-item-dialog .shop-item-purchase-actions button { min-height:44px;padding:9px 18px;border:1px solid #4c4058;border-radius:4px;background:#4c4058;color:#fff;font:inherit;cursor:pointer; }
.shop-item-dialog .shop-item-purchase-actions button:disabled { opacity:.5;cursor:not-allowed; }
.shop-item-dialog .shop-item-purchase-actions button:focus-visible { outline:3px solid #8e496d;outline-offset:3px; }
