/* Trang cáo phó (sukien/obituary.html): trang trọng, đen - xám - trắng. */
.cp {
  --ink: #1f1f1f; --muted: #6b6b6b; --line: #d9d9d9; --bg: #efefed; --card: #ffffff;
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
.cp *, .cp *::before, .cp *::after { box-sizing: border-box; }
.cp a { color: var(--ink); }
.cp img { max-width: 100%; display: block; }
.cp h1, .cp h2, .cp h3 { font-family: "Noto Serif", Georgia, serif; }
.cp-muted { color: var(--muted); font-size: .92rem; }
.cp-center { text-align: center; }
.cp-sample { background: #2b2b2b; color: #eee; text-align: center; font-size: .88rem; padding: 8px 16px; }
.cp-sample a { color: #fff; font-weight: 600; }

.cp-main { max-width: 640px; margin: 0 auto; padding: 24px 16px 8px; overflow-wrap: anywhere; }
.cp-sheet {
  background: var(--card); border: 1px solid #2b2b2b; outline: 6px solid var(--card); box-shadow: 0 0 0 7px #2b2b2b;
  margin: 8px 8px 28px; padding: 32px 22px; text-align: center;
}
.cp-kicker { font-family: "Noto Serif", serif; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; font-size: 1.6rem; margin: 0 0 14px; }
.cp-lead { font-family: "Noto Serif", serif; font-style: italic; margin: 0 0 18px; }
.cp-portrait { position: relative; width: 190px; margin: 0 auto 18px; border: 6px solid #fff; box-shadow: 0 0 0 1px #2b2b2b, 0 10px 24px rgba(0,0,0,.18); overflow: hidden; }
.cp-portrait img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(.15); }
.cp-ribbon { position: absolute; top: 18px; right: -34px; width: 120px; height: 16px; background: #111; transform: rotate(45deg); }
.cp-honorific { text-transform: uppercase; letter-spacing: .2em; font-size: .85rem; color: var(--muted); margin: 0; }
.cp-name { font-size: clamp(1.7rem, 7vw, 2.4rem); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 4px; line-height: 1.25; }
.cp-religious { margin: 0 0 6px; font-style: italic; }
.cp-facts { margin: 18px auto 0; max-width: 420px; text-align: left; border-top: 1px solid var(--line); }
.cp-facts div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cp-facts dt { color: var(--muted); font-size: .9rem; }
.cp-facts dd { margin: 0; font-weight: 500; }

.cp-sec { margin-top: 26px; }
.cp-sec h2, .cp-card h2 { font-size: 1.25rem; margin: 0 0 12px; text-align: center; }
.cp-sec h2::after, .cp-card h2::after { content: ""; display: block; width: 40px; height: 1px; background: #2b2b2b; margin: 8px auto 0; }
.cp-events { list-style: none; margin: 0; padding: 0; }
.cp-events li { padding: 14px 0; border-top: 1px dashed var(--line); }
.cp-events li:first-child { border-top: 0; padding-top: 0; }
.cp-events h3 { font-size: 1.05rem; margin: 0 0 2px; }
.cp-events p { margin: 2px 0; }
.cp-place { font-weight: 600; margin-top: 6px !important; }
.cp-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px !important; }
.cp-note { margin: 22px 0 0; padding: 12px 14px; border: 1px solid var(--line); background: #f7f7f6; font-style: italic; }
.cp-gio { margin: 22px 0 0; color: var(--muted); font-size: .92rem; }
.cp-mourners ul { list-style: none; padding: 0; margin: 0; }
.cp-mourners li { padding: 3px 0; }
.cp-closing { font-family: "Noto Serif", serif; font-weight: 600; margin: 26px 0 0; }

.cp-btn {
  display: inline-block; background: #2b2b2b; color: #fff !important; border: 1px solid #2b2b2b; border-radius: 6px;
  padding: 8px 16px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none;
}
.cp-btn-ghost { background: #fff; color: #2b2b2b !important; }
.cp-btn-full { width: 100%; padding: 11px; }

.cp-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 24px 18px; margin: 0 0 18px; }
.cp-album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tc-ph { padding: 0; border: 0; background: none; cursor: zoom-in; aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.tc-ph img { width: 100%; height: 100%; object-fit: cover; }

.cp-form { display: grid; gap: 12px; }
.cp-form label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.cp-form input:not([type=checkbox]), .cp-form textarea, .cp-report textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; width: 100%;
}
.cp-form input:focus, .cp-form textarea:focus { outline: 2px solid #9a9a9a; }
.cp-check { display: flex !important; align-items: center; gap: 8px; color: var(--ink) !important; }
.cp-check input { accent-color: #2b2b2b; width: 18px; height: 18px; }
.tc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cp-ok { background: #f1f1f0; border-left: 3px solid #2b2b2b; padding: 10px 14px; }
.cp-condolences { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; max-height: 520px; overflow: auto; }
.cp-condolences li { border-left: 2px solid var(--line); padding: 4px 0 4px 12px; }
.cp-condolences p { margin: 0 0 2px; }
.cp-condolences span { font-size: .85rem; color: var(--muted); font-weight: 600; }

.cp-banks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; margin: 14px 0; }
.cp-bank { text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 14px 10px; }
.cp-bank h3 { margin: 0 0 8px; font-size: 1rem; }
.tc-qr { width: 190px; max-width: 100%; margin: 0 auto; }
.tc-qr svg { width: 100%; height: auto; display: block; }
.tc-qr-sample { position: relative; }
.tc-qr-sample svg { filter: blur(5px); opacity: .5; }
.tc-qr-sample span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; z-index: 1; }
.cp-holder { font-weight: 600; margin: 8px 0 0; }
.cp-bank .cp-muted { margin: 0; }
.cp-acc { margin: 6px 0 0; font-family: ui-monospace, Menlo, monospace; }
.tc-copy { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: #f5f5f5; border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.cp-fine { font-size: .8rem; color: var(--muted); text-align: center; margin: 8px 0; }
.cp-gift { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 10px; }
.cp-gift summary, .cp-report summary { cursor: pointer; text-align: center; list-style: none; }
.cp-gift summary { font-weight: 600; }
.cp-gift[open] summary { margin-bottom: 12px; }
.cp-gift summary::-webkit-details-marker, .cp-report summary::-webkit-details-marker { display: none; }

.cp-foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 8px 16px 40px; }
.cp-foot a { color: var(--muted); }
.cp-report { display: inline; }
.cp-report summary { display: inline; color: var(--muted); }
.cp-report form { display: grid; gap: 8px; max-width: 420px; margin: 8px auto 0; }

.tc-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.tc-lightbox[hidden] { display: none; }
.tc-lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; }
.tc-lightbox button { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; }

@media (max-width: 420px) {
  .cp-sheet { padding: 26px 14px; margin: 8px 4px 24px; }
  .cp-facts div { grid-template-columns: 92px minmax(0, 1fr); }
}
