/* ===== Partner Page ===== */
.partner-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.partner-display-area {
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.partner-canvas {
  width: 280px;
  height: 360px;
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--color-border-light);
}

.partner-canvas svg {
  width: 100%;
  height: 100%;
}

.partner-mood-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.partner-speech {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-card);
  max-width: 280px;
  text-align: center;
  font-weight: 600;
  color: var(--color-text-secondary);
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-speech::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid white;
}

/* ===== Partner Customization Panel ===== */
.partner-customize {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.partner-tab-content {
  display: none;
}

.partner-tab-content.active {
  display: block;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-sm);
}

.item-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.item-card:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
}

.item-card.equipped {
  border-color: var(--color-primary);
  background: var(--color-primary-lighter);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.item-card.owned {
  border-color: var(--color-success);
}

.item-card.locked {
  opacity: 0.6;
  cursor: default;
}

.item-preview {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
}

.item-name {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
}

.item-price {
  font-size: var(--text-xs);
  color: var(--color-warning-dark);
  font-weight: 600;
}

/* ===== Partner in Header (mini) ===== */
.partner-mini {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  background: var(--color-bg-alt);
}

.partner-mini:hover {
  background: var(--color-primary-lighter);
  transform: scale(1.1);
}

.partner-mini svg {
  width: 28px;
  height: 28px;
}

/* ===== Partner on Landing ===== */
.landing-partner {
  width: 200px;
  height: 260px;
}

.landing-partner svg {
  width: 100%;
  height: 100%;
}

/* ===== Affection Meter ===== */
.affection-meter {
  width: 100%;
  max-width: 280px;
}

.affection-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.affection-bar {
  height: 8px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.affection-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-pink);
  transition: width var(--transition-slow);
}

/* ===== Partner Tab Buttons ===== */
.partner-tabs {
  display: flex;
  gap: var(--space-xs);
  background: var(--color-bg-alt);
  padding: var(--space-xs);
  border-radius: var(--radius-full);
}

.partner-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  color: var(--color-text-secondary);
  text-align: center;
  cursor: pointer;
}

.partner-tab:hover {
  color: var(--color-text);
}

.partner-tab.active {
  background: white;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .partner-page {
    grid-template-columns: 1fr;
  }

  .partner-display-area {
    position: static;
  }

  .partner-canvas {
    width: 200px;
    height: 260px;
  }

  .landing-partner {
    width: 150px;
    height: 200px;
  }
}
