:root {
  --bg: #f3f0e9;
  --bg-deep: #ebe6dc;
  --card: rgba(255, 255, 255, 0.92);
  --text: #181816;
  --muted: #6d6b64;
  --line: #ded9ce;
  --line-strong: #cbc4b6;
  --input: #fbfaf7;
  --accent: #263f36;
  --accent-hover: #1e332b;
  --accent-soft: #edf2ef;
  --good: #176c46;
  --good-bg: #edf7f1;
  --good-line: #c8e5d4;
  --poor: #8a6500;
  --poor-bg: #fff8dc;
  --poor-line: #ead68a;
  --questionable: #a45100;
  --questionable-bg: #fff0df;
  --questionable-line: #e7b77f;
  --bad: #9a3a32;
  --bad-bg: #fbefed;
  --bad-line: #ebcbc6;
  --shadow: 0 30px 80px rgba(51, 45, 34, 0.12), 0 2px 8px rgba(51, 45, 34, 0.04);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 15px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.95) 0, rgba(255,255,255,0) 27rem),
    radial-gradient(circle at 90% 86%, rgba(209, 221, 214, .48) 0, rgba(209, 221, 214, 0) 28rem),
    linear-gradient(145deg, var(--bg), var(--bg-deep));
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

button, input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding:
    max(34px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.checker-card {
  position: relative;
  width: min(100%, 790px);
  background: var(--card);
  border: 1px solid rgba(210, 204, 191, .88);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(26px, 5vw, 48px);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.checker-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), #6f8d80 55%, #b7c7bd);
}

.header { margin-bottom: 34px; }

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .95rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 650px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 7vw, 4.35rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -0.045em;
}

.subtitle {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(.98rem, 2vw, 1.06rem);
  line-height: 1.55;
}

.mode-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  width: fit-content;
  margin-top: 18px;
  padding: 8px 11px;
  border: 1px solid #dbe4df;
  border-radius: 999px;
  background: #f6f9f7;
  color: #41544c;
  font-size: .76rem;
  font-weight: 700;
}

.mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4b8169;
  box-shadow: 0 0 0 4px rgba(75,129,105,.11);
}

.mode-detail {
  color: #738078;
  font-weight: 600;
}

.inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(251,250,247,.72);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field:focus-within {
  border-color: #9aaea4;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(38,63,54,.075);
}

.field-number {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #aaa59a;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.field-label {
  padding-right: 36px;
  color: #4e504b;
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.field input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 3px 0 1px;
  outline: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.2;
}

.field input::placeholder {
  color: #b3afa6;
  opacity: 1;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  margin-top: 14px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  padding: 0 18px 0 21px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(38,63,54,.16);
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.primary-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 12px 30px rgba(38,63,54,.22);
}

.primary-button:active { transform: translateY(1px); }

.button-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  font-size: 1rem;
}

.form-error {
  margin: 10px 3px 0;
  color: var(--bad);
  font-size: .84rem;
  font-weight: 650;
}

.result {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  animation: result-in 260ms ease-out;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.verdict {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.verdict.good {
  background: var(--good-bg);
  border-color: var(--good-line);
  color: var(--good);
}

.verdict.poor {
  background: var(--poor-bg);
  border-color: var(--poor-line);
  color: var(--poor);
}

.verdict.questionable {
  background: var(--questionable-bg);
  border-color: var(--questionable-line);
  color: var(--questionable);
}

.verdict.bad {
  background: var(--bad-bg);
  border-color: var(--bad-line);
  color: var(--bad);
}

.verdict-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.72);
  border: 1px solid currentColor;
  font-size: 1.2rem;
  font-weight: 900;
}

.verdict-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.verdict-text {
  display: block;
  font-size: clamp(1.08rem, 3vw, 1.28rem);
  line-height: 1.2;
}

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

.metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 19px;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-top: 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 5.5vw, 2.45rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}

.metric-value-small { font-size: clamp(1.25rem, 4vw, 1.8rem); }

.span-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  font-size: .86rem;
  font-weight: 800;
}

.section-hint {
  color: var(--muted);
  font-size: .75rem;
}

.span-list {
  display: grid;
  gap: 9px;
}

.span-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 13px;
  background: #f7f6f2;
}

.span-word {
  min-width: 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.span-match {
  min-width: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.03rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.no-span {
  color: var(--muted);
  font-size: .88rem;
}

.page-footer {
  color: #77736b;
  font-size: .72rem;
  letter-spacing: .03em;
}

@media (max-width: 640px) {
  .page-shell {
    place-items: start center;
    align-content: start;
    gap: 0;
    padding: 0;
  }

  .checker-card {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding:
      calc(28px + env(safe-area-inset-top))
      18px
      calc(28px + env(safe-area-inset-bottom));
  }

  .checker-card::before { height: 4px; }
  .header { margin-bottom: 28px; }
  .brand-row { margin-bottom: 22px; }
  h1 { max-width: 340px; }
  .mode-note { border-radius: 16px; }
  .inputs-grid { grid-template-columns: 1fr; }
  .field { padding: 13px 14px; }
  .primary-button { min-height: 56px; }
  .result { margin-top: 26px; padding-top: 26px; }
  .metric { padding: 16px; }
  .span-row { grid-template-columns: minmax(0, 1fr) auto; }
  .detail-row { grid-template-columns: 1fr; gap: 6px; }
  .page-footer { display: none; }
}

@media (max-width: 390px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .span-row { align-items: start; grid-template-columns: 1fr; gap: 7px; }
  .span-match { width: fit-content; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Hiztegi-egiaztapena */
.dictionary-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.78);
  padding: 15px 17px;
}

.dictionary-status.loading {
  color: var(--muted);
}

.dictionary-status.warning {
  border-color: var(--poor-line);
  background: var(--poor-bg);
  color: var(--poor);
}

.dictionary-status.unavailable {
  color: var(--muted);
  background: #f7f6f2;
}

.dictionary-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(255,255,255,.66);
  font-size: .9rem;
  font-weight: 900;
}

.dictionary-copy {
  min-width: 0;
}

.dictionary-title {
  display: block;
  color: currentColor;
  font-size: .86rem;
  line-height: 1.35;
}

.dictionary-message {
  margin-top: 4px;
  color: #6d675b;
  font-size: .78rem;
  line-height: 1.5;
}

.dictionary-word {
  font-weight: 800;
  color: var(--text);
}

.dictionary-sources {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
}

/* Hiztegietako definizioetarako estekak */
.dictionary-links {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 18px;
}

.dictionary-links-heading {
  margin-bottom: 12px;
}

.dictionary-link-list {
  display: grid;
  gap: 10px;
}

.dictionary-link-row {
  display: grid;
  grid-template-columns: minmax(110px, .75fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 13px;
  background: #f7f6f2;
}

.dictionary-link-word {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 8px;
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.dictionary-lemma {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: .72rem;
  font-weight: 750;
}

.dictionary-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.dictionary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  padding: 7px 11px;
  text-decoration: none;
  font-size: .73rem;
  font-weight: 800;
  line-height: 1;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.dictionary-button:hover {
  border-color: #9aaea4;
  background: var(--accent-soft);
}

.dictionary-button:active {
  transform: translateY(1px);
}

.dictionary-button:focus-visible {
  outline: 3px solid rgba(38,63,54,.16);
  outline-offset: 2px;
}

@media (max-width: 540px) {
  .dictionary-link-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .dictionary-buttons {
    justify-content: flex-start;
  }
}

/* Xuxenek lokalean baliozkotzat jotako formak */
.dictionary-status.valid {
  border-color: var(--good-line);
  background: var(--good-bg);
  color: var(--good);
}


/* Xuxen eta hiztegien emaitza beti ikusgai */
.validation-source-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.validation-source-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(255,255,255,.6);
}

.validation-source-word {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
}

.validation-source-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.validation-source-badge,
.validation-source-lemma {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px 8px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  line-height: 1;
}

.validation-source-badge.is-valid {
  border-color: var(--good-line);
  background: var(--good-bg);
  color: var(--good);
}

.validation-source-badge.is-negative {
  color: #746e62;
  background: #f7f6f2;
}

.validation-source-badge.is-unavailable {
  border-style: dashed;
  color: var(--muted);
}

.validation-source-lemma {
  font-weight: 700;
}

.validation-source-note {
  margin-top: 8px;
}

@media (max-width: 540px) {
  .validation-source-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .validation-source-badges {
    justify-content: flex-start;
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -5px 0 25px;
}

.site-nav-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 7px 10px;
  font-size: .73rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.site-nav-link:hover { border-color: #9aaea4; color: var(--accent); }
.site-nav-link.is-current { border-color: var(--accent); background: var(--accent); color: #fff; }

.potokumeak-fields { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; align-items: end; }
.potokumeak-count-field {
  align-self: stretch;
  border: 1px solid #cddbd4;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  padding: 10px 12px;
}
.potokumeak-count-field .field-label { color: var(--accent); font-size: .7rem; letter-spacing: .08em; }
.potokumeak-count-field select {
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 2px 22px 0 0;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.potokumeak-count-field select:focus-visible { outline: 3px solid rgba(38,63,54,.16); outline-offset: 4px; }
.field-help { margin: -6px 0 14px; color: var(--muted); font-size: .82rem; }
.potokumeak-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 10px; }
.potokumeak-actions .primary-button { margin-top: 0; }

.secondary-button {
  min-height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--accent);
  padding: 0 16px;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}
.secondary-button:hover { background: var(--accent-soft); border-color: #9aaea4; }
.secondary-button:disabled, .primary-button:disabled { cursor: wait; opacity: .68; }

.potokumeak-result-heading { margin-bottom: 20px; }
.potokumeak-seed { display: block; margin-top: 4px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 6vw, 3rem); font-weight: 500; letter-spacing: -.035em; }
.potokumeak-words { display: flex; flex-wrap: wrap; gap: 9px; }
.potokumeak-word {
  border: 1px solid #dbe4df;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 9px 13px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
}
.potokumeak-word:hover { border-color: #9aaea4; background: #e2ebe5; }
.potokumeak-word:focus-visible, .site-nav-link:focus-visible, .secondary-button:focus-visible { outline: 3px solid rgba(38,63,54,.16); outline-offset: 2px; }

@media (max-width: 540px) {
  .potokumeak-fields { grid-template-columns: 1fr; }
  .potokumeak-actions { grid-template-columns: 1fr; }
  .secondary-button { min-height: 50px; }
}
/* Errimapp */
.errimapp-setup { text-align: center; padding: 22px 0 8px; }
.errimapp-setup h1, .errimapp-results h2 { margin: 8px 0; font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: -.05em; }
.errimapp-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0; }
.errimapp-rules span { border: 1px solid #dbe4df; border-radius: 999px; background: var(--accent-soft); color: var(--accent); padding: 8px 12px; font-size: .78rem; font-weight: 700; }
.errimapp-topline { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.errimapp-target { display: block; margin-top: 5px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 8vw, 4.4rem); letter-spacing: -.05em; word-break: break-word; }
.errimapp-timer { display: grid; place-items: center; width: 76px; height: 76px; border: 7px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 1.5rem; font-weight: 800; flex: none; }
.errimapp-timer.is-low { border-color: #b13b32; color: #b13b32; }
.errimapp-progress { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 22px 0; }
.errimapp-progress i { display: block; height: 100%; width: 100%; background: var(--accent); transition: width .25s linear; }
.errimapp-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.errimapp-form input { min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 15px; font: inherit; font-size: 1.1rem; }
.errimapp-form input:focus { outline: 3px solid rgba(38,63,54,.16); outline-offset: 2px; }
.errimapp-form .primary-button { margin: 0; min-height: 54px; }
.errimapp-board .field-help { margin: 14px 0 16px; }
.errimapp-finish-button { display: block; width: 100%; margin: 0 0 20px; font-size: .9rem; }
.errimapp-score { margin: 22px 0 12px; color: var(--muted); font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.errimapp-score strong { color: var(--accent); font-size: 2rem; letter-spacing: 0; margin-left: 5px; }
.errimapp-entries { display: flex; flex-wrap: wrap; gap: 8px; min-height: 54px; max-height: 310px; overflow-y: auto; }
.errimapp-entry { border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 11px; background: #fff; font-size: .9rem; }
.errimapp-entry.is-valid { border-color: #94bba5; background: var(--accent-soft); color: var(--accent); }
.errimapp-entry.is-poor { border-color: #d6b65d; background: #fff4c6; color: #725500; }
.errimapp-entry.is-invalid { border-color: #e6b1ac; background: #fff0ee; color: #a4372d; }
.errimapp-entry.is-pending { color: var(--muted); }
.errimapp-entry button { margin-left: 6px; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: 800; text-decoration: underline; }
.errimapp-results { text-align: center; padding: 30px 0 10px; }
.errimapp-result-list { margin: 26px auto; max-width: 560px; text-align: left; }
.errimapp-result-list h3 { margin: 0 0 10px; font-size: 1rem; }
.errimapp-result-words { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.errimapp-result-word { border: 1px solid var(--line); border-radius: 999px; background: #202637; color: var(--text); padding: 8px 11px; font-size: .9rem; text-decoration: none; }
a.errimapp-result-word:hover, a.errimapp-result-word:focus-visible { border-color: var(--accent); color: #fff; background: var(--accent); }
@media (max-width: 540px) { .errimapp-form { grid-template-columns: 1fr; } .errimapp-form .primary-button { min-height: 48px; } .errimapp-timer { width: 62px; height: 62px; font-size: 1.25rem; } }
/* Shared Errimapp visual system */
:root {
  --bg: #12141c;
  --bg-deep: #171a26;
  --card: #1b1f2b;
  --text: #eef1f7;
  --muted: #9aa3b4;
  --line: #2a3040;
  --line-strong: #394156;
  --input: #171b26;
  --accent: #8b8cf5;
  --accent-hover: #a3a4ff;
  --accent-soft: rgba(139, 140, 245, .16);
  --good: #5fd39b;
  --good-bg: #153026;
  --good-line: #265c44;
  --poor: #ffe9a3;
  --poor-bg: #5a4a17;
  --poor-line: #8a7326;
  --questionable: #ffc58c;
  --questionable-bg: #38291d;
  --questionable-line: #765332;
  --bad: #ff8b95;
  --bad-bg: #32191d;
  --bad-line: #5e2a31;
  --shadow: 0 18px 45px rgba(0, 0, 0, .38);
}

body {
  background:
    radial-gradient(850px 490px at 12% -8%, rgba(139,140,245,.14), transparent 58%),
    radial-gradient(720px 430px at 100% 0%, rgba(139,140,245,.07), transparent 58%),
    linear-gradient(160deg, var(--bg), var(--bg-deep));
  background-attachment: fixed;
}

.page-shell {
  display: block;
  width: min(100%, 1048px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 26px 46px;
}

.checker-card {
  width: 100%;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}
.checker-card::before { display: none; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 18px; padding: 0 clamp(4px, 1.2vw, 12px); }
.content-header { margin-bottom: 32px; }
.brand-row { display: block; margin: 0; }
.site-brand { display: block; color: var(--text); font-size: 1.55rem; font-weight: 900; letter-spacing: -1.15px; line-height: 1; text-decoration: none; }
.site-brand span { color: var(--accent); }
.eyebrow { margin-top: 5px; color: var(--muted); font-size: .78rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.site-nav { justify-content: flex-end; gap: 8px; margin: 0; }
.site-nav-link { border-color: var(--line); background: #1d2230; color: var(--muted); padding: 10px 15px; font-size: .78rem; box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: background .15s ease, border-color .15s ease, color .15s ease; }
.site-nav-link:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.site-nav-link.is-current { border-color: var(--accent); background: var(--accent); color: #fff; }

h1, .errimapp-setup h1, .errimapp-results h2 { font-family: inherit; font-size: clamp(1.95rem, 3.4vw, 2.75rem); font-weight: 850; letter-spacing: -1.6px; line-height: 1.1; }
.subtitle { color: var(--muted); }
.mode-note { border-color: var(--line); background: #202637; color: #c2c9d7; }
.mode-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.mode-detail { color: var(--muted); }
.field { border-color: var(--line); background: var(--input); }
.field:focus-within { border-color: var(--accent); background: #1b2030; box-shadow: 0 0 0 4px var(--accent-soft); }
.field-number, .field-label { color: var(--muted); }
.field input { color: var(--text); }
.field input::placeholder { color: #687286; }
.primary-button { width: auto; gap: 12px; min-height: 52px; margin-top: 16px; border-radius: 15px; background: var(--accent); padding: 0 20px; box-shadow: 0 10px 22px rgba(139,140,245,.26); }
.primary-button:hover { background: var(--accent-hover); box-shadow: 0 12px 26px rgba(139,140,245,.35); }
.button-arrow { width: auto; height: auto; background: transparent; }
.form-error { color: var(--bad); }
.result { border-top-color: var(--line); }
.metric, .span-card, .dictionary-links { border-color: var(--line); background: #202637; }
.span-row, .dictionary-link-row { background: #171b26; }
.span-match { background: var(--accent-soft); color: #bdbdff; }
.section-hint, .span-word, .metric-label { color: var(--muted); }
.dictionary-status { border-color: var(--line); background: #202637; }
.dictionary-status.unavailable { background: #202637; }
.dictionary-message { color: var(--muted); }
.dictionary-word, .validation-source-word { color: var(--text); }
.validation-source-row { background: rgba(0,0,0,.16); }
.validation-source-badge, .validation-source-lemma, .dictionary-button { border-color: var(--line); background: #1b2030; color: var(--muted); }
.dictionary-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.secondary-button { min-height: 52px; border-color: var(--line-strong); background: #202637; color: var(--text); }
.secondary-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.potokumeak-count-field { border-color: var(--line); background: #202637; }
.potokumeak-count-field .field-label, .potokumeak-count-field select { color: #bdbdff; }
.potokumeak-word { border-color: var(--line-strong); background: var(--accent-soft); color: #c4c5ff; }
.potokumeak-word:hover { border-color: var(--accent); background: rgba(139,140,245,.25); }
.page-footer { color: #788194; margin: 18px 0 0; text-align: center; }

.errimapp-setup { padding: 38px 0 30px; }
.errimapp-setup .eyebrow { display: inline-block; margin: 0 0 15px; border-radius: 999px; background: var(--accent-soft); color: #aaaaff; padding: 7px 13px; font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.errimapp-setup h1 { max-width: none; font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
.errimapp-rules span { border-color: var(--line); background: #23293a; color: #b9c1d0; }
.errimapp-rules { margin: 25px 0; }
.errimapp-setup .primary-button, .errimapp-results .primary-button { margin-inline: auto; }
.errimapp-history { max-width: 560px; margin: 38px auto 0; border-top: 1px solid var(--line); padding-top: 22px; text-align: left; }
.errimapp-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.errimapp-history h2 { margin: 0; font-size: 1rem; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .85rem; text-decoration: underline; }
.text-button:hover, .text-button:focus-visible { color: var(--text); }
.errimapp-history-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.errimapp-history-list li { margin: 0; }
.errimapp-history-round { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 10px; background: #202637; color: var(--text); cursor: pointer; font: inherit; padding: 10px 12px; text-align: left; }
.errimapp-history-round:hover, .errimapp-history-round:focus-visible { border-color: var(--accent); background: #272d43; }
.errimapp-history-round span { color: var(--muted); font-size: .85rem; text-align: right; }
.errimapp-timer { border-color: var(--accent); color: #c5c6ff; background: #202637; }
.errimapp-progress { background: var(--line); }
.errimapp-progress i { background: var(--accent); }
.errimapp-form input { border-color: var(--line-strong); background: var(--input); color: var(--text); }
.errimapp-form input:focus { outline-color: var(--accent-soft); }
.errimapp-entry { border-color: var(--line); background: #202637; color: var(--text); }
.errimapp-entry.is-valid { border-color: var(--good-line); background: var(--good-bg); color: var(--good); }
.errimapp-entry.is-pending { color: var(--muted); }

@media (max-width: 700px) {
  .page-shell { padding: 14px 14px 30px; }
  .site-header { display: block; margin-bottom: 14px; padding: 0 4px; }
  .brand-row { margin-bottom: 18px; }
  .site-nav { justify-content: flex-start; }
  .site-nav-link { padding: 9px 11px; }
  .checker-card { padding: 22px 18px; }
  .primary-button { width: 100%; }
}