/* ===== 韭菜商店: top-bar button, sheet shell, tabs ===== */
.leek-shop-dialog {
  width: min(560px, 100%);
  padding-bottom: 12px;
}
.leek-shop-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin: 0 32px 8px 0;
}
.leek-shop-dialog .leek-shop-head h2 {
  margin: 0;
}
.leek-shop-balance {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mute, #7a7066);
  font-variant-numeric: tabular-nums;
}
.leek-shop-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  margin: 2px 0 12px;
  padding: 0;
}
.leek-tab {
  flex: 1 1 0;
  min-width: 0;
  height: 36px;
  padding: 0 4px;
  white-space: nowrap;
  line-height: 1;
  border: 1.5px solid var(--line, #3a3530);
  border-radius: 999px;
  background: transparent;
  color: var(--ink, #2a2a2a);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.leek-tab.is-active {
  background: var(--ink, #2a2a2a);
  border-color: var(--ink, #2a2a2a);
  color: var(--paper, #fff1c9);
}
[data-theme="dark"] .leek-tab.is-active {
  background: var(--paper, #efe6d4);
  border-color: var(--paper, #efe6d4);
  color: var(--ink, #1c1a16);
}
.leek-shop-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px;
}
.leek-panel[hidden] {
  display: none !important;
}
.leek-panel .frame-grid {
  overflow: visible;
}
.leek-panel .cos-body {
  overflow: visible;
}
.leek-empty {
  padding: 28px 8px;
  text-align: center;
  color: var(--mute, #7a7066);
  font-size: 0.9rem;
}
@media (max-width: 420px) {
  .leek-tab {
    font-size: 0.8rem;
    letter-spacing: 0.02em;
  }
}

.leek-note {
  margin: 2px 2px 10px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--mute, #7a7066);
}

/* ===== 称号 chip (shown beside nicknames everywhere) ===== */
.ttl {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 5px;
  font-family: var(--kaiti, serif);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0.06em;
  white-space: nowrap;
  vertical-align: middle;
  overflow: hidden;
}
.ttl--plain {
  color: var(--ink, #2a2a2a);
  border: 1px dashed var(--line, #3a3530);
}
.ttl--red {
  color: #fff4e0;
  background: #c8321f;
  border: 1px solid #2b2622;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
}
.ttl--gold,
.ttl--shine {
  color: #4a3200;
  background: linear-gradient(180deg, #ffe88a, #f0bd2d);
  border: 1px solid #8c5b00;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}
.ttl--legend {
  color: #ffe27a;
  background: linear-gradient(180deg, #2c2418, #14110c);
  border: 1px solid #f0bd2d;
  text-shadow: 0 0 6px rgba(255, 214, 98, 0.85);
  box-shadow: 0 0 8px rgba(255, 196, 56, 0.55);
}
.ttl--shine::after,
.ttl--legend::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  transform: skewX(-18deg);
  animation: ttl-sweep 2.8s linear infinite;
}
.ttl--legend::after {
  background: linear-gradient(100deg, transparent, rgba(255, 226, 122, 0.65), transparent);
  animation-duration: 2.2s;
}
@keyframes ttl-sweep {
  0% { left: -60%; }
  60%, 100% { left: 130%; }
}
.ttl--lg {
  margin-left: 0;
  padding: 3px 14px;
  border-radius: 7px;
  font-size: 1.02rem;
  letter-spacing: 0.1em;
}
@media (prefers-reduced-motion: reduce) {
  .ttl--shine::after,
  .ttl--legend::after {
    animation: none;
    display: none;
  }
}

/* ===== 称号 tab ===== */
.title-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.title-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 10px;
  border: 1.5px dashed var(--line, #3a3530);
  border-radius: 14px;
  background: var(--paper-2, #efe4cc);
  text-align: center;
}
.title-card.is-owned,
.title-card.is-equipped {
  border-style: solid;
}
.title-card.is-equipped {
  border-color: var(--ink, #2a2a2a);
  background: var(--paper, #fff1c9);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.14);
}
.title-card--shine,
.title-card--legend {
  border-style: solid;
  border-color: #b8860b;
}
.title-card--legend {
  grid-column: 1 / -1;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 214, 98, 0.3), transparent 70%), var(--paper, #fff1c9);
  box-shadow: 0 0 0 1px rgba(255, 214, 98, 0.5), 3px 3px 0 rgba(0, 0, 0, 0.14);
}
.title-preview {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.title-cap {
  flex: 1 1 auto;
  width: 100%;
  min-height: 3.9em;
  max-height: 3.9em;
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--mute, #7a7066);
}

/* ===== 改名卡 tab ===== */
.rename-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 4px;
  text-align: center;
}
.rename-ticket {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 92px;
  border: 2px solid var(--ink, #2a2a2a);
  border-radius: 10px;
  background: var(--paper-2, #efe4cc);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.16);
  transform: rotate(-2deg);
}
.rename-ticket::before,
.rename-ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid var(--ink, #2a2a2a);
  border-radius: 50%;
  background: var(--paper, #f7f1e6);
}
.rename-ticket::before {
  left: -9px;
}
.rename-ticket::after {
  right: -9px;
}
.rename-ticket span {
  font-family: var(--kaiti, serif);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #c8321f;
}
.rename-ticket small {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--mute, #7a7066);
}
.rename-have {
  margin: 6px 0 0;
  font-size: 0.95rem;
}
.rename-have strong {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}
.rename-now {
  margin: 0;
  font-size: 0.78rem;
  color: var(--mute, #7a7066);
}
.rename-rules {
  margin: 8px 0 0;
  padding: 0 6px 0 22px;
  text-align: left;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--mute, #7a7066);
}
