/* /latch-hook-pattern-maker/ page styles. Built from /assets/polyatic.css tokens only (no new colours or fonts).
   The only literal colours on the page are the picture's own yarn colours, set at run time, and the drawn rug. */
.nojs{margin:1.25rem 0 0;padding:0.875rem 1rem;border:1px solid var(--line);border-left:0.25rem solid var(--accent);border-radius:0.625rem;background:var(--surface);color:var(--ink);font-size:0.9375rem;line-height:1.6}
.lh-head .sub{margin-bottom:0.75rem}
@media(max-width:519px){.lh-head h1{margin-bottom:0.25rem}.lh-head .sub{font-size:0.9375rem;line-height:1.4;margin-bottom:0.5rem}}
@media(min-width:920px){.lh-duo{grid-template-columns:minmax(0,1.25fr) minmax(22rem,1fr)}}
.duo>.pane-result.lh-side{position:static}
.lh-side{display:grid;gap:1rem;align-content:start;min-width:0}
.lh-card{padding:0.875rem;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
@media(min-width:520px){.lh-card{padding:1.25rem}}

.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.375rem;text-align:center;min-height:8.5rem;padding:1rem;border:2px dashed var(--line-2);border-radius:0.875rem;background:var(--surface-2);cursor:pointer;transition:border-color .15s,background .15s}
.drop:hover,.drop:focus-visible,.drop.drag{border-color:var(--accent);background:var(--accent-soft)}
.drop b{font-size:1.0625rem}
.drop small{color:var(--muted);max-width:36ch}
@media(min-width:920px){.drop{min-height:12rem}}
.lh-has-chart .drop{min-height:0;flex-direction:row;flex-wrap:wrap;padding:0.625rem 0.875rem}
.lh-has-chart .drop small{display:none}
.lh-has-chart .lh-icon{width:1.75rem;height:1.75rem}
/* icon: a square of rug canvas with one hooked knot */
.lh-icon{width:2.5rem;height:2.5rem;border:2px solid var(--ink);border-radius:0.375rem;background:
  radial-gradient(circle at 70% 70%,var(--accent) 0 22%,transparent 23%),
  repeating-linear-gradient(90deg,transparent 0 calc(25% - 1px),var(--line-2) calc(25% - 1px) 25%),
  repeating-linear-gradient(0deg,transparent 0 calc(25% - 1px),var(--line-2) calc(25% - 1px) 25%),var(--surface)}
.lh-designs{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;margin-top:0.75rem}
.lh-designs .k{font-size:0.8125rem;color:var(--muted);margin-right:0.125rem}
.chip[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.hint{font-size:0.8125rem;color:var(--muted);margin:0.625rem 0.125rem 0;min-height:1.125rem;overflow-wrap:anywhere}
.hint.bad{color:var(--bad);font-weight:600}

.lh-work[hidden]{display:none}
.lh-work{margin-top:0.875rem}
.lh-line{display:flex;flex-wrap:wrap;gap:0.5rem 0.875rem;align-items:center;justify-content:space-between;margin:0 0.125rem 0.5rem}
.lh-size{font-family:var(--mono);font-size:0.875rem;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.lh-line .modes{margin:0;flex:none}
.lh-line .modes button{padding:0.375rem 0.75rem}
.lh-stage{border:1px solid var(--line);border-radius:0.5rem;background:var(--surface-2);padding:0.5rem;display:flex;justify-content:center}
.lh-rug{display:block;max-width:100%;max-height:min(72vh,44rem);width:auto;height:auto;border-radius:0.25rem;box-shadow:var(--shadow)}

.lh-sec{font-size:0.8125rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);margin:0 0 0.625rem}
.lh-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0.625rem 0.75rem}
.lh-grid .full{grid-column:1/-1}
.lh-f{display:flex;flex-direction:column;gap:0.25rem;min-width:0;font-size:0.8125rem;color:var(--ink-2);font-weight:550}
.lh-f[hidden]{display:none}
.lh-f .u{color:var(--muted);font-weight:400}
.lh-check{display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;color:var(--ink-2)}
.lh-check input{width:1.125rem;height:1.125rem;accent-color:var(--accent)}
.note{font-size:0.8125rem;color:var(--muted);line-height:1.5;margin:0.625rem 0.125rem 0}
.note:empty{display:none}

.lh-tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:0.5rem}
.lh-legend{width:100%;border-collapse:collapse;font-size:0.8125rem}
.lh-legend th{font-family:var(--mono);font-size:0.6875rem;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);text-align:left;padding:0.4375rem 0.375rem;border-bottom:1px solid var(--line-2);background:var(--surface-2)}
.lh-legend td{padding:0.3125rem 0.375rem;border-bottom:1px solid var(--line);vertical-align:middle}
.lh-legend tfoot td{font-weight:700;border-bottom:0;background:var(--surface-2)}
.lh-legend .lh-num{text-align:right;font-family:var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}
.lh-legend th.lh-num{white-space:normal}
@media(max-width:519px){.lh-legend{font-size:0.75rem}.lh-legend td,.lh-legend th{padding:0.3125rem 0.25rem}.lh-legend th{font-size:0.625rem;letter-spacing:0}.lh-chip{width:1.125rem;height:1.125rem}}
.lh-sw{display:inline-flex;align-items:center;gap:0.375rem}
.lh-chip{width:1.375rem;height:1.375rem;border-radius:0.25rem;border:1px solid var(--line-2);flex:none}
.lh-sw b{font-family:var(--mono);font-size:0.9375rem;min-width:1ch}
input.lh-name{width:100%;min-width:3.75rem;padding:0.375rem 0.5rem;border:1px solid var(--line-2);border-radius:0.375rem;background:var(--surface);color:var(--ink);font:inherit;font-size:0.8125rem}
input.lh-name:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);outline:none}

.lh-dl{display:flex;flex-wrap:wrap;gap:0.5rem;margin-top:0.75rem}
.lh-dl .btn{flex:1 1 9rem}
.btn:disabled{opacity:.5;cursor:default;filter:none}
.lh-save{display:flex;flex-wrap:wrap;gap:0.5rem 0.875rem;align-items:center;justify-content:space-between}
.lh-save .note{margin:0;flex:1 1 14rem}
.btn.lh-small{height:auto;min-height:2.5rem;padding:0.5rem 0.875rem;font-size:0.875rem}
.lh-list li{margin-bottom:0.375rem}
