/* Kinelio Core R5.3.1 R1.6 — human acceptance repair. */
.core-r5-2-header .brand img {
  width: 140px;
  height: auto;
  max-height: 42px;
}

.person-profile-page { width: min(1180px, calc(100% - 64px)); }
.person-profile-hero { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); align-items: start; }
.person-portrait-wrap { width: 100%; max-width: 400px; aspect-ratio: 4 / 5; }
.person-portrait { width: 100%; height: auto !important; aspect-ratio: 4 / 5; object-fit: contain !important; object-position: center; }
.person-profile-intro { margin: 22px 0 0; max-width: 700px; color: var(--k-text-2); font-size: 18px; line-height: 1.65; }
.person-story-section { margin: 0 0 36px; padding: 28px 30px; border: 1px solid var(--k-border); border-radius: var(--k-radius-card); background: var(--k-white); }
.person-story-section h2 { margin: 6px 0 18px; }
.person-story-copy { max-width: 880px; color: var(--k-text-2); font-size: 18px; line-height: 1.72; }

/* The existing featured-wrap is a flex container in the older homepage CSS.
   R1.6 makes the feature card and portrait strip a vertical composition. */
.home-hero .featured-wrap { display: block !important; width: 100%; min-width: 0; }
.home-hero .featured-card { width: 100%; min-width: 0; }
.memorial-showcase-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 9px; width: 100%; margin-top: 14px; }
.memorial-showcase-thumb { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--k-border); border-radius: 10px; background: var(--k-white); cursor: pointer; }
.memorial-showcase-thumb:hover, .memorial-showcase-thumb:focus-visible { border-color: var(--k-text); outline: none; box-shadow: 0 0 0 1px var(--k-text); }
.memorial-showcase-thumb img { display: block; width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: center; }

.kinelio-turnstile { margin: 16px 0 18px; min-height: 65px; }
.auth-shell { padding-top: 72px; padding-bottom: 72px; }
.auth-form .form-errors { grid-column: 1 / -1; border: 1px solid #b42318; border-radius: 10px; padding: 12px 14px; color: #8a1c13; background: #fff; }
.auth-form .form-errors p { margin: 0; }
.auth-alternate { margin-top: 18px; text-align: center; color: var(--k-text-2); }
.auth-alternate a { color: var(--k-text); font-weight: 700; }
.desktop-guest-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.desktop-register-link { text-decoration: none; font-weight: 700; }
.desktop-login-link { white-space: nowrap; }

@media (max-width: 900px) {
  .core-r5-2-header .brand img { width: 118px; height: auto; max-height: 38px; }
  .person-profile-page { width: min(100% - 36px, 760px); }
  .memorial-showcase-strip { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .memorial-showcase-thumb { flex: 0 0 78px; scroll-snap-align: start; }
  .desktop-guest-actions { display: none; }
}
@media (max-width: 720px) {
  .person-profile-hero { grid-template-columns: 1fr; }
  .person-portrait-wrap { max-width: 420px; }
  .person-story-section { padding: 22px 20px; }
}


/* ===== START KINELIO CORE R5.3.2 — PUBLIC LAUNCH SURFACES ===== */
.auth-experience {
  width: min(1180px, calc(100% - 64px));
  min-height: 720px;
  margin: 42px auto 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  border: 1px solid var(--k-border);
  background: var(--k-white);
  overflow: hidden;
}
.auth-story {
  padding: 54px 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--k-border);
  background: linear-gradient(180deg, #fbfbfa 0%, #f4f4f1 100%);
}
.auth-story-brand { font-size: 34px; font-weight: 800; letter-spacing: -1.2px; }
.auth-story-main { margin-top: 70px; }
.auth-story h1 { max-width: 620px; margin: 16px 0 20px; font-size: clamp(42px, 4vw, 56px); line-height: 1.02; letter-spacing: -2.4px; }
.auth-story .lead { max-width: 590px; color: var(--k-text-2); font-size: 19px; line-height: 1.6; }
.auth-principles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.auth-principle { padding: 16px; border: 1px solid var(--k-border); border-radius: 12px; background: rgba(255,255,255,.86); }
.auth-principle strong { display: block; margin-bottom: 5px; }
.auth-principle span { color: var(--k-text-2); font-size: 14px; line-height: 1.45; }
.auth-story-foot { margin: 34px 0 0; color: var(--k-text-2); font-size: 13px; line-height: 1.55; }
.auth-panel { display: flex; align-items: center; padding: 52px 54px; }
.auth-panel-inner { width: 100%; max-width: 450px; margin: 0 auto; }
.auth-panel h2 { margin: 7px 0 10px; font-size: 34px; line-height: 1.08; letter-spacing: -1.1px; }
.auth-panel-subtitle { margin: 0 0 26px; color: var(--k-text-2); line-height: 1.55; }
.auth-form { display: grid; grid-template-columns: 1fr; gap: 15px; }
.auth-form label { display: grid; gap: 7px; font-size: 14px; font-weight: 750; }
.auth-form input:not([type="checkbox"]) { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid #cfd2d7; border-radius: 10px; background: #fff; color: #111; font: inherit; font-size: 16px; }
.auth-form input:focus { border-color: #111; outline: 0; box-shadow: 0 0 0 3px rgba(0,0,0,.07); }
.auth-name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-turnstile-frame { min-height: 96px; padding: 13px 14px; border: 1px solid #cfd2d7; border-radius: 10px; background: #fafafa; overflow-x: auto; }
.auth-turnstile-frame > strong { display: block; margin-bottom: 10px; font-size: 13px; }
.auth-form .button { min-height: 52px; width: 100%; }
.auth-legal-note { margin: 0; color: var(--k-text-2); font-size: 12px; line-height: 1.55; }
.auth-legal-note a { color: var(--k-text); }
.auth-trust { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--k-border); color: var(--k-text-2); font-size: 12px; }
.auth-form .error { color: #9f1c13; font-weight: 600; }

/* Safari/iOS and Android search controls must use the Kinelio geometry. */
input[type="search"],
.hero-search input[type="search"],
.search-panel input[type="search"],
.header-search input[type="search"],
.mobile-header-search input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.25;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { -webkit-appearance: none; }

.memorial-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: start; }
.memorial-title-copy { min-width: 0; }
.memorial-hero-qr { width: 132px; padding: 10px; border: 1px solid var(--k-border); border-radius: 14px; background: #fff; text-decoration: none; color: var(--k-text); box-shadow: 0 8px 24px rgba(0,0,0,.04); }
.memorial-hero-qr img { display: block; width: 110px; height: 110px; margin: 0 auto; background: #fff; }
.memorial-hero-qr span { display: block; margin-top: 7px; text-align: center; font-size: 11px; font-weight: 750; line-height: 1.25; }

.site-footer .footer-inner { display: grid; gap: 12px; }
.footer-legal-nav { display: flex; flex-wrap: wrap; gap: 9px 18px; align-items: center; }
.footer-legal-nav a,
.footer-cookie-settings { border: 0; padding: 0; background: none; color: var(--k-text-2); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.footer-cookie-settings:hover, .footer-legal-nav a:hover { color: var(--k-text); }

.legal-page { width: min(900px, calc(100% - 48px)); margin: 56px auto 80px; }
.legal-page h1 { margin: 8px 0 12px; font-size: clamp(38px, 5vw, 58px); letter-spacing: -1.8px; }
.legal-lead { max-width: 760px; color: var(--k-text-2); font-size: 18px; line-height: 1.65; }
.legal-meta { margin: 14px 0 34px; color: var(--k-text-2); font-size: 13px; }
.legal-section { padding: 24px 0; border-top: 1px solid var(--k-border); }
.legal-section h2 { margin: 0 0 12px; font-size: 24px; }
.legal-section p, .legal-section li { color: var(--k-text-2); line-height: 1.7; }
.legal-section ul { padding-left: 22px; }

.kinelio-consent { position: fixed; z-index: 10000; left: 18px; right: 18px; bottom: 18px; max-width: 760px; margin: 0 auto; padding: 18px; border: 1px solid #cfd2d7; border-radius: 14px; background: #fff; box-shadow: 0 16px 50px rgba(0,0,0,.16); }
.kinelio-consent[hidden] { display: none !important; }
.kinelio-consent h2 { margin: 0 0 7px; font-size: 20px; }
.kinelio-consent p { margin: 0; color: var(--k-text-2); font-size: 14px; line-height: 1.55; }
.kinelio-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.kinelio-consent-actions button { min-height: 42px; padding: 0 16px; border: 1px solid #111; border-radius: 9px; background: #fff; color: #111; font-weight: 750; cursor: pointer; }
.kinelio-consent-actions button.primary { background: #111; color: #fff; }
.kinelio-consent-note { margin-top: 10px !important; font-size: 12px !important; }

@media (max-width: 900px) {
  .auth-experience { width: 100%; min-height: auto; margin: 0; grid-template-columns: 1fr; border-left: 0; border-right: 0; }
  .auth-story { padding: 30px 28px 28px; border-right: 0; border-bottom: 1px solid var(--k-border); }
  .auth-story-main { margin-top: 36px; }
  .auth-story h1 { font-size: 40px; letter-spacing: -1.6px; }
  .auth-story .lead { font-size: 17px; }
  .auth-principles, .auth-story-foot { display: none; }
  .auth-panel { padding: 34px 26px 46px; }
  .memorial-title-row { grid-template-columns: minmax(0,1fr) 116px; gap: 14px; }
  .memorial-hero-qr { width: 116px; padding: 8px; }
  .memorial-hero-qr img { width: 98px; height: 98px; }
}
@media (max-width: 520px) {
  .auth-name-grid { grid-template-columns: 1fr; }
  .auth-story { padding-inline: 22px; }
  .auth-panel { padding-inline: 22px; }
  .auth-panel h2 { font-size: 30px; }
  .memorial-title-row { grid-template-columns: minmax(0, 1fr) 108px; }
  .memorial-hero-qr { width: 108px; }
  .memorial-hero-qr img { width: 90px; height: 90px; }
  .kinelio-consent { left: 10px; right: 10px; bottom: 10px; }
}
/* ===== END KINELIO CORE R5.3.2 — PUBLIC LAUNCH SURFACES ===== */
