/* Kinelio Core R11.7.1 — deceased memorial discovery */

.memorial-directory-page {
  max-width: 1240px;
}

.memorial-directory-search {
  margin: 6px 0 12px;
}

.memorial-directory-search > label,
.memorial-filter-grid label > span,
.memorial-year-field legend {
  display: block;
  margin-bottom: 7px;
  color: var(--k-text-2);
  font-size: 14px;
  font-weight: 650;
}

.memorial-directory-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.memorial-directory-search-row input,
.memorial-filter-grid input,
.memorial-filter-grid select {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #c7c7cc;
  border-radius: var(--k-radius-control);
  background: var(--k-white);
  color: var(--k-text);
  font: inherit;
}

.memorial-filter-disclosure {
  margin-top: 12px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius-card);
  background: var(--k-surface);
}

.memorial-filter-disclosure > summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  cursor: pointer;
  color: var(--k-text);
  font-weight: 700;
  list-style: none;
}

.memorial-filter-disclosure > summary::-webkit-details-marker {
  display: none;
}

.memorial-filter-disclosure[open] > summary {
  border-bottom: 1px solid var(--k-border);
}

.memorial-filter-disclosure > p {
  margin: 14px 18px 0;
  color: var(--k-muted);
  font-size: 14px;
}

.memorial-filter-grid {
  display: grid;
  grid-template-columns:
    minmax(120px, .55fr)
    minmax(220px, 1fr)
    minmax(220px, 1fr)
    minmax(180px, .8fr)
    minmax(180px, .8fr)
    auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px 18px;
}

.memorial-year-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.memorial-year-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 8px;
}

.memorial-year-field legend {
  grid-column: 1 / -1;
}

.memorial-year-field label {
  min-width: 0;
}

.memorial-filter-actions {
  display: flex;
  gap: 8px;
}

.memorial-directory-row {
  min-height: 104px;
}

.memorial-directory-row .memory-label {
  margin: 0 0 2px;
  color: var(--k-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
  line-height: 1.2;
}

.memorial-directory-row .directory-person-copy p {
  white-space: normal;
}

.memorial-directory-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1180px) {
  .memorial-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .memorial-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .memorial-directory-search-row {
    grid-template-columns: 1fr;
  }

  .memorial-directory-search-row .button {
    width: 100%;
  }

  .memorial-filter-grid {
    grid-template-columns: 1fr;
  }

  .memorial-filter-actions {
    flex-wrap: wrap;
  }

  .memorial-filter-actions .button {
    flex: 1 1 auto;
  }
}


/* ===== R11.7.2 — MEMORIAL FILTER CONTROL POLISH ===== */
.memorial-filter-disclosure { overflow: hidden; }
.memorial-filter-disclosure > summary { gap: 10px; user-select: none; }
.memorial-filter-toggle-less { display: none; }
.memorial-filter-disclosure[open] .memorial-filter-toggle-more { display: none; }
.memorial-filter-disclosure[open] .memorial-filter-toggle-less { display: inline; }
.memorial-filter-toggle-chevron { width: 9px; height: 9px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transform-origin: center; transition: transform .16s ease; }
.memorial-filter-disclosure[open] .memorial-filter-toggle-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.memorial-filter-grid { display: grid; gap: 10px; padding: 16px 18px 18px; }
.memorial-filter-row { display: grid; min-width: 0; gap: 10px; }
.memorial-filter-row-top { grid-template-columns: minmax(130px, .75fr) minmax(220px, 1.45fr) minmax(180px, 1fr); }
.memorial-filter-row-years { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.memorial-filter-grid input, .memorial-filter-grid select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 0 40px 0 13px; border: 1px solid #c7c7cc; border-radius: var(--k-radius-control); outline: none; background-color: var(--k-white); color: var(--k-text); font: inherit; font-size: 15px; }
.memorial-filter-grid input { padding-right: 13px; }
.memorial-filter-grid select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #555 50%), linear-gradient(135deg, #555 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.memorial-filter-actions { justify-content: flex-end; }
@media (max-width: 820px) {
  .memorial-filter-row-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
  .memorial-filter-row-top select:last-child { grid-column: 1 / -1; }
  .memorial-filter-row-years { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .memorial-directory-search { margin-inline: 0; }
  .memorial-filter-disclosure > summary { min-height: 52px; padding-inline: 14px; }
  .memorial-filter-disclosure > p { margin-inline: 14px; }
  .memorial-filter-grid { padding: 12px 14px 14px; }
  .memorial-filter-row-top { grid-template-columns: 1fr; }
  .memorial-filter-row-top select:last-child { grid-column: auto; }
  .memorial-filter-row-years { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memorial-filter-grid input, .memorial-filter-grid select { min-height: 50px; font-size: 16px; }
  .memorial-filter-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}
/* ===== END R11.7.2 ===== */


/* ===== R11.7.2 FIX3 — SHARED UI STANDARDIZATION ===== */

/* Font-glyph chevrons are replaced by a CSS shape that follows currentColor. */
.language-menu-chevron {
  box-sizing: border-box;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: inherit !important;
  font-size: 0 !important;
  line-height: 0;
  transform: rotate(45deg) translate(-1px, -1px);
  transform-origin: center;
}

.language-menu[open] .language-menu-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

/* Memorial search: query + normal Search button + compact settings icon. */
.memorial-directory-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 52px;
  gap: 10px;
  margin: 6px 0 18px;
}

.memorial-search-query {
  grid-column: 1;
  min-width: 0;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #c7c7cc;
  border-radius: var(--k-radius-control);
  background: var(--k-white);
  color: var(--k-text);
  font: inherit;
}

.memorial-search-query:focus {
  border-color: #111;
  outline: none;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, .08);
}

.memorial-search-submit {
  grid-column: 2;
  min-width: 96px;
  min-height: 50px;
}

.memorial-filter-disclosure {
  position: static;
  grid-column: 1 / -1;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.memorial-filter-disclosure > summary.memorial-filter-trigger {
  position: absolute;
  top: 0;
  right: 0;
  box-sizing: border-box;
  width: 50px;
  min-width: 50px;
  height: 50px;
  min-height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c7c7cc;
  border-radius: 12px;
  background: #fff;
  color: #111;
  cursor: pointer;
  list-style: none;
}

.memorial-filter-disclosure > summary.memorial-filter-trigger::-webkit-details-marker {
  display: none;
}

.memorial-filter-trigger svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.memorial-filter-disclosure[open] > summary.memorial-filter-trigger {
  border-color: #111;
  background: #111;
  color: #fff;
  box-shadow: none;
}

.memorial-filter-panel {
  margin-top: 2px;
  overflow: hidden;
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius-card);
  background: var(--k-surface);
}

.memorial-filter-panel > p {
  margin: 14px 18px 0;
  color: var(--k-muted);
  font-size: 14px;
}

.memorial-filter-grid {
  grid-template-columns: 1fr !important;
  gap: 12px;
}

.memorial-filter-row-top {
  grid-template-columns:
    minmax(150px, .72fr)
    minmax(240px, 1.4fr)
    minmax(180px, .9fr);
  gap: 12px;
}

.memorial-filter-row-years {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.memorial-year-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.memorial-year-group legend {
  margin: 0 0 7px;
  padding: 0;
  color: var(--k-text-2);
  font-size: 13px;
  font-weight: 700;
}

.memorial-year-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.memorial-year-range input {
  min-width: 0;
  padding-inline: 13px;
}

.memorial-filter-actions {
  justify-content: flex-start;
}

/* Desktop account composition: ID and memorials become parallel modules. */
@media (min-width: 861px) {
  .account-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    align-items: start;
  }

  .account-page > .page-heading,
  .account-page > .my-profile-summary,
  .account-page > .account-surface-grid {
    grid-column: 1 / -1;
  }

  .account-page > .account-section-heading:has(+ .r116-managed-grid) {
    grid-column: 1;
    grid-row: 3;
  }

  .account-page > .r116-managed-grid {
    grid-column: 1;
    grid-row: 4;
    grid-template-columns: 1fr;
    margin-bottom: 28px;
  }

  .account-page > .account-section-heading:has(+ .owner-grid) {
    grid-column: 2;
    grid-row: 3;
  }

  .account-page > .owner-grid {
    grid-column: 2;
    grid-row: 4;
    grid-template-columns: 1fr;
    margin-bottom: 28px;
  }

  .account-page > .r116-managed-grid > *,
  .account-page > .owner-grid > * {
    height: 100%;
  }
}

/* Mobile account actions become three familiar icon controls. */
@media (max-width: 860px) {
  .account-page {
    display: block;
  }

  .my-profile-summary-actions {
    display: grid;
    grid-template-columns: repeat(3, 48px);
    gap: 10px;
    justify-content: start;
    max-width: 100%;
  }

  .my-profile-summary-actions .button {
    position: relative;
    box-sizing: border-box;
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
  }

  .my-profile-summary-actions .button::before {
    content: "";
    width: 22px;
    height: 22px;
    display: block;
    background: currentColor;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
  }

  .my-profile-summary-actions .button:nth-child(1)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M3 21a6 6 0 0 1 9-5.2M15 18l4-4 2 2-4 4-3 1 1-3Z'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M3 21a6 6 0 0 1 9-5.2M15 18l4-4 2 2-4 4-3 1 1-3Z'/%3E%3C/g%3E%3C/svg%3E");
  }

  .my-profile-summary-actions .button:nth-child(2)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M12 3 5 6v5c0 4.7 2.8 8 7 10 4.2-2 7-5.3 7-10V6l-7-3Zm-2 9 1.5 1.5L15 10'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M12 3 5 6v5c0 4.7 2.8 8 7 10 4.2-2 7-5.3 7-10V6l-7-3Zm-2 9 1.5 1.5L15 10'/%3E%3C/svg%3E");
  }

  .my-profile-summary-actions .button:nth-child(3)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3C/svg%3E");
  }
}

@media (max-width: 560px) {
  .memorial-directory-search {
    grid-template-columns: auto 52px minmax(0, 1fr);
  }

  .memorial-search-query {
    grid-column: 1 / -1;
  }

  .memorial-search-submit {
    grid-column: 1;
    min-width: 104px;
  }

  .memorial-filter-disclosure > summary.memorial-filter-trigger {
    top: 60px;
    right: auto;
    left: 114px;
  }

  .memorial-filter-row-top {
    grid-template-columns: 1fr;
  }

  .memorial-filter-row-years {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .memorial-year-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memorial-filter-panel {
    margin-top: 2px;
  }
}
/* ===== END R11.7.2 FIX3 ===== */


/* ===== R11.7.2 FIX5 — SHARED UI QUALITY PASS ===== */

/* Account menu chevron matches the language selector size and inherits state color. */
.account-menu > summary {
  min-width: 76px;
  min-height: 48px;
  box-sizing: border-box;
  justify-content: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
}

.account-menu-chevron {
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: inherit;
  font-size: 0 !important;
  line-height: 0;
  transform: rotate(45deg) translate(-1px, -1px);
  transform-origin: center;
}

.account-menu[open] .account-menu-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

/* Profile actions are icon controls on every viewport, not text buttons on desktop. */
.my-profile-summary-actions {
  display: grid !important;
  grid-template-columns: repeat(3, 48px) !important;
  gap: 10px !important;
  justify-content: end;
  align-items: center;
  max-width: 100%;
}

.my-profile-summary-actions .button {
  position: relative;
  box-sizing: border-box;
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden;
  border-radius: 12px !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.my-profile-summary-actions .button::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.my-profile-summary-actions .button:nth-child(1)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M3 21a6 6 0 0 1 9-5.2M15 18l4-4 2 2-4 4-3 1 1-3Z'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M3 21a6 6 0 0 1 9-5.2M15 18l4-4 2 2-4 4-3 1 1-3Z'/%3E%3C/g%3E%3C/svg%3E");
}

.my-profile-summary-actions .button:nth-child(2)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M12 3 5 6v5c0 4.7 2.8 8 7 10 4.2-2 7-5.3 7-10V6l-7-3Zm-2 9 1.5 1.5L15 10'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M12 3 5 6v5c0 4.7 2.8 8 7 10 4.2-2 7-5.3 7-10V6l-7-3Zm-2 9 1.5 1.5L15 10'/%3E%3C/svg%3E");
}

.my-profile-summary-actions .button:nth-child(3)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

/* Desktop account modules use symmetric rows with identical vertical rhythm. */
@media (min-width: 861px) {
  .account-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 14px;
    align-items: stretch;
  }

  .account-page > .page-heading {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 12px;
  }

  .account-page > .my-profile-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-bottom: 26px;
  }

  .account-page > .account-section-heading {
    margin: 0 0 2px;
    align-self: end;
  }

  .account-page > .account-section-heading:has(+ .r116-managed-grid) {
    grid-column: 1;
    grid-row: 3;
  }

  .account-page > .account-section-heading:has(+ .owner-grid) {
    grid-column: 2;
    grid-row: 3;
  }

  .account-page > .r116-managed-grid,
  .account-page > .owner-grid {
    grid-row: 4;
    margin: 0 !important;
    align-self: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-page > .r116-managed-grid {
    grid-column: 1;
  }

  .account-page > .owner-grid {
    grid-column: 2;
  }

  .account-page > .r116-managed-grid > *,
  .account-page > .owner-grid > * {
    box-sizing: border-box;
    height: 100%;
    min-height: 210px;
    margin: 0 !important;
  }

  .account-page > .owner-grid .empty-state {
    display: grid;
    align-content: center;
  }

  .account-page > .account-surface-grid {
    grid-column: 1 / -1;
    grid-row: 5;
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
  }

  .account-page > .account-surface-grid .family-entry-panel {
    box-sizing: border-box;
    height: 100%;
    min-height: 210px;
    margin: 0 !important;
  }
}

@media (max-width: 860px) {
  .my-profile-summary {
    row-gap: 16px;
  }

  .my-profile-summary-actions {
    grid-column: 1 / -1 !important;
    justify-content: center;
    width: 100%;
    padding-top: 2px;
  }
}

/* Shared custom picker language: no native select sheets in memorial filters. */
.k-custom-picker,
.k-year-picker {
  position: relative;
  min-width: 0;
}

.k-picker-trigger,
.k-year-trigger {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #c7c7cc;
  border-radius: 11px;
  background: #fff;
  color: #111;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.k-picker-trigger:focus-visible,
.k-year-trigger:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.k-picker-trigger svg {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.k-year-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.k-picker-popover,
.k-year-popover {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  left: 0;
  box-sizing: border-box;
  width: min(320px, calc(100vw - 48px));
  padding: 10px;
  border: 1px solid #d4d4d8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 17, 17, .14);
}

[data-k-align="right"] > .k-picker-popover,
[data-k-align="right"] > .k-year-popover {
  right: 0;
  left: auto;
}

.k-picker-option {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #111;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.k-picker-option:hover,
.k-picker-option:focus-visible,
.k-picker-option.is-selected {
  background: #f1f1f2;
  outline: none;
}

.k-picker-option-wide {
  margin-bottom: 8px;
  font-weight: 700;
}

.k-letter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.k-letter-grid .k-picker-option {
  aspect-ratio: 1;
  min-height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 700;
}

.k-year-popover {
  width: min(300px, calc(100vw - 48px));
}

.k-year-nav {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.k-year-nav strong {
  text-align: center;
  font-size: 14px;
}

.k-year-nav button,
.k-year-option,
.k-year-clear {
  border: 1px solid #dedee3;
  border-radius: 9px;
  background: #fff;
  color: #111;
  font: inherit;
  cursor: pointer;
}

.k-year-nav button {
  width: 38px;
  height: 38px;
  font-size: 22px;
  line-height: 1;
}

.k-year-nav button:disabled {
  opacity: .35;
  cursor: default;
}

.k-year-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.k-year-option {
  min-height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.k-year-option:hover,
.k-year-option:focus-visible,
.k-year-option.is-selected {
  border-color: #111;
  background: #111;
  color: #fff;
  outline: none;
}

.k-year-option:disabled {
  opacity: .25;
  cursor: default;
}

.k-year-clear {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  font-weight: 700;
}

.memorial-filter-panel {
  overflow: visible !important;
}

.memorial-filter-disclosure > summary.memorial-filter-trigger {
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.memorial-filter-trigger svg {
  display: block;
  margin: 0 auto;
  transform: none !important;
}

/* ===== END R11.7.2 FIX5 ===== */


/* FIX5.1 exact optical centering for filter icon buttons. */
.memorial-filter-disclosure > summary.memorial-filter-trigger {
  position: absolute;
}

.memorial-filter-trigger svg {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}
/* END FIX5.1 */


/* ===== R11.7.2 FIX6 — FINAL ALIGNMENT + PICKER GEOMETRY ===== */

/* Search controls: the Search and filter buttons are true grid siblings. */
.memorial-directory-search {
  grid-template-columns: minmax(0, 1fr) auto 52px;
  align-items: start;
}

.memorial-filter-trigger {
  grid-column: 3;
  grid-row: 1;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  box-sizing: border-box;
  width: 50px;
  min-width: 50px;
  height: 50px;
  min-height: 50px;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  align-self: start;
  border: 1px solid #c7c7cc;
  border-radius: 12px;
  background: #fff;
  color: #111;
  cursor: pointer;
  line-height: 0 !important;
}

.memorial-filter-trigger[aria-expanded="true"] {
  border-color: #111;
  background: #111;
  color: #fff;
}

.memorial-filter-trigger svg {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: 21px;
  height: 21px;
  margin: 0 !important;
  display: block;
  transform: none !important;
}

.memorial-filter-panel {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 0;
}

.memorial-filter-panel[hidden] { display: none !important; }

/* One initial-letter control per surface: results page uses the quick alphabet rail. */
.memorial-filter-row-top {
  grid-template-columns: minmax(240px, 1.45fr) minmax(220px, .9fr);
}

/* Picker popovers match their trigger width. */
.k-picker-popover {
  width: 100%;
  min-width: 100%;
  max-width: none;
}

/* Year popovers span the complete From + To range, on desktop and mobile. */
.memorial-year-range .k-year-picker > .k-year-popover,
.home-r8-year-range .k-year-picker > .k-year-popover {
  width: calc(200% + 8px);
  min-width: calc(200% + 8px);
  max-width: none;
}

.memorial-year-range .k-year-picker:first-child > .k-year-popover,
.home-r8-year-range .k-year-picker:first-child > .k-year-popover {
  left: 0;
  right: auto;
}

.memorial-year-range .k-year-picker:last-child > .k-year-popover,
.home-r8-year-range .k-year-picker:last-child > .k-year-popover {
  left: auto;
  right: 0;
}

.k-year-option {
  min-height: 46px;
  font-size: 16px;
}

/* Profile actions: exact geometric centering and a useful mobile placement. */
.my-profile-summary-actions .button {
  position: relative !important;
  display: block !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.my-profile-summary-actions .button::before {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 21px !important;
  height: 21px !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}

/* Manage profile uses a visually balanced edit glyph. */
.my-profile-summary-actions .button:nth-child(1)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 20h4l11-11-4-4L4 16v4Zm9.5-13.5 4 4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 20h4l11-11-4-4L4 16v4Zm9.5-13.5 4 4'/%3E%3C/svg%3E");
}

@media (max-width: 860px) {
  .my-profile-summary {
    grid-template-columns: 64px minmax(0, 1fr) 48px !important;
    column-gap: 16px !important;
    row-gap: 4px !important;
    align-items: center;
  }

  .my-profile-avatar {
    grid-column: 1;
    grid-row: 1;
  }

  .my-profile-summary-copy {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .my-profile-summary-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    grid-template-columns: 48px !important;
    grid-template-rows: repeat(3, 48px) !important;
    gap: 8px !important;
    width: 48px !important;
    max-width: 48px !important;
    padding: 0 !important;
    justify-self: end !important;
    align-self: center !important;
  }
}

@media (max-width: 560px) {
  .memorial-directory-search {
    grid-template-columns: auto 52px minmax(0, 1fr);
    align-items: start;
  }

  .memorial-search-query {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .memorial-search-submit {
    grid-column: 1;
    grid-row: 2;
    height: 50px;
    min-height: 50px;
    margin: 0 !important;
    align-self: start;
  }

  .memorial-filter-trigger {
    grid-column: 2;
    grid-row: 2;
    width: 50px;
    height: 50px;
    align-self: start;
  }

  .memorial-filter-panel {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .memorial-filter-row-top {
    grid-template-columns: 1fr;
  }

  .k-picker-popover,
  [data-k-align="right"] > .k-picker-popover {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .k-letter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .k-letter-grid .k-picker-option {
    min-height: 52px;
    font-size: 18px;
  }

  .k-year-option {
    min-height: 48px;
    font-size: 17px;
  }

  .my-profile-summary {
    grid-template-columns: 56px minmax(0, 1fr) 48px !important;
    column-gap: 14px !important;
    padding-right: 16px !important;
  }
}

/* ===== END R11.7.2 FIX6 ===== */


/* ===== R11.7.2 FIX7 — cumulative copy/social/search/avatar polish ===== */
:root {
  --kinelio-search-control-height: 52px;
}

/* Authenticated initials remain readable in both inverse hero and sticky header states. */
.header-account-avatar > span {
  color: #111111 !important;
}

/* Shared search-control geometry: homepage + memorial directory. */
.home-r8-search-query,
.home-r8-search-submit,
.home-r8-filter-trigger,
.memorial-search-query,
.memorial-search-submit,
.memorial-filter-trigger {
  box-sizing: border-box !important;
  height: var(--kinelio-search-control-height) !important;
  min-height: var(--kinelio-search-control-height) !important;
  max-height: var(--kinelio-search-control-height) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  align-self: start !important;
}

.home-r8-search-query,
.memorial-search-query {
  border: 2px solid #4a4a4a !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1.35 !important;
}

.home-r8-search-query:focus,
.memorial-search-query:focus {
  border-color: #111111 !important;
}

.home-r8-search-submit,
.memorial-search-submit,
.home-r8-filter-trigger,
.memorial-filter-trigger {
  line-height: 1 !important;
}

@media (max-width: 560px) {
  .home-r8-search-query,
  .home-r8-search-submit,
  .home-r8-filter-trigger,
  .memorial-search-query,
  .memorial-search-submit,
  .memorial-filter-trigger {
    height: var(--kinelio-search-control-height) !important;
    min-height: var(--kinelio-search-control-height) !important;
    max-height: var(--kinelio-search-control-height) !important;
  }
}
/* ===== END R11.7.2 FIX7 ===== */
