:root {
  color-scheme: light;
  --md-sys-color-primary: #4E6629;
  --md-sys-color-surface-tint: #4E6629;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #CFEDA1;
  --md-sys-color-on-primary-container: #374D14;
  --md-sys-color-secondary: #586249;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #DDE7C7;
  --md-sys-color-on-secondary-container: #414A32;
  --md-sys-color-tertiary: #396662;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #BCECE6;
  --md-sys-color-on-tertiary-container: #1F4E4A;
  --md-sys-color-error: #BA1A1A;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #FFDAD6;
  --md-sys-color-on-error-container: #93000A;
  --md-sys-color-background: #FAFAEE;
  --md-sys-color-on-background: #1A1C16;
  --md-sys-color-surface: #FAFAEE;
  --md-sys-color-surface-variant: #E1E4D5;
  --md-sys-color-surface-dim: #DADBD0;
  --md-sys-color-surface-bright: #FAFAEE;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #F4F4E9;
  --md-sys-color-surface-container: #EEEFE3;
  --md-sys-color-surface-container-high: #E8E9DE;
  --md-sys-color-surface-container-highest: #E2E3D8;
  --md-sys-color-on-surface: #1A1C16;
  --md-sys-color-on-surface-variant: #45483D;
  --md-sys-color-outline: #75786C;
  --md-sys-color-outline-variant: #C5C8B9;
  --md-sys-color-inverse-surface: #2F312A;
  --md-sys-color-inverse-on-surface: #F1F2E6;
  --md-sys-color-inverse-primary: #B4D088;
  --md-sys-color-shadow: #000000;
  --md-sys-color-scrim: #000000;
  --md-sys-color-success: #4E6629;
  --md-state-hover: rgb(26 28 22 / 0.08);
  --md-state-pressed: rgb(26 28 22 / 0.12);
  --md-elevation-1: 0 1px 2px rgb(26 28 22 / 0.08), 0 1px 3px 1px rgb(26 28 22 / 0.06);
  --md-elevation-2: 0 2px 6px 2px rgb(26 28 22 / 0.08), 0 1px 2px rgb(26 28 22 / 0.08);
  --md-elevation-3: 0 6px 16px 4px rgb(26 28 22 / 0.10), 0 2px 4px rgb(26 28 22 / 0.08);
  --shape-xs: 8px;
  --shape-sm: 12px;
  --shape-md: 18px;
  --shape-lg: 28px;
  --shape-xl: 36px;
  --accent: var(--md-sys-color-primary);
  --bad: var(--md-sys-color-error);
  --good: var(--md-sys-color-success);
  --muted: var(--md-sys-color-on-surface-variant);
  --board-cell: min(9.5vw, 64px);
  --board-line: #75786c;
  --board-surface: #ffffff;
}

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

html {
  min-height: 100%;
  background: var(--md-sys-color-background);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
}

body.is-board-dragging {
  user-select: none;
  -webkit-user-select: none;
}

.hidden {
  display: none !important;
}

md-filled-button,
md-filled-tonal-button,
md-outlined-button {
  font-weight: 700;
  max-width: 100%;
}

md-outlined-text-field {
  width: 100%;
}

md-slider {
  min-width: 0;
}

.app {
  min-height: 100vh;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login__panel {
  width: min(100%, 390px);
  padding: 28px;
  background: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 92%, transparent);
  border: 1px solid rgb(255 255 255 / 0.6);
  border-radius: var(--shape-xl);
  box-shadow: var(--md-elevation-3);
  backdrop-filter: blur(18px);
}

.login h1,
.topbar h1,
.side h2 {
  margin: 0;
}

.login h1,
.topbar h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.92;
  font-weight: 850;
  color: var(--md-sys-color-on-background);
}

.login md-filled-button,
.login md-filled-tonal-button {
  width: 100%;
}

.turnstileMount {
  display: flex;
  justify-content: center;
  min-height: 65px;
  margin: 26px 0 14px;
}

.googleLogin {
  margin-top: 26px;
}

.turnstileMount + .googleLogin {
  margin-top: 0;
}

.guestLogin {
  margin-top: 10px;
}

.languagePicker {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
  font-weight: 800;
}

.languagePicker select {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-md);
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface-container-high);
  font: inherit;
}

.languagePicker--compact {
  min-width: 126px;
  margin-top: 0;
}

.error {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--md-sys-color-error);
  font-weight: 650;
}

.game {
  min-height: 100vh;
  padding: 28px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 20px;
  max-width: 1340px;
  margin: 0 auto 22px;
}

.topbar p {
  width: fit-content;
  margin: 12px 0 0;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
  font-weight: 750;
}

.titleRow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
}

.titleRow .languagePicker {
  width: 160px;
  margin-top: 7px;
}

.controls {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.presets {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.presets md-filled-tonal-button[selected] {
  --md-filled-tonal-button-container-color: var(--md-sys-color-primary);
  --md-filled-tonal-button-label-text-color: var(--md-sys-color-on-primary);
}

.size-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-picks md-filled-tonal-button {
  flex: 1 1 72px;
}

.size-picks md-filled-tonal-button[selected] {
  --md-filled-tonal-button-container-color: var(--md-sys-color-primary);
  --md-filled-tonal-button-label-text-color: var(--md-sys-color-on-primary);
}

.settingsAction__arrow {
  margin-left: 4px;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

.settingsAction.active .settingsAction__arrow {
  transform: rotate(180deg);
}

.advanced-card {
  order: 100;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  width: min(100%, 560px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-8px);
  transform-origin: top right;
  will-change: opacity, transform;
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.2, 0, 0, 1),
    visibility 0s linear 220ms;
}

.advanced-card.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.2, 0, 0, 1),
    visibility 0s;
}

.advanced-card__inner {
  padding: 16px;
  background: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-lg);
  box-shadow:
    0 12px 28px rgb(26 28 22 / 0.16),
    0 3px 8px rgb(26 28 22 / 0.10);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.advanced-header {
  color: var(--md-sys-color-on-surface-variant);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  padding-bottom: 8px;
}

.advanced-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tuning-field--sizes {
  grid-column: 1 / -1;
}

.advanced-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

md-dialog:not([open]) {
  display: none;
}

.tuning-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr 32px;
  align-items: center;
  gap: 12px;
}

.slider-row output {
  text-align: right;
  color: var(--md-sys-color-primary);
}

.primaryAction {
  min-width: 164px;
  --md-filled-button-pressed-container-color: var(--md-sys-color-primary);
  --md-filled-button-hover-container-color: var(--md-sys-color-primary);
  --md-filled-button-focus-container-color: var(--md-sys-color-primary);
  --md-filled-button-pressed-state-layer-color: var(--md-sys-color-on-primary);
  --md-filled-button-pressed-state-layer-opacity: 0.08;
  --md-filled-button-hover-state-layer-opacity: 0.06;
  transition:
    transform 120ms cubic-bezier(0.2, 0, 0, 1),
    box-shadow 160ms ease;
}

.primaryAction:active {
  transform: scale(0.985);
}

.is-board-dragging .controls {
  pointer-events: none;
}

.is-board-dragging .primaryAction,
.is-board-dragging .primaryAction:active {
  --md-filled-button-container-color: var(--md-sys-color-primary);
  --md-filled-button-label-text-color: var(--md-sys-color-on-primary);
  --md-filled-button-hover-state-layer-opacity: 0;
  --md-filled-button-pressed-state-layer-opacity: 0;
  transform: none;
}

.dangerAction {
  --md-outlined-button-label-text-color: var(--md-sys-color-error);
  --md-outlined-button-outline-color: color-mix(in srgb, var(--md-sys-color-error) 54%, var(--md-sys-color-outline-variant));
}

.tuning {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(96px, 168px) 34px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 16px;
  color: var(--md-sys-color-on-surface-variant);
  background: var(--md-sys-color-surface-container-high);
  border: 0;
  border-radius: var(--shape-lg);
  box-shadow: var(--md-elevation-1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  max-width: 100%;
  transition:
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.tuning:hover {
  box-shadow: var(--md-elevation-2);
}

.tuning span {
  font-size: 13px;
  font-weight: 800;
}

.tuning md-slider {
  width: 100%;
  touch-action: none;
}

.tuning output {
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.workspace {
  max-width: 1340px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 22px;
  align-items: start;
}

.boardWrap {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px;
  background: var(--md-sys-color-surface-container-high);
  border: 1px solid rgb(255 255 255 / 0.58);
  border-radius: var(--shape-xl);
  box-shadow: var(--md-elevation-2);
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.board {
  display: grid;
  width: max-content;
  border: 2px solid var(--board-line);
  border-radius: var(--shape-sm);
  overflow: hidden;
  background: var(--board-line);
  gap: 1px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

.cell {
  position: relative;
  width: var(--board-cell);
  height: var(--board-cell);
  display: grid;
  place-items: center;
  background: var(--board-surface);
  color: var(--md-sys-color-on-surface);
  font-size: 20px;
  font-weight: 850;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition:
    background-color 180ms cubic-bezier(0.2, 0, 0, 1),
    outline-color 120ms ease,
    box-shadow 120ms ease;
}

.board.dragging .cell {
  transition: none;
}

.board[data-size="20"] {
  --board-cell: min(4.4vw, 34px);
}

.board[data-size="15"] {
  --board-cell: min(5.9vw, 42px);
}

.board[data-size="15"] .cell {
  font-size: 16px;
}

.board[data-size="20"] .cell {
  font-size: 14px;
}

.board[data-size="26"] {
  --board-cell: min(3.5vw, 28px);
}

.board[data-size="26"] .cell {
  font-size: 12px;
}

.board[data-size="15"] .cell.clue::after,
.board[data-size="20"] .cell.clue::after,
.board[data-size="26"] .cell.clue::after {
  inset: 4px;
}

.cell.clue {
  color: var(--md-sys-color-on-primary-container);
}

.cell.clue::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid color-mix(in srgb, var(--md-sys-color-primary) 38%, var(--md-sys-color-outline));
  border-radius: 50%;
  background: rgb(255 255 255 / 0.64);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.75);
  pointer-events: none;
}

.cell.preview {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: -4px;
  box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent);
}

.cell.invalid {
  outline-color: var(--md-sys-color-error);
}

.cell.filled {
  color: var(--md-sys-color-on-surface);
}

@media (prefers-reduced-motion: no-preference) {
  .game:not(.hidden) .topbar,
  .game:not(.hidden) .boardWrap,
  .game:not(.hidden) .side,
  .login:not(.hidden) .login__panel {
    animation: surfaceEnter 220ms cubic-bezier(0.2, 0, 0, 1);
  }
}

@keyframes surfaceEnter {
  from {
    opacity: 0.92;
    transform: translateY(4px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.side {
  padding: 22px;
  background: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 86%, transparent);
  border: 1px solid rgb(255 255 255 / 0.62);
  border-radius: var(--shape-xl);
  box-shadow: var(--md-elevation-2);
  backdrop-filter: blur(16px);
}

.side h2 {
  font-size: 30px;
  line-height: 1;
}

.side dl {
  margin: 18px 0;
  display: grid;
  gap: 8px;
}

.side dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--shape-md);
  background: var(--md-sys-color-surface-container);
}

.side dt {
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 700;
}

.side dd {
  margin: 0;
  font-weight: 850;
}

.hint {
  margin: 0;
  padding: 14px 16px;
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
  border-radius: var(--shape-lg);
  line-height: 1.42;
  font-weight: 650;
}

.hint + .hint {
  margin-top: 10px;
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
}

.leaderboard {
  margin-top: 18px;
  padding-top: 4px;
}

.leaderboard h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.08;
}

.leaderboard ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: place;
}

.leaderboardGroup {
  padding: 14px;
  border-radius: var(--shape-lg);
  background: var(--md-sys-color-surface-container-low);
}

.leaderboardGroup + .leaderboardGroup {
  margin-top: 12px;
}

.leaderboardGroup h4 {
  margin: 0 0 10px;
  color: var(--md-sys-color-primary);
  font-size: 15px;
  font-weight: 850;
}

.leaderboard li {
  min-height: 48px;
  padding: 9px 10px 9px 46px;
  border-radius: var(--shape-md);
  position: relative;
  color: var(--md-sys-color-on-surface-variant);
  background: var(--md-sys-color-surface-container-lowest);
  cursor: pointer;
  transition: background-color 120ms ease;
}

.leaderboard li:hover {
  background: var(--md-sys-color-surface-container-low);
}

.leaderboard li.empty {
  padding-left: 14px;
  cursor: default;
}

.leaderboard li.empty:hover {
  background: var(--md-sys-color-surface-container-lowest);
}

.leaderboard li::before {
  counter-increment: place;
  content: counter(place);
  position: absolute;
  left: 10px;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: var(--md-sys-color-on-tertiary-container, #2c1600);
  background: var(--md-sys-color-tertiary-container);
  font-size: 12px;
  font-weight: 850;
}

.leaderboard li.empty::before {
  content: none;
}

.leaderboard li span,
.leaderboard li small {
  display: block;
}

.leaderboard li span {
  color: var(--md-sys-color-on-surface);
  font-weight: 850;
}

.leaderboard li small {
  margin-top: 2px;
  font-weight: 700;
}

#statsDialog {
  --md-dialog-container-shape: var(--shape-xl);
}

.stats-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: min(520px, calc(100vw - 72px));
  max-height: min(70vh, 620px);
  overflow: auto;
  padding-top: 8px;
}

.stats-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-radius: var(--shape-lg);
}

.stat-card--unsuccessful {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

.stats-presets-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(72px, auto) minmax(72px, auto);
  gap: 12px;
  padding: 12px 16px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--shape-md);
  align-items: center;
}

.stats-row.header {
  background: transparent;
  padding: 8px 16px;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}

.stats-row span:not(:first-child) {
  text-align: right;
}

.stats-row span:first-child {
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --md-sys-color-primary: #B4D088;
    --md-sys-color-surface-tint: #B4D088;
    --md-sys-color-on-primary: #223600;
    --md-sys-color-primary-container: #374D14;
    --md-sys-color-on-primary-container: #CFEDA1;
    --md-sys-color-secondary: #C0CAAC;
    --md-sys-color-on-secondary: #2B331E;
    --md-sys-color-secondary-container: #414A32;
    --md-sys-color-on-secondary-container: #DDE7C7;
    --md-sys-color-tertiary: #A0D0CA;
    --md-sys-color-on-tertiary: #003734;
    --md-sys-color-tertiary-container: #1F4E4A;
    --md-sys-color-on-tertiary-container: #BCECE6;
    --md-sys-color-error: #FFB4AB;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000A;
    --md-sys-color-on-error-container: #FFDAD6;
    --md-sys-color-background: #12140E;
    --md-sys-color-on-background: #E2E3D8;
    --md-sys-color-surface: #12140E;
    --md-sys-color-surface-variant: #45483D;
    --md-sys-color-surface-dim: #12140E;
    --md-sys-color-surface-bright: #383A32;
    --md-sys-color-surface-container-lowest: #0D0F09;
    --md-sys-color-surface-container-low: #1A1C16;
    --md-sys-color-surface-container: #1E2019;
    --md-sys-color-surface-container-high: #292B23;
    --md-sys-color-surface-container-highest: #33362E;
    --md-sys-color-on-surface: #E2E3D8;
    --md-sys-color-on-surface-variant: #C5C8B9;
    --md-sys-color-outline: #8F9285;
    --md-sys-color-outline-variant: #45483D;
    --md-sys-color-inverse-surface: #E2E3D8;
    --md-sys-color-inverse-on-surface: #2F312A;
    --md-sys-color-inverse-primary: #4E6629;
    --md-sys-color-shadow: #000000;
    --md-sys-color-scrim: #000000;
    --md-sys-color-success: #B4D088;
    --board-line: #8f9285;
    --board-surface: #12140e;
  }
}

@media (max-width: 980px) {
  .game {
    padding: 24px 16px;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .controls {
    justify-content: flex-start;
  }

  .presets {
    justify-content: flex-start;
  }

  .advanced-card {
    left: 0;
    right: auto;
  }

  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --board-cell: min(12vw, 52px);
  }

  .game {
    padding: 24px 12px;
  }

  .login__panel {
    padding: 22px;
    border-radius: var(--shape-lg);
  }

  .login h1,
  .topbar h1 {
    font-size: clamp(42px, 14vw, 58px);
  }

  .topbar {
    margin-bottom: 16px;
  }

  .titleRow {
    align-items: center;
  }

  .titleRow .languagePicker {
    width: min(176px, 100%);
    margin-top: 0;
  }

  .controls {
    gap: 8px;
    max-width: 100%;
  }

  .controls md-outlined-select {
    width: 130px;
  }

  .tuning {
    min-height: 44px;
    grid-template-columns: 72px minmax(96px, 1fr) 30px;
    width: min(286px, 100%);
    padding: 5px 8px 5px 12px;
    gap: 7px;
    border-radius: var(--shape-md);
  }

  .tuning md-slider {
    width: 100%;
  }

  .tuning output {
    min-width: 26px;
    min-height: 26px;
  }

  .board[data-size="15"] {
    --board-cell: 38px;
  }

  .board[data-size="20"] {
    --board-cell: 32px;
  }

  .board[data-size="26"] {
    --board-cell: 28px;
  }

  .boardWrap {
    max-height: min(68vh, 620px);
    max-width: calc(100vw - 24px);
    padding: 12px;
    border-radius: var(--shape-lg);
    scrollbar-width: thin;
  }

  .side {
    padding: 16px;
    border-radius: var(--shape-lg);
  }

  .side h2 {
    font-size: 26px;
  }
}

@media (max-width: 430px) {
  .presets,
  .settingsAction {
    width: 100%;
  }

  .advanced-card {
    width: 100%;
  }

  .presets md-filled-tonal-button {
    flex: 1 1 calc(50% - 4px);
  }

  .advanced-content {
    grid-template-columns: 1fr;
  }

  .controls md-filled-button,
  .controls md-filled-tonal-button,
  .controls md-outlined-button {
    flex: 1 1 auto;
  }

  .primaryAction {
    flex-basis: 100%;
  }
}
