@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Dosis:wght@700;800&display=swap");

:host,
.slotgen-root-scope {
  display: block;
  min-width: 0;
}

:host,
.slotgen-root-scope:not([data-slotgen-mount="true"]) {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

.slotgen-root-scope[data-slotgen-mount="true"] {
  max-width: 100%;
  width: 100%;
}

:host,
:host *,
.slotgen-root-scope,
.slotgen-root-scope * {
  box-sizing: border-box;
}

.slotgen-widget {
  --slotgen-bg: #ffffff;
  --slotgen-panel: #ffffff;
  --slotgen-panel-soft: #ffffff;
  --slotgen-text: #1f2a33;
  --slotgen-muted: #526270;
  --slotgen-accent: #1f8a70;
  --slotgen-accent-2: #efb43f;
  --slotgen-accent-3: #ff6b6b;
  --slotgen-border: #d6dfcf;
  --slotgen-shadow: 0 16px 36px rgba(26, 43, 55, 0.16);
  --slotgen-focus: #0f6ef5;
  --slotgen-marker-tip-color: #000000;
  --slotgen-font-heading: "Dosis", "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  --slotgen-font-body: "Barlow", "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--slotgen-border) 75%, #ffffff);
  border-radius: 14px;
  box-shadow: var(--slotgen-shadow);
  color: var(--slotgen-text);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  padding: 12px;
  position: relative;
  width: 100%;
  container-type: inline-size;
}

.slotgen-widget::before {
  background: #e8edf2;
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.slotgen-header {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
}

.slotgen-title {
  font-family: var(--slotgen-font-heading);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.slotgen-difficulty {
  border: 0;
  margin: 0;
  padding: 0;
  justify-self: end;
}

.slotgen-difficulty legend {
  color: var(--slotgen-muted);
  font-family: var(--slotgen-font-heading);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.slotgen-difficulty-options {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.slotgen-difficulty-option {
  align-items: center;
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--slotgen-border) 82%, #ffffff);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--slotgen-font-body);
  font-size: 14px;
  font-weight: 600;
  gap: 5px;
  padding: 5px 10px;
}

.slotgen-difficulty-option input {
  margin: 0;
}

.slotgen-difficulty-option input:checked + span {
  color: #6DC8BB;
  font-weight: 700;
}

.slotgen-machine {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 96px;
  margin-top: 12px;
}

.slotgen-reels {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.slotgen-reel {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--slotgen-border) 85%, #ffffff);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.slotgen-reel-label {
  background: #6DC8BB;
  color: #2d3c46;
  font-family: var(--slotgen-font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 9px;
  text-transform: uppercase;
}

.slotgen-reel-window {
  align-items: center;
  background: #ffffff;
  display: flex;
  font-family: var(--slotgen-font-body);
  font-size: clamp(15px, 1.9vw, 19px);
  font-weight: 700;
  justify-content: center;
  min-height: 74px;
  padding: 7px;
  text-align: center;
}

.slotgen-reel-word {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: normal;
  white-space: nowrap;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.slotgen-widget.slotgen-spinning .slotgen-reel-word {
  opacity: 0.92;
}

@media (orientation: portrait) {
  .slotgen-reel-window {
    font-size: clamp(13px, 1.6vw, 17px);
  }
}

.slotgen-arm {
  align-self: stretch;
  background: #FFC421;
  border: 1px solid #b87c0e;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #2d2104;
  cursor: pointer;
  font-family: var(--slotgen-font-heading);
  font-size: 15px;
  font-weight: 800;
  min-width: 84px;
  padding: 10px 12px;
  text-transform: uppercase;
  transition: transform 0.14s ease, filter 0.2s ease;
}

.slotgen-arm:hover:not(:disabled) {
  filter: saturate(1.12);
  transform: translateY(-1px);
}

.slotgen-arm:active:not(:disabled) {
  transform: translateY(1px);
}

.slotgen-arm:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.slotgen-sentence-box {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--slotgen-border) 88%, #ffffff);
  border-radius: 10px;
  margin-top: 10px;
  padding: 10px;
}

.slotgen-sentence-row {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.slotgen-sentence {
  flex: 1 1 260px;
  font-family: var(--slotgen-font-body);
  font-size: clamp(16px, 1.9vw, 18px);
  font-weight: 600;
  line-height: 1.33;
  margin: 0;
  min-height: 1.5em;
  min-width: 0;
}

.slotgen-highlight {
  animation: slotgen-flash 420ms ease;
}

@keyframes slotgen-flash {
  0% {
    background: #fff9dd;
  }

  100% {
    background: transparent;
  }
}

.slotgen-pen-btn,
.slotgen-fill-btn,
.slotgen-eraser-btn,
.slotgen-sentence-copy,
.slotgen-action-btn {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--slotgen-border) 84%, #ffffff);
  border-radius: 9px;
  box-shadow: 0 1px 1px rgba(31, 42, 51, 0.06);
  color: var(--slotgen-text);
  cursor: pointer;
  font-family: var(--slotgen-font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  transition: border-color 0.14s ease, transform 0.14s ease, background 0.14s ease;
}

.slotgen-pen-btn:hover,
.slotgen-fill-btn:hover,
.slotgen-eraser-btn:hover,
.slotgen-sentence-copy:hover,
.slotgen-action-btn:hover {
  border-color: color-mix(in srgb, var(--slotgen-accent) 45%, var(--slotgen-border));
  transform: translateY(-1px);
}

.slotgen-pen-btn:active,
.slotgen-fill-btn:active,
.slotgen-eraser-btn:active,
.slotgen-sentence-copy:active,
.slotgen-action-btn:active {
  transform: translateY(0);
}

.slotgen-pen-btn[aria-pressed="true"],
.slotgen-fill-btn[aria-pressed="true"],
.slotgen-eraser-btn[aria-pressed="true"] {
  background: #6DC8BB;
  border-color: #4faea1;
  color: #0f5f4e;
}

.slotgen-draw {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--slotgen-border) 88%, #ffffff);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  position: relative;
}

.slotgen-draw.slotgen-draw-fullscreen {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: 100dvh;
  inset: 0;
  margin-top: 0;
  overflow: hidden;
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  position: fixed;
  width: 100%;
  z-index: 2147483000;
}

.slotgen-draw.slotgen-draw-fullscreen .slotgen-controls {
  margin-inline: auto;
  width: min(100%, 1400px);
}

.slotgen-draw.slotgen-draw-fullscreen .slotgen-controls {
  background: #ffffff;
  padding-block: 2px 6px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.slotgen-draw.slotgen-draw-fullscreen .slotgen-canvas-wrap {
  max-width: none;
  margin-inline: auto;
  width: min(100%, var(--slotgen-fullscreen-canvas-width, 1400px));
}

.slotgen-landscape-lock {
  display: none;
}

.slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-portrait-blocked .slotgen-controls,
.slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-portrait-blocked .slotgen-canvas-wrap {
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
}

.slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-portrait-blocked .slotgen-landscape-lock {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  inset: 0;
  justify-content: center;
  padding:
    max(20px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  position: absolute;
  z-index: 3;
}

.slotgen-landscape-lock-card {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--slotgen-border) 85%, #ffffff);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(26, 43, 55, 0.18);
  max-width: 320px;
  padding: 22px 20px;
  text-align: center;
}

.slotgen-landscape-lock-title {
  color: var(--slotgen-text);
  font-family: var(--slotgen-font-heading);
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.1;
  margin: 0 0 10px;
}

.slotgen-landscape-lock-text {
  color: var(--slotgen-muted);
  font-family: var(--slotgen-font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.slotgen-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.slotgen-toolbar-group {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
}

.slotgen-tools-group,
.slotgen-actions-group {
  flex-wrap: nowrap;
}

.slotgen-colors-group {
  flex: 1 1 180px;
  flex-wrap: wrap;
}

.slotgen-actions-group {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 4px;
  margin-left: auto;
}

.slotgen-actions-group .slotgen-action-btn {
  font-size: 13px;
  padding: 5px 8px;
}

.slotgen-action-label {
  display: inline-block;
  white-space: nowrap;
}

.slotgen-action-icon {
  display: none;
}

.slotgen-action-symbol {
  display: block;
  height: 16px;
  width: 16px;
}

.slotgen-action-symbol-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.slotgen-action-icon-btn {
  align-items: center;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  min-width: 32px;
  padding: 0;
  width: 32px;
}

.slotgen-fullscreen-icon {
  display: block;
  height: 18px;
  width: 18px;
}

.slotgen-fullscreen-icon-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.slotgen-widget.slotgen-ios-touch .slotgen-controls {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 8px;
  justify-content: center;
}

.slotgen-widget.slotgen-ios-touch .slotgen-tools-group,
.slotgen-widget.slotgen-ios-touch .slotgen-colors-group {
  justify-content: center;
}

.slotgen-widget.slotgen-ios-touch .slotgen-colors-group {
  align-self: center;
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.slotgen-widget.slotgen-ios-touch .slotgen-actions-group {
  flex: 0 0 100%;
  flex-wrap: wrap;
  justify-content: center;
  margin-left: 0;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-controls {
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: center;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-toolbar-group {
  flex-wrap: nowrap;
  gap: 3px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-tools-group,
.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-colors-group,
.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-actions-group {
  align-self: center;
  flex: 0 0 auto;
  justify-content: center;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-actions-group {
  margin-left: 0;
  width: auto;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-pen-btn,
.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-fill-btn,
.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-eraser-btn,
.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-action-icon-btn,
.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-action-btn {
  border-radius: 8px;
  height: 30px;
  min-width: 30px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-pen-btn,
.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-fill-btn,
.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-eraser-btn,
.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-action-icon-btn {
  width: 30px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-pen-icon-thin {
  height: 11px;
  width: 20px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-pen-icon-medium {
  height: 14px;
  width: 24px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-pen-icon-thick {
  height: 17px;
  width: 28px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-fill-icon {
  height: 20px;
  width: 20px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-eraser-icon {
  height: 10px;
  width: 14px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-colors-group {
  gap: 3px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-color-swatch {
  border-radius: 5px;
  height: 18px;
  min-width: 18px;
  width: 18px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-action-btn {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  gap: 0;
  justify-content: center;
  padding: 0 6px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-action-btn:not(.slotgen-fullscreen-btn) {
  padding: 0;
  width: 30px;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-action-btn:not(.slotgen-fullscreen-btn) .slotgen-action-label {
  display: none;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-action-btn:not(.slotgen-fullscreen-btn) .slotgen-action-icon {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.slotgen-widget.slotgen-touch-mobile-device .slotgen-draw.slotgen-draw-fullscreen.slotgen-draw-fullscreen-mobile-compact .slotgen-action-symbol {
  height: 15px;
  width: 15px;
}

@media (min-width: 861px) {
  .slotgen-colors-group {
    flex: 1 1 auto;
    min-width: 0;
  }

  .slotgen-actions-group {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    margin-left: auto;
  }
}

@container (max-width: 860px) {
  .slotgen-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .slotgen-title {
    text-align: center;
  }

  .slotgen-difficulty {
    justify-self: center;
  }

  .slotgen-difficulty-options {
    justify-content: center;
  }

  .slotgen-controls {
    align-items: flex-start;
    justify-content: center;
  }

  .slotgen-tools-group,
  .slotgen-colors-group {
    justify-content: center;
  }

  .slotgen-colors-group {
    align-self: center;
    flex: 0 1 auto;
  }

  .slotgen-machine {
    grid-template-columns: minmax(0, 1fr);
  }

  .slotgen-arm {
    min-height: 46px;
    width: 100%;
  }

  .slotgen-actions-group {
    flex: 0 0 100%;
    justify-content: center;
    margin-left: 0;
  }

  .slotgen-canvas-wrap {
    max-width: 100%;
  }
}

.slotgen-pen-btn,
.slotgen-fill-btn,
.slotgen-eraser-btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 0;
}

.slotgen-pen-btn {
  height: 40px;
  min-width: 40px;
  width: 40px;
}

.slotgen-eraser-btn {
  height: 40px;
  min-width: 40px;
  width: 40px;
}

.slotgen-fill-btn {
  height: 40px;
  min-width: 40px;
  width: 40px;
}

.slotgen-pen-icon {
  display: block;
  height: 17px;
  transform: rotate(-38deg);
  transform-origin: center;
  width: 30px;
}

.slotgen-pen-icon .slotgen-pen-body,
.slotgen-pen-icon .slotgen-pen-cap,
.slotgen-pen-icon .slotgen-pen-tip {
  stroke: #111;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.slotgen-pen-icon .slotgen-pen-body {
  fill: #ffffff;
}

.slotgen-pen-icon .slotgen-pen-cap {
  fill: #d6dde6;
}

.slotgen-pen-icon .slotgen-pen-tip {
  fill: var(--slotgen-marker-tip-color);
}

.slotgen-pen-icon-thin {
  height: 14px;
  width: 25px;
}

.slotgen-pen-icon-medium {
  height: 17px;
  width: 30px;
}

.slotgen-pen-icon-thick {
  height: 21px;
  width: 36px;
}

.slotgen-eraser-icon {
  background: linear-gradient(180deg, #f8fafc 0%, #d9e3ec 100%);
  border: 1px solid #5d6b78;
  border-radius: 3px;
  display: inline-block;
  height: 12px;
  position: relative;
  transform: rotate(-38deg);
  width: 16px;
}

.slotgen-eraser-icon::before {
  background: #ffd98a;
  border-radius: 2px 0 0 2px;
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 5px;
}

.slotgen-fill-icon {
  display: block;
  height: 28px;
  transform: rotate(52deg);
  transform-origin: center;
  width: 28px;
}

.slotgen-fill-icon .slotgen-fill-body {
  fill: #ffffff;
  stroke: #111;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.slotgen-fill-icon .slotgen-fill-accent {
  fill: #d6dde6;
  stroke: #111;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.1;
}

.slotgen-fill-icon .slotgen-fill-line {
  fill: none;
  stroke: #111;
  stroke-linecap: round;
  stroke-width: 1.2;
}

.slotgen-fill-icon .slotgen-fill-drop {
  fill: var(--slotgen-marker-tip-color);
  stroke: #111;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.slotgen-fill-icon-bucket {
  transform: rotate(52deg);
}

.slotgen-fill-icon-paint-can {
  transform: rotate(52deg);
}

.slotgen-fill-icon-jerrycan {
  transform: rotate(52deg);
}

.slotgen-colors-group {
  gap: 4px;
}

.slotgen-color-swatch {
  appearance: none;
  background: var(--slotgen-swatch);
  border: 1px solid color-mix(in srgb, var(--slotgen-border) 88%, #9ca3af);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  height: 22px;
  min-width: 22px;
  padding: 0;
  transition: transform 0.14s ease, border-color 0.14s ease;
  width: 22px;
}

.slotgen-color-swatch[data-color="#ffffff"] {
  border-color: #8a97a4;
  box-shadow:
    inset 0 0 0 1px rgba(215, 223, 232, 0.95),
    0 0 0 1px rgba(61, 76, 91, 0.14);
}

.slotgen-color-swatch:hover {
  border-color: color-mix(in srgb, var(--slotgen-accent) 45%, var(--slotgen-border));
  transform: translateY(-1px);
}

.slotgen-color-swatch:active {
  transform: translateY(0);
}

.slotgen-color-swatch[aria-pressed="true"] {
  border-color: #0f6ef5;
  box-shadow: 0 0 0 2px rgba(15, 110, 245, 0.22);
}

.slotgen-canvas-wrap {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--slotgen-border) 80%, #ffffff);
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  max-width: 100%;
  overflow: hidden;
  width: 100%;
}

.slotgen-canvas {
  display: block;
  height: auto;
  touch-action: none;
  width: 100%;
}

.slotgen-draw[data-version-label]::after {
  content: attr(data-version-label);
  color: color-mix(in srgb, var(--slotgen-border) 80%, #ffffff);
  font-size: 8px;
  letter-spacing: 0.01em;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  right: 10px;
  bottom: 2px;
  text-align: right;
  user-select: none;
}

.slotgen-draw.slotgen-draw-fullscreen[data-version-label]::after {
  right: max(10px, env(safe-area-inset-right));
  bottom: max(2px, env(safe-area-inset-bottom));
}

.slotgen-toast {
  background: rgba(27, 36, 44, 0.95);
  border-radius: 8px;
  bottom: 14px;
  color: #fff;
  left: 14px;
  max-width: 80%;
  opacity: 0;
  padding: 8px 10px;
  pointer-events: none;
  position: fixed;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.slotgen-toast.slotgen-toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.slotgen-widget :focus-visible {
  outline: 3px solid var(--slotgen-focus);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .slotgen-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .slotgen-title {
    text-align: center;
  }

  .slotgen-difficulty {
    justify-self: center;
  }

  .slotgen-difficulty-options {
    justify-content: center;
  }

  .slotgen-controls {
    align-items: flex-start;
    justify-content: center;
  }

  .slotgen-tools-group,
  .slotgen-colors-group {
    justify-content: center;
  }

  .slotgen-colors-group {
    align-self: center;
    flex: 0 1 auto;
  }

  .slotgen-machine {
    grid-template-columns: minmax(0, 1fr);
  }

  .slotgen-arm {
    min-height: 46px;
    width: 100%;
  }

  .slotgen-actions-group {
    flex: 0 0 100%;
    justify-content: center;
    margin-left: 0;
  }

  .slotgen-canvas-wrap {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .slotgen-reels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .slotgen-sentence-box {
    margin-top: 8px;
    padding: 7px 8px;
  }

  .slotgen-sentence-row {
    gap: 6px;
  }

  .slotgen-sentence {
    flex: 1 1 180px;
    font-size: clamp(14px, 3.8vw, 16px);
    min-height: 1.2em;
  }

  .slotgen-draw {
    gap: 8px;
    padding: 8px;
  }

  .slotgen-controls {
    align-items: flex-start;
    gap: 6px 8px;
  }

  .slotgen-toolbar-group {
    gap: 5px;
  }

  .slotgen-actions-group {
    justify-content: center;
    margin-left: 0;
    width: 100%;
  }

  .slotgen-action-btn,
  .slotgen-sentence-copy {
    font-size: 13px;
    padding: 5px 8px;
  }

  .slotgen-action-icon-btn {
    height: 32px;
    min-width: 32px;
    padding: 0;
    width: 32px;
  }

  .slotgen-pen-btn,
  .slotgen-fill-btn,
  .slotgen-eraser-btn {
    height: 36px;
    min-width: 36px;
    width: 36px;
  }

  .slotgen-fill-icon {
    height: 24px;
    width: 24px;
  }

  .slotgen-color-swatch {
    height: 20px;
    min-width: 20px;
    width: 20px;
  }
}

@media (max-width: 460px) {
  .slotgen-widget {
    padding: 10px;
  }

  .slotgen-reels {
    grid-template-columns: minmax(0, 1fr);
  }

  .slotgen-sentence-row {
    align-items: center;
    flex-direction: row;
  }

  .slotgen-sentence {
    flex-basis: 140px;
  }

  .slotgen-sentence-copy {
    margin-left: auto;
  }
}
