/* Final interaction overrides for the smart pegboard runtime. */
.stage {
  align-items: flex-start;
  justify-content: flex-start;
}

.board-shell {
  margin: auto;
  transform: none !important;
  transition: none;
}

#board {
  image-rendering: auto;
}

.fullscreen-btn,
.place-image-btn,
.overview-btn,
.unlock-btn {
  touch-action: manipulation;
  transition: right .24s ease, bottom .24s ease, opacity .18s ease, transform .18s ease;
}

.fullscreen-btn,
.place-image-btn,
.overview-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  right: 18px;
}

.fullscreen-btn {
  top: 104px;
}

.place-image-btn {
  position: fixed;
  z-index: 24;
  top: 150px;
  height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 14px;
  background: rgba(29, 27, 25, .85);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 35px rgba(32, 48, 43, .25);
}

.overview-btn {
  position: fixed;
  z-index: 24;
  top: 196px;
  height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 14px;
  background: rgba(29, 27, 25, .85);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 35px rgba(32, 48, 43, .25);
}

.place-image-btn.active {
  background: #21a9bd;
}

.overview-btn.active {
  background: #f5b531;
  color: #342615;
}

.place-image-btn[hidden] {
  display: none;
}

.board-fit-screen .stage {
  display: block;
  padding: 0 !important;
  overflow: hidden;
}

.board-fit-screen .board-shell {
  margin: 0;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
}

.board-fit-screen #board {
  border-radius: 0 !important;
}

.overview-mode.board-fit-screen .stage,
.overview-mode .stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  overflow: hidden;
}

.overview-mode.board-fit-screen .board-shell,
.overview-mode .board-shell {
  margin: auto;
}

.board-page-switcher {
  position: fixed;
  z-index: 24;
  right: 18px;
  top: 244px;
  display: grid;
  grid-template-columns: repeat(2, 48px);
  gap: 7px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(29, 27, 25, .72);
  box-shadow: 0 12px 35px rgba(32, 48, 43, .24);
  backdrop-filter: blur(12px);
  transition: opacity .18s ease, transform .18s ease;
}

.board-page-switcher[hidden] {
  display: none;
}

.mini-map {
  display: none !important;
}

.board-page-switcher button {
  display: grid;
  gap: 3px;
  place-items: center;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 5px;
  font-size: 9px;
  font-weight: 900;
  touch-action: manipulation;
}

.board-page-switcher button.active {
  background: #f5b531;
  color: #342615;
}

.board-page-switcher .place-toggle {
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  min-height: 34px;
  padding: 6px 9px;
  text-align: left;
}

.board-page-switcher .place-toggle span {
  justify-self: start;
  font-size: 11px;
}

.board-page-switcher .place-toggle b {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}

.board-page-switcher .page-more-toggle {
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  min-height: 34px;
  padding: 6px 9px;
  text-align: left;
}

.board-page-switcher .page-more-toggle span {
  justify-self: start;
  font-size: 11px;
}

.board-page-switcher .page-more-toggle b {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}

.board-page-switcher .page-more-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  max-height: 184px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.board-page-switcher .page-more-list[hidden] {
  display: none;
}

.board-page-switcher .page-more-item {
  grid-template-columns: 1fr auto;
  min-height: 30px;
  padding: 4px 6px;
}

.board-page-switcher .page-more-item span {
  justify-self: start;
}

#overviewBtn {
  display: none !important;
}

.board-page-switcher .overview-toggle {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  text-align: left;
  font-size: 11px;
  font-weight: 900;
  touch-action: manipulation;
}

.board-page-switcher .overview-toggle b {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 9px;
}

.board-page-switcher .overview-toggle.active {
  background: #f5b531;
  color: #342615;
}

.board-page-switcher .overview-toggle.active b {
  background: rgba(52, 38, 21, .12);
}

.page-thumb {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: .92;
}

.page-thumb i {
  position: absolute;
  min-width: 5px;
  min-height: 5px;
  border-radius: 3px;
}

.page-thumb .image-rect {
  border: 2px solid #38d2e5;
  background: rgba(56, 210, 229, .16);
}

.page-thumb .view-rect {
  background: currentColor;
  opacity: .9;
}

.locked .topbar,
.locked .orb-btn,
.locked .mini-map,
.locked .zoom-hint,
.locked .danmaku-layer,
.locked .tool-panel {
  display: none !important;
}

.locked .fullscreen-btn,
.locked .place-image-btn,
.locked .overview-btn,
.locked .unlock-btn {
  display: flex !important;
  pointer-events: auto !important;
  opacity: 1;
}

.locked .fullscreen-btn,
.locked .place-image-btn,
.locked .overview-btn,
.locked .board-page-switcher {
  display: none !important;
}

.locked.lock-peek .unlock-btn,
.locked.lock-peek .fullscreen-btn,
.locked.lock-peek .place-image-btn,
.locked.lock-peek .overview-btn,
.locked.lock-peek .board-page-switcher {
  opacity: 0;
  pointer-events: none !important;
  transform: translateX(28px);
}

.danger-action {
  border-color: rgba(190, 67, 55, .26);
  background: #fff2ee;
  color: #b94134;
}

.board-work-section .workbench-actions {
  grid-template-columns: 1fr auto auto auto auto;
  align-items: stretch;
}

.board-settings-action {
  border-color: rgba(45, 122, 98, .24);
  background: #eaf6f0;
  color: #236b56;
}

.settings-focus {
  outline: 2px solid rgba(240, 109, 85, .58);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(240, 109, 85, .12);
}

.board-size-inline {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  gap: 7px;
  align-items: center;
  margin: 8px 0 10px;
}

.board-size-inline span {
  font-size: 11px;
  font-weight: 800;
  color: #5d544d;
}

.board-size-inline button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #4b443f;
  font-size: 10px;
  font-weight: 800;
  touch-action: manipulation;
}

.board-size-inline button.active,
.board-size-presets button.active {
  border-color: rgba(35, 107, 86, .38);
  background: #dff1e9;
  color: #236b56;
}

.step-modal.crop-modal {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 16px));
  padding: 16px;
}

.step-modal.crop-modal > p {
  margin: 4px 44px 10px 0;
}

.step-modal.crop-modal canvas {
  min-height: 340px;
  border-radius: 12px;
}

#cropModal.step-modal canvas {
  height: min(72vh, 760px);
}

#alignModal.step-modal canvas {
  height: min(68vh, 720px);
}

.align-mode-switch {
  max-width: 360px;
  margin: 8px 0 10px;
}

.align-size-presets {
  margin: 0 0 10px;
}

.align-size-presets button {
  min-height: 34px;
}

.align-quick-panel {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(39, 31, 25, .1);
  border-radius: 14px;
  background: #fff7e6;
}

.align-nudge-row,
.align-step-row,
.align-target-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.align-nudge-row button,
.align-step-row button,
.align-target-row button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(39, 31, 25, .12);
  border-radius: 10px;
  background: #26221f;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  touch-action: manipulation;
}

.align-target-row button {
  width: auto;
  min-width: 72px;
  padding: 0 12px;
  background: #efe7d8;
  color: #4f4032;
}

.align-target-row button.active {
  background: #21a9bd;
  color: #fff;
}

.align-step-row span {
  color: #5d5046;
  font-size: 12px;
  font-weight: 900;
}

.align-step-row strong,
.align-step-row small {
  white-space: nowrap;
}

.align-step-row strong {
  min-width: 80px;
  color: #21a9bd;
  font-size: 18px;
  text-align: center;
}

.align-step-row small {
  margin-left: auto;
  color: #8c8178;
  font-size: 11px;
  font-weight: 800;
}

#cropModal .primary-btn {
  margin-top: 10px;
}

.align-tune-panel {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(220px, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.align-pad,
.align-size {
  min-height: 132px;
  padding: 12px;
  border: 1px solid rgba(39, 31, 25, .11);
  border-radius: 16px;
  background: #fff7e6;
}

.align-pad {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  grid-template-rows: auto repeat(3, 42px);
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.align-pad b,
.align-size b {
  font-size: 14px;
}

.align-pad b {
  grid-column: 1 / -1;
  justify-self: center;
}

.align-pad button,
.align-size button {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  background: #f5b531;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 0 #d08613, 0 8px 18px rgba(161, 103, 26, .22);
  touch-action: manipulation;
}

#alignUp {
  grid-column: 2;
  grid-row: 2;
}

#alignLeft {
  grid-column: 1;
  grid-row: 3;
}

#alignRight {
  grid-column: 3;
  grid-row: 3;
}

#alignDown {
  grid-column: 2;
  grid-row: 4;
}

.align-size {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.align-size div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.align-size strong {
  min-width: 96px;
  color: #21a9bd;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.align-size small {
  color: #8c8178;
  font-weight: 800;
}

.align-image-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(39, 31, 25, .11);
  border-radius: 16px;
  background: #fff7e6;
}

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

.align-image-panel label {
  display: grid;
  grid-template-columns: 74px 42px minmax(120px, 1fr) 42px 62px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
}

.align-image-panel input {
  width: 100%;
  accent-color: #21a9bd;
}

.align-image-panel button {
  width: 42px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  background: #f5b531;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 0 #d08613, 0 8px 18px rgba(161, 103, 26, .22);
  touch-action: manipulation;
}

.align-image-panel b {
  color: #21a9bd;
  font-size: 14px;
  text-align: right;
}

.compact-image-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-image-panel label {
  grid-template-columns: 34px 42px 72px 42px;
}

.compact-image-panel input[hidden] {
  display: none;
}

.editor-color-row.audit-row {
  grid-template-columns: 1fr;
  gap: 6px;
}

.editor-colors {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Compact color palette and zoomable whole-image color preview. */
.editor-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 112px;
  overflow: auto;
  padding: 2px;
}

.editor-color-mini {
  display: grid;
  grid-template-columns: 17px auto;
  grid-template-rows: 15px 13px;
  column-gap: 4px;
  align-items: center;
  min-width: 58px;
  min-height: 34px;
  padding: 4px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #302923;
  text-align: left;
}

.editor-color-mini i {
  grid-row: 1 / -1;
  width: 17px;
  height: 24px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 3px;
}

.editor-color-mini b {
  font-size: 10px;
  line-height: 1;
}

.editor-color-mini small {
  color: #786d64;
  font-size: 9px;
  line-height: 1;
}

.editor-color-mini.active {
  border-color: #21a9bd;
  box-shadow: 0 0 0 2px rgba(33, 169, 189, .24);
}

.editor-overview-panel {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid rgba(33, 169, 189, .25);
  border-radius: 8px;
  background: #f1fbfc;
}

.editor-overview-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px 10px;
  align-items: center;
  color: #416168;
  font-size: 10px;
  font-weight: 800;
}

.editor-overview-head > b {
  color: #1594a8;
  font-size: 10px;
}

.editor-overview-head label {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.editor-overview-head input {
  width: 100%;
  accent-color: #21a9bd;
}

.editor-overview-reset {
  min-height: 30px;
  border: 1px solid rgba(21,148,168,.28);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: #087084;
  font-size: 9px;
  font-weight: 900;
  touch-action: manipulation;
}

.editor-overview-reset span { margin-left: 3px; }

.editor-overview-wrap {
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid rgba(39, 31, 25, .12);
  background: #f8f5ee;
  touch-action: pan-y;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
}

.editor-overview-wrap.is-zoomed {
  touch-action: none;
  cursor: grab;
}

.editor-overview-wrap.is-panning { cursor: grabbing; }
}

.editor-overview-modes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.editor-overview-modes button {
  min-height: 32px;
  min-width: 0;
  border: 1px solid rgba(39, 31, 25, .14);
  border-radius: 6px;
  background: #fff;
  color: #5b5149;
  font-size: 10px;
  font-weight: 800;
}

.editor-overview-modes button.active {
  border-color: #1594a8;
  background: #dff4f6;
  color: #087084;
  box-shadow: inset 0 0 0 1px rgba(21, 148, 168, .12);
}

.editor-overview-pane {
  min-width: 0;
  overflow: hidden;
}

.editor-overview-pane > small {
  display: block;
  padding: 6px 7px 4px;
  color: #5a6e70;
  font-size: 9px;
  font-weight: 800;
}

.editor-overview-viewport {
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  touch-action: inherit;
}

.editor-overview-media,
.editor-original-pane img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  background: #fff;
  transform-origin: 50% 50%;
  will-change: transform;
  image-rendering: auto;
}

.editor-overview-wrap.is-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
}

.editor-overview-wrap.is-compare .editor-overview-pane {
  overflow: hidden;
  border: 1px solid rgba(39, 31, 25, .1);
  background: #fff;
}

.editor-overview-wrap.is-compare .editor-overview-media { width: 100%; height: auto; }

.editor-color-all i {
  background: #1b9fb0;
}

#editorOverviewCanvas {
  display: block;
  image-rendering: pixelated;
}

.color-audit {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
}

.color-audit.active {
  outline: 2px solid #f06d55;
}

.color-audit img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #fbf7ef;
  image-rendering: pixelated;
}

.color-audit span,
.color-audit b,
.color-audit small {
  display: block;
}

.color-audit i {
  display: block;
  width: 100%;
  height: 20px;
  margin-bottom: 5px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 6px;
}

.color-audit b {
  font-size: 13px;
}

.color-audit small {
  color: #8c8178;
  font-size: 10px;
  font-weight: 800;
}

.align-controls {
  margin-top: 10px;
}

.align-controls button {
  min-height: 42px;
}

.align-controls .primary-btn {
  background: #f5b531;
  color: #3d2a14;
  box-shadow: 0 5px 0 #c8790f, 0 10px 20px rgba(161, 103, 26, .2);
}

#recognizeModal.recognize-locked-size .size-presets {
  display: none;
}

#recognizeModal.recognize-locked-size #supportedSizes {
  display: block;
  margin-top: 8px;
}

#recognizeModal.recognize-locked-size .recognize-fields {
  grid-template-columns: 1fr;
}

#recognizeModal.recognize-locked-size .recognize-fields label:nth-child(1),
#recognizeModal.recognize-locked-size .recognize-fields label:nth-child(2) {
  display: none;
}

/* Recognition always follows the calibrated board. The color count is the only choice. */
#recognizeModal .size-presets,
#recognizeModal .recognize-fields label:nth-child(1),
#recognizeModal .recognize-fields label:nth-child(2),
#recognizeModal .ocr-option {
  display: none;
}

#recognizeModal .recognize-fields {
  grid-template-columns: 1fr;
}

.auto-test-modal {
  width: min(470px, calc(100vw - 28px));
  padding: 24px;
  background: #fff7e8;
  border: 1px solid rgba(226, 148, 64, .34);
}

.auto-test-modal h2 {
  margin: 8px 42px 8px 0;
  color: #3f3025;
  font-size: 22px;
}

.auto-test-modal > p {
  margin: 0;
  color: #766257;
  font-size: 13px;
  line-height: 1.7;
}

.auto-test-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 16px 0;
  padding: 11px 12px;
  border: 1px solid rgba(236, 180, 75, .45);
  border-radius: 8px;
  background: #fff0be;
  color: #765321;
  font-size: 11px;
  line-height: 1.5;
}

.auto-test-note i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: #ef9f2d;
  box-shadow: 0 0 0 4px rgba(239, 159, 45, .16);
}

.auto-test-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.auto-test-actions button {
  min-height: 45px;
  border: 1px solid rgba(182, 117, 48, .28);
  border-radius: 8px;
  background: #fffdf8;
  color: #60472f;
  font-weight: 800;
}

.auto-test-actions .primary-btn {
  border-color: #efab36;
  background: #f6b93c;
  color: #4b3318;
  box-shadow: 0 4px 0 #d48b1f;
}

.text-action {
  display: block;
  margin: 14px auto 0;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  color: #98785a;
  font-size: 12px;
}

@media (max-width: 560px) {
  .auto-test-modal { padding: 20px; }
  .auto-test-modal h2 { font-size: 20px; }
}

/* An alignment-only project is a single source-image view by default. */
.board-image-source .board-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.board-image-source .source-preview {
  width: min(82vw, 82vh);
  height: min(82vw, 82vh);
  max-width: 100%;
  max-height: 100%;
  background: #fff;
  image-rendering: auto;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 560px) {
  .stage {
    padding: 54px 5px 76px;
  }

  .locked .unlock-btn {
    left: auto;
    right: 10px;
    top: 48px;
    bottom: auto;
  }

  .locked.lock-peek .unlock-btn,
  .locked.lock-peek .fullscreen-btn,
  .locked.lock-peek .place-image-btn,
  .locked.lock-peek .overview-btn {
    opacity: 0;
    pointer-events: none !important;
    transform: translateX(28px);
  }

  .locked .fullscreen-btn {
    right: 10px;
    top: 92px;
    bottom: auto;
  }

  .place-image-btn {
    right: 10px;
    top: 136px;
    bottom: auto;
  }

  .overview-btn {
    right: 10px;
    top: 180px;
    bottom: auto;
  }

  .locked .fullscreen-btn,
  .locked .place-image-btn,
  .locked .overview-btn,
  .locked .board-page-switcher {
    display: none !important;
  }

  .board-page-switcher {
    right: 10px;
    top: 224px;
    grid-template-columns: repeat(2, 44px);
  }

  .board-page-switcher .page-more-list {
    width: 95px;
  }

  .board-work-section .workbench-actions {
    grid-template-columns: 1fr 1fr;
  }

  .board-work-section .view-switch {
    grid-column: 1 / -1;
  }

  .board-size-inline {
    grid-template-columns: 1fr 1fr;
  }

  .board-size-inline span {
    grid-column: 1 / -1;
  }

  .step-modal.crop-modal,
  .step-modal.crop-modal.open {
    left: 6px;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: auto;
    height: auto;
    max-height: none;
    padding: 10px;
    border-radius: 18px;
    transform: none !important;
  }

  .step-modal.crop-modal > p {
    display: none;
  }

  .step-modal.crop-modal canvas {
    min-height: 0;
  }

  #cropModal.step-modal canvas {
    height: calc(100vh - 154px);
  }

  #alignModal.step-modal canvas {
    height: calc(100vh - 254px);
  }

  .align-mode-switch {
    max-width: none;
    margin: 6px 0;
  }

  .align-size-presets {
    gap: 5px;
    margin-bottom: 7px;
  }

  .align-size-presets button {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .align-quick-panel {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 7px;
    padding: 8px;
  }

  .align-nudge-row,
  .align-step-row,
  .align-target-row {
    justify-content: center;
    gap: 5px;
  }

  .align-nudge-row button,
  .align-step-row button,
  .align-target-row button {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .align-target-row button {
    width: auto;
    min-width: 68px;
  }

  .align-step-row strong {
    min-width: 68px;
    font-size: 16px;
  }

  .align-step-row small {
    margin-left: 2px;
    font-size: 10px;
  }

  .align-tune-panel {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
  }

  .align-pad,
  .align-size {
    min-height: 118px;
    padding: 8px;
    border-radius: 14px;
  }

  .align-pad {
    grid-template-columns: repeat(3, 36px);
    grid-template-rows: auto repeat(3, 34px);
    gap: 4px;
  }

  .align-pad b,
  .align-size b {
    font-size: 12px;
  }

  .align-pad button,
  .align-size button {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .align-size div {
    gap: 7px;
  }

  .align-size strong {
    min-width: 72px;
    font-size: 19px;
  }

  .align-image-panel {
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
  }

  .compact-image-panel {
    grid-template-columns: 1fr 1fr;
  }

  .compact-image-panel label {
    grid-template-columns: 26px 34px 52px 34px;
  }

  .align-image-panel label {
    gap: 5px;
    font-size: 11px;
  }

  .align-image-panel button {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .align-image-panel b {
    font-size: 12px;
  }

  .align-controls {
    gap: 8px;
  }

  .align-controls button {
    flex: 1;
    min-height: 42px;
  }
}

.cal-pattern {
  --cal-gap: 30px;
  position: relative;
  overflow: hidden;
  width: min(72vw, 260px);
  max-width: 100%;
  height: auto !important;
  aspect-ratio: 1 / 1;
  background-image:
    radial-gradient(circle, #f06d55 0 3px, transparent 3.5px),
    linear-gradient(to right, transparent calc(50% - .35px), rgba(72, 91, 84, .42) calc(50% - .35px), rgba(72, 91, 84, .42) calc(50% + .35px), transparent calc(50% + .35px)),
    linear-gradient(to bottom, transparent calc(50% - .35px), rgba(72, 91, 84, .42) calc(50% - .35px), rgba(72, 91, 84, .42) calc(50% + .35px), transparent calc(50% + .35px));
  background-size: var(--cal-gap) var(--cal-gap), var(--cal-gap) var(--cal-gap), var(--cal-gap) var(--cal-gap);
  background-position: center;
}

.cal-pattern::before,
.cal-pattern::after {
  content: '';
  position: absolute;
  z-index: 1;
  pointer-events: none;
  background: rgba(25, 89, 70, .72);
  box-shadow: 0 0 0 .35px rgba(255, 255, 255, .7);
}

.cal-pattern::before { left: 50%; top: 0; bottom: 0; width: .7px; transform: translateX(-50%); }
.cal-pattern::after { top: 50%; left: 0; right: 0; height: .7px; transform: translateY(-50%); }

.cal-device-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  margin: 12px 0 2px;
  padding: 10px 12px;
  border: 1px solid rgba(66, 132, 110, .24);
  border-radius: 12px;
  background: #eef8f4;
}

.cal-device-card span { grid-row: 1 / 3; align-self: center; color: #39715f; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.cal-device-card b { min-width: 0; overflow: hidden; color: #214d40; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cal-device-card small { color: #648076; font-size: 9px; line-height: 1.4; }

.step-modal.crop-modal canvas {
  display: block;
  align-self: center;
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  min-height: 0;
  object-fit: contain;
}

#cropModal.step-modal canvas {
  max-height: min(72vh, 760px);
  aspect-ratio: 14 / 9;
}

#alignModal.step-modal canvas {
  max-height: min(68vh, 720px);
  aspect-ratio: 1 / 1;
}

.align-quick-panel {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: #fffaf0;
  box-shadow: inset 0 0 0 1px rgba(245, 181, 49, .18);
}

.align-target-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.align-target-row button {
  width: 100%;
  min-width: 0;
  height: 38px;
  border-radius: 12px;
}

.align-nudge-row {
  display: grid;
  grid-template-columns: repeat(4, 42px);
  justify-content: center;
  gap: 7px;
}

.align-nudge-row button {
  width: 42px;
  height: 38px;
  border-radius: 999px;
  background: #ffffff;
  color: #3f342b;
  box-shadow: 0 3px 0 #d89b23, 0 7px 15px rgba(161, 103, 26, .18);
}

.align-step-row {
  display: grid;
  grid-template-columns: auto 40px minmax(76px, 1fr) 40px;
  gap: 7px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: #ffffff;
}

.align-step-row button {
  width: 40px;
  height: 36px;
  border-radius: 999px;
  background: #f5b531;
  box-shadow: 0 3px 0 #d08613;
}

.align-step-row strong {
  min-width: 0;
  font-size: 16px;
}

.align-step-row small {
  grid-column: 1 / -1;
  margin-left: 0;
  text-align: center;
}

.compact-image-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: #fffaf0;
}

.compact-image-panel label {
  grid-template-columns: 28px 38px minmax(64px, 1fr) 38px;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  background: #ffffff;
}

.align-image-panel button {
  width: 38px;
  height: 36px;
  border-radius: 999px;
}

.align-image-panel b {
  text-align: center;
}

@media (max-width: 560px) {
  .step-modal.crop-modal canvas {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
  }

  #cropModal.step-modal canvas {
    max-height: calc(100vh - 154px);
  }

  #alignModal.step-modal canvas {
    max-height: min(calc(100vh - 254px), calc(100vw - 20px));
  }

  .align-quick-panel {
    gap: 6px;
    padding: 8px;
  }

  .align-nudge-row {
    grid-template-columns: repeat(4, 36px);
    gap: 6px;
  }

  .align-nudge-row button,
  .align-step-row button,
  .align-image-panel button {
    width: 36px;
    height: 34px;
  }

  .align-step-row {
    grid-template-columns: auto 36px minmax(62px, 1fr) 36px;
    padding: 7px;
  }

  .compact-image-panel {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
  }

  .compact-image-panel label {
    grid-template-columns: 24px 34px minmax(48px, 1fr) 34px;
    gap: 4px;
    padding: 7px;
  }
}

#alignModal.step-modal {
  width: min(1180px, calc(100vw - 8px));
  padding: 8px;
}

#alignModal.step-modal h2 {
  margin: 2px 36px 2px 0;
  font-size: 16px;
  line-height: 1.15;
}

#alignModal.step-modal .eyebrow,
#alignModal.step-modal > p {
  display: none;
}

#alignModal.step-modal canvas {
  max-height: min(78vh, 820px);
}

#alignModal .align-quick-panel,
#alignModal .compact-image-panel {
  margin-top: 5px;
  padding: 5px;
  gap: 5px;
  border-radius: 10px;
}

#alignModal .align-target-row {
  gap: 5px;
}

#alignModal .align-target-row button {
  height: 30px;
  border-radius: 9px;
  font-size: 12px;
}

#alignModal .align-nudge-row {
  grid-template-columns: repeat(4, 32px);
  gap: 5px;
}

#alignModal .align-nudge-row button,
#alignModal .align-step-row button,
#alignModal .align-image-panel button {
  width: 32px;
  height: 30px;
  font-size: 14px;
  box-shadow: 0 2px 0 #d08613;
}

#alignModal .align-step-row {
  grid-template-columns: auto 32px minmax(58px, 1fr) 32px;
  gap: 5px;
  padding: 5px;
  border-radius: 9px;
}

#alignModal .align-step-row span {
  font-size: 11px;
}

#alignModal .align-step-row strong {
  font-size: 13px;
}

#alignModal .align-step-row small {
  font-size: 9px;
  line-height: 1.1;
}

#alignModal .compact-image-panel label {
  grid-template-columns: 20px 30px minmax(44px, 1fr) 30px;
  gap: 4px;
  padding: 5px;
  border-radius: 9px;
  font-size: 10px;
}

#alignModal .align-image-panel b {
  font-size: 11px;
}

#alignModal .blur-recognition-option {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(202, 139, 32, .28);
  border-radius: 10px;
  background: #fff8e8;
  cursor: pointer;
}

#alignModal .blur-recognition-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #d08613;
}

#alignModal .blur-recognition-option span,
#alignModal .blur-recognition-option strong,
#alignModal .blur-recognition-option small {
  display: block;
}

#alignModal .blur-recognition-option strong {
  font-size: 11px;
  line-height: 1.2;
}

#alignModal .blur-recognition-option small {
  margin-top: 2px;
  color: #766b5e;
  font-size: 9px;
  line-height: 1.2;
}

#alignModal .align-controls {
  margin-top: 5px;
  gap: 6px;
}

#alignModal .align-controls button {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
}

@media (max-width: 560px) {
  #alignModal.step-modal,
  #alignModal.step-modal.open {
    left: 4px;
    right: 4px;
    top: 4px;
    bottom: 4px;
    padding: 6px;
  }

  #alignModal.step-modal h2 {
    margin-bottom: 3px;
    font-size: 15px;
  }

  #alignModal.step-modal canvas {
    max-height: min(calc(100vh - 190px), calc(100vw - 12px));
  }

  #alignModal .align-quick-panel {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  #alignModal .align-target-row {
    grid-column: 1;
  }

  #alignModal .align-nudge-row {
    grid-column: 2;
    grid-template-columns: repeat(4, 28px);
    align-content: center;
  }

  #alignModal .align-step-row {
    grid-column: 1 / -1;
    grid-template-columns: auto 30px minmax(54px, 1fr) 30px;
  }

  #alignModal .align-nudge-row button,
  #alignModal .align-step-row button,
  #alignModal .align-image-panel button {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  #alignModal .compact-image-panel {
    grid-template-columns: 1fr 1fr;
    margin-top: 4px;
    padding: 5px;
  }

  #alignModal .compact-image-panel label {
    grid-template-columns: 18px 28px minmax(40px, 1fr) 28px;
    padding: 4px;
  }

  #alignModal .align-controls button {
    min-height: 32px;
  }

  #alignModal .blur-recognition-option {
    padding: 5px 7px;
  }
}

#cropModal.step-modal {
  width: min(1180px, calc(100vw - 8px));
  padding: 8px;
}

#cropModal.step-modal h2 {
  margin: 2px 36px 3px 0;
  font-size: 16px;
  line-height: 1.15;
}

#cropModal.step-modal .eyebrow,
#cropModal.step-modal > p {
  display: none;
}

#cropModal.step-modal canvas {
  max-height: min(82vh, 880px);
  aspect-ratio: auto;
  border-radius: 10px;
}

#cropRatioNote {
  margin-top: 4px;
  padding: 5px 8px;
  border-radius: 9px;
  font-size: 10px;
  line-height: 1.2;
}

#cropConfirm.primary-btn {
  min-height: 34px;
  margin-top: 0;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.crop-confirm-actions {
  display: grid;
  grid-template-columns: minmax(116px, .78fr) minmax(0, 1.22fr);
  gap: 8px;
  margin-top: 5px;
}

.crop-confirm-actions > button {
  min-height: 34px;
}

#cropBackToAlign {
  border: 1px solid #d8b25b;
  border-radius: 10px;
  background: #fff8e7;
  color: #855f12;
  font-size: 12px;
  font-weight: 800;
}

#cropBackToAlign[hidden] {
  display: none;
}

@media (max-width: 560px) {
  #cropModal.step-modal,
  #cropModal.step-modal.open {
    left: 4px;
    right: 4px;
    top: 4px;
    bottom: 4px;
    padding: 6px;
  }

  #cropModal.step-modal h2 {
    margin-bottom: 3px;
    font-size: 15px;
  }

  #cropModal.step-modal canvas {
    max-height: calc(100vh - 86px);
  }

  #cropRatioNote {
    margin-top: 3px;
    padding: 4px 7px;
    font-size: 9px;
  }

  #cropConfirm.primary-btn {
    min-height: 32px;
    padding: 6px 10px;
  }

  .crop-confirm-actions {
    gap: 6px;
    margin-top: 4px;
  }

  .crop-confirm-actions > button {
    min-height: 32px;
  }
}

/* Text workbench entry and empty-board control grouping. */
.orb-btn {
  width: auto;
  min-width: 72px;
  height: 44px;
  padding: 0 15px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 900;
}

.upload-native-caption {
  display: grid;
  gap: 5px;
  margin-top: 9px;
  color: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.workflow-card input[type="file"] {
  position: relative;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 5px;
  border: 1px solid rgba(39, 31, 25, .16);
  border-radius: 7px;
  background: rgba(255, 255, 255, .94);
  color: #302923;
  font-size: 11px;
  cursor: pointer;
}

.workflow-card.primary input[type="file"] {
  border-color: rgba(255, 255, 255, .7);
}

.empty-board .fullscreen-btn {
  right: 18px;
  top: 104px;
}

.empty-board .board-page-switcher {
  right: 18px;
  top: 150px;
}

/* Per-color recognition audit. */
.cell-audit-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(39, 31, 25, .12);
  border-radius: 8px;
  background: #fff8e8;
}

.recognized-grid-estimate {
  display: grid;
  gap: 3px;
  margin: 10px 0 8px;
  padding: 11px 12px;
  border: 1px solid rgba(33, 181, 202, .38);
  border-radius: 8px;
  background: #edfafd;
  color: #27535a;
}

.recognized-grid-estimate strong {
  color: #1594a8;
  font-size: 22px;
  line-height: 1;
}

.recognized-grid-estimate span {
  font-size: 10px;
  line-height: 1.45;
}

.recognize-back-align {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(33, 181, 202, .35);
  border-radius: 8px;
  background: #fff;
  color: #16798b;
  font-size: 11px;
  font-weight: 900;
}

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

.cell-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.cell-audit-head span {
  color: #8b7b68;
  font-size: 10px;
  font-weight: 800;
}

.cell-audit-head h3 {
  margin: 2px 0 0;
  font-size: 14px;
}

.audit-selected-status {
  flex: none;
  display: grid;
  grid-template-columns: 28px auto;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f5b531;
  color: #352611;
}

.audit-selected-status > i {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(53,38,17,.16);
}

.audit-selected-status span,
.audit-selected-status b,
.audit-selected-status #auditSelectedCount { display: block; min-width: 0; }
.audit-selected-status b { font-size: 11px; line-height: 1.15; }
.audit-selected-status #auditSelectedCount {
  margin-top: 2px;
  color: #5c421d;
  font-size: 10px;
}

.audit-cell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  grid-auto-rows: 30px;
  gap: 4px;
  max-height: 330px;
  overflow: auto;
  padding: 2px;
}

.audit-cell {
  position: relative;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  aspect-ratio: auto;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 3px;
  background-image: var(--audit-preview);
  background-repeat: no-repeat;
  box-shadow: 0 1px 5px rgba(47, 35, 24, .18);
}

.audit-cell.selected {
  border-color: #f06d55;
  box-shadow: 0 0 0 2px #f06d55, 0 5px 12px rgba(240, 109, 85, .28);
}

.audit-cell.selected::before {
  content: '';
  position: absolute;
  z-index: 2;
  right: 0;
  top: 0;
  width: 0;
  height: 0;
  border-top: 10px solid #f06d55;
  border-left: 10px solid transparent;
}

.audit-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 36px auto 36px;
  gap: 6px;
  align-items: center;
  margin-top: 9px;
}

.audit-actions button,
.audit-replace button,
.audit-replace select {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 800;
}

.audit-actions b {
  text-align: center;
  font-size: 10px;
}

.audit-actions button:disabled {
  opacity: .35;
}

.audit-replace {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 1fr;
  gap: 7px;
  margin-top: 8px;
}

.audit-replace button {
  background: #26221f;
  color: #fff;
}

.editor-advanced {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.editor-advanced summary {
  cursor: pointer;
  color: #6f655d;
  font-size: 11px;
  font-weight: 900;
}

.large-grid-note {
  width: min(420px, 80vw);
  padding: 18px;
  color: #756a61;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 560px) {
  .orb-btn {
    right: 12px;
    width: auto;
    min-width: 72px;
    height: 42px;
  }

  .empty-board .fullscreen-btn {
    right: 10px;
    top: 104px;
    bottom: auto;
    min-width: 96px;
  }

  .empty-board .board-page-switcher {
    right: 10px;
    top: 150px;
  }

  .editor-colors {
    max-height: 92px;
  }

  .cell-audit-panel {
    padding: 8px;
  }

  .audit-cell-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    grid-auto-rows: 28px;
    gap: 3px;
    max-height: 42vh;
  }

  .audit-cell {
    min-height: 28px;
    height: 28px;
  }

  .editor-overview-media { max-height: 240px; }

  .audit-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .audit-actions #auditPageText {
    order: 2;
  }
}

/* Prevent iOS/Safari long-press text selection and callout across the app. */
html,
body,
#app,
#app * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#app input,
#app textarea,
#app select,
#app [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

#app img,
#app canvas {
  -webkit-user-drag: none;
  user-drag: none;
}

/* Screen saver keeps only recognized bead colors visible on true black. */
body.screen-saver,
.screen-saver.app,
.screen-saver .display-view,
.screen-saver .stage { background: #000 !important; }
.screen-saver .mini-map,
.screen-saver .zoom-hint,
.screen-saver .danmaku-layer,
.screen-saver .source-preview { display: none !important; }
.screen-saver .board-shell { padding: 0 !important; border-radius: 0 !important; background: #000 !important; box-shadow: none !important; }
.screen-saver #board { border-radius: 0 !important; background: #000 !important; pointer-events: none; }
.screen-saver .screen-saver-btn { display: block !important; z-index: 120 !important; opacity: 1; background: #111 !important; color: #ddd !important; box-shadow: none !important; }
.screen-saver.locked .screen-saver-btn { display: none !important; }
.screen-saver .screen-saver-btn:hover,
.screen-saver .screen-saver-btn:active { opacity: 1; }

/* Phone remote: lightweight recognized bead pattern with pinch zoom and pan. */
.remote-summary > div:first-child {
  min-width: 0;
  overflow: hidden;
}

.remote-preview-thumb {
  position: relative;
  display: grid;
  width: min(100%, 360px);
  height: 176px;
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: #0c0d0c;
  color: #fff;
  isolation: isolate;
}

.remote-preview-thumb[hidden],
.remote-preview-thumb img[hidden],
.remote-preview-large img[hidden],
.remote-preview-large-loading[hidden] {
  display: none !important;
}

.remote-preview-thumb img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080808;
}

.remote-preview-thumb > span {
  position: relative;
  z-index: 1;
  align-self: end;
  width: 100%;
  padding: 26px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
  text-align: left;
  font-size: 13px;
}

.remote-preview-progress {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,.2);
}

.remote-preview-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #f2b632;
  transition: width .25s ease;
}

.remote-preview-progress b {
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.remote-preview-modal {
  width: min(94vw, 760px);
  max-width: none;
}

.remote-preview-modal > p {
  margin-bottom: 10px;
}

.remote-preview-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  color: #6b6259;
  font-size: 12px;
}

.remote-preview-tools button {
  min-height: 32px;
  padding: 5px 14px;
  border: 1px solid rgba(71, 62, 53, .18);
  border-radius: 999px;
  background: #f4efe6;
  color: #302a25;
}

.remote-preview-large {
  position: relative;
  width: 100%;
  height: min(68vh, 720px);
  min-height: 320px;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  border-radius: 14px;
  background: #090909;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}

.remote-preview-large:active { cursor: grabbing; }

.remote-preview-large img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

.remote-preview-large-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 24px;
  color: #eee8dc;
  text-align: center;
}

.remote-preview-large-loading strong { font-size: 14px; }
.remote-preview-large-loading span { color: #aaa39a; font-size: 12px; }
.remote-preview-large-loading > div {
  width: min(62vw, 280px);
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.14);
}
.remote-preview-large-loading i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #f2b632;
  transition: width .25s ease;
}

@media (max-width: 600px) {
  .remote-preview-modal {
    width: calc(100vw - 20px);
    padding: 18px 12px 12px;
  }

  .remote-preview-large {
    height: 68vh;
    min-height: 360px;
    border-radius: 10px;
  }
}
