html { background: var(--w-bg); }
body { margin: 0; min-height: 100vh; color: var(--w-txt); font: 16px/1.5 var(--w-sans); background: radial-gradient(1200px 640px at 50% -160px, #1f4560, var(--w-bg2) 55%, var(--w-bg)); }
.home { max-width: 1120px; margin: 0 auto; padding: 18px 18px 0; }
a { color: var(--w-brass2); }

.hero { position: relative; overflow: hidden; border-radius: 18px; height: clamp(240px, 38vw, 380px); border: 1px solid var(--w-line); background: #0e2231; isolation: isolate; }
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 16, 24, .9) 0%, rgba(6, 16, 24, .62) 45%, rgba(6, 16, 24, .05) 85%), linear-gradient(0deg, rgba(6, 16, 24, .5), transparent 50%); }
.hero .txt { position: absolute; left: clamp(18px, 4vw, 44px); bottom: clamp(18px, 4vw, 40px); right: 18px; max-width: 560px; }
.hero h1 { margin: 0 0 10px; font: 700 clamp(28px, 4.4vw, 46px)/1.08 var(--w-serif); color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.hero p { margin: 0 0 18px; font-size: clamp(16px, 1.7vw, 18px); color: #e4edf3; max-width: 470px; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.hero .credit { position: absolute; right: 10px; bottom: 8px; font: 600 11px/1 var(--w-sans); color: rgba(255, 255, 255, .8); background: rgba(0, 0, 0, .35); padding: 3px 7px; border-radius: 6px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hb { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 12px; font: 800 17px/1 var(--w-sans); text-decoration: none; border: 1px solid var(--w-line); color: var(--w-txt); background: rgba(10, 28, 42, .7); cursor: pointer; }
.hb.primary { color: #241600; border-color: #f7e4a6; background: linear-gradient(180deg, #ffe9a6, var(--w-brass) 60%, #b8892e); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.hb:hover { filter: brightness(1.06); }

.go { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 20px 18px; min-height: 132px; border-radius: 16px; text-decoration: none; color: var(--w-txt); background: linear-gradient(180deg, var(--w-panel2), var(--w-panel)); border: 1px solid var(--w-line2); transition: transform .12s, border-color .12s; }
.tile:hover { transform: translateY(-2px); border-color: var(--w-line); }
.tile .ic { font-size: 34px; line-height: 1; margin-bottom: 8px; }
.tile b { font: 700 22px/1.1 var(--w-serif); color: #fff; }
.tile small { font-size: 15px; line-height: 1.35; color: var(--w-muted); }

.glance { border-radius: 16px; background: var(--w-panel); border: 1px solid var(--w-line2); padding: 18px 20px 20px; margin-bottom: 8px; }
.glance h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 700 20px/1.2 var(--w-serif); color: var(--w-brass2); }
.glance h2 .silk { width: 28px; height: 28px; border-radius: 7px; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.glance h2 small { margin-left: auto; font: 600 14px/1 var(--w-sans); color: var(--w-muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.st { padding: 14px 16px; border-radius: 12px; background: rgba(0, 0, 0, .22); min-width: 0; }
.st .k { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--w-muted); }
.st .v { margin-top: 4px; font: 800 26px/1.1 var(--w-num); color: #fff; overflow-wrap: anywhere; }
.st .v.money { color: var(--w-good); }
.st .s { margin-top: 4px; font-size: 15px; color: var(--w-muted); }
.st .s a { font-weight: 700; }
.st .bar { margin-top: 10px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.st .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--w-brassDk), var(--w-brass2)); border-radius: 99px; }
.st.race .v { font: 700 19px/1.25 var(--w-sans); }

/* welcome / new stable */
.newst p { margin: 0 0 14px; color: var(--w-muted); font-size: 16px; }
.form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--w-muted); }
.fld input[type=text] { height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--w-line2); background: #08161f; color: #fff; font: 600 16px var(--w-sans); }
.silks { display: flex; align-items: center; gap: 14px; }
.silks label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--w-muted); }
.silks input[type=color] { width: 48px; height: 40px; padding: 0; border: 1px solid var(--w-line2); border-radius: 8px; background: none; cursor: pointer; }
.silks .prev { width: 56px; height: 48px; border-radius: 10px; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }

@media (max-width: 900px) {
  .home { padding: 12px 12px 0; }
  .go { grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
  .tile { min-height: 0; padding: 16px 14px; } .tile .ic { font-size: 28px; margin-bottom: 4px; } .tile b { font-size: 20px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .glance { padding: 16px 14px; }
  .form { grid-template-columns: 1fr; }
}
@media (max-width: 900px) and (max-height: 500px) {
  .hero { height: 230px; }
  .go { grid-template-columns: repeat(4, 1fr); }
  .tile small { display: none; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 420px) { .st .v { font-size: 22px; } .hero h1 { font-size: 28px; } .glance h2 small { display: none; } }
@media (max-width: 900px) {
  .hero { height: auto; min-height: 300px; display: flex; align-items: flex-end; }
  .hero .shade { background: linear-gradient(0deg, rgba(6, 16, 24, .95) 0%, rgba(6, 16, 24, .75) 45%, rgba(6, 16, 24, .1) 85%); }
  .hero .txt { position: relative; left: auto; bottom: auto; right: auto; padding: 130px 18px 20px; max-width: none; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; margin-bottom: 14px; }
  .hb { min-height: 48px; padding: 0 16px; font-size: 16px; }
  .hero .credit { top: 8px; bottom: auto; }
}
@media (max-width: 900px) and (max-height: 500px) {
  .hero { min-height: 0; }
  .hero .shade { background: linear-gradient(90deg, rgba(6, 16, 24, .92) 0%, rgba(6, 16, 24, .6) 55%, rgba(6, 16, 24, .05) 90%); }
  .hero .txt { padding: 24px 22px; max-width: 520px; }
  .hero h1 { font-size: 26px; }
}
/* illustrated cards (original clip art in img/home) */
.tile.art { padding: 0; overflow: hidden; gap: 0; min-height: 0; }
.tile.art .tart { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0b1d2b; border-bottom: 1px solid var(--w-line2); }
.tile.art .tart img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.tile.art:hover .tart img { transform: scale(1.04); }
.tile.art .tx { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
@media (max-width: 900px) { .tile.art { padding: 0; } .tile.art .tx { padding: 10px 12px 12px; } }
@media (max-width: 900px) and (max-height: 500px) { .tile.art .tart { aspect-ratio: 16 / 7; } .tile.art .tx { padding: 6px 10px 8px; } }