/* Pin Sheet Studio 1.1 */
.pss-app { --pss-ink: #1d1d1f; --pss-mute: #6b6b70; --pss-line: #e2e0dc; --pss-bg: #f7f6f3; --pss-main: #d6336c; --pss-blue: #2f6fed;
  color: var(--pss-ink); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; max-width: 1500px; margin: 0 auto; container-type: inline-size; container-name: pss; }
.pss-app *, .pss-app *::before, .pss-app *::after { box-sizing: border-box; }
.pss-app h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--pss-ink); }
.pss-app p { margin: 6px 0 0; }
.pss-wrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.pss-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); }
.pss-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pss-side, .pss-box, .pss-field { min-width: 0; }
.pss-box { background: #fff; border: 1px solid var(--pss-line); border-radius: 12px; padding: 14px; }
.pss-side > .pss-box:first-child { overflow-y: auto; flex: 0 1 auto; }
.pss-grow { display: flex; flex-direction: column; min-height: 260px; overflow: hidden; flex: 1 1 auto; }
.pss-row { display: flex; gap: 8px; align-items: flex-end; }
.pss-row > * { flex: 1 1 0; min-width: 0; }
.pss-row > .pss-btn { flex: 0 0 auto; }
.pss-between { justify-content: space-between; align-items: center; }
.pss-between > * { flex: 0 0 auto; }
.pss-wrapline { flex-wrap: wrap; align-items: center; }
.pss-wrapline > * { flex: 0 0 auto; }
.pss-gap { margin: 8px 0; }
.pss-muted { color: var(--pss-mute); font-size: 12.5px; }
.pss-hide { display: none !important; }

.pss-app .pss-input { width: 100%; height: 36px; padding: 6px 10px; border: 1px solid var(--pss-line); border-radius: 8px; background: #fff; color: var(--pss-ink); font: inherit; margin: 0; box-shadow: none; }
.pss-app select.pss-input { margin-bottom: 8px; }
.pss-app .pss-field select.pss-input, .pss-app .pss-row > select.pss-input { margin-bottom: 0; }
.pss-app textarea.pss-input { height: auto; resize: vertical; }
.pss-app .pss-input:focus { outline: 2px solid var(--pss-blue); outline-offset: 0; border-color: var(--pss-blue); }
.pss-app input[type="color"] { width: 100%; height: 36px; padding: 2px; border: 1px solid var(--pss-line); border-radius: 8px; background: #fff; cursor: pointer; }
.pss-app input[type="range"] { width: 100%; height: 36px; margin: 0; }
.pss-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; font-size: 12.5px; color: var(--pss-mute); font-weight: 600; }
.pss-check { display: inline-flex; align-items: center; gap: 6px; margin: 4px 12px 4px 0; font-size: 13px; cursor: pointer; color: var(--pss-ink); font-weight: 500; }
.pss-check input { margin: 0; flex: 0 0 auto; }

.pss-app .pss-btn { height: 36px; padding: 0 14px; border: 1px solid var(--pss-line); border-radius: 8px; background: #fff; color: var(--pss-ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-transform: none; letter-spacing: 0; box-shadow: none; }
.pss-app .pss-btn:hover { background: var(--pss-bg); }
.pss-app .pss-btn.pss-primary { background: var(--pss-main); border-color: var(--pss-main); color: #fff; }
.pss-app .pss-btn.pss-primary:hover { filter: brightness(0.93); }
.pss-details { margin-top: 10px; }
.pss-details > summary, .pss-help > summary { cursor: pointer; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.pss-help > summary { font-size: 15px; font-weight: 700; margin: 0; }
.pss-code { background: var(--pss-bg); border: 1px solid var(--pss-line); border-radius: 8px; padding: 10px; font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; margin: 8px 0; color: var(--pss-ink); }

/* URL list */
.pss-rows { overflow-y: auto; margin-top: 4px; flex: 1 1 auto; min-height: 120px; }
.pss-item { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.pss-item:hover { background: var(--pss-bg); }
.pss-item.pss-isdone, .pss-item.pss-isdone:hover, .pss-item.pss-on.pss-isdone { background: var(--pss-done, #b7e1cd); }
.pss-item.pss-on { background: #fdeef3; border-color: var(--pss-main); }
.pss-app input.pss-swatch { flex: 0 0 44px; width: 44px; }
.pss-item > input { margin: 0; flex: 0 0 auto; }
.pss-item-txt { min-width: 0; display: flex; flex-direction: column; flex: 1 1 auto; }
.pss-item-txt strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pss-item-txt small { color: var(--pss-mute); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pss-app .pss-tick { flex: 0 0 22px; width: 22px; height: 22px; padding: 0; border: 1.5px solid #bdb9b1; border-radius: 50%; background: #fff; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.pss-app .pss-tick.pss-done { background: #1f9d55; border-color: #1f9d55; }

/* toolbar + status */
.pss-toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pss-toolbar .pss-field { flex: 1 1 180px; margin: 0; }
.pss-toolbar .pss-field:nth-child(3) { flex: 0 0 100px; }
.pss-toolbar .pss-field:nth-child(4) { flex: 0 0 190px; }
.pss-toolbar .pss-field:nth-child(5) { flex: 0 0 110px; }
.pss-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pss-status { min-height: 20px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--pss-mute); }
.pss-status.pss-error { color: #c0261c; }
.pss-status.pss-ok { color: #177a41; }
.pss-status.pss-warn { color: #a15c00; }
.pss-status.pss-busy { color: var(--pss-blue); }

/* pin cards */
.pss-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.pss-card { background: #fff; border: 2px solid var(--pss-line); border-radius: 12px; padding: 6px; min-width: 0; }
.pss-card.pss-on { border-color: var(--pss-main); }
.pss-card-canvas { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; border-radius: 7px; cursor: pointer; background: var(--pss-bg); }
.pss-card-name { display: flex; margin: 6px 2px 4px; font-size: 12px; min-width: 0; }
.pss-card-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pss-card-foot { display: flex; gap: 4px; }
.pss-app .pss-mini { flex: 1 1 0; height: 26px; padding: 0 4px; border: 1px solid var(--pss-line); border-radius: 6px; background: #fff; color: var(--pss-ink); font: inherit; font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; min-width: 0; }
.pss-app .pss-mini:hover { background: var(--pss-bg); }

/* design switchers */
.pss-card-design { display: flex; gap: 4px; margin-bottom: 4px; }
.pss-card-design .pss-mini { flex: 0 0 24px; font-size: 16px; }
.pss-app select.pss-card-layout { flex: 1 1 auto; min-width: 0; height: 26px; padding: 0 4px; margin: 0; font-size: 12px; border-radius: 6px; }
.pss-gallery { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; }
.pss-app .pss-gal { flex: 0 0 auto; width: 118px; padding: 4px; border: 2px solid var(--pss-line); border-radius: 10px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: stretch; box-shadow: none; text-transform: none; letter-spacing: 0; }
.pss-app .pss-gal:hover { border-color: #bdb9b1; }
.pss-app .pss-gal.pss-on { border-color: var(--pss-main); }
.pss-gal-canvas { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; border-radius: 6px; background: var(--pss-bg); }
.pss-gal span { font: 600 11px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--pss-ink); text-align: center; min-height: 28px; }

/* on-pin text editing */
.pss-app textarea.pss-titleedit { position: absolute; z-index: 5; height: auto; min-height: 62px; padding: 8px 10px; border: 2px solid var(--pss-blue); border-radius: 8px; background: #fff; color: var(--pss-ink); font: 600 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28); resize: none; margin: 0; }
.pss-app .pss-btn:disabled { opacity: 0.45; cursor: default; }

/* welcome, tour */
.pss-welcome { border-color: var(--pss-main); background: #fff7fa; }
.pss-tour-target { position: relative; z-index: 99990; box-shadow: 0 0 0 4px var(--pss-main), 0 0 0 9999px rgba(0, 0, 0, 0.5); border-radius: 12px; }
.pss-tourbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 99999; width: min(680px, calc(100vw - 24px)); background: #fff; border: 2px solid var(--pss-main); border-radius: 14px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.pss-tourtext { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; min-width: 0; }
.pss-tourbtns { display: flex; gap: 6px; flex: 0 0 auto; }
.pss-app.pss-portal { container-type: normal; max-width: none; margin: 0; }
@media (max-width: 600px) { .pss-tourbar { flex-direction: column; align-items: stretch; } .pss-tourbtns { justify-content: flex-end; } }

/* results table */
.pss-tablewrap { overflow-x: auto; margin-top: 8px; }
.pss-app table.pss-table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 0; }
.pss-app .pss-table th, .pss-app .pss-table td { border: 1px solid var(--pss-line); padding: 7px 10px; text-align: left; white-space: nowrap; }
.pss-app .pss-table th { background: var(--pss-bg); font-weight: 700; }
.pss-app .pss-table tr.pss-top td { background: #e9f6ee; font-weight: 700; }
.pss-resbest { font-weight: 700; margin-top: 10px; }
.pss-results > .pss-row { margin-top: 10px; align-items: flex-end; }

/* editor */
.pss-editor { display: grid; grid-template-columns: minmax(220px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.pss-bigwrap { position: sticky; top: 16px; }
.pss-big { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; border-radius: 10px; background: var(--pss-bg); cursor: grab; touch-action: none; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12); }
.pss-big:active { cursor: grabbing; }

/* image picker */
.pss-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; max-height: 320px; overflow-y: auto; }
.pss-thumb { position: relative; border-radius: 8px; cursor: pointer; border: 2px solid transparent; overflow: hidden; }
.pss-thumb img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; }
.pss-thumb:hover { border-color: var(--pss-main); }
.pss-used { position: absolute; top: 4px; left: 4px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 5px; }

/* The same breakpoints, by the tool's own width (for themes with a narrow content column) */
@container pss (max-width: 1180px) {
  .pss-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@container pss (max-width: 860px) {
  .pss-wrap { grid-template-columns: minmax(0, 1fr); }
  .pss-side { position: static; max-height: none; }
  .pss-rows { max-height: 260px; }
  .pss-editor { grid-template-columns: 1fr; }
  .pss-bigwrap { position: static; max-width: 360px; margin: 0 auto; width: 100%; }
  .pss-controls .pss-row { flex-wrap: wrap; }
  .pss-controls .pss-row > * { flex: 1 1 130px; }
}
@container pss (max-width: 520px) {
  .pss-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ...and by screen width, for older browsers */
@media (max-width: 1180px) {
  .pss-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 860px) {
  .pss-wrap { grid-template-columns: minmax(0, 1fr); }
  .pss-side { position: static; max-height: none; }
  .pss-rows { max-height: 260px; }
  .pss-editor { grid-template-columns: 1fr; }
  .pss-bigwrap { position: static; max-width: 360px; margin: 0 auto; width: 100%; }
  .pss-controls .pss-row { flex-wrap: wrap; }
  .pss-controls .pss-row > * { flex: 1 1 130px; }
}
@media (max-width: 520px) {
  .pss-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Bundled fonts (SIL Open Font License; Roboto Slab is Apache 2.0) */
@font-face { font-family: "Anton"; font-weight: 400; font-display: swap; src: url("fonts/anton.woff2") format("woff2"); }
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap; src: url("fonts/bebas-neue.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url("fonts/montserrat-800.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 600; font-display: swap; src: url("fonts/oswald-600.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 800; font-display: swap; src: url("fonts/playfair-display-800.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Archivo Black"; font-weight: 400; font-display: swap; src: url("fonts/archivo-black.woff2") format("woff2"); }
@font-face { font-family: "Abril Fatface"; font-weight: 400; font-display: swap; src: url("fonts/abril-fatface.woff2") format("woff2"); }
@font-face { font-family: "Alfa Slab One"; font-weight: 400; font-display: swap; src: url("fonts/alfa-slab-one.woff2") format("woff2"); }
@font-face { font-family: "Fjalla One"; font-weight: 400; font-display: swap; src: url("fonts/fjalla-one.woff2") format("woff2"); }
@font-face { font-family: "League Spartan"; font-weight: 800; font-display: swap; src: url("fonts/league-spartan-800.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 800; font-display: swap; src: url("fonts/roboto-slab-800.woff2") format("woff2"); }
@font-face { font-family: "Dancing Script"; font-weight: 700; font-display: swap; src: url("fonts/dancing-script-700.woff2") format("woff2"); }
@font-face { font-family: "Pacifico"; font-weight: 400; font-display: swap; src: url("fonts/pacifico.woff2") format("woff2"); }
