/* /fun/scarf-loom/ - Dot's porch-window loom. Warm armchair light, yarn colors only. */
.fun-sc-world{
  --sc-navy: var(--navy, #24324a);
  --sc-accent: var(--accent, #9c4221);
  --sc-cream: #fbf4ee;
  --sc-ink: #2b2622;
  --sc-line: #dccbbd;
  color: var(--sc-ink); background: var(--sc-cream);
  border: 1px solid var(--sc-line); border-radius: 16px;
  margin: 0 0 1.5rem; padding: 1rem 1rem 1.35rem; overflow: hidden;
}
.fun-sc-world a{ color: var(--sc-accent); }
.fun-sc-head h1{
  margin: 0 0 .4rem; font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: clamp(1.4rem, 4.6vw, 2rem); line-height: 1.15; color: var(--sc-navy);
}
.fun-sc-head .lede{ margin: 0 0 .55rem; max-width: 38rem; line-height: 1.45; }
.fun-sc-tape{
  display: inline-block; margin: 0 0 .75rem; padding: .28rem .7rem; background: #f4d3da;
  color: var(--sc-navy); transform: rotate(-1deg); font-family: Georgia, Palatino, serif;
}
.fun-sc-host{ display: grid; grid-template-columns: 6.5rem 1fr; gap: .8rem; align-items: center; margin: 0 0 .9rem; }
.fun-sc-host img{ width: 6.5rem; height: auto; border-radius: 12px; }
.fun-sc-host p{ margin: 0; line-height: 1.45; background: #fffdf8; padding: .5rem .65rem; border-radius: 10px; }
.fun-sc-label{ margin: 0 0 .45rem; font-size: 1.05rem; color: var(--sc-navy); }
.fun-sc-swatches{ display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; margin: 0 0 .7rem; }
@media (min-width: 560px){ .fun-sc-swatches{ grid-template-columns: repeat(4, minmax(0,1fr)); } }
.fun-sc-world button:not([data-fun-sfx]){
  font: inherit; cursor: pointer; min-height: 44px; min-width: 44px; padding: .4rem .6rem;
  border-radius: 10px; border: 2px solid var(--sc-navy); background: #fffdf8; color: var(--sc-navy);
}
.fun-sc-swatch{ display: flex; align-items: center; gap: .5rem; text-align: left; font-size: .9rem; }
.fun-sc-chip{ flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--sw); border: 1px solid rgba(0,0,0,.25);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 2px, transparent 2px 5px); }
.fun-sc-swatch[aria-pressed="true"]{ background: #fff4d8; box-shadow: inset 0 0 0 2px var(--sc-accent); border-color: var(--sc-accent); font-weight: 700; }
.fun-sc-world button:not([data-fun-sfx]).primary{ background: var(--sc-accent); border-color: var(--sc-accent); color: #fffdf8; font-weight: 700; }
.fun-sc-world button:not([data-fun-sfx]):focus-visible, .fun-sc-world select:focus-visible{ outline: 3px solid var(--sc-accent); outline-offset: 3px; }
.fun-sc-width{ border: 0; margin: 0 0 .5rem; padding: 0; }
.fun-sc-width legend{ font-weight: 700; color: var(--sc-navy); padding: 0; margin: 0 0 .2rem; }
.fun-sc-width label{ display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; margin-right: .7rem; }
.fun-sc-actions{ display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 .6rem; }
.fun-sc-live{ min-height: 1.4em; margin: 0 0 .7rem; }
.fun-sc-out{ background: #fffdf8; border: 1px dashed #b99a8a; border-radius: 12px; padding: .8rem; margin: 0 0 .8rem; }
.fun-sc-out[hidden], .fun-sc-seven[hidden]{ display: none; }
.fun-sc-out h2{ margin: 0 0 .5rem; font-size: 1.1rem; color: var(--sc-navy); }
.fun-sc-scarf{ position: relative; height: 4.4rem; margin: .5rem .9rem; border-radius: 4px; box-shadow: 0 2px 6px rgba(36,50,74,.18); }
.fun-sc-scarf::before, .fun-sc-scarf::after{
  content: ""; position: absolute; top: 6px; bottom: 6px; width: .8rem;
  background: repeating-linear-gradient(0deg, var(--fr, #999) 0 3px, transparent 3px 7px);
}
.fun-sc-scarf::before{ left: -.8rem; } .fun-sc-scarf::after{ right: -.8rem; }
.fun-sc-scarf span{ position: absolute; top: 0; bottom: 0; }
.fun-sc-for{ display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .7rem 0 0; }
.fun-sc-for select{ font: inherit; min-height: 44px; border: 2px solid var(--sc-navy); border-radius: 10px; padding: .2rem .5rem; background: #fffdf8; color: var(--sc-navy); }
.fun-sc-guide{ font-weight: 700; }
.fun-sc-count{ margin: 0 0 .5rem; font-weight: 600; color: var(--sc-navy); }
.fun-sc-note{ font-size: .9rem; color: #5c534a; }
@media (prefers-reduced-motion: no-preference){
  .fun-sc-out:not([hidden]){ animation: fun-sc-in .3s ease-out both; }
  @keyframes fun-sc-in{ from{ opacity: 0; transform: translateY(6px); } }
}

/* Sound chip lives in the page header (not position:fixed), like comics: no floating button over content. */
.fun-sc-tools{ display: flex; justify-content: flex-end; margin: 0 0 .35rem; }
#fun-scarf [data-fun-sfx]{
  position: static; top: auto; right: auto; z-index: auto; max-width: none; min-width: 44px; min-height: 44px;
  padding: .35rem .8rem; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: .78rem;
}
.fun-sc-world{ max-width: 56rem; margin-left: auto; margin-right: auto; }
