.bead-site {
  --b-ink: #25342d;
  --b-muted: #6b756d;
  --b-line: #dce1d8;
  --b-paper: #fffdf7;
  --b-accent: #276345;
  --b-tint: #edf3e8;
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px 28px 72px;
  color: var(--b-ink);
  font-family: "Schibsted Grotesk", "Noto Sans SC", sans-serif;
}
.bead-site * {
  box-sizing: border-box;
}
.bead-site h1,
.bead-site h2,
.bead-site h3,
.bead-site p {
  margin: 0;
}
.bead-site button,
.bead-site select,
.bead-site textarea {
  font: inherit;
}
.bead-site button,
.bead-site a,
.bead-site select,
.bead-site input {
  touch-action: manipulation;
}
.bead-site button {
  cursor: pointer;
}
.bead-site button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.bead-site :focus-visible,
dialog :focus-visible {
  outline: 3px solid #d97757;
  outline-offset: 3px;
}
.bead-site [hidden],
.bead-loading[hidden],
#download-actions[hidden] {
  display: none !important;
}
.bead-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--b-muted);
  font-weight: 600;
}
.bead-breadcrumb {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: var(--b-muted);
  margin-bottom: 34px;
}
.bead-breadcrumb a:hover {
  color: var(--b-accent);
}
.bead-beta {
  border: 1px solid var(--b-line);
  padding: 2px 7px;
  font-size: 9px;
  border-radius: 4px;
  letter-spacing: 0.1em;
}
.bead-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}
.bead-title-row h1 {
  font-family: "Noto Serif SC", "Fraunces", serif;
  font-size: 40px;
  letter-spacing: -0.04em;
  margin: 7px 0 12px;
  font-weight: 650;
}
.bead-title-row p {
  font-size: 14px;
  color: var(--b-muted);
}
.bead-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--b-line);
  border-radius: 7px;
  font-size: 12px;
  background: transparent;
  color: var(--b-ink);
  white-space: nowrap;
}
.bead-subtle:hover {
  background: var(--b-tint);
  border-color: var(--b-accent);
}
.bead-workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  border: 1px solid var(--b-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--b-paper);
  box-shadow: 0 12px 36px -24px #23382e22;
}
.bead-controls {
  padding: 25px;
  border-right: 1px solid var(--b-line);
}
.bead-section-label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 17px;
}
.bead-section-label > span {
  font-family: monospace;
  font-size: 10px;
  color: var(--b-muted);
  background: var(--b-tint);
  padding: 4px 6px;
  border-radius: 3px;
}
.bead-section-label h2 {
  font-size: 14px;
  font-weight: 600;
}
.bead-tabs {
  display: flex;
  background: var(--b-tint);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 20px;
  gap: 4px;
}
.bead-tabs button {
  border: 0;
  background: transparent;
  font-size: 12px;
  flex: 1;
  padding: 10px 4px;
  border-radius: 5px;
  color: var(--b-muted);
}
.bead-tabs button[aria-selected="true"] {
  background: var(--b-paper);
  color: var(--b-ink);
  box-shadow: 0 1px 4px #00000012;
}
.bead-tabs span {
  margin-right: 7px;
}
.bead-controls label:not(.bead-drop, .bead-check, .bead-sizes label) {
  display: block;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 8px;
}
.bead-controls textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--b-line);
  border-radius: 8px;
  background: transparent;
  padding: 12px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--b-ink);
}
.bead-controls textarea::placeholder {
  color: #90958b;
}
.bead-suggestions {
  display: flex;
  gap: 6px;
  margin: 9px 0 18px;
}
.bead-suggestions button {
  padding: 4px 8px;
  border: 1px solid var(--b-line);
  border-radius: 4px;
  font-size: 10px;
  background: transparent;
  color: var(--b-muted);
}
.bead-controls select {
  width: 100%;
  border: 1px solid var(--b-line);
  border-radius: 6px;
  padding: 9px 8px;
  background: var(--b-paper);
  font-size: 11px;
  color: var(--b-ink);
}
.bead-divider {
  border-top: 1px solid var(--b-line);
  padding-top: 23px;
  margin-top: 25px;
}
.bead-sizes {
  display: flex;
  border: 0;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.bead-sizes label {
  flex: 1;
  cursor: pointer;
}
.bead-sizes input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.bead-sizes label > span {
  display: flex;
  flex-direction: column;
  text-align: center;
  border: 1px solid var(--b-line);
  padding: 9px 1px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: monospace;
  gap: 3px;
}
.bead-sizes small {
  font-size: 8px;
  font-weight: 400;
  color: var(--b-muted);
}
.bead-sizes input:checked + span {
  background: var(--b-accent);
  border-color: var(--b-accent);
  color: white;
}
.bead-sizes input:checked + span small {
  color: #d0e2d7;
}
.bead-sizes input:focus-visible + span {
  outline: 3px solid #d97757;
  outline-offset: 2px;
}
.bead-board-note {
  font-size: 10px;
  color: var(--b-muted);
  padding: 10px 0 18px;
}
.bead-option-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: end;
}
.bead-option-row > div {
  flex: 1;
}
.bead-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  padding-bottom: 10px;
  flex: 1;
}
.bead-check input {
  accent-color: var(--b-accent);
}
.bead-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--b-accent);
  color: white;
  border: 1px solid var(--b-accent);
  border-radius: 7px;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s;
}
.bead-primary:hover {
  background: #1d4f36;
}
.bead-controls > .bead-primary {
  width: 100%;
  margin-top: 8px;
  justify-content: space-between;
}
.bead-fine {
  font-size: 10px;
  line-height: 1.7;
  color: var(--b-muted);
  margin-top: 10px !important;
}
.bead-notice {
  font-size: 11px;
  line-height: 1.6;
  margin-top: 14px !important;
  padding: 10px;
  border-radius: 6px;
  background: var(--b-tint);
  color: var(--b-accent);
}
.bead-notice.is-error {
  background: #fbe9df;
  color: #95462b;
}
.bead-result {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.bead-preview-bar {
  display: flex;
  justify-content: space-between;
  padding: 18px 23px;
  align-items: center;
  font-size: 10px;
  border-bottom: 1px solid var(--b-line);
}
.bead-preview-bar > div:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
}
.bead-preview-bar strong {
  font-weight: 600;
}
.bead-preview-bar #preview-kind {
  color: var(--b-muted);
}
.bead-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #74a563;
}
.bead-preview-tabs {
  display: flex;
  border: 1px solid var(--b-line);
  padding: 2px;
  border-radius: 5px;
}
.bead-preview-tabs button {
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--b-muted);
  font-size: 10px;
  padding: 5px 9px;
}
.bead-preview-tabs button[aria-pressed="true"] {
  background: var(--b-tint);
  color: var(--b-accent);
}
.bead-canvas-wrap {
  position: relative;
  min-height: 414px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: #eff0e7;
  background-image: radial-gradient(#697d5a33 0.7px, transparent 0.7px);
  background-size: 12px 12px;
  padding: 28px 20px 18px;
  flex: 1;
}
.bead-paper {
  line-height: 0;
  width: min(100%, 348px);
  padding: 12px;
  border: 1px solid #fff;
  background: white;
  transform: rotate(-1deg);
  box-shadow: 0 4px 14px #48573c1f;
}
.bead-paper canvas,
.bead-paper img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
  display: block;
}
.bead-preview-caption {
  font:
    9px "JetBrains Mono",
    monospace;
  letter-spacing: 0.12em;
  color: #63715e;
  margin-top: 18px;
}
.bead-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 18px 12px;
  border-top: 1px solid var(--b-line);
  border-bottom: 1px solid var(--b-line);
  background: var(--b-paper);
}
.bead-stat-strip > div {
  text-align: center;
  border-right: 1px solid var(--b-line);
}
.bead-stat-strip > div:last-child {
  border: 0;
}
.bead-stat-strip span {
  display: block;
  font:
    600 16px "JetBrains Mono",
    monospace;
}
.bead-stat-strip small {
  display: block;
  font-size: 9px;
  color: var(--b-muted);
  margin-top: 7px;
}
.bead-unlock {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 23px 24px 0;
}
.bead-unlock h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 19px;
  margin: 6px 0 7px;
}
.bead-unlock p {
  font-size: 11px;
  color: var(--b-muted);
}
.bead-price {
  text-align: right;
  white-space: nowrap;
}
.bead-price strong {
  display: block;
  font:
    500 30px "Fraunces",
    serif;
}
.bead-price span {
  font-size: 8px;
  color: var(--b-muted);
}
.bead-deliverables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 10px;
  color: var(--b-muted);
  padding: 17px 24px;
}
.bead-export-actions {
  display: flex;
  gap: 12px;
  padding: 0 24px;
}
.bead-export-actions > .bead-primary {
  width: 100%;
}
.bead-result > .bead-fine {
  padding: 0 24px 19px;
  margin-top: 10px !important;
}
.bead-how {
  margin-top: 50px;
  border-top: 1px solid var(--b-line);
  padding-top: 26px;
}
.bead-how > div {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-top: 22px;
}
.bead-how article > span {
  font: 10px monospace;
  color: var(--b-muted);
}
.bead-how h3 {
  font-size: 14px;
  margin: 10px 0;
}
.bead-how p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--b-muted);
}
.bead-drop {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  border: 1px dashed #a2b59b;
  background: var(--b-tint);
  border-radius: 8px;
  padding: 23px 8px;
}
.bead-drop > span {
  font-size: 30px;
  color: var(--b-accent);
}
.bead-drop strong {
  font-size: 11px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bead-drop small {
  font-size: 9px;
  color: var(--b-muted);
}
#upload-panel {
  margin-bottom: 20px;
}
.bead-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.bead-loading {
  position: absolute;
  inset: 0;
  background: #fffdf7ee;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
}
.bead-loading small {
  font-size: 11px;
  color: var(--b-muted);
  text-align: center;
  padding: 0 20px;
}
.bead-loading > span {
  width: 30px;
  height: 30px;
  border: 3px dotted #7f9c72;
  animation: bead-spin 3s linear infinite;
}
@keyframes bead-spin {
  to {
    transform: rotate(360deg);
  }
}
#bead-pay-dialog {
  width: min(90vw, 390px);
  border: 1px solid #dce1d8;
  border-radius: 14px;
  padding: 25px;
  background: #fffdf7;
  color: #25342d;
}
#bead-pay-dialog::backdrop {
  background: #18271d80;
}
#bead-pay-dialog h2 {
  font-size: 20px;
  margin: 20px 0;
}
#pay-description,
#pay-status {
  font-size: 12px;
  margin: 12px 0;
}
#pay-qr {
  width: 240px;
  display: block;
  margin: 0 auto;
}
#download-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tools-home {
  padding-top: 68px;
}
.tools-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 18px 0 40px;
  gap: 25px;
}
.tools-intro h1 {
  font-family: "Noto Serif SC", "Fraunces", serif;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.04em;
  white-space: pre-line;
}
.tools-intro p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--b-muted);
  white-space: pre-line;
}
.tools-feature {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  border-top: 1px solid var(--b-line);
  border-bottom: 1px solid var(--b-line);
  padding: 32px 0;
  gap: 60px;
  align-items: center;
}
.bead-tag {
  font:
    10px "JetBrains Mono",
    monospace;
  color: var(--b-accent);
  letter-spacing: 0.1em;
}
.tools-feature h2 {
  font:
    600 38px "Noto Serif SC",
    "Fraunces",
    serif;
  margin: 15px 0 15px;
}
.tools-feature h2 span {
  color: #a9b498;
  font-family: serif;
  margin-left: 20px;
}
.tools-feature p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--b-muted);
  max-width: 370px;
}
.tools-feature-detail {
  font:
    10px "JetBrains Mono",
    monospace;
  margin: 23px 0 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--b-muted);
}
.tools-feature small {
  display: block;
  font-size: 10px;
  color: var(--b-muted);
  margin-top: 12px;
}
.tools-preview {
  display: flex;
  align-items: center;
  flex-direction: column;
  background: #ecf0e3;
  padding: 30px;
  border-radius: 8px;
  background-image: radial-gradient(#81996c44 0.7px, transparent 0.7px);
  background-size: 12px 12px;
}
.tools-preview img {
  width: min(100%, 290px);
  image-rendering: pixelated;
  transform: rotate(3deg);
  border: 12px solid white;
  box-shadow: 0 5px 16px #50643920;
}
.tools-preview span {
  font:
    9px "JetBrains Mono",
    monospace;
  letter-spacing: 0.15em;
  margin-top: 26px;
  color: #75806a;
}
.tools-more {
  margin-top: 46px;
}
.tool-row {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--b-line);
  margin-top: 12px;
}
.tool-row:hover h2 {
  color: var(--b-accent);
}
.tool-row-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--b-tint);
  font: 22px monospace;
  border-radius: 7px;
}
.tool-row h2 {
  font-size: 18px;
}
.tool-row h2 em {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  color: var(--b-accent);
  border: 1px solid var(--b-line);
  padding: 2px 7px;
  margin-left: 14px;
  border-radius: 4px;
}
.tool-row p {
  font-size: 12px;
  color: var(--b-muted);
  margin-top: 8px;
}
.tool-row > span:last-child {
  margin-left: auto;
  font-size: 24px;
  color: var(--b-muted);
}
html.dark .bead-site {
  --b-ink: #e0e8dc;
  --b-muted: #a3b09e;
  --b-line: #394239;
  --b-paper: #222820;
  --b-accent: #447b52;
  --b-tint: #2d382b;
}
html.dark .bead-canvas-wrap,
html.dark .tools-preview {
  background-color: #353e30;
}
html.dark .bead-tabs button[aria-selected="true"] {
  background: #222820;
}
html.dark .bead-loading {
  background: #222820ee;
  color: #e0e8dc;
}
html.dark .bead-controls textarea::placeholder {
  color: #87927f;
}
html.dark .bead-price strong {
  color: #e0e8dc;
}
@media (max-width: 900px) {
  .bead-site {
    padding: 30px 20px 50px;
  }
  .bead-workspace {
    grid-template-columns: 285px minmax(0, 1fr);
  }
  .bead-controls {
    padding: 20px;
  }
  .bead-canvas-wrap {
    min-height: 360px;
  }
  .bead-preview-bar {
    padding: 14px 15px;
  }
  .bead-preview-bar #preview-kind {
    display: none;
  }
  .bead-unlock {
    padding: 20px 18px 0;
    gap: 10px;
  }
  .bead-unlock h2 {
    font-size: 16px;
  }
  .bead-price strong {
    font-size: 26px;
  }
  .bead-deliverables {
    padding: 17px 18px;
  }
  .bead-export-actions {
    padding: 0 18px;
  }
  .tools-feature {
    gap: 30px;
  }
  .tools-intro h1 {
    font-size: 39px;
  }
}
@media (max-width: 650px) {
  .bead-site {
    padding: 28px 14px 44px;
  }
  .bead-breadcrumb {
    margin-bottom: 25px;
  }
  .bead-title-row {
    align-items: start;
    margin-bottom: 24px;
  }
  .bead-title-row h1 {
    font-size: 30px;
  }
  .bead-title-row p {
    font-size: 11px;
    max-width: 250px;
    line-height: 1.8;
  }
  .bead-title-row .bead-subtle {
    font-size: 9px;
    padding: 7px 9px;
    margin-top: 32px;
  }
  .bead-workspace {
    display: flex;
    flex-direction: column;
  }
  .bead-controls {
    border-right: 0;
    border-bottom: 1px solid var(--b-line);
    padding: 22px;
  }
  .bead-sizes label > span {
    padding: 10px;
    font-size: 16px;
  }
  .bead-sizes small {
    font-size: 10px;
  }
  .bead-controls textarea {
    min-height: 96px;
  }
  .bead-divider {
    margin-top: 20px;
    padding-top: 20px;
  }
  .bead-canvas-wrap {
    min-height: 380px;
    padding: 25px;
  }
  .bead-preview-bar {
    padding: 15px 18px;
  }
  .bead-stat-strip span {
    font-size: 14px;
  }
  .bead-unlock h2 {
    font-size: 18px;
  }
  .bead-price strong {
    font-size: 29px;
  }
  .bead-how {
    margin-top: 32px;
  }
  .bead-how > div {
    grid-template-columns: 1fr;
    gap: 23px;
  }
  .bead-how article {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0 12px;
  }
  .bead-how article > span {
    grid-row: 1/3;
    padding-top: 5px;
  }
  .bead-how h3 {
    margin: 0 0 7px;
  }
  .tools-home {
    padding-top: 42px;
  }
  .tools-intro {
    display: block;
    margin-bottom: 28px;
  }
  .tools-intro h1 {
    font-size: 35px;
  }
  .tools-intro p {
    margin-top: 16px;
    font-size: 12px;
  }
  .tools-feature {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 26px 0;
  }
  .tools-feature h2 {
    font-size: 32px;
  }
  .tools-feature p {
    font-size: 12px;
  }
  .tools-preview {
    min-height: 320px;
  }
  .tools-feature-detail {
    margin: 18px 0;
  }
  .tool-row {
    gap: 15px;
  }
  .tool-row h2 {
    font-size: 16px;
  }
  .tool-row p {
    font-size: 10px;
    line-height: 1.8;
  }
  .tool-row-mark {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bead-site * {
    animation: none !important;
    transition: none !important;
  }
}

.bead-title-actions {
  display: flex;
  gap: 8px;
}
.bead-controls select {
  appearance: auto;
}
.bead-tabs button:hover {
  color: var(--b-accent);
}
#bead-works-dialog {
  width: min(90vw, 560px);
  border: 1px solid #dce1d8;
  border-radius: 12px;
  background: #fffdf7;
  color: #25342d;
  padding: 25px;
}
#bead-works-dialog::backdrop {
  background: #18271d80;
}
#bead-works-dialog h2 {
  margin: 20px 0;
  font-size: 20px;
}
.bead-work-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #dce1d8;
  padding: 14px 0;
  font-size: 12px;
  color: #25342d;
}
.bead-work-item span {
  display: block;
  font-size: 10px;
  color: #6b756d;
  margin-top: 6px;
}
.bead-work-item em {
  font-style: normal;
  font-size: 10px;
  color: #276345;
  white-space: nowrap;
}
html.dark .bead-site select,
html.dark .bead-site textarea {
  background-color: var(--b-paper) !important;
  color: var(--b-ink) !important;
}
@media (max-width: 650px) {
  .bead-title-row {
    position: relative;
    padding-bottom: 36px;
  }
  .bead-title-actions {
    position: absolute;
    bottom: 0;
    right: 0;
  }
  .bead-title-actions .bead-subtle {
    margin: 0;
  }
}
/* Mobile visitors see the free result before the longer creation controls. */
@media (max-width: 650px) {
  .bead-result {
    display: contents;
  }
  .bead-preview-bar {
    order: 1;
  }
  .bead-canvas-wrap {
    order: 2;
    min-height: 330px;
    flex: none;
  }
  .bead-paper {
    max-width: 270px;
  }
  .bead-stat-strip {
    order: 3;
  }
  .bead-controls {
    order: 4;
    border-top: 1px solid var(--b-line);
  }
  .bead-unlock {
    order: 5;
  }
  .bead-deliverables {
    order: 6;
  }
  .bead-export-actions {
    order: 7;
  }
  .bead-result > .bead-fine {
    order: 8;
  }
}
/* Pattern editing follows the existing paper/ink/green workspace. */
.bead-source-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}
.bead-source-tools img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #dce1d8;
  border-radius: 10px;
}
.bead-inventory-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.bead-edit-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #dce1d8;
}
.bead-edit-entry p {
  font-size: 13px;
  color: #69756d;
  margin: 6px 0;
}
.bead-edit-entry button {
  flex-shrink: 0;
}
#bead-editor {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid #dce1d8;
  border-radius: 16px;
  background: #fffdf7;
}
.bead-editor-heading h2 {
  font-size: 22px;
  margin: 0;
}
.bead-editor-heading p {
  font-size: 12px;
  color: #276345;
  min-height: 18px;
}
.bead-editor-toolbar,
.bead-editor-options,
.bead-editor-footer,
.bead-replace-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
}
.bead-editor-toolbar button,
.bead-editor-footer button {
  min-height: 40px;
  padding: 8px 10px;
}
.bead-editor-toolbar select,
.bead-editor-footer select,
.bead-replace-row select {
  width: auto;
  max-width: 100%;
  min-height: 40px;
  padding: 8px;
  border: 1px solid #dce1d8;
  border-radius: 8px;
  background: #fff;
}
.bead-editor-toolbar [aria-pressed="true"],
#editor-tiles [aria-pressed="true"] {
  background: #276345;
  color: #fff;
  border-color: #276345;
}
.bead-editor-scroll {
  height: 460px;
  overflow: auto;
  border: 1px solid #c8d1c9;
  background: #e8ebe3;
  overscroll-behavior: contain;
}
#editor-canvas {
  display: block;
  max-width: none;
  touch-action: none;
  image-rendering: pixelated;
  cursor: crosshair;
}
.bead-editor-options {
  font-size: 12px;
}
.bead-editor-options label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bead-editor-colors > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.bead-editor-colors input,
#inventory-search {
  max-width: 200px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #dce1d8;
  border-radius: 8px;
}
.bead-editor-colors strong {
  font-size: 13px;
}
#editor-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 5px;
  max-height: 148px;
  overflow: auto;
  padding: 8px 2px;
}
.bead-swatch {
  border: 1px solid #dce1d8;
  border-radius: 6px;
  background: #fff;
  color: #25342d;
  font:
    11px ui-monospace,
    monospace;
  min-height: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}
.bead-swatch:before {
  content: "";
  display: block;
  background: var(--swatch);
  width: 25px;
  height: 16px;
  border: 1px solid #0002;
  border-radius: 3px;
}
.bead-swatch[aria-pressed="true"] {
  outline: 2px solid #276345;
  outline-offset: -2px;
  background: #e9f3e9;
}
.bead-replace-row {
  font-size: 12px;
}
.bead-progress summary {
  cursor: pointer;
  font-size: 13px;
  padding: 10px 0;
}
#editor-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 6px;
  padding: 8px 0;
}
#editor-tiles button {
  padding: 7px;
}
.bead-editor-footer select {
  flex: 1;
  min-width: 150px;
}
.bead-site :focus-visible,
dialog :focus-visible {
  outline: 3px solid #2d70a8;
  outline-offset: 3px;
}
#bead-inventory-dialog,
#bead-crop-dialog {
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #dce1d8;
  border-radius: 18px;
  padding: 24px;
  background: #fffdf7;
  color: #25342d;
}
#inventory-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 6px;
  max-height: 45vh;
  overflow: auto;
  margin: 14px 0;
}
#inventory-list label {
  display: flex;
  gap: 3px;
  align-items: center;
  font-size: 11px;
}
#inventory-list .bead-swatch {
  flex: 1;
}
#crop-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}
#editor-save-status.is-error {
  color: #b83b2b;
}
@media (max-width: 680px) {
  .bead-edit-entry {
    align-items: flex-start;
    flex-direction: column;
  }
  .bead-editor-scroll {
    height: 350px;
  }
  #bead-editor {
    padding: 12px;
  }
  .bead-editor-toolbar {
    gap: 5px;
  }
  .bead-editor-heading h2 {
    font-size: 20px;
  }
  .bead-replace-row label {
    width: 100%;
  }
  .bead-editor-options span {
    width: 100%;
  }
  #bead-inventory-dialog,
  #bead-crop-dialog {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bead-site * {
    animation: none !important;
    transition: none !important;
  }
}
#bead-editor {
  background: var(--b-paper);
  color: var(--b-ink);
  scroll-margin-top: 96px;
  border-color: var(--b-line);
}
.bead-edit-entry {
  padding: 20px 24px;
}
.bead-editor-heading #editor-save-status {
  color: var(--b-accent);
}
#bead-editor input[type="search"],
#bead-editor select {
  background: var(--b-paper);
  color: var(--b-ink);
}
.bead-editor-heading #editor-save-status.is-error {
  color: #e7846e;
}
#bead-inventory-dialog,
#bead-crop-dialog {
  --b-ink: #25342d;
  --b-line: #dce1d8;
  --b-tint: #edf3e8;
  --b-accent: #276345;
}
#bead-inventory-dialog [hidden] {
  display: none !important;
}
#bead-inventory-dialog::backdrop,
#bead-crop-dialog::backdrop {
  background: #18241a88;
}
html.dark #bead-editor .bead-swatch {
  color: #25342d;
}
.bead-edit-entry p {
  color: var(--b-muted);
}
@media(max-width:650px){.bead-edit-entry,#bead-editor{order:4}}
