.frill-room-visualizer {
  color: #20242a;
}

.frill-room-visualizer > .container {
  width: calc(100% - 32px) !important;
  max-width: 1800px !important;
}

.frill-room-visualizer *,
.frill-room-visualizer *::before,
.frill-room-visualizer *::after {
  box-sizing: border-box;
}

.frp-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.frp-page-head h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.frp-page-head p {
  max-width: 760px;
  margin: 0;
  color: #5d6673;
}

.frp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.frp-workspace,
.frp-products {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  background: #fff;
}

.frp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #e8edf2;
}

.frp-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.frp-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 430px);
  align-items: start;
}

.frp-stage-shell {
  padding: 14px;
  background: #f5f7fa;
}

.frp-stage {
  position: relative;
  width: 100%;
  min-height: 440px;
  overflow: hidden;
  border: 1px dashed #b9c4cf;
  border-radius: 8px;
  background: #eef3f6;
}

.frp-stage.has-room {
  min-height: 0;
  border-style: solid;
  background: #111;
}

.frp-empty {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  min-height: 320px;
  padding: 26px;
  color: #52606d;
  z-index: 1;
}

.frp-empty-product {
  min-width: 0;
}

.frp-empty-product > span,
.frp-empty-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #126b65;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.frp-empty-product img {
  display: block;
  width: 156px;
  height: 156px;
  max-width: 100%;
  border: 1px solid #d5dde4;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 8px 20px rgba(29, 44, 55, .12);
}

.frp-empty-product strong {
  display: block;
  max-width: 156px;
  margin-top: 9px;
  overflow: hidden;
  color: #28313c;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frp-empty-guide {
  align-self: center;
  width: 100%;
  max-width: 720px;
  padding: 16px 20px 16px 0;
}

.frp-empty-guide h2 {
  margin: 0 0 9px;
  color: #202a33;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.frp-empty-guide > p {
  max-width: 650px;
  margin: 0;
  color: #596774;
  font-size: 14px;
  line-height: 1.55;
}

.frp-empty-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 22px 0;
}

.frp-empty-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding-top: 13px;
  border-top: 2px solid #d9e2e7;
  color: #64717d;
  font-size: 12px;
  line-height: 1.5;
}

.frp-empty-option i {
  padding-top: 2px;
  color: #126b65;
  font-size: 20px;
  text-align: center;
}

.frp-empty-option strong {
  display: block;
  margin-bottom: 3px;
  color: #26323c;
  font-size: 14px;
}

.frp-empty-upload {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.frp-empty-guide small {
  display: block;
  margin-top: 11px;
  color: #75818c;
  font-size: 11px;
  line-height: 1.45;
}

.frp-empty-guide small i {
  margin-right: 4px;
  color: #126b65;
}

.frp-stage.has-room .frp-empty {
  display: none;
}

.frp-room-image {
  display: none;
  width: 100%;
  height: auto;
  transform-origin: center center;
}

.frp-stage.has-room .frp-room-image {
  display: block;
}

.frp-fill-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  transform-origin: center center;
  touch-action: none;
}

.frp-smart-guide {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: center center;
}

.frill-room-visualizer.is-fill-mode .frp-stage.has-room .frp-smart-guide {
  display: block;
}

.frill-room-visualizer.is-fill-mode .frp-stage.has-room .frp-fill-canvas {
  display: block;
}

.frill-room-visualizer.is-fill-mode .frp-product-layer,
.frill-room-visualizer.is-fill-mode .frp-crop-notice {
  display: none;
}

.frp-fill-canvas.is-add-tool {
  cursor: cell;
}

.frp-fill-canvas.is-erase-tool {
  cursor: not-allowed;
}

.frp-fill-canvas.is-smart-tool.has-editable-boundary {
  cursor: grab;
}

.frp-fill-canvas.is-smart-tool.is-boundary-dragging {
  cursor: grabbing;
}

.frp-product-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  width: 48%;
  min-width: 80px;
  z-index: 3;
  cursor: move;
  touch-action: none;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: center center;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .22));
}

.frp-stage.has-room .frp-product-layer {
  display: block;
}

.frill-room-visualizer.is-fill-mode .frp-stage.has-room .frp-product-layer {
  display: none;
}

.frp-product-layer:focus {
  outline: 2px solid #2b7cff;
  outline-offset: 4px;
}

.frp-product-layer img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.frp-product-layer.is-blended img {
  mix-blend-mode: multiply;
}

.frp-crop-notice {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 5;
  max-width: calc(100% - 28px);
  padding: 9px 13px;
  border-radius: 6px;
  background: rgba(20, 34, 42, .92);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity .18s ease, transform .18s ease;
}

.frp-product-layer:hover + .frp-crop-notice,
.frp-product-layer:focus + .frp-crop-notice,
.frp-crop-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.frp-workflow-guide {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 8;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(520px, calc(100% - 28px));
  padding: 12px 15px;
  border: 2px solid #ffd60a;
  border-radius: 7px;
  background: rgba(7, 73, 68, .98);
  color: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38), 0 0 0 4px rgba(255, 214, 10, .2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}

.frp-workflow-guide.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  animation: frp-guide-card 1.7s ease-in-out infinite;
}

.frp-workflow-guide > i {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #ffd60a;
  color: #073f3b;
  font-size: 22px;
  text-align: center;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .18);
  animation: frp-guide-pointer 1s ease-in-out infinite;
}

.frp-workflow-guide strong,
.frp-workflow-guide small {
  display: block;
}

.frp-workflow-guide strong {
  margin-bottom: 2px;
  color: #ffe76b;
  font-size: 15px;
  line-height: 1.3;
}

.frp-workflow-guide small {
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
}

.frp-guide-focus {
  position: relative;
  z-index: 2;
}

.frp-design-actions .btn.frp-guide-focus,
.frp-design-actions .btn.frp-guide-focus:hover,
.frp-design-actions .btn.frp-guide-focus:focus {
  border-color: #ffd60a !important;
  background: #ffd60a !important;
  color: #073f3b !important;
  font-weight: 700;
  animation: frp-guide-button 1.15s ease-in-out infinite;
}

.frp-design-actions .btn.frp-guide-focus i {
  color: #073f3b !important;
}

.frp-stage.frp-guide-focus {
  animation: frp-guide-stage 1.45s ease-in-out infinite;
}

@keyframes frp-guide-card {
  0%,
  100% {
    box-shadow: 0 12px 34px rgba(0, 0, 0, .38), 0 0 0 4px rgba(255, 214, 10, .18);
  }

  50% {
    box-shadow: 0 15px 38px rgba(0, 0, 0, .42), 0 0 0 8px rgba(255, 214, 10, .34);
  }
}

@keyframes frp-guide-pointer {
  0%,
  100% {
    transform: translateY(-2px) rotate(-8deg);
  }

  50% {
    transform: translateY(3px) rotate(3deg);
  }
}

@keyframes frp-guide-button {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(255, 214, 10, .25), 0 4px 12px rgba(7, 63, 59, .18);
  }

  50% {
    transform: scale(1.035);
    box-shadow: 0 0 0 9px rgba(255, 214, 10, .16), 0 7px 18px rgba(7, 63, 59, .28);
  }
}

@keyframes frp-guide-stage {
  0%,
  100% {
    box-shadow: inset 0 0 0 4px rgba(255, 214, 10, .95), 0 0 0 3px rgba(255, 214, 10, .22);
  }

  50% {
    box-shadow: inset 0 0 0 7px rgba(255, 231, 107, 1), 0 0 0 8px rgba(255, 214, 10, .34);
  }
}

.frp-resize-handle {
  position: absolute;
  right: -9px;
  bottom: -9px;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #147c6f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .24);
  cursor: nwse-resize;
}

.frp-control-panel {
  position: sticky;
  top: 16px;
  display: block;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 18px;
  border-left: 1px solid #e8edf2;
  background: #fff;
  scrollbar-gutter: stable;
}

.frp-selected,
.frp-product-images,
.frp-presets,
.frp-range-grid,
.frp-check {
  min-width: 0;
}

.frp-selected,
.frp-product-images,
.frp-presets,
.frp-range-grid {
  padding-bottom: 16px;
  border-bottom: 1px solid #e8edf2;
}

.frp-selected span,
.frp-product-images > span,
.frp-image-mode > span,
.frp-presets > span {
  display: block;
  margin-bottom: 8px;
  color: #667282;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.frp-image-mode {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e8edf2;
}

.frp-mode-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.frp-mode-button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid #d8e0e7;
  border-radius: 6px;
  background: #fff;
  color: #303a45;
  font-size: 11px;
  line-height: 1.3;
  text-align: left;
}

.frp-mode-button i {
  color: #667484;
  font-size: 17px;
  text-align: center;
}

.frp-mode-button:hover,
.frp-mode-button:focus,
.frp-mode-button.active {
  border-color: #147c6f;
  background: #edf8f6;
  color: #0d5e55;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(20, 124, 111, .1);
}

.frp-mode-button.active i {
  color: #147c6f;
}

.frp-image-mode > p {
  margin: 8px 0 0;
  color: #687483;
  font-size: 11px;
  line-height: 1.45;
}

.frp-fill-controls {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #cfe3df;
  border-radius: 6px;
  background: #f6fbfa;
}

.frp-fill-controls[hidden] {
  display: none;
}

.frp-design-picker {
  margin-bottom: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid #dbe9e6;
}

.frp-design-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
}

.frp-design-picker-head > span {
  color: #475561;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.frp-design-swatch {
  display: grid;
  width: 72px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #aebfc0;
  border-radius: 5px;
  background: #fff;
  color: #748087;
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
}

.frp-design-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frp-design-swatch img[hidden],
.frp-design-swatch span[hidden],
.frp-design-actions [hidden] {
  display: none;
}

.frp-design-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.frp-fill-target span {
  display: block;
  margin-bottom: 3px;
  color: #6a7684;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.frp-fill-target strong {
  display: block;
  color: #174b46;
  font-size: 12px;
  line-height: 1.35;
}

.frp-fill-status {
  min-height: 34px;
  margin: 9px 0;
  padding: 7px 9px;
  border-left: 3px solid #147c6f;
  background: #fff;
  color: #53606d;
  font-size: 11px;
  line-height: 1.4;
}

.frp-fill-tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.frp-fill-tool-buttons .btn.frp-tool-active,
.frp-fill-tool-buttons .btn.frp-tool-active:hover,
.frp-fill-tool-buttons .btn.frp-tool-active:focus {
  border-color: #0c5751 !important;
  background: #126b65 !important;
  color: #fff !important;
  opacity: 1 !important;
}

.frp-fill-tool-buttons .btn.frp-refine-guide,
.frp-fill-tool-buttons .btn.frp-refine-guide:hover,
.frp-fill-tool-buttons .btn.frp-refine-guide:focus {
  position: relative;
  z-index: 2;
  border-color: #ffd60a !important;
  background: #ffd60a !important;
  color: #073f3b !important;
  font-weight: 700;
  animation: frp-refine-button 1.15s ease-in-out infinite;
}

.frp-fill-tool-buttons .btn.frp-refine-guide i {
  color: #073f3b !important;
}

@keyframes frp-refine-button {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 3px rgba(255, 214, 10, .28), 0 4px 10px rgba(7, 63, 59, .16);
  }

  50% {
    transform: scale(1.045);
    box-shadow: 0 0 0 9px rgba(255, 214, 10, .16), 0 8px 18px rgba(7, 63, 59, .28);
  }
}

.frp-fill-ranges {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 12px;
}

.frp-fill-ranges label {
  margin: 6px 0 0;
  color: #3f4b56;
  font-size: 11px;
  font-weight: 600;
}

.frp-fill-ranges label:first-child {
  margin-top: 0;
}

.frp-fill-ranges output {
  color: #71808d;
  font-weight: 400;
}

.frp-fill-ranges input[type="range"] {
  width: 100%;
}

.frp-fill-controls > .frp-check {
  margin-top: 12px;
}

.frp-product-image-list {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 2px 5px;
}

.frp-product-image-choice {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  padding: 3px;
  border: 1px solid #dce3ea;
  border-radius: 6px;
  background: #fff;
}

.frp-product-image-choice:hover,
.frp-product-image-choice:focus,
.frp-product-image-choice.active {
  border-color: #147c6f;
  box-shadow: 0 0 0 2px rgba(20, 124, 111, .14);
  outline: 0;
}

.frp-product-image-choice img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  object-fit: cover;
}

.frp-crop-actions {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 6px;
  margin-top: 10px;
}

.frp-crop-actions .btn {
  min-width: 0;
  white-space: normal;
}

.frp-control-panel .btn {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.frp-control-panel .btn i {
  font-size: 12px;
}

.frp-selected strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.frp-product-images,
.frp-presets,
.frp-range-grid,
.frp-check {
  margin-top: 16px;
}

.frp-preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.frp-preset.active {
  border-color: #147c6f;
  background: #e9f7f4;
  color: #0e5f55;
}

.frp-range-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: center;
}

.frp-range-grid label {
  margin: 8px 0 0;
  color: #3f4855;
  font-size: 12px;
  font-weight: 600;
}

.frp-range-grid label:first-child {
  margin-top: 0;
}

.frp-range-grid output {
  color: #707b89;
  font-weight: 400;
}

.frp-range-grid input[type="range"] {
  width: 100%;
}

.frp-rotation-tools {
  display: grid;
  grid-template-columns: 32px minmax(100px, 1fr) 64px 32px;
  gap: 6px;
  align-items: center;
}

.frp-rotation-tools .btn {
  width: 32px;
  min-width: 32px;
  height: 30px;
  min-height: 30px;
  padding: 4px;
}

.frp-rotation-tools input[type="number"] {
  width: 64px;
  height: 30px;
  padding: 4px 7px;
  border: 1px solid #ccd4dd;
  border-radius: 4px;
  font-size: 12px;
}

.frp-toolbar .btn.frp-flip-active,
.frp-toolbar .btn.frp-flip-active:hover,
.frp-toolbar .btn.frp-flip-active:focus {
  border-color: #0c5751 !important;
  background: #126b65 !important;
  color: #fff !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35) !important;
}

.frp-toolbar .btn.frp-flip-active i {
  color: #fff !important;
  opacity: 1 !important;
}

.frp-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 600;
}

.frp-products {
  padding: 14px;
}

.frp-products h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.frp-product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  padding-right: 2px;
}

.frp-product-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 88px;
  padding: 8px;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.frp-product-card:hover,
.frp-product-card:focus,
.frp-product-card.active {
  border-color: #147c6f;
  box-shadow: 0 0 0 2px rgba(20, 124, 111, .12);
}

.frp-product-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  background: #f3f5f7;
}

.frp-product-card-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.frp-product-card-info strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
}

.frp-product-card-info span {
  color: #147c6f;
  font-weight: 700;
}

.frp-empty-products {
  color: #697484;
}

.frp-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 22, 28, .72);
}

.frp-crop-modal[hidden] {
  display: none;
}

.frp-crop-dialog {
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.frp-crop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e9ee;
}

.frp-crop-header h2 {
  margin: 0 0 5px;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: 0;
}

.frp-crop-header p {
  margin: 0;
  color: #647080;
}

.frp-crop-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #edf1f4;
  color: #25303b;
  font-size: 16px;
}

.frp-crop-workspace {
  display: grid;
  min-height: 420px;
  place-items: center;
  overflow: auto;
  padding: 24px;
  background: #242a30;
}

.frp-crop-surface {
  position: relative;
  width: 600px;
  height: 450px;
  max-width: 100%;
  overflow: hidden;
  background: #111;
  user-select: none;
  touch-action: none;
}

.frp-crop-surface > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.frp-crop-box {
  position: absolute;
  left: 10%;
  top: 10%;
  z-index: 2;
  width: 80%;
  height: 80%;
  border: 2px solid #fff;
  background-image:
    linear-gradient(to right, transparent 33.333%, rgba(255,255,255,.65) 33.333%, rgba(255,255,255,.65) calc(33.333% + 1px), transparent calc(33.333% + 1px), transparent 66.666%, rgba(255,255,255,.65) 66.666%, rgba(255,255,255,.65) calc(66.666% + 1px), transparent calc(66.666% + 1px)),
    linear-gradient(to bottom, transparent 33.333%, rgba(255,255,255,.65) 33.333%, rgba(255,255,255,.65) calc(33.333% + 1px), transparent calc(33.333% + 1px), transparent 66.666%, rgba(255,255,255,.65) 66.666%, rgba(255,255,255,.65) calc(66.666% + 1px), transparent calc(66.666% + 1px));
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .48);
  cursor: move;
  outline: 0;
  touch-action: none;
}

.frp-crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #147c6f;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .35);
}

.frp-crop-handle-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.frp-crop-handle-n { left: 50%; top: -8px; cursor: ns-resize; transform: translateX(-50%); }
.frp-crop-handle-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.frp-crop-handle-e { right: -8px; top: 50%; cursor: ew-resize; transform: translateY(-50%); }
.frp-crop-handle-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.frp-crop-handle-s { left: 50%; bottom: -8px; cursor: ns-resize; transform: translateX(-50%); }
.frp-crop-handle-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.frp-crop-handle-w { left: -8px; top: 50%; cursor: ew-resize; transform: translateY(-50%); }

.frp-crop-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e5e9ee;
}

body.frp-crop-open {
  overflow: hidden;
}

@media (max-width: 991px) {
  .frill-room-visualizer > .container {
    width: calc(100% - 20px) !important;
  }

  .frp-editor-layout {
    grid-template-columns: 1fr;
  }

  .frp-control-panel {
    position: static;
    max-height: none;
    overflow: visible;
    border-top: 1px solid #e8edf2;
    border-left: 0;
    box-shadow: none;
  }

  .frp-product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .frp-editor-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (max-width: 640px) {
  .frill-room-visualizer > .container {
    width: 100% !important;
    padding-right: 0;
    padding-left: 0;
  }

  .frill-room-visualizer .breadcrumb,
  .frp-page-head {
    margin-right: 12px;
    margin-left: 12px;
  }

  .frp-page-head {
    display: block;
  }

  .frp-view-product {
    width: 100%;
    margin-top: 8px;
  }

  .frp-page-head h1 {
    font-size: 22px;
  }

  .frp-page-head p {
    font-size: 13px;
    line-height: 1.45;
  }

  .frp-workflow-guide {
    bottom: 10px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    width: calc(100% - 20px);
    padding: 10px;
  }

  .frp-workflow-guide > i {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .frp-workflow-guide strong {
    font-size: 13px;
  }

  .frp-workflow-guide small {
    font-size: 10px;
  }

  .frp-workspace,
  .frp-products {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .frp-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(4, 44px);
    gap: 6px;
    padding: 8px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 5px 16px rgba(24, 35, 45, .1);
  }

  .frp-toolbar .btn,
  .frp-upload-button {
    display: inline-flex;
    width: auto;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 7px;
    white-space: normal;
  }

  .frp-toolbar .btn i,
  .frp-upload-button i {
    margin: 0;
    font-size: 16px;
  }

  .frp-toolbar .frp-toolbar-label {
    display: none;
  }

  .frp-upload-button {
    gap: 7px;
  }

  .frp-upload-button .frp-toolbar-label {
    display: inline;
    min-width: 0;
    font-size: 12px;
    line-height: 1.25;
  }

  .frp-stage-shell {
    padding: 8px;
  }

  .frp-stage {
    min-height: 58vh;
    min-height: 58dvh;
    border-radius: 6px;
  }

  .frp-stage.has-room {
    min-height: 0;
  }

  .frp-empty {
    grid-template-columns: 1fr;
    gap: 18px;
    align-content: start;
    min-height: 58vh;
    min-height: 58dvh;
    padding: 18px;
  }

  .frp-empty-product {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 4px 12px;
    align-items: center;
  }

  .frp-empty-product > span {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }

  .frp-empty-product img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 88px;
    height: 88px;
  }

  .frp-empty-product strong {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    max-width: none;
    margin: 0;
    white-space: normal;
  }

  .frp-empty-guide {
    align-self: start;
    max-width: none;
    padding: 0;
  }

  .frp-empty-guide h2 {
    font-size: 20px;
  }

  .frp-empty-options {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 16px 0;
  }

  .frp-empty-option {
    padding-top: 10px;
  }

  .frp-empty-upload {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .frp-control-panel {
    padding: 14px 12px calc(16px + env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
  }

  .frp-control-panel .btn,
  .frp-mode-button,
  .frp-product-image-choice {
    min-height: 44px;
  }

  .frp-product-image-choice {
    flex-basis: 58px;
    width: 58px;
    height: 58px;
  }

  .frp-selected,
  .frp-product-images,
  .frp-presets,
  .frp-range-grid,
  .frp-check {
    margin-top: 14px;
  }

  .frp-range-grid {
    grid-template-columns: 1fr;
  }

  .frp-mode-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frp-mode-button {
    min-height: 58px;
    padding: 8px 7px;
  }

  .frp-fill-controls {
    padding: 11px;
  }

  .frp-fill-tool-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frp-design-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frp-design-actions .btn {
    width: 100%;
  }

  .frp-fill-tool-buttons .btn {
    width: 100%;
    padding: 7px 5px;
    white-space: normal;
  }

  .frp-fill-ranges input[type="range"],
  .frp-range-grid input[type="range"] {
    min-height: 32px;
    touch-action: pan-x;
  }

  .frp-preset-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 2px 7px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .frp-preset {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .frp-rotation-tools {
    grid-template-columns: 44px minmax(70px, 1fr) 62px 44px;
  }

  .frp-rotation-tools .btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .frp-rotation-tools input[type="number"] {
    width: 62px;
    height: 44px;
  }

  .frp-product-list {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .frp-product-card {
    flex: 0 0 min(82vw, 290px);
    scroll-snap-align: start;
  }

  .frp-crop-modal {
    padding: 0;
  }

  .frp-crop-dialog {
    display: flex;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    flex-direction: column;
    border-radius: 0;
  }

  .frp-crop-header,
  .frp-crop-footer {
    flex: 0 0 auto;
    padding: 12px;
  }

  .frp-crop-header h2 {
    font-size: 18px;
  }

  .frp-crop-header p {
    font-size: 12px;
    line-height: 1.4;
  }

  .frp-crop-workspace {
    min-height: 0;
    flex: 1 1 auto;
    padding: 10px;
  }

  .frp-crop-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frp-crop-footer .btn {
    min-height: 44px;
  }

  .frp-products {
    padding: 14px 12px;
  }
}

@media (pointer: coarse) {
  .frp-resize-handle {
    right: -14px;
    bottom: -14px;
    width: 30px;
    height: 30px;
  }

  .frp-crop-handle {
    width: 22px;
    height: 22px;
  }

  .frp-crop-handle-nw { left: -12px; top: -12px; }
  .frp-crop-handle-n { top: -12px; }
  .frp-crop-handle-ne { right: -12px; top: -12px; }
  .frp-crop-handle-e { right: -12px; }
  .frp-crop-handle-se { right: -12px; bottom: -12px; }
  .frp-crop-handle-s { bottom: -12px; }
  .frp-crop-handle-sw { left: -12px; bottom: -12px; }
  .frp-crop-handle-w { left: -12px; }
}

@media (prefers-reduced-motion: reduce) {
  .frp-workflow-guide,
  .frp-workflow-guide > i,
  .frp-guide-focus,
  .frp-design-actions .btn.frp-guide-focus,
  .frp-fill-tool-buttons .btn.frp-refine-guide {
    animation: none;
    transition: none;
  }
}
