@media (max-width: 767px) {
  @keyframes appTitleFadeMobile {
    0% {
      opacity: 0;
      transform: translate(-50%, -10px);
    }
    20% {
      opacity: 1;
      transform: translate(-50%, 0);
    }
    70% {
      opacity: 1;
      transform: translate(-50%, 0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -10px);
    }
  }

  :root {
    --face-cycle-btn-width: 135px;
    --hand-cycle-btn-width: 105px;
    --hand-color-btn-width: 125px;
    --hand-length-btn-width: 80px;
    --seconds-color-btn-width: 95px;
    --seconds-length-btn-width: 80px;
    --seconds-width-btn-width: 75px;
  }

  #bottom-controls {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    justify-content: space-between;
    padding: 0 20px;
  }

  #app-title {
    top: 50px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    animation: appTitleFadeMobile 7s ease-out 0.5s forwards;
  }

  .bottom-ctrl {
    width: 100px;
    height: 100px;
    font-size: 56px;
  }

  #fullscreen-toggle {
    width: 100px;
    height: 100px;
    font-size: 56px;
    display: flex;
    border: none;
  }

  #settings-panel {
    box-sizing: border-box;
    width: calc(100% - 24px) !important;
    left: 12px !important;
    right: 12px !important;
    top: 2% !important;
    padding: 16px 14px 24px;
    border-radius: 16px;
    max-height: 96vh;
    max-width: calc(100% - 24px) !important;
    overflow-x: hidden;
  }

  .settings-header {
    font-size: 11px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    align-items: center;
    gap: 8px;
  }

  .settings-logo {
    font-size: 11px;
    padding: 4px 10px;
    flex-shrink: 0;
  }

  .settings-title {
    font-size: 11px;
  }

  #settings-close {
    font-size: 16px;
    padding: 5px 9px;
    flex-shrink: 0;
  }

  .settings-section {
    margin-top: 18px;
  }

  .section-title {
    font-size: 10px;
    padding: 12px 12px;
    letter-spacing: 0.1em;
  }

  .settings-section:not(.collapsed) .section-content {
    padding: 0 12px 14px;
    margin-top: 10px;
  }

  .accordion-title {
    padding-right: 34px;
  }

  .accordion-title::after {
    right: 12px;
    font-size: 9px;
  }

  .button-row {
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }

  .cycle-btn,
  .compact-btn {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    height: 38px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    line-height: 38px !important;
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }


  .opacity-btn {
    min-width: 64px !important;
    max-width: 64px !important;
    width: 64px !important;
    height: 36px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
    line-height: 1.2;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    word-break: break-word;
  }

  .swatch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .toggle-row {
    font-size: 12px;
    margin-top: 8px;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    gap: 0;
  }

  .toggle-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    width: 100%;
  }

  .toggle-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #d4af37;
    vertical-align: middle;
  }

  .inline-toggle .toggle-row {
    display: inline-flex;
    width: auto;
  }

  .inline-toggle .toggle-row label {
    width: auto;
  }

  .subsection-label {
    font-size: 9px;
    margin-top: 10px;
    margin-bottom: 8px;
    padding: 3px 7px;
    display: inline-block;
  }

  #bgcolor-control {
    align-items: center;
    gap: 10px;
  }

  #bgcolor-control input[type="range"] {
    max-width: 120px !important;
    height: 24px;
  }

  #face-tint-bg-label {
    font-size: 11px !important;
    margin-top: 4px !important;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
  }

  #face-tint-bg-label:not([style*="display: none"]) {
    display: inline-flex !important;
  }

  #face-tint-bg-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
  }
}