.sticker-maker {
  --sm-ink: #13263d;
  --sm-pale: #eef3f8;
  --sm-edge: #c7d5e4;
  --sm-green: #c8ec75;
}
.sticker-maker [hidden] { display: none !important; }
.sm-workspace,
.sm-pack {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  margin-block-end: 1.25rem;
  padding: clamp(0.875rem, 3vw, 2rem);
  min-width: 0;
}
.sm-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}
.sm-preview-pane, .sm-editor { min-width: 0; }
.sm-kicker {
  margin: 0 0 .6rem;
  color: var(--sm-ink);
  font-weight: 700;
}
.sm-preview {
  display: grid;
  place-items: center;
  border: 1px solid var(--sm-edge);
  border-radius: 18px;
  background-color: #fff;
  background-image: conic-gradient(var(--sm-pale) 25%, #fff 0 50%, var(--sm-pale) 0 75%, #fff 0);
  background-size: 24px 24px;
}
.sm-preview canvas { display: block; width: min(100%, 360px); height: auto; }
.sm-editor { display: grid; gap: 1rem; }
.sm-editor h2, .sm-pack h2, .sm-content h2 { color: var(--sm-ink); margin: 0 0 .35rem; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.sm-editor .tw-input, .sm-editor .tw-select { width: 100%; min-height: 44px; }
.sm-note, .sm-transfer, .sm-status {
  color: #40576d;
  font-size: .9rem;
  line-height: 1.45;
  margin: .3rem 0 0;
}
.sm-status, .sm-file-error { min-height: 1.3em; }
.sm-file-error { color: #9b2534; }
.sm-transfer a { color: #2059a4; text-decoration: underline; }
.sm-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 1rem; }
.sm-controls input[type=color] { width: 100%; min-height: 44px; border: 1px solid var(--sm-edge); border-radius: 8px; cursor: pointer; }
.sm-file {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  display: block;
  color: var(--sm-ink);
  font-size: .9rem;
}
.sm-file::file-selector-button { border: 1px solid var(--sm-edge); background: var(--sm-pale); padding: .6rem .75rem; border-radius: .5rem; color: var(--sm-ink); }
.sm-pack { gap: .85rem; }
.sm-pack-head, .sm-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem .9rem; }
.sm-actions { justify-content: flex-start; padding-top: .65rem; }
.sm-btn, .sm-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sm-edge);
  border-radius: .65rem;
  padding: .55rem .85rem;
  color: var(--sm-ink);
  background: white;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
}
.sm-btn[aria-disabled=true], .sm-btn:disabled, .sm-link:disabled { opacity: .65; cursor: not-allowed; }
.sm-primary { background: var(--sm-ink); color: #fff; border-color: var(--sm-ink); }
.sm-primary:hover:not(:disabled) { background: #223d5f; }
.sm-secondary:hover:not(:disabled), .sm-link:hover:not(:disabled) { background: var(--sm-pale); }
.sm-link { width: fit-content; background: transparent; border-color: transparent; text-decoration: underline; padding-inline: .3rem; }
.sticker-maker :is(button,input,select,a,summary):focus-visible { outline: 3px solid #2059a4; outline-offset: 3px; }
.sm-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 100px), 1fr)); list-style: none; gap: .75rem; padding: 0; margin: .25rem 0; }
.sm-tray li { min-width: 0; }
.sm-tile {
  width: 100%;
  min-height: 44px;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: .4rem;
  gap: .15rem;
  border: 2px solid var(--sm-edge);
  border-radius: .8rem;
  background: var(--sm-pale);
  color: var(--sm-ink);
}
.sm-tile[aria-pressed=true] { border-color: var(--sm-ink); box-shadow: inset 0 -4px var(--sm-ink); background: #eaf6d0; }
.sm-tile canvas { display: block; width: min(100%, 100px); height: auto; }
.sm-tile span { font-size: .8rem; overflow-wrap: anywhere; }
.sm-content { display: grid; gap: 1.25rem; }
.sm-content > * {
  background: #fff;
  border: 1px solid var(--sm-edge);
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 1.6rem);
  min-width: 0;
  color: var(--sm-ink);
}
.sm-content ol { padding-inline-start: 1.4rem; }
.sm-content li + li { margin-block-start: .35rem; }
.sm-content a { color: #2059a4; text-decoration: underline; text-underline-offset: .2em; }
.sm-content details { border-block-end: 1px solid var(--sm-edge); padding-block: .5rem; }
.sm-content details:last-child { border: 0; }
.sm-content summary { cursor: pointer; font-weight: 650; min-height: 44px; padding-block: .5rem; }
.sm-content details p { margin: 0 0 .5rem; }
.sm-examples, .sm-related { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; padding: 0; margin: 0; }
.sm-examples li { background: var(--sm-pale); padding: .4rem .75rem; border-radius: 99px; margin: 0; }
.sm-related li { margin: 0; padding: .4rem 0; }
@media (max-width: 700px) {
  .sm-workspace { grid-template-columns: minmax(0, 1fr); }
  .sm-preview canvas { width: min(100%, 235px); }
}
@media (max-width: 380px) {
  .sm-actions > * { width: 100%; }
  .sm-tray { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.sm-heading .tool-page-breadcrumbs .breadcrumb {
  flex-wrap: wrap;
  white-space: normal;
  padding-block: .5rem;
}
.sm-share { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.sm-share .sm-status { margin-block: 0; }
#sm-share-fallback { flex-basis: 100%; }
#sm-share-url { width: 100%; }
#sm-how, #sm-phrase { scroll-margin-block-start: 6rem; }
@media (max-width: 480px) {
  .sm-heading .tool-page-header { padding-block: 1.45rem; }
  .sm-heading .tool-page-header h1 { font-size: clamp(1.6rem, 6.6vw, 2rem); line-height: 1.13; }
  .sm-heading .tool-page-header span { margin-block-start: .65rem; }
  .sticker-maker.tools-wrap { padding-top: 1rem; }
}
