/* ===== HOME ===== */
.hero-greeting { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.hero-greeting .avatar { width: 48px; height: 48px; font-size: 18px; }
.hero-hi h1 { font-size: 20px; letter-spacing: .2px; }
.hero-hi p {
  font-size: 10.5px; color: var(--muted); font-weight: 800;
  letter-spacing: 1.8px; text-transform: uppercase;
}

.balance-card {
  margin-top: 16px;
  background:
    radial-gradient(340px 130px at 85% -30%, rgba(255,209,102,.16), transparent 60%),
    linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(var(--accent-rgb),.22);
  border-radius: 20px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.balance-label { font-size: 10.5px; letter-spacing: 1.6px; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.balance-value { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.balance-value .amount {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 800; color: var(--gold); letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.coin-big {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #FFE9B0, #F0AE33 72%);
  box-shadow: inset 0 -3px 5px rgba(120,60,0,.25), 0 4px 14px rgba(255,190,80,.15);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 14px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--card);
}
.qa-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 4px 12px;
  font-size: 10.5px; font-weight: 800; color: var(--muted);
  transition: background .15s ease;
}
.qa-item + .qa-item::before {
  content: '';
  position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 1px;
  background: var(--stroke);
}
.qa-item:active { background: var(--hover-soft); }
.qa-item svg {
  width: 32px; height: 32px;
  padding: 7px;
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

/* Home hero */
.home-hero-host { margin-top: 4px; }
.home-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(var(--accent-rgb), .2);
  background:
    radial-gradient(80% 60% at 85% 0%, rgba(var(--accent-rgb), .3), transparent 60%),
    linear-gradient(160deg, var(--surface-2), var(--surface-deep));
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.8);
  animation: heroIn .35s ease both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
  to { opacity: 1; transform: none; }
}
.hh-art {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.home-hero .art-fallback.hh-art { position: absolute; inset: 0; }
.hh-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,7,12,.62) 0%, rgba(8,7,12,.05) 34%, rgba(8,7,12,.18) 52%, rgba(8,7,12,.93) 100%),
    linear-gradient(90deg, rgba(8,7,12,.55) 0%, transparent 65%);
}
.hh-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 14px 0;
}
.hh-user {
  display: flex; align-items: center; gap: 9px;
  min-width: 0;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: rgba(9,8,14,.48);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
}
.hh-user .avatar { border: 1px solid rgba(255,255,255,.45); flex-shrink: 0; }
.hh-user-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.05; }
.hh-user-copy p {
  font-size: 8.5px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: rgba(255,255,255,.68);
  white-space: nowrap;
}
.hh-user-copy b {
  margin-top: 3px;
  max-width: 150px;
  font-size: 12px; font-weight: 800; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hh-tag {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(9,8,14,.52);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: 8.5px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.hh-body { position: relative; z-index: 2; padding: 70px 18px 18px; }
.hh-kicker { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hh-rarity {
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.hh-dot { color: rgba(255,255,255,.4); font-size: 11px; }
.hh-anime {
  min-width: 0;
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,.7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hh-name {
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1.03;
  letter-spacing: -.4px;
  text-shadow: 0 4px 24px rgba(0,0,0,.55);
}
.hh-sub {
  margin-top: 6px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.72);
}
.hh-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.hh-spin { box-shadow: 0 10px 24px rgba(var(--accent-rgb),.35); }
.hh-view {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.24);
  color: #fff;
  backdrop-filter: blur(8px);
}
.hh-view svg { width: 14px; height: 14px; }

/* Home rails */
.home-rail .char-card { flex: 0 0 150px; width: 150px; }
.home-rail .char-info { padding: 9px 10px 11px; }
.home-rail .char-name { font-size: 12.5px; }
.home-rail .char-sub { font-size: 10px; margin-top: 4px; }
.home-rail .count-chip { top: 7px; right: 7px; }
.home-empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 5px;
  padding: 22px 16px;
  border-radius: 18px;
  border: 1px dashed var(--stroke-strong);
  background: var(--card);
}
.he-ic {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  margin-bottom: 2px;
}
.he-ic svg { width: 22px; height: 22px; }
.he-title { font-size: 14px; font-weight: 800; }
.he-sub { max-width: 270px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.home-empty .btn { margin-top: 9px; }

.spin-banner {
  margin-top: 16px;
  border-radius: 20px;
  background:
    radial-gradient(240px 160px at 90% 110%, rgba(var(--accent-rgb), .15), transparent 65%),
    var(--gradient);
  padding: 18px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 12px 30px rgba(var(--accent-rgb),  .35);
  transition: transform .15s ease;
  overflow: hidden;
  position: relative;
}
.spin-banner:active { transform: scale(.98); }
.spin-banner .sb-copy { min-width: 0; position: relative; z-index: 1; }
.spin-banner .sb-title { color: var(--on-accent); font-size: 17px; font-weight: 800; }
.spin-banner .sb-sub { color: var(--on-accent); opacity: .82; font-size: 12.5px; font-weight: 600; margin-top: 3px; }
.spin-banner .sb-cta {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 5px;
  flex-shrink: 0;
  background: rgba(11,10,20,.55);
  backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 800;
  white-space: nowrap;
}
.spin-banner .sb-cta svg { width: 14px; height: 14px; }
.sb-orb {
  position: absolute; right: 118px; top: -26px;
  width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.5), transparent 60%);
  opacity: .5;
}

.hscroll {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.hscroll > * { flex-shrink: 0; scroll-snap-align: start; }

.auc-mini {
  width: 168px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
  animation: cardIn .25s ease both;
}
.auc-mini .art { aspect-ratio: 16/11; position: relative; overflow: hidden; background: var(--card-2); }
.auc-mini .art img { width: 100%; height: 100%; object-fit: cover; }
.auc-mini .info { padding: 10px 12px 12px; }
.auc-mini .nm { font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auc-mini .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 11.5px; }

.price-tag { color: var(--gold); font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.price-tag::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #FFE7A8, #F5B93E 70%); }

.timer-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 800;
  color: var(--muted);
  background: var(--chip-bg);
  border-radius: 999px; padding: 2px 8px;
}
.timer-chip.hot { color: var(--danger); background: rgba(var(--danger-rgb),.1); }

.event-strip {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid var(--gold-border);
  background: rgba(255,209,102,.07);
  padding: 13px 15px;
  display: flex; align-items: center; gap: 12px;
}
.event-strip .es-dot { width: 38px; height: 38px; border-radius: 13px; background: rgba(255,209,102,.14); display: grid; place-items: center; font-size: 19px; }

/* ===== HAREM / SEARCH ===== */
.search-bar { position: relative; margin-bottom: 12px; }
.search-bar input { padding-left: 40px; border-radius: 999px; background: var(--card); }
.search-bar svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--muted); pointer-events: none;
}

.sort-select {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.sort-select option { background: var(--surface); color: var(--text); }
.sort-select {
  width: auto; padding: 8px 30px 8px 12px;
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  appearance: none; border-radius: 999px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}

.result-count { font-size: 12px; color: var(--muted); font-weight: 700; margin: 0 2px 10px; }

/* ===== CHARACTER DETAIL ===== */
.char-hero {
  position: relative;
  border-radius: 22px; overflow: hidden;
  aspect-ratio: 3/3.4;
  background: var(--card);
  border: 1px solid var(--stroke);
}
.char-hero img { width: 100%; height: 100%; object-fit: cover; }
.char-hero .hero-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,10,20,.15), rgba(11,10,20,.88) 78%); }
.char-hero .hero-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; }
.char-hero h1 { font-size: 23px; line-height: 1.2; }
.hero-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }

.back-btn {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  width: 36px; height: 36px; border-radius: 12px;
  background: rgba(11,10,20,.62);
  backdrop-filter: blur(8px);
  border: 1px solid var(--stroke-strong);
  display: grid; place-items: center; color: #fff;
}
.back-btn svg { width: 18px; height: 18px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.dg-cell { background: var(--card); border: 1px solid var(--stroke); border-radius: 14px; padding: 12px 14px; }
.dg-cell .k { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.dg-cell .v { font-size: 15px; font-weight: 800; margin-top: 3px; }

.action-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 16px; }
.action-btn {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 15px;
  padding: 13px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; color: var(--text);
  transition: transform .14s ease;
}
.action-btn:active { transform: scale(.93); }
.action-btn svg { width: 20px; height: 20px; }
.action-btn.accent { color: var(--gold); }
.action-btn.faved { color: var(--danger); border-color: rgba(var(--danger-rgb),.35); }
