:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --panel: #111112;
  --panel-soft: #151516;
  --tile: #121212;
  --line: #2b2b2d;
  --line-soft: #1e1e20;
  --text: #f4f4f5;
  --muted: #a2a2a6;
  --subtle: #737377;
  --accent: #e7e7e8;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --danger: #d9d9dc;
  --curve-out: #ff5c62;
  --curve-in: #5aa7ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input[type="range"],
input[type="checkbox"],
input[type="color"] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.icon-sprite {
  display: none;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  flex: 0 0 auto;
}

.app {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) auto;
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 11, 12, 0.94);
  user-select: none;
  -webkit-user-select: none;
}

.brand,
.top-actions,
.button,
.control-heading,
.winner-label,
.top-action-group,
.topbar-zone,
.primary-action {
  display: inline-flex;
  align-items: center;
}

.topbar-zone {
  min-width: 0;
  min-height: 46px;
  gap: 8px;
  border-radius: var(--radius);
  transition:
    background-color 150ms ease,
    outline-color 150ms ease;
}

.topbar-zone-left {
  justify-content: flex-start;
}

.topbar-zone-center {
  justify-content: center;
}

.topbar-zone-right {
  justify-content: flex-end;
}

.topbar[data-primary-dragging="true"] .topbar-zone {
  outline: 1px dashed rgba(255, 255, 255, 0.14);
  outline-offset: 4px;
  background: rgba(255, 255, 255, 0.018);
}

.topbar[data-primary-dragging="true"] .topbar-zone.is-primary-drop-zone {
  outline-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.06);
}

.primary-action {
  min-width: 0;
}

.primary-action.is-primary-action-dragging {
  opacity: 0.46;
  transform: scale(0.98);
}

.primary-action > button:disabled {
  pointer-events: none;
}

.brand {
  gap: 12px;
  font-size: 21px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-button {
  min-height: 44px;
  padding: 0 17px 0 14px;
  border: 1px solid #e8e8ea;
  border-radius: var(--radius);
  background: #f1f1f2;
  color: #101011;
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.brand-button:hover:not(:disabled),
.brand-button:focus-visible {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow:
    0 16px 40px rgba(255, 255, 255, 0.11),
    0 0 0 4px rgba(255, 255, 255, 0.06);
}

.brand-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.24);
  outline-offset: 4px;
}

.brand-button:active:not(:disabled) {
  transform: translateY(1px);
}

.brand-button:disabled {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--subtle);
  box-shadow: none;
  cursor: not-allowed;
}

.brand-button[data-running="true"] {
  border-color: #ffffff;
  background: #ffffff;
  color: #0d0d0e;
}

.brand-button[data-running="true"] .brand-mark {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: currentColor;
  fill: rgba(0, 0, 0, 0.08);
  stroke: currentColor;
  stroke-width: 1.4;
  border-radius: 6px;
}

.top-actions {
  position: relative;
  gap: 8px;
}

.top-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-action-group + .top-action-group {
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
}

.top-action-utility {
  margin-left: 10px;
}

.button,
.icon-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.button {
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  font-weight: 680;
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: #5e5e63;
  background: rgba(255, 255, 255, 0.06);
}

.button:active:not(:disabled),
.icon-button:active:not(:disabled) {
  transform: translateY(1px);
}

.button-primary {
  color: #101011;
  border-color: #e8e8ea;
  background: #f1f1f2;
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.08);
}

.button-primary:hover:not(:disabled) {
  color: #0d0d0e;
  border-color: #ffffff;
  background: #ffffff;
}

.button-muted {
  color: var(--muted);
}

.button-danger {
  color: #ff8a8a;
  border-color: rgba(255, 105, 105, 0.34);
}

.button-danger:hover:not(:disabled) {
  border-color: rgba(255, 130, 130, 0.72);
  background: rgba(255, 85, 85, 0.1);
}

.button-quiet {
  min-width: 92px;
}

#editToggleTop[aria-pressed="true"],
#optionsToggle[aria-expanded="true"],
#bulkToggleTop[aria-expanded="true"],
#boardToggleTop[aria-expanded="true"],
#drawerToggleTop[aria-expanded="true"],
#colorToggleTop[aria-expanded="true"],
#assetsToggleTop[aria-expanded="true"],
#notepadToggleTop[aria-expanded="true"],
#pinnedToggleTop[aria-expanded="true"],
#revealAllBacksButton[aria-pressed="true"],
#sidebarToggleTop[aria-pressed="true"] {
  border-color: #d8d8da;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.menu-wrap {
  position: relative;
}

.options-menu {
  position: fixed;
  z-index: 24;
  right: 16px;
  top: 80px;
  bottom: 80px;
  width: min(430px, calc(100vw - 32px));
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101011;
  box-shadow: var(--shadow);
}

.options-menu[hidden] {
  display: none;
}

.options-menu [data-options-group][hidden] {
  display: none !important;
}

.options-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #101011;
}

.options-head strong {
  font-size: 14px;
  font-weight: 820;
  text-transform: none;
}

.options-close {
  width: 34px;
  min-height: 34px;
}

.options-tabs {
  position: sticky;
  top: 54px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 6px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #101011;
}

.options-tabs button {
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.options-tabs button.is-selected {
  border-color: #e4e4e6;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.control-group {
  padding: 0 0 14px;
  margin: 0 16px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.control-heading {
  width: 100%;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: none;
}

.control-heading output {
  margin-left: auto;
  color: var(--text);
  font-size: 14px;
  font-weight: 640;
  text-transform: none;
}

.pin-button {
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--subtle);
  opacity: 0.66;
  transition:
    opacity 130ms ease,
    border-color 130ms ease,
    background-color 130ms ease,
    color 130ms ease;
}

.pin-button:hover,
.pin-button:focus-visible,
.pin-button.is-pinned {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  opacity: 1;
}

.control-heading .pin-button {
  margin-left: 6px;
}

.editor-section summary .pin-button {
  margin-left: auto;
}

.pin-target-option {
  position: relative;
}

.pin-target-option > .pin-option-button {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 2;
}

.pin-target-option.field-label,
.pin-target-option.range-label,
.pin-target-option.toggle-line,
.pin-target-option.filter-check-row {
  padding-right: 30px;
}

.pin-button-row {
  position: relative;
  margin-bottom: 12px;
  padding-right: 30px;
}

.pin-button-row > .button {
  width: 100%;
}

.pin-button-row > .pin-option-button {
  position: absolute;
  top: 8px;
  right: 0;
}

.editor .pin-target-option {
  padding-right: 30px;
}

@media (hover: hover) and (pointer: fine) {
  .pin-button:not(.is-pinned):not(:focus-visible) {
    opacity: 0;
    pointer-events: none;
  }

  .control-group:hover > .control-heading .pin-button,
  .control-group:focus-within > .control-heading .pin-button,
  .editor-section:hover > summary .pin-button,
  .editor-section:focus-within > summary .pin-button,
  .pin-target-option:hover > .pin-option-button,
  .pin-target-option:focus-within > .pin-option-button,
  .pin-button-row:hover > .pin-option-button,
  .pin-button-row:focus-within > .pin-option-button {
    opacity: 0.82;
    pointer-events: auto;
  }

  .pin-button:hover,
  .pin-button:focus-visible,
  .pin-button.is-pinned {
    opacity: 1;
    pointer-events: auto;
  }
}

input[type="range"] {
  width: 100%;
  accent-color: #efeff0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.segmented button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
}

.segmented button.is-selected {
  border-color: #f2f2f3;
  background: rgba(255, 255, 255, 0.13);
}

select,
.editor input,
.editor textarea,
.field-label select,
.field-label textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d0d0e;
  color: var(--text);
  outline: none;
}

select {
  min-height: 42px;
  padding: 0 12px;
}

.field-label textarea {
  min-height: 132px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}

.data-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 8px;
}

.data-block {
  display: grid;
  gap: 8px;
}

.data-block + .data-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.data-block-heading {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.data-export-toggle {
  justify-content: space-between;
}

.data-options > summary {
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
}

.data-options > summary::-webkit-details-marker {
  display: none;
}

.data-options > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--subtle);
  font-size: 18px;
  font-weight: 640;
  line-height: 1;
}

.data-options[open] > summary {
  margin-bottom: 10px;
}

.data-options[open] > summary::after {
  content: "_";
  transform: translateY(-5px);
}

.data-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.data-file-button {
  cursor: pointer;
}

.import-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.import-status[data-error="true"] {
  color: #ffb4b4;
}

.bulk-options:not([hidden]) {
  min-height: calc(100vh - 178px);
  display: flex;
  flex-direction: column;
  border-bottom: 0;
}

.bulk-field {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr);
}

.bulk-editor-wrap {
  position: relative;
  min-height: 360px;
  display: grid;
  min-width: 0;
}

.bulk-field textarea {
  min-height: 360px;
  height: 100%;
  resize: none;
  overflow: auto;
  white-space: pre;
  font-family: SFMono-Regular, Consolas, Liberation Mono, monospace;
  font-size: 13px;
}

.bulk-line-guide {
  position: absolute;
  top: 0;
  left: var(--bulk-guide-left, 10px);
  right: var(--bulk-guide-right, 10px);
  z-index: 2;
  min-height: 18px;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(13, 13, 14, 0.86);
  color: color-mix(in srgb, var(--muted), #ffffff 18%);
  font-family: SFMono-Regular, Consolas, Liberation Mono, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  transform: translateY(var(--bulk-guide-top, 0));
  white-space: nowrap;
}

.bulk-line-guide[hidden] {
  display: none;
}

.bulk-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.field-label,
.range-label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: none;
}

.range-label {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.range-label input {
  grid-column: 1 / -1;
}

.range-value-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.range-value-row input {
  grid-column: auto;
  min-width: 0;
}

.range-exact-input {
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.range-label output {
  color: var(--text);
  font-size: 13px;
}

.display-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
}

.tile-display-fields {
  display: grid;
  gap: 8px;
  padding-top: 6px;
}

.tile-display-head {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.tile-display-matrix {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) 54px 54px;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.tile-display-corner,
.tile-display-column {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tile-display-column,
.tile-display-check {
  justify-content: center;
  text-align: center;
}

.tile-display-row-label {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
}

.display-options .tile-display-check {
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  gap: 0;
}

.tile-display-check input {
  margin: 0;
}

.hotkey-list {
  display: grid;
  gap: 8px;
}

.hotkey-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.hotkey-name {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 680;
}

.hotkey-value {
  min-width: 72px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d0d0e;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.hotkey-value.is-recording {
  border-color: #f2f2f3;
  background: rgba(255, 255, 255, 0.12);
}

.hotkey-clear {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  color: var(--muted);
}

.parameter-menu {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.parameter-menu summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  text-transform: none;
}

.parameter-menu label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 12px;
  color: var(--text);
  font-size: 14px;
}

.parameter-menu .range-label {
  display: grid;
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
}

.curve-preview {
  height: 112px;
  position: relative;
  margin: 12px 12px 22px;
  padding: 10px 10px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #0d0d0e;
  overflow: visible;
}

.bezier-curve {
  position: absolute;
  inset: 10px;
  z-index: 2;
  width: calc(100% - 20px);
  height: calc(100% - 18px);
  overflow: visible;
  pointer-events: auto;
  touch-action: none;
}

.bezier-axis,
.bezier-handle-lines,
.bezier-line {
  fill: none;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.bezier-axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.bezier-handle-lines {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.bezier-handle-line-out {
  stroke: color-mix(in srgb, var(--curve-out), transparent 18%);
}

.bezier-handle-line-in {
  stroke: color-mix(in srgb, var(--curve-in), transparent 18%);
}

.bezier-line {
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 2;
}

.bezier-keyframe {
  fill: #0d0d0e;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 1.6;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.bezier-keyframe-out {
  stroke: var(--curve-out);
}

.bezier-keyframe-in {
  stroke: var(--curve-in);
}

.bezier-handle-layer {
  position: absolute;
  inset: 10px 10px 8px;
  z-index: 3;
  pointer-events: none;
}

.bezier-handle {
  position: absolute;
  left: var(--bezier-x, 50%);
  top: var(--bezier-y, 50%);
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  border: 2px solid #f4f4f5;
  border-radius: 50%;
  background: #101011;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 4px 12px rgba(0, 0, 0, 0.55);
  cursor: grab;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.bezier-handle-out {
  border-color: var(--curve-out);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 0 0 4px color-mix(in srgb, var(--curve-out), transparent 82%),
    0 4px 12px rgba(0, 0, 0, 0.55);
}

.bezier-handle-in {
  border-color: var(--curve-in);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 0 0 4px color-mix(in srgb, var(--curve-in), transparent 82%),
    0 4px 12px rgba(0, 0, 0, 0.55);
}

.bezier-handle:hover,
.bezier-handle:focus {
  outline: none;
  background: #f4f4f5;
  border-color: #ffffff;
}

.bezier-handle.is-dragging {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.08);
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 14px;
}

.filter-check-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(116px, 150px);
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.filter-check-row > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
}

.filter-check-row input[type="color"] {
  width: 100%;
  min-width: 0;
}

.filter-check-row input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d0d0e;
  color: var(--text);
}

.filter-check-row input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.compact-button {
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  font-size: 13px;
}

.compact-button.is-selected {
  border-color: #e4e4e6;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.curve-bars {
  position: relative;
  z-index: 0;
  height: 100%;
  display: flex;
  align-items: end;
  gap: 3px;
  opacity: 0.7;
  pointer-events: none;
}

.curve-bars span {
  flex: 1 1 0;
  min-width: 3px;
  border-radius: 999px 999px 2px 2px;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--accent), transparent 48%),
    color-mix(in srgb, var(--accent), transparent 8%)
  );
}

input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #f2f2f3;
}

.menu-reset {
  width: calc(100% - 32px);
  margin-top: 8px;
  margin-left: 16px;
  margin-right: 16px;
}

.overwrite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.overwrite-actions .button {
  min-width: 0;
  padding: 0 8px;
  font-size: 13px;
}

.workspace {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 380px);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.app[data-sidebar-open="false"] .workspace {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar-panel[hidden] {
  display: none;
}

.sidebar-panel {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 380px;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid var(--line-soft);
  background: #101011;
  overflow: hidden;
}

.sidebar-panel::after {
  content: "Drop to Drawer";
  position: absolute;
  inset: 12px;
  z-index: 8;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(16, 16, 17, 0.82);
  color: var(--text);
  font-size: 14px;
  font-weight: 820;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.985);
  transition:
    opacity 130ms ease,
    transform 130ms ease,
    border-color 130ms ease,
    background-color 130ms ease;
}

.app[data-drawer-drop="active"] .sidebar-panel::after {
  border-color: #f4f4f5;
  background: rgba(16, 16, 17, 0.92);
  opacity: 1;
  transform: scale(1);
}

.sidebar-shell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(16, 16, 17, 0.98);
}

.sidebar-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}

.sidebar-shell-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.sidebar-blank[hidden],
.sidebar-standalone-page[hidden],
.color-panel[hidden],
.assets-panel[hidden],
.notepad-panel[hidden],
.pinned-panel[hidden],
.sidebar-interaction[hidden] {
  display: none;
}

.sidebar-body {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.sidebar-body > * {
  max-width: 100%;
  min-width: 0;
}

.sidebar-blank {
  min-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 12px;
  padding: 16px;
}

.sidebar-standalone-pages,
.sidebar-standalone-page {
  min-width: 0;
}

.sidebar-standalone-page {
  display: grid;
  align-content: start;
  gap: 12px;
}

.sidebar-nav-list {
  display: grid;
  gap: 9px;
}

.sidebar-nav-card {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    transform 140ms ease;
}

.sidebar-nav-card:hover,
.sidebar-nav-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
  transform: translateX(2px);
}

.sidebar-nav-card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.24);
  outline-offset: 2px;
}

.sidebar-nav-card span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sidebar-nav-card strong {
  font-size: 13px;
  font-weight: 820;
  line-height: 1.2;
}

.sidebar-nav-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.sidebar-nav-card svg,
.sidebar-back-button svg {
  width: 15px;
  height: 15px;
}

.sidebar-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.sidebar-back-button {
  min-height: 32px;
  min-width: 0;
  padding: 0 10px;
}

.sidebar-quicktip {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  background: rgba(13, 13, 14, 0.84);
  color: var(--subtle);
  opacity: 0.68;
  backdrop-filter: blur(10px);
}

.sidebar-quicktip span {
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-quicktip p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.sidebar-changelog-content {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.sidebar-markdown {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-markdown h3,
.sidebar-markdown h4,
.sidebar-markdown p,
.sidebar-markdown ul,
.sidebar-markdown pre {
  margin: 0;
}

.sidebar-markdown h3 {
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
  font-weight: 840;
}

.sidebar-markdown h4 {
  padding-top: 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.sidebar-markdown ul {
  display: grid;
  gap: 6px;
  padding-left: 17px;
}

.sidebar-markdown code,
.sidebar-markdown pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.sidebar-markdown code {
  color: color-mix(in srgb, var(--text), var(--muted) 22%);
}

.sidebar-markdown pre {
  max-height: 220px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #0b0b0c;
  color: #d9d9dc;
  overflow: auto;
  font-size: 11px;
  line-height: 1.45;
}

.sidebar-info-item {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.sidebar-info-item summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
  list-style: none;
  cursor: pointer;
}

.sidebar-info-item summary::-webkit-details-marker {
  display: none;
}

.sidebar-info-item summary:hover,
.sidebar-info-item summary:focus-visible {
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-info-item summary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.24);
  outline-offset: -2px;
}

.sidebar-info-item summary svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.sidebar-info-item[open] summary svg {
  transform: rotate(180deg);
}

.sidebar-info-content {
  display: grid;
  gap: 12px;
  padding: 0 12px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-info-content p,
.sidebar-info-list {
  margin: 0;
}

.sidebar-info-block {
  display: grid;
  gap: 7px;
}

.sidebar-info-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.sidebar-info-block strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
}

.sidebar-info-link {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 10px;
  font-weight: 760;
  text-decoration: none;
}

.sidebar-info-link:hover,
.sidebar-info-link:focus-visible {
  border-color: #6a6a70;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-info-block pre {
  max-height: 360px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #0b0b0c;
  color: #d9d9dc;
  overflow: auto;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre;
}

.sidebar-info-block code,
.sidebar-info-list code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.sidebar-info-list {
  display: grid;
  gap: 7px;
  padding-left: 17px;
}

.sidebar-interaction {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.interaction-tools-slot:empty {
  display: none;
}

.pinned-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  padding: 16px;
}

.pinned-list {
  display: grid;
  gap: 10px;
}

.pinned-item {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
  transition:
    border-color 140ms ease,
    opacity 140ms ease,
    box-shadow 140ms ease;
}

.pinned-item > summary {
  list-style: none;
  cursor: default;
}

.pinned-item > summary::-webkit-details-marker {
  display: none;
}

.pinned-item-head {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.pinned-item-head:active {
  cursor: grabbing;
}

.pinned-item:not([open]) .pinned-item-head {
  border-bottom-color: transparent;
}

.pinned-item-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinned-move-actions,
.pinned-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pinned-action-button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  color: var(--muted);
  cursor: pointer;
}

.pinned-action-button svg {
  width: 15px;
  height: 15px;
}

.pin-button svg {
  width: 13px;
  height: 13px;
}

.pinned-window-action span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 15px;
  font-weight: 860;
}

.pinned-item.is-pinned-dragging {
  opacity: 0.34;
  border-color: color-mix(in srgb, var(--text), transparent 72%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.pinned-item.is-pinned-shifting {
  pointer-events: none;
  will-change: transform;
}

.pinned-item-body {
  min-width: 0;
  padding: 10px;
}

.pinned-item-body > .control-group {
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.pinned-item-body > .pin-target-option {
  margin-bottom: 0;
}

.pinned-item-body .pin-button {
  display: none;
}

.pinned-item-body.editor .pin-target-option {
  padding-right: 0;
}

.pinned-item-body.editor > .editor-section {
  margin-bottom: 0;
  border: 0;
  background: transparent;
}

.pinned-item-body.editor > .editor-section > summary {
  padding-inline: 0;
}

.pinned-item-body.editor > .editor-section > label,
.pinned-item-body.editor > .editor-section > .range-label,
.pinned-item-body.editor > .editor-section > .color-fields,
.pinned-item-body.editor > .editor-section > .editor-content-grid,
.pinned-item-body.editor > .editor-section > .editor-image-settings,
.pinned-item-body.editor > .editor-section > .editor-subgroup-title,
.pinned-item-body.editor > .editor-section > .text-fields,
.pinned-item-body.editor > .editor-section > .editor-randomize {
  margin-left: 0;
  margin-right: 0;
}

.pinned-empty {
  display: grid;
  gap: 4px;
  min-height: 120px;
  place-items: center;
  align-content: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.pinned-empty strong {
  color: var(--text);
  font-size: 14px;
}

.color-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  padding: 16px;
}

.color-section {
  margin: 0;
  padding-bottom: 12px;
}

.color-tool-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.color-tool-row > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
}

.color-tool-row input[type="color"] {
  width: 48px;
  height: 30px;
}

.color-action-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.color-action-bar span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 760;
}

.color-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.color-action-grid .button,
.color-action-bar .button,
.color-panel .field-label + .button {
  min-height: 34px;
  font-size: 12px;
}

.color-panel .button.is-selected {
  border-color: #f2f2f3;
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
}

.color-status,
.color-empty {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.color-status[data-error="true"] {
  color: #ffb4b4;
}

.color-combo-list {
  display: grid;
  gap: 8px;
}

.color-combo-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.color-combo-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-combo-swatches {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.color-combo-swatches span {
  width: 17px;
  height: 17px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.color-combo-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.color-combo-actions .button {
  min-height: 28px;
  padding-inline: 8px;
  font-size: 11px;
}

.app[data-color-tool="brush"] .tile {
  cursor: cell;
}

.app[data-color-tool="picker"] .tile {
  cursor: crosshair;
}

.assets-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  padding: 16px;
}

.assets-section {
  margin: 0;
  padding-bottom: 12px;
}

.asset-transfer-section {
  gap: 10px;
}

.asset-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.asset-actions .button {
  min-height: 34px;
  font-size: 12px;
}

.asset-library-open {
  grid-column: 1 / -1;
}

.asset-actions .asset-danger {
  color: #ffb4b4;
}

.asset-drop-zone {
  min-height: 74px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  text-align: center;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.asset-drop-zone strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
}

.asset-drop-zone span {
  font-size: 11px;
  line-height: 1.35;
}

.assets-panel.is-drag-over .asset-drop-zone,
.asset-library-overlay.is-drag-over .asset-drop-zone {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.asset-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.asset-note {
  margin: 0;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.4;
}

.asset-status[data-error="true"] {
  color: #ffb4b4;
}

.assets-library-section,
.assets-lookup-section {
  display: grid;
  gap: 10px;
}

.assets-library-section .control-heading output,
.assets-lookup-section .control-heading output {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-transform: none;
}

.asset-search-label,
.asset-library-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.asset-search-label input,
.asset-library-controls select {
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.asset-library-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.asset-view-toggle {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.asset-view-toggle .button,
.asset-batch-actions .button {
  min-height: 30px;
  padding-inline: 8px;
  font-size: 11px;
}

.asset-view-toggle .button[aria-pressed="true"] {
  border-color: #f2f2f3;
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
}

.asset-batch-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.asset-select-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.asset-select-tools .button {
  min-height: 30px;
  padding-inline: 8px;
  font-size: 11px;
}

.asset-select-tools .button[aria-pressed="true"] {
  border-color: #f2f2f3;
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
}

.asset-select-tools span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.asset-selection-hint {
  margin: -2px 0 0;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.35;
}

.asset-export-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.asset-export-actions .button {
  min-height: 32px;
  padding-inline: 8px;
  font-size: 11px;
}

.asset-list {
  display: grid;
  gap: 8px;
}

.asset-list[data-view="grid"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.asset-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition:
    border-color 130ms ease,
    background-color 130ms ease,
    box-shadow 130ms ease,
    transform 130ms ease;
}

.asset-card:hover,
.asset-card:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.045);
}

.asset-card.is-active {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.asset-card.is-selected {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.075);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.asset-card.is-anchor::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f4f4f5;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.asset-list[data-view="grid"] .asset-card {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  overflow: hidden;
}

.asset-select {
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  gap: 7px;
}

.asset-list[data-view="grid"] .asset-select {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: start;
  justify-items: start;
  width: 100%;
  min-width: 0;
}

.asset-preview {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.05) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.05) 75%);
  background-position: 0 0, 5px 5px;
  background-size: 10px 10px;
  overflow: hidden;
}

.asset-list[data-view="grid"] .asset-preview {
  width: 100%;
  height: 76px;
}

.asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.asset-detail-preview img {
  user-select: none;
  -webkit-user-drag: none;
}

.asset-lookup-list {
  gap: 7px;
}

.asset-lookup-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
}

.asset-lookup-card .asset-token-pill {
  display: block;
}

.asset-lookup-token {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.asset-lookup-token input {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.asset-lookup-token input:focus {
  border-color: color-mix(in srgb, var(--text), transparent 44%);
  outline: none;
}

.asset-fields {
  display: grid;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

.asset-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.asset-list[data-view="grid"] .asset-fields {
  gap: 6px;
}

.asset-fields input {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.asset-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.asset-token-pill {
  min-width: 0;
  overflow: hidden;
  padding: 4px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-empty {
  display: grid;
  gap: 4px;
  min-height: 120px;
  place-items: center;
  align-content: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.asset-empty strong {
  color: var(--text);
  font-size: 14px;
}

.asset-detail-panel {
  min-width: 0;
}

.asset-detail-empty,
.asset-detail-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.asset-detail-empty {
  min-height: 86px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.asset-detail-empty strong {
  color: var(--text);
  font-size: 13px;
}

.asset-detail-preview {
  min-height: 132px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.05) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.05) 75%);
  background-position: 0 0, 6px 6px;
  background-size: 12px 12px;
  overflow: hidden;
}

.asset-detail-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.asset-detail-fields {
  display: grid;
  gap: 8px;
}

.asset-detail-fields label {
  display: grid;
  gap: 5px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.asset-detail-fields input {
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.asset-detail-meta,
.asset-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.asset-detail-meta span,
.asset-usage-summary span {
  padding: 4px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}

.asset-detail-token {
  min-width: 0;
  overflow: hidden;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-detail-actions .button {
  min-height: 30px;
  padding-inline: 9px;
  font-size: 11px;
}

.asset-usage-summary {
  display: flex;
}

.asset-usage-group {
  display: grid;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.asset-usage-group strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.asset-usage-group span,
.asset-usage-group li {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.asset-usage-group ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 16px;
}

.notepad-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  padding: 16px;
}

.notepad-add-section {
  margin: 0;
  padding-bottom: 12px;
}

.notepad-add-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.notepad-add-grid .button {
  min-width: 0;
  min-height: 34px;
  padding-inline: 8px;
  font-size: 12px;
}

.notepad-list {
  display: grid;
  gap: 10px;
}

.notepad-item {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.notepad-item::before,
.notepad-item::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 2;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  opacity: 0;
  pointer-events: none;
}

.notepad-item::before {
  top: 0;
}

.notepad-item::after {
  bottom: 0;
}

.notepad-item.is-notepad-drop-before::before,
.notepad-item.is-notepad-drop-after::after {
  opacity: 0.78;
}

.notepad-item.is-notepad-dragging {
  opacity: 0.38;
  border-color: color-mix(in srgb, var(--text), transparent 72%);
}

.notepad-item-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.notepad-item-head:active {
  cursor: grabbing;
}

.notepad-move-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.notepad-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.notepad-action-button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  color: var(--muted);
}

.notepad-action-button[aria-pressed="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: color-mix(in srgb, var(--text), transparent 72%);
}

.notepad-action-button svg {
  width: 15px;
  height: 15px;
}

.notepad-item-title {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.notepad-item-title strong,
.notepad-item-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notepad-item-title strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
}

.notepad-item-title span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.notepad-item-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
}

.notepad-settings-panel {
  display: grid;
  gap: 10px;
}

.notepad-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.notepad-textarea {
  width: 100%;
  min-height: 44px;
  max-height: 42vh;
  resize: none;
  overflow: hidden;
}

.notepad-score-block {
  display: grid;
  gap: 6px;
}

.notepad-score-compact {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.notepad-score-block > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.notepad-number-row {
  display: grid;
  grid-template-columns: auto minmax(54px, 1fr) auto;
  gap: 5px;
  align-items: center;
}

.notepad-number-row .button {
  min-width: 28px;
  min-height: 28px;
  padding-inline: 6px;
  font-size: 13px;
  font-weight: 820;
}

.notepad-number-input {
  width: 100%;
  min-width: 0;
  text-align: center;
  font-weight: 820;
}

.notepad-player-list {
  display: grid;
  gap: 7px;
}

.notepad-player-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 154px) auto;
  gap: 6px;
  align-items: center;
}

.notepad-player-name {
  min-width: 0;
}

.notepad-player-row .notepad-number-row {
  grid-template-columns: auto minmax(44px, 1fr) auto;
}

.notepad-player-row .notepad-number-row .button,
.notepad-player-row .notepad-action-button {
  min-height: 28px;
}

.notepad-player-row .notepad-number-row .button {
  min-width: 30px;
  padding-inline: 5px;
  font-size: 11px;
}

.notepad-add-player-button {
  min-height: 32px;
  justify-content: center;
  font-size: 12px;
}

.notepad-compact-label {
  margin-bottom: 0;
}

.notepad-empty {
  display: grid;
  gap: 4px;
  min-height: 130px;
  place-items: center;
  align-content: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.notepad-empty strong {
  color: var(--text);
  font-size: 14px;
}

.inline-asset {
  width: auto;
  height: 1.12em;
  max-width: 2.2em;
  margin: 0 0.08em;
  object-fit: contain;
  vertical-align: -0.2em;
}

.drawer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.drawer-panel[hidden] {
  display: none;
}

.drawer-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.drawer-panel-head div {
  display: grid;
  gap: 3px;
}

.drawer-panel-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 820;
}

.drawer-panel-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.drawer-select-tools {
  min-width: 112px;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.drawer-select-tools .button {
  min-height: 30px;
  padding-inline: 10px;
  font-size: 12px;
}

.drawer-select-tools .button.is-selected {
  border-color: #f2f2f3;
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
}

.drawer-select-tools span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 720;
}

.drawer-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.drawer-list[hidden] {
  display: none;
}

.drawer-tile {
  position: relative;
  min-height: 78px;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--tile-base), #626266 56%);
  border-radius: var(--radius);
  background: var(--tile-base);
  color: var(--tile-text);
  cursor: grab;
  font-family: var(--tile-font);
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 130ms ease,
    border-color 130ms ease,
    box-shadow 130ms ease,
    opacity 130ms ease;
}

.drawer-tile:hover,
.drawer-tile:focus-visible {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 18%);
  outline: none;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--tile-highlight), transparent 32%),
    0 10px 26px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.drawer-tile.is-dragging {
  opacity: 0.34;
}

.drawer-tile.is-copy-dragging {
  opacity: 0.58;
}

.drawer-tile.is-copy-dragging::after {
  content: "+";
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: #f4f4f5;
  color: #101012;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.drawer-tile.is-drop-target {
  border-color: var(--tile-highlight);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--tile-highlight), transparent 28%),
    0 0 22px color-mix(in srgb, var(--tile-highlight), transparent 84%);
}

.drawer-tile.is-selected {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 48%);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--tile-highlight), transparent 22%),
    0 0 22px color-mix(in srgb, var(--tile-highlight), transparent 86%);
}

.drawer-select-mark {
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 9px;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.32);
}

.drawer-tile.is-selected .drawer-select-mark {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 34%);
  background: var(--tile-highlight);
}

.drawer-tile.is-selected .drawer-select-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #0f0f11;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.drawer-tile-main {
  min-width: 0;
  display: grid;
  gap: 4px;
  justify-items: var(--tile-text-justify, start);
  text-align: var(--tile-text-align, left);
}

.drawer-tile.is-selectable .drawer-tile-main {
  padding-left: 20px;
}

.drawer-tile-title {
  min-width: 0;
  overflow: hidden;
  color: currentColor;
  font-size: 14px;
  font-weight: var(--tile-weight);
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-tile-subtitle {
  min-width: 0;
  overflow: hidden;
  color: currentColor;
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.72;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-tile-side {
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--tile-highlight), transparent 46%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  color: currentColor;
  font-size: 10px;
  font-weight: 820;
  opacity: 0.82;
}

.drawer-empty {
  display: grid;
  gap: 4px;
  min-height: 140px;
  place-items: center;
  align-content: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.drawer-empty[hidden] {
  display: none;
}

.drawer-empty strong {
  color: var(--text);
  font-size: 14px;
}

.drawer-drop-zone {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  text-align: center;
  transition:
    border-color 130ms ease,
    background-color 130ms ease,
    color 130ms ease;
}

.drawer-drop-zone[hidden] {
  display: none;
}

.drawer-drop-zone strong {
  color: var(--text);
  font-size: 14px;
}

.drawer-drop-zone span {
  font-size: 12px;
  line-height: 1.35;
}

.drawer-drop-zone[data-active="true"] {
  border-color: #f4f4f5;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.sidebar-interaction .multi-select-tools {
  margin: 0;
}

.sidebar-interaction .multi-select-tools[data-active="false"] {
  display: none;
}

.sidebar-body .options-menu {
  position: static;
  width: 100%;
  max-width: 100%;
  max-height: none;
  min-height: 0;
  overflow: hidden;
  padding: 0 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar-body .options-head {
  display: none;
}

.sidebar-body .options-tabs {
  top: 0;
}

.sidebar-body .options-menu[data-active-menu="bulk"] .options-tabs,
.sidebar-body .options-menu[data-active-menu="board"] .options-tabs {
  display: none;
}

.sidebar-body .editor {
  width: 100%;
  max-width: 100%;
  border-left: 0;
  background: transparent;
  overflow: visible;
}

.sidebar-body .editor-head {
  top: 0;
}

.sidebar-body .editor-head h2 {
  display: none;
}

.board-area {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 24px 28px;
}

.board-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 2px 16px;
  color: var(--muted);
  font-size: 13px;
}

.board-meta strong {
  color: var(--text);
}

.tile-board {
  --board-columns: 4;
  --board-rows: 3;
  --board-gap: 14px;
  --board-tile-scale: 1;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--board-columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--board-rows), minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: var(--board-gap);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.tile-board[data-layout="frame"],
.tile-board[data-layout="slots"],
.tile-board[data-layout="cases"] {
  display: block;
}

.tile-board[data-layout="slots"] {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.tile-board[data-layout="cases"] {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.tile-board.is-drawer-drop-target {
  outline: 1px dashed rgba(255, 255, 255, 0.28);
  outline-offset: -6px;
}

.reel-count-indicator {
  --indicator-transform: translate(-50%, -50%);
  position: absolute;
  z-index: 12;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  transform: var(--indicator-transform);
}

.tile-board[data-layout="cases"] .reel-count-indicator {
  --indicator-transform: translateX(-50%);
  top: calc(50% - (var(--reel-focus-height, 120px) / 2) - 12px);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 13px solid color-mix(in srgb, var(--accent), #ffffff 14%);
}

.tile-board[data-layout="slots"] .reel-count-indicator {
  --indicator-transform: translateY(-50%);
  left: calc(50% - (var(--reel-focus-width, 180px) / 2) - 12px);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid color-mix(in srgb, var(--accent), #ffffff 14%);
}

.drag-mode-hud {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(13, 13, 14, 0.82);
  color: var(--muted);
  backdrop-filter: blur(14px);
  box-shadow: none;
  opacity: 1;
  pointer-events: none;
  transition:
    opacity 150ms ease,
    border-color 150ms ease;
}

.drag-mode-hud[data-active="true"] {
  border-color: rgba(255, 255, 255, 0.22);
}

.drag-mode-current {
  display: grid;
  gap: 2px;
}

.drag-mode-current span,
.drag-mode-current small {
  font-size: 11px;
  line-height: 1.25;
}

.drag-mode-current span {
  font-weight: 760;
  color: var(--subtle);
}

.drag-mode-current strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.15;
}

.drag-mode-options {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.drag-mode-options + .drag-mode-current {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drag-mode-options span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 720;
}

.drag-mode-options span.is-active {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.drag-mode-options kbd {
  min-width: 54px;
  display: inline-grid;
  place-items: center;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 820;
}

.tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  overflow: visible;
  font-family: var(--tile-font);
  touch-action: manipulation;
  perspective: 1200px;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 130ms ease,
    left 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 220ms ease,
    border-color 130ms ease,
    background-color 130ms ease,
    box-shadow 130ms ease;
}

.tile::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 3;
  border: 2px solid transparent;
  border-radius: inherit;
  display: none;
  pointer-events: none;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: color-mix(in srgb, var(--tile-highlight), transparent 68%);
  opacity: 0;
  display: none;
  pointer-events: none;
  transform: scaleX(var(--hold-progress, 0));
  transform-origin: left center;
}

.tile.is-holding .tile-face::before {
  opacity: 1;
}

.tile.is-holding .tile-face {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 18%);
}

.tile:hover {
  transform: translateY(-1px);
}

.tile:hover .tile-face {
  border-color: #68686d;
}

.tile:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--tile-highlight), #ffffff 18%);
  outline-offset: 3px;
}

.tile-board[data-layout="auto-grid"] .tile,
.tile-board[data-layout="set-grid"] .tile {
  width: 100%;
  height: 100%;
}

.tile-board[data-layout="frame"] .tile,
.tile-board[data-layout="slots"] .tile,
.tile-board[data-layout="cases"] .tile {
  position: absolute;
  left: var(--tile-x);
  top: var(--tile-y);
  z-index: var(--tile-z, 1);
  width: var(--tile-width);
  height: var(--tile-height);
  opacity: var(--tile-opacity, 1);
  transform: translate(-50%, -50%);
  will-change: left, top, transform, opacity;
}

.tile-board[data-layout="frame"] .tile:hover,
.tile-board[data-layout="slots"] .tile:hover,
.tile-board[data-layout="cases"] .tile:hover {
  transform: translate(-50%, calc(-50% - 1px));
}

.tile-board[data-layout="slots"] .tile,
.tile-board[data-layout="cases"] .tile {
  transition-duration: 430ms, 430ms, 280ms, 280ms, 200ms, 130ms, 130ms, 130ms;
}

.tile-reel-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  border-radius: inherit;
  transform: translate(0, 0);
  will-change: transform, filter;
}

.reel-strip {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.app[data-editing="true"] .tile {
  cursor: grab;
  touch-action: none;
}

.app[data-multi-select="true"] .tile {
  cursor: pointer;
}

.app[data-count-select="true"] .tile {
  cursor: pointer;
}

.app[data-multi-select="true"] .tile.is-multi-selected {
  cursor: grab;
}

.app[data-editing="true"] .tile:active {
  cursor: grabbing;
}

.app[data-multi-select="true"] .tile:active {
  cursor: pointer;
}

.app[data-multi-select="true"] .tile.is-multi-selected:active {
  cursor: grabbing;
}

.tile.is-dragging {
  opacity: 0.28;
  transform: scale(0.985);
}

.tile.is-copy-dragging {
  opacity: 0.52;
}

.tile.is-copy-dragging .tile-reel-layer::after {
  content: "+";
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 8;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: #f4f4f5;
  color: #101012;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.tile-board[data-layout="frame"] .tile.is-dragging,
.tile-board[data-layout="slots"] .tile.is-dragging,
.tile-board[data-layout="cases"] .tile.is-dragging {
  transform: translate(-50%, -50%) scale(0.985);
}

.tile.is-layout-shifting {
  z-index: 4;
  pointer-events: none;
  will-change: transform;
}

.tile.is-swap-shifting {
  z-index: 7;
  pointer-events: none;
  will-change: transform;
}

.tile.is-drop-target {
  z-index: 3;
}

.tile.is-drop-target .tile-face {
  border-color: var(--tile-highlight);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--tile-highlight), transparent 30%),
    0 0 24px color-mix(in srgb, var(--tile-highlight), transparent 82%);
}

.tile.is-swap-preview-source,
.tile.is-swap-preview-target {
  z-index: 6;
}

.tile.is-swap-preview-source::after,
.tile.is-swap-preview-target::after {
  display: block;
  inset: -4px;
  border-width: 2px;
}

.tile.is-swap-preview-source::after {
  border-color: #ff5c66;
  box-shadow:
    0 0 0 2px rgba(255, 92, 102, 0.22),
    0 0 28px rgba(255, 92, 102, 0.24);
}

.tile.is-swap-preview-target::after {
  border-color: #60a5fa;
  box-shadow:
    0 0 0 2px rgba(96, 165, 250, 0.24),
    0 0 28px rgba(96, 165, 250, 0.28);
}

.tile.is-swap-preview-source .tile-face {
  border-color: #ff5c66;
}

.tile.is-swap-preview-target .tile-face {
  border-color: #60a5fa;
}

.tile.is-swap-preview-target .tile-face::after {
  border-color: rgba(96, 165, 250, 0.88);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(96, 165, 250, 0.14) 0,
      rgba(96, 165, 250, 0.14) 7px,
      transparent 7px,
      transparent 14px
    );
}

.tile.is-multi-selected {
  z-index: 2;
}

.tile.is-multi-selected .tile-face {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 62%);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--tile-highlight), transparent 16%),
    0 0 0 5px rgba(255, 255, 255, 0.08),
    0 0 24px color-mix(in srgb, var(--tile-highlight), transparent 82%);
}

.tile.is-count-selected .tile-face {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 30%);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--tile-highlight), transparent 38%),
    0 0 20px color-mix(in srgb, var(--tile-highlight), transparent 86%);
}

.multi-select-mark {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.tile.is-multi-selected .multi-select-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #0f0f11;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.tile.is-multi-selected .multi-select-mark {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 34%);
  background: var(--tile-highlight);
}

.count-selection-mark {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  width: 20px;
  height: 20px;
  border: 1px solid color-mix(in srgb, var(--tile-highlight), #ffffff 24%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
}

.tile.is-count-selected .count-selection-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: var(--tile-highlight);
}

.tile-hidden-icon {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: color-mix(in srgb, var(--tile-highlight), #ffffff 16%);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.tile-hidden-icon svg {
  width: 26px;
  height: 26px;
}

.tile-card-flipper {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  border-radius: inherit;
  transform-style: preserve-3d;
  transition: transform 560ms cubic-bezier(0.2, 0.78, 0.16, 1);
}

.tile.is-flip-cascade {
  z-index: 2;
}

.tile.is-flip-cascade .tile-card-flipper {
  transition-delay: var(--tile-flip-delay, 0ms);
}

.tile.is-flipped .tile-card-flipper {
  transform: rotateY(180deg);
}

.tile-face {
  --tile-face-base: var(--tile-base);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    clamp(10px, calc(30px * var(--board-tile-scale)), 32px)
    clamp(12px, calc(38px * var(--board-tile-scale)), 42px)
    clamp(14px, calc(38px * var(--board-tile-scale)), 42px);
  border: 1px solid color-mix(in srgb, var(--tile-face-base), #4a4a4d 54%);
  border-radius: inherit;
  background: var(--tile-face-base);
  color: var(--tile-text);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tile-face::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 3;
  border: 2px solid transparent;
  border-radius: inherit;
  pointer-events: none;
}

.tile-face::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--tile-highlight), transparent 68%);
  opacity: 0;
  pointer-events: none;
  transform: scaleX(var(--hold-progress, 0));
  transform-origin: left center;
}

.tile-face-back {
  --tile-face-base: var(--tile-back-base);
  border-color: color-mix(in srgb, var(--tile-face-base), #4a4a4d 54%);
  transform: rotateY(180deg);
  background: var(--tile-face-base);
  color: var(--tile-back-text);
}

.tile-pretitle {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: currentColor;
  opacity: 0.74;
  font-size: max(7px, calc(11px * var(--board-tile-scale)));
  font-weight: 820;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tile-extra {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: currentColor;
  opacity: 0.68;
  font-size: max(7px, calc(12px * var(--tile-subtitle-scale) * var(--board-tile-scale)));
  font-weight: 520;
  line-height: 1.35;
}

.tile-flip-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--muted);
  cursor: pointer;
  opacity: 0.72;
  transition:
    color 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.tile-flip-button:hover,
.tile-flip-button:focus-visible,
.tile.is-flipped .tile-flip-button {
  color: var(--text);
  border-color: color-mix(in srgb, var(--tile-highlight), transparent 24%);
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.tile-flip-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--tile-highlight), #ffffff 18%);
  outline-offset: 2px;
}

.tile-flip-button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.tile-flip-button svg {
  width: 16px;
  height: 16px;
  transition: transform 180ms ease;
}

.tile.is-flip-cascade .tile-flip-button svg {
  transition-delay: var(--tile-flip-delay, 0ms);
}

.tile.is-flipped .tile-flip-button svg {
  transform: rotate(-180deg);
}

.app[data-photosensitive="true"] .tile-card-flipper,
.app[data-photosensitive="true"] .tile.is-flip-cascade .tile-card-flipper,
.app[data-photosensitive="true"] .tile.is-flip-cascade .tile-flip-button svg {
  transition: none;
}

.app[data-photosensitive="true"] .tile.is-flip-cascade {
  z-index: auto;
}

@media (prefers-reduced-motion: reduce) {
  .tile-card-flipper,
  .tile-flip-button,
  .tile-flip-button svg {
    transition: none;
  }

  .tile.is-flip-cascade .tile-card-flipper,
  .tile.is-flip-cascade .tile-flip-button svg {
    transition-delay: 0ms;
  }
}

.tile-drag-ghost {
  --drag-tilt: 0deg;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid var(--tile-highlight);
  border-radius: var(--radius);
  background: var(--tile-base);
  color: var(--text);
  font-family: var(--tile-font);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0.94;
  transform-origin: center center;
  will-change: transform;
  animation: drag-ghost-pickup 160ms ease-out both;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    opacity 120ms ease;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--tile-highlight), transparent 24%),
    0 20px 48px rgba(0, 0, 0, 0.42);
}

.tile-drag-ghost.is-copy-dragging {
  border-color: #f4f4f5;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 24px 58px rgba(0, 0, 0, 0.48);
}

.tile-drag-ghost.is-copy-dragging::after {
  content: "+";
  position: absolute;
  top: -10px;
  right: -10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: #f4f4f5;
  color: #101012;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.36);
}

.tile-drag-ghost .tile-title {
  font-size: calc(18px * var(--tile-title-scale));
}

.tile-drag-ghost .tile-subtitle {
  font-size: calc(12px * var(--tile-subtitle-scale));
}

.tile-drag-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--tile-highlight), transparent 24%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  color: var(--text);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0;
}

.pinned-drag-ghost {
  --drag-tilt: 0deg;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 72;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--text), transparent 76%);
  border-radius: var(--radius);
  background: #181819;
  color: var(--text);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0.96;
  transform-origin: center center;
  will-change: transform;
  animation: drag-ghost-pickup 160ms ease-out both;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.045),
    0 18px 42px rgba(0, 0, 0, 0.38);
}

.pinned-drag-ghost span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 840;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinned-drag-ghost small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0;
  text-transform: uppercase;
}

.context-menu {
  position: fixed;
  z-index: 90;
  min-width: 178px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151516;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.context-menu[hidden] {
  display: none;
}

.context-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.context-menu button span[aria-hidden="true"] {
  margin-left: 18px;
  color: var(--muted);
}

.context-menu button:hover,
.context-menu button:focus-visible {
  background: #242426;
  outline: none;
}

.context-menu button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.46;
}

.context-menu button:disabled:hover,
.context-menu button:disabled:focus-visible {
  background: transparent;
}

.context-menu [data-context-action="delete"] {
  color: #ff8a8a;
}

.context-menu [data-context-action="delete"]:hover,
.context-menu [data-context-action="delete"]:focus-visible {
  background: rgba(255, 85, 85, 0.12);
}

.context-menu [data-context-action="delete"]:disabled {
  color: var(--muted);
}

.context-menu [data-context-action="delete"]:disabled:hover,
.context-menu [data-context-action="delete"]:disabled:focus-visible {
  background: transparent;
}

.context-menu [data-context-action="discard"] {
  color: #d8d8db;
}

.context-menu [data-context-action="discard"]:hover,
.context-menu [data-context-action="discard"]:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.context-copy-panel,
.context-status-panel {
  position: absolute;
  top: 6px;
  left: calc(100% + 8px);
  width: 242px;
  max-height: min(520px, calc(100vh - 32px));
  overflow: auto;
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151516;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.context-menu[data-copy-panel-side="left"] .context-copy-panel {
  right: calc(100% + 8px);
  left: auto;
}

.context-menu[data-status-panel-side="left"] .context-status-panel {
  right: calc(100% + 8px);
  left: auto;
}

.context-copy-panel[hidden],
.context-status-panel[hidden] {
  display: none;
}

.context-menu [data-context-action="copy"]:hover + .context-copy-panel,
.context-menu [data-context-action="copy"]:focus-visible + .context-copy-panel,
.context-copy-panel:hover,
.context-copy-panel:focus-within,
.context-menu[data-copy-panel-open="true"] .context-copy-panel {
  display: block;
}

.context-menu [data-context-action="status"]:hover + .context-status-panel,
.context-menu [data-context-action="status"]:focus-visible + .context-status-panel,
.context-status-panel:hover,
.context-status-panel:focus-within,
.context-menu[data-status-panel-open="true"] .context-status-panel {
  display: block;
}

.context-panel-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: none;
}

.context-panel-subtitle {
  margin-top: 12px;
  margin-bottom: 7px;
}

.copy-field-groups {
  display: grid;
  gap: 9px;
}

.copy-field-group {
  display: grid;
  gap: 5px;
}

.copy-group-title {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 820;
  text-transform: none;
}

.copy-field-list,
.status-choice-list,
.status-side-list {
  display: grid;
  gap: 5px;
}

.copy-field-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.copy-field-list label,
.status-choice-list label,
.status-side-list label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.copy-field-list input,
.status-choice-list input,
.status-side-list input {
  width: 14px;
  height: 14px;
  accent-color: #f4f4f4;
}

.copy-field-list span,
.status-choice-list span,
.status-side-list span {
  overflow-wrap: anywhere;
}

.copy-panel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.context-copy-panel .copy-panel-actions button,
.context-copy-panel .context-panel-primary,
.context-status-panel .context-panel-primary {
  min-height: 30px;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #101011;
  font-size: 12px;
}

.context-panel-primary {
  margin-top: 8px;
  color: #101011;
  border-color: #e8e8ea;
  background: #f1f1f2;
  font-weight: 760;
}

.context-panel-primary:hover:not(:disabled),
.context-panel-primary:focus-visible:not(:disabled) {
  color: #0d0d0e;
  background: #ffffff;
}

.context-panel-primary:disabled {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

@keyframes drag-ghost-pickup {
  from {
    opacity: 0;
    filter: brightness(0.85);
  }

  to {
    opacity: 0.94;
    filter: brightness(1);
  }
}

.tile.is-active {
  z-index: 2;
}

.tile.is-active .tile-face {
  border-color: var(--tile-highlight);
  background: var(--tile-face-base);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--tile-highlight), transparent 18%),
    0 0 26px color-mix(in srgb, var(--tile-highlight), transparent 78%);
}

.tile.is-active .tile-face::after {
  border-color: color-mix(in srgb, var(--tile-highlight), transparent 22%);
}

.tile.is-color-brush-highlight {
  z-index: 3;
}

.tile.is-color-brush-highlight .tile-face {
  border-color: var(--tile-highlight);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--tile-highlight), transparent 12%),
    0 0 30px color-mix(in srgb, var(--tile-highlight), transparent 74%);
}

.tile.is-color-brush-highlight .tile-face::after {
  border-color: color-mix(in srgb, var(--tile-highlight), transparent 14%);
}

.tile-board[data-layout="slots"] .tile.is-active .tile-face,
.tile-board[data-layout="cases"] .tile.is-active .tile-face,
.tile-board[data-layout="slots"] .tile.is-pulse .tile-face,
.tile-board[data-layout="cases"] .tile.is-pulse .tile-face {
  border-color: color-mix(in srgb, var(--tile-face-base), #4a4a4d 54%) !important;
  animation: none !important;
  box-shadow: none !important;
}

.tile-board[data-layout="slots"] .tile.is-active .tile-face::after,
.tile-board[data-layout="cases"] .tile.is-active .tile-face::after,
.tile-board[data-layout="slots"] .tile.is-pulse .tile-face::after,
.tile-board[data-layout="cases"] .tile.is-pulse .tile-face::after {
  border-color: transparent !important;
  animation: none !important;
  box-shadow: none !important;
}

.tile-board[data-layout="slots"] .tile.is-pulse,
.tile-board[data-layout="cases"] .tile.is-pulse,
.tile-board[data-layout="slots"] .tile.is-dramatic-pending,
.tile-board[data-layout="cases"] .tile.is-dramatic-pending {
  animation: none !important;
  filter: none !important;
}

.app[data-multi-select="true"] .tile.is-active:not(.is-multi-selected) {
  z-index: 1;
}

.app[data-multi-select="true"] .tile.is-active:not(.is-multi-selected) .tile-face {
  border-color: color-mix(in srgb, var(--tile-face-base), #6b6b70 48%);
  box-shadow: none;
}

.app[data-multi-select="true"] .tile.is-active:not(.is-multi-selected) .tile-face::after {
  border-color: transparent;
}

.app[data-multi-select="true"] .tile.is-multi-selected .tile-face {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 66%);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--tile-highlight), transparent 14%),
    0 0 0 5px rgba(255, 255, 255, 0.09),
    0 0 26px color-mix(in srgb, var(--tile-highlight), transparent 80%);
}

.tile.is-swap-preview-source .tile-face {
  border-color: #ff5c66;
}

.tile.is-swap-preview-target .tile-face {
  border-color: #60a5fa;
}

.tile.is-dramatic-pending {
  animation: dramatic-end-hold 760ms ease-in-out infinite alternate;
}

.tile.is-dramatic-pending .tile-face {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 22%);
}

.tile.is-dramatic-pending .tile-face::after {
  opacity: 1;
  border-color: color-mix(in srgb, var(--tile-highlight), transparent 8%);
  animation: dramatic-end-contour 760ms ease-in-out infinite alternate;
}

.app[data-animation="blink"] .tile.is-pulse {
  animation: tile-count-blink 230ms ease-out both;
}

.app[data-animation="blink"] .tile.is-pulse .tile-face::after {
  animation: contour-count-blink 230ms ease-out both;
  border-color: var(--tile-highlight);
}

.app[data-animation="late-blink"] .tile.is-pulse.is-readable-pulse {
  animation: tile-count-blink 240ms ease-out both;
}

.app[data-animation="late-blink"] .tile.is-pulse.is-readable-pulse .tile-face::after {
  animation: contour-count-blink 260ms ease-out both;
  border-color: var(--tile-highlight);
}

.app[data-animation="outline"] .tile.is-pulse .tile-face::after {
  animation: contour-count-blink 280ms ease-out both;
  border-color: var(--tile-highlight);
}

.app[data-animation="soft"] .tile.is-pulse .tile-face {
  animation: tile-soft-fill 300ms ease-out both;
}

.app[data-animation="soft"] .tile.is-pulse .tile-face::after {
  animation: soft-contour 300ms ease-out both;
  border-color: color-mix(in srgb, var(--tile-highlight), transparent 32%);
}

.app[data-animation="none"] .tile.is-pulse,
.app[data-animation="none"] .tile.is-pulse .tile-face::after {
  animation: none;
}

.app[data-photosensitive="true"] .tile.is-pulse {
  animation: none !important;
  filter: none !important;
}

.app[data-photosensitive="true"] .tile.is-pulse .tile-face::after {
  animation: photosensitive-contour 360ms ease-out both !important;
  border-color: color-mix(in srgb, var(--tile-highlight), transparent 46%);
  box-shadow: none !important;
}

.app[data-animation="none"] .tile.is-dramatic-pending,
.app[data-photosensitive="true"] .tile.is-dramatic-pending {
  animation: none !important;
  filter: none !important;
}

.app[data-animation="none"] .tile.is-dramatic-pending .tile-face::after,
.app[data-photosensitive="true"] .tile.is-dramatic-pending .tile-face::after {
  animation: none !important;
  opacity: 0.58;
  box-shadow: none !important;
}

.app[data-gradual="true"][data-animation="blink"] .tile.is-pulse,
.app[data-gradual="true"][data-animation="late-blink"] .tile.is-pulse.is-readable-pulse {
  animation: gradual-tile-brightness var(--pulse-fade-duration, 0.9s) ease-out both;
}

.app[data-gradual="true"][data-animation="blink"] .tile.is-pulse .tile-face::after,
.app[data-gradual="true"][data-animation="late-blink"] .tile.is-pulse.is-readable-pulse .tile-face::after,
.app[data-gradual="true"][data-animation="outline"] .tile.is-pulse .tile-face::after {
  animation: gradual-contour-fade var(--pulse-fade-duration, 0.9s) ease-out both;
  border-color: var(--tile-highlight);
}

.app[data-gradual="true"][data-animation="soft"] .tile.is-pulse .tile-face {
  animation: gradual-soft-fill var(--pulse-fade-duration, 0.9s) ease-out both;
}

.app[data-gradual="true"][data-animation="soft"] .tile.is-pulse .tile-face::after {
  animation: gradual-soft-contour var(--pulse-fade-duration, 0.9s) ease-out both;
  border-color: color-mix(in srgb, var(--tile-highlight), transparent 24%);
}

.app[data-photosensitive="true"][data-gradual="true"] .tile.is-pulse .tile-face::after {
  animation: gradual-photosensitive-contour var(--pulse-fade-duration, 0.9s) ease-out both !important;
}

.app[data-gradual="true"] .tile.is-pulse,
.app[data-gradual="true"] .tile.is-pulse .tile-face::after {
  animation-delay: var(--pulse-age, 0ms) !important;
}

.tile.is-winner:not(.is-active) .tile-face {
  border-color: color-mix(in srgb, var(--tile-highlight), #ffffff 42%);
}

.tile-main {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: grid;
  gap: 10px;
  justify-items: var(--tile-text-justify, center);
  text-align: var(--tile-text-align, center);
}

.tile-drag-ghost .tile-main {
  width: 100%;
}

.tile-image {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.tile-image-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.tile-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: var(--image-position-x, 50%) var(--image-position-y, 50%);
  transform: translate3d(var(--image-pan-x, 0%), var(--image-pan-y, 0%), 0) scale(var(--image-pan-scale, 1));
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
}

.tile-image-layer img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: var(--image-position-x, 50%) var(--image-position-y, 50%);
  transform: translate3d(var(--image-pan-x, 0%), var(--image-pan-y, 0%), 0) scale(var(--image-pan-scale, 1));
  transform-origin: center;
}

.tile-image-layer.is-missing {
  inset: 50% auto auto 50%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
}

.tile-drag-ghost .tile-image {
  height: 86px;
}

.tile-image.is-missing {
  width: auto;
  height: auto;
  justify-self: var(--tile-text-justify, center);
  padding: 6px 8px;
  border: 1px dashed color-mix(in srgb, currentColor, transparent 56%);
  border-radius: 6px;
  color: currentColor;
  opacity: 0.72;
  font-size: max(8px, calc(12px * var(--board-tile-scale)));
  font-weight: 760;
}

.tile-title {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: max(8px, calc(clamp(22px, 2.15vw, 31px) * var(--tile-title-scale) * var(--board-tile-scale)));
  line-height: 1.05;
  font-weight: var(--tile-weight);
  letter-spacing: 0;
  color: currentColor;
}

.tile-subtitle {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: currentColor;
  opacity: 0.62;
  font-size: max(7px, calc(15px * var(--tile-subtitle-scale) * var(--board-tile-scale)));
  font-weight: 570;
}

.tile-face.is-status-faded {
  opacity: 0.58;
  filter: grayscale(1);
}

.tile-face.is-status-faded {
  border-color: color-mix(in srgb, var(--tile-face-base), #77777c 42%);
}

.tile-face.is-status-hidden {
  background: color-mix(in srgb, var(--tile-face-base), #000000 56%);
  border-color: color-mix(in srgb, var(--tile-face-base), #000000 30%);
}

.tile-face.is-status-hidden .tile-main {
  visibility: hidden;
}

.stagger-number {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-grid;
  place-items: center;
  min-width: max(20px, calc(30px * var(--board-tile-scale)));
  height: max(20px, calc(28px * var(--board-tile-scale)));
  padding: 0 max(5px, calc(8px * var(--board-tile-scale)));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-size: max(9px, calc(13px * var(--board-tile-scale)));
  font-weight: 760;
}

.editor[hidden] {
  display: none;
}

.editor {
  min-height: 0;
  padding: 18px;
  border-left: 1px solid var(--line-soft);
  background: #101011;
  overflow: auto;
}

.editor-head {
  position: sticky;
  top: -18px;
  z-index: 3;
  display: grid;
  gap: 12px;
  margin: -18px -18px 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(16, 16, 17, 0.96);
  backdrop-filter: blur(16px);
}

.editor h2 {
  margin: 0;
  font-size: 18px;
}

.editor-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 40px;
  gap: 8px;
}

.editor-add,
.editor-preview {
  min-width: 0;
  min-height: 40px;
  padding: 0 11px;
  font-size: 13px;
}

.editor-flip {
  min-width: 0;
  min-height: 40px;
  padding: 0 11px;
  font-size: 13px;
}

.editor-preview {
  grid-column: span 1;
}

.multi-select-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: -4px 0 18px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.multi-select-tools span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.multi-select-tools .button {
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.multi-select-tools .multi-select-action,
.multi-select-tools .button-danger {
  grid-column: 1 / -1;
}

.multi-select-tools[data-active="false"] .button-danger,
.multi-select-tools[data-active="false"] .multi-select-action,
.multi-select-tools[data-active="false"] span {
  display: none;
}

.multi-select-tools[data-active="false"] {
  grid-template-columns: 1fr;
}

.icon-button {
  width: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
}

.editor label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: none;
}

.editor-section {
  position: relative;
  margin-bottom: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.editor-section::before,
.editor-section::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 4;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  opacity: 0;
  pointer-events: none;
}

.editor-section::before {
  top: 0;
}

.editor-section::after {
  bottom: 0;
}

.editor-section.is-edit-group-drop-before::before,
.editor-section.is-edit-group-drop-after::after {
  opacity: 0.74;
}

.editor-section.is-edit-group-dragging {
  opacity: 0.42;
  border-color: color-mix(in srgb, var(--text), transparent 72%);
}

.editor-section summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text);
  cursor: grab;
  font-size: 12px;
  font-weight: 820;
  text-transform: none;
  user-select: none;
  -webkit-user-select: none;
}

.editor-section summary:active {
  cursor: grabbing;
}

.editor-section summary .pin-button {
  cursor: pointer;
}

.editor-section[open] {
  padding-bottom: 2px;
}

.editor-section > label:first-of-type,
.editor-section > .color-fields:first-of-type,
.editor-section > .editor-subgroup-title:first-of-type {
  margin-top: 12px;
}

.editor-section > label,
.editor-section > .range-label,
.editor-section > .color-fields,
.editor-section > .text-fields,
.editor-section > .editor-randomize,
.editor-section > .editor-subgroup-title {
  margin-left: 12px;
  margin-right: 12px;
}

.editor-content-section[open] {
  padding-bottom: 10px;
}

.editor-content-section:not(.is-image-tile) .editor-image-option {
  display: none;
}

.editor-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 12px 12px 8px;
}

.editor-content-field {
  min-width: 0;
  margin: 0;
}

.editor-image-settings {
  display: grid;
  gap: 8px;
  margin: 0 12px 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.editor-image-offsets {
  display: grid;
  gap: 8px;
  margin: 0;
}

.editor-image-offsets .range-label {
  margin: 0;
  padding: 8px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.editor-content-toggles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 0;
}

.editor-subgroup-title {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
  text-transform: uppercase;
}

.editor-section > .editor-subgroup-title {
  margin-top: 14px;
  margin-bottom: 8px;
}

.editor-image-settings .editor-subgroup-title {
  margin: 0;
}

.editor .editor-toggle-line {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
}

.editor .editor-toggle-line input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.editor-toggle-line span {
  min-width: 0;
  line-height: 1.25;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.editor input,
.editor textarea {
  min-height: 40px;
  padding: 10px 11px;
  color: var(--text);
  font-size: 14px;
  font-weight: 520;
  text-transform: none;
}

.editor textarea {
  resize: vertical;
  line-height: 1.45;
}

.color-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.two-color-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-color-fields {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.color-fields label {
  min-width: 0;
}

.color-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.color-input-row input[type="color"] {
  width: 100%;
  min-width: 0;
}

.random-color-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d0d0e;
  color: var(--muted);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease,
    color 150ms ease;
}

.random-color-button:hover {
  border-color: #5e5e63;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.random-color-button:active {
  transform: translateY(1px);
}

.editor-randomize {
  width: 100%;
  margin: -2px 0 14px;
}

.text-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

input[type="color"] {
  padding: 5px;
  height: 42px;
}

.result-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 68px;
  padding: 10px 28px;
  background: #0b0b0c;
}

.winner-label {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.winner-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  color: var(--muted);
}

.winner-summary {
  min-width: 0;
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: baseline;
  gap: 12px;
  flex: 0 0 auto;
  max-width: 300px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--winner-highlight), #4a4a4f 54%);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--winner-text, var(--text));
  font-family: var(--winner-font);
  text-align: left;
}

.winner-name {
  min-width: 0;
  overflow: hidden;
  color: var(--winner-name-text, currentColor);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: var(--winner-weight);
}

.winner-subtitle {
  color: var(--winner-subtitle-text, currentColor);
  opacity: 0.62;
  font-size: 14px;
}

.empty-state {
  color: var(--subtle);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 25px;
  margin-right: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.winner-overlay,
.confirm-overlay,
.selective-import-overlay,
.asset-library-overlay {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.winner-overlay[hidden],
.confirm-overlay[hidden],
.selective-import-overlay[hidden],
.asset-library-overlay[hidden] {
  display: none;
}

.winner-overlay {
  place-items: center;
  padding: 24px clamp(98px, 15vw, 210px);
}

.asset-library-overlay {
  z-index: 7000;
}

.selective-import-overlay {
  z-index: 9000;
}

.confirm-overlay {
  z-index: 10000;
  pointer-events: auto;
  isolation: isolate;
}

.winner-detail,
.confirm-card,
.selective-import-card,
.asset-library-card {
  position: relative;
  width: min(620px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111112;
  box-shadow: var(--shadow);
}

.winner-detail {
  z-index: 8;
  display: grid;
  justify-items: center;
  width: 100%;
  min-height: 360px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--detail-font);
  perspective: 1200px;
  transform-origin: center 80%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.winner-card-shell {
  position: relative;
  z-index: 12;
  width: min(620px, 100%);
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.winner-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.winner-text-toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(17, 17, 18, 0.92);
  color: var(--muted);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.winner-text-toolbar[hidden] {
  display: none;
}

.winner-text-toolbar-field {
  min-width: 98px;
  max-width: 148px;
  padding: 0 8px;
  color: var(--text);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.1;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-text-toolbar select,
.winner-text-toolbar input[type="number"] {
  min-width: 0;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #151516;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.winner-text-toolbar select {
  width: 92px;
  padding: 0 7px;
}

.winner-text-toolbar input[type="color"] {
  width: 30px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #151516;
  cursor: pointer;
}

.winner-text-style-button,
.winner-text-align-button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 860;
}

.winner-text-style-button[aria-pressed="true"],
.winner-text-align-button[aria-pressed="true"] {
  color: var(--text);
  border-color: color-mix(in srgb, var(--detail-highlight), #ffffff 28%);
  background: rgba(255, 255, 255, 0.1);
}

.winner-text-align-group {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}

.winner-text-size-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 760;
}

.winner-text-size-control input {
  width: 58px;
  padding: 0 6px;
}

.winner-text-reset {
  min-width: 58px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11px;
}

.winner-card-actions {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
}

.winner-status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.winner-overlay:not([hidden]) .winner-detail {
  animation: winner-detail-enter 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: opacity, transform;
}

@keyframes winner-detail-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 64px, 0) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.app[data-photosensitive="true"] .winner-overlay:not([hidden]) .winner-detail {
  animation: none;
}

.winner-card-stage {
  position: relative;
  width: 100%;
  min-height: 360px;
}

.winner-card-flipper {
  position: relative;
  width: 100%;
  min-height: 360px;
  transform-style: preserve-3d;
  transition: transform 560ms cubic-bezier(0.2, 0.78, 0.16, 1);
}

.winner-detail[data-suppress-flip-motion="true"] .winner-card-flipper,
.winner-detail[data-suppress-flip-motion="true"] .winner-face {
  transition: none;
}

.winner-detail[data-flipped="true"] .winner-card-flipper {
  transform: rotateY(180deg);
}

.winner-face {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: var(--detail-text-justify, center);
  gap: 14px;
  padding: 42px;
  border: 1px solid color-mix(in srgb, var(--detail-highlight), #4a4a4f 42%);
  border-radius: var(--radius);
  background: var(--detail-base);
  color: var(--detail-text);
  text-align: var(--detail-text-align, center);
  box-shadow: var(--shadow);
  overflow: hidden;
  backface-visibility: hidden;
  pointer-events: auto;
}

.winner-face > :not(.winner-image-slot) {
  position: relative;
  z-index: 1;
}

.winner-image-slot {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: stretch;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.winner-image-slot[hidden] {
  display: none;
}

.winner-image {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.winner-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: var(--image-position-x, 50%) var(--image-position-y, 50%);
  transform: translate3d(var(--image-pan-x, 0%), var(--image-pan-y, 0%), 0) scale(var(--image-pan-scale, 1));
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
}

.winner-image.is-missing {
  align-self: center;
  justify-self: center;
  width: auto;
  height: auto;
  padding: 10px 12px;
  border: 1px dashed color-mix(in srgb, currentColor, transparent 52%);
  border-radius: 8px;
  color: currentColor;
  opacity: 0.74;
  font-size: 14px;
  font-weight: 780;
}

.winner-face::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 2;
  border: 1px solid color-mix(in srgb, var(--detail-highlight), transparent 22%);
  border-radius: 6px;
  pointer-events: none;
}

.winner-face-back {
  transform: rotateY(180deg);
  background: var(--detail-back-base);
  color: var(--detail-back-text);
  pointer-events: none;
}

.winner-detail[data-flipped="true"] .winner-face-front {
  pointer-events: none;
}

.winner-detail[data-flipped="true"] .winner-face-back {
  pointer-events: auto;
}

.winner-detail[data-editing="true"] .winner-card-flipper {
  transform: none;
}

.winner-detail[data-editing="true"] .winner-face {
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.winner-detail[data-editing="true"] .winner-face-back {
  transform: none;
}

.winner-detail[data-editing="true"][data-flipped="false"] .winner-face-back,
.winner-detail[data-editing="true"][data-flipped="true"] .winner-face-front {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.winner-detail[data-editing="true"][data-flipped="false"] .winner-face-front,
.winner-detail[data-editing="true"][data-flipped="true"] .winner-face-back {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.overlay-close {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.16);
}

.overlay-edit {
  background: rgba(0, 0, 0, 0.16);
}

.winner-overlay-actions {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  gap: 8px;
  width: 100%;
}

.overlay-action {
  min-height: 34px;
  min-width: 78px;
  justify-content: center;
  padding: 0 11px;
  border-color: color-mix(in srgb, var(--detail-highlight), #ffffff 18%);
  background: #181819;
  font-size: 12px;
  font-weight: 780;
}

.winner-card-topbar .overlay-action {
  min-width: 116px;
}

.overlay-action svg {
  width: 14px;
  height: 14px;
}

.overlay-flip {
  width: 66px;
  min-width: 66px;
  min-height: 54px;
  padding: 0;
  border-radius: 10px;
}

.overlay-flip svg {
  width: 24px;
  height: 24px;
}

.winner-detail[data-flipped="true"] .overlay-flip,
.overlay-action[aria-pressed="true"] {
  color: var(--text);
  border-color: color-mix(in srgb, var(--detail-highlight), #ffffff 30%);
  background: rgba(255, 255, 255, 0.1);
}

.overlay-discard {
  color: #ffb4b4;
}

.overlay-discard:hover,
.overlay-discard:focus-visible {
  border-color: rgba(255, 180, 180, 0.46);
  background: rgba(255, 85, 85, 0.1);
}

.winner-nav-zone {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--detail-highlight), #ffffff 28%);
  cursor: pointer;
  opacity: 0.74;
  pointer-events: auto;
  transition:
    color 150ms ease,
    opacity 150ms ease,
    background-color 150ms ease;
}

.winner-nav-zone[hidden] {
  display: none;
}

.winner-nav-zone svg {
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--detail-highlight), transparent 38%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
}

.winner-nav-zone:hover,
.winner-nav-zone:focus-visible {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  opacity: 1;
}

.winner-nav-zone:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--detail-highlight), #ffffff 18%);
  outline-offset: 2px;
}

.winner-nav-up,
.winner-nav-down {
  left: clamp(128px, 24vw, 320px);
  right: clamp(128px, 24vw, 320px);
  height: clamp(70px, 11vh, 110px);
}

.winner-nav-up {
  top: 0;
  align-items: start;
  padding-top: 16px;
}

.winner-nav-down {
  bottom: 0;
  align-items: end;
  padding-bottom: 18px;
}

.winner-nav-left,
.winner-nav-right {
  top: 25%;
  bottom: 25%;
  width: clamp(122px, 18vw, 230px);
}

.winner-nav-left {
  left: 0;
  justify-items: start;
  padding-left: 20px;
}

.winner-nav-right {
  right: 0;
  justify-items: end;
  padding-right: 20px;
}

.winner-detail-label {
  color: currentColor;
  opacity: 0.72;
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.winner-detail h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.96;
  font-weight: var(--detail-weight);
  letter-spacing: 0;
}

.winner-detail p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 56ch;
  color: currentColor;
  opacity: 0.72;
  font-size: 16px;
}

#winnerOverlaySubtitle,
#winnerOverlayBacksideSubtitle {
  color: currentColor;
  opacity: 0.9;
  font-size: 20px;
  font-weight: 640;
}

#winnerOverlayDetail,
#winnerOverlayBackside {
  white-space: pre-wrap;
}

#winnerOverlayBackside {
  max-height: 220px;
  overflow: auto;
  color: currentColor;
  font-size: 19px;
  line-height: 1.55;
}

.winner-detail [data-editable] {
  min-width: min(100%, 160px);
  border-radius: 6px;
  outline: 1px dashed color-mix(in srgb, var(--detail-highlight), #ffffff 18%);
  outline-offset: 5px;
  cursor: text;
}

.winner-detail [data-editable]:focus {
  background: rgba(255, 255, 255, 0.06);
  outline: 2px solid color-mix(in srgb, var(--detail-highlight), #ffffff 12%);
}

.winner-detail [data-editable].is-winner-style-active {
  outline: 2px solid color-mix(in srgb, var(--detail-highlight), #ffffff 18%);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--detail-highlight), transparent 86%);
}

.winner-detail [data-editable][data-empty="true"]::before {
  content: attr(data-placeholder);
  color: color-mix(in srgb, var(--muted), transparent 22%);
}

.confirm-card {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.confirm-card h2 {
  margin: 0;
  font-size: 22px;
}

.confirm-card p {
  margin: 0;
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.selective-import-card {
  display: grid;
  gap: 16px;
  max-height: min(760px, calc(100vh - 48px));
  padding: 22px;
  overflow: hidden;
}

.selective-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.selective-import-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.selective-import-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.selective-import-close {
  flex: 0 0 auto;
}

.selective-import-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.selective-import-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel), #ffffff 3%);
}

.selective-import-option input {
  margin-top: 3px;
}

.selective-import-option strong {
  display: block;
  font-size: 13px;
}

.selective-import-option span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.selective-import-status {
  min-height: 18px;
}

.selective-import-actions {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.asset-library-card {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(840px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  overflow: hidden;
}

.asset-library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.asset-library-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.1;
}

.asset-library-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.asset-library-close {
  flex: 0 0 auto;
}

.asset-library-shell {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(250px, 310px);
  gap: 14px;
  overflow: hidden;
}

.asset-library-rail,
.asset-library-main,
.asset-library-detail {
  min-height: 0;
  min-width: 0;
  overflow: auto;
}

.asset-library-rail {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-right: 2px;
}

.asset-library-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.asset-library-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
}

.asset-library-main-head output {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.asset-library-main .asset-list {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.asset-library-main .asset-list[data-view="grid"] {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  align-content: start;
}

.asset-library-detail {
  padding-right: 2px;
}

.board-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

@keyframes tile-count-blink {
  0% {
    filter: brightness(1);
  }
  24% {
    filter: brightness(1.85);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes tile-soft-fill {
  0% {
    background-color: var(--tile-face-base);
  }
  30% {
    background-color: color-mix(in srgb, var(--tile-highlight), var(--tile-face-base) 82%);
  }
  100% {
    background-color: var(--tile-face-base);
  }
}

@keyframes contour-count-blink {
  0% {
    opacity: 0;
    transform: scale(0.985);
    box-shadow: 0 0 0 0 transparent;
  }
  18% {
    opacity: 1;
    transform: scale(1);
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--tile-highlight), transparent 10%),
      0 0 28px color-mix(in srgb, var(--tile-highlight), transparent 18%);
  }
  100% {
    opacity: 0;
    transform: scale(1.045);
    box-shadow: 0 0 0 8px transparent;
  }
}

@keyframes soft-contour {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
  }
}

@keyframes dramatic-end-hold {
  from {
    filter: brightness(1.05);
  }

  to {
    filter: brightness(1.42);
  }
}

@keyframes dramatic-end-contour {
  from {
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--tile-highlight), transparent 34%),
      0 0 18px color-mix(in srgb, var(--tile-highlight), transparent 74%);
  }

  to {
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--tile-highlight), transparent 18%),
      0 0 34px color-mix(in srgb, var(--tile-highlight), transparent 58%);
  }
}

@keyframes photosensitive-contour {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  35% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes gradual-tile-brightness {
  0% {
    filter: brightness(1.85);
  }
  16% {
    filter: brightness(1.65);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes gradual-soft-fill {
  0% {
    background-color: color-mix(in srgb, var(--tile-highlight), var(--tile-face-base) 76%);
  }
  18% {
    background-color: color-mix(in srgb, var(--tile-highlight), var(--tile-face-base) 84%);
  }
  100% {
    background-color: var(--tile-face-base);
  }
}

@keyframes gradual-contour-fade {
  0% {
    opacity: 1;
    transform: scale(1);
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--tile-highlight), transparent 12%),
      0 0 30px color-mix(in srgb, var(--tile-highlight), transparent 20%);
  }
  100% {
    opacity: 0;
    transform: scale(1.045);
    box-shadow:
      0 0 0 9px transparent,
      0 0 30px transparent;
  }
}

@keyframes gradual-soft-contour {
  0% {
    opacity: 0.75;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.025);
  }
}

@keyframes gradual-photosensitive-contour {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@media (max-width: 980px) {
  .app {
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .topbar {
    align-items: flex-start;
    grid-template-columns: 1fr;
    height: auto;
    padding: 18px;
  }

  .topbar-zone {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .brand-button {
    min-width: 0;
    justify-content: flex-start;
  }

  .top-actions {
    width: 100%;
  }

  .top-action-group,
  .top-action-group + .top-action-group {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .top-actions .button {
    min-width: 0;
    width: 100%;
  }

  .primary-action,
  .primary-action > .button,
  .primary-action > .brand-button,
  .primary-action > .menu-wrap,
  .primary-action > .menu-wrap > .button {
    width: 100%;
  }

  .workspace,
  .app[data-sidebar-open="true"] .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar-panel {
    order: -1;
    max-width: none;
    max-height: min(72vh, 760px);
    border-left: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .options-menu {
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }

  .asset-library-shell {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }

  .asset-library-detail {
    grid-column: 1 / -1;
    max-height: 260px;
  }

  .result-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

}

@media (max-width: 680px) {
  .top-actions {
    grid-template-columns: 1fr;
  }

  .winner-overlay {
    padding: 18px 16px;
  }

  .asset-library-overlay {
    padding: 16px;
  }

  .asset-library-card {
    width: 100%;
    max-height: calc(100vh - 32px);
    padding: 16px;
  }

  .asset-library-shell {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .asset-library-rail,
  .asset-library-main,
  .asset-library-detail {
    overflow: visible;
  }

  .asset-library-main .asset-list {
    max-height: 360px;
  }

  .winner-card-shell {
    gap: 8px;
  }

  .winner-text-toolbar {
    flex-wrap: wrap;
  }

  .winner-text-toolbar-field {
    width: 100%;
    max-width: none;
  }

  .winner-card-topbar .overlay-action {
    min-width: 0;
  }

  .winner-status-actions .overlay-action {
    min-width: 74px;
  }

  .overlay-flip {
    width: 58px;
    min-width: 58px;
    min-height: 50px;
  }

  .winner-nav-up,
  .winner-nav-down {
    left: 84px;
    right: 84px;
    height: 62px;
  }

  .winner-nav-left,
  .winner-nav-right {
    width: 74px;
  }

  .editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 40px;
  }

  .editor-preview {
    grid-column: span 2;
  }

  .board-area {
    padding: 18px;
  }

  .tile-board {
    min-height: 420px;
  }

  .drag-mode-options {
    grid-template-columns: 1fr;
  }

  .tile-title {
    font-size: max(8px, calc(25px * var(--tile-title-scale) * var(--board-tile-scale)));
  }

  .result-bar {
    padding: 18px;
  }

  .winner-summary {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .winner-face {
    padding: 34px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }

  .winner-overlay:not([hidden]) .winner-detail {
    animation: none;
  }
}
