/* ========================================================
   Dr.Clobo Advice — Core Stylesheet
   Figma: 2026 Advice (Gi29H0CPNNx79tObn7slfC)
   ======================================================== */

/* --- Design Tokens --- */
:root {
  /* Brand */
  --adv-brand: #02AED5;
  --adv-brand-dark: #0298BD;
  --adv-brand-light: #E8F7FA;
  --adv-brand-green: #0E8A6D;

  /* Text */
  --adv-text: #3F4342;
  --adv-text-secondary: #878B8A;
  --adv-text-muted: #ABAFAE;
  --adv-text-white: #FFFFFF;

  /* Backgrounds */
  --adv-bg: #F5F7F7;
  --adv-bg-card: #FFFFFF;
  --adv-bg-input: #F8F9FA;

  /* Borders */
  --adv-border: #E0E3E2;
  --adv-border-light: #F0F2F1;

  /* Shadows (Figma: 4px 4px 4px rgba(171,175,174,0.25)) */
  --adv-shadow-card: 4px 4px 4px rgba(171, 175, 174, 0.25);
  --adv-shadow-sm: 0 2px 4px rgba(171, 175, 174, 0.15);

  /* Radius (Figma: 20px for cards) */
  --adv-radius: 12px;
  --adv-radius-lg: 20px;
  --adv-radius-sm: 8px;
  --adv-radius-full: 9999px;

  /* Spacing */
  --adv-space-xs: 4px;
  --adv-space-sm: 8px;
  --adv-space-md: 12px;
  --adv-space-base: 16px;
  --adv-space-lg: 20px;
  --adv-space-xl: 24px;
  --adv-space-2xl: 32px;

  /* Font */
  --adv-font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --adv-font-size-xs: 11px;
  --adv-font-size-sm: 13px;
  --adv-font-size-base: 15px;
  --adv-font-size-md: 16px;
  --adv-font-size-lg: 18px;
  --adv-font-size-xl: 20px;
  --adv-font-size-2xl: 24px;

  /* Status Colors */
  --adv-status-requested: #02AED5;
  --adv-status-approved: #0E8A6D;
  --adv-status-declined: #E53E3E;
  --adv-status-in-progress: #FF9800;
  --adv-status-completed: #878B8A;
  --adv-status-reviewed: #0E8A6D;
  --adv-status-cancelled: #E53E3E;

  /* Safe Area (WebView) */
  --adv-safe-top: env(safe-area-inset-top, 0px);
  --adv-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- Reset & Base (connect/journalのcnt_style.cssと同じリセット) --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.is-clobo-app {
  padding-top: var(--adv-safe-top);
  padding-bottom: var(--adv-safe-bottom);
}
body.is-clobo-app .shared-header,
body.is-clobo-app .shared-footer { display: none; }

/* --- Layout --- */
.adv-page-wrapper {
  min-height: 100vh;
  background: var(--adv-bg);
  font-family: var(--adv-font);
  color: var(--adv-text);
  -webkit-font-smoothing: antialiased;
}

.adv-main-content {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--adv-space-base);
  padding-bottom: calc(var(--adv-space-2xl) + var(--adv-safe-bottom));
}

/* --- Page Header (internal pages) --- */
.adv-page-header {
  display: flex;
  align-items: center;
  gap: var(--adv-space-md);
  padding: var(--adv-space-md) 0;
  margin-bottom: var(--adv-space-base);
}
.adv-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--adv-radius-sm);
  color: var(--adv-text);
  transition: background 0.15s;
}
.adv-back-btn:hover { background: var(--adv-border-light); }
.adv-page-title {
  font-size: var(--adv-font-size-lg);
  font-weight: 600;
  color: var(--adv-text);
}

/* --- Cards --- */
.adv-card {
  background: var(--adv-bg-card);
  border: 1px solid var(--adv-border);
  border-radius: var(--adv-radius-lg);
  box-shadow: var(--adv-shadow-card);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.adv-card:hover {
  transform: translateY(-1px);
  box-shadow: 4px 6px 8px rgba(171, 175, 174, 0.30);
}
.adv-card-body { padding: var(--adv-space-lg); }

/* --- Category Cards (Advice Home) --- */
.adv-category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--adv-space-base);
  margin-top: var(--adv-space-lg);
}
.adv-category-card {
  display: flex;
  align-items: center;
  gap: var(--adv-space-base);
  padding: var(--adv-space-lg);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  min-height: 100px;
}
.adv-category-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--adv-radius);
  background: var(--adv-brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.adv-category-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.adv-category-info { flex: 1; }
.adv-category-name {
  font-size: var(--adv-font-size-md);
  font-weight: 600;
  color: var(--adv-text);
  margin-bottom: var(--adv-space-xs);
}
.adv-category-desc {
  font-size: var(--adv-font-size-sm);
  color: var(--adv-text-secondary);
  line-height: 1.4;
}
.adv-category-arrow {
  flex-shrink: 0;
  color: var(--adv-text-muted);
}

/* --- Buttons --- */
.adv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--adv-space-sm);
  height: 48px;
  padding: 0 var(--adv-space-xl);
  border: none;
  border-radius: var(--adv-radius);
  font-family: var(--adv-font);
  font-size: var(--adv-font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
}
.adv-btn-primary {
  background: var(--adv-brand);
  color: var(--adv-text-white);
}
.adv-btn-primary:hover { background: var(--adv-brand-dark); }
.adv-btn-primary:disabled {
  background: var(--adv-border);
  color: var(--adv-text-muted);
  cursor: not-allowed;
}
.adv-btn-outline {
  background: transparent;
  color: var(--adv-brand);
  border: 1.5px solid var(--adv-brand);
}
.adv-btn-outline:hover { background: var(--adv-brand-light); }
.adv-btn-full { width: 100%; }
.adv-btn-sm { height: 36px; font-size: var(--adv-font-size-sm); padding: 0 var(--adv-space-base); }

/* --- Form Fields --- */
.adv-field { margin-bottom: var(--adv-space-lg); }
.adv-label {
  display: block;
  font-size: var(--adv-font-size-sm);
  font-weight: 600;
  color: var(--adv-text);
  margin-bottom: var(--adv-space-sm);
}
.adv-input,
.adv-textarea {
  width: 100%;
  padding: var(--adv-space-md) var(--adv-space-base);
  border: 1px solid var(--adv-border);
  border-radius: var(--adv-radius-sm);
  font-family: var(--adv-font);
  font-size: var(--adv-font-size-base);
  color: var(--adv-text);
  background: var(--adv-bg-card);
  transition: border-color 0.15s;
  outline: none;
}
.adv-input:focus,
.adv-textarea:focus { border-color: var(--adv-brand); }
.adv-input::placeholder,
.adv-textarea::placeholder { color: var(--adv-text-muted); }
.adv-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}
.adv-char-count {
  text-align: right;
  font-size: var(--adv-font-size-xs);
  color: var(--adv-text-muted);
  margin-top: var(--adv-space-xs);
}

/* --- Chips (Subcategory Selection) --- */
.adv-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--adv-space-sm);
}
.adv-chip-group--icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: var(--adv-space-base);
}
.adv-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 var(--adv-space-md);
  border: 1px solid var(--adv-border);
  border-radius: var(--adv-radius-full);
  font-size: var(--adv-font-size-sm);
  color: var(--adv-text-secondary);
  background: var(--adv-bg-card);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.adv-chip--icon {
  flex-direction: column;
  justify-content: center;
  height: auto;
  padding: var(--adv-space-md) var(--adv-space-sm);
  border-radius: var(--adv-radius-lg);
  text-align: center;
  gap: var(--adv-space-sm);
}
.adv-chip--icon .adv-chip-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--adv-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: background 0.15s;
}
.adv-chip--icon .adv-chip-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.adv-chip--icon span {
  font-size: 12px;
  line-height: 1.3;
  word-break: keep-all;
}
.adv-chip--icon.selected .adv-chip-icon-wrap {
  background: rgba(255,255,255,0.25);
}
.adv-chip:hover { border-color: var(--adv-brand); color: var(--adv-brand); }
.adv-chip.selected {
  background: var(--adv-brand);
  color: var(--adv-text-white);
  border-color: var(--adv-brand);
}

/* --- Filter Bar (Adviser List) --- */
.adv-filter-bar {
  display: flex;
  gap: var(--adv-space-sm);
  margin-bottom: var(--adv-space-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.adv-filter-bar::-webkit-scrollbar { display: none; }
.adv-filter-btn {
  flex-shrink: 0;
  height: 36px;
  padding: 0 var(--adv-space-base);
  border: 1px solid var(--adv-border);
  border-radius: var(--adv-radius-full);
  background: var(--adv-bg-card);
  font-family: var(--adv-font);
  font-size: var(--adv-font-size-sm);
  color: var(--adv-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.adv-filter-btn:hover { border-color: var(--adv-brand); color: var(--adv-brand); }
.adv-filter-btn.active {
  background: var(--adv-brand);
  color: var(--adv-text-white);
  border-color: var(--adv-brand);
}

/* --- Advisor Card --- */
.adv-advisor-card {
  display: flex;
  align-items: center;
  gap: var(--adv-space-base);
  padding: var(--adv-space-base);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.adv-advisor-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--adv-border-light);
}
.adv-advisor-info { flex: 1; min-width: 0; }
.adv-advisor-name {
  font-size: var(--adv-font-size-base);
  font-weight: 600;
  color: var(--adv-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adv-advisor-meta {
  font-size: var(--adv-font-size-xs);
  color: var(--adv-text-secondary);
  margin-top: 2px;
}
.adv-advisor-services {
  display: flex;
  gap: var(--adv-space-sm);
  margin-top: var(--adv-space-xs);
}
.adv-service-badge {
  font-size: var(--adv-font-size-xs);
  padding: 2px 8px;
  border-radius: var(--adv-radius-full);
  font-weight: 500;
}
.adv-service-badge.message {
  background: var(--adv-brand-light);
  color: var(--adv-brand);
}
.adv-service-badge.chatting {
  background: #FFF3E0;
  color: #FF9800;
}
.adv-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  flex-shrink: 0;
}

/* --- Status Badge --- */
.adv-status-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--adv-radius-full);
  font-size: var(--adv-font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
}
.adv-status-badge.requested { background: #E8F7FA; color: var(--adv-status-requested); }
.adv-status-badge.approved { background: #E8F5E9; color: var(--adv-status-approved); }
.adv-status-badge.declined { background: #FFEBEE; color: var(--adv-status-declined); }
.adv-status-badge.in-progress { background: #FFF3E0; color: var(--adv-status-in-progress); }
.adv-status-badge.completed { background: #F5F5F5; color: var(--adv-status-completed); }
.adv-status-badge.reviewed { background: #E8F5E9; color: var(--adv-status-reviewed); }
.adv-status-badge.cancelled { background: #FFEBEE; color: var(--adv-status-cancelled); }

/* --- Section Headers --- */
.adv-section-label {
  font-size: var(--adv-font-size-xs);
  font-weight: 700;
  color: var(--adv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--adv-space-md);
}

/* --- Divider --- */
.adv-divider {
  height: 1px;
  background: var(--adv-border-light);
  margin: var(--adv-space-base) 0;
}

/* --- Star Rating --- */
.adv-star-group { display: flex; gap: 2px; }
.adv-star {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: var(--adv-border);
  transition: color 0.1s;
}
.adv-star.filled { color: #FFC107; }
.adv-star:hover { color: #FFD54F; }

/* --- Empty State --- */
.adv-empty {
  text-align: center;
  padding: var(--adv-space-2xl);
  color: var(--adv-text-muted);
}
.adv-empty-icon { font-size: 48px; margin-bottom: var(--adv-space-base); }
.adv-empty-text { font-size: var(--adv-font-size-base); }

/* --- Loading Spinner --- */
.adv-spinner {
  display: flex;
  justify-content: center;
  padding: var(--adv-space-2xl);
}
.adv-spinner::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid var(--adv-border);
  border-top-color: var(--adv-brand);
  border-radius: 50%;
  animation: adv-spin 0.6s linear infinite;
}
@keyframes adv-spin {
  to { transform: rotate(360deg); }
}

/* --- Consent Card --- */
.adv-consent-card {
  background: var(--adv-bg);
  border-radius: var(--adv-radius-sm);
  padding: var(--adv-space-base);
}
.adv-consent-check {
  display: flex;
  align-items: flex-start;
  gap: var(--adv-space-md);
  cursor: pointer;
}
.adv-consent-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--adv-brand);
  flex-shrink: 0;
}
.adv-consent-text {
  font-size: var(--adv-font-size-sm);
  color: var(--adv-text-secondary);
  line-height: 1.5;
}

/* --- Advice Home Header --- */
.adv-home-header {
  margin-bottom: var(--adv-space-sm);
}
.adv-home-title {
  font-size: var(--adv-font-size-2xl);
  font-weight: 700;
  color: var(--adv-text);
  margin: 0 0 var(--adv-space-sm) 0;
}
.adv-home-desc {
  font-size: var(--adv-font-size-base);
  color: var(--adv-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* --- Subcategory Selection --- */
.adv-selection-guide {
  font-size: var(--adv-font-size-base);
  color: var(--adv-text-secondary);
  margin-bottom: var(--adv-space-lg);
  line-height: 1.4;
}

/* ========================================================
   Advisor List — Figma 426 (390x900)
   ======================================================== */

/* Filter Tabs (pill shape, Figma: 110x34, radius 200px, bg #E1F5FA) */
.adv-filter-tabs {
  display: flex;
  gap: 9px;
  margin-bottom: var(--adv-space-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
}
.adv-filter-tabs::-webkit-scrollbar { display: none; }

.adv-filter-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 80px;
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 200px;
  background: #E1F5FA;
  font-family: var(--adv-font);
  font-size: 14px;
  font-weight: 400;
  color: var(--adv-text);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.adv-filter-tab:hover { background: #CCF0F7; }
.adv-filter-tab.active {
  background: var(--adv-brand);
  color: #FFFFFF;
  font-weight: 600;
}
.adv-filter-tab .adv-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
}

/* Selected subcategory chips (below filter) */
.adv-selected-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--adv-space-base);
}
.adv-sub-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--adv-radius-full);
  font-size: 12px;
  font-weight: 500;
  background: var(--adv-brand-light);
  color: var(--adv-brand);
}

/* Advisor Card List */
.adv-advisor-list {
  display: flex;
  flex-direction: column;
}

/* Advisor Card (Figma: 114px height, divider between) */
.adv-advisor-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--adv-border);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.adv-advisor-card:first-child { border-top: 1px solid var(--adv-border); }
.adv-advisor-card:hover { background: #FAFBFB; }

/* Left: Profile Image (Figma: 80x80) */
.adv-advisor-card-left { flex-shrink: 0; }
.adv-advisor-img-wrap { position: relative; }
.adv-advisor-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--adv-border-light);
}
.adv-advisor-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adv-text-muted);
}
.adv-online-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4CAF50;
  border: 2px solid #FFFFFF;
}

/* Center: Info */
.adv-advisor-card-center {
  flex: 1;
  min-width: 0;
}
.adv-advisor-card-center .adv-advisor-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--adv-brand);
  line-height: 1.2;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.adv-advisor-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--adv-text);
  line-height: 1.4;
  margin-top: 3px;
}
.adv-verified-badge {
  width: 16px;
  height: 16px;
  color: var(--adv-brand);
}

/* Right: Action Buttons (Figma: 36x36 circle) */
.adv-advisor-card-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adv-advisor-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adv-advisor-action-btn.active {
  background: #E1F5FA;
  color: var(--adv-brand);
}
.adv-advisor-action-btn.disabled {
  background: var(--adv-border);
  color: #FFFFFF;
}

/* Load More */
.adv-load-more {
  display: flex;
  justify-content: center;
  padding: var(--adv-space-lg) 0;
}

/* ========================================================
   Advisor Profile — Figma 50 (390x844)
   ======================================================== */

.adv-profile-content {
  min-height: 300px;
}

/* Profile Header */
.adv-profile-header {
  text-align: center;
  margin-bottom: var(--adv-space-lg);
}
.adv-profile-img-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--adv-space-base);
}
.adv-profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--adv-border-light);
}
.adv-profile-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adv-text-muted);
}

/* Profile Name (Figma: 32px SemiBold #02AED5) */
.adv-profile-name {
  font-size: 32px;
  font-weight: 600;
  color: var(--adv-brand);
  line-height: 1.2;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.adv-verified-badge-lg {
  width: 24px;
  height: 24px;
  color: var(--adv-brand);
}
.adv-profile-intro {
  font-size: 14px;
  color: var(--adv-text-secondary);
  margin: var(--adv-space-sm) 0 0;
}

/* Info Card (Figma: bg #F5F7F7, radius 8px) */
.adv-profile-info-card {
  background: var(--adv-bg);
  border-radius: 8px;
  padding: var(--adv-space-lg);
  margin-bottom: var(--adv-space-lg);
}
.adv-profile-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 18px;
  color: var(--adv-text);
  line-height: 1.3;
}
.adv-profile-info-row + .adv-profile-info-row {
  margin-top: 12px;
}
.adv-profile-info-row i {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--adv-text);
  margin-top: 1px;
}

/* Service Cards (Figma: 129x93, radius 15px, shadow 4px) */
.adv-service-cards {
  display: flex;
  gap: 22px;
  justify-content: center;
  margin-bottom: var(--adv-space-xl);
}
.adv-service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 129px;
  height: 93px;
  background: #FFFFFF;
  border: 1px solid var(--adv-border);
  border-radius: 15px;
  box-shadow: var(--adv-shadow-card);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: var(--adv-font);
  gap: 4px;
  padding: 0;
}
.adv-service-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 6px 8px rgba(171, 175, 174, 0.35);
}
.adv-service-icon {
  color: var(--adv-brand);
}
.adv-service-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--adv-text);
}
.adv-service-price {
  font-size: 14px;
  font-weight: 400;
  color: var(--adv-brand);
}

/* Credentials */
.adv-profile-credentials {
  margin-bottom: var(--adv-space-xl);
}
.adv-profile-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--adv-text);
  margin: 0 0 var(--adv-space-md);
}
.adv-credential-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.adv-credential-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--adv-radius-full);
  font-size: 12px;
  font-weight: 500;
  background: #E8F5F1;
  color: #0E8A6D;
}

/* Reviews Summary */
.adv-profile-reviews {
  margin-bottom: var(--adv-space-xl);
}
.adv-review-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}
.adv-review-stars { display: flex; gap: 2px; }
.adv-star-filled { color: #FFC107; }
.adv-star-empty { color: var(--adv-border); }
.adv-review-avg {
  font-size: 16px;
  font-weight: 600;
  color: var(--adv-text);
}
.adv-review-count {
  font-size: 13px;
  color: var(--adv-text-secondary);
}

/* SNS Links (Figma: 40x40 circle, gap 20px) */
.adv-profile-sns {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: var(--adv-space-xl);
}
.adv-sns-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--adv-text);
  background: #FFFFFF;
  color: var(--adv-text);
  transition: background 0.15s;
}
.adv-sns-btn:hover {
  background: var(--adv-bg);
}

/* ========================================================
   Icon Sizes (Lucide)
   ======================================================== */
.adv-icon-14 { width: 14px; height: 14px; }
.adv-icon-16 { width: 16px; height: 16px; }
.adv-icon-20 { width: 20px; height: 20px; }
.adv-icon-24 { width: 24px; height: 24px; }
.adv-icon-32 { width: 32px; height: 32px; }
.adv-icon-48 { width: 48px; height: 48px; }

/* Header spacer for centering title */
.adv-header-spacer { width: 36px; flex-shrink: 0; }

/* ========================================================
   Booking Page — Figma 421 (390x1000+)
   ======================================================== */

/* Service type badge */
.adv-booking-type-badge {
  margin-bottom: var(--adv-space-lg);
}
.adv-type-label {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  border-radius: var(--adv-radius-full);
  font-size: 14px;
  font-weight: 600;
}
.adv-type-label.massage  { background: #E1F5FA; color: var(--adv-brand); }
.adv-type-label.chatting { background: #FFF3E0; color: #FF9800; }
.adv-type-label.meeting  { background: #E8F5F1; color: #0E8A6D; }

/* Section */
.adv-booking-section {
  margin-bottom: var(--adv-space-lg);
}
.adv-booking-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--adv-text);
  margin: 0 0 var(--adv-space-base);
}

/* Labels & Inputs (Figma: 320 width, bg #F5F7F7, radius 12) */
.adv-booking-label {
  display: block;
  font-size: 16px;
  font-weight: 400;
  color: var(--adv-text);
  margin-bottom: 6px;
}
.adv-required { color: #E53E3E; }

.adv-booking-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: #F5F7F7;
  border: 1px solid #E0E3E2;
  border-radius: 12px;
  font-family: var(--adv-font);
  font-size: 15px;
  color: var(--adv-text);
  outline: none;
  transition: border-color 0.15s;
}
.adv-booking-input:focus { border-color: var(--adv-brand); }
.adv-booking-input::placeholder { color: #ABAFAE; }

.adv-booking-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  background: #F5F7F7;
  border: 1px solid #E0E3E2;
  border-radius: 12px;
  font-family: var(--adv-font);
  font-size: 15px;
  color: var(--adv-text);
  outline: none;
  resize: vertical;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.adv-booking-textarea:focus { border-color: var(--adv-brand); }
.adv-booking-textarea::placeholder { color: #ABAFAE; }

/* Attachment area */
.adv-attach-area { margin-top: 8px; }
.adv-attach-progress { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.adv-attach-progress-track {
  flex: 1;
  height: 10px;
  background: #F5F7F7;
  border-radius: 200px;
  overflow: hidden;
}
.adv-attach-progress-bar {
  height: 100%;
  background: var(--adv-brand);
  border-radius: 200px;
  transition: width 0.3s;
}
.adv-attach-size {
  font-size: 12px;
  color: var(--adv-brand);
  white-space: nowrap;
}
.adv-attach-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.adv-attach-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #F5F7F7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adv-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.adv-attach-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
}
.adv-attach-hint {
  font-size: 14px;
  color: #ABAFAE;
  margin: 6px 0 0;
}

/* For-whom toggle (Figma: bg #F5F7F7, radius 12, tabs) */
.adv-toggle-tabs {
  display: flex;
  background: #F5F7F7;
  border-radius: 12px;
  padding: 7px;
  margin-bottom: var(--adv-space-base);
}
.adv-toggle-tab {
  flex: 1;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: transparent;
  font-family: var(--adv-font);
  font-size: 16px;
  font-weight: 400;
  color: #ABAFAE;
  cursor: pointer;
  transition: all 0.15s;
}
.adv-toggle-tab.active {
  background: #FFFFFF;
  color: var(--adv-brand);
  font-weight: 500;
}

/* Patient info card */
.adv-patient-card {
  background: #FFFFFF;
  border: 1px solid #D5D8D7;
  border-radius: 12px;
  padding: var(--adv-space-lg);
}
.adv-patient-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adv-patient-row + .adv-patient-row { margin-top: 12px; }
.adv-patient-label {
  font-size: 16px;
  font-weight: 400;
  color: var(--adv-brand);
}
.adv-patient-value {
  font-size: 18px;
  font-weight: 400;
  color: var(--adv-text);
}
.adv-patient-empty {
  font-size: 14px;
  color: var(--adv-text-secondary);
  text-align: center;
  padding: var(--adv-space-lg) 0;
}

/* Sex buttons */
.adv-sex-buttons {
  display: flex;
  gap: 8px;
}
.adv-sex-btn {
  flex: 1;
  height: 38px;
  border: 1px solid #E0E3E2;
  border-radius: 8px;
  background: #FFFFFF;
  font-family: var(--adv-font);
  font-size: 14px;
  color: var(--adv-text);
  cursor: pointer;
  transition: all 0.15s;
}
.adv-sex-btn.active {
  background: var(--adv-brand);
  color: #FFFFFF;
  border-color: var(--adv-brand);
}

/* Consent card (booking) — Figma: bg #E1F5FA, radius 12 */
.adv-consent-card-booking {
  background: #E1F5FA;
  border-radius: 12px;
  padding: var(--adv-space-base);
  margin-bottom: var(--adv-space-lg);
}
.adv-consent-card-booking .adv-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.adv-consent-card-booking input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--adv-brand);
  flex-shrink: 0;
}

/* CTA button override */
.adv-btn-cta {
  height: 56px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 500;
}

/* ========================================================
   Request Preview — Figma 59 (390x900)
   ======================================================== */

.adv-preview-card {
  background: #FFFFFF;
  border: 1px solid #D5D8D7;
  border-radius: 12px;
  padding: var(--adv-space-lg);
  margin-bottom: var(--adv-space-lg);
}

.adv-preview-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--adv-space-base);
}
.adv-preview-date {
  font-size: 14px;
  color: #878B8A;
}

.adv-preview-section { margin-bottom: var(--adv-space-base); }
.adv-preview-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--adv-text);
  margin: 0 0 var(--adv-space-md);
}
.adv-preview-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.adv-preview-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--adv-brand);
}
.adv-preview-value {
  font-size: 16px;
  font-weight: 400;
  color: var(--adv-text);
}
.adv-preview-multiline {
  white-space: pre-wrap;
  line-height: 1.5;
}
.adv-preview-total {
  padding-top: 8px;
  border-top: 1px solid #E0E3E2;
}
.adv-preview-total .adv-preview-label,
.adv-preview-total .adv-preview-value {
  font-weight: 700;
  font-size: 16px;
}
.adv-preview-divider {
  height: 1px;
  background: #E0E3E2;
  margin: var(--adv-space-base) 0;
}

/* Payment status messages */
.adv-payment-status {
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: var(--adv-space-md);
}
.adv-payment-status.info    { background: #E1F5FA; color: var(--adv-brand); }
.adv-payment-status.success { background: #E8F5F1; color: #0E8A6D; }
.adv-payment-status.error   { background: #FFEBEE; color: #E53E3E; }

/* Stripe Payment Modal */
.adv-payment-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.adv-payment-modal {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}
.adv-payment-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.adv-payment-modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--adv-text);
  margin: 0;
}
.adv-payment-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--adv-text-secondary);
  cursor: pointer;
}

/* ========================================================
   Complete Page — Figma 89 (390x844)
   ======================================================== */

.adv-complete-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--adv-space-2xl) 0;
  min-height: 60vh;
  justify-content: center;
}
.adv-complete-icon {
  margin-bottom: var(--adv-space-xl);
}
.adv-complete-check {
  width: 64px;
  height: 64px;
  color: var(--adv-brand);
}
.adv-complete-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--adv-text);
  margin: 0 0 var(--adv-space-base);
}
.adv-complete-message {
  font-size: 14px;
  color: var(--adv-brand);
  line-height: 1.6;
  max-width: 314px;
  margin: 0 0 var(--adv-space-2xl);
}
.adv-complete-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--adv-space-base);
}
.adv-complete-back-link {
  font-size: 18px;
  font-weight: 600;
  color: var(--adv-brand);
  text-decoration: none;
}
.adv-complete-back-link:hover { text-decoration: underline; }

/* ========================================================
   History List — Figma 89 (390x844)
   ======================================================== */

/* History page title uses Advice blue */
.adv-history-title { color: var(--adv-brand); }

/* History Tabs (2-tab, underline style) */
.adv-history-tabs {
  display: flex;
  border-bottom: 1px solid #E0E3E2;
  margin-bottom: var(--adv-space-base);
}
.adv-history-tab {
  flex: 1;
  height: 44px;
  border: none;
  background: transparent;
  font-family: var(--adv-font);
  font-size: 16px;
  font-weight: 600;
  color: #ABAFAE;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}
.adv-history-tab.active { color: var(--adv-text); }
.adv-history-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--adv-brand);
}

/* History list */
.adv-history-list { display: flex; flex-direction: column; }

/* History item (Figma: ~86px height, 65px avatar) */
.adv-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #E0E3E2;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.adv-history-item:hover { background: #FAFBFB; }

.adv-history-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--adv-border-light);
  flex-shrink: 0;
}
.adv-history-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adv-text-muted);
}

.adv-history-item-center { flex: 1; min-width: 0; }
.adv-history-item-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--adv-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adv-history-item-title {
  font-size: 13px;
  color: var(--adv-text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adv-history-item-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.adv-history-date {
  font-size: 12px;
  color: #ABAFAE;
}

/* Status Pill (Figma: 100x31, radius 100, pill shape) */
.adv-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 31px;
  padding: 0 12px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 400;
}
.adv-status-pill.requested  { background: #FFFFFF; border: 1px solid #E0E3E2; color: var(--adv-brand); }
.adv-status-pill.approved   { background: #FFFFFF; border: 1px solid #E0E3E2; color: var(--adv-brand); }
.adv-status-pill.in-progress { background: #FFF3E0; border: 1px solid #FF9800; color: #FF9800; }
.adv-status-pill.completed  { background: var(--adv-brand); border: 1px solid var(--adv-brand); color: #FFFFFF; }
.adv-status-pill.reviewed   { background: #E8F5F1; border: 1px solid #0E8A6D; color: #0E8A6D; }
.adv-status-pill.declined   { background: #FFFFFF; border: 1px solid #E0E3E2; color: #FF0000; }
.adv-status-pill.cancelled  { background: #FFFFFF; border: 1px solid #E0E3E2; color: #FF0000; }

/* ========================================================
   History Detail — Figma 89-Request details
   ======================================================== */

.adv-detail-content { min-height: 200px; }

.adv-detail-card {
  background: #FFFFFF;
  border: 1px solid #D5D8D7;
  border-radius: 12px;
  padding: var(--adv-space-lg);
  margin-bottom: var(--adv-space-lg);
}

.adv-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--adv-space-base);
}

.adv-detail-section { margin-bottom: var(--adv-space-md); }
.adv-detail-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--adv-text);
  margin: 0 0 var(--adv-space-md);
}

.adv-detail-row {
  margin-bottom: 8px;
}
.adv-detail-label {
  display: block;
  font-size: 14px;
  color: var(--adv-brand);
  margin-bottom: 2px;
}
.adv-detail-value {
  font-size: 16px;
  color: var(--adv-text);
}
.adv-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Advisor in detail */
.adv-detail-advisor {
  display: flex;
  align-items: center;
  gap: 12px;
}
.adv-detail-advisor-img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--adv-border-light);
}
.adv-detail-advisor-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adv-text-muted);
}
.adv-detail-advisor-info {
  display: flex;
  flex-direction: column;
}
.adv-detail-advisor-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--adv-text);
}
.adv-detail-advisor-dept {
  font-size: 14px;
  color: #878B8A;
  margin-top: 2px;
}

/* Attachments in detail */
.adv-detail-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.adv-detail-attach-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
}
.adv-detail-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.adv-detail-attach-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #F5F7F7;
  border-radius: 8px;
  font-size: 13px;
  color: var(--adv-brand);
  text-decoration: none;
}

/* Review in detail */
.adv-detail-review-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.adv-detail-review-text {
  font-size: 15px;
  color: var(--adv-text);
  line-height: 1.5;
  margin: 0;
}

/* Action area */
.adv-detail-actions {
  text-align: center;
}
.adv-detail-status-msg {
  font-size: 14px;
  color: var(--adv-text-secondary);
  text-align: center;
  padding: var(--adv-space-base) 0;
}
.adv-detail-status-declined { color: #E53E3E; }
.adv-detail-status-cancelled { color: #FF0000; }

/* ========================================================
   Review Write — Star rating + text
   ======================================================== */

.adv-review-card { min-height: 100px; }

.adv-review-advisor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--adv-space-lg);
}
.adv-review-advisor-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}
.adv-review-advisor-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--adv-text);
}

.adv-review-question {
  font-size: 16px;
  color: var(--adv-text);
  text-align: center;
  margin: 0 0 var(--adv-space-base);
}

/* Star rating buttons */
.adv-review-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--adv-space-xl);
}
.adv-review-star {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #E0E0E0;
  transition: color 0.15s, transform 0.1s;
  padding: 4px;
}
.adv-review-star:hover { transform: scale(1.1); }
.adv-review-star.filled { color: #FFD700; }

/* ========================================================
   WebView (CloboApp) — Enhanced
   ======================================================== */

/* App header replacement (when shared header is hidden) */
body.is-clobo-app .adv-page-header {
  padding-top: var(--adv-space-sm);
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  .adv-card:hover { transform: none; box-shadow: var(--adv-shadow-card); }
  .adv-advisor-card:hover { background: transparent; }
  .adv-history-item:hover { background: transparent; }
  .adv-service-card:hover { transform: none; box-shadow: var(--adv-shadow-card); }
}

/* Prevent text selection on interactive elements */
.adv-filter-tab,
.adv-chip,
.adv-toggle-tab,
.adv-sex-btn,
.adv-history-tab,
.adv-review-star {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling for iOS WebView */
.adv-page-wrapper {
  -webkit-overflow-scrolling: touch;
}

/* ========================================================
   Responsive — Tablet (768px+)
   ======================================================== */
@media (min-width: 768px) {
  .adv-main-content {
    max-width: 640px;
    padding: var(--adv-space-xl);
  }

  /* Category: 2-column grid */
  .adv-category-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Advisor list: wider cards */
  .adv-advisor-card {
    padding: var(--adv-space-lg) 0;
  }
  .adv-advisor-img { width: 90px; height: 90px; }
  .adv-advisor-card-center .adv-advisor-name { font-size: 22px; }

  /* Profile: larger image */
  .adv-profile-img { width: 120px; height: 120px; }

  /* Service cards: 3 across */
  .adv-service-cards { gap: 16px; }
  .adv-service-card { width: 140px; height: 100px; }

  /* Preview/Detail card: wider padding */
  .adv-preview-card,
  .adv-detail-card {
    padding: var(--adv-space-xl);
  }

  /* Booking: wider inputs */
  .adv-booking-input { height: 46px; }

  /* CTA button — inline-flex → flex でセンタリング有効化 */
  .adv-btn-cta { display: flex; max-width: 400px; margin-left: auto; margin-right: auto; }
}

/* ========================================================
   Responsive — Desktop (1024px+)
   ======================================================== */
@media (min-width: 1024px) {
  .adv-main-content {
    max-width: 720px;
    padding: var(--adv-space-2xl);
  }

  /* Profile info card: horizontal layout */
  .adv-profile-header {
    display: flex;
    align-items: center;
    gap: var(--adv-space-xl);
    text-align: left;
  }
  .adv-profile-img-wrap { margin-bottom: 0; }
  .adv-profile-name { justify-content: flex-start; }

  /* History items: more breathing room */
  .adv-history-item { padding: var(--adv-space-base) 0; }
  .adv-history-avatar { width: 72px; height: 72px; }

  /* Detail advisor: larger */
  .adv-detail-advisor-img { width: 80px; height: 80px; }
}

/* ========================================================
   Healthcare Camera Button — Advice Home
   ======================================================== */
.adv-camera-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #FFFFFF;
  border: 1.5px solid var(--adv-brand);
  border-radius: var(--adv-radius-full);
  color: var(--adv-brand);
  font-family: var(--adv-font);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.adv-camera-btn:hover {
  background: var(--adv-brand-light);
}
.adv-camera-btn:active {
  transform: scale(0.97);
}

/* ========================================================
   Print — hide interactive elements
   ======================================================== */
@media print {
  .adv-back-btn,
  .adv-filter-tabs,
  .adv-history-tabs,
  .adv-btn,
  .adv-load-more,
  .shared-header,
  .shared-footer { display: none !important; }
  .adv-main-content { max-width: 100%; padding: 0; }
}


/* ═══════════════════════════════════════════════
   Cases Section & Cards
   ═══════════════════════════════════════════════ */

/* Popular Cases on main page */
.adv-cases-section { }
.adv-cases-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--adv-space-base);
}
.adv-cases-title {
    font-size: 18px; font-weight: 700; color: var(--adv-text);
    display: flex; align-items: center; gap: 8px;
}
.adv-cases-viewall {
    font-size: 13px; color: var(--adv-brand); font-weight: 600;
    text-decoration: none; display: flex; align-items: center; gap: 2px;
}

/* Case list */

.adv-cases-loading { text-align: center; padding: 40px 0; }
.adv-cases-empty { text-align: center; color: var(--adv-text-muted); padding: 40px 0; font-size: 14px; }

/* Case card — app-matched */
.adv-cases-list { display: flex; flex-direction: column; gap: 0; }
.adv-case-card {
    display: flex; align-items: center; gap: 16px;
    padding: 9px 4px;
    border-bottom: 8px solid #eeeeee;
    text-decoration: none; color: inherit;
    background: #fff;
}
.adv-case-card:active { opacity: 0.8; }

.adv-case-card-center { flex: 1; min-width: 0; width: 75%; }
.adv-case-card-title {
    font-size: 16px; font-weight: 700; color: rgba(0,0,0,0.87);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    margin-top: 4px; margin-bottom: 4px;
}
.adv-case-card-meta {
    display: flex; gap: 20px; margin-top: 0;
    font-size: 12px; color: rgba(0,0,0,0.5);
}
.adv-case-card-doctor {
    font-size: 12px; color: var(--adv-brand); margin-top: 4px; font-weight: 500;
}

.adv-case-card-right { flex-shrink: 0; }
.adv-case-thumb {
    width: 64px; height: 64px; border-radius: 10px;
    object-fit: cover; background: #f0f0f0;
}

/* Case badge — app-matched */
.adv-case-badge {
    display: inline-block;
    background: rgba(2,174,213,0.2); color: rgba(2,174,213,0.87);
    font-size: 12px; font-weight: 700;
    padding: 2px 4px; border-radius: 5px;
    align-self: flex-start;
}

/* Cases page header */
.adv-cases-page-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--adv-space-base) 0; margin-bottom: 8px;
}
.adv-cases-page-title {
    font-size: 20px; font-weight: 700; color: var(--adv-text);
}

/* Category chip scroll */
.adv-chip-scroll {
    display: flex; gap: 10px; overflow-x: auto;
    padding: 0 0 var(--adv-space-base) 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
}
.adv-chip-scroll::-webkit-scrollbar { display: none; }
.adv-chip-scroll .adv-chip {
    font-size: 14px; font-weight: 700;
    padding: 6px 16px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: rgba(2,174,213,0.2);
    color: rgba(2,174,213,0.87);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}
.adv-chip-scroll .adv-chip:hover {
    background: rgba(2,174,213,0.3);
}
.adv-chip-scroll .adv-chip.selected {
    background: #fff;
    border: 2px solid rgba(2,174,213,1);
    color: rgba(2,174,213,0.87);
    font-weight: 700;
}

/* Case detail page — app-matched */

/* Case Detail: 카드 border/padding 제거 — 앱처럼 플랫 레이아웃 */
.adv-case-detail-wrap .adv-detail-card {
    border: none; border-radius: 0; padding: 0;
    box-shadow: none; background: #fff;
}

/* Question section */
.adv-case-detail-question-title {
    font-size: 16px; font-weight: 700; color: rgba(0,0,0,0.87);
    margin-top: 17px; margin-bottom: 4px;
}
.adv-case-detail-date {
    align-self: flex-end; text-align: right;
    font-size: 14px; color: rgba(0,0,0,0.65); margin-top: 17px;
}
.adv-case-detail-desc {
    font-size: 14px; font-weight: 400; color: rgba(0,0,0,0.87);
    line-height: 1.5; margin-top: 20px; margin-bottom: 20px;
}

/* Image carousel — full width, app height */
.adv-case-detail-carousel {
    position: relative; width: 100%;
    height: 200px; overflow: hidden; background: #f5f5f5;
}
.adv-case-detail-carousel img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.adv-case-detail-carousel-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 100%; display: flex; justify-content: space-between;
    padding: 0 16px; box-sizing: border-box; pointer-events: none;
}
.adv-case-detail-carousel-nav button {
    pointer-events: auto; width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0,0,0,0.38); border: none; color: #fff;
    font-size: 14px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.adv-case-detail-carousel-counter {
    position: absolute; right: 16px; bottom: 10px;
    background: rgba(0,0,0,0.38); color: #fff;
    font-size: 12px; font-weight: 700; padding: 2px 8px;
    border-radius: 10px;
}

/* Views & actions row */
.adv-case-detail-stats {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 17px; margin-bottom: 8px;
}
.adv-case-detail-views {
    font-size: 14px; color: rgba(0,0,0,0.65);
}

/* Thick separator (app: 16px #eee) */
.adv-case-detail-separator {
    height: 16px; background: #eeeeee;
    width: 100%;
}

/* Doctor suggestion card */
.adv-case-detail-doctor-card { padding-top: 24px; }
.adv-case-detail-advisor {
    display: flex; align-items: center; gap: 16px;
}
.adv-case-detail-avatar {
    width: 64px; height: 64px; border-radius: 10px;
    object-fit: cover; background: #f0f0f0; flex-shrink: 0;
    cursor: pointer;
}
.adv-case-detail-advisor-info { flex: 1; }
.adv-case-detail-advisor-name { font-size: 16px; font-weight: 700; color: rgba(0,0,0,0.87); }
.adv-case-detail-advisor-dept {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 4px;
}
.adv-case-detail-advisor-dept span:first-child { font-size: 16px; color: rgba(0,0,0,0.87); }
.adv-case-detail-advisor-dept span:last-child { font-size: 14px; color: rgba(0,0,0,0.5); }
.adv-case-detail-advisor-meta { font-size: 13px; color: rgba(0,0,0,0.5); margin-top: 2px; }

/* Answer text */
.adv-case-detail-answer {
    font-size: 16px; font-weight: 400; color: rgba(0,0,0,0.87);
    line-height: 1.5; margin-top: 24px; margin-bottom: 24px;
}

/* Answer attachment thumbnails (64x64 row) */
.adv-case-detail-answer-thumbs {
    display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.adv-case-detail-answer-thumbs img {
    width: 64px; height: 64px; border-radius: 10px;
    object-fit: cover; cursor: pointer;
}

/* Useful button — pill, app-matched */
.adv-case-detail-actions { padding: 0; text-align: right; margin-bottom: 35px; }
.adv-case-detail-useful-btn {
    display: inline-flex; align-items: center; gap: 6px;
    width: 135px; height: 40px; justify-content: center;
    border-radius: 27px; border: 1px solid rgba(2,174,213,0.87);
    background: transparent; color: rgba(2,174,213,0.87);
    font-size: 16px; font-weight: 700; cursor: pointer;
    transition: all 0.2s;
}
.adv-case-detail-useful-btn:hover,
.adv-case-detail-useful-btn.active {
    background: rgba(2,174,213,0.87); color: #fff;
}
.adv-case-detail-useful-btn svg { width: 20px; height: 20px; }

/* Question attachment small thumbs */
.adv-case-detail-q-thumbs {
    display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px;
}
.adv-case-detail-q-thumbs img {
    width: 64px; height: 64px; border-radius: 10px;
    object-fit: cover; cursor: pointer;
}

/* Case consent section (history detail) */
.adv-case-consent-section { background: var(--adv-brand-light); border-radius: var(--adv-radius-md); padding: var(--adv-space-base); }
.adv-consent-desc { font-size: 13px; color: var(--adv-text-secondary); line-height: 1.5; margin-bottom: 12px; }
.adv-consent-check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.adv-consent-check input[type="checkbox"] { margin-top: 2px; accent-color: var(--adv-brand); }
.adv-consent-text { font-size: 14px; color: var(--adv-text); }

/* Answer display in history detail */
.adv-detail-answer-text {
    font-size: 14px; color: var(--adv-text); line-height: 1.7;
    background: var(--adv-bg); padding: 16px; border-radius: var(--adv-radius-md);
}

/* Spinner */
.adv-spinner {
    width: 32px; height: 32px; margin: 0 auto;
    border: 3px solid var(--adv-border);
    border-top-color: var(--adv-brand);
    border-radius: 50%;
    animation: adv-spin 0.6s linear infinite;
}
@keyframes adv-spin { to { transform: rotate(360deg); } }
