/* Set page, ported from the prototype (viewPage). Shared blocks (.crumbs, .state, .chip, .tile, .bar, .statusline,
   .banner.ask, .btn.iconsq ...) live in common.css; the dialog form layout (.form, .frow, .grid2) in controls.css. */

.buyblock { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin: 14px 0 12px; display: grid; gap: 6px; }
.buyblock-h { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.set-screen .iconedit { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; }
.set-screen .iconedit:hover { background: var(--surface); color: var(--ink); }
.set-screen .iconedit svg { width: 16px; height: 16px; }
.buyfacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.buyfacts dt { font-size: 12px; color: var(--muted); }
.buyfacts dd { margin: 1px 0 0; font-weight: 500; }
.infogrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 12px; align-items: stretch; }
.infogrid .buyblock { margin: 0; align-content: start; }
.infogrid .buyfacts { grid-template-columns: max-content minmax(0, 1fr); gap: 5px 16px; }
.infogrid .buyfacts > div { display: contents; }
.infogrid .buyfacts dt { font-size: 13px; }
.infogrid .buyfacts dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.set-screen .note { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.set-screen .note textarea { font: inherit; font-size: 14px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px 10px; background: var(--surface); resize: vertical; }

.sortcard { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.sortcard h2 { font-size: 18px; }
.sortcard .statusline { margin-top: 6px; }
.sortcard .sflags { margin-top: 8px; }
.sortcard .sextra { display: grid; gap: 4px; margin-top: 8px; max-width: 520px; }
.sortcard .sextra .bar { margin-top: 4px; }
.sortcard .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.sortcard .banner { grid-column: 1 / -1; margin: 10px 0 0; }

@media (max-width: 760px) {
  .infogrid { grid-template-columns: minmax(0, 1fr); }
  .sortcard { grid-template-columns: minmax(0, 1fr); }
  .sortcard .actions { justify-content: flex-start; gap: 6px; }
  .sortcard .actions .btn { height: 30px; padding: 0 9px; font-size: 13px; }
}

/* Instructions block (prototype .instr, .ownlinks; .section is in common.css) */
.instr { display: flex; flex-wrap: wrap; gap: 8px; }
.instr .btn svg { width: 16px; height: 16px; }
.instr .skel { width: 140px; height: 34px; }
.instr .btn[aria-disabled="true"] { opacity: .6; }
.set-screen .banner.info { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 12px 14px; font-size: inherit; }
.set-screen .banner.error { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 12px 14px; font-size: inherit; margin-top: 12px; }
.set-screen .banner p { margin: 0; }
.ownlinks { display: grid; gap: 8px; margin-top: 12px; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.ownlinks-list { display: grid; gap: 8px; }
.ownlinks-list .skel { width: 220px; height: 38px; }
.ownlinks .nolinks { margin: 0; font-size: 13px; }
.ownlinks .fhint { margin: 0; }
.ownlink { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.ownlink > svg { width: 18px; height: 18px; color: var(--muted); }
.ownlink a, .ownlink .nolink { min-width: 0; color: var(--ink); text-decoration: none; display: grid; }
.ownlink a:hover b { text-decoration: underline; }
.ownlink b, .ownlink span { overflow: hidden; text-overflow: ellipsis; }
.ownlink a span, .ownlink .nolink span { font-size: 12px; color: var(--muted); white-space: nowrap; }
