/* Campus Bridge visitor surfaces. Keep administration on its existing theme. */
.visitor-app {
  --green: #23634e;
  --deep: #153d31;
  --mint: #eaf2ed;
  --paper: #f7f8f5;
  --ink: #243c32;
  --muted: #617066;
  --line: #dfe5df;
  --white: #ffffff;
  --red: #a43f3f;
  --visitor-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
  caret-color: var(--green);
}
.visitor-app ::selection { background: var(--mint); color: var(--deep); }
.visitor-app :focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.visitor-app a { text-underline-offset: 4px; }
.visitor-app h1, .visitor-app h2, .visitor-app h3 { letter-spacing: 0; text-wrap: balance; }
.visitor-app h1 { font-size: 28px; line-height: 1.45; font-weight: 600; }
.visitor-app h2 { font-size: 20px; line-height: 1.5; font-weight: 600; }
.visitor-app h3 { font-size: 20px; line-height: 1.5; font-weight: 600; }
.visitor-app p { text-wrap: pretty; }
.visitor-app .ui-icon { display: block; flex-shrink: 0; width: 22px; height: 22px; }
.visitor-app .btn { min-height: 48px; padding: 12px 20px; border-radius: 8px; font-size: 16px; line-height: 1.5; white-space: normal; text-align: center; transition: background-color 160ms ease-out; }
.visitor-app .btn:hover { background: var(--deep); }
.visitor-app .btn.light:hover { background: #dce9df; }
.visitor-app .btn.ghost:hover { background: var(--mint); }
.visitor-app .btn:active { background: var(--deep); }
.visitor-app button:disabled { opacity: .55; cursor: wait; }
.visitor-app .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: var(--green); padding: 8px; font-size: 14px; }
.visitor-app .icon-button { display: flex; justify-content: center; align-items: center; width: 44px; height: 44px; padding: 10px; color: var(--muted); flex-shrink: 0; }
.visitor-app [hidden] { display: none; }
.visitor-app .site-header { height: 72px; }
.visitor-app .site-header .inner { max-width: 1104px; padding: 0 24px; }
.visitor-app .brand { font-size: 23px; letter-spacing: 0; }
.visitor-app .brand-mark { border-radius: 10px; width: 36px; height: 36px; }
.visitor-app .site-nav { gap: 28px; font-size: 14px; }
.visitor-app .site-nav a { display: inline-flex; align-items: center; min-height: 44px; }

.visitor-app .public-main { max-width: 1104px; padding: 32px 24px 40px; }
.visitor-app .home-intro { margin-bottom: 24px; }
.visitor-app .home-intro h1 { font-size: 32px; line-height: 1.45; }
.visitor-app .home-intro p { margin-top: 12px; max-width: 40em; font-size: 15px; color: var(--muted); }
.visitor-app .school-search { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 0 16px; max-width: 520px; min-height: 48px; }
.visitor-app .school-search:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.visitor-app .school-search > .ui-icon { color: var(--muted); width: 20px; height: 20px; }
.visitor-app .school-search input { padding: 12px 0; border: 0; background: transparent; outline: none; border-radius: 0; font-size: 16px; min-height: 48px; }
.visitor-app input::placeholder, .visitor-app textarea::placeholder { color: var(--muted); opacity: 1; }
.visitor-app .school-search .icon-button { margin-right: -12px; }
.visitor-app .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 16px; }
.visitor-app .result-count { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.visitor-app .school-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.visitor-app .school-card { min-width: 0; border: 0; border-radius: var(--visitor-radius); box-shadow: none; transition: none; }
.visitor-app .school-card:hover { transform: none; }
.visitor-app .school-card > a { display: block; border-radius: var(--visitor-radius); }
.visitor-app .school-card > a:hover .card-action { text-decoration: underline; }
.visitor-app .school-card .image { display: block; height: auto; min-height: 0; background: #e7eee3; }
.visitor-app .school-card img { width: 100%; height: auto; object-fit: contain; }
.visitor-app .image-placeholder { min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 14px; }
.visitor-app .image-placeholder .ui-icon { width: 32px; height: 32px; }
.visitor-app .school-content { padding: 20px; }
.visitor-app .school-content p { font-size: 14px; line-height: 1.85; margin: 8px 0 16px; min-height: 0; }
.visitor-app .school-address { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.visitor-app .school-address .ui-icon { width: 17px; height: 17px; margin-top: 3px; }
.visitor-app .school-address span { min-width: 0; }
.visitor-app .card-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; padding-top: 12px; font-size: 13px; }
.visitor-app .card-action { display: flex; align-items: center; gap: 6px; min-height: 32px; color: var(--green); font-size: 14px; font-weight: 500; }
.visitor-app .card-action .ui-icon { width: 18px; height: 18px; }
.visitor-app .browse-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; color: var(--muted); font-size: 13px; }
.visitor-app .browse-note .ui-icon { width: 18px; height: 18px; }
.visitor-app .site-footer { padding: 24px; font-size: 13px; color: var(--muted); }
.visitor-app .site-footer a { display: inline-flex; align-items: center; min-height: 44px; margin: 0 12px; }
.visitor-app .empty { font-size: 15px; padding: 40px 20px; }
.visitor-app .empty .btn { margin-top: 20px; }
.visitor-app .breadcrumb { margin-bottom: 24px; font-size: 14px; }
.visitor-app .breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; gap: 4px; }
.visitor-app .breadcrumb .ui-icon { width: 18px; height: 18px; transform: rotate(180deg); }
.visitor-app .detail-layout { grid-template-columns: minmax(0,1fr) 304px; gap: 0 32px; align-items: start; }
.visitor-app .detail-intro { min-width: 0; grid-column: 1; }
.visitor-app .cover-image { border-radius: var(--visitor-radius); }
.visitor-app .detail-title { display: flex; align-items: flex-start; gap: 16px; padding: 24px 0 16px; }
.visitor-app .detail-title img { float: none; margin: 0; width: 44px; height: 44px; flex-shrink: 0; }
.visitor-app .school-introduction { color: var(--muted); font-size: 16px; line-height: 1.9; white-space: pre-wrap; }
.visitor-app .detail-section { margin-top: 28px; padding-top: 24px; }
.visitor-app .detail-section > p { font-size: 16px; line-height: 1.9; color: var(--muted); max-width: 70ch; white-space: pre-wrap; }
.visitor-app .admission-list { padding: 0; margin: 12px 0 0; list-style: none; }
.visitor-app .admission-list li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; }
.visitor-app .admission-list .ui-icon { width: 20px; height: 20px; margin-top: 4px; color: var(--green); }
.visitor-app .contact-summary { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 24px; padding: 24px; border-radius: var(--visitor-radius); background: var(--white); }
.visitor-app .contact-item { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; font-size: 15px; }
.visitor-app .contact-item > .ui-icon { width: 20px; height: 20px; margin-top: 4px; color: var(--muted); }
.visitor-app .contact-item > div { min-width: 0; }
.visitor-app .contact-item small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.visitor-app .contact-item a { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); margin-top: -8px; }
.visitor-app .contact-summary .btn { width: 100%; margin-top: 24px; }
.visitor-app .contact-summary .btn + .btn { margin-top: 12px; }
.visitor-app .contact-note { margin-top: 16px; color: var(--muted); font-size: 13px; }
.visitor-app .detail-body { min-width: 0; grid-column: 1; }
.visitor-app .gallery-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.visitor-app .gallery-heading > span { font-size: 13px; color: var(--muted); }
.visitor-app .gallery { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
.visitor-app .gallery img { display: block; border-radius: 8px; }
.visitor-app .mobile-consult-bar { display: none; }
.visitor-app .form-wrap { max-width: 620px; }
.visitor-app .form-head { margin-bottom: 28px; }
.visitor-app .form-head h1 { margin: 0; font-size: 28px; }
.visitor-app .form-head p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.visitor-app .form-section { background: var(--white); padding: 24px; border-radius: var(--visitor-radius); margin-top: 16px; }
.visitor-app .form-section h2 { margin-bottom: 20px; }
.visitor-app .form-section h2 small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.visitor-app label { font-size: 15px; font-weight: 500; margin-bottom: 20px; }
.visitor-app label:last-child { margin-bottom: 0; }
.visitor-app label > input, .visitor-app label > select, .visitor-app label > textarea { margin-top: 8px; min-height: 48px; padding: 12px; border-radius: 6px; font-size: 16px; background: var(--white); }
.visitor-app textarea { min-height: 128px; line-height: 1.8; }
.visitor-app .character-count { text-align: right; font-size: 13px; color: var(--muted); margin-top: -12px; font-variant-numeric: tabular-nums; }
.visitor-app .auth-description { font-size: 15px; line-height: 1.8; color: var(--muted); }
.visitor-app .auth-actions { margin-top: 16px; }
.visitor-app .auth-actions .btn { width: 100%; }
.visitor-app .authorized-contact { display: flex; gap: 12px; align-items: center; }
.visitor-app .authorized-contact > .ui-icon { width: 28px; height: 28px; color: var(--green); }
.visitor-app .authorized-contact > div { flex: 1; min-width: 0; }
.visitor-app .authorized-contact strong { font-size: 18px; font-weight: 500; }
.visitor-app .authorized-contact p { font-size: 13px; color: var(--muted); }
.visitor-app .authorized-contact button { flex-shrink: 0; }
.visitor-app .consent { align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.8; font-weight: 400; margin: 24px 0 0; min-height: 44px; }
.visitor-app .consent input { width: 22px; height: 22px; margin-top: 2px; }
.visitor-app .consent-links { display: flex; gap: 24px; margin-left: 34px; font-size: 14px; color: var(--green); }
.visitor-app .consent-links a { display: inline-flex; align-items: center; min-height: 44px; }
.visitor-app .error-inline { font-size: 14px; color: var(--red); }
.visitor-app .submit-consult { width: 100%; margin-top: 16px; }
.visitor-app .form-note { font-size: 13px; text-align: center; color: var(--muted); line-height: 1.8; margin-top: 16px; }
.visitor-app .success-page { max-width: 540px; padding-top: 24px; margin: 0 auto; }
.visitor-app .success-page > .ui-icon { width: 56px; height: 56px; color: var(--green); margin-bottom: 24px; }
.visitor-app .success-description { color: var(--muted); margin-top: 16px; line-height: 1.9; }
.visitor-app .receipt { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 28px 0; }
.visitor-app .receipt span { font-size: 14px; color: var(--muted); }
.visitor-app .receipt strong { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.visitor-app .success-next p { color: var(--muted); margin-top: 12px; }
.visitor-app .success-page > .btn { margin-top: 28px; width: 100%; }
.visitor-app .profile-page { max-width: 540px; margin: 0 auto; }
.visitor-app .profile-identity { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.visitor-app .identity-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--mint); color: var(--green); flex-shrink: 0; }
.visitor-app .identity-icon .ui-icon { width: 30px; height: 30px; }
.visitor-app .profile-identity p { color: var(--muted); font-size: 14px; }
.visitor-app .profile-description { margin: 20px 0 24px; color: var(--muted); }
.visitor-app .profile-page > .btn { width: 100%; }
.visitor-app .profile-links { margin: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.visitor-app .profile-links a { display: flex; align-items: center; justify-content: space-between; min-height: 60px; border-bottom: 1px solid var(--line); }
.visitor-app .profile-links a:last-child { border-bottom: 0; }
.visitor-app .profile-links .ui-icon { color: var(--muted); width: 20px; height: 20px; }
.visitor-app .legal { max-width: 680px; }
.visitor-app .legal > h1 { margin-bottom: 28px; }
.visitor-app .legal > p { color: var(--muted); font-size: 16px; line-height: 2; }
.visitor-app .about-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; white-space: normal; }
.visitor-app .about-brand .brand-mark { margin: 0; width: 52px; height: 52px; border-radius: 13px; }
.visitor-app .about-brand strong { display: block; font-size: 22px; }
.visitor-app .about-brand span:not(.brand-mark) { display: block; color: var(--muted); font-size: 14px; }

@media (max-width: 900px) {
  .visitor-app .school-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visitor-app .detail-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 0 24px; }
}
@media (max-width: 680px) {
  .visitor-app .site-header { height: 64px; }
  .visitor-app .site-header .inner { padding: 0 20px; }
  .visitor-app .brand { font-size: 21px; }
  .visitor-app .site-nav { gap: 20px; font-size: 13px; }
  .visitor-app .site-nav a[href="#me"], .visitor-app .site-nav .admin-link { display: none; }
  
  .visitor-app .public-main { padding: 24px 16px 32px; }
  .visitor-app .home-intro { margin-bottom: 20px; }
  .visitor-app .home-intro h1 { font-size: 28px; }
  .visitor-app .home-intro p { margin-top: 10px; font-size: 14px; max-width: 22em; }
  .visitor-app .school-search { max-width: none; padding: 0 12px; }
  .visitor-app .section-heading { margin: 24px 0 16px; }
  .visitor-app .school-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .visitor-app .school-content { padding: 16px; }
  .visitor-app .browse-note { font-size: 12px; justify-content: flex-start; margin-top: 24px; }
  .visitor-app .site-footer { margin-bottom: calc(64px + env(safe-area-inset-bottom)); font-size: 12px; }
  .visitor-app .mobile-nav { display: flex; align-items: stretch; justify-content: space-around; background: var(--white); border-top: 1px solid var(--line); min-height: 64px; padding-bottom: env(safe-area-inset-bottom); }
  .visitor-app .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 0; color: var(--muted); font-size: 12px; }
  .visitor-app .mobile-nav .ui-icon { width: 22px; height: 22px; }
  .visitor-app .mobile-nav a > span { font-size: 12px; }
  .visitor-app .mobile-nav a.active { color: var(--green); font-weight: 500; }
  .visitor-app .detail-layout { display: flex; flex-direction: column; gap: 0; }
  .visitor-app .detail-intro, .visitor-app .detail-body { width: 100%; }
  .visitor-app .contact-summary { position: static; width: 100%; margin-top: 24px; padding: 20px; }
  .visitor-app .detail-title h1 { font-size: 25px; }
  .visitor-app .mobile-consult-bar { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; display: flex; gap: 12px; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); }
  .visitor-app .mobile-consult-bar .btn { flex: 1; min-width: 0; }
  .visitor-app .mobile-consult-bar .btn.ghost { flex: .75; }
  .visitor-app .form-section { padding: 20px; }
  .visitor-app .form-head h1 { font-size: 25px; }
  .visitor-app .authorized-contact { gap: 8px; }
  .visitor-app .authorized-contact .text-button { font-size: 13px; padding: 8px 0; }
  .visitor-app .gallery { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .visitor-app .site-nav { gap: 12px; }
  .visitor-app .brand { font-size: 19px; }
  .visitor-app .brand-mark { width: 32px; height: 32px; margin-right: 8px; }
  .visitor-app .authorized-contact { flex-wrap: wrap; }
  .visitor-app .authorized-contact .text-button { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .visitor-app .btn { transition: none; }
}
