#tiles-panel.tile-editor-ready > :not(.tile-editor-host) { display: none !important; }
.tile-editor-host { width: var(--s260-p-); max-width: 100%; }
.tile-editor-host .tile-card {
  --tile-button-size: var(--s32-p-, 32px);
  --tile-icon-size: var(--s36-p-, 36px);
  --tile-art-size: var(--s48-p-, 48px);
  --tile-common-art-size: var(--s28-p-, 28px);
  --tile-input-height: var(--s24-p-, 24px);
  --tile-hero-height: calc(var(--s260-p-, 260px) * .73);
  --tile-control-gap: var(--s10-p-, 10px);
  --tile-inset: var(--s20-p-, 20px);
  --tile-divider-inset: var(--s10-p-, 10px);
  width: calc(100% + var(--tile-inset) * 2); max-width: none;
  margin: 0 calc(-1 * var(--tile-inset)) calc(-1 * var(--tile-inset));
  border: 0; border-radius: 0 0 var(--ak-radius-panel, 20px) var(--ak-radius-panel, 20px); background: transparent; font-family: inherit; color: inherit; letter-spacing: normal;
}
.tile-editor-host .tile-card-header { display: none; }
.tile-editor-host .tile-hero { grid-template-columns: minmax(0, 1fr) var(--tile-button-size); gap: var(--s12-p-, 12px); margin: 0 var(--tile-inset) calc(7px * var(--app-scale, 1)); }
.tile-editor-host .tile-piece-preview { width: calc(100% - var(--s14-p-, 14px)); }
.tile-editor-host .tile-drawing { transform: none; }
.tile-editor-host .tile-picker-toggle > img { padding: var(--s5-p-, 5px); }
.tile-editor-host .tile-picker-toggle { margin-top: var(--s8-p-, 8px); font-size: var(--s8-p-, 8px); }
.tile-editor-host .tile-recent-shapes { gap: var(--s12-p-, 12px); }
.tile-editor-host :is(.tile-shape-art, .tile-recent-choice) { padding: calc(2px * var(--app-scale, 1)); border-radius: var(--s10-p-, 10px); border-width: 1px; }
.tile-editor-host .tile-picker-expanded { top: 0; left: var(--s4-p-, 4px); right: var(--s4-p-, 4px); padding: var(--s14-p-, 14px) var(--s14-p-, 14px) var(--s28-p-, 28px); border-radius: var(--s14-p-, 14px); }
.tile-editor-host .tile-picker-header h3 { font-size: var(--s16-p-, 16px); }
.tile-editor-host .tile-picker-grid { gap: var(--s16-p-, 16px) var(--s8-p-, 8px); }
.tile-editor-host .tile-shape-choice { gap: var(--s6-p-, 6px); }
.tile-editor-host .tile-shape-label { font-size: var(--s10-p-, 10px); }
.tile-editor-host .tile-picker-expanded .tile-shape-art { width: var(--s40-p-, 40px); height: var(--s40-p-, 40px); border-width: 2px; }
.tile-editor-host .tile-picker-divider { margin: var(--s16-p-, 16px) 0; gap: calc(3px * var(--app-scale, 1)); font-size: var(--s8-p-, 8px); }
.tile-editor-host .tile-picker-divider img { width: var(--s12-p-, 12px); height: var(--s12-p-, 12px); }
.tile-editor-host .tile-field-group { padding-bottom: var(--s20-p-, 20px); }
.tile-editor-host :is(.tile-measurements, .tile-purchase) { gap: var(--s18-p-, 18px); }
.tile-editor-host .tile-field-label { font-size: calc(var(--app_font_small-size-ui, 11px) * .85); margin-bottom: 0; }
.tile-editor-host .tile-field-control input { padding: 2px 4px; font-size: var(--editor-field-font-size, 18px); box-shadow: none; }
.tile-editor-host .tile-unit { font-size: var(--s8-p-, 8px); }
.tile-editor-host .tile-length-unit { top: calc(-1 * var(--s12-p-, 12px)); }
.tile-editor-host .tile-length-control::after,
.tile-editor-host .tile-length-unit::before { width: calc(6px * var(--app-scale, 1)); height: calc(6px * var(--app-scale, 1)); }
.tile-editor-host .tile-thickness { padding-bottom: var(--s12-p-, 12px); }
.tile-editor-host .tile-thickness .tile-field-control { width: calc((100% - var(--s18-p-, 18px)) / 2); }
.tile-editor-host .tile-currency { font-size: var(--app_font_regular-size-ui, 15px) !important; padding: 0 12px 0 3px; }
.tile-editor-host .tile-currency-control::after { width: 7px; height: 7px; border-width: 0 1.5px 1.5px 0; }
.tile-editor-host .tile-purchase { padding: var(--s10-p-, 10px) var(--tile-inset) 0; }
.tile-editor-host .tile-purchase .tile-field-group { padding-bottom: var(--s8-p-, 8px); }
.tile-editor-host .tile-coverage { min-height: var(--s38-p-, 38px); padding: var(--s10-p-, 10px) var(--tile-inset); }
.tile-editor-host .tile-coverage span { font-size: var(--app_font_small-size-ui, 11px); }
.tile-editor-host .tile-coverage output { font-size: var(--s18-p-, 18px); letter-spacing: normal; }
#planks-panel.plank-editor-ready > :not(.plank-editor-host) { display: none !important; }
.plank-card-hero { margin: 0 var(--tile-inset) var(--s28-p-, 28px); padding-top: var(--s12-p-, 12px); }
.plank-card-hero > .tile-colour { margin-bottom: var(--s24-p-, 24px); }
.plank-card #plank-appearance { width: 100%; margin: 0; }
.plank-card #plank-live-preview { width: calc(100% - var(--s12-p-, 12px)); margin-inline: auto; box-shadow: none; }
.plank-card #plank-live-preview svg { overflow: visible; }
.plank-card :is(.piece-opacity-control, #plank-color-control) { display: none; }
.plank-card .plank-measure-inputs { flex: 1; min-width: 0; }
#planks-panel .plank-measure-input { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); padding: 0; margin: 0; min-height: 0; }
#planks-panel .plank-measure-input .ii-unit { display: none; }
.tile-editor-host .tile-coverage .plank-coverage-value { font-size: var(--s18-p-, 18px); font-weight: 600; }
#tilespattern-panel .pattern-choices { display: flex; flex-wrap: wrap; gap: var(--s8-p-, 8px); }
:is(#pattern-panel, #tilespattern-panel, #underlay-panel) :is(.pattern-option-btn, .underlay-option-btn) { display: grid; place-items: center; box-sizing: border-box; width: var(--s48-p-); height: var(--s48-p-); padding: 3px; border: 1px solid transparent; border-radius: var(--s8-p-, 8px); background: #ececec; }
:is(#pattern-panel, #tilespattern-panel, #underlay-panel) :is(.pattern-option-btn.is-current, .underlay-option-btn[aria-pressed="true"]) { border-color: #00c9b9; background: transparent; }
:is(#pattern-panel, #underlay-panel) :is(.pattern-option-btn, .underlay-option-btn) > .icon-btn { display: block; position: relative; width: 100%; height: 100%; padding: 0; margin: 0; }
:is(#pattern-panel, #underlay-panel) :is(.pattern-option-btn, .underlay-option-btn) > .icon-btn::before { position: absolute; inset: 0; width: 100%; height: 100%; transform: none; }
#underlay-panel > .floating-row--choices { justify-content: flex-start !important; gap: var(--s16-p-, 16px); }
#underlay-price-row .tile-purchase .tile-field-group { padding-bottom: var(--s20-p-, 20px); }
#tilespattern-panel .tile-layout-icon { width: 100%; height: 100%; display: block; }
@media (max-width: 820px) {
  .tile-editor-host { width: 100%; }
  .tile-editor-host .tile-card { --tile-inset: 12px; --tile-button-size: var(--s40-p-, 40px); }
  .tile-editor-host .tile-piece-preview { width: 88%; justify-self: center; }
}
#btn-tiles[data-selected-tile-icon]::before,
#btn-tiles-pattern[data-selected-tile-icon]::before,
#btn-tiles-m[data-selected-tile-icon]::before,
#btn-tiles-pattern-m[data-selected-tile-icon]::before {
  mask: none;
  -webkit-mask: none;
  background: var(--selected-tile-icon) center / contain no-repeat;
}

/* Match the standard settings content width regardless of layout count. */
:is(#pattern-panel, #tilespattern-panel) { width: var(--s260-p-, 260px); max-width: 100%; }
@media (max-width: 820px) { :is(#pattern-panel, #tilespattern-panel) { width: 100%; } }
