*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FFFBF5;
  --bg-2: #FFF6EC;
  --card: #FFFFFF;
  --line: #E2E8F0;
  --text: #3F2A14;
  --muted: #7C6A55;
  --accent: #C2410C;
  --accent-hover: #9A3412;
  --ok: #C2410C;
  --shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

html, body { max-width: 100%; overflow-x: hidden; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  min-height: 100svh;
  line-height: 1.5;
}
a { color: #475569; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap, .legal { width: min(1120px, 100%); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.bar {
  display: flex; align-items: center; justify-content: flex-start;
  width: 100%; background: #FFFFFF; border-bottom: 1px solid var(--line);
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px;
}
body[data-stage="hero"] .bar,
body[data-stage="match"] .bar,
body[data-stage="picked"] .bar {
  position: absolute; left: 0; right: 0; z-index: 2; justify-content: center;
}
body[data-stage="hero"] footer,
body[data-stage="match"] footer,
body[data-stage="picked"] footer { display: none !important; }
.bar strong { letter-spacing: -0.03em; font-size: 1.28rem; color: var(--text); }
.bar strong span {
  display: inline-block; margin-left: 8px; padding: 4px 11px;
  background: var(--accent); color: #FFFFFF; font-size: 0.78rem;
  border-radius: 10px; vertical-align: 2px;
}
.hero, .match, .picked {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; width: 100vw; margin-left: calc(50% - 50vw);
  min-height: 100vh; min-height: 100dvh; min-height: 100svh;
  padding: calc(76px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.hero { background: linear-gradient(180deg, #FFFFFF 0%, #FFF1E4 100%); }
.match { background: var(--bg-2); }
.picked { background: var(--bg); }
.hero.is-on, .match.is-on, .picked.is-on, .catalog.is-on { opacity: 1; transform: none; }
.badge {
  display: inline-flex; align-items: center; margin-bottom: 12px; padding: 6px 12px;
  border-radius: 10px; background: #FFFFFF; border: 1px solid var(--line);
  color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
h1 { font-size: clamp(1.55rem, 6.4vw, 2.5rem); letter-spacing: -0.04em; line-height: 1.15; margin-bottom: 8px; max-width: 16ch; color: var(--text); }
h2 { font-size: clamp(1.25rem, 4vw, 1.7rem); letter-spacing: -0.03em; color: var(--text); }
.lead, .hint { color: var(--muted); }
.lead { margin-bottom: 14px; max-width: 32em; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin-bottom: 16px; }
.stats li {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #334155;
}
.stats li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-art { display: flex; justify-content: center; gap: 8px; margin: 2px 0 18px; }
.hero-art .char, .job-icon .char, .picked-icon .char {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.hero-art .char { width: 56px; height: 56px; }
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; max-width: 360px;
  min-height: 52px; padding: 0 16px; border: 0; border-radius: 12px;
  background: var(--accent); color: #FFFFFF; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.02em; cursor: pointer; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.98); }
.primary-cta { max-width: 360px; background: var(--accent); color: #FFFFFF; }
.hint { margin-top: 12px; font-size: 0.88rem; text-align: center; max-width: 28em; }
.loader-ring { width: 54px; height: 54px; margin-bottom: 16px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.85s linear infinite; }
.progress { width: min(280px, 100%); height: 8px; margin: 14px auto 8px; background: #E2E8F0; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 0.55s ease; }
.progress-pct { font-size: 0.85rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
.match-steps { list-style: none; width: min(360px, 100%); text-align: left; }
.match-steps li {
  display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; padding: 12px 14px;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px;
  color: var(--muted); opacity: 0.55; transition: opacity 0.25s ease, border-color 0.25s ease;
}
.match-steps li.is-run, .match-steps li.is-done { opacity: 1; color: var(--text); }
.mark { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; border: 2px solid var(--line); border-radius: 50%; background: #FFFFFF; }
.is-run .mark { border-color: var(--accent); }
.is-done .mark {
  border-color: var(--ok);
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.match-done { margin-top: 16px; font-weight: 800; color: var(--ok); }
.catalog { padding: 8px 0 32px; opacity: 0; transform: translateY(12px); transition: opacity 0.35s ease, transform 0.35s ease; }
.catalog > h2, .catalog > .lead { text-align: center; }
.catalog > .lead { margin-left: auto; margin-right: auto; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 12px 0 14px; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
.filters::-webkit-scrollbar { display: none; width: 0; height: 0; }
.filters button {
  flex: 0 0 auto; min-height: 40px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #FFFFFF; color: #475569; font-size: 0.84rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.filters button.is-on { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.job-card {
  padding: 16px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); animation: cardIn 0.4s ease forwards; text-align: left;
}
.job-icon .char, .picked-icon .char { width: 64px; height: 64px; display: block; }
.picked-icon .char { width: 80px; height: 80px; margin: 8px auto 4px; }
.job-card h3 { margin: 8px 0 2px; font-size: 1.12rem; letter-spacing: -0.02em; }
.salary { font-size: 1.2rem; font-weight: 800; color: #C2410C; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chips span { padding: 4px 9px; border-radius: 10px; font-size: 0.75rem; font-weight: 700; background: #F1F5F9; border: 1px solid var(--line); color: #475569; }
.chips span.ok { background: #FFFFFF; border: 1px solid var(--accent); color: var(--accent); }
.slots { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; padding: 5px 10px 5px 9px; border-radius: 10px; font-size: 0.78rem; font-weight: 800; line-height: 1.2; }
.slots-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.slots-critical { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; animation: slotsPulse 1.8s ease-in-out infinite; }
.slots-critical .slots-dot { background: #DC2626; }
.slots-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #B45309; }
.slots-warning .slots-dot { background: #D97706; }
.slots-available { background: #F0FDF4; border: 1px solid #BBF7D0; color: #15803D; }
.slots-available .slots-dot { background: #16A34A; }
@keyframes slotsPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
.job-card .desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 12px; }
.job-card .btn { text-transform: none; letter-spacing: 0; min-height: 46px; font-size: 0.95rem; max-width: none; background: #FFFFFF; color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }
.job-card .btn:hover { background: #FFF1E4; }
.picked .badge { background: #FFFFFF; border-color: var(--accent); color: var(--accent); letter-spacing: 0.1em; }
.picked-card { width: min(420px, 100%); margin: 0 auto; padding: 22px 18px 20px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); }
.picked h2 { text-transform: uppercase; margin: 8px 0 4px; }
.picked-meta { color: var(--muted); margin-bottom: 10px; }
.picked .lead { margin-bottom: 18px; }
.link-back { margin-top: 12px; border: 0; background: none; color: var(--muted); font-weight: 700; min-height: 44px; cursor: pointer; }
.empty { color: var(--muted); padding: 18px 4px; }
footer { width: 100%; padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); text-align: center; background: #FFFFFF; border-top: 1px solid var(--line); color: var(--muted); }
footer strong { color: var(--text); }
footer nav { display: flex; justify-content: center; gap: 16px; margin-top: 10px; }
.legal { padding-top: 8px; }
.legal h1 { font-size: 1.45rem; margin-bottom: 8px; }
.paper { margin: 12px 0 28px; padding: 18px 16px; background: #FFFFFF; border-radius: 16px; border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.paper h2 { margin: 16px 0 8px; color: var(--accent-hover); }
.paper p, .paper li { color: var(--muted); }
.paper ul { padding-left: 18px; margin-top: 8px; }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 700; }
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } .hero-art .char { width: 64px; height: 64px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } .job-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); } }
@media (prefers-reduced-motion: reduce) {
  .loader-ring { animation: none; border-top-color: var(--accent); }
  .hero, .match, .picked, .catalog { transition: none; }
  .job-card { opacity: 1; transform: none; animation: none; }
  .slots-critical { animation: none; }
}
