*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
}

:root {
  --color-paper: #fbf9f4;
  --color-ink: #2b2a26;
  --color-rule: #e3ddd0;
  --color-accent: #3a6ea5;
  --shadow: rgba(43, 42, 38, 0.12);
}

.TextPrism {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
}

.Header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--color-rule);
  flex-wrap: wrap;
}
.Header-Group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.Header-Divider {
  width: 1px;
  align-self: stretch;
  background: var(--color-rule);
  margin: 2px 4px;
}
.Header-File {
  display: none;
}
.Header-Hint {
  font-size: 12px;
  color: #8a857a;
}

.Button {
  font: inherit;
  font-size: 14px;
  padding: 8px 14px;
  border: 1px solid var(--color-rule);
  border-radius: 999px;
  background: #fff;
  color: var(--color-ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  user-select: none;
}
.Button:hover {
  background: #f3efe6;
}
.Button:active {
  transform: translateY(1px);
}
.Button:disabled {
  opacity: 0.4;
  cursor: default;
}

.Tool {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-rule);
  background: #fff;
  color: var(--color-ink);
  cursor: pointer;
}
.Tool[data-active] {
  background: var(--color-ink);
  color: #fff;
  border-color: var(--color-ink);
}

.Swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s;
}
.Swatch:hover {
  transform: scale(1.12);
}
.Swatch[data-active] {
  border-color: var(--color-ink);
  box-shadow: 0 0 0 2px #fff inset;
}

.Stage {
  flex: 1 1 auto;
  position: relative;
  overflow: auto;
  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-Overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.Board-Highlight {
  pointer-events: none;
  mix-blend-mode: multiply;
}
.Board-Overlay {
  cursor: crosshair;
  touch-action: none;
}
.Board-Handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-accent);
  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;
  text-align: center;
  color: #8a857a;
  padding: 24px;
}
.Empty[data-hidden] {
  display: none;
}
.Empty[data-drop] {
  background: rgba(247, 222, 120, 0.15);
  outline: 2px dashed #d8c97a;
  outline-offset: -12px;
}
.Empty-Title {
  font-size: 17px;
  color: var(--color-ink);
}
.Empty-Text {
  font-size: 14px;
  max-width: 340px;
  line-height: 1.6;
}

.Pick {
  font: inherit;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--color-ink);
  background: var(--color-ink);
  color: #fff;
  cursor: pointer;
}
.Pick:hover {
  background: #44423b;
}

.Status {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--color-ink);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}
.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);
  }
}