*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0F1623; --bg2: #151E2E; --bg3: #1A2438;
  --cream: #F0EBE1; --cream-muted: #9A927F;
  --gold: #C8A96E; --gold-light: #DFC08A;
  --border: rgba(200,169,110,0.18);
  --green: #5DB884; --red: #E06060; --blue: #7AABFF;
  --radius: 14px;
}
html, body { min-height: 100%; background: var(--bg); color: var(--cream);
  font-family: Georgia, 'Times New Roman', serif; font-weight: 300; -webkit-font-smoothing: antialiased; }
body::before { content: 'Ф'; position: fixed; right: -4vw; top: 50%;
  transform: translateY(-50%); font-size: 52vw;
  color: rgba(200,169,110,0.03); pointer-events: none;
  user-select: none; line-height: 1; z-index: 0; }
.page { position: relative; z-index: 1; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 3rem 1.5rem; }
.eyebrow { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem; font-weight: 500; font-family: Arial, sans-serif; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600; line-height: 1.15; text-align: center;
  margin-bottom: 0.6rem; max-width: 580px; }
.subtitle { font-size: 15px; color: var(--cream-muted); text-align: center;
  margin-bottom: 3rem; line-height: 1.6; max-width: 400px; font-family: Arial, sans-serif; }
.card { width: 100%; max-width: 480px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; position: relative; }
.card::before { content: ''; position: absolute; top: 0; left: 2rem; right: 2rem;
  height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.input-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); font-weight: 500; display: block; margin-bottom: 0.6rem; font-family: Arial, sans-serif; }
input[type="text"] { width: 100%; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(200,169,110,0.22); border-radius: 10px;
  color: var(--cream); font-family: Arial, sans-serif;
  font-size: 17px; font-weight: 300; padding: 0.85rem 1.1rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
input::placeholder { color: var(--cream-muted); opacity: 0.5; }
input:focus { border-color: rgba(200,169,110,0.6); box-shadow: 0 0 0 3px rgba(200,169,110,0.08); }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.6rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider-icon { color: var(--gold); font-size: 18px; opacity: 0.7; }
.result-wrap { min-height: 80px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; }
.result-hint { font-size: 14px; color: var(--cream-muted); opacity: 0.5; transition: opacity 0.3s; font-family: Arial, sans-serif; }
.result-hint.hidden { opacity: 0; }
.result-block { display: none; flex-direction: column; align-items: center; }
.result-block.show { display: flex; animation: fadeUp 0.35s ease forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.result-name { font-size: clamp(2rem, 8vw, 3rem); font-weight: 600;
  color: var(--gold-light); line-height: 1.1; }
.result-meta { font-size: 12px; color: var(--cream-muted); margin-top: 0.5rem; font-family: Arial, sans-serif; }
.source-badge { display: inline-block; font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 20px;
  margin-left: 6px; font-weight: 500; vertical-align: middle; font-family: Arial, sans-serif; }
.src-rules    { background: rgba(122,171,255,0.12); color: var(--blue); }
.src-database { background: rgba(93,184,132,0.15); color: var(--green); }
.correction-wrap { margin-top: 1.4rem; width: 100%; display: none; }
.correction-wrap.show { display: block; animation: fadeUp 0.3s ease forwards; }
.correction-toggle { background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--cream-muted); font-size: 13px; padding: 0.5rem 1rem; cursor: pointer;
  width: 100%; transition: border-color 0.2s, color 0.2s; font-family: Arial, sans-serif; }
.correction-toggle:hover { border-color: var(--gold); color: var(--gold); }
.correction-form { margin-top: 0.8rem; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.correction-form p { font-size: 13px; color: var(--cream-muted); margin-bottom: 0.8rem; font-family: Arial, sans-serif; }
.correction-row { display: flex; gap: 8px; }
.correction-row input { flex: 1; font-size: 15px; padding: 0.7rem 0.9rem; }
.btn-save { background: var(--gold); color: #0F1623; border: none; border-radius: 8px;
  font-family: Arial, sans-serif; font-size: 13px; font-weight: 500;
  padding: 0.7rem 1.2rem; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.btn-save:hover { background: var(--gold-light); }
.save-msg { font-size: 13px; margin-top: 0.6rem; text-align: center; color: var(--green); display: none; font-family: Arial, sans-serif; }
.error-msg { font-size: 13px; color: var(--red); text-align: center; display: none; margin-top: 0.3rem; font-family: Arial, sans-serif; }
.stats { margin-top: 2rem; font-size: 12px; color: var(--cream-muted); opacity: 0.5; text-align: center; font-family: Arial, sans-serif; }
.stats b { color: var(--gold); }
footer { margin-top: 2.5rem; font-size: 12px; color: var(--cream-muted);
  opacity: 0.3; text-align: center; letter-spacing: 0.04em; font-family: Arial, sans-serif; }
@media (max-width: 500px) { .card { padding: 1.5rem 1.25rem; } .correction-row { flex-direction: column; } }