﻿:root {
  --bg1: #191513;
  --bg2: #2f221d;
  --panel: rgba(25, 19, 17, 0.78);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f3ece2;
  --muted: #cfbda8;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  font-family: Inter, Segoe UI, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(130% 80% at 50% -20%, rgba(173, 122, 79, 0.35), transparent 55%),
    radial-gradient(90% 100% at 50% 110%, rgba(0, 0, 0, 0.9), transparent 60%),
    linear-gradient(180deg, #3f3029 0%, var(--bg2) 44%, var(--bg1) 100%);
}

.home-root {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) 10px calc(env(safe-area-inset-bottom) + 20px);
  display: grid;
  gap: 10px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 { margin: 0; font-size: 34px; }
.panel-head span { color: var(--muted); font-weight: 700; }

.stats-panel { padding-bottom: 8px; }
.subcard {
  margin: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.subcard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.plus {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
}
.row:last-child { border-bottom: 0; }
.row strong { color: #fff; }

.decks-panel { padding: 10px; }
.deck-stage {
  display: grid;
  grid-template-columns: 28px 64px 1fr 64px 28px;
  align-items: center;
  gap: 8px;
}
.arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.3);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}
.arrow-btn.small { width: 26px; height: 26px; }

.deck-side {
  width: 64px;
  aspect-ratio: 0.58;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  opacity: .38;
  background: linear-gradient(180deg, #5d4b3e, #8f745a);
}

.deck-preview {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.deck-img {
  width: min(172px, 42vw);
  aspect-ratio: 0.58;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,.35);
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(0,0,0,.5);
  background: linear-gradient(180deg, #6e5a4d, #af936f);
}
.deck-title { font-weight: 800; text-align: center; }
.deck-counter { color: var(--muted); font-size: 12px; }

.ghost-btn,
.primary-btn {
  width: 100%;
  text-align: center;
  margin-top: 10px;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  text-decoration: none;
}
.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.primary-btn {
  border: 0;
  background: radial-gradient(circle at 30% 20%, #8a86ff, #5c4ecb 82%);
  color: #fff;
}

.horoscope-main { padding: 10px 12px 6px; }
.sign-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
}
.sign-pill span { font-size: 20px; }

.hline {
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 8px;
}
.hline strong { font-size: 12px; color: #f4d39b; letter-spacing: .03em; }
.hline p { margin: 6px 0 0; color: #ece2d7; line-height: 1.4; font-size: 14px; }
.hline.lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #cfae72;
  min-height: 34px;
}

.paywall-note {
  margin: 8px 12px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.zodiac-picker {
  display: grid;
  grid-template-columns: 26px 1fr 26px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
}
.zodiac-picker select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.3);
  color: #fff;
  padding: 8px 10px;
}

@media (max-width: 420px) {
  .panel-head h2 { font-size: 30px; }
  .deck-stage { grid-template-columns: 24px 52px 1fr 52px 24px; }
  .deck-side { width: 52px; }
}
