*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #000;
  --surface: #0e0e0e;
  --surface-2: rgba(118, 118, 128, 0.24);
  --text: #ffffff;
  --text-2: #999999;
  --separator: #5E5E5E;
  --btn-bg: #ffffff;
  --btn-fg: #000000;
  --radius-card: 20px;
  --radius-chip: 16px;
  --radius-pill: 68px;
  --font: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ========== LAYOUT ========== */
.page { min-height: 100vh; padding: 84px 24px 80px; }
.wrap { max-width: 1170px; margin: 0 auto; }

/* ========== HERO ========== */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
  position: relative;
}
.hero-text { display: flex; flex-direction: column; gap: 28px; max-width: 737px; }
.hero-eyebrow { margin: 0; color: var(--text-2); font-size: 16px; font-weight: 400; }
.hero-title { margin: 0; font-size: 50px; font-weight: 700; line-height: 1; letter-spacing: -0.5px; color: var(--text); }
.hero-sub { margin: 0; color: var(--text-2); font-size: 16px; max-width: 600px; }
.hero-logo { width: 152px; height: 133px; flex-shrink: 0; }
.hero-logo svg { width: 100%; height: 100%; }

/* ========== CONTENT GRID ========== */
.content {
  display: grid;
  grid-template-columns: 342px 1fr;
  gap: 40px;
  align-items: start;
}

/* ========== LIST ========== */
.list { display: flex; flex-direction: column; gap: 16px; }
.loading { color: var(--text-2); padding: 20px; text-align: center; }

.card {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 94px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  width: 100%;
  text-align: left;
  transition: border-color .2s, transform .15s;
}
.card:hover { transform: translateY(-1px); }
.card.active { border-color: var(--accent, var(--text)); }

.card-icon {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: var(--radius-card);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-icon img, .card-icon svg { width: 38px; height: 38px; object-fit: contain; }
.card-icon .icon-slot { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; }
.card-icon .icon-slot svg { width: 100%; height: 100%; }
.detail-header-icon .icon-slot { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; }
.detail-header-icon .icon-slot svg { width: 100%; height: 100%; }

.card-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-title { font-size: 16px; font-weight: 700; color: var(--text); }
.card-value { font-size: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Help card (last item) */
.help-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.help-row { display: flex; gap: 17px; align-items: flex-start; }
.help-icon { width: 70px; height: 70px; border-radius: var(--radius-card); background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.help-icon svg { width: 38px; height: 38px; color: var(--text); }
.help-text { display: flex; flex-direction: column; gap: 13px; }
.help-title { font-size: 18px; font-weight: 700; color: var(--text); }
.help-desc { font-size: 15px; color: var(--text-2); line-height: 1.4; }
.help-btn {
  width: 100%;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.help-btn:hover { opacity: .9; }
.help-mail {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  margin-top: -6px;
  word-break: break-all;
}
.help-mail:hover { color: var(--text); text-decoration: underline; }

/* ========== DETAIL PANEL ========== */
.detail {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 34px 50px;
  display: flex;
  flex-direction: column;
  gap: 37px;
  min-height: 200px;
}
.detail-empty { color: var(--text-2); padding: 20px; text-align: center; }

.detail-header { display: flex; gap: 34px; align-items: flex-start; }
.detail-header .detail-header-icon {
  width: 70px; height: 70px; border-radius: var(--radius-card);
  background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.detail-header-icon img { width: 38px; height: 38px; object-fit: contain; }

.detail-header-text { display: flex; flex-direction: column; gap: 12px; }
.detail-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.detail-desc { font-size: 16px; color: var(--text-2); margin: 0; line-height: 1.4; }

.divider { height: 1px; background: var(--separator); width: 100%; }

/* Value row */
.value-row { display: flex; gap: 60px; align-items: center; }
.value-info { display: flex; gap: 34px; align-items: center; flex: 1; }
.value-icon { width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.value-icon svg { width: 38px; height: 38px; color: var(--text); }
.value-meta { display: flex; flex-direction: column; gap: 14px; }
.value-label { font-size: 20px; font-weight: 700; color: var(--text); }
.value-display { display: flex; gap: 10px; align-items: center; }
.value-text { font-size: 20px; font-weight: 700; color: var(--accent, var(--text)); white-space: nowrap; }
.copy-btn-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); transition: color .15s; }
.copy-btn-icon:hover { color: var(--text); }
.copy-btn-icon svg { width: 30px; height: 30px; }
.copy-btn-icon.copied { color: #25d366; }

.action-btn {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: var(--radius-pill);
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 200px;
}
.action-btn:hover { opacity: .9; }

/* QR row */
.qr-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.qr-text { display: flex; flex-direction: column; gap: 16px; max-width: 200px; }
.qr-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.qr-desc { font-size: 16px; color: var(--text-2); margin: 0; line-height: 1.4; }
.qr-canvas {
  width: 194px; height: 194px;
  background: #fff; padding: 12px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.qr-canvas canvas, .qr-canvas img { width: 100%; height: 100%; display: block; }
.qr-spacer { width: 189px; flex-shrink: 0; }

/* Hours */
.hours-block { display: flex; flex-direction: column; gap: 20px; }
.hours-head { display: flex; gap: 10px; align-items: center; }
.hours-head svg { width: 24px; height: 24px; color: var(--text); }
.hours-title { font-size: 20px; font-weight: 700; color: var(--text); }
.hours-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 53px; padding: 0 24px;
  background: var(--surface-2);
  border-radius: var(--radius-chip);
  font-size: 16px;
}
.hours-day { color: var(--text); font-weight: 700; }
.hours-time { color: var(--text-2); }

/* Help-with grid */
.help-with { display: flex; flex-direction: column; gap: 20px; }
.help-with-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.help-with-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.chip {
  display: flex; gap: 10px; align-items: center;
  padding: 20px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-chip);
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
}
.chip svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--text); }

/* Mobile back button */
.mobile-back {
  display: none;
  position: fixed;
  top: 24px;
  left: 24px;
  width: 40px; height: 40px;
  background: var(--surface);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: var(--text);
  z-index: 10;
}
.mobile-back svg { width: 20px; height: 20px; }

/* ========== ACCENT COLORS PER TYPE ========== */
.t-call    { --accent: #25d366; }
.t-link    { --accent: #1d61e7; }
.t-telegram{ --accent: #229ED9; }
.t-imo     { --accent: #4FC3F7; }
.t-whatsapp{ --accent: #25d366; }
.t-tiktok  { --accent: #ffffff; }
.t-instagram { --accent: #E1306C; }

/* ========== RESPONSIVE ========== */
@media (max-width: 980px) {
  .content { grid-template-columns: 1fr; }
  .detail { padding: 28px 24px; }
  .help-with-grid { grid-template-columns: repeat(2, 1fr); }
  .value-row { flex-direction: column; align-items: stretch; gap: 20px; }
  .action-btn { width: 100%; }
}

@media (max-width: 640px) {
  .page { padding: 60px 16px 40px; }
  .hero { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .hero-text { align-items: center; gap: 20px; max-width: 320px; margin: 0 auto; }
  .hero-title { font-size: 44px; }
  .hero-logo { display: none; }

  .list { width: 100%; max-width: 342px; margin: 0 auto; }
  .card { width: 100%; }

  /* Mobile: hide detail by default; show list. When .show-detail on body, swap. */
  body.show-detail .list { display: none; }
  body.show-detail .mobile-back { display: flex; }
  body:not(.show-detail) .detail { display: none; }

  .detail {
    padding: 28px 24px;
    align-items: center;
  }
  .detail-header { flex-direction: column; align-items: center; text-align: center; gap: 24px; width: 100%; }
  .detail-title, .detail-desc { text-align: center; }
  .value-info { flex-direction: column; align-items: center; text-align: center; }
  .value-row { gap: 20px; }
  .qr-row { flex-direction: column; gap: 20px; }
  .qr-text { align-items: center; text-align: center; max-width: 240px; }
  .qr-spacer { display: none; }
  .hours-head { justify-content: center; width: 100%; }
  .help-with { width: 100%; }
  .help-with-title { text-align: center; }
  .help-with-grid { grid-template-columns: 1fr; }
}
