/* Profile card, shop and particle effects. Measurements follow LearnGeo. */

.cz-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
.cz-side { position: sticky; top: 78px; }
.cz-hint { margin-top: 10px; text-align: center; }
.cz-balance { display: flex; justify-content: center; margin-top: 14px; }
.i.cz-gem { width: 14px; height: 14px; }

.cz-tabs {
  display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.cz-tab {
  height: 42px; padding: 0 12px; font-family: var(--ui); font-size: .92rem; font-weight: 650;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.cz-tab:hover { color: var(--ink); }
.cz-tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.cz-panels .field input,
.cz-panels .field textarea { width: 100%; }
.cz-panels textarea {
  padding: 13px 15px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface);
  font-weight: 600; min-height: 96px; resize: vertical;
}
.cz-panels textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.cz-shop-head { margin-bottom: 14px; }
.cz-shop-head b { display: block; font-family: var(--ui); font-size: 1rem; }
.cz-shop-head p { margin-top: 2px; }

.seg { display: flex; gap: 4px; padding: 3px; background: var(--bg); border-radius: 12px; border: 1px solid var(--line); }
.seg button {
  flex: 1; min-height: 34px; border-radius: 9px; font-family: var(--ui); font-size: .82rem; font-weight: 650;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.cz-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

.profile-card {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: var(--sh-2); position: relative; text-align: center;
}
.profile-card__banner { height: 78px; position: relative; }
.profile-card__body {
  padding: 0 18px 20px; position: relative;
  display: flex; flex-direction: column; align-items: center;
}
.profile-card__avatar {
  width: 82px; height: 82px; margin-top: -41px; position: relative;
  border-radius: 50%; background: var(--surface); padding: 4px;
}
.pcav { position: relative; display: block; width: 100%; height: 100%; }
.pcav__img {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  display: grid; place-items: center; font-size: 2.15rem; line-height: 1;
}
.pcav__ring { position: absolute; inset: -3px; border-radius: 50%; }
.pcav__badge {
  position: absolute; right: -8%; top: -10%; z-index: 2;
  width: 44%; height: 44%; min-width: 13px; min-height: 13px;
  border-radius: 50%; background: var(--surface);
  box-shadow: 0 1px 3px rgba(13, 26, 61, .22);
  display: grid; place-items: center; padding: 14%;
}
.pcav__badge svg { width: 100%; height: 100%; display: block; }
.pcav__orbit {
  position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px dashed currentColor; animation: pcav-spin 7s linear infinite;
}
.pcav__orbit i {
  position: absolute; top: -3.5px; left: 50%; margin-left: -3.5px;
  width: 7px; height: 7px; border-radius: 50%;
}
@keyframes pcav-spin { to { transform: rotate(360deg); } }
.pcav__status {
  position: absolute; right: -1%; bottom: -1%; z-index: 2;
  width: 30%; height: 30%; min-width: 12px; min-height: 12px;
  border-radius: 50%; border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 .5px rgba(13, 26, 61, .08);
}
.profile-card__name {
  margin-top: 12px; font-family: var(--ui); font-size: 19px; font-weight: 700; letter-spacing: -.024em;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 5px 13px; border-radius: 10px; max-width: 100%;
}
.profile-card__name .pc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card__tag {
  font-family: var(--ui); font-size: 12.5px; font-weight: 650; margin-top: 6px;
  display: inline-flex; align-items: center; gap: 6px;
}
.profile-card__pronouns { font-size: 12.5px; margin-top: 3px; }
.profile-card__about {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13.5px; white-space: pre-wrap; word-break: break-word; width: 100%;
}
.profile-card__stats {
  margin-top: 16px; display: flex; gap: 22px; justify-content: center;
  width: 100%; padding-top: 14px; border-top: 1px solid var(--line);
}
.profile-card__stat { text-align: center; }
.profile-card__stat b { font-family: var(--ui); font-size: 17px; font-weight: 700; display: block; }
.profile-card__stat span { font-size: 11.5px; }

.profile-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.profile-fx i { position: absolute; display: block; animation: fxfall linear infinite; }
.fx-dot { width: 6px; height: 6px; border-radius: 50%; }
.fx-rect { width: 6px; height: 9px; border-radius: 1px; }
.fx-ring { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid; background: none !important; }
.fx-drop { width: 4px; height: 10px; border-radius: 0 0 3px 3px / 0 0 6px 6px; }
.fx-star { width: 8px; height: 8px; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.fx-leaf { width: 9px; height: 6px; border-radius: 9px 0 9px 0; }
.fx-wing {
  width: 11px; height: 8px; position: relative;
  border-radius: 10px 11px 5px 9px / 9px 8px 4px 8px;
  box-shadow: inset -1px -1px 0 rgba(0, 0, 0, .14);
}
.fx-wing::after {
  content: ''; position: absolute; left: -3px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 3.2px; border-radius: 3px; background: #F7EEDC;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12);
}
.fx-dice {
  width: 12px; height: 12px; border-radius: 3px; position: relative;
  box-shadow: inset 0 0 0 .5px rgba(10, 10, 11, .18);
}
.fx-dice::after {
  content: ''; position: absolute; inset: 0; border-radius: 3px;
  background:
    radial-gradient(circle at 28% 28%, #1C1F26 0 .95px, transparent 1.05px),
    radial-gradient(circle at 50% 50%, #1C1F26 0 .95px, transparent 1.05px),
    radial-gradient(circle at 72% 72%, #1C1F26 0 .95px, transparent 1.05px);
}
.fx-crest {
  width: 10px; height: 10px;
  clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
}
@keyframes fxfall {
  from { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  12% { opacity: .9; }
  to { transform: translateY(230px) rotate(280deg); opacity: 0; }
}

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
.shop-item {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px 11px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--surface); position: relative; transition: transform .15s var(--ease), box-shadow .15s, border-color .15s;
}
.shop-item:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.shop-item.is-equipped { border-color: var(--brand); background: var(--brand-soft); }
.shop-item.is-locked .shop-item__vis { opacity: .55; }
.shop-item__vis {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  position: relative; font-size: 28px; line-height: 1;
}
.shop-item__vis--bar { width: 100%; height: 32px; border-radius: 8px; font-family: var(--ui); font-size: 11px; font-weight: 700; }
.shop-item__vis--fx { display: flex; align-items: center; justify-content: center; gap: 3px; }
.shop-item__disc {
  width: 100%; height: 100%; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-size: 22px;
}
.shop-item__vis-inner { display: block; line-height: 1; }
.shop-item__badge {
  position: absolute; top: -2px; right: -2px; width: 20px; height: 20px;
  background: var(--surface); border-radius: 50%; padding: 3px;
  box-shadow: 0 1px 3px rgba(13, 26, 61, .2); display: grid; place-items: center;
}
.shop-item__badge svg { width: 100%; height: 100%; display: block; }
.shop-item__name { font-family: var(--ui); font-size: 12.5px; font-weight: 650; text-align: center; line-height: 1.3; }
.shop-item__price {
  font-family: var(--ui); font-size: 12px; font-weight: 700; color: #0369A1;
  display: inline-flex; align-items: center; gap: 4px;
}
.shop-item__owned { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; }
.shop-item__eq { font-family: var(--ui); font-size: 11px; color: var(--brand); font-weight: 800; letter-spacing: .04em; }

.cz-modal {
  position: fixed; inset: 0; z-index: 120; background: rgba(13, 26, 61, .42);
  display: grid; place-items: center; padding: 24px;
}
.cz-dialog {
  width: min(420px, 100%); background: var(--surface); border-radius: 18px;
  box-shadow: var(--sh-3); padding: 22px; text-align: center;
}
.cz-dialog h2 { font-family: var(--ui); font-size: 1.25rem; font-weight: 800; }
.cz-dialog-vis { display: flex; justify-content: center; margin: 16px 0 8px; }
.cz-dialog p { margin-top: 8px; }
.cz-dialog-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

@media (max-width: 860px) {
  .cz-split { grid-template-columns: minmax(0, 1fr); }
  .cz-side { position: static; order: -1; max-width: 380px; margin-bottom: 8px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
}

/* Animal avatars (js/avatar.js) */
.pcav__img > .ani-svg { width: 86%; height: 86%; display: block; }
.shop-item__vis > .ani-svg { width: 86%; height: 86%; display: block; }
.shop-item__vis-inner > .ani-svg { width: 30px; height: 30px; display: block; }
