@import "tailwindcss";

@layer base {
  button:not(:disabled),
  [role="button"]:not(:disabled) {
    cursor: pointer;
  }
}

:root {
  --q-bg: #1c1e24;
  --q-bgRaised: #252830;
  --q-bgSunken: #14161b;
  --q-bgHover: #32363f;
  --q-bgPress: #3c4250;
  --q-line: #3a3f4c;
  --q-text: #e7e9ef;
  --q-textMuted: #9aa3b5;
  --q-textFaint: #6e7688;
  --q-accent: #6ea8ff;
  --q-accentInk: #0d1726;
  --q-danger: #ff6b6b;
  --q-warn: #e7c36a;
  --q-select: #6ea8ff;
  --q-vertex: #ffd56a;
  --q-endpoint: #8ee6a8;
  --q-grid: #2c323e;
  --q-canvas: #12141a;
  --q-menu: #2a2e38;
  --q-tooltip: #101218;
  --q-paper: #f4efe4;
  --q-font: "Segoe UI", "SF Pro Text", ui-sans-serif, system-ui, sans-serif;
  --q-display: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --q-letter: "Iowan Old Style", Palatino, Georgia, serif;
  --q-font-size: 13px;
  --q-radius: 8px;
  --q-radius-sm: 5px;
  --q-rail: 56px;
  --q-dock: 312px;
  --q-top: 46px;
  --q-gap: 8px;
  --q-dur-fast: 120ms;
  --q-dur: 200ms;
  --q-dur-slow: 320ms;
  --q-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --q-press: 0.97;
  color-scheme: dark;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--q-bg);
  color: var(--q-text);
  font-family: var(--q-font);
  font-size: var(--q-font-size);
  line-height: 1.45;
}

#quill-root,
.q-shell {
  height: 100dvh;
  min-height: 0;
}

.q-boot {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(180deg, transparent, var(--q-bgSunken) 140%),
    var(--q-bg);
}

.q-boot-lead {
  margin: 0;
  font-family: var(--q-display);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.q-boot-sub {
  margin: 0;
  max-width: 36ch;
  color: var(--q-textMuted);
}

.q-boot-strip {
  display: flex;
  gap: 8px;
}

.q-boot-strip span {
  width: 72px;
  height: 96px;
  border: 2px solid var(--q-line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, #9ec4e4 0 42%, #7d9a62 42% 46%, #e7d7b2 46% 100%);
  box-shadow: 0 10px 24px rgb(0 0 0 / 28%);
}

.q-boot-strip span:nth-child(2) {
  transform: translateY(-6px);
}

.q-boot-strip span:nth-child(3) {
  background:
    linear-gradient(180deg, #9ec4e4 0 38%, #f4efe4 38% 70%, #e7d7b2 70% 100%);
}

.q-shell {
  display: grid;
  position: relative;
  grid-template-columns: var(--q-files, 232px) var(--q-rail) minmax(0, 1fr) var(--q-dock, 320px);
  grid-template-rows: var(--q-top) 34px 42px minmax(0, 1fr) 28px;
  grid-template-areas:
    "top top top top"
    "tabs tabs tabs tabs"
    "opt opt opt opt"
    "files rail stage dock"
    "status status status status";
  background: var(--q-bg);
  overflow: hidden;
  user-select: none;
}

.q-shell input,
.q-shell textarea,
.q-shell .q-code,
.q-editor,
.q-hex {
  user-select: text;
}

.q-shell.is-collapsed .q-dock,
.q-shell.is-files-collapsed .q-files {
  visibility: hidden;
}

.q-top-spacer {
  flex: 1;
}

.q-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: var(--q-gap);
  padding: 0 10px;
  background: var(--q-bgRaised);
  border-bottom: 1px solid var(--q-line);
  min-width: 0;
}

.q-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.q-mark {
  width: 14px;
  height: 14px;
  border-radius: 3px 3px 3px 1px;
  background: var(--q-accent);
  transform: rotate(8deg);
  box-shadow: inset -3px -3px 0 var(--q-bg);
}

.q-word {
  font-family: var(--q-display);
  font-style: italic;
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.q-menubar,
.q-tabs-files,
.q-top-actions,
.q-dock-tabs,
.q-rail {
  display: flex;
  align-items: center;
  min-width: 0;
}

.q-tabbar {
  grid-area: tabs;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  background: var(--q-bgSunken);
  border-bottom: 1px solid var(--q-line);
  min-width: 0;
}

.q-filetab {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  border-radius: 0;
  border-right: 1px solid var(--q-line);
  padding: 0 4px 0 10px;
  max-width: 180px;
}

.q-filetab.is-on {
  background: var(--q-bg);
}

.q-filetab.is-drop {
  box-shadow: inset 2px 0 0 var(--q-accent);
}

.q-filetab-name {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.q-tab-x {
  border: 0;
  background: transparent;
  color: var(--q-textFaint);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font: inherit;
  line-height: 1;
}

.q-tab-x:hover {
  background: var(--q-bgHover);
  color: var(--q-text);
}

.q-opt-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--q-textFaint);
  flex: none;
}

.q-menu-btn,
.q-filetab,
.q-tab,
.q-btn,
.q-tool,
.q-status-btn,
.q-chip {
  border: 1px solid transparent;
  background: transparent;
  color: var(--q-text);
  font: inherit;
  border-radius: var(--q-radius-sm);
  transition:
    background var(--q-dur-fast) var(--q-ease),
    color var(--q-dur-fast) var(--q-ease),
    border-color var(--q-dur-fast) var(--q-ease),
    transform var(--q-dur-fast) var(--q-ease);
}

.q-menu-btn,
.q-btn,
.q-filetab,
.q-tab,
.q-chip,
.q-status-btn {
  padding: 4px 8px;
}

.q-menu-btn:hover,
.q-btn:hover,
.q-filetab:hover,
.q-tab:hover,
.q-chip:hover,
.q-tool:hover,
.q-status-btn:hover,
.q-file:hover,
.q-keyrow:hover,
.q-menu-item:hover {
  background: var(--q-bgHover);
}

.q-btn:active,
.q-tool:active,
.q-menu-btn:active,
.q-filetab:active,
.q-tab:active {
  transform: scale(var(--q-press));
  background: var(--q-bgPress);
}

.q-btn-accent {
  background: var(--q-accent);
  color: var(--q-accentInk);
}

.q-btn-accent:hover {
  filter: brightness(1.05);
}

.q-btn-danger {
  color: var(--q-danger);
}

.q-btn-tiny {
  padding: 2px 6px;
  color: var(--q-textMuted);
}

.q-filetab.is-on,
.q-tab.is-on,
.q-chip.is-on,
.q-file.is-on {
  background: var(--q-bgSunken);
  border-color: var(--q-line);
  color: var(--q-text);
}

.q-tab.is-on {
  color: var(--q-accent);
}

.q-opt {
  grid-area: opt;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  background: var(--q-bg);
  border-bottom: 1px solid var(--q-line);
  overflow-x: auto;
  min-width: 0;
}

.q-opt-title {
  font-weight: 600;
  letter-spacing: 0.01em;
  flex: none;
}

.q-opt-note,
.q-note,
.q-lead {
  color: var(--q-textMuted);
  margin: 0;
}

.q-lead {
  color: var(--q-text);
}

.q-slider,
.q-color,
.q-field,
.q-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--q-textMuted);
  flex: none;
}

.q-slider input[type="range"] {
  width: 110px;
  accent-color: var(--q-accent);
}

.q-slider-val {
  min-width: 2.2em;
  color: var(--q-text);
  font-variant-numeric: tabular-nums;
}

.q-color input,
.q-field input,
.q-field select,
.q-field textarea,
.q-stack input,
.q-stack select,
.q-stack textarea {
  background: var(--q-bgSunken);
  color: var(--q-text);
  border: 1px solid var(--q-line);
  border-radius: var(--q-radius-sm);
  font: inherit;
  padding: 4px 6px;
}

.q-color input[type="color"] {
  padding: 0;
  width: 28px;
  height: 22px;
  border: 1px solid var(--q-line);
  background: transparent;
}

.q-rail {
  grid-area: rail;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--q-bgRaised);
  border-right: 1px solid var(--q-line);
  overflow: auto;
}

.q-tool {
  width: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--q-textMuted);
  position: relative;
}

.q-tool.is-on {
  color: var(--q-accent);
  background: var(--q-bgSunken);
}

.q-tool.is-on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--q-accent);
}

.q-ico {
  display: flex;
}

.q-key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 12px;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--q-textFaint);
  line-height: 1;
}

.q-key-inner {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.q-mod {
  display: inline-flex;
  width: 11px;
  height: 11px;
}

.q-mod svg {
  width: 11px;
  height: 11px;
  display: block;
}

.q-tool.is-on .q-key {
  color: var(--q-accent);
}

.q-stage {
  grid-area: stage;
  position: relative;
  min-width: 0;
  min-height: 0;
  background: var(--q-canvas);
  touch-action: none;
}

.q-svg,
.q-svg svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.q-variants {
  display: none;
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  gap: 6px;
  align-items: center;
  padding: 4px;
  background: color-mix(in srgb, var(--q-bgRaised) 88%, transparent);
  border: 1px solid var(--q-line);
  border-radius: var(--q-radius);
  backdrop-filter: blur(8px);
}

.q-variants.is-on {
  display: flex;
}

.q-var-label {
  color: var(--q-textFaint);
  padding: 0 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.q-editor {
  display: none;
  position: absolute;
  z-index: 4;
  min-width: 120px;
  background: var(--q-paper);
  color: #1a1c22;
  border: 1px solid var(--q-accent);
  border-radius: 4px;
  font-family: var(--q-letter);
  padding: 2px 6px;
}

.q-files {
  grid-area: files;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--q-bgRaised);
  border-right: 1px solid var(--q-line);
  overflow: hidden;
}

.q-files-body,
.q-props,
.q-dock-body {
  overflow: auto;
  min-height: 0;
}

.q-files-body {
  padding: 8px;
}

.q-side-head {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-bottom: 1px solid var(--q-line);
  flex: none;
}

.q-side-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--q-textFaint);
}

.q-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  height: auto;
}

.q-tree-folder {
  margin: 8px 0 2px;
  color: var(--q-textFaint);
}

.q-tree-folder summary {
  cursor: pointer;
  padding: 4px;
  list-style-position: inside;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.q-tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--q-radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
}

.q-tree-item.is-nested {
  padding-left: 22px;
  color: var(--q-textMuted);
}

.q-tree-item.is-on,
.q-layer.is-on {
  background: var(--q-bgSunken);
}

.q-tree-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.q-resizer {
  position: absolute;
  z-index: 3;
  background: transparent;
}

.q-resizer-files {
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
}

.q-resizer-dock {
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
}

.q-resizer-props {
  left: 0;
  right: 0;
  height: 6px;
  cursor: row-resize;
  position: relative;
  flex: none;
}

.q-resizer:hover {
  background: var(--q-accent);
}

.q-props {
  height: var(--q-props, 230px);
  flex: none;
  border-bottom: 1px solid var(--q-line);
  padding: 8px 12px 12px;
  overflow: auto;
}

.q-layer {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  padding: 4px;
  border-radius: var(--q-radius-sm);
}

.q-layer.is-child {
  opacity: 0.95;
}

.q-tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  height: auto;
}

.q-tree-scroll {
  overflow: visible;
  min-height: 0;
  flex: none;
}

.q-file-ico,
.q-chev {
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-flex;
  color: var(--q-textMuted);
}

.q-chev {
  width: 18px;
  height: 18px;
}

.q-file-ico svg,
.q-chev svg {
  width: 100%;
  height: 100%;
  display: block;
}

.q-seg {
  display: flex;
  gap: 6px;
}

.q-tree-item.is-drop,
.q-layer.is-drop {
  outline: 1px solid var(--q-accent);
}

.q-swatch-btn {
  width: 28px;
  height: 22px;
  border: 1px solid var(--q-line);
  border-radius: 4px;
  padding: 0;
}

.q-swatch.is-none,
.q-swatch-btn.is-none {
  background:
    linear-gradient(135deg, transparent 46%, #c4544a 47%, #c4544a 53%, transparent 54%),
    repeating-conic-gradient(#c8c2b8 0% 25%, #fff 0% 50%) 50% / 8px 8px !important;
}

.q-alpha {
  width: 100%;
  accent-color: var(--q-accent);
}

.q-pop,
.q-menu-panel {
  background: var(--q-bgRaised);
  border: 1px solid var(--q-line);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 28%);
  z-index: 40;
}

.q-pop {
  position: fixed;
  width: 220px;
}

.q-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 200px;
}

.q-sv {
  position: relative;
  height: 120px;
  border-radius: 6px;
  touch-action: none;
}

.q-sv-cur {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.q-hue {
  width: 100%;
  accent-color: var(--q-accent);
}

.q-hex {
  width: 100%;
  font: inherit;
  background: var(--q-bg);
  color: var(--q-text);
  border: 1px solid var(--q-line);
  border-radius: 4px;
  padding: 4px 6px;
}

.q-btn-wide {
  justify-content: flex-start;
  text-align: left;
}

.q-layer-thumb {
  height: 28px;
  background: var(--q-paper);
  border-radius: 3px;
  overflow: hidden;
}

.q-layer-thumb svg {
  width: 100%;
  height: 100%;
}

.q-eye {
  border: 0;
  background: transparent;
  color: var(--q-textMuted);
  font: inherit;
  width: 28px;
  height: 28px;
}

.q-sheet {
  width: min(960px, calc(100vw - 32px));
  max-height: min(86dvh, 920px);
}

.q-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.q-sheet-body {
  overflow: auto;
  min-height: 0;
  padding-right: 4px;
}

.q-menu-item.is-on {
  background: var(--q-bgHover);
}

.q-dock {
  grid-area: dock;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--q-bgRaised);
  border-left: 1px solid var(--q-line);
}

.q-dock-tabs {
  overflow-x: auto;
  gap: 2px;
  padding: 6px 6px 0;
  flex: none;
}

.q-tab {
  flex: none;
  color: var(--q-textMuted);
}

.q-dock-body {
  overflow: auto;
  padding: 12px;
  min-height: 0;
  flex: 1;
}

.q-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q-stack h3 {
  margin: 8px 0 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--q-textFaint);
  font-weight: 600;
}

.q-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.q-row.is-on .q-row-name {
  color: var(--q-accent);
}

.q-row-name,
.q-file,
.q-keyrow,
.q-pal-card {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
}

.q-row-name {
  flex: 1;
  padding: 4px;
  border-radius: var(--q-radius-sm);
}

.q-file,
.q-keyrow {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: var(--q-radius-sm);
  border: 1px solid var(--q-line);
  background: var(--q-bgSunken);
}

.q-file-kind {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  color: var(--q-accent);
  width: 52px;
  flex: none;
}

.q-pal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.q-pal-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: var(--q-radius);
  border: 1px solid var(--q-line);
  background: var(--q-bgSunken);
  min-height: 44px;
}

.q-pal-hit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.q-pal-edit {
  align-self: flex-start;
  border: 1px solid var(--q-line);
  background: transparent;
  color: var(--q-textMuted);
  font: inherit;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  cursor: pointer;
}

.q-pal-edit:hover {
  color: var(--q-accent);
  border-color: var(--q-accent);
}

.q-editbar {
  position: absolute;
  z-index: 6;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 14px;
  border: 1px solid var(--q-line);
  border-radius: 999px;
  background: var(--q-bg);
  color: var(--q-text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  font-size: 13px;
}

.q-pal-card:hover,
.q-pal-card:focus-visible {
  border-color: var(--q-accent);
}

.q-thumb {
  height: 72px;
  background: var(--q-paper);
  border-radius: 4px;
  overflow: hidden;
}

.q-thumb svg {
  width: 100%;
  height: 100%;
}

.q-pal-name {
  font-size: 12px;
}

.q-pal-meta {
  color: var(--q-textFaint);
  font-size: 11px;
}

.q-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.q-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--q-line);
  padding: 0;
}

.q-code,
.q-stack textarea {
  width: 100%;
  resize: vertical;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
}

.q-guide details {
  border-top: 1px solid var(--q-line);
  padding: 8px 0;
}

.q-guide summary {
  cursor: pointer;
  font-weight: 600;
}

.q-guide p {
  white-space: pre-wrap;
  color: var(--q-textMuted);
  margin: 8px 0 0;
}

.q-status {
  grid-area: status;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: var(--q-bgRaised);
  border-top: 1px solid var(--q-line);
  color: var(--q-textMuted);
  min-width: 0;
}

.q-status-main {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.q-status-btn {
  flex: none;
  color: var(--q-textMuted);
}

.q-menu {
  position: fixed;
  z-index: 60;
  min-width: 220px;
  max-width: 320px;
  padding: 6px;
  background: var(--q-menu);
  color: var(--q-text);
  border: 1px solid var(--q-line);
  border-radius: var(--q-radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  animation: q-pop var(--q-dur) var(--q-ease);
}

.q-menu-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--q-radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
}

.q-menu-item.is-disabled {
  color: var(--q-textFaint);
}

.q-menu-key {
  color: var(--q-textFaint);
  font-size: 11px;
}

.q-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--q-line);
}

.q-tip {
  position: fixed;
  z-index: 80;
  max-width: 260px;
  padding: 8px 10px;
  background: var(--q-tooltip);
  color: var(--q-text);
  border: 1px solid var(--q-line);
  border-radius: var(--q-radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity var(--q-dur-fast) var(--q-ease),
    transform var(--q-dur-fast) var(--q-ease);
}

.q-tip.is-on {
  opacity: 1;
  transform: none;
}

.q-modal-back {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: q-fade var(--q-dur) var(--q-ease);
}

.q-modal {
  width: min(420px, 100%);
  background: var(--q-bgRaised);
  color: var(--q-text);
  border: 1px solid var(--q-line);
  border-radius: var(--q-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: q-pop var(--q-dur) var(--q-ease);
}

.q-modal h2 {
  margin: 0;
  font-family: var(--q-display);
  font-weight: 500;
  font-size: 22px;
}

.q-modal-copy {
  margin: 0;
  color: var(--q-textMuted);
}

.q-modal-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.q-modal .q-field {
  flex-direction: column;
  align-items: stretch;
}

.q-modal input,
.q-modal textarea {
  width: 100%;
  background: var(--q-bgSunken);
  color: var(--q-text);
  border: 1px solid var(--q-line);
  border-radius: var(--q-radius-sm);
  font: inherit;
  padding: 8px;
}

.q-radial {
  position: fixed;
  z-index: 70;
  width: 0;
  height: 0;
}

.q-wedge,
.q-radial-hub {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid var(--q-line);
  background: var(--q-menu);
  color: var(--q-text);
  font: inherit;
  animation: q-pop var(--q-dur-fast) var(--q-ease);
}

.q-wedge {
  padding: 8px 12px;
  min-width: 72px;
  min-height: 44px;
}

.q-wedge.is-on {
  background: var(--q-accent);
  color: var(--q-accentInk);
  border-color: transparent;
}

.q-radial-hub {
  padding: 6px 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--q-textFaint);
  pointer-events: none;
}

.q-keyrow.is-on {
  border-color: var(--q-accent);
}

@keyframes q-pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes q-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.q-wedge {
  animation-name: q-fade;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 860px) {
  .q-shell,
  .q-shell.is-collapsed,
  .q-shell.is-files-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 34px 40px minmax(0, 1fr) 52px 28px;
    grid-template-areas:
      "top"
      "tabs"
      "opt"
      "stage"
      "rail"
      "status";
  }

  .q-files,
  .q-dock {
    position: absolute;
    z-index: 5;
    left: 8px;
    right: 8px;
    bottom: 88px;
    height: min(460px, 62dvh);
    width: auto;
    border: 1px solid var(--q-line);
    border-radius: var(--q-radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    visibility: hidden;
    display: flex;
  }

  .q-shell:not(.is-collapsed) .q-dock,
  .q-shell:not(.is-files-collapsed) .q-files {
    visibility: visible;
  }

  .q-files {
    right: auto;
    width: min(300px, 88vw);
  }

  .q-resizer {
    display: none;
  }

  .q-rail {
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid var(--q-line);
    overflow-x: auto;
    padding: 4px;
  }

  .q-tool {
    width: 52px;
    flex: none;
  }

  .q-tool.is-on::before {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 0;
    width: auto;
    height: 2px;
  }

  .q-word {
    font-size: 18px;
  }
}
