*,
:before,
::before,
:after,
::after {
  box-sizing: border-box;
}

* {
  border: 0;
  border-radius: 0;
  margin: 0;
  outline: 0;
  padding: 0;
}

a,
body,
button,
canvas,
div,
h1,
h2,
h3,
img,
input,
li,
ol,
p,
span,
strong,
svg,
ul {
  -webkit-appearance: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-size: 100%;
  vertical-align: baseline;
}

html,
body {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  -webkit-text-size-adjust: 100%;
  line-height: 1;
}

a {
  background: transparent;
  text-decoration: none;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

svg {
  stroke-width: 0;
}

ol,
ul {
  list-style: none;
}

button {
  background-color: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
}

::-webkit-scrollbar {
  display: none;
}

:root {
  --color-desk: #3a3a3a;
  --color-font: #ededed;
  --color-group-header-font: #9a9a9a;
  --color-input-border: #a5a5a5;
  --color-panel-background: #363636;
  --color-panel-header-background: #323232;
  --color-panel-border: #2e2e2e;
  --color-panel-group-border: #2a2a2a;
  --color-selected: #575757;
  --color-swatch-ring: #2f2f2f;
  --color-accent: #3a6ea5;
  --shadow: rgba(0, 0, 0, 0.5);
}

body {
  background: var(--color-desk);
}

.TextPrism {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--color-desk);
  color: var(--color-font);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
}

.Stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  overflow-x: auto;
  overscroll-behavior-x: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
}

.Board {
  position: relative;
  line-height: 0;
  box-shadow: 0 8px 30px var(--shadow);
  border-radius: 2px;
  isolation: isolate;
}
.Board[data-hidden] {
  display: none;
}
.Board-Image {
  display: block;
  max-width: 100%;
  border-radius: 2px;
}
.Board-Highlight, .Board-Stroke, .Board-Overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.Board-Highlight, .Board-Stroke {
  pointer-events: none;
  mix-blend-mode: multiply;
}
.Board-Overlay {
  cursor: crosshair;
  touch-action: none;
}
.Board-Handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  cursor: ew-resize;
  z-index: 5;
  touch-action: none;
}
.Board-Handle[data-hidden] {
  display: none;
}

.Empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}
.Empty[data-hidden] {
  display: none;
}
.Empty[data-drop] {
  background: rgba(255, 255, 255, 0.06);
  outline: 2px dashed var(--color-input-border);
  outline-offset: -12px;
}
.Empty-Title {
  font-size: 17px;
  color: var(--color-font);
}
.Empty-Text {
  max-width: 340px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-group-header-font);
}

.Pick {
  padding: 10px 20px;
  background: var(--color-selected);
  border: 1px solid var(--color-input-border);
  border-radius: 2px;
  color: var(--color-font);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.Pick:hover {
  border-color: var(--color-font);
}

.Status {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--color-panel-header-background);
  border: 1px solid var(--color-panel-border);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  color: var(--color-font);
  font-size: 13px;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.25s;
  pointer-events: none;
}
.Status[data-show] {
  opacity: 1;
}
.Status-Spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: text-prism-spin 0.7s linear infinite;
}

@keyframes text-prism-spin {
  to {
    transform: rotate(360deg);
  }
}
.TextPrismLogo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 28px;
}
.TextPrismLogo a {
  color: var(--color-font);
  font-family: "Rubik Iso", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 22px;
  line-height: 2;
  text-decoration: none;
}

.PanelControl {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  padding: 0 32px;
}
.PanelControl-Item {
  display: flex;
  align-items: center;
  font-size: 13px;
  line-height: 21px;
  color: var(--color-group-header-font);
  cursor: pointer;
  user-select: none;
}
.PanelControl-Item[data-open] {
  color: var(--color-font);
}

.PanelColumn {
  position: absolute;
  left: 24px;
  top: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.SinglePanel {
  position: static;
  width: max-content;
  background: var(--color-panel-background);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px 8px 8px 8px;
  overflow: hidden;
}
.SinglePanel[data-panel]:not([data-open]) {
  display: none;
}
.SinglePanel[data-float] {
  position: fixed;
}
.SinglePanel-Header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 32px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.SinglePanel-Header:active {
  cursor: grabbing;
}
.SinglePanel-Title {
  display: flex;
  align-items: center;
  height: 32px;
  background: var(--color-panel-header-background);
  border-bottom-right-radius: 12px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-font);
}
.SinglePanel-Title[data-end] {
  padding: 0 16px;
}
.SinglePanel-CloseIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-font);
  cursor: pointer;
}
.SinglePanel-CloseIcon svg {
  width: 9px;
  visibility: hidden;
}
.SinglePanel-CloseIcon:hover svg {
  visibility: visible;
}
.SinglePanel-Main {
  padding: 0;
}

.TextPrism[data-fixed] .SinglePanel {
  position: fixed;
  top: 56px;
  right: 24px;
  left: auto;
}
.TextPrism[data-fixed] .SinglePanel-Header {
  cursor: default;
}

.PanelGroup + .PanelGroup {
  border-top: 1px solid var(--color-panel-group-border);
}
.PanelGroup-Header {
  display: flex;
  height: 28px;
  padding: 9px 12px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-group-header-font);
}

.SelectList {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
}
.SelectList-Item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
  cursor: pointer;
  user-select: none;
}
.SelectList-Item:hover {
  background-color: var(--color-selected);
  border-radius: 2px;
}
.SelectList-Item[data-selected] {
  background-color: var(--color-selected);
  border-radius: 2px;
}
.SelectList-Item:disabled {
  opacity: 0.3;
  cursor: default;
}
.SelectList-Item:disabled:hover {
  background-color: transparent;
}

.ToolHint {
  max-width: 200px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--color-panel-group-border);
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-group-header-font);
}
.ToolHint[data-hidden] {
  display: none;
}

.FileInput {
  display: none;
}

.Palette {
  display: flex;
  flex-direction: column;
}
.Palette-Swatches {
  display: grid;
  grid-template-columns: repeat(5, 20px);
  gap: 8px;
  padding: 16px;
}
.Palette-Swatch {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  cursor: pointer;
}
.Palette-Swatch[data-active]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--color-swatch-ring);
  border-radius: 50%;
  pointer-events: none;
}

.TextBlock {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 260px;
  padding: 16px 18px;
}
.TextBlock h1 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--color-font);
}
.TextBlock p {
  font-size: 13px;
  line-height: 21px;
  color: var(--color-group-header-font);
}
