/* Buttons, chips, cards, sheets, language picker */
.btn {
  border: 0;
  border-radius: 999px;
  min-height: 56px;
  padding: 14px 20px;
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--panel2);
  color: var(--text);
  width: 100%;
}
.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn.ok {
  background: var(--ok);
  color: var(--on-ok);
}
.btn.bad {
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid var(--bad-line);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  font-size: 1rem;
  padding: 10px 18px;
  width: auto;
  min-height: var(--tap);
  align-self: center;
}
.btn:disabled {
  opacity: 0.5;
}
.ib {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  flex: none;
}
.ib svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ib.with-text {
  padding: 0 14px;
  font-size: 0.9rem;
  font-weight: 600;
}
.ib.speaking {
  color: var(--accent-text);
  background: var(--accent-soft);
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  align-self: flex-start;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}
.review {
  font-size: 0.75rem;
  color: var(--accent-text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}
.chips2 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip2 {
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  color: var(--ok);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.85rem;
  white-space: nowrap;
}
.chips {
  display: flex;
  gap: 4px 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.chip {
  min-height: var(--tap);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.9rem;
}
.chip.sel {
  border-color: var(--accent-text);
  color: var(--accent-text);
}
.uipick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
}
.uipick select {
  background: transparent;
  border: 0;
  font-size: 1rem;
  color: var(--text);
  min-height: var(--tap);
  padding: 0 2px;
}
.uipick select option {
  background: var(--panel);
  color: var(--text);
}
/* sheets */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}
.sheet {
  background: var(--panel);
  border-top: 3px solid var(--accent);
  border-radius: 28px 28px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet h2 {
  font-size: 1.5rem;
}
.sheet p {
  margin: 0;
}
.sheet .btn {
  padding: 12px 16px;
  font-size: 1.05rem;
}
.reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  min-height: var(--tap);
  padding: 6px 4px;
}
.switch-row input {
  width: 52px;
  height: 32px;
  accent-color: var(--accent-text);
  flex: none;
}
/* language field + full-screen picker */
.lang-field {
  width: 100%;
}
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}
.lang-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.lang-trigger .pick-native {
  font-size: 1.1rem;
  font-weight: 700;
}
.lang-trigger .pick-eng {
  flex: none;
  font-size: 0.85rem;
  color: var(--dim);
  font-weight: 500;
}
.lang-trigger.skip .pick-native {
  color: var(--dim);
  font-weight: 600;
}
.lang-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--dim);
  border-bottom: 2px solid var(--dim);
  transform: rotate(45deg);
  flex: none;
  margin-right: 4px;
}
body.picker-open {
  overflow: hidden;
}
.overlay.picker-overlay {
  align-items: stretch;
  justify-content: center;
  animation: picker-fade 0.2s ease-out;
}
@keyframes picker-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes picker-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sheet.picker {
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  max-width: 560px;
  border-radius: 0;
  border-top: 0;
  text-align: left;
  gap: 0;
  padding: calc(8px + env(safe-area-inset-top)) 16px 0;
  overflow: hidden;
  background: var(--panel);
  animation: picker-in 0.22s ease-out;
}
@media (min-width: 600px) {
  .overlay.picker-overlay {
    padding: 24px;
    align-items: center;
  }
  .sheet.picker {
    height: min(880px, 100dvh);
    max-height: calc(100dvh - 48px);
    border-radius: 24px;
    border: 1px solid var(--line);
    padding-top: 8px;
  }
}
.pick-head {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: var(--tap);
  margin: 0 -6px;
}
.pick-head h2 {
  flex: 1;
  font-size: 1.15rem;
  margin: 0;
}
.pick-back-icon {
  display: block;
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.pick-search-wrap {
  padding: 8px 0 10px;
  background: var(--panel);
}
.pick-search {
  width: 100%;
  min-height: 52px;
  border-radius: 26px;
  border: 2px solid var(--line);
  background: var(--input);
  padding: 10px 18px;
  font-size: 1.05rem;
  color: var(--text);
}
.pick-search:focus {
  outline: none;
  border-color: var(--accent-text);
}
.pick-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--panel);
}
.pick-group h3 {
  position: sticky;
  top: 0;
  background: var(--panel);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  padding: 10px 4px 6px;
}
.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.pick-row:active,
.pick-row.sel {
  background: var(--accent-soft);
}
.pick-native {
  font-size: 1.1rem;
  font-weight: 600;
}
.pick-eng {
  flex: 1;
  color: var(--dim);
  font-size: 0.9rem;
}
.pick-check {
  color: var(--accent-text);
  font-weight: 800;
  margin-inline-start: auto;
}

.attach {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 4px 0 8px;
  text-align: start;
}
.attach input {
  width: 22px;
  height: 22px;
  flex: none;
}
