body {
  font-family: system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-body);
}

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

h1 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* ===== Card ===== */

form.controls {
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 24px 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  overflow: visible;
}

/* ===== Layout ===== */

.row {
  margin: 16px 0;
}

.verb-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.verb-label-row label {
  margin-bottom: 0;
}

.browse-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--button-primary-bg);
  text-decoration: none;
  white-space: nowrap;
}

.browse-inline-link:hover {
  text-decoration: underline;
}

.browse-icon {
  font-size: 0.78rem;
  opacity: 0.85;
}

.learn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.page-title {
  margin: 0;
  text-align: center;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.copyright {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-left: 4px;
  vertical-align: middle;
}

/* ===== Labels ===== */

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-body);
}

label::first-letter {
  margin-right: 4px;
}

.label-icon {
  display: inline-block;
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0.7;
  margin-right: 6px;
  vertical-align: baseline;
}

.secondary-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===== Inputs ===== */

select,
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: #ffffff;
  color: var(--text-main);
  font: inherit;
  font-size: 1rem;
}

select:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* ===== Progress ===== */

.progress-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #dde5ef;
}

.progress-fill {
  height: 100%;
  background: #4a90e2;
  width: 0%;
  transition: width 0.2s ease;
}

.progress-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 54px;
  justify-content: flex-end;
}

.progress-star {
  font-size: 14px;
  color: #f97316;
  line-height: 1;
}

.progress-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

/* ===== Search ===== */

.search-row {
  position: relative;
  z-index: 100;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.search-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-input-row .search-input-wrap {
  flex: 1;
  min-width: 0;
}

.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-row input[type="text"] {
  padding: 12px 14px;
  font-size: 1rem;
  border-color: var(--input-border-soft);
}

.search-suggestions {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  z-index: 50;
}

.search-suggestions.is-visible {
  display: block;
}

.search-suggestion {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: none;
  border-bottom: 1px solid #f3f4f6;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--text-main);
}

.search-suggestion:last-child {
  border-bottom: none;
}

.search-suggestion:hover,
.search-suggestion:focus {
  background: #f8fafc;
  outline: none;
}

.search-suggestion-main {
  font-size: 0.98rem;
}

.field-help {
  margin-top: 6px;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #4b5563;
  font-weight: 500;
}

/* ===== Notice ===== */

.notice {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fffaf5;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #92400e;
  font-size: 0.92rem;
  line-height: 1.35;
}

.notice b {
  font-weight: 600;
}

/* ===== Buttons ===== */

.learn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 150px;

  min-height: 44px;
  padding: 10px 24px;

  border-radius: 999px;
  border: 1px solid #e2e8f0;

  background: #f1f5f9;
  color: #1f2937;

  font-weight: 600;
  font-size: 0.94rem;

  cursor: pointer;

  transition: transform 0.12s ease,
              filter 0.12s ease,
              background 0.12s ease,
              box-shadow 0.12s ease;
}

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 44px;
  padding: 10px 18px;

  border-radius: 999px;
  border: 1px solid #e2e8f0;

  background: #f1f5f9;
  color: #1f2937;

  font-weight: 600;
  font-size: 0.94rem;

  cursor: pointer;
  flex-shrink: 0;

  transition: transform 0.12s ease,
              filter 0.12s ease,
              background 0.12s ease,
              box-shadow 0.12s ease;
}


/* ===== Page header ===== */

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.about-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
}
.about-link:hover { color: #334155; }

/* ===== UI language selector ===== */

.ui-lang-block {
  text-align: center;
  margin: 0 0 14px;
}

.ui-lang-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.ui-lang-pills {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.ui-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: #64748b;
  background: transparent;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.ui-lang-pill:hover { background: #f1f5f9; border-color: #cbd5e1; }
.ui-lang-pill.active { background: #1e3a8a; color: white; border-color: #1e3a8a; }

/* ===== More verbs link ===== */

.more-verbs-link {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  color: #4a90e2;
  text-decoration: none;
  text-align: right;
}
.more-verbs-link:hover { text-decoration: underline; }

.learn-btn.is-primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  border-color: var(--button-primary-bg);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.search-btn.is-primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  border-color: var(--button-primary-bg);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

/* hover */

.search-btn:hover:not(:disabled) {
  background: #dbe3ee;
  transform: translateY(-1px);
}

.learn-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.01);
}

/* disabled */

.learn-btn:disabled,
.search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* loading */

.learn-btn.loading {
  opacity: 0.72;
  filter: grayscale(0.25);
  transform: none;
  box-shadow: none;
}

/* dimmed (when search active) */

.learn-btn.is-dimmed {
  opacity: 0.7;
}
