.settingsMobilePage {
  padding-bottom: 24px;
}

.settingsMobilePage.hasBottomBar {
  padding-bottom: 118px;
}

.settingsHeroSlim {
  margin-top: 6px;
  padding: 18px 15px;
  border-radius: 30px;
  border: 1px solid rgba(150, 168, 255, 0.14);
  background:
    radial-gradient(240px 160px at 0% 0%, rgba(141, 178, 255, 0.18), transparent 72%),
    radial-gradient(220px 140px at 100% 0%, rgba(245, 243, 194, 0.10), transparent 74%),
    linear-gradient(180deg, rgba(31, 39, 73, 0.96), rgba(18, 24, 46, 0.98));
  box-shadow: 0 22px 48px rgba(7, 10, 24, 0.26);
}

.settingsHeroBadge {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(245, 243, 194, 0.14);
  background: rgba(245, 243, 194, 0.08);
  color: rgba(245, 243, 194, 0.92);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settingsHeroLine {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.settingsHeroName {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
}

.settingsHeroApi {
  color: rgba(238, 242, 255, 0.86);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
}

.settingsHeroSubtle {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.settingSummaryGrid,
.settingStatusList {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.settingSummaryGrid .settingSummaryCard:nth-child(n + 5) {
  display: none;
}

.settingSummaryCard {
  min-height: 92px;
  border-radius: 20px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  padding: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.settingSummaryLabel {
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settingSummaryValue {
  margin-top: 7px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  color: rgba(247, 249, 255, 0.96);
}

.settingSummaryHint {
  margin-top: 6px;
  color: rgba(191, 201, 232, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.settingsFlowSteps {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settingsFlowStep {
  min-height: 78px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(150, 168, 255, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.settingsFlowLabel {
  color: rgba(245, 248, 255, 0.94);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.settingsFlowHint {
  margin-top: 6px;
  color: rgba(191, 201, 232, 0.72);
  font-size: 11px;
  line-height: 1.5;
}

.settingsHeroQuickRow {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settingsHeroQuickBtn {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.035);
  color: rgba(245, 248, 255, 0.96);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.settingsHeroQuickBtn.primary {
  border-color: rgba(141, 178, 255, 0.18);
  background:
    radial-gradient(180px 120px at 0% 0%, rgba(141, 178, 255, 0.16), transparent 72%),
    linear-gradient(180deg, rgba(141, 178, 255, 0.14), rgba(57, 69, 127, 0.20));
}

.settingsHeroQuickLabel {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.settingsHeroQuickHint {
  color: rgba(191, 201, 232, 0.72);
  font-size: 11.5px;
  line-height: 1.5;
}

.settingPanel {
  margin-top: 18px;
  border-radius: 26px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(28, 36, 66, 0.92), rgba(16, 22, 42, 0.96)),
    rgba(255, 255, 255, 0.03);
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(7, 10, 24, 0.20);
}

.settingPanelCollapsible {
  overflow: hidden;
}

.settingPanelSummary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 16px;
  cursor: pointer;
  list-style: none;
  transition: background 180ms ease;
}

.settingPanelSummary::-webkit-details-marker {
  display: none;
}

.settingPanelSummaryText {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.settingPanelSummaryTitle {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.settingPanelSummaryHint {
  color: rgba(191, 201, 232, 0.68);
  font-size: 12px;
  line-height: 1.45;
}

.settingPanelSummaryRight {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.settingPanelSummaryBadge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(150, 168, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  color: rgba(238, 242, 255, 0.78);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.settingPanelSummaryArrow {
  color: rgba(191, 201, 232, 0.58);
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.settingPanelCollapsible[open] .settingPanelSummaryArrow {
  transform: rotate(90deg);
}

.settingPanelSummary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.settingPanelCollapsible .settingPanelBody {
  padding-top: 0;
}

.settingPanelTitle {
  padding: 16px 16px 6px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.settingPanelBody {
  padding: 4px 14px 14px;
}

.settingStatusLead {
  padding: 8px 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.settingModuleTitle {
  font-size: 14px;
  font-weight: 900;
  color: rgba(245, 248, 255, 0.96);
}

.settingModuleHint {
  margin-top: 4px;
  color: rgba(191, 201, 232, 0.64);
  line-height: 1.45;
  font-size: 12px;
}

.settingSelectBtn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 4px;
  border: none;
  border-top: 1px solid rgba(150, 168, 255, 0.08);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease;
}

.settingSelectBtn:first-child {
  border-top: none;
}

.settingSelectBtn.toggle {
  padding-right: 2px;
}

.settingSelectBtn:hover {
  background: rgba(255, 255, 255, 0.025);
}

.settingSelectMeta {
  min-width: 0;
  flex: 1 1 auto;
}

.settingSelectRight {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.settingSelectValue,
.settingToggleText {
  max-width: 132px;
  color: rgba(238, 242, 255, 0.78);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.settingSelectArrow {
  color: rgba(191, 201, 232, 0.48);
  font-size: 18px;
  line-height: 1;
}

.settingSwitch {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  position: relative;
  flex: 0 0 auto;
  transition: background 180ms ease;
}

.settingSwitch.on {
  background: linear-gradient(90deg, rgba(141, 178, 255, 0.96), rgba(103, 126, 214, 0.88));
}

.settingSwitchDot {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transition: transform 180ms ease;
}

.settingSwitch.on .settingSwitchDot {
  transform: translateX(18px);
}

.settingInputGrid {
  display: grid;
  gap: 10px;
}

.settingInputGrid.dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settingsInlineActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.settingInputCard {
  display: grid;
  gap: 10px;
  padding: 13px;
  border-radius: 20px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
}

.settingInputHead {
  min-width: 0;
}

.settingTextInput {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgba(150, 168, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.04);
  color: rgba(245, 248, 255, 0.96);
  border-radius: 15px;
  padding: 12px 13px;
  min-height: 48px;
  font-size: 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.settingTextInput::placeholder {
  color: rgba(191, 201, 232, 0.36);
}

.settingTextInput:focus-visible {
  border-color: rgba(141, 178, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(141, 178, 255, 0.08);
}

.themePresetGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding-top: 8px;
}

.settingsActionGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding-top: 8px;
}

.settingsActionCard {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  text-align: left;
  display: grid;
  gap: 9px;
  padding: 15px;
  border-radius: 20px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background:
    radial-gradient(180px 120px at 0% 0%, rgba(245, 243, 194, 0.10), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
  color: rgba(245, 248, 255, 0.96);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.settingsActionTitle {
  font-size: 15px;
  font-weight: 900;
}

.settingsActionHint {
  color: rgba(191, 201, 232, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.themePresetCard {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  text-align: left;
  display: grid;
  gap: 9px;
  position: relative;
  overflow: hidden;
  min-height: 182px;
  padding: 15px;
  border-radius: 20px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background:
    radial-gradient(180px 120px at 0% 0%, rgba(141, 178, 255, 0.12), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
  color: rgba(245, 248, 255, 0.96);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.themePresetCard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(190px 120px at 0% 0%, color-mix(in srgb, var(--theme-preset-a, rgba(141, 178, 255, 0.22)) 36%, transparent), transparent 72%),
    radial-gradient(170px 110px at 100% 0%, color-mix(in srgb, var(--theme-preset-b, rgba(245, 166, 198, 0.18)) 30%, transparent), transparent 76%),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-preset-c, rgba(255,255,255,0.06)) 10%, transparent), transparent 60%);
  opacity: 0.96;
  pointer-events: none;
}

.themePresetCard > * {
  position: relative;
  z-index: 1;
}

.settingsActionCard:hover,
.themePresetCard:hover {
  transform: translateY(-1px);
  border-color: rgba(150, 168, 255, 0.18);
  box-shadow: 0 12px 24px rgba(7, 10, 24, 0.18);
}

.themePresetTitle {
  font-size: 15px;
  font-weight: 900;
}

.themePresetMeta {
  color: rgba(214, 223, 255, 0.66);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.themePresetSwatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.themePresetSwatch {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.themePresetHint {
  color: rgba(191, 201, 232, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.settingsBottomBar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(var(--app-shell-fixed-width), var(--settings-shell-max-width));
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(11, 16, 35, 0), rgba(11, 16, 35, 0.96) 34%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.settingsBottomNote {
  margin-bottom: 10px;
  min-height: 18px;
  color: rgba(191, 201, 232, 0.68);
  font-size: 11.5px;
  line-height: 1.5;
}

.settingsBottomActions {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}

.settingGhostBtn,
.settingsSaveBtn {
  min-height: 46px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.settingGhostBtn {
  border: 1px solid rgba(150, 168, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(238, 242, 255, 0.90);
}

.settingsSaveBtn {
  border: 1px solid rgba(141, 178, 255, 0.22);
  background: linear-gradient(180deg, rgba(141, 178, 255, 0.24), rgba(57, 69, 127, 0.34));
  color: rgba(247, 249, 255, 0.98);
  box-shadow: 0 14px 28px rgba(18, 25, 53, 0.24);
}

.settingGhostBtn:hover,
.settingsSaveBtn:hover {
  transform: translateY(-1px);
}

.settingGhostBtn:disabled,
.settingsSaveBtn:disabled {
  opacity: 0.48;
  cursor: default;
  box-shadow: none;
}

@media (max-width: 430px) {
  .settingSummaryGrid,
  .settingStatusList,
  .themePresetGrid,
  .settingInputGrid.dual,
  .settingsBottomActions {
    grid-template-columns: 1fr;
  }

  .settingsFlowSteps,
  .settingsHeroQuickRow {
    grid-template-columns: 1fr;
  }

  .settingSelectBtn {
    align-items: flex-start;
  }

  .settingSelectRight {
    width: 100%;
    justify-content: space-between;
  }

  .settingSelectValue,
  .settingToggleText {
    max-width: none;
    text-align: left;
  }

  .themePresetCard {
    min-height: 0;
    padding: 14px;
    border-radius: 16px;
  }

  .themePresetHint {
    font-size: 11.5px;
  }

  .themePresetSwatches {
    gap: 7px;
  }

  .themePresetSwatch {
    width: 18px;
    height: 18px;
  }
}
