.shop-page { display: grid; gap: 16px; min-width: 0; }
.shop-page .page-head { margin-bottom: 0; }
#ttshop-body { display: grid; gap: 16px; min-width: 0; }
.shop-panel { min-width: 0; padding: clamp(16px, 2vw, 26px); }
.shop-panel h2, .shop-panel h3 { margin: 0 0 14px; font-size: 17px; line-height: 1.35; }
.shop-controls, .shop-sync, .shop-pages, .shop-detail-head {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}
.shop-controls label { display: grid; gap: 5px; font-weight: 600; color: var(--muted); font-size: 13px; }
.shop-controls select, .shop-controls input { padding: 8px 10px; min-height: 36px; max-width: 100%; width: auto; }
.shop-controls select { max-width: min(72vw, 310px); }
.shop-controls button { min-height: 36px; }
.shop-panel .shop-note { margin: 12px 0 0; color: var(--muted); line-height: 1.5; font-size: 13px; }
.shop-alert { padding: 12px 16px; margin: 0; border: 1px solid #f0c5b9; border-radius: 9px; color: #83371d; background: #fff6f0; }
.shop-choice { border-left: 3px solid var(--pink); }
.shop-work-identity { align-self: center; overflow-wrap: anywhere; }
.shop-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.shop-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 4px 2px 10px; font-weight: 650; }
.shop-tabs button[aria-pressed="true"] { color: var(--pink-text); border-bottom-color: var(--pink); }
.shop-sync { align-items: center; justify-content: space-between; margin: 12px 0; }
.shop-sync-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-sync small, .shop-scroll small { color: var(--muted); }
.shop-scroll { overflow-x: auto; border-radius: 6px; margin-top: 12px; }
.shop-scroll table { width: 100%; border-collapse: collapse; font-size: 13px; }
.shop-scroll th, .shop-scroll td { text-align: start; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.shop-scroll th { color: var(--muted); background: var(--bg); font-weight: 600; }
.shop-scroll td:first-child { min-width: 130px; white-space: normal; overflow-wrap: anywhere; }
.shop-scroll small { display: block; margin-top: 3px; font-weight: 400; font-variant-numeric: tabular-nums; }
.shop-text-button { text-align: start; padding: 0; border: 0; background: transparent; color: var(--pink-text); }
.shop-text-button:hover strong { text-decoration: underline; }
.shop-pages { align-items: center; justify-content: flex-end; margin-top: 12px; }
.shop-details { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.shop-detail-head { justify-content: space-between; align-items: center; }
.shop-detail-head h3 { margin: 0; }
@media (max-width: 600px) {
  .shop-controls { align-items: stretch; }
  .shop-controls label { flex: 1 1 120px; }
  .shop-controls select { width: 100%; }
  .shop-controls button { align-self: flex-end; }
  .shop-pages { justify-content: center; }
}

.shop-nav-setting,.shop-panel fieldset{margin-top:1rem}.shop-panel fieldset{border:1px solid var(--line,#ddd);border-radius:8px;padding:12px}.shop-panel summary{cursor:pointer;font-weight:600}.shop-controls label.shop-link-option{display:inline-flex;flex-direction:row;align-items:center;gap:.5rem}.shop-link-option input{width:auto}

#sf-shop-content { display: grid; gap: 16px; min-width: 0; }
#sf-shop-content .sc-link, #sf-shop-content .sc-tools { margin: 12px 0; }
.sc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px),1fr)); gap: 16px; margin: 16px 0; }
.sc-field { display: grid; gap: 6px; min-width: 0; font-size: 14px; }
.sc-field textarea, .sc-field input, .sc-field select { max-width: 100%; min-width: 0; }
.sc-form .sc-field:has(textarea) { grid-column: 1 / -1; }
.sc-works { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(165px,100%),1fr)); gap: 14px; }
.sc-works article { border: 1px solid var(--line); padding: 12px; border-radius: 8px; display: grid; align-content: start; gap: 8px; overflow-wrap: anywhere; }
.sc-works article img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 5px; }
.sc-history { list-style: none; margin: 0; padding: 0; }
.sc-history li { padding: 12px 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.sc-history small { display: block; color: var(--muted); margin-top: 3px; }
.sc-history li > small { width: 100%; }
@media (max-width: 600px) { #sf-shop-content .shop-tabs { flex-wrap: wrap; gap: 10px; } }

.sc-preview { display: block; width: 100%; height: min(22vh, 220px); object-fit: contain; background: #171719; border-radius: 8px; }
