* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f5f9;
  color: #1f2937;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  padding: 28px 32px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f6ff 100%);
}

.hero-copy {
  flex: 1 1 420px;
  min-width: 280px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.15;
}

.subtitle {
  margin: 0;
  color: #5b6475;
  line-height: 1.5;
  max-width: 640px;
}

.hero-controls {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.hero-field-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-label {
  font-size: 14px;
  font-weight: 600;
  color: #1f2a44;
}

.help-link-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #c9d5f5;
  border-radius: 999px;
  background: #eef4ff;
  color: #3157d5;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.help-link-btn:hover {
  background: #e2ecff;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-id,
.hero-load-btn {
  height: 44px;
  border-radius: 10px;
  box-sizing: border-box;
}

.input-id {
  border: 1px solid #cfd8e3;
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  color: #1f2937;
}

.input-id:focus {
  outline: none;
  border-color: #4c74e6;
  box-shadow: 0 0 0 3px rgba(76, 116, 230, 0.14);
}

.input-person-id {
  flex: 1 1 180px;
  min-width: 150px;
}

.input-lang {
  flex: 0 0 90px;
}

.hero-load-btn {
  flex: 0 0 auto;
  padding: 0 18px;
  font-weight: 600;
}

.hero-field-hint {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .hero {
    flex-direction: column;
  }

  .hero-controls {
    width: 100%;
    flex: 1 1 auto;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .input-person-id {
    min-width: 0;
    flex: 1 1 100%;
  }
}

.primary-btn {
  border: 0;
  background: #1d4ed8;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
}

.primary-btn:hover {
  background: #1e40af;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
}

.endpoint-list {
  margin: 0;
  padding-left: 18px;
}

.endpoint-list li {
  margin-bottom: 8px;
}

.endpoint-list span {
  color: #4b5563;
  margin-left: 8px;
}

.profile-card,
.side-card {
  min-height: 420px;
}

.status-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge-live {
  background: #dcfce7;
  color: #166534;
}

.badge-cache {
  background: #fef3c7;
  color: #92400e;
}

.badge-warn {
  background: #fde68a;
  color: #92400e;
}

.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.status-text {
  color: #6b7280;
  font-size: 0.9rem;
}

.profile-header {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: start;
}

.profile-photo-wrap {
  display: flex;
  justify-content: center;
}

.profile-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
}

.profile-photo.placeholder {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.9rem;
}

.profile-name {
  font-size: 22px;
  font-weight: 600;
}

.profile-affiliation {
  color: #666;
  font-size: 14px;
}

.profile-name-th {
  margin: 0 0 8px 0;
  font-size: 1.6rem;
}

.profile-name-en {
  margin: 0 0 10px 0;
  color: #4b5563;
}

.profile-position {
  margin: 0 0 6px 0;
  font-weight: bold;
}

.profile-org {
  margin: 0 0 10px 0;
  color: #374151;
  line-height: 1.5;
}

.profile-link {
  color: #1d4ed8;
  text-decoration: none;
}

.profile-link:hover {
  text-decoration: underline;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.info-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}

.label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.value {
  font-weight: 600;
  word-break: break-word;
}

.subsection {
  margin-top: 24px;
}

.subsection h3 {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.88rem;
}

.bullet-list {
  margin: 0;
  padding-left: 20px;
}

.bullet-list li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.plain-list {
  margin: 0;
  padding-left: 20px;
}

.muted {
  color: #6b7280;
}

.error-text {
  color: #b91c1c;
  font-weight: 600;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #e5e7eb;
  padding: 16px;
  border-radius: 12px;
  overflow-x: auto;
  max-height: 700px;
}

@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-header {
    grid-template-columns: 1fr;
  }

  .profile-photo-wrap {
    justify-content: flex-start;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .input-id {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    width: 140px;
  }
  .outputs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .output-item {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
  }

  .output-title {
    font-weight: bold;
    margin-bottom: 4px;
  }

  .output-meta {
    font-size: 0.9em;
    color: #666;
    display: flex;
    gap: 10px;
  }

  .output-summary {
  cursor: pointer;
  padding: 10px 12px;

  /* ⭐ ทำให้เหลือบรรทัดเดียว */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  font-weight: 500;
}

/* เอาลูกศร default ออก */
.output-summary::-webkit-details-marker {
  display: none;
}

/* ใส่ arrow เอง */
.output-summary::before {
  content: "▶";
  margin-right: 8px;
  font-size: 0.8rem;
}

details[open] .output-summary::before {
  content: "▼";
}

.output-item-collapsible {
  border-bottom: 1px solid #eee;
}

.output-detail {
  padding: 8px 12px 12px 28px;
  color: #444;
  font-size: 0.9rem;
}

  .output-doi {
    font-size: 0.85em;
    margin-top: 4px;
  }

  .placeholder-card {
    background: #f9fafb;
    border-style: dashed;
    color: #6b7280;
  }
  .placeholder-card {
    color: #6b7280;
    background: #f9fafb;
  }
}

.insight-card {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 14px;
  padding: 14px 16px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.insight-card.primary {
  border: 1.5px solid #93c5fd;
  background: #f8fbff;
}

.insight-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 8px;
}

.insight-card.primary .insight-card-title {
  color: #2563eb;
}

.insight-card-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  margin-bottom: 8px;
}

.insight-card.primary .insight-card-value {
  font-size: 2.35rem;
}

.insight-card-subtitle {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.35;
  margin-top: 0;
}

  .insight-card-subtitle.long {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .insight-row {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.primary-row {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.secondary-row {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.insight-card.primary {
  border: 2px solid #2563eb;
  background: #eff6ff;
}

.insight-card.primary .insight-card-title {
  color: #1d4ed8;
}

.insight-card.primary .insight-card-value {
  font-size: 2.6rem;
}

.theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.theme-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eef4ff;
  color: #1d4ed8;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.theme-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 6px;
}

.muted-tag {
  background: #f9fafb;
  color: #6b7280;
  border-color: #e5e7eb;
}

.year-chart {
  overflow-x: auto;
  padding-top: 8px;
}

.year-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: max-content;
  padding-bottom: 6px;
}

.year-bar-col {
  width: 34px;
  text-align: center;
  flex: 0 0 auto;
}

.year-bar-wrap {
  height: 170px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.year-bar {
  width: 24px;
  border-radius: 8px 8px 0 0;
  background: #3b82f6;
}

.year-bar-value {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #4b5563;
}

.year-bar-label {
  margin-top: 2px;
  font-size: 0.75rem;
  color: #6b7280;
}

.theme-evolution {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.theme-phase {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}

.theme-phase-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
}

.theme-phase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-bars.stacked {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: max-content;
}

.stacked-wrap {
  height: 190px;
  width: 28px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: #f3f4f6;
}

.stack-seg {
  width: 100%;
}

.stack-seg.q1 { background: #1d4ed8; }
.stack-seg.q2 { background: #3b82f6; }
.stack-seg.q3 { background: #60a5fa; }
.stack-seg.q4 { background: #93c5fd; }
.stack-seg.journal-other { background: #cbd5e1; }
.stack-seg.conference { background: #64748b; }

.stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: #4b5563;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 360px;
}

.theme-phase {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.theme-phase::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.theme-phase-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
  line-height: 1.35;
}

.theme-phase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Phase colors */
.theme-phase.phase-pre-smartphone {
  background: rgba(148, 163, 184, 0.06);
  border-color: rgba(148, 163, 184, 0.22);
}

.theme-phase.phase-pre-smartphone::before {
  background: #64748b;
}

.theme-phase.phase-pre-smartphone .theme-phase-title {
  color: #475569;
}

.theme-phase.phase-mobile-data {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.18);
}

.theme-phase.phase-mobile-data::before {
  background: #2563eb;
}

.theme-phase.phase-mobile-data .theme-phase-title {
  color: #1d4ed8;
}

.theme-phase.phase-deep-learning {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.18);
}

.theme-phase.phase-deep-learning::before {
  background: #4f46e5;
}

.theme-phase.phase-deep-learning .theme-phase-title {
  color: #4338ca;
}

.theme-phase.phase-post-covid {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.18);
}

.theme-phase.phase-post-covid::before {
  background: #059669;
}

.theme-phase.phase-post-covid .theme-phase-title {
  color: #047857;
}

.phase-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.phase-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.phase-chip.phase-pre-smartphone {
  background: rgba(100, 116, 139, 0.10);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.25);
}

.phase-chip.phase-mobile-data {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.22);
}

.phase-chip.phase-deep-learning {
  background: rgba(79, 70, 229, 0.08);
  color: #4338ca;
  border-color: rgba(79, 70, 229, 0.22);
}

.phase-chip.phase-post-covid {
  background: rgba(5, 150, 105, 0.08);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.22);
}

.insight-desc {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 4px;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.advanced-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe5f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.advanced-card-topline {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 10px;
}

.advanced-card-headline {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 12px;
}

.advanced-card-evidence {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.45;
  padding-top: 10px;
  border-top: 1px solid #e5edf5;
}

.notes-box {
  background: #fcfdff;
  border: 1px solid #e5edf5;
  border-radius: 16px;
  padding: 18px;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-item {
  padding-bottom: 14px;
  border-bottom: 1px solid #e9eef5;
}

.note-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.note-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.note-text {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
  max-width: 65ch;
}

.prompt-box-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-box {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid #dbe5f0;
  border-radius: 14px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #1e293b;
  background: #fbfdff;
}

.prompt-actions {
  display: flex;
  justify-content: flex-end;
}

.is-hidden {
  display: none !important;
}

#debug-output,
#load-data-btn {
    display: none !important;
}

.share-bar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.share-bar button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

body.deploy-mode #debug-section {
  display: none;
}

body.debug-mode #debug-section {
  display: block;
}

.side-card {
  max-height: 720px;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe5f0;
}

.side-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.side-card .muted {
  font-size: 0.9rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.profile-card,
.reflection-card {
  min-height: 420px;
  height: 100%;
}

.reflection-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}


.reflection-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.reflection-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.card-subtitle {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #242830;
}

.reflection-scroll {
  max-height: 600px;   /* ลดลง ~30% */
  overflow-y: auto;

  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}


.secondary-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  flex: 0 0 auto;
}

.secondary-btn:hover {
  background: #f9fafb;
}

@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .reflection-card {
    min-height: 320px;
  }

  .reflection-head {
    flex-direction: column;
    align-items: stretch;
  }
}

.reflection-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  padding-right: 2px;
}

.copy-prompt-btn {
  border: 0;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.copy-prompt-btn:hover {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

.copy-prompt-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.2);
}

.prompt-pre {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  background: transparent;
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  max-height: none;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.88rem;
  border-radius: 10px;
}

.hero-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.hero-field-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-field-label label {
  font-size: 13px;
  font-weight: 600;
  color: #24324a;
}

.help-link-btn {
  border: 1px solid #cfd7e6;
  background: #fff;
  color: #2f5bd3;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.4;
}

.help-link-btn:hover {
  background: #f4f7ff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 45, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.modal-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8edf5;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #1f2a44;
}

.modal-close-btn {
  border: none;
  background: transparent;
  color: #5f6b85;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  color: #24324a;
  line-height: 1.7;
}

.modal-body ol {
  margin: 10px 0 16px 20px;
  padding: 0;
}

.help-example {
  margin-top: 12px;
  background: #f7f9fc;
  border: 1px solid #e6ebf3;
  border-radius: 12px;
  padding: 12px 14px;
}

.help-example code {
  color: #1d3f94;
  word-break: break-all;
}

.is-hidden {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

.reflection-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.copy-status {
  font-size: 0.92rem;
  color: #2e7d32;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.copy-status.show {
  opacity: 1;
  transform: translateY(0);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.profile-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.profile-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 120px;
}

.profile-photo,
.profile-photo.placeholder {
  width: 108px;
  height: 108px;
  border-radius: 14px;
}

.profile-photo {
  object-fit: cover;
}

.profile-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;
  color: #888;
  font-size: 12px;
}

.share-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.share-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.share-icon-btn:hover {
  background: #f3f6fb;
}

.profile-main {
  flex: 1;
}

@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
  }

  .profile-main {
    text-align: center;
  }
}