:root {
  --bg: #07090e;
  --panel: #121722;
  --panel-2: #181f2d;
  --panel-3: #202838;
  --text: #f7f0dc;
  --muted: #aeb4c3;
  --gold: #d6a84f;
  --gold-2: #ffd56e;
  --gold-soft: rgba(255, 213, 110, 0.14);
  --blue: #416686;
  --green: #35c878;
  --amber: #e9b949;
  --red: #ef5b5b;
  --border: rgba(214, 168, 79, 0.24);
  --border-soft: rgba(255, 255, 255, 0.085);
  --shadow: rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255,213,110,.18), transparent 23rem),
    radial-gradient(circle at 90% 10%, rgba(65,102,134,.22), transparent 22rem),
    linear-gradient(180deg, #0d111a 0%, var(--bg) 52%, #05070b 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 14px 22px;
}

.hero {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 10px 0 18px;
}

.logo-mark {
  flex: 0 0 auto;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255,213,110,.12), transparent 38%),
    linear-gradient(145deg, #232b3c, #080a0f);
  color: var(--gold-2);
  font-weight: 950;
  letter-spacing: 1.2px;
  box-shadow: 0 16px 32px var(--shadow), inset 0 0 18px rgba(255,213,110,.08);
  text-shadow: 0 2px 10px rgba(255,213,110,.28);
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: clamp(1.48rem, 8vw, 2.55rem);
  line-height: .98;
  margin-bottom: 7px;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.02rem;
  color: var(--gold-2);
  letter-spacing: .015em;
  margin-bottom: 14px;
}
.hero p, footer p { color: var(--muted); margin-bottom: 0; line-height: 1.35; }

.card {
  background:
    linear-gradient(180deg, rgba(29,37,53,.96), rgba(15,19,29,.98));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 15px;
  box-shadow: 0 16px 36px var(--shadow);
  overflow: hidden;
}

.input-card { position: relative; }
.input-card::before,
.recommendation-card::before {
  content: "";
  display: block;
  height: 3px;
  margin: -18px -18px 15px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  opacity: .55;
}

.grid { display: grid; gap: 13px; }
.grid.two, .grid.three { grid-template-columns: 1fr; }

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
}

input, select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 15px;
  background: rgba(7, 10, 16, .94);
  color: var(--text);
  padding: 13px 13px;
  font-size: 1.04rem;
  font-weight: 750;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

select { cursor: pointer; }
input::placeholder { color: rgba(174,180,195,.65); }
input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(214,168,79,.14), inset 0 1px 0 rgba(255,255,255,.04);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 15px;
  color: var(--text);
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: rgba(9,13,21,.48);
  min-height: 52px;
}
.check-row input { width: 22px; height: 22px; accent-color: var(--gold); flex: 0 0 auto; }
.leader-settings { margin-top: 14px; }

.recommendation-card {
  position: static;
  border-color: rgba(255,213,110,.52);
  background:
    radial-gradient(circle at top right, rgba(255,213,110,.13), transparent 18rem),
    linear-gradient(145deg, rgba(39,47,65,.98), rgba(12,15,23,.99));
}
.recommendation-title {
  color: #f2c94c;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.recommendation-main {
  font-size: 2rem;
  font-weight: 800;
  color: #f5f5f5;
}
.recommendation-stat {
  color: #d4af37;
  font-weight: 700;
}
.rec-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 2px;
}
.rec-topline h2 { margin-bottom: 0; }
.badge {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: .78rem;
  font-weight: 950;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.08);
}
.badge.excellent { color: #001c0c; background: var(--green); border-color: transparent; }
.badge.optimal { color: #061820; background: #7ee6a8; border-color: transparent; }
.badge.participate { color: #201400; background: var(--amber); border-color: transparent; }
.badge.bad { color: white; background: var(--red); border-color: transparent; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.stat {
  background: rgba(7,10,16,.76);
  border: 1px solid var(--border-soft);
  border-radius: 17px;
  padding: 13px 12px;
  min-width: 0;
}
.stat span {
  display: block;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 750;
  line-height: 1.1;
}
.stat strong {
  display: block;
  color: var(--gold-2);
  font-size: clamp(1.16rem, 5vw, 1.55rem);
  margin-top: 6px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.stat:last-child { grid-column: 1 / -1; }
.note { color: var(--muted); line-height: 1.45; margin-bottom: 14px; }
.go-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 17px;
  padding: 15px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #171103;
  font-weight: 1000;
  font-size: 1.05rem;
  letter-spacing: .7px;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(214,168,79,.24);
}
.go-button:active { transform: translateY(1px); }
.hidden { display: none; }
.details.highlight .card:first-child { animation: pulse 850ms ease; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,213,110,.45); }
  100% { box-shadow: 0 0 0 18px rgba(255,213,110,0); }
}

.breakdown-list { display: grid; gap: 10px; }
.breakdown-list div, .planner-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border-radius: 15px;
  background: rgba(7,10,16,.62);
  border: 1px solid var(--border-soft);
}
.breakdown-list span, .planner-item span { color: var(--muted); font-weight: 650; }
.breakdown-list strong, .planner-item strong { color: var(--text); text-align: right; font-weight: 900; }
.planner { display: grid; gap: 10px; }
footer { text-align: center; color: var(--muted); padding: 16px 0 22px; }

.logo {
  width: 120px;
  max-width: 35vw;
  height: auto;
  display: block;
}
.site-footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  color: #b0b0b0;
  border-top: 1px solid rgba(212,175,55,.25);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 4px 0;
}
@media (min-width: 768px) {
  .logo {
    width: 160px;
  }
}
@media (max-width: 390px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .card { padding: 15px; border-radius: 19px; }
  .input-card::before, .recommendation-card::before { margin: -15px -15px 13px; }
  .logo-mark { width: 58px; height: 58px; border-radius: 17px; }
  .stat-grid { gap: 8px; }
  .stat { padding: 11px 10px; }
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.hero-header div {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .hero-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 720px) {
  .app-shell { padding: 28px; }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(5, 1fr); }
  .stat:last-child { grid-column: auto; }
  .details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .details.hidden { display: none; }
  .details .card { margin-bottom: 0; }
  .details .card:last-child { grid-column: 1 / -1; }
}

@media (min-width: 980px) {
  .hero { margin-top: 18px; }
  .card { padding: 22px; }
  .input-card::before, .recommendation-card::before { margin: -22px -22px 18px; }
}
