.language-dialog {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, var(--demo-width));
  max-width: none;
  max-height: calc(100dvh - 16px);
  margin: 0 auto;
  padding: 16px 16px max(12px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: #191612;
  color: #f5eee1;
}

.language-dialog::backdrop { background: #0009; }

.language-handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: #36322e;
}

.language-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.language-header h2 { font-size: 18px; font-weight: 650; }

.language-close {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #b4a99a;
  font-size: 20px;
  line-height: 1;
}

.language-close:hover { background: #ffffff10; color: #f5eee1; }

.language-options {
  overflow: hidden;
  border-radius: 12px;
  background: #211e1b;
}

.language-options button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 8px 16px;
  color: #f8e8d1;
  font-size: 14px;
  line-height: 1.4;
  text-align: start;
}

.language-options button + button { border-top: 1px solid #fff2; }
.language-options button:hover { background: #ffffff08; }
.language-dialog button:focus-visible { outline: 2px solid #dfc89d; outline-offset: -3px; }

.language-flag {
  display: block;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 50%;
  object-fit: cover;
}

.language-check {
  position: relative;
  display: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(#fff9ef, #af977f);
}

.language-options button[aria-pressed="true"] .language-check { display: block; }

.language-check::after {
  position: absolute;
  top: 6px;
  left: 7px;
  width: 11px;
  height: 7px;
  transform: rotate(-45deg);
  border: solid #1c1916;
  border-width: 0 0 2px 2px;
  content: "";
}
