:root {
  --red: #d91f27;
  --red-dark: #9b090f;
  --gold: #f4c76d;
  --gold-soft: #ffe7a6;
  --bg: #07101d;
  --panel: #0d1726;
  --panel2: #121f31;
  --text: #f7f9fc;
  --text-soft: rgba(255, 255, 255, .76);
  --muted: rgba(255, 255, 255, .54);
  --line: rgba(255, 255, 255, .08);
  --nav: #8d96a5;
  --shadow: 0 14px 32px rgba(0, 0, 0, .26);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: #101014;
}

body {
  display: flex;
  justify-content: center;
  background: radial-gradient(circle at 50% 0%, rgba(190, 20, 20, .18), transparent 32%), linear-gradient(180deg, #1c1d22, #0c0d10);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: #08111f;
  position: relative;
  overflow: hidden;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 0 40px rgba(0, 0, 0, .42);
}

.top-header {
  min-height: 72px;
  margin: 10px 10px 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background:
    radial-gradient(circle at 17% 18%, rgba(255, 230, 169, .2), transparent 24%),
    radial-gradient(circle at 88% 0%, rgba(178, 31, 35, .3), transparent 34%),
    linear-gradient(135deg, #520711 0%, #230812 48%, #111827 100%);
  border: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 229, 168, .25);
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: hidden;
}

.top-header::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 36px;
  border-radius: 13px 13px 60% 60%;
  background: linear-gradient(90deg, rgba(255, 255, 255, .1), rgba(255, 223, 146, .08), transparent);
  pointer-events: none;
}

.top-header::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 218, 137, .56), transparent);
  pointer-events: none;
}

.store-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.crest {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .34));
}

.store-info {
  min-width: 0;
}

.store-info h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
}

.store-name {
  display: inline-block;
  max-width: 176px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verified-badge {
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 226, 157, .2), rgba(92, 54, 8, .24));
  border: 1px solid rgba(255, 223, 150, .38);
  color: #ffe0a0;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.store-sub {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255, 255, 255, .76);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 224, 154, .28);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 235, 184, .16), rgba(255, 255, 255, .05));
  color: #ffe5ad;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 8px 16px rgba(0, 0, 0, .16);
}

.shop-card {
  margin: 0 10px 10px;
  padding: 13px 14px 14px;
  border-radius: 0 0 14px 14px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 216, 145, .1), transparent 28%),
    linear-gradient(180deg, #101a29 0%, #0b1422 100%);
  border: 1px solid rgba(244, 199, 109, .2);
  border-top: 0;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
  position: relative;
  overflow: hidden;
}

.shop-card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 222, 151, .45), transparent);
  pointer-events: none;
}

.shop-card::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -68px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 199, 109, .1), transparent 64%);
  pointer-events: none;
}

.shop-tools {
  padding-top: 0;
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  position: relative;
  z-index: 1;
}

.icon-tool {
  min-height: 42px;
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 230, 172, .14), rgba(255, 255, 255, .045)),
    rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 224, 154, .18);
  color: #f5cf83;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 8px 16px rgba(0, 0, 0, .12);
}

.icon-tool svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.action-sheet[hidden] {
  display: none !important;
}

.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .48);
}

.sheet-panel {
  position: relative;
  width: min(430px, 100%);
  margin: 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 18px 18px 0 0;
  background: #101b2d;
  border: 1px solid rgba(244, 207, 135, .16);
  box-shadow: 0 -18px 42px rgba(0, 0, 0, .38);
}

.sheet-panel h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  color: #fff;
}

.sheet-panel p {
  margin: 9px 0 14px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  line-height: 1.55;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-btn,
.sheet-close {
  min-height: 42px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
}

.sheet-btn.primary {
  background: linear-gradient(180deg, #d82028, #a90911);
  color: #fff;
}

.sheet-btn.secondary {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  color: #f2cd7c;
}

.sheet-close {
  width: 100%;
  margin-top: 10px;
  background: rgba(255, 255, 255, .045);
  color: rgba(255, 255, 255, .72);
}

.shop-meta {
  margin-top: 11px;
  padding: 10px 11px;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, .64);
  background: rgba(2, 8, 16, .24);
  border: 1px solid rgba(255, 255, 255, .055);
  font-size: 11px;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

.owner-edit {
  margin-top: 12px;
  width: 100%;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(180deg, #d9ae62, #8b5519);
  color: #fff7df;
  font-size: 13px;
  font-weight: 650;
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 18px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.page {
  display: none;
  margin: 0;
  background: linear-gradient(180deg, #071222, #0a1320);
  min-height: 420px;
}

.page.active {
  display: block;
}

.date-bar {
  margin: 9px 10px 0;
  background: linear-gradient(180deg, #142338, #0d1829);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.dates {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 207, 135, .58) rgba(255, 255, 255, .08);
  padding-bottom: 4px;
}

.dates::-webkit-scrollbar {
  height: 5px;
}

.dates::-webkit-scrollbar-thumb {
  background: rgba(244, 207, 135, .58);
  border-radius: 999px;
}

.date-item {
  position: relative;
  min-width: 70px;
  padding: 12px 7px 9px;
  text-align: center;
  color: rgba(255, 255, 255, .74);
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .045);
  background: transparent;
  cursor: pointer;
  flex: 1 0 auto;
}

.date-item .week {
  display: block;
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
}

.date-item .day {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: rgba(255, 255, 255, .48);
  font-weight: 520;
  white-space: nowrap;
}

.date-item.active {
  background: linear-gradient(180deg, #da2028, #a70a11);
  color: #fff;
  box-shadow: inset 0 -3px 0 #f1ca77, 0 8px 19px rgba(206, 19, 28, .34);
}

.date-item.active .day {
  color: rgba(255, 255, 255, .88);
  font-weight: 650;
}

.list-filter-bar {
  padding: 8px 8px 0;
  background: linear-gradient(180deg, #071222, #0a1320);
}

.confidence-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .075);
}

.confidence-label {
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
  font-weight: 760;
}

.confidence-filter {
  min-width: 0;
  flex: 1;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.confidence-filter::-webkit-scrollbar {
  display: none;
}

.confidence-btn,
.seg {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 207, 135, .16);
  background: rgba(255, 255, 255, .045);
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.confidence-btn.active,
.seg.active {
  background: linear-gradient(180deg, #d82028, #a90911);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
  box-shadow: 0 6px 14px rgba(216, 32, 40, .24);
}

.sweep-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sweep-match {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(180deg, #101b2c, #0f1a2a);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .14);
}

.sweep-match.confidence-strong {
  border-left: 3px solid rgba(217, 96, 88, .62);
}

.sweep-match.confidence-steady {
  border-left: 3px solid rgba(92, 174, 126, .62);
}

.sweep-match.confidence-watch {
  border-left: 3px solid rgba(214, 163, 72, .62);
}

.sweep-header {
  padding: 11px 11px 7px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.sweep-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.jid,
.date {
  font-size: 11px;
  color: rgba(255, 255, 255, .52);
  font-weight: 500;
}

.sweep-meta .league {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, .86);
}

.sweep-meta .league i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .05);
}

.sweep-tags {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}

.match-state,
.confidence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.match-state.future {
  background: rgba(47, 166, 106, .13);
  color: #83e1a8;
}

.match-state.live {
  background: rgba(255, 92, 99, .16);
  color: #ff8f88;
}

.match-state.waitReview {
  background: rgba(244, 207, 135, .13);
  color: #f2cd7c;
}

.match-state.reviewed {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .66);
}

.confidence-pill.strong {
  background: rgba(217, 48, 37, .16);
  color: #ff8f88;
}

.confidence-pill.steady {
  background: rgba(47, 166, 106, .15);
  color: #83e1a8;
}

.confidence-pill.watch {
  background: rgba(245, 158, 11, .15);
  color: #f5c16c;
}

.review-badge {
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 560;
  white-space: nowrap;
}

.review-badge.hit {
  background: rgba(255, 92, 99, .15);
  border: 1px solid rgba(255, 92, 99, .28);
  color: #ff7b80;
}

.review-badge.miss {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .58);
}

.review-badge.pending {
  background: rgba(244, 207, 135, .12);
  border: 1px solid rgba(244, 207, 135, .22);
  color: #e4bf74;
}

.sweep-teams {
  padding: 0 11px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.sweep-team {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.sweep-team.away {
  flex-direction: row-reverse;
  text-align: right;
}

.sweep-team b {
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-rank {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .46);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 480;
  white-space: nowrap;
}

.goal-line {
  flex: 0 0 auto;
  min-width: 22px;
  padding-top: 1px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  color: #60b97c;
}

.team-logo {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: block;
  flex: 0 0 31px;
  object-fit: contain;
  background: rgba(255, 255, 255, .92);
  padding: 2px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .2);
}

.team-logo.red { background: radial-gradient(circle at 30% 26%, #ff646b, #a90812); }
.team-logo.white { background: radial-gradient(circle at 30% 26%, #fff, #bcc6d7); color: #1a2434; }
.team-logo.blue { background: radial-gradient(circle at 30% 26%, #5ca4ff, #1b4da8); }
.team-logo.green { background: radial-gradient(circle at 30% 26%, #7ce145, #2c7421); }
.team-logo.orange { background: radial-gradient(circle at 30% 26%, #ffb153, #c96008); }

.sweep-vs {
  min-height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f2cd7c;
  font-size: 12px;
  font-weight: 800;
}

.sweep-vs.score {
  background: transparent;
  border-color: transparent;
  flex-direction: column;
  gap: 2px;
}

.sweep-vs.live {
  background: rgba(255, 92, 99, .12);
  border-color: rgba(255, 92, 99, .22);
  color: #ff8f88;
  font-size: 10px;
  font-weight: 650;
}

.sweep-vs.score b {
  font-size: 14px;
  color: #ff5c63;
  line-height: 1;
}

.sweep-vs.score em {
  font-style: normal;
  font-size: 9px;
  color: rgba(255, 255, 255, .52);
}

.recommend {
  margin: 0 11px 11px;
  padding: 10px 11px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .025));
  border: 1px solid rgba(255, 255, 255, .065);
  display: flex;
  align-items: center;
  gap: 10px;
}

.recommend-main {
  min-width: 0;
  flex: 1;
}

.recommend-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 10px;
  line-height: 1.45;
}

.forecast {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(244, 207, 135, .10);
  color: #e8c577;
  font-weight: 600;
}

.forecast-focus {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  fill: #ff6b70;
}

.forecast.shoted {
  background: rgba(255, 92, 99, .14);
  color: #ff858a;
  border: 1px solid rgba(255, 92, 99, .25);
  font-weight: 600;
}

.reviewed-hit .sweep-vs.score b {
  color: #83e1a8;
}

.sweep-match.reviewed-hit {
  border-color: rgba(255, 92, 99, .34);
}

.reason-line {
  margin-top: 6px;
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  line-height: 1.55;
}

.analysis-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #83e1a8;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.analysis-link svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.basketball-toolbar {
  margin: 10px 10px 2px;
  padding: 12px 13px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025));
  border: 1px solid rgba(255, 255, 255, .075);
}

.basketball-toolbar h2 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.2;
  color: #f2cd7c;
}

.basketball-toolbar p {
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  line-height: 1.55;
}

.basketball-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.basketball-match {
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(180deg, #101b2c, #0f1a2a);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .14);
}

.basketball-match .sweep-meta .league i {
  background: #e28b3b;
}

.basketball-score b {
  color: #ff8f5b;
}

.basketball-periods {
  margin: -2px 11px 9px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.basketball-periods span {
  min-width: 48px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .045);
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  white-space: nowrap;
}

.basketball-periods em {
  margin-right: 4px;
  color: rgba(255, 255, 255, .42);
  font-style: normal;
}

.basketball-odds {
  margin: 0 11px 11px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .025);
}

.basketball-odds.empty {
  padding: 10px;
  border-radius: 7px;
  color: rgba(255, 255, 255, .54);
  font-size: 12px;
  text-align: center;
}

.basketball-odds-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  min-height: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
}

.basketball-odds-row:last-child {
  border-bottom: 0;
}

.basketball-odds-label {
  padding: 7px 7px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  background: rgba(255, 255, 255, .035);
  border-right: 1px solid rgba(255, 255, 255, .065);
}

.basketball-odds-label strong {
  font-size: 11px;
  font-weight: 560;
  color: rgba(255, 255, 255, .82);
}

.basketball-odds-label span {
  color: #f2cd7c;
  font-size: 10px;
}

.single-badge {
  width: max-content;
  min-height: 16px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgba(255, 92, 99, .15);
  border: 1px solid rgba(255, 92, 99, .24);
  color: #ff8f88;
  font-size: 9px;
  line-height: 15px;
}

.basketball-odds-label .single-badge {
  color: #ff8f88;
  font-size: 9px;
}

.basketball-odds-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.basketball-odds-chip {
  min-height: 42px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-right: 1px solid rgba(255, 255, 255, .055);
}

.basketball-odds-chip:last-child {
  border-right: 0;
}

.basketball-odds-chip em {
  color: rgba(255, 255, 255, .52);
  font-style: normal;
  font-size: 10px;
  white-space: nowrap;
}

.basketball-odds-chip b {
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
  font-weight: 560;
}

.basketball-odds-chip.up b {
  color: #ff8f88;
}

.basketball-odds-chip.down b {
  color: #83e1a8;
}

.wnm-row {
  grid-template-columns: 74px minmax(0, 1fr);
}

.basketball-wnm-scroll {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
}

.basketball-wnm-scroll .basketball-odds-chip {
  min-width: 74px;
  flex: 0 0 74px;
}

.basketball-explain {
  margin: -2px 11px 11px;
  color: rgba(255, 255, 255, .54);
  font-size: 11px;
  line-height: 1.5;
}

.section-card,
.empty-panel,
.manager-wrap {
  margin: 10px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #0e1a2a, #111f33);
  border: 1px solid rgba(255, 255, 255, .075);
  box-shadow: var(--shadow);
}

.empty-panel {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.65;
}

.empty-panel h2 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #f2cd7c;
}

.empty-panel p {
  margin: 0;
}

.empty-panel.inline {
  margin: 0;
  text-align: center;
}

.section-title h2 {
  margin: 0;
  font-size: 17px;
  color: #f2cd7c;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.lottery-notice {
  margin-bottom: 12px;
}

.lottery-notice p {
  margin: 0;
  color: rgba(255, 255, 255, .5);
  font-size: 10px;
  line-height: 1.6;
}

.lottery-grid {
  display: grid;
  gap: 14px;
}

.lottery-group-block {
  display: grid;
  gap: 0;
}

.lottery-row {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.lottery-row:first-child {
  border-top: 0;
  padding-top: 2px;
}

.lottery-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.lottery-name {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.35;
  min-width: 0;
}

.lottery-name em {
  color: rgba(255, 255, 255, .48);
  font-size: 11px;
  font-style: normal;
  font-weight: 460;
}

.lottery-schedule {
  color: rgba(255, 229, 171, .78);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.balls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.lottery-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lottery-action-btn {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(244, 207, 135, .16);
  background: rgba(244, 207, 135, .075);
  color: #f2cd7c;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 560;
}

.lottery-sub-page .top-header {
  margin-bottom: 10px;
}

.lottery-sub-page .page {
  padding-bottom: 18px;
}

.lottery-page-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lottery-page-title strong {
  color: #f4cf87;
  font-size: 17px;
  line-height: 1.35;
}

.lottery-page-title span {
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  line-height: 1.5;
}

.lottery-back {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 207, 135, .2);
  background: rgba(244, 207, 135, .08);
  color: #f4cf87;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 560;
}

.rule-block,
.history-panel {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.rule-block:first-child,
.history-panel:first-child {
  border-top: 0;
  padding-top: 0;
}

.rule-block.active-rule {
  margin: 0 -10px;
  padding: 14px 10px;
  border-radius: 10px;
  border-top-color: transparent;
  background: rgba(244, 207, 135, .065);
}

.rule-block h2,
.history-panel h2 {
  margin: 0 0 8px;
  color: #f4cf87;
  font-size: 15px;
}

.rule-block p,
.rule-block li,
.history-note {
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  line-height: 1.75;
}

.rule-block p {
  margin: 0;
}

.rule-block ul {
  margin: 0;
  padding-left: 18px;
}

.history-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 76px;
  gap: 8px;
  align-items: center;
}

.history-form select,
.history-form input {
  min-width: 0;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .055);
  color: #fff;
  padding: 0 9px;
  font-size: 12px;
  outline: none;
}

.history-form button {
  height: 36px;
  border-radius: 8px;
  border: 0;
  background: linear-gradient(180deg, #d82028, #a90911);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}

.lottery-history-list {
  margin-top: 12px;
  display: grid;
  gap: 0;
}

.lottery-history-row {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.lottery-history-row:first-child {
  border-top: 0;
}

.lottery-history-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
}

.lottery-history-head strong {
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
  font-weight: 620;
}

.lottery-history-row .balls {
  margin-top: 9px;
}

.ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .16);
}

.ball.red {
  background: linear-gradient(180deg, #f6535a, #b51119);
}

.ball.blue {
  background: linear-gradient(180deg, #4c9fff, #1e56bd);
}

.calc-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.form-item span {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 520;
}

.input {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: #0f1b2d;
  color: #fff;
  padding: 0 12px;
  font-size: 16px;
  outline: none;
}

.calc-actions,
.manager-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.action-btn {
  height: 40px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 560;
}

.action-btn.primary {
  background: linear-gradient(180deg, #d82028, #a90911);
  color: #fff;
}

.action-btn.secondary {
  background: #111d2e;
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
}

.result-box {
  margin-top: 12px;
  border: 1px solid rgba(244, 207, 135, .18);
  background: linear-gradient(180deg, #17191f, #121821);
  border-radius: 15px;
  padding: 15px;
}

.result-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, .76);
}

.result-line:last-child {
  margin-bottom: 0;
}

.result-strong {
  font-size: 22px;
  font-weight: 680;
  color: #f2cd7c;
}

.calc-tip {
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.manager-banner {
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #241607, #101725);
  border: 1px solid rgba(244, 207, 135, .16);
  margin-bottom: 12px;
}

.manager-banner h2 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #f2cd7c;
}

.manager-banner p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .78);
}

.post-list {
  display: grid;
  gap: 9px;
}

.post-card {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .075);
}

.post-card strong {
  display: block;
  font-size: 14px;
}

.post-card p {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.65;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(9, 18, 31, .98);
  border-top: 1px solid rgba(255, 255, 255, .075);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 50;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .28);
}

.nav-item {
  position: relative;
  background: transparent;
  color: var(--nav);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 520;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  display: block;
}

.nav-item.active {
  color: #ff4149;
}

.nav-item.active svg .stroke,
.nav-item.active svg .fill {
  stroke: #ff4149 !important;
  fill: #ff4149 !important;
}

.nav-item:not(.active) svg .stroke {
  stroke: #98a1ad;
}

.nav-item:not(.active) svg .fill {
  fill: #98a1ad;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: #ff4149;
}

.nav-item:disabled {
  opacity: .45;
}

.toast,
.loading {
  position: fixed;
  left: 50%;
  z-index: 80;
  max-width: min(320px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(24, 35, 51, .94);
  color: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .2);
  transform: translateX(-50%);
  font-size: 13px;
}

.toast {
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.loading {
  top: 88px;
}

.loading[hidden],
.toast[hidden],
.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .top-header {
    padding-left: 10px;
    padding-right: 10px;
  }

  .store-name {
    max-width: 158px;
  }
}
