:root {
  --mdl-primary: #6200ee;
  --mdl-primary-dark: #3700b3;
  --mdl-secondary: #03dac5;
  --mdl-text: #1f1f1f;
  --mdl-surface: #ffffff;
  --mdl-border: rgba(0, 0, 0, 0.08);
  --mdl-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.mdl-surface {
  background: var(--mdl-surface);
  border-radius: 16px;
  box-shadow: var(--mdl-shadow);
  padding: 1rem;
}

.mdl-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 1.5rem;
  border: none;
  border-radius: 999px;
  background: var(--mdl-primary);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.mdl-button:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.mdl-button:focus-visible {
  outline: 3px solid var(--mdl-secondary);
  outline-offset: 2px;
}

.mdl-button--light {
  background: lightgray;
  color: var(--mdl-text);
}

.mdl-button--icon {
  border-radius: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  color: var(--mdl-text);
}

.mdl-button--fab,
.mdl-button--mini-fab {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--mdl-secondary);
  color: #000;
  font-size: 1.4rem;
  box-shadow: var(--mdl-shadow);
}

.mdl-button--mini-fab {
  width: 56px;
  height: 56px;
}

.mdl-js-ripple-effect {
  overflow: hidden;
}

.mdl-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  pointer-events: none;
}

.mdl-ripple.is-active {
  animation: mdl-ripple 0.6s linear;
}

@keyframes mdl-ripple {
  from {
    transform: scale(0);
    opacity: 0.75;
  }
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

.mdl-tabs {
  width: 100%;
}

.mdl-tabs__tab-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mdl-tabs__tab {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  border-radius: 999px;
  background: rgba(98, 0, 238, 0.08);
  color: var(--mdl-primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.mdl-tabs__tab.is-active {
  background: var(--mdl-primary);
  color: #fff;
}

.mdl-tabs__panel {
  display: none;
}

.mdl-tabs__panel.is-active {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brush-chip {
  flex: 1 1 calc(50% - 0.5rem);
  background: #fff;
  color: var(--mdl-text);
  border: 1px solid var(--mdl-border);
  border-radius: 12px;
  padding: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}

.brush-chip.active {
  border-color: var(--mdl-primary);
  box-shadow: 0 0 0 2px rgba(98, 0, 238, 0.2);
}

.mdl-menu {
  position: absolute;
  min-width: 220px;
  background: var(--mdl-surface);
  border-radius: 12px;
  box-shadow: var(--mdl-shadow);
  padding: 0.5rem 0;
  transform-origin: top right;
  transform: scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 120ms ease, opacity 120ms ease;
  z-index: 1200;
}

.mdl-menu.is-visible {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.mdl-menu__item,
.mdl-menu__label {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mdl-menu__item {
  cursor: pointer;
}

.mdl-menu__item:hover {
  background: rgba(98, 0, 238, 0.08);
}

.mdl-menu__item--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.mdl-menu__label {
  font-weight: 600;
  color: var(--mdl-primary-dark);
  cursor: default;
}

.mdl-menu__item button {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
}

.mdl-mini-footer {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}

.mdl-slider {
  width: 100%;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(98, 0, 238, 0.2);
  outline: none;
  position: relative;
}

.mdl-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mdl-primary);
  border: none;
  box-shadow: var(--mdl-shadow);
  cursor: pointer;
}

.mdl-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mdl-primary);
  border: none;
  box-shadow: var(--mdl-shadow);
  cursor: pointer;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--mdl-text);
}

.mdl-tooltip {
  position: absolute;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  transform: translate(-50%, -120%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 100ms ease;
  white-space: nowrap;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after,
.mdl-slider.show-tooltip::after {
  opacity: 1;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  transform: translate(-50%, -110%);
  left: 50%;
  top: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 900;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.control-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--mdl-shadow);
}

.control-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.control-grid > * {
  flex: 1 1 calc(50% - 0.75rem);
}

.control-label {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--mdl-text);
}

.action-dock button {
  font-size: 1.5rem;
}

/* Material Symbols */

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-size: 2rem !important;
}
