/* Account pages: /dang-ky/, /dang-nhap/, /trang-ca-nhan/ (template-tai-khoan.php). */

.nhanso-acc {
    --acc-night: #17133d;
    --acc-deep: #2b1f66;
    --acc-gold: #f5c86a;
    --acc-gold-ink: #8a5a00;
    --acc-ink: #241f3d;
    --acc-muted: #6a6585;
    --acc-line: #e6e2f3;
    --acc-card: #ffffff;
    --acc-wash: #f6f4fc;
    --acc-good: #1f9d6a;
    --acc-mid: #c99a2e;
    --acc-low: #d0574c;
    position: relative;
    min-height: 80vh;
    padding: calc(var(--ns-header-h) + 28px) 16px 64px;
    background: var(--acc-wash);
    color: var(--acc-ink);
    overflow: hidden;
}

/* The night sky behind the top of the page. */
.nhanso-acc__sky {
    position: absolute;
    inset: 0 0 auto;
    height: var(--acc-sky, 520px); /* set by the script to reach below the top block */
    background:
        radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 28% 64%, rgba(255, 255, 255, .8) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 44% 18%, rgba(255, 255, 255, .9) 50%, transparent 51%),
        radial-gradient(1px 1px at 63% 42%, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 78% 20%, rgba(255, 230, 170, .95) 50%, transparent 51%),
        radial-gradient(1px 1px at 88% 58%, rgba(255, 255, 255, .7) 50%, transparent 51%),
        radial-gradient(1px 1px at 6% 70%, rgba(255, 255, 255, .7) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 54% 76%, rgba(255, 255, 255, .6) 50%, transparent 51%),
        radial-gradient(120% 90% at 80% 0%, #4a3596 0%, transparent 60%),
        linear-gradient(180deg, var(--acc-night), var(--acc-deep) 75%, var(--acc-wash));
    pointer-events: none;
}

.nhanso-acc > *:not(.nhanso-acc__sky):not(dialog) {
    position: relative;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.nhanso-acc h1,
.nhanso-acc h2,
.nhanso-acc h3 {
    color: inherit;
}

.nhanso-acc__kicker {
    margin: 0 0 6px;
    color: var(--acc-gold);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nhanso-acc__small {
    margin: 4px 0;
    color: var(--acc-muted);
    font-size: 14px;
    line-height: 1.5;
}

.nhanso-acc__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 300px;
    color: #fff;
}

.nhanso-acc__spin {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: var(--acc-gold);
    border-radius: 50%;
    animation: nhanso-acc-spin .8s linear infinite;
}

@keyframes nhanso-acc-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- buttons */

.nhanso-acc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd98a, #f0a93a);
    color: #3a2300;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px -10px rgba(240, 169, 58, .9);
    transition: transform .15s, box-shadow .15s, opacity .15s;
}

.nhanso-acc__btn:hover { transform: translateY(-1px); color: #3a2300; }
.nhanso-acc__btn:disabled { opacity: .6; cursor: wait; transform: none; }
.nhanso-acc__btn.is-busy::after {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(58, 35, 0, .3);
    border-top-color: #3a2300;
    border-radius: 50%;
    animation: nhanso-acc-spin .8s linear infinite;
}

.nhanso-acc__btn.is-ghost {
    background: var(--acc-wash);
    color: var(--acc-ink);
    box-shadow: inset 0 0 0 1px var(--acc-line);
}

.nhanso-acc__btn.is-danger { background: var(--acc-low); color: #fff; box-shadow: none; }
.nhanso-acc__btn.is-danger.is-ghost { background: #fff; color: var(--acc-low); box-shadow: inset 0 0 0 1px rgba(208, 87, 76, .4); }

.nhanso-acc__link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ns-red);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nhanso-acc__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

/* ----------------------------------------------------------------- forms */

.nhanso-acc__form {
    display: grid;
    gap: 14px;
}

.nhanso-acc__form h2 {
    margin: 0;
    font-size: 22px;
}

.nhanso-acc label,
.nhanso-acc legend {
    display: grid;
    gap: 6px;
    color: var(--acc-ink);
    font-size: 14px;
    font-weight: 600;
}

.nhanso-acc input,
.nhanso-acc select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--acc-line);
    border-radius: 12px;
    background: #fff;
    color: var(--acc-ink);
    font-size: 16px;
    font-weight: 400;
    transition: border-color .15s, box-shadow .15s;
}

.nhanso-acc input:focus,
.nhanso-acc select:focus {
    outline: none;
    border-color: #8b74e0;
    box-shadow: 0 0 0 4px rgba(139, 116, 224, .18);
}

.nhanso-acc__pw {
    position: relative;
    display: block;
}

.nhanso-acc__pw input { padding-right: 48px; }

.nhanso-acc__pw button {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    border: 0;
    background: none;
    color: var(--acc-muted);
    cursor: pointer;
}

.nhanso-acc__hp {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.nhanso-acc__err {
    margin: 0;
    min-height: 0;
    color: var(--acc-low);
    font-size: 14px;
    font-weight: 600;
}

.nhanso-acc__err:empty { display: none; }

.nhanso-acc__carry {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(31, 157, 106, .08);
    color: #136b48;
    font-size: 14px;
}

/* A relative's invitation (inc/nhanso-ket-noi-moi.php). */
.nhanso-acc__invite {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff6e2;
    box-shadow: inset 0 0 0 1px #f3dfa8;
    color: #6b4300;
    font-size: 14px;
    line-height: 1.5;
}

/* ------------------------------------------------------------ signed out */

.nhanso-acc__auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    align-items: start;
    gap: 48px;
    padding-top: 12px;
}

.nhanso-acc__pitch {
    padding-top: 28px;
    color: #fff;
}

.nhanso-acc__pitch h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4.4vw, 46px);
    line-height: 1.15;
    color: #fff;
}

.nhanso-acc__pitch > p:not(.nhanso-acc__kicker) {
    max-width: 34em;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .85);
    font-size: 17px;
}

.nhanso-acc__pitch ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nhanso-acc__pitch li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--acc-ink);
    font-weight: 600;
}

.nhanso-acc__pitch li span {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 16px -8px rgba(43, 31, 102, .4);
    font-size: 20px;
}

.nhanso-acc__box {
    padding: 22px;
    border-radius: 22px;
    background: var(--acc-card);
    box-shadow: 0 30px 60px -30px rgba(23, 19, 61, .55);
}

.nhanso-acc__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    border-radius: 14px;
    background: var(--acc-wash);
}

.nhanso-acc__tabs button {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--acc-muted);
    font-weight: 700;
    cursor: pointer;
}

.nhanso-acc__tabs button[aria-selected="true"] {
    background: #fff;
    color: var(--acc-ink);
    box-shadow: 0 2px 8px rgba(43, 31, 102, .12);
}

/* ------------------------------------------------------------- signed in */

.nhanso-acc__hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 380px);
    align-items: center;
    gap: 22px;
    margin-bottom: 22px;
    color: #fff;
}

.nhanso-acc__avatar {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff6dc, var(--acc-gold) 70%);
    box-shadow: 0 0 0 6px rgba(245, 200, 106, .2), 0 0 40px rgba(245, 200, 106, .45);
    color: var(--acc-deep);
    font-size: 50px;
    font-weight: 800;
    line-height: 1;
}

.nhanso-acc__hello h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.nhanso-acc__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nhanso-acc__chips > * {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.nhanso-acc__chips .c-edit {
    background: rgba(245, 200, 106, .22);
    color: #ffe3a3;
    cursor: pointer;
}

.nhanso-acc__chips .c-menh::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.c-menh.is-metal { color: #f1e3b0; }
.c-menh.is-wood { color: #9be3a5; }
.c-menh.is-water { color: #9fd0ff; }
.c-menh.is-fire { color: #ffb19a; }
.c-menh.is-earth { color: #f0c995; }

.nhanso-acc__chips.is-small > * {
    min-height: 26px;
    padding: 0 9px;
    background: var(--acc-wash);
    color: var(--acc-ink);
    font-size: 12.5px;
    backdrop-filter: none;
}

.is-small .c-menh.is-metal { color: #8a6d00; }
.is-small .c-menh.is-wood { color: #23804a; }
.is-small .c-menh.is-water { color: #1d63b8; }
.is-small .c-menh.is-fire { color: #c2412b; }
.is-small .c-menh.is-earth { color: #9a5b14; }

.nhanso-acc__today {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.nhanso-acc__today p { margin: 0; }
.nhanso-acc__today .t-k { color: var(--acc-gold); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.nhanso-acc__today .t-streak { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 196, 92, .18); color: #ffd27a; font-size: 12px; letter-spacing: 0; text-transform: none; vertical-align: 1px; }
.nhanso-acc__today .t-stars { margin: 4px 0; color: var(--acc-gold); font-size: 20px; letter-spacing: 2px; }
.nhanso-acc__today .t-stars b { margin-left: 6px; color: #fff; font-size: 16px; letter-spacing: 0; }
.nhanso-acc__today .t-gist { color: rgba(255, 255, 255, .9); font-size: 15px; line-height: 1.5; }

.nhanso-acc__today .t-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 10px;
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
}

.nhanso-acc__today .t-meta b { color: #fff; }

.nhanso-acc__today .t-links {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.nhanso-acc .nhanso-acc__today a { color: #ffe3a3; font-size: 14px; font-weight: 600; }

.nhanso-acc__need,
.nhanso-acc__import {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px -18px rgba(43, 31, 102, .45);
}

.nhanso-acc__need[hidden],
.nhanso-acc__import[hidden] { display: none; }

.nhanso-acc__need p,
.nhanso-acc__import p { margin: 0; flex: 1 1 280px; }

/* Coming up. */
.nhanso-acc__soon,
.nhanso-acc__people,
.nhanso-acc__settings {
    margin-bottom: 26px;
}

.nhanso-acc h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.nhanso-acc h2 small {
    color: var(--acc-muted);
    font-size: 14px;
    font-weight: 500;
}



.nhanso-acc__soon-list {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 2px 2px 10px;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x mandatory;
}

.nhanso-acc__soon-list li {
    display: grid;
    gap: 2px;
    flex: none;
    min-width: 190px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 26px -18px rgba(43, 31, 102, .5);
    scroll-snap-align: start;
}

.nhanso-acc__soon-list li.is-near { background: linear-gradient(135deg, #fff8e6, #fff); box-shadow: inset 0 0 0 2px var(--acc-gold), 0 10px 26px -18px rgba(240, 169, 58, .8); }
.nhanso-acc__soon-list .s-days { color: var(--acc-gold-ink); font-size: 13px; font-weight: 700; }
.nhanso-acc__soon-list b { font-size: 16px; }
.nhanso-acc__soon-list small { color: var(--acc-muted); font-size: 13px; }

/* People. */
.nhanso-acc__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.nhanso-acc__bar h2 { margin: 0; }

.nhanso-acc__filters {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--acc-line);
}

.nhanso-acc__filters button {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: none;
    color: var(--acc-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.nhanso-acc__filters [aria-pressed="true"] { background: var(--acc-deep); color: #fff; }

.nhanso-acc__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nhanso-acc__person {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px -22px rgba(43, 31, 102, .55);
    animation: nhanso-acc-in .35s both;
}

.nhanso-acc__person.is-soon { box-shadow: inset 0 0 0 2px var(--acc-gold), 0 12px 30px -22px rgba(240, 169, 58, .8); }

@keyframes nhanso-acc-in { from { opacity: 0; transform: translateY(8px); } }

.p-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.p-av {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #efeaff, #fff3d9);
    font-size: 28px;
}

.p-head h3 {
    margin: 0;
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-head p { margin: 0; color: var(--acc-muted); font-size: 13.5px; }

.p-rel {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(43, 31, 102, .08);
    color: var(--acc-deep);
    font-size: 12px;
    font-weight: 700;
}

.p-edit {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: var(--acc-wash);
    color: var(--acc-muted);
    cursor: pointer;
}

.p-edit:hover { color: var(--acc-deep); }

.p-today,
.p-bday,
.p-note { margin: 0; font-size: 14px; }
.p-today span { color: #e0a523; letter-spacing: 1px; }
.p-bday { color: var(--acc-gold-ink); font-weight: 700; }
.p-note { color: var(--acc-muted); font-style: italic; }

.p-match {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.p-match span {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 6px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 10px;
    background: var(--acc-wash);
    color: var(--acc-muted);
    font-size: 11.5px;
    line-height: 1.3;
}

.p-match i {
    grid-row: span 2;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--acc-mid);
}

.p-match .is-good i { background: var(--acc-good); }
.p-match .is-low i { background: var(--acc-low); }
.p-match b { color: var(--acc-ink); font-size: 12.5px; }

.p-more summary {
    color: var(--acc-deep);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.p-more dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
    margin: 10px 0;
    font-size: 14px;
}

.p-more dt { color: var(--acc-muted); font-weight: 500; }
.p-more dd { margin: 0; }

.p-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.nhanso-acc__add button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    width: 100%;
    height: 100%;
    min-height: 200px;
    border: 2px dashed #cfc6ee;
    border-radius: 18px;
    background: rgba(255, 255, 255, .6);
    color: var(--acc-deep);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.nhanso-acc__add button:hover { background: #fff; border-color: #8b74e0; }
.nhanso-acc__add span { font-size: 34px; line-height: 1; }
.nhanso-acc__add small { color: var(--acc-muted); }

/* Settings. */
.nhanso-acc__set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.nhanso-acc__card {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px -24px rgba(43, 31, 102, .55);
}

.nhanso-acc__card h3 { margin: 0; font-size: 17px; }
.nhanso-acc__card.is-danger { box-shadow: inset 0 0 0 1px rgba(208, 87, 76, .3); }

/* The person dialog. */
.nhanso-acc__dialog {
    width: min(480px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    padding: 20px;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: var(--acc-ink);
    box-shadow: 0 40px 80px -30px rgba(23, 19, 61, .7);
}

.nhanso-acc__dialog::backdrop { background: rgba(23, 19, 61, .55); }

.nhanso-acc__dlg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nhanso-acc__x {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: var(--acc-wash);
    cursor: pointer;
}

.nhanso-acc__date {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.nhanso-acc__date legend { grid-column: 1 / -1; margin-bottom: 6px; }
.nhanso-acc__date input { text-align: center; }

.nhanso-acc__two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.nhanso-acc [hidden] { display: none !important; }

.nhanso-acc__toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1100;
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--acc-night);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
    opacity: 0;
    transform: translate(-50%, 20px);
    transition: opacity .25s, transform .25s;
    pointer-events: none;
}

.nhanso-acc__toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
    .nhanso-acc__auth { grid-template-columns: 1fr; gap: 24px; }
    .nhanso-acc__pitch { padding-top: 0; }
    .nhanso-acc__pitch ul { display: none; }
    .nhanso-acc__hero { grid-template-columns: auto minmax(0, 1fr); }
    .nhanso-acc__today { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .nhanso-acc { padding-top: calc(var(--ns-header-h) + 18px); }
    .nhanso-acc__box { padding: 16px; }
    .nhanso-acc__avatar { width: 68px; height: 68px; font-size: 36px; }
    .nhanso-acc__hero { gap: 14px; }
    .nhanso-acc__grid { grid-template-columns: 1fr; }
    .nhanso-acc__pitch > p:not(.nhanso-acc__kicker) { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .nhanso-acc__person { animation: none; }
}

/* ------------------------------------------------------------ the trial */

.nhanso-acc__try {
    display: grid;
    justify-items: start;
    gap: 8px;
    margin: 0 0 26px;
}

.nhanso-acc__try small { color: rgba(255, 255, 255, .78); font-size: 14px; }

.nhanso-acc__btn.is-big {
    min-height: 54px;
    padding: 0 26px;
    border-radius: 16px;
    font-size: 17px;
}

.nhanso-acc__trial {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    box-shadow: inset 0 0 0 1px rgba(245, 200, 106, .45);
    color: rgba(255, 255, 255, .9);
}

.nhanso-acc__trial p { flex: 1 1 320px; margin: 0; font-size: 15px; line-height: 1.5; }
.nhanso-acc__trial b { color: var(--acc-gold); }
.nhanso-acc__trial .nhanso-acc__row { margin: 0; }

.nhanso-acc__btn.is-ghost.is-on-dark {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}

.nhanso-acc__hero { position: relative; }

.nhanso-acc__tour-btn {
    display: inline-flex;
    margin-top: 12px;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #ffe3a3;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* ------------------------------------------------------------ the guide */

.nhanso-acc__guide {
    margin-top: 10px;
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px -24px rgba(43, 31, 102, .55);
}

.nhanso-acc__steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    counter-reset: acc-step;
}

.nhanso-acc__steps li {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 14px 14px 14px 56px;
    border-radius: 16px;
    background: var(--acc-wash);
    counter-increment: acc-step;
}

.nhanso-acc__steps li::before {
    content: counter(acc-step);
    position: absolute;
    top: 14px;
    left: 14px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--acc-deep);
    color: #fff;
    font-weight: 700;
}

.nhanso-acc__steps span { color: var(--acc-muted); font-size: 14px; line-height: 1.55; }

.nhanso-acc__faq details {
    border-top: 1px solid var(--acc-line);
}

.nhanso-acc__faq summary {
    padding: 14px 0;
    font-weight: 700;
    cursor: pointer;
}

.nhanso-acc__faq p { margin: 0 0 14px; color: var(--acc-muted); line-height: 1.6; }

/* ------------------------------------------------------------- the tour */

html.nhanso-acc-touring { scroll-behavior: auto; }

.nhanso-acc__tour {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.nhanso-acc__tour-hole {
    position: fixed;
    border-radius: 18px;
    box-shadow: 0 0 0 9999px rgba(15, 11, 40, .72), 0 0 0 3px var(--acc-gold);
    transition: top .3s, left .3s, width .3s, height .3s;
    pointer-events: auto;
}

.nhanso-acc__tour-card {
    position: fixed;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    color: var(--acc-ink);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5);
    animation: nhanso-acc-in .3s both;
}

.nhanso-acc__tour-card.is-sheet {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.nhanso-acc__tour-card h3 { margin: 2px 0 6px; font-size: 18px; }
.nhanso-acc__tour-card p { margin: 0; color: var(--acc-muted); font-size: 15px; line-height: 1.55; }
.nhanso-acc__tour-card .nhanso-acc__tour-n { color: var(--acc-gold-ink); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.nhanso-acc__tour-card .nhanso-acc__row { justify-content: flex-end; margin-top: 14px; }

@media (max-width: 560px) {
    .nhanso-acc__guide { padding: 18px 16px; }
    .nhanso-acc__try .nhanso-acc__btn.is-big { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .nhanso-acc__tour-hole { transition: none; }
}

/* ---------------------------------------------------------- family tree */

.nhanso-acc__tree {
    margin-bottom: 26px;
    padding: 18px 18px 8px;
    border-radius: 22px;
    background:
        radial-gradient(90% 60% at 50% 0%, rgba(245, 200, 106, .16), transparent 70%),
        linear-gradient(180deg, #fffdf7, #fff);
    box-shadow: 0 12px 30px -24px rgba(43, 31, 102, .55), inset 0 0 0 1px #f1e6c8;
}

.nhanso-acc__tree .nhanso-acc__bar p { margin: 0; }

.nhanso-acc__tree-scroll {
    margin: 0 -18px;
    padding: 0 18px 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

.nhanso-acc__tree-inner {
    position: relative;
    display: grid;
    gap: 34px;
    min-width: max-content;
    padding: 6px 0 4px;
}

.nhanso-acc__tree-lines {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
}

.nhanso-acc__tree-lines path {
    fill: none;
    stroke: #d9b765;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.t-row {
    position: relative;
    display: grid;
    grid-template-columns: 64px auto;
    align-items: center;
}

.t-gen {
    color: #a08a52;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.t-row-in {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 22px;
    min-width: 100%;
}

.t-group {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.t-heart {
    color: #e0607a;
    font-size: 14px;
}

.t-node {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 2px;
    width: 112px;
    min-height: 118px;
    padding: 10px 6px 8px;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: var(--acc-ink);
    text-align: center;
    box-shadow: 0 8px 20px -14px rgba(43, 31, 102, .55), inset 0 0 0 1px var(--acc-line);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.t-node:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(43, 31, 102, .6), inset 0 0 0 1px #cfc6ee; }
.t-node.is-nam { box-shadow: 0 8px 20px -14px rgba(43, 31, 102, .55), inset 0 3px 0 #6c9be0, inset 0 0 0 1px var(--acc-line); }
.t-node.is-nu { box-shadow: 0 8px 20px -14px rgba(43, 31, 102, .55), inset 0 3px 0 #e07aa0, inset 0 0 0 1px var(--acc-line); }

.t-node.is-me {
    background: linear-gradient(180deg, #fff8e6, #fff);
    box-shadow: 0 10px 24px -12px rgba(240, 169, 58, .7), inset 0 0 0 2px var(--acc-gold);
}

.t-node.is-empty {
    min-height: 92px;
    background: rgba(255, 255, 255, .6);
    color: var(--acc-muted);
    box-shadow: inset 0 0 0 1.5px #ddd3f3;
    border: 1.5px dashed transparent;
}

.t-node.is-empty .t-av { background: #f3effd; color: #8b74e0; font-size: 20px; }
.t-node.is-side { opacity: .9; }

.t-av {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #efeaff, #fff3d9);
    font-size: 24px;
    line-height: 1;
}

.t-node b {
    max-width: 100%;
    overflow: hidden;
    font-size: 13.5px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t-node small { color: var(--acc-muted); font-size: 11.5px; line-height: 1.3; }
.t-node i { color: #9a7a2c; font-size: 11px; font-style: normal; font-weight: 600; line-height: 1.3; }

.nhanso-acc__tree-note { margin: 4px 0 10px; }

@media (max-width: 560px) {
    .nhanso-acc__tree { padding: 14px 12px 6px; border-radius: 18px; }
    .nhanso-acc__tree-scroll { margin: 0 -12px; padding: 0 12px 10px; }
    .nhanso-acc__tree-inner { gap: 26px; }
    .t-row { grid-template-columns: 1fr; gap: 6px; }
    .t-gen { padding-left: 2px; }
    .t-row-in { gap: 8px; }
    .t-group { gap: 3px; }
    .t-heart { font-size: 10px; }
    .t-node { width: 76px; min-height: 100px; padding: 8px 3px 6px; border-radius: 14px; }
    .t-menh { display: none; }
    .t-node.is-empty { min-height: 80px; }
    .t-av { width: 34px; height: 34px; font-size: 20px; }
    .t-node b { font-size: 12.5px; }
    .t-node small { font-size: 10.5px; }
    .t-node i { font-size: 10px; }
}

/* ===================================================== v2: tabs, list, sheet */

.nhanso-acc__hero { margin-bottom: 18px; }
.nhanso-acc__hero-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nhanso-acc__tour-btn { margin-top: 0; }
.nhanso-acc__tour-btn.is-gold { background: linear-gradient(135deg, #ffd98a, #f0a93a); color: #3a2300; }
.nhanso-acc__tour-btn[hidden] { display: none; }

.nhanso-acc__btn.is-sm { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; }

/* The four tabs: a bar under the hero on wide screens, the bottom of a phone. */
.nhanso-acc__nav {
    position: sticky;
    top: calc(var(--ns-header-h) + 10px);
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 18px;
    padding: 5px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 30px -18px rgba(23, 19, 61, .55), inset 0 0 0 1px var(--acc-line);
}

.nhanso-acc__nav button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--acc-muted);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.nhanso-acc__nav button span { font-size: 18px; line-height: 1; }
.nhanso-acc__nav[data-acc-nav] { grid-template-columns: repeat(5, 1fr); }
.nhanso-acc__nav button[aria-current="page"] { background: var(--acc-deep); color: #fff; }

.nhanso-acc__nav i {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--acc-gold);
    color: #3a2300;
    font-size: 11px;
    font-style: normal;
    line-height: 18px;
}

.nhanso-acc__nav i:empty { display: none; }

.nhanso-acc__pane { animation: nhanso-acc-in .25s both; }
.nhanso-acc__pane[hidden] { display: none !important; }

/* Today. */
.nhanso-acc__pane .nhanso-acc__today {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2b1f66, #4a3596);
    color: #fff;
    box-shadow: 0 16px 34px -22px rgba(43, 31, 102, .9);
    backdrop-filter: none;
}

.nhanso-acc__today .t-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nhanso-acc__today .t-stars { margin: 0; }
.nhanso-acc__today .t-label { margin: 6px 0 2px; font-size: 20px; font-weight: 800; }

.nhanso-acc__today .t-more summary {
    margin-top: 10px;
    color: #ffe3a3;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.nhanso-acc__soon h2 { color: var(--acc-ink); }

.nhanso-acc__soon-list li { min-width: 0; padding: 0; }

.nhanso-acc__soon-list button {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: center;
    min-width: 190px;
    padding: 12px 14px;
    border: 0;
    border-radius: 16px;
    background: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.nhanso-acc__soon-list .s-av {
    grid-row: span 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #efeaff, #fff3d9);
    font-size: 22px;
}

/* Quick ways on. */
.nhanso-acc__quick h2 { font-size: 18px; }

.q-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.q-grid > * {
    display: grid;
    align-content: start;
    gap: 2px;
    padding: 14px;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: var(--acc-ink);
    text-align: left;
    text-decoration: none;
    box-shadow: 0 10px 26px -20px rgba(43, 31, 102, .6), inset 0 0 0 1px var(--acc-line);
    cursor: pointer;
}

.nhanso-acc .q-grid > a { color: var(--acc-ink); }
.q-grid .q-new { font-style: normal; font-weight: 700; color: #fff; background: #e0533d; border-radius: 999px; padding: 0 7px; }
.q-grid span { font-size: 24px; line-height: 1.2; }
.q-grid b { font-size: 15px; }
.q-grid small { color: var(--acc-muted); font-size: 12.5px; line-height: 1.4; }
.q-grid > *:hover { box-shadow: 0 12px 28px -18px rgba(43, 31, 102, .7), inset 0 0 0 1px #cfc6ee; }

/* People: a list; one tap opens the person. */
.nhanso-acc__tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
}

.nhanso-acc__tools[hidden] { display: none; }
.nhanso-acc__tools input, .nhanso-acc__tools select { min-height: 42px; font-size: 15px; }
.nhanso-acc__tools select { width: auto; }

.nhanso-acc__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.p-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 68px;
    padding: 10px 12px;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: var(--acc-ink);
    text-align: left;
    box-shadow: 0 8px 22px -18px rgba(43, 31, 102, .6), inset 0 0 0 1px var(--acc-line);
    cursor: pointer;
    transition: box-shadow .15s, transform .15s;
}

.p-row:hover { box-shadow: 0 12px 26px -18px rgba(43, 31, 102, .7), inset 0 0 0 1px #cfc6ee; }
.p-row:active { transform: scale(.99); }
.p-row.is-soon { box-shadow: inset 0 0 0 2px var(--acc-gold); }
.p-row > i { color: #b7b1cf; font-size: 14px; }
.p-row .p-av { width: 46px; height: 46px; font-size: 26px; }
.p-who { display: grid; min-width: 0; }
.p-who b { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.p-who small { overflow: hidden; color: var(--acc-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.p-row.is-add { grid-template-columns: auto minmax(0, 1fr); border: 2px dashed #d8cff3; background: rgba(255, 255, 255, .6); box-shadow: none; }
.p-row.is-add .p-av { background: #f3effd; color: #8b74e0; font-size: 24px; }
.p-empty { padding: 14px; color: var(--acc-muted); }

.p-pill {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--acc-wash);
    color: var(--acc-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.p-pill.is-good { background: rgba(31, 157, 106, .12); color: #137a51; }
.p-pill.is-mid { background: rgba(201, 154, 46, .14); color: #8a6512; }
.p-pill.is-low { background: rgba(208, 87, 76, .12); color: #b0433a; }
.p-pill.is-bday { background: #fff4d6; color: #8a5a00; }

/* The add button that stays on screen. */
.nhanso-acc__fab {
    position: fixed;
    right: 24px;
    bottom: 28px;
    z-index: 40;
    display: none;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd98a, #f0a93a);
    color: #3a2300;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 14px 30px -10px rgba(240, 169, 58, .9);
    cursor: pointer;
}

.nhanso-acc[data-tab="nguoi-than"] .nhanso-acc__fab,
.nhanso-acc[data-tab="gia-pha"] .nhanso-acc__fab { display: grid; }

/* One person: a sheet from the bottom on phones, a card on wide screens. */
.nhanso-acc__sheet {
    width: min(520px, calc(100vw - 24px));
    max-height: min(86vh, 860px);
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: #fff;
    color: var(--acc-ink);
    box-shadow: 0 40px 80px -30px rgba(23, 19, 61, .7);
}

.nhanso-acc__sheet::backdrop { background: rgba(23, 19, 61, .55); }
.nhanso-acc__sheet-in { position: relative; display: grid; gap: 14px; padding: 22px 20px 20px; }
.nhanso-acc__sheet .nhanso-acc__x { position: absolute; top: 14px; right: 14px; }
.nhanso-acc__grab { display: none; }

.s-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding-right: 44px; }
.s-head h2 { margin: 0; font-size: 22px; }
.s-head p { margin: 2px 0 0; color: var(--acc-muted); font-size: 14px; }

.s-big {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff6dc, var(--acc-gold) 75%);
    font-size: 36px;
}

.s-bday { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff4d6; color: #8a5a00; font-size: 14px; font-weight: 700; }
.s-box { padding: 12px 14px; border-radius: 16px; background: var(--acc-wash); }
.s-box p { margin: 0; }
.nhanso-acc .s-k { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; color: var(--acc-muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.s-stars { color: #e0a523; letter-spacing: 1px; }
.nhanso-acc .s-soft { margin-top: 4px; color: var(--acc-muted); font-size: 14px; line-height: 1.5; }
.s-box .p-match span { background: #fff; }
.s-more summary { font-weight: 700; color: var(--acc-deep); cursor: pointer; }
.s-more dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 0; font-size: 14px; }
.s-more dt { color: var(--acc-muted); }
.s-more dd { margin: 0; }
.s-note { margin: 0; color: var(--acc-muted); font-style: italic; }
.s-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }

@media (min-width: 900px) {
    .nhanso-acc__home { max-width: 1040px; }
}

/* Phones: tabs at the bottom, compact hero, the sheet slides up. */
@media (max-width: 899px) {
    .nhanso-acc { padding-bottom: 120px; }

    .nhanso-acc__nav {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -10px 30px -16px rgba(23, 19, 61, .45);
    }

    .nhanso-acc__nav button {
        flex-direction: column;
        gap: 2px;
        min-height: 54px;
        font-size: 11.5px;
    }

    .nhanso-acc__nav button span { font-size: 21px; }
    .nhanso-acc__nav button[aria-current="page"] { background: #f1edff; color: var(--acc-deep); }
    .nhanso-acc__nav i { position: absolute; top: 4px; right: calc(50% - 26px); }

    .nhanso-acc__fab { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); width: 54px; height: 54px; }

    html.nhanso-acc-in .back-to-top,
    html.nhanso-acc-in .nhanso-sharefab { display: none !important; }

    .nhanso-acc__hero { grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
    .nhanso-acc__hello h1 { margin-bottom: 8px; font-size: 24px; }
    .nhanso-acc__hello .nhanso-acc__kicker { margin-bottom: 2px; font-size: 11px; }
    .nhanso-acc__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .nhanso-acc__chips::-webkit-scrollbar { display: none; }
    .nhanso-acc__chips > * { flex: none; min-height: 28px; padding: 0 10px; font-size: 13px; }

    .q-grid { grid-template-columns: 1fr 1fr; }
    .nhanso-acc__list { grid-template-columns: 1fr; }

    .nhanso-acc__trial { padding: 10px 12px; }
    .nhanso-acc__trial p { flex-basis: 100%; font-size: 14px; }
    .nhanso-acc__trial p span { display: none; }

    .nhanso-acc__sheet {
        width: 100%;
        max-width: 100%;
        max-height: 88vh;
        margin: auto 0 0;
        border-radius: 24px 24px 0 0;
        animation: nhanso-acc-up .28s cubic-bezier(.2, .8, .2, 1) both;
    }

    .nhanso-acc__sheet-in { padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); }
    .nhanso-acc__grab { display: block; justify-self: center; width: 44px; height: 5px; border-radius: 999px; background: #ddd8ec; }
    .nhanso-acc__sheet .nhanso-acc__x { top: 16px; right: 12px; }
    .s-actions { grid-template-columns: 1fr; }
}

@keyframes nhanso-acc-up { from { transform: translateY(40px); opacity: .4; } }

@media (prefers-reduced-motion: reduce) {
    .nhanso-acc__pane, .nhanso-acc__sheet { animation: none; }
}

.nhanso-acc__home .nhanso-acc__hero { grid-template-columns: auto minmax(0, 1fr); }

/* The sheet never grows wider than itself. */
.nhanso-acc__sheet { overflow-x: hidden; }
.nhanso-acc__sheet-in { grid-template-columns: minmax(0, 1fr); }
.nhanso-acc__sheet-in > * { min-width: 0; }
.nhanso-acc__sheet .nhanso-acc__chips { flex-wrap: wrap; overflow: visible; }
.nhanso-acc__sheet .p-links { justify-content: center; }
.nhanso-acc__x:focus:not(:focus-visible) { outline: none; }

@media (max-width: 899px) {
    /* trial: one line, one button */
    .nhanso-acc__trial { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-bottom: 14px; }
    .nhanso-acc__trial p { font-size: 13.5px; }
    .nhanso-acc__trial .nhanso-acc__row { flex-wrap: nowrap; }
    .nhanso-acc__trial .is-on-dark { display: none; }

    /* hero: the two buttons side by side */
    .nhanso-acc__hero-act { flex-wrap: nowrap; gap: 6px; margin-top: 10px; }
    .nhanso-acc__hero-act .nhanso-acc__tour-btn { min-height: 32px; padding: 0 10px; font-size: 12.5px; white-space: nowrap; }

    /* on the other tabs the hero is just who you are, small */
    .nhanso-acc:not([data-tab="hom-nay"]) .nhanso-acc__hero { gap: 10px; margin-bottom: 14px; }
    .nhanso-acc:not([data-tab="hom-nay"]) .nhanso-acc__avatar { width: 44px; height: 44px; font-size: 24px; box-shadow: 0 0 0 3px rgba(245, 200, 106, .25); }
    .nhanso-acc:not([data-tab="hom-nay"]) .nhanso-acc__hello h1 { margin: 0; font-size: 19px; }
    .nhanso-acc:not([data-tab="hom-nay"]) .nhanso-acc__hello .nhanso-acc__kicker,
    .nhanso-acc:not([data-tab="hom-nay"]) .nhanso-acc__hero .nhanso-acc__chips,
    .nhanso-acc:not([data-tab="hom-nay"]) .nhanso-acc__hero-act,
    .nhanso-acc:not([data-tab="hom-nay"]):not([data-tab="tai-khoan"]) .nhanso-acc__trial { display: none; }

    .nhanso-acc__people h2, .nhanso-acc__tree h2 { font-size: 20px; }
    .nhanso-acc__people .nhanso-acc__bar { margin-bottom: 10px; }
    .nhanso-acc__people .nhanso-acc__filters { width: 100%; }
    .nhanso-acc__people .nhanso-acc__filters button { flex: 1; }
}

/* No blur (it cost every scroll on phones): slightly firmer backgrounds. */
.nhanso-acc__chips > * { background: rgba(255, 255, 255, .16); }
.nhanso-acc__trial { background: rgba(43, 31, 102, .55); }
.nhanso-acc__nav { background: #fff; }
.nhanso-acc__pane { animation-duration: .18s; }

/* ------------------------------------------------------ good days chart */

.nhanso-acc__days {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px -24px rgba(43, 31, 102, .55), inset 0 0 0 1px var(--acc-line);
}

.nhanso-acc__days h2 { margin: 0; font-size: 19px; }
.nhanso-acc__days .nhanso-acc__bar { margin-bottom: 12px; }

.nhanso-acc__seg {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: var(--acc-wash);
}

.nhanso-acc__seg button {
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--acc-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.nhanso-acc__seg [aria-pressed="true"] { background: #fff; color: var(--acc-deep); box-shadow: 0 1px 4px rgba(43, 31, 102, .15); }

.d-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin: 0 -4px;
    padding: 0 4px 6px;
}

.d-chart.is-month {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.d-chart.is-month .d-bar { flex: none; width: 38px; scroll-snap-align: center; }

.d-bar {
    --c: #c9c2e6;
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 6px 0 4px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--acc-muted);
    cursor: pointer;
}

.d-bar.is-great { --c: #1f9d6a; }
.d-bar.is-good { --c: #6cc59a; }
.d-bar.is-mid { --c: #e2c06e; }
.d-bar.is-low { --c: #e3a49c; }

.d-col {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 22px;
    height: 96px;
    border-radius: 8px;
    background: var(--acc-wash);
    overflow: hidden;
}

.d-fill { width: 100%; border-radius: 8px; background: var(--c); transition: height .3s; }
.d-feast { position: absolute; top: 4px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #d0574c; }
.d-bar b { font-size: 12px; }
.d-bar small { font-size: 11px; opacity: .8; }
.d-bar.is-today b { color: var(--acc-deep); }
.d-bar.is-sel { background: #f1edff; color: var(--acc-deep); }
.d-bar.is-sel .d-col { box-shadow: 0 0 0 2px var(--acc-deep); }

.d-detail { margin-top: 10px; padding: 14px; border-radius: 16px; background: var(--acc-wash); }
.dd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dd-head b { display: block; font-size: 16px; }
.dd-head small { color: var(--acc-muted); font-size: 13px; }

.dd-score {
    display: grid;
    justify-items: center;
    min-width: 76px;
    padding: 6px 8px;
    border-radius: 12px;
    background: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.dd-score b { font-size: 20px; }
.dd-score.is-great, .dd-score.is-good { color: #137a51; }
.dd-score.is-mid { color: #8a6512; }
.dd-score.is-low { color: #a55a4f; }

.dd-feast { margin: 8px 0 0; font-size: 14px; font-weight: 700; }
.dd-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.dd-facts li { padding: 3px 10px; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 700; color: var(--acc-muted); }
.dd-facts li.is-good { color: #137a51; }
.dd-facts li.is-soft { color: #a55a4f; }
.nhanso-acc .dd-text { margin: 8px 0 0; color: var(--acc-muted); font-size: 13.5px; line-height: 1.5; }
.nhanso-acc .dd-hours { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 12.5px; }
.dd-hours span { color: var(--acc-muted); font-weight: 700; }
.dd-hours i { padding: 2px 8px; border-radius: 8px; background: #fff; font-style: normal; }
.dd-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 14px; font-weight: 700; }

.d-best { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.d-best > span { margin-right: 4px; color: var(--acc-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

.d-best button {
    display: grid;
    padding: 6px 12px;
    border: 0;
    border-radius: 12px;
    background: rgba(31, 157, 106, .1);
    color: #137a51;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.d-best button small { font-size: 11px; font-weight: 600; opacity: .8; }
.nhanso-acc .d-note { margin: 10px 0 0; font-size: 12px; }

/* a person's week, in the sheet */
.w-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.w-load { grid-column: 1 / -1; color: var(--acc-muted); font-size: 13px; }

.w-day {
    --c: #c9c2e6;
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 6px 0;
    border-radius: 10px;
    background: #fff;
    color: var(--acc-ink);
    text-decoration: none;
}

.w-day.is-great { --c: #1f9d6a; }
.w-day.is-good { --c: #6cc59a; }
.w-day.is-mid { --c: #e2c06e; }
.w-day.is-low { --c: #e3a49c; }
.w-day b { font-size: 11.5px; }
.w-day i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.w-day small { color: var(--acc-muted); font-size: 10.5px; }

@media (max-width: 560px) {
    .nhanso-acc__days { padding: 14px 12px; }
    .d-chart { gap: 2px; }
    .d-col { width: 18px; height: 84px; }
}

/* ------------------------------------------------------------- polish 1 */

.nhanso-acc__sheet-in:focus { outline: none; }

/* Hero numbers: wide screens only. */
.nhanso-acc__stats { display: none; }

@media (min-width: 900px) {
    .nhanso-acc__home .nhanso-acc__hero { grid-template-columns: auto minmax(0, 1fr) auto; }

    .nhanso-acc__stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 132px));
        gap: 10px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .nhanso-acc__stats li {
        display: grid;
        align-content: center;
        gap: 2px;
        min-height: 92px;
        padding: 12px 14px;
        border-radius: 18px;
        background: rgba(255, 255, 255, .1);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
    }

    .nhanso-acc__stats b { color: #fff; font-size: 26px; line-height: 1.1; }
    .nhanso-acc__stats small { color: rgba(255, 255, 255, .72); font-size: 12.5px; line-height: 1.35; }
    .nhanso-acc__stats .is-next { background: rgba(245, 200, 106, .16); box-shadow: inset 0 0 0 1px rgba(245, 200, 106, .4); }
    .nhanso-acc__stats .is-next b { color: #ffe3a3; font-size: 20px; }

    /* "Hôm nay" in two columns: the day on the left, people and shortcuts right. */
    .nhanso-acc__pane[data-pane="hom-nay"] {
        display: grid;
        grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
        align-items: start;
        column-gap: 20px;
    }

    .nhanso-acc__pane[data-pane="hom-nay"] > .nhanso-acc__need,
    .nhanso-acc__pane[data-pane="hom-nay"] > .nhanso-acc__import { grid-column: 1 / -1; }

    .nhanso-acc__soon {
        margin-bottom: 18px;
        padding: 16px;
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 12px 30px -24px rgba(43, 31, 102, .55), inset 0 0 0 1px var(--acc-line);
    }

    .nhanso-acc__soon h2 { font-size: 19px; }
    .nhanso-acc__soon-list { flex-direction: column; gap: 6px; padding: 0; overflow: visible; }
    .nhanso-acc__soon-list li { box-shadow: none; background: var(--acc-wash); }
    .nhanso-acc__soon-list li.is-near { background: linear-gradient(135deg, #fff8e6, #fff); }
    .nhanso-acc__soon-list button { width: 100%; min-width: 0; padding: 10px 12px; }

    .nhanso-acc__quick .q-grid { grid-template-columns: 1fr 1fr; }

    .d-col { width: 30px; height: 128px; border-radius: 10px; }
    .d-fill { border-radius: 10px; }
    .d-bar b { font-size: 13px; }
}

/* Account tab: cards share the row; the guide's steps sit snug. */
.nhanso-acc__set-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.nhanso-acc__steps li { align-content: start; }

/* ------------------------------------------------------------- polish 3 */

/* the pitch sits on the night sky */
.nhanso-acc__pitch li { color: rgba(255, 255, 255, .92); }
.nhanso-acc__pitch li span { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }

/* nobody yet */
.nhanso-acc__list .p-welcome {
    grid-column: 1 / -1;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 28px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #faf8ff);
    box-shadow: 0 12px 30px -24px rgba(43, 31, 102, .55), inset 0 0 0 1px var(--acc-line);
    text-align: center;
}

.p-welcome__art { font-size: 46px; line-height: 1.1; }
.p-welcome b { font-size: 18px; }
.p-welcome small { max-width: 30em; color: var(--acc-muted); font-size: 14px; line-height: 1.55; }
.p-welcome__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }

.p-welcome__chips button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: #f1edff;
    color: var(--acc-deep);
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
}

.p-welcome__chips button:hover { background: #e6defc; }

/* phones, other tabs: the sky ends with the hero, so headings below sit on light */
@media (max-width: 899px) {
    .nhanso-acc:not([data-tab="hom-nay"]) .nhanso-acc__sky { background: radial-gradient(120% 90% at 80% 0%, #4a3596 0%, transparent 60%), linear-gradient(180deg, var(--acc-night), var(--acc-deep)); }
    .nhanso-acc:not([data-tab="hom-nay"]) .nhanso-acc__hero { margin-bottom: 20px; }
}

/* ------------------------------------------------------- days to remember */

.nhanso-acc__events {
    margin-top: 20px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px -24px rgba(43, 31, 102, .55), inset 0 0 0 1px var(--acc-line);
}

.nhanso-acc__events h2 { margin: 0 0 10px; font-size: 19px; }
.ev-list { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }

.ev-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 14px;
    background: var(--acc-wash);
}

.ev-list .ev-empty { display: block; color: var(--acc-muted); font-size: 14px; }
.ev-i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; font-size: 20px; }
.ev-who { display: grid; min-width: 0; }
.ev-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-who small { color: var(--acc-muted); font-size: 12.5px; }
.ev-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--acc-muted); font-size: 20px; cursor: pointer; }
.ev-x:hover { background: #fff; color: var(--acc-low); }
.ev-add summary { color: var(--acc-deep); font-weight: 700; cursor: pointer; }
.ev-form { display: grid; gap: 8px; margin-top: 10px; }
.ev-date { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 8px; }
.ev-date input { text-align: center; }
.nhanso-acc .ev-lunar { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.nhanso-acc .ev-lunar input { width: 18px; min-height: 18px; height: 18px; }
.ev-form .nhanso-acc__btn { justify-self: start; }

.nhanso-acc__tour-card .nhanso-acc__btn:focus:not(:focus-visible) { outline: none; }
