#sparkPanel.spark-panel-live.perception-panel {
  top: 88px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%);
  width: min(1120px, calc(100vw - 128px)); max-height: calc(100dvh - 146px - env(safe-area-inset-bottom)); padding: 24px;
}
.perception-panel > .panel-top { margin-bottom: 16px; }
.perception-studio, .perception-viewer, .perception-comparison, .perception-saved { min-width: 0; }
.perception-intro { margin-bottom: 22px; }
#sparkContent .perception-studio h3, #sparkContent .perception-viewer h3 { margin: 0 0 8px; color: var(--ink); font-size: clamp(23px, 2.4vw, 32px); font-weight: 500; letter-spacing: -.04em; line-height: 1.2; }
#sparkContent .perception-studio h4, #sparkContent .perception-viewer h4 { margin: 0 0 10px; color: var(--ink); font-size: 15px; font-weight: 500; }
#sparkContent .perception-studio p, #sparkContent .perception-viewer p { color: var(--panel-copy); line-height: 1.6; }
.perception-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(230px, 1fr); gap: 24px; align-items: start; margin-top: 20px; }
.perception-paper-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--action); }
.perception-paper-caption { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; color: var(--subtle); font-size: 10px; letter-spacing: .03em; }
.perception-paper { display: block; width: 100%; height: auto; aspect-ratio: 1; background: #fafcfd; border-radius: 10px; }
.perception-paper-panel > .perception-paper { border-radius: 0; }
.perception-paper.perception-editable { touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.perception-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; padding: 12px 14px; font-size: 10px; color: var(--subtle); }
.perception-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.perception-legend > span::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2855e8; }
.perception-legend > .perception-base::before { background: #69747e; }
.perception-legend > .perception-red::before { background: #c14666; }
.perception-tools, .perception-switches { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.perception-tools { padding: 12px; border-top: 1px solid var(--line); }
.perception-tool-label { font-size: 11px; color: var(--subtle); margin-right: 4px; }
#sparkContent .perception-button { width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-align: center; margin: 0; white-space: normal; line-height: 1.4; color: var(--ink); }
#sparkContent .perception-tools .perception-button { padding: 8px 10px; font-size: 10px; min-height: 36px; }
#sparkContent .perception-button[aria-pressed="true"] { border-color: var(--ice); color: var(--ice); background: var(--primary); }
.perception-button:disabled { opacity: .4; cursor: default; }
.perception-button > i { display: block; flex: none; border-radius: 100%; background: #5279ff; }
.perception-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.perception-shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 16px 0 12px; }
#sparkContent .perception-shapes .perception-button { position: relative; padding: 0; border-radius: 9px; overflow: hidden; border-width: 2px; background: #fafcfd; }
#sparkContent .perception-shapes .perception-button[aria-pressed="true"] { border-color: #4e76ff; box-shadow: 0 0 0 2px #4e76ff35; opacity: 1; }
.perception-shapes .perception-paper { border-radius: 0; }
.perception-shapes .perception-button > span { position: absolute; bottom: 4px; left: 6px; color: #69747e; font-size: 9px; }
.perception-shapes .perception-button:disabled { opacity: .6; }
.perception-invitation-note { padding: 20px 0; }
.perception-mark { display: block; color: var(--ice); font-size: 32px; margin-bottom: 20px; }
.perception-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
#sparkContent .perception-actions > .perception-button { width: 100%; }
#sparkContent .perception-hint, #sparkContent .perception-storage { font-size: 11px; color: var(--subtle); }
.perception-storage { margin-top: 15px; }
#sparkContent .perception-storage-warning, #sparkContent .perception-error { color: var(--danger, #e6a492); overflow-wrap: anywhere; }
.perception-error { font-size: 12px; line-height: 1.5; }
#sparkContent .perception-visibility, #sparkContent .perception-link, #sparkContent .perception-blend { display: grid; gap: 8px; margin: 0; color: var(--muted); font-size: 11px; }
#sparkContent .perception-visibility select, #sparkContent .perception-link input { width: 100%; min-width: 0; padding: 11px 12px; min-height: 43px; border: 1px solid var(--line); border-radius: 8px; background: var(--input, var(--bg)); color: var(--ink); font: inherit; }
.perception-visibility small { font-size: 10px; line-height: 1.5; color: var(--subtle); }
.perception-copy-status { min-height: 12px; color: var(--ice); font-size: 11px; }
.perception-reset { padding: 12px; background: var(--action); border: 1px solid var(--line); border-radius: 10px; }
.perception-reset > .perception-button { margin: 5px 5px 0 0 !important; }
.perception-switches { margin: 20px 0 16px; }
.perception-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.perception-overlay { max-width: 570px; margin: auto; }
#sparkContent .perception-blend { margin: 16px 0 0; }
#sparkContent .perception-blend input { width: 100%; min-height: 44px; padding: 0; accent-color: #6584ff; }
.perception-comparison-share { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin-top: 24px; }
.perception-comparison-share > .perception-switches { margin: 0; }
.perception-comparison-share > .perception-button { align-self: start; }
.perception-loading { padding: 30px 0; }
.perception-studio [hidden], .perception-viewer [hidden] { display: none !important; }
@media (max-width: 960px) {
  #sparkPanel.spark-panel-live.perception-panel { width: calc(100vw - 56px); padding: 20px; }
  .perception-columns { gap: 18px; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); }
  .perception-shapes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  #sparkPanel.spark-panel-live.perception-panel { top: calc(82px + env(safe-area-inset-top)); left: 12px; right: 12px; transform: none; width: auto; max-height: calc(100dvh - 152px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 14px; }
  .perception-columns { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .perception-shapes { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .perception-pair { gap: 10px; }
  #sparkContent .perception-pair h4 { font-size: 12px; }
  .perception-invitation-note { padding: 6px 0; }
  .perception-mark { display: none; }
  .perception-actions { margin-top: 5px; }
  #sparkContent .perception-visibility select, #sparkContent .perception-link input { font-size: 16px; }
  .perception-paper-caption { padding: 10px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { .perception-studio *, .perception-viewer * { scroll-behavior: auto !important; } }

@media (min-width: 681px) {
  .perception-paper-panel { width: 100%; max-width: min(100%, max(280px, calc(100dvh - 480px))); margin-inline: auto; }
  .perception-saved .perception-columns > .perception-paper { max-width: min(100%, max(300px, calc(100dvh - 320px))); margin-inline: auto; }
}
