/* Shops domain pages (dashboard, /shops, shop pages, /ch, /industries, /changes).
 * Every class here is prefixed `sh-`; shared components keep their own styles. */

.sh-mt { margin-top: 10px; }
.sh-pad { padding: 14px 16px; margin: 0; }
.sh-gap4 { gap: 4px 6px; }
.sh-nowrap { white-space: nowrap; }
.sh-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sh-pre { white-space: pre-line; overflow-wrap: anywhere; }
.sh-dim { opacity: .75; }
.sh-up { color: var(--success); }
.sh-down { color: var(--danger); }
.sh-stars { color: #f59f00; }
.sh-free { color: var(--success); font-weight: 600; }
.sh-grow { flex: 1 1 240px; min-width: 0; }
.sh-grow-sm { flex: 0 1 260px; min-width: 0; }
.sh-h2 { font-size: 17px; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-h3 { font-size: 13.5px; font-weight: 650; margin: 16px 0 6px; color: var(--text); }
.sh-h2 .muted, .sh-h3 .muted { font-weight: 500; }
.sh-code { white-space: pre-wrap; display: inline-block; max-width: 100%; }
.sh-wraphead { flex-wrap: wrap; gap: 8px; }
.sh-todo {
  margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px;
  border-radius: 4px; background: var(--warning-soft); color: var(--warning);
}
.sh-plain { list-style: none; margin: 0; padding: 0; }
.sh-plain li { padding: 2px 0; }
.sh-actions { margin: -4px 0 14px; }
.sh-crumbs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; color: var(--text-3); }
.sh-crumbs a { color: var(--text-2); }
.sh-labels { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.sh-labels .badge { text-decoration: none; }
.sh-evidence { margin: -4px 0 14px; }
.sh-struck td { text-decoration: line-through; color: var(--text-3); }
.sh-warnrow td { background: var(--warning-soft); }
.sh-details > summary { cursor: pointer; padding: 2px 0 8px; }
.sh-loading { opacity: .55; transition: opacity .15s; pointer-events: none; }
.sh-results { transition: opacity .15s; }

/* small key/value tables (price lists, option grids) */
.sh-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.sh-mini td, .sh-mini th { padding: 5px 6px; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.sh-mini th { font-weight: 600; color: var(--text-2); font-size: 12px; }
.sh-mini tr:last-child td { border-bottom: 0; }
.sh-mini td.num { text-align: right; }
.sh-prices .sh-sec td { color: var(--text-2); font-weight: 600; font-size: 12px; padding-top: 10px; border-bottom-color: var(--border-strong); }
.sh-prices .sh-base td { background: var(--success-soft); }

/* bookmark star */
.sh-bm { display: inline-flex; align-items: center; gap: 6px; }
.sh-star { color: var(--text-3); }
.sh-star.on { color: #f59f00; border-color: color-mix(in srgb, #f59f00 45%, var(--border)); background: color-mix(in srgb, #f59f00 12%, var(--surface)); }
.sh-star-glyph { font-size: 17px; line-height: 1; }
.sh-star.btn-icon { width: 36px; min-height: 36px; padding: 0; }
.sh-bm-err { color: var(--danger); }

/* AI badge: sibling of the image, top-left of a positioned parent */
.sh-ai {
  position: absolute; top: 6px; left: 6px; z-index: 2; font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 5px; background: rgba(112, 72, 232, .92); color: #fff; pointer-events: auto;
}
.sh-ai.edit { background: rgba(174, 62, 201, .92); }
.sh-ai.copy { background: transparent; color: #fff; outline: 1.5px dashed #fff; backdrop-filter: brightness(.6); }
.sh-ai.sm { top: 3px; left: 3px; font-size: 9.5px; padding: 2px 4px; }
.sh-imgwrap { position: relative; }
.sh-banner { max-width: 640px; margin-bottom: 12px; }
.sh-banner .zoomable { border-radius: var(--radius-sm); max-height: 220px; }
.sh-banner-solo { margin-bottom: 14px; }
.sh-noimg { display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 11px; background: var(--surface-2); }

/* ------------------------------------------------------------- dashboard */
.sh-inv-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .sh-inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .sh-inv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sh-inv-label { font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.sh-inv-card .chart-legend { font-size: 11.5px; }
.sh-inv-card .row-wrap { margin-top: 4px; }
.sh-inv-flow { margin-top: 20px; }
.sh-progress { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; margin: 6px 0 4px; max-width: 420px; }
.sh-progress > div { height: 100%; background: var(--accent); }
.sh-dash-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
@media (min-width: 1100px) { .sh-dash-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.sh-dash-grid > .card + .card { margin-top: 0; }
.sh-rows { list-style: none; margin: 0; padding: 0; }
.sh-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 9px 16px; border-bottom: 1px solid var(--border); min-height: 48px; }
.sh-row:last-child { border-bottom: 0; }
.sh-row-main { min-width: 0; flex: 1 1 auto; }
.sh-row-side { flex: none; display: flex; align-items: center; gap: 8px; text-align: right; }
.sh-ext { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 6px; color: var(--text-2); }
.sh-ext:hover { background: var(--surface-2); }

/* ----------------------------------------------------------------- /shops */
.sh-stack { display: flex; flex-direction: column; gap: 8px; }
.sh-range { display: flex; align-items: center; gap: 6px; }
.sh-range .input { min-width: 0; }
.sh-search { display: flex; gap: 6px; align-items: stretch; }
.sh-search .search { flex: 1 1 auto; min-width: 0; }
.sh-help-btn { font-weight: 700; flex: none; }
.sh-help { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.sh-help .sh-mini { margin: 6px 0; }
.sh-help .sh-mini td { border-bottom-color: var(--border-strong); }
.sh-help p { margin: 4px 0 0; }
.sh-src-toggle { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-src-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer;
}
.sh-src-dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; }
.sh-src-btn.on .sh-src-dot { background: currentColor; }
.sh-src-yoasobi.on { color: var(--c-blue); border-color: currentColor; background: color-mix(in srgb, var(--c-blue) 9%, var(--surface)); }
.sh-src-both.on { color: var(--success); border-color: currentColor; background: var(--success-soft); }
.sh-src-cityheaven.on { color: var(--purple); border-color: currentColor; background: var(--purple-soft); }
@media (max-width: 1023px) { .sh-src-btn { min-height: 44px; } }
.sh-sort { display: flex; gap: 6px; align-items: center; }
.sh-sort select { max-width: 170px; }
.sh-dir { display: inline-flex; transition: transform .15s; }
.sh-dir.asc { transform: rotate(180deg); }
.sh-bar { margin-bottom: 8px; }
.sh-chipbar { margin-bottom: 4px; }
.sh-chipbar .chip { text-decoration: none; }
.sh-indent { padding-left: 18px; }
.sh-chip-btn { cursor: pointer; font: inherit; }
.sh-picker { margin-bottom: 12px; }
.sh-pick-group { margin-top: 12px; }
.sh-opthead { font-size: 12px; font-weight: 650; color: var(--text-2); margin-bottom: 4px; }
.chip:disabled { opacity: .45; cursor: not-allowed; }
button.chip { font: inherit; cursor: pointer; }

.sh-only-phone { display: block; }
.sh-only-desk { display: none; }
@media (min-width: 720px) { .sh-only-phone { display: none; } .sh-only-desk { display: block; } }

/* desktop table */
.sh-thumb { position: relative; display: block; width: 104px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--surface-2); flex: none; }
.sh-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sh-td-star { width: 44px; }
.sh-td-banner { width: 112px; }
@media (max-width: 1599.98px) { .sh-only-desk .dt th:nth-child(2), .sh-only-desk .dt td.sh-td-banner { display: none; } }
.sh-only-desk .dt td { padding-left: 8px; padding-right: 8px; }
.sh-only-desk .dt th { padding-left: 8px; padding-right: 8px; }
.sh-only-desk .dt td { vertical-align: middle; }
.sh-only-desk .cell-title .src { flex: none; }

/* phone rows */
.sh-plist { list-style: none; margin: 0; padding: 0; }
.sh-prow { position: relative; border-bottom: 1px solid var(--border); }
.sh-prow:last-child { border-bottom: 0; }
.sh-prow-link { display: flex; gap: 12px; padding: 12px 52px 12px 14px; color: inherit; text-decoration: none !important; }
.sh-prow-link:active { background: var(--surface-2); }
.sh-thumb-sm { width: 84px; height: 56px; }
.sh-prow-body { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.sh-prow-title { display: flex; gap: 6px; align-items: center; min-width: 0; font-size: 14.5px; }
.sh-prow-title .strong-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-prow-figs { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--text-2); }
.sh-prow-figs .money { color: var(--text); font-weight: 600; }
.sh-prow-body .badge { align-self: flex-start; margin-top: 2px; }
.sh-prow-star { position: absolute; top: 8px; right: 8px; }
.sh-prow-star .sh-star.btn-icon { width: 44px; min-height: 44px; border: 0; background: transparent; }
.sh-prow-star .sh-star.on { background: transparent; }

/* gallery */
.sh-gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .sh-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .sh-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sh-gcard { position: relative; overflow: hidden; margin: 0 !important; }
.sh-gcard-link { display: block; color: inherit; text-decoration: none !important; height: 100%; }
.sh-gimg { position: relative; display: block; background: var(--surface-2); }
.sh-gimg img { width: 100%; height: auto; display: block; }
.sh-gimg.sh-noimg { height: 110px; }
.sh-gbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.sh-gbody .badge { align-self: flex-start; }
.sh-gtitle { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.sh-gstar { position: absolute; top: 6px; right: 6px; z-index: 3; }
.sh-gstar .sh-star { background: color-mix(in srgb, var(--surface) 88%, transparent); }

/* ------------------------------------------------------------- shop pages */
.sh-hero .sh-intro-title { font-size: 16px; margin: 6px 0 6px; }
.sh-detail-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
@media (min-width: 1100px) { .sh-detail-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }
.sh-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sh-col > .card + .card { margin-top: 0; }
.sh-base-course { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); margin-bottom: 8px; }
.sh-kvline { margin: 2px 0; }
.sh-base-course .badge { margin-left: 4px; }
.sh-note + .sh-note { margin-top: 10px; }
.sh-map-block { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.sh-map { height: 260px; border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; z-index: 0; }
.sh-video { width: 100%; max-height: 320px; border-radius: var(--radius-sm); background: #000; }
.sh-fs-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.sh-fs-grid .zoomable { border-radius: var(--radius-sm); }
.sh-members { list-style: none; margin: 0; padding: 0; columns: 1; }
@media (min-width: 900px) { .sh-members { columns: 2; column-gap: 24px; } }
.sh-members li { padding: 5px 0; break-inside: avoid; }
.sh-optgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .sh-optgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .sh-optgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sh-optcol .badge { text-decoration: none; }
.sh-yo-opts { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.sh-cast-sec + .sh-cast-sec { margin-top: 6px; }
.sh-casts { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .sh-casts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .sh-casts { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .sh-casts { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sh-cast {
  display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); color: inherit; text-decoration: none !important; min-width: 0;
}
.sh-cast:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.sh-cast-photo { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); margin-bottom: 4px; }
.sh-cast-photo img { width: 100%; height: 100%; object-fit: cover; }
.sh-cast-photo .sh-noimg { height: 100%; }
.sh-cast-name { font-weight: 600; font-size: 13.5px; }
.sh-reviews { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .sh-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sh-review { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sh-review-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sh-review-title { font-weight: 600; }
.sh-reply { border-left: 2px solid var(--accent); padding-left: 10px; display: flex; flex-direction: column; gap: 4px; }
.sh-reply-img { width: 96px; }
.sh-reply-img .zoomable { height: 96px; border-radius: 6px; }

/* ------------------------------------------------------------------- /ch */
.sh-toolbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.sh-check { width: 18px; height: 18px; accent-color: var(--accent); }
.sh-aliases { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
/* /changes field chips: the count is a muted pill (the .tab-count look); a field with
   changes in the last 30 days gets the info tint, readable in both themes. */
.sh-pair .chip-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); line-height: 1;
}
.sh-pair .chip-count.sh-recent { background: var(--info-soft); color: var(--info); border-color: transparent; }
.sh-pair .chip.active .chip-count { background: color-mix(in srgb, currentColor 12%, transparent); border-color: transparent; opacity: 1; }
.sh-star:not(.btn-icon) { color: var(--text); }
.sh-star:not(.btn-icon) .sh-star-glyph { color: var(--text-3); }
.sh-star.on .sh-star-glyph { color: #f59f00; }
@media (max-width: 719.98px) {
  .sh-chipbar .sh-bar.row-wrap, .sh-chipbar.sh-bar.row-wrap {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px;
  }
  .sh-chipbar .sh-bar.row-wrap::-webkit-scrollbar, .sh-chipbar.sh-bar.row-wrap::-webkit-scrollbar { display: none; }
  .sh-chipbar .sh-bar.row-wrap > *, .sh-chipbar.sh-bar.row-wrap > * { flex: none; }
  .results-bar .sort-select { margin-left: 0; }
  .results-bar .seg { margin-left: auto; }
}
.sh-pair > .card { margin-top: 0 !important; }
.sh-pair + .sh-results, .sh-results + .sh-nw { margin-top: 14px; }
/* /changes "Noteworthy changes": a header card, then one card per rule */
.sh-nw-head { flex-wrap: wrap; padding-bottom: 13px; }
.sh-nw-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 14px; align-items: start; }
@media (min-width: 1100px) { .sh-nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sh-nw-card { margin: 0 !important; min-width: 0; }
.sh-nw-card .card-head { padding-bottom: 8px; align-items: baseline; }
.sh-nw-card .card-head + .card-body { padding-top: 4px; }
.sh-nw-count { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.sh-nw-none { margin: 0; font-size: 13px; }
.sh-nw-card .skel-table { padding: 12px 16px; }
.sh-nw-card .dt { font-size: 13px; }
@media (min-width: 720px) {
  .sh-nw-card .dt th, .sh-nw-card .dt td { padding: 6px 8px; vertical-align: middle; }
  .sh-nw-card .dt th:first-child, .sh-nw-card .dt td:first-child { padding-left: 16px; }
  .sh-nw-card .dt th:last-child, .sh-nw-card .dt td:last-child { padding-right: 16px; }
}
.sh-nw-sub { display: block; }
.sh-nw-vals { display: block; white-space: nowrap; }
.sh-nw-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.sh-nw-delta { white-space: nowrap; }
.sh-nw-delta.up { background: var(--success-soft); color: var(--success); border-color: transparent; }
.sh-nw-delta.down { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
@media (max-width: 719.98px) {
  /* compact rows: cast | date, shop, then the change on one line; no per-cell labels */
  .sh-nw-card .dt tr {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cast date" "shop shop" "chg chg";
    gap: 1px 10px; padding: 8px 14px; align-items: baseline;
  }
  .sh-nw-card .dt td::before { display: none; }
  .sh-nw-card .dt td.sh-nw-cast { grid-area: cast; font-size: 14px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sh-nw-card .dt td.sh-nw-shop { grid-area: shop; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sh-nw-card .dt td.sh-nw-chg { grid-area: chg; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 2px; }
  .sh-nw-card .dt td.sh-nw-date { grid-area: date; text-align: right !important; font-size: 12px; }
  .sh-nw-sub { display: inline; margin-left: 6px; }
  .sh-nw-vals { display: inline; font-size: 13px; }
  .sh-nw-badges { margin-top: 0; }
}
@media (max-width: 719.98px) {
  .sh-chtable .dt tr { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; padding: 8px 14px; }
  .sh-chtable .dt td:first-child { grid-column: 1 / -1; order: -2; }
  .sh-chtable .dt td:first-child:empty { display: none; }
  .sh-chtable .dt td::before { font-size: 10.5px; }
  .sh-chtable .dt td[data-label="Actions"] { grid-column: 1 / -1; }
  .sh-chtable .dt td[data-label="Matched pinku shop"], .sh-chtable .dt td[data-label="Area"] { grid-column: span 3; }
}
