.cardsHero{ padding-bottom: 40px; }

.cards-root{ padding: 8px 0 96px; }


.filter-box{
  position: relative;
  z-index: 3;
  margin: -10px 0 30px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.filter-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.filter-field label{
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.filter-field input,
.filter-field select{
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: var(--lav-50);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.filter-field input:focus,
.filter-field select:focus{
  border-color: var(--lav-500);
  background: #fff;
  box-shadow: 0 0 0 4px var(--lav-100);
}
.filter-field input::placeholder{ color: #A9A2C2; }
.filter-field select{
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236457A6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
.filter-actions{ display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.filter-actions .btn{ min-height: 44px; padding: 0 20px; font-size: 14px; }


.breadcrumb{ display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.bc-item{
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.bc-item:hover{ color: var(--lav-700); border-color: var(--lav-400); }
.bc-item.active{ background: var(--lav-900); border-color: var(--lav-900); color: #fff; cursor: default; }
.bc-sep{ color: var(--lav-400); }


.level-header{ margin-bottom: 18px; }
.level-header h1{
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -.035em;
  line-height: 1.05;
}
.level-header p{ margin: 0; color: var(--muted); font-size: 15px; }

.btn-back{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: 0 3px 0 var(--lav-200);
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-back:hover{ border-color: var(--lav-400); color: var(--ink); }


.stats-bar{ display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.stats-bar span{ font-size: 14px; color: var(--muted); }
.stats-bar strong{ color: var(--lav-700); }


.shelf-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.shelf-item{
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s ease, border-color .25s ease;
}
.shelf-item:hover{ transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--lav-300); }
.shelf-thumb{ display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--lav-100); }
.shelf-thumb-empty{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--lav-100);
  color: var(--lav-400);
  font-size: 2.2rem;
}
.shelf-info{ padding: 11px 14px 14px; }
.shelf-name{ font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -.02em; line-height: 1.25; }
.shelf-badge{
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--lav-700);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(44,27,84,.12);
}


.cards-grid{ display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.card-item{
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: var(--lav-100);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s ease;
  content-visibility: auto;
  contain-intrinsic-size: 0 260px;
}
.card-item:hover{ transform: translateY(-4px) rotate(-.6deg); box-shadow: var(--shadow); }
.card-item img{ display: block; width: 100%; height: 100%; object-fit: cover; }
.card-empty{ display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--lav-400); font-size: 1.8rem; }
.card-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  background: linear-gradient(to top, rgba(44,27,84,.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .2s ease;
}
.card-item:hover .card-overlay{ opacity: 1; }
.co-idol{ color: #fff; font-weight: 800; font-size: 14px; }
.co-sub{ margin-top: 1px; color: var(--lav-300); font-size: 12px; font-weight: 600; }
.card-rarity{
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(44,27,84,.2);
}
.r1{ background: #DCEBFF; color: #2F5FB7; }
.r2{ background: var(--lav-300); color: var(--lav-800); }
.r3{ background: var(--butter); color: #A06A00; }
.r-ev{ background: #DDF1EA; color: #2C8A69; }


.pagination{ display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.page-btn{
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.page-btn:hover:not(:disabled){ border-color: var(--lav-400); }
.page-btn.active{ background: var(--lav-900); border-color: var(--lav-900); color: #fff; }
.page-btn:disabled{ opacity: .35; cursor: default; }
.page-dots{ color: var(--muted); padding: 0 4px; }


.state-box{ grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); }
.state-box i{ display: block; margin-bottom: 12px; font-size: 2rem; color: var(--lav-400); }
.state-box p{ margin: 0; font-size: 15px; font-weight: 600; }


.modal-bg{
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(44,27,84,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-bg.open{ opacity: 1; pointer-events: auto; }
.modal{
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(10px) scale(.97);
  transition: transform .3s var(--ease);
}
.modal-bg.open .modal{ transform: none; }
.modal img{ display: block; width: 100%; max-height: 52vh; object-fit: contain; background: var(--lav-100); }
.modal-body{ padding: 18px 22px 22px; }
.modal-idol{ margin: 0 0 2px; font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.03em; }
.modal-group{ margin: 0 0 12px; color: var(--lav-700); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.modal-chips{ display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip{
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--lav-100);
  color: var(--lav-700);
  font-size: 12px;
  font-weight: 700;
}
.owner-name{
  margin-left: 3px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--lav-900);
  color: #fff;
  font-weight: 800;
}
.modal-close{
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--lav-50);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.modal-close:hover{ background: var(--lav-100); }

@media (max-width: 980px){
  .filter-grid{ grid-template-columns: repeat(3, 1fr); }
  .cards-grid{ grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px){
  .filter-box{ padding: 16px; }
  .filter-grid{ grid-template-columns: 1fr 1fr; }
  .filter-actions .btn{ flex: 1; }
  .cards-grid{ grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .shelf-grid{ grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 420px){
  .cards-grid{ grid-template-columns: repeat(2, 1fr); }
}


.evField{ position: relative; }
.evField input{ padding-left: 13px; }
.evDot:not([hidden]) ~ input{ padding-left: 34px; }
.evDot{
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 1;
  width: 14px;
  height: 14px;
  padding: 0;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--lav-400);
  pointer-events: none;
}
.evPicker{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  width: max(100%, 260px);
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: pickIn .2s var(--ease);
}
@keyframes pickIn{ from{ opacity: 0; transform: translateY(-6px); } }
.evOpt{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.evOpt:hover{ background: var(--lav-50); }
.evOpt .tag{ font-size: 12px; padding: 4px 11px; }
.evOpt small{ color: var(--muted); font-weight: 700; font-size: 12px; }
.evAll{ color: var(--ink-2); font-weight: 700; font-size: 13px; }
.evEmpty{ margin: 8px; color: var(--muted); font-size: 13px; }
.chip.tag{ border: 0; }
.card-rarity.r-ev.tag{ padding: 0; font-size: 11px; }
.evPicker{ scrollbar-width: thin; scrollbar-color: var(--lav-400) transparent; }
.evPicker::-webkit-scrollbar{ width: 8px; }
.evPicker::-webkit-scrollbar-track{ background: transparent; }
.evPicker::-webkit-scrollbar-thumb{ background: var(--lav-400); border-radius: 999px; }

.wishBtn{ display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin-bottom: 8px; border-radius: 14px; border: 1px solid #F6C6D6; background: #fff; color: #E0558A; font: 800 14px/1 inherit; cursor: pointer; transition: background .15s ease; }
.wishBtn[hidden]{ display: none; }
.wishBtn:hover{ background: #FFF0F5; }
.wishBtn.is-on{ background: linear-gradient(120deg, #FF7BA6, #F0436B); border-color: transparent; color: #fff; }
.wishBtn.pop i{ animation: wishPop .5s cubic-bezier(.22,1.8,.36,1); }
@keyframes wishPop{ 40%{ transform: scale(1.6); } }
