:root {
  color-scheme: dark;
  --background: #020817;
  --surface: #071934;
  --surface-2: #0a2144;
  --border: rgba(150, 186, 235, .2);
  --text: #f6f8ff;
  --muted: #9eb1d2;
  --accent: #8ebcff;
  --green: #79e0ae;
  --red: #ff9eaa;
  --warn: #ffe5aa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { background: var(--background); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 84% 4%, rgba(25, 73, 135, .34), transparent 38rem),
    linear-gradient(155deg, #020817, #03122a 65%, #020817);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.telegram-mini-app {
  background: var(--tg-theme-bg-color, var(--background));
  color: var(--tg-theme-text-color, var(--text));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}
a { color: #b9d5ff; }
.virelia-home { position: fixed; z-index: 20; top: 18px; left: 18px; width: 54px; height: 62px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 16px; background: rgba(4, 16, 38, .82); backdrop-filter: blur(14px); }
.virelia-home img { width: auto; height: 50px; object-fit: contain; }
.shell { width: min(960px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 38px; }
.header { display: flex; gap: 28px; align-items: flex-start; justify-content: space-between; margin-bottom: 30px; }
.header h1 { margin: 7px 0 8px; font-size: clamp(2.25rem, 7vw, 4.25rem); letter-spacing: -.055em; line-height: .98; }
.eyebrow { margin: 0; color: var(--accent); text-transform: uppercase; font-size: .75rem; letter-spacing: .13em; font-weight: 800; }
.subtitle { max-width: 720px; margin: 0; color: var(--muted); font-size: 1.03rem; line-height: 1.65; }
.language-switcher { display: flex; gap: 5px; padding: 5px; border: 1px solid var(--border); border-radius: 999px; background: rgba(7, 25, 52, .86); }
.language-switcher a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.language-switcher a.active { background: #dce9ff; color: #06152e; }
.notice { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding: 13px 16px; border: 1px solid rgba(255, 211, 120, .3); border-radius: 14px; color: var(--warn); background: rgba(90, 61, 7, .22); }
.telegram-context { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; padding: 13px 16px; border: 1px solid rgba(121, 224, 174, .28); border-radius: 14px; color: #c9f7df; background: rgba(23, 91, 65, .18); }
.telegram-context span { color: var(--muted); text-align: right; }
.intro-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 24px; border: 1px solid var(--border); border-radius: 22px; background: linear-gradient(135deg, rgba(10, 37, 78, .92), rgba(4, 19, 44, .92)); }
.intro-card h2 { margin: 7px 0 8px; font-size: 1.5rem; }
.intro-card p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.55; }
.privacy-badge { max-width: 230px; padding: 12px 14px; border: 1px solid rgba(121, 224, 174, .28); border-radius: 14px; color: var(--green); background: rgba(23, 91, 65, .18); font-size: .86rem; line-height: 1.4; }
.application-form { display: grid; gap: 18px; margin-top: 20px; }
.form-section { display: grid; grid-template-columns: 44px 1fr; gap: 18px; margin: 0; padding: clamp(19px, 4vw, 28px); border: 1px solid var(--border); border-radius: 22px; background: rgba(5, 22, 48, .82); box-shadow: 0 20px 60px rgba(0, 0, 0, .14); min-width: 0; }
fieldset.form-section { border: 1px solid var(--border); }
.section-number { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--accent); background: rgba(10, 37, 78, .85); font-weight: 900; }
.section-content { min-width: 0; }
.section-content h2 { margin: 3px 0 16px; font-size: clamp(1.18rem, 3vw, 1.5rem); }
.field-help { margin: -6px 0 16px; color: var(--muted); line-height: 1.55; }
label { display: grid; gap: 8px; font-weight: 700; }
label small { color: var(--muted); font-weight: 400; line-height: 1.45; }
input, textarea, select { width: 100%; color: var(--text); border: 1px solid var(--border); border-radius: 13px; background: #061a38; font: inherit; padding: 13px 14px; outline: none; }
textarea { resize: vertical; min-height: 118px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: #8ebcff; box-shadow: 0 0 0 3px rgba(142, 188, 255, .12); }
.choice-list { display: grid; gap: 10px; }
.choice-list-inline { grid-template-columns: repeat(2, minmax(0, 180px)); margin-bottom: 16px; }
.choice-row { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 13px; background: rgba(6, 26, 56, .72); color: var(--text); font-weight: 600; cursor: pointer; }
.choice-row input, .checkbox-row input { width: 20px; height: 20px; margin: 0; padding: 0; accent-color: #8ebcff; }
.confirmation-list { display: grid; gap: 10px; }
.checkbox-row { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 12px; padding: 12px 14px; border: 1px solid rgba(150, 186, 235, .14); border-radius: 13px; color: var(--muted); background: rgba(6, 26, 56, .55); font-weight: 500; line-height: 1.55; cursor: pointer; }
.checkbox-row input { margin-top: 2px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.submit-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 4px 0 2px; }
button[type="submit"] { min-height: 52px; padding: 0 24px; border: 0; border-radius: 13px; color: #041329; background: #dce9ff; font: inherit; font-weight: 800; cursor: pointer; }
button[type="submit"]:disabled { cursor: wait; opacity: .65; }
body.telegram-mini-app #submit-button { display: none; }
.form-status { margin: 0; color: var(--muted); }
.form-status.error { color: var(--red); }
.success-card { margin-top: 20px; padding: 30px; border: 1px solid rgba(121, 224, 174, .3); border-radius: 24px; background: rgba(15, 69, 52, .26); }
.success-card h2 { margin: 7px 0 8px; }
.success-card p:not(.eyebrow) { color: #b9d4c7; }
.success-card strong { display: inline-block; margin-top: 8px; font-size: 1.45rem; letter-spacing: .08em; }
.information-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.information-card { padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: rgba(5, 22, 48, .7); }
.information-card h2 { margin: 0 0 12px; font-size: 1.2rem; }
.information-card p, .information-card li { color: var(--muted); line-height: 1.58; }
.information-card ul { padding-left: 20px; }
.information-card .example { color: #c8dcfb; padding: 10px 12px; border-radius: 11px; background: rgba(10, 37, 78, .65); }
.founder-card { grid-column: 1 / -1; border-color: rgba(255, 211, 120, .24); background: rgba(74, 50, 9, .14); }
footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .84rem; line-height: 1.6; }
.language-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(1, 7, 19, .93); backdrop-filter: blur(18px); }
.language-dialog { width: min(520px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: 26px; text-align: center; background: #071936; box-shadow: 0 30px 100px #000; }
.language-dialog h1 { margin: 8px 0 10px; }
.language-dialog p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.language-crest { height: 90px; width: auto; }
.language-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.language-options button { min-height: 76px; color: var(--text); border: 1px solid var(--border); border-radius: 15px; background: #0a2349; cursor: pointer; }
.language-options strong, .language-options span { display: block; }
.language-options strong { font-size: 1.1rem; }
.language-options span { margin-top: 4px; color: var(--muted); }
html.language-pending #page-content { visibility: hidden; }
@media (max-width: 760px) {
  .virelia-home { position: absolute; top: 12px; left: 12px; width: 46px; height: 52px; border-radius: 13px; }
  .virelia-home img { height: 42px; }
  .shell { width: min(100% - 24px, 960px); padding-top: 82px; }
  body.telegram-mini-app .shell { padding-top: 76px; }
  .header { display: block; }
  .language-switcher { width: max-content; margin-top: 18px; }
  .intro-card, .information-grid { grid-template-columns: 1fr; }
  .privacy-badge { max-width: none; }
  .founder-card { grid-column: auto; }
}
@media (max-width: 520px) {
  .form-section { grid-template-columns: 34px 1fr; gap: 12px; padding: 17px 14px; }
  .section-number { width: 32px; height: 32px; font-size: .86rem; }
  .choice-list-inline { grid-template-columns: 1fr 1fr; }
  .telegram-context { align-items: flex-start; flex-direction: column; }
  .telegram-context span { text-align: left; }
}
@media (max-width: 460px) {
  .language-options { grid-template-columns: 1fr; }
  .language-options button { min-height: 58px; }
  .notice { align-items: flex-start; flex-direction: column; }
}
