:root {
  --lacm-bg: #17181b;
  --lacm-panel: #23252a;
  --lacm-border: #3a3d44;
  --lacm-text: #ffffff;
  --lacm-muted: #c8cbd1;
  --lacm-accent: #ff9418;
  --lacm-accent-hover: #ffab45;
}

.lacm-banner[hidden], .lacm-modal[hidden] { display: none !important; }
.lacm-modal-open { overflow: hidden; }

.lacm-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  background: rgba(23,24,27,.98);
  border-top: 1px solid var(--lacm-border);
  box-shadow: 0 -12px 30px rgba(0,0,0,.24);
  color: var(--lacm-text);
  font-family: Abel, Arial, sans-serif;
}

.lacm-banner__inner {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
}

.lacm-banner__copy { max-width: 720px; }
.lacm-banner h2, .lacm-modal h2 { margin: 0 0 6px; color: #fff; font-size: 24px; line-height: 1.15; font-weight: 700; }
.lacm-banner p, .lacm-modal p { margin: 0; color: var(--lacm-muted); font-size: 16px; line-height: 1.45; }
.lacm-banner a, .lacm-modal a { color: var(--lacm-accent); text-decoration: underline; }

.lacm-banner__actions, .lacm-modal__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lacm-btn, .lacm-open-preferences, .lacm-floating-settings {
  appearance: none;
  border-radius: 8px;
  border: 1px solid var(--lacm-border);
  cursor: pointer;
  font-family: Abel, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 13px 17px;
  transition: .18s ease;
}

.lacm-btn--primary {
  background: var(--lacm-accent);
  color: #151515;
  border-color: var(--lacm-accent);
}
.lacm-btn--primary:hover { background: var(--lacm-accent-hover); border-color: var(--lacm-accent-hover); }
.lacm-btn--ghost { background: #202227; color: #fff; }
.lacm-btn--ghost:hover { background: #2c2f35; }

.lacm-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  padding: 18px;
  font-family: Abel, Arial, sans-serif;
}
.lacm-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.68); }
.lacm-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(780px, calc(100vh - 36px));
  overflow: auto;
  background: var(--lacm-bg);
  color: #fff;
  border: 1px solid var(--lacm-border);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  padding: 28px;
}
.lacm-modal__close {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #292b30;
  color: #fff;
  font-size: 28px;
  line-height: 36px;
  cursor: pointer;
}
.lacm-modal__intro { margin-bottom: 20px !important; padding-right: 34px; }

.lacm-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--lacm-border);
}
.lacm-category strong { font-size: 19px; color: #fff; }
.lacm-category p { font-size: 15px; margin-top: 3px !important; }
.lacm-always-on { white-space: nowrap; color: var(--lacm-accent); font-weight: 700; }

.lacm-switch { position: relative; width: 50px; height: 28px; flex: 0 0 50px; }
.lacm-switch input { opacity: 0; width: 0; height: 0; }
.lacm-switch span { position: absolute; cursor: pointer; inset: 0; background: #555a63; border-radius: 30px; transition: .2s; }
.lacm-switch span:before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.lacm-switch input:checked + span { background: var(--lacm-accent); }
.lacm-switch input:checked + span:before { transform: translateX(22px); }
.lacm-switch input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.lacm-modal__actions { border-top: 1px solid var(--lacm-border); padding-top: 20px; margin-top: 4px; }

.lacm-open-preferences {
  background: transparent;
  color: inherit;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-weight: 400;
  text-decoration: underline;
}
.lacm-open-preferences:hover { color: var(--lacm-accent); }

.lacm-floating-settings {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 2147482999;
  background: #202227;
  color: #fff;
}

@media (max-width: 850px) {
  .lacm-banner__inner { align-items: flex-start; flex-direction: column; gap: 14px; padding: 17px 0; }
  .lacm-banner__actions { width: 100%; justify-content: stretch; }
  .lacm-banner__actions .lacm-btn { flex: 1 1 30%; }
}

@media (max-width: 560px) {
  .lacm-banner__inner { width: min(100% - 24px, 1240px); }
  .lacm-banner h2, .lacm-modal h2 { font-size: 21px; }
  .lacm-banner p, .lacm-modal p { font-size: 15px; }
  .lacm-banner__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .lacm-banner__actions .lacm-btn--primary { grid-column: 1 / -1; }
  .lacm-modal__dialog { padding: 22px 18px; }
  .lacm-category { gap: 12px; }
  .lacm-modal__actions { display: grid; grid-template-columns: 1fr; }
}
