:root {
  --ink: #14231f;
  --muted: #6c7773;
  --paper: #f5f5f0;
  --line: rgba(20, 35, 31, 0.14);
  --orange: #f06a32;
  --cream: #efe8da;
  --green: #1f5b48;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 8%, rgba(240, 106, 50, 0.09), transparent 28rem),
    linear-gradient(rgba(20, 35, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 35, 31, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 42px 42px, 42px 42px, auto;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.topbar {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; background: var(--ink); font: 700 17px Georgia, serif; border-radius: 50%; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; letter-spacing: .18em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .12em; }

.security-pill { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; letter-spacing: .05em; }
.security-pill span { width: 7px; height: 7px; border-radius: 50%; background: #34a270; box-shadow: 0 0 0 5px rgba(52, 162, 112, .1); }

.hidden { display: none !important; }
.state-view { min-height: calc(100vh - 106px); }
.loading-view { display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loader { width: 30px; height: 30px; border: 2px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(60px, 10vw, 140px); align-items: center; padding: 80px 0 110px; }
.eyebrow { margin: 0 0 22px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .22em; }
.intro h1, .dashboard-heading h1 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-weight: 500; line-height: 1.06; letter-spacing: -.045em; }
.intro h1 { max-width: 700px; font-size: clamp(52px, 7vw, 92px); }
.intro h1 em { color: var(--orange); font-style: italic; }
.lead { max-width: 590px; margin: 30px 0 44px; color: var(--muted); font-size: 17px; line-height: 1.9; }
.trust-list { display: flex; flex-wrap: wrap; gap: 18px 30px; color: var(--muted); font-size: 12px; }
.trust-list span { display: flex; align-items: center; gap: 8px; }
.trust-list b { color: var(--ink); font: 500 10px Georgia, serif; }

.auth-card { padding: 36px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.66); box-shadow: 0 28px 90px rgba(20,35,31,.08); backdrop-filter: blur(12px); }
.card-index { margin-bottom: 38px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.auth-card h2 { margin: 0 0 12px; font: 500 29px Georgia, "Noto Serif SC", serif; }
.auth-card > p { margin: 0 0 30px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-card label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.password-field { position: relative; }
.password-field input { width: 100%; height: 54px; padding: 0 72px 0 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 2px; outline: none; background: #fff; transition: border .2s, box-shadow .2s; }
.password-field input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240,106,50,.1); }
.text-button { position: absolute; top: 0; right: 0; height: 54px; padding: 0 16px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.form-message { min-height: 22px; margin: 10px 0 4px !important; color: #b13f2d !important; font-size: 12px !important; }
.primary-button { display: flex; width: 100%; height: 55px; padding: 0 18px; align-items: center; justify-content: space-between; border: 0; border-radius: 2px; color: #fff; background: var(--ink); cursor: pointer; transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--orange); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.privacy-note { display: block; margin-top: 18px; color: #89918e; text-align: center; font-size: 10px; }

.dashboard { padding: 72px 0 40px; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.dashboard-heading h1 { font-size: clamp(46px, 6vw, 76px); }
.dashboard-heading > div > p:last-child { margin: 16px 0 0; color: var(--muted); }
.secondary-button { padding: 12px 18px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: transparent; cursor: pointer; }
.secondary-button:hover { border-color: var(--ink); background: rgba(255,255,255,.55); }

.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.app-card { position: relative; min-height: 500px; padding: 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; color: inherit; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.app-card:hover { transform: translateY(-6px); box-shadow: 0 28px 70px rgba(20,35,31,.12); }
.stock-card { background: #e9e3d7; }
.football-card { color: #f4f5f1; background: #163e33; }
.app-card-top { display: flex; align-items: center; justify-content: space-between; }
.app-number { font: italic 20px Georgia, serif; opacity: .7; }
.open-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 18px; }
.visual { position: relative; height: 210px; margin: 28px 0 30px; overflow: hidden; }
.stock-visual { display: flex; align-items: flex-end; justify-content: center; gap: 18px; padding: 30px 15%; border-bottom: 1px solid rgba(20,35,31,.25); }
.bar { width: 15%; background: var(--orange); opacity: .72; }
.bar-one { height: 27%; }.bar-two { height: 51%; }.bar-three { height: 43%; }.bar-four { height: 79%; }
.trend-line { position: absolute; left: 13%; top: 42%; width: 76%; height: 3px; background: var(--ink); transform: rotate(-16deg); transform-origin: left center; }
.trend-line::after { content: ""; position: absolute; right: -1px; top: -5px; width: 12px; height: 12px; border-top: 3px solid var(--ink); border-right: 3px solid var(--ink); transform: rotate(45deg); }
.pitch-visual { border: 1px solid rgba(255,255,255,.32); }
.pitch-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(255,255,255,.3); }
.pitch-circle { position: absolute; top: 50%; left: 50%; width: 80px; height: 80px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; transform: translate(-50%,-50%); }
.player { position: absolute; width: 12px; height: 12px; border: 3px solid #163e33; border-radius: 50%; background: #ed8a45; box-shadow: 0 0 0 1px rgba(255,255,255,.7); }
.p1 { left: 14%; top: 48%; }.p2 { left: 36%; top: 24%; }.p3 { left: 36%; bottom: 24%; }.p4 { right: 23%; top: 48%; }.p5 { right: 6%; top: 48%; }
.app-label { margin: 0 0 8px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.app-card h2 { margin: 0 0 12px; font: 500 34px Georgia, "Noto Serif SC", serif; }
.app-card > p:not(.app-label) { max-width: 470px; margin: 0; opacity: .68; font-size: 14px; line-height: 1.75; }
.enter-link { position: absolute; right: 30px; bottom: 28px; left: 30px; display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px solid currentColor; font-size: 13px; opacity: .8; }
.enter-link b { font-size: 18px; }

footer { display: flex; justify-content: space-between; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .12em; }

@media (max-width: 850px) {
  .shell { width: min(100% - 28px, 680px); }
  .topbar { min-height: 84px; }
  .state-view { min-height: calc(100vh - 84px); }
  .auth-layout { grid-template-columns: 1fr; gap: 48px; padding: 60px 0 80px; }
  .intro h1 { font-size: clamp(48px, 15vw, 72px); }
  .trust-list { display: grid; }
  .app-grid { grid-template-columns: 1fr; }
  .dashboard-heading { align-items: start; flex-direction: column; }
}

@media (max-width: 520px) {
  .security-pill { font-size: 0; }
  .auth-card, .app-card { padding: 24px; }
  .auth-card { margin-right: -4px; margin-left: -4px; }
  .intro h1 { font-size: 48px; }
  .lead { font-size: 15px; }
  .dashboard { padding-top: 50px; }
  .dashboard-heading h1 { font-size: 45px; }
  .app-card { min-height: 470px; }
  .enter-link { right: 24px; left: 24px; }
  footer { gap: 20px; }
}

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