/* =========================================================
   PLATFORM · auth, upload, real wall, type scale
   ========================================================= */

/* Prevent the page from being panned sideways on mobile/Safari.
   The hero glow is decorative and extends past the viewport. */
html, body { max-width: 100%; overflow-x: clip; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
.hero { overflow: clip; }
.hero h1 { margin-left: 0; padding-left: .14em; padding-right: .03em; font-size: clamp(3rem, 4.8vw, 4.6rem); overflow: visible; }

/* Lucide icon system (ISC) */
.icon {
  width: 1.05em;
  height: 1.05em;
  display: inline-block;
  flex: none;
  vertical-align: -0.12em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.icon-sm { width: .95em; height: .95em; }
.icon-lg { width: 1.35em; height: 1.35em; }
.like-btn.is-liked .icon-heart { fill: currentColor; }

/* Header: no phantom gap when XP/profile are hidden */
.demo-bar { font-size: 12px; letter-spacing: .05em; }
.demo-bar p { font-size: 12px; }
.header-actions { gap: 8px; }
.header-actions > [hidden] { display: none !important; }
#xpPill:empty, #profileChip:empty { display: none !important; }
.profile-chip { font-family: var(--sans); font-size: 13px; font-weight: 700; max-width: 190px; padding: 4px 12px 4px 5px; }
.profile-chip i { width: 28px; height: 28px; font-size: 10px; background: var(--coral); }
.xp-pill { font-size: 12.5px; height: 34px; padding: 0 13px; font-weight: 700; }

/* Official type scale */
.nav a { font-size: 14px; font-weight: 500; }
.btn { font-family: var(--sans); font-size: 15.5px; font-weight: 700; min-height: 52px; padding: 15px 26px; }
.btn-sm { font-size: 14px; min-height: 44px; padding: 11px 20px; }
.eyebrow { font-family: var(--label); font-size: 13px; font-weight: 500; letter-spacing: .15em; }
.brand-text strong { font-size: 12px; }
.brand-text small { font-size: 15px; }
.hero-lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.7; color: #4b5168; }
.section-lead { font-size: 17px; line-height: 1.7; color: #4b5168; }
.note { font-size: 12.5px; line-height: 1.6; }
.why-card p, .tool p, .step p { font-size: 15px; line-height: 1.65; }
.station-title { font-family: var(--label); font-size: 20px; font-weight: 500; line-height: 1.1; letter-spacing: .01em; }
.station-desc { font-size: 14px; line-height: 1.55; }
.station-meta { font-size: 10.5px; }
.journey-status { font-size: 12px; }
.age-btn { font-size: 13px; }
.age-switch-label { font-size: 11px; }
.mascot-note p { font-size: 13px; }
.journey-foot p { font-size: 14px; line-height: 1.6; }
.wall-title strong { font-size: 16px; }
.wall-title small { font-size: 12.5px; }
.like-btn { font-size: 12px; padding: 7px 11px; }
.pledge-copy > p, .register-copy > p, .faq-intro p { font-size: 16px; line-height: 1.65; }
.pledge-card p { font-size: 17px; line-height: 1.45; }
.pledge-meta strong { font-size: 13px; }
.pledge-meta small { font-size: 11.5px; }
.pledge-meta .like-btn { font-size: 12px; }
.field > span { font-size: 12px; letter-spacing: .05em; }
.field input, .field textarea, .pledge-form textarea, .dialog textarea { font-size: 16px; padding: 14px 16px; }
.consent { font-size: 13px; line-height: 1.55; }
.form-note { font-size: 12px; line-height: 1.55; }
.form-error { font-size: 13px; }
.register-list li { font-size: 14px; }
.register-quote p { font-size: 18px; }
.board-tab { font-size: 13px; padding: 10px 17px; }
.board-live { font-size: 10.5px; }
.board-table th { font-size: 10.5px; }
.board-table td { font-size: 15px; padding: 15px 10px; }
.board-name small { font-size: 12px; }
.board-badge { font-size: 10.5px; padding: 5px 9px; }
.board-empty { font-size: 15px; }
.faq-q { font-size: 16px; }
.faq-a p { font-size: 15.5px; line-height: 1.7; }
.footer-brand p, .footer-col a, .footer-emergency p { font-size: 13.5px; line-height: 1.6; }
.footer-brand span { font-size: 12px; }
.footer-title { font-size: 11px; }
.footer-bottom p { font-size: 11.5px; line-height: 1.6; }
.dialog-lead { font-size: 16px; line-height: 1.65; }
.dialog h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.dialog-kicker { font-family: var(--label); font-size: 12px; }
.station-context { font-size: 16px; }
.station-question { font-family: var(--label); font-size: clamp(1.4rem, 2.4vw, 2rem); }
.option, .choice { font-size: 15.5px; line-height: 1.45; }
.station-feedback { font-size: 15px; }
.scan-result, .risk p { font-size: 14.5px; }
.cert-form .field span { font-size: 12px; }
.disclaimer { font-size: 12px; line-height: 1.55; }

/* Real wall */
.real-art {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 15px;
  background: #e9e4da;
}
.wall-card .wall-art { padding: 10px; }
.wall-card .real-art { display: block; }
.wall-actions { display: flex; align-items: center; gap: 6px; }
.report-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  cursor: pointer;
}
.report-btn:hover { color: var(--coral); border-color: var(--coral); }
.wall-empty {
  grid-column: 1 / -1;
  padding: 60px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 22px;
  background: rgba(255,253,248,.55);
}
.wall-empty strong { display: block; font-family: var(--label); font-size: 26px; text-transform: uppercase; color: var(--navy); margin-bottom: 8px; }
.wall-empty p { color: var(--muted); font-size: 16px; }
.wall-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Cam kết đã duyệt hiển thị chung trên tường lan tỏa */
.wall-card--pledge .pledge-art {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 22px;
  background: linear-gradient(160deg, #fbf7ef 0%, #f2e7d6 100%);
  border: 1px solid var(--line);
  object-fit: initial;
}
.pledge-art .quote { font-family: var(--serif); font-size: 54px; line-height: .7; color: var(--gold); }
.pledge-art p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pledge-art small { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lightbox-pledge { font-family: var(--serif); font-size: clamp(20px, 2vw, 26px); line-height: 1.5; }

.lightbox-real-wrap { display: grid; place-items: center; background: #e9e4da; border-radius: 16px; overflow: hidden; }
.lightbox-real { width: 100%; max-height: 68vh; object-fit: contain; }
.lightbox-copy { padding: 16px 18px; border-radius: 14px; background: var(--paper); color: var(--ink); font-size: 15.5px; line-height: 1.6; }
.pledge-identity { font-size: 14px; color: rgba(251,247,239,.72); margin-bottom: 14px; }
.pledge-identity b { color: var(--gold); }

/* Auth dialog */
.auth-dialog { width: min(560px, calc(100vw - 28px)); }
.auth-dialog .dialog-head { margin-bottom: 14px; }
.auth-tabs { display: flex; gap: 6px; padding: 5px; background: var(--paper-2); border-radius: 999px; margin-bottom: 20px; }
.auth-tab { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 11px 12px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; }
.auth-tab.is-active { background: var(--white); color: var(--navy); box-shadow: 0 4px 12px rgba(20,20,46,.1); }
.auth-form .field { margin-bottom: 13px; }
.auth-form .field input { background: var(--white); color: var(--ink); border-color: var(--line); }
.auth-form .field input::placeholder { color: rgba(93,100,120,.55); }
.auth-form .field > span { color: var(--muted); }
.auth-form .btn-block { margin-top: 4px; }
.auth-foot { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-foot button { border: 0; background: none; color: var(--coral-deep); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: 13px; }
.auth-secure { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.auth-secure span { color: var(--muted); }
.auth-secure > .icon { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--success); }

/* Profile */
.profile-card { display: grid; gap: 14px; }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--paper-2); }
.profile-avatar { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--coral); color: #fff; font-family: var(--label); font-size: 20px; }
.profile-head strong { display: block; font-size: 19px; }
.profile-head > div > span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.profile-stat { padding: 12px; border: 1px solid var(--line); border-radius: 14px; text-align: center; background: var(--white); }
.profile-stat b { display: block; font-family: var(--label); font-size: 26px; line-height: 1; color: var(--navy); }
.profile-stat span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-top: 5px; }
.profile-cert { padding: 13px 15px; border-radius: 14px; background: var(--peach-soft); border: 1px solid #f4d2ae; font-size: 13.5px; line-height: 1.5; }
.profile-cert b { color: var(--navy); }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.profile-actions .btn { min-height: 46px; padding: 11px 12px; font-size: 14px; }
.profile-posts { display: grid; gap: 8px; max-height: 220px; overflow: auto; }
.profile-post { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.profile-post b { display: block; font-size: 13.5px; }
.profile-post span { font-size: 11.5px; color: var(--muted); }
.status-pill { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.status-pending { background: #fff3e5; color: #8a4b08; }
.status-approved { background: #e7f5ee; color: #1f7a55; }
.status-rejected { background: #fde3e3; color: var(--red); }

/* Upload */
.upload-dialog { width: min(680px, calc(100vw - 28px)); }
.upload-preview { display: grid; place-items: center; min-height: 180px; border: 1.5px dashed var(--line); border-radius: 16px; background: var(--paper-2); overflow: hidden; margin-bottom: 12px; }
.upload-preview img { max-height: 260px; width: auto; max-width: 100%; object-fit: contain; }
.upload-preview p { font-size: 13px; color: var(--muted); text-align: center; padding: 20px; }
.upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.5; color: var(--muted); margin: 6px 0 14px; }
.upload-check input { accent-color: var(--coral); width: 18px; height: 18px; margin-top: 1px; }
.upload-note { font-size: 12px; line-height: 1.55; color: var(--muted); margin-top: 10px; }

/* Report dialog */
.report-dialog { width: min(460px, calc(100vw - 28px)); }
.report-reasons { display: grid; gap: 8px; margin: 14px 0; }
.report-reason { display: flex; gap: 9px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 14px; cursor: pointer; background: var(--white); }
.report-reason:has(input:checked) { border-color: var(--coral); background: #fff7f7; }
.report-reason input { accent-color: var(--coral); width: 18px; height: 18px; }

@media (max-width: 420px) {
  .brand-text { display: block; }
  .brand-text strong { font-size: 9.5px; letter-spacing: .08em; }
  .brand-text small { font-size: 11px; }
  .brand-divider { display: none; }
  .brand { gap: 8px; }
  .brand-crest { width: 34px; height: 34px; }
  body.is-logged-in .brand-text { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .age-switch { flex-wrap: wrap; border-radius: 18px; padding: 6px; }
  .age-switch-label { width: 100%; padding: 2px 8px 6px; }
  .age-btn { flex: 1 1 auto; min-height: 34px; padding: 7px 10px; font-size: 12.5px; }
  .btn { font-size: 15px; }
  .hero-lead { font-size: 17px; }
  .section-lead { font-size: 16px; }
  .nav a { font-size: 15px; }
  .real-art { aspect-ratio: 1 / 1; }
  .upload-row { grid-template-columns: 1fr; }
  .profile-actions { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
}
