html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #090b10;
}

.app-shell {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 12px;
  right: 14px;
  left: 14px;
  align-items: flex-start;
  margin: 0;
  pointer-events: none;
}

.topbar > div:first-child {
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: rgba(10, 13, 19, 0.76);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.topbar .eyebrow {
  display: none;
}

.topbar h1 {
  font-size: 0.9rem;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.topbar h1 span {
  margin-left: 5px;
  font-size: 0.72rem;
}

.status-stack {
  gap: 4px;
}

.status-pill {
  min-height: 30px;
  padding: 5px 10px;
  background: rgba(10, 13, 19, 0.78);
  backdrop-filter: blur(12px);
}

.version-line {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(10, 13, 19, 0.66);
}

.workbench {
  display: block;
  width: 100vw;
  height: 100vh;
}

.canvas-panel {
  position: fixed !important;
  inset: 0;
  width: 100vw;
  height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.canvas-frame {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

#paintCanvas {
  width: 100vw;
  height: 100vh;
}

.canvas-hint,
.canvas-quickbar {
  display: none !important;
}

.canvas-floating-actions {
  position: absolute;
  z-index: 45;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.canvas-floating-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 13px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(12, 16, 23, 0.86);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.canvas-floating-button:hover,
.canvas-floating-button.is-active {
  border-color: rgba(115, 162, 255, 0.72);
  background: rgba(38, 70, 128, 0.88);
}

.canvas-floating-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.canvas-floating-button__label {
  font-size: 0.78rem;
  font-weight: 760;
}

.canvas-floating-button__meta {
  max-width: 150px;
  overflow: hidden;
  color: #b8c6e2;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-panel,
.brush-palette {
  position: absolute;
  z-index: 40;
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.settings-panel {
  top: 68px;
  right: 16px;
  width: min(370px, calc(100vw - 24px));
  padding: 14px;
}

.settings-panel[hidden],
.brush-palette[hidden] {
  display: none !important;
}

.floating-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -3px -3px 14px;
  padding: 3px 3px 11px;
  border-bottom: 1px solid var(--line);
  cursor: move;
  touch-action: none;
  user-select: none;
}

.floating-panel__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--accent-strong);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.floating-panel__header h2 {
  margin: 0;
  font-size: 0.9rem;
}

.floating-panel__close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.floating-panel__close:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.floating-panel.is-dragging {
  user-select: none;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.56);
}

.brush-palette {
  top: 68px;
  left: 16px;
  max-height: calc(100vh - 150px);
}

.brush-palette .brush-catalog__list {
  max-height: min(44vh, 430px);
}

.telemetry {
  right: 14px;
  bottom: 14px;
}

@media (max-width: 700px) {
  .topbar h1 span,
  .version-line,
  .telemetry {
    display: none;
  }

  .canvas-floating-actions {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .canvas-floating-button {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
  }

  .settings-panel,
  .brush-palette {
    top: 58px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 125px);
  }

  .brush-palette .brush-catalog__list {
    max-height: min(46vh, 360px);
  }
}
