.page {
    --home-width: min(1520px, calc(100% - 2 * clamp(14px, 4vw, 70px)));
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(min-content, 1fr) auto;
    background: var(--home-paper);
    color: var(--home-ink);
}

html, body { height: auto; overflow: visible; }
.page .nav { position: relative; height: auto; background: #fff; border-bottom-color: var(--home-line); backdrop-filter: none; }
.page .nav-inner {
    width: var(--home-width);
    min-height: 56px;
    height: auto;
    flex-wrap: nowrap;
    gap: 18px;
    padding: 7px 0;
}
.page .brand { min-width: 0; gap: 9px; white-space: normal; }
.page .brand-mark { width: 32px; height: 32px; flex: 0 0 32px; background: var(--home-green); box-shadow: none; }
.page .brand-mark::after { inset: 0; background: transparent; }
.page .brand-mark.has-logo { background: #fff; }
.page .brand-copy strong { font-size: 17px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.page .brand-copy small { display: block; margin-top: 3px; color: var(--home-muted); font-size: 11px; font-weight: 500; }
.page .nav-links { order: 0; flex: 1; overflow: visible; padding: 0; gap: 26px; color: var(--home-muted); font-size: 14px; font-weight: 600; }
.page .nav-links a.active { color: var(--home-green); }
.page .nav-links a.active::after { display: none; }
.page .nav-actions { width: auto; margin: 0; gap: 7px; transform: none; flex-wrap: nowrap; }
.page .nav-btn, .page .notice-btn, .page .home-user-avatar {
    flex: none;
    width: auto;
    min-width: 0;
    height: 36px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
    color: var(--home-ink);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.page .notice-btn, .page .home-user-avatar { width: 36px; padding: 0; display: grid; place-items: center; box-shadow: none; }
.page .notice-btn::after { content: none; }
.page .home-recharge { background: var(--home-green); border-color: var(--home-green); color: #fff; }
.page .home-recharge:hover { background: #105d49; }
.page .home-contact:hover, .page .notice-btn:hover, .page #homeLoginBtn:hover { background: #edf5f0; }

.home-stage {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: clamp(9px, 1.6dvh, 20px);
    width: var(--home-width);
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0 auto;
    padding: clamp(11px, 2.1dvh, 24px) 0 12px;
    overflow: hidden;
}
.home-hero { text-align: center; overflow-wrap: anywhere; }
.home-eyebrow { margin-bottom: 12px; color: var(--home-green); font-size: 12px; font-weight: 600; }
.home-hero h1 { margin: 0; font-size: 72px; font-weight: 650; line-height: 1.08; white-space: pre-line; }
.home-hero p { max-width: 44em; margin: 14px auto 0; color: var(--home-muted); font-size: 14px; line-height: 1.65; white-space: pre-line; }

.home-dock {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: #fff;
}
.home-entry { min-width: 0; display: flex; align-items: center; gap: 14px; padding: 16px 22px; }
.home-entry + .home-entry { border-left: 1px solid var(--home-line); }
.home-entry:hover { background: #eff7f2; }
.home-entry-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #edf4f0; color: var(--home-green); }
.home-entry-icon .icon { width: 22px; height: 22px; }
.home-entry-copy { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.home-entry-copy strong { font-size: 16px; line-height: 1.25; }
.home-entry-copy small { color: var(--home-muted); font-size: 12px; line-height: 1.35; }
.home-entry::after { content: ''; margin-left: auto; flex: none; width: 7px; height: 7px; border: solid #758981; border-width: 1px 1px 0 0; transform: rotate(45deg); }

.home-flow { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; font-size: 11px; color: var(--home-muted); }
.home-flow span { display: inline-flex; align-items: center; gap: 5px; overflow-wrap: anywhere; }
.home-flow b { color: var(--home-green); font-weight: 600; }
.home-flow span + span::before { content: ''; width: 18px; border-top: 1px solid var(--home-line); margin-right: 9px; }

.home-works { container-type: size; min-width: 0; min-height: 0; display: grid; align-items: center; overflow: hidden; }
.home-gallery {
    --columns: 6;
    --rows: 1;
    --gallery-gap: clamp(8px, 1.1vw, 18px);
    --caption-height: 0px;
    /* Fit the artwork by width and height without shrinking its 3:4 frame. */
    --art-width: min(
        calc((100cqw - (var(--columns) - 1) * var(--gallery-gap)) / var(--columns)),
        calc(((100cqh - var(--gallery-vertical-space, 0px) - (var(--rows) - 1) * var(--gallery-gap)) / var(--rows) - var(--caption-height)) * 3 / 4)
    );
    display: grid;
    grid-template-columns: repeat(var(--columns), minmax(0, calc(var(--art-width) * var(--gallery-scale, 1))));
    justify-content: center;
    gap: var(--gallery-gap);
}
.home-gallery.has-captions { --caption-height: 30px; }
.home-tile { margin: 0; min-width: 0; }
.home-tile-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 8px;
    background: #e7eeea;
    box-shadow: 0 2px 12px rgba(18, 47, 36, .09);
}
.home-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .32s ease; }
.home-media.is-active { opacity: 1; }
.home-media[hidden] { display: none; }
.home-tile figcaption { display: flex; align-items: center; gap: 7px; height: var(--caption-height); font-size: 13px; overflow: hidden; }
.home-tile-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.home-partners { display: flex; align-items: center; gap: 12px; padding-top: 9px; border-top: 1px solid var(--home-line); }
#homepagePartnersHeading { flex: none; color: var(--home-muted); font-size: 12px; font-weight: 600; }
.home-partner-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.home-partner {
    display: grid;
    place-items: center;
    min-width: 0;
    height: 37px;
    padding: 0 4px;
    border: 1px solid var(--home-line);
    border-radius: 6px;
    background: #fff;
    color: var(--home-muted);
    font-size: 12px;
    text-align: center;
}
.home-partner img { max-width: 100%; max-height: 25px; object-fit: contain; }
.home-partner span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding: 9px max(14px, calc((100% - var(--home-width)) / 2)); border-top: 1px solid var(--home-line); color: var(--home-muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.home-foot a { text-decoration: underline; text-underline-offset: 3px; color: var(--home-green); }

@media (max-height: 850px) {
    .home-hero h1 { font-size: 56px; }
    .home-hero p { margin-top: 9px; }
    .home-entry { padding-block: 11px; }
    .home-partner { height: 32px; }
}
@media (max-height: 690px) {
    .page .nav-inner { min-height: 48px; }
    .home-hero h1 { font-size: 44px; }
    .home-eyebrow { margin-bottom: 6px; }
    .home-stage { gap: 8px; padding-block: 8px; }
    .home-entry { padding-block: 8px; }
    .home-entry-icon { width: 32px; height: 32px; }
}
@media (max-width: 970px) {
    .home-hero h1 { font-size: 54px; }
    .page .nav-links { gap: 14px; }
    .home-entry { padding-inline: 12px; }
}
@media (max-width: 720px) {
    .page .nav-inner { min-height: 48px; gap: 5px; }
    .page .nav-links, .page .brand-copy small { display: none; }
    .page .nav-actions { margin-left: auto; gap: 4px; }
    .page .brand-mark { width: 25px; height: 25px; flex-basis: 25px; }
    .page .brand { gap: 5px; }
    .page .brand-copy strong { font-size: 14px; }
    .page .nav-btn, .page .notice-btn, .page .home-user-avatar { height: 32px; padding: 0 5px; font-size: 12px; }
    .page .notice-btn, .page .home-user-avatar { width: 30px; }
    .home-stage { grid-template-rows: auto auto auto minmax(clamp(200px, 65vw, 270px), 1fr) auto; gap: 8px; }
    .home-hero h1 { font-size: 35px; }
    .home-hero p { font-size: 12px; line-height: 1.5; }
    .home-entry { flex-direction: column; gap: 4px; padding: 6px 3px; text-align: center; }
    .home-entry-copy { gap: 2px; }
    .home-entry-copy strong { font-size: 13px; }
    .home-entry-copy small { font-size: 11px; }
    .home-entry-icon { width: 27px; height: 27px; }
    .home-entry-icon .icon { width: 16px; height: 16px; }
    .home-entry::after { display: none; }
    .home-flow { gap: 3px 8px; }
    .home-flow span + span::before { width: 8px; margin-right: 1px; }
    .home-gallery { --columns: 3; --rows: 2; --gallery-gap: 7px; }
    .home-gallery.has-captions { --caption-height: 25px; }
    .home-tile figcaption { gap: 4px; font-size: 11px; }
    .home-partners { flex-direction: column; align-items: stretch; gap: 5px; }
    .home-partner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .home-partner { height: 27px; font-size: 11px; }
    .home-partner img { max-height: 22px; }
    .home-foot { gap: 2px 8px; padding-block: 6px; font-size: 11px; }
}
/* v11 visual alignment with the approved light homepage design */
html[data-light-page="home"] {
    --home-paper: var(--ui-paper);
    --home-ink: var(--ui-ink);
    --home-muted: var(--ui-muted);
    --home-green: var(--ui-accent);
    --home-green-deep: var(--ui-green);
    --home-line: var(--ui-line);
    --home-line-soft: var(--ui-line-soft);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background: var(--home-paper);
}

.home-bg-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    contain: strict;
    background:
        var(--ui-top-gradient),
        radial-gradient(42% 38% at 94% 86%, rgba(196,172,132,.055) 0%, rgba(196,172,132,0) 72%);
}

.home-bg-grid {
    position: absolute;
    inset: -80px;
    background-image:
        linear-gradient(to right, rgba(16,21,19,.013) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(16,21,19,.0085) 1px, transparent 1px);
    background-size: 96px 96px;
    -webkit-mask-image: radial-gradient(88% 78% at 50% 42%, transparent 22%, rgba(0,0,0,.75) 62%, #000 100%);
    mask-image: radial-gradient(88% 78% at 50% 42%, transparent 22%, rgba(0,0,0,.75) 62%, #000 100%);
    animation: homeGridDrift 38s linear infinite;
}

@keyframes homeGridDrift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(96px, 96px, 0); }
}

.home-bg-glow {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.home-bg-glow-b {
    width: 50vw;
    height: 50vw;
    right: -17vw;
    bottom: -21vw;
    background: radial-gradient(circle, rgba(198,170,126,.16) 0%, rgba(198,170,126,0) 66%);
    animation: homeFloatB 34s ease-in-out infinite alternate;
}

@keyframes homeFloatB {
    from { transform: translate3d(0, 0, 0) scale(1.08); }
    to { transform: translate3d(-7vw, -5vh, 0) scale(.93); }
}

.home-bg-sheen {
    position: absolute;
    top: -10%;
    bottom: -10%;
    left: -60vw;
    width: 34vw;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.55) 55%, transparent);
    transform: skewX(-13deg);
    animation: homeSheenSweep 22s cubic-bezier(.45,0,.55,1) infinite;
}

@keyframes homeSheenSweep {
    0% { transform: translate3d(0, 0, 0) skewX(-13deg); opacity: 0; }
    12% { opacity: 1; }
    58% { transform: translate3d(200vw, 0, 0) skewX(-13deg); opacity: 0; }
    100% { transform: translate3d(200vw, 0, 0) skewX(-13deg); opacity: 0; }
}

.page {
    position: relative;
    z-index: 1;
    background: transparent;
}

.page .nav {
    background: var(--ui-topbar);
    border-bottom: 1px solid rgba(229,229,222,.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.page .nav-inner {
    padding-block: 0;
}

.page .nav-links a {
    position: relative;
    padding: 8px 14px;
    border-radius: 8px;
    color: #56605a;
    transition: color .18s ease, background .18s ease;
}

.page .nav-links a.active { color: var(--home-ink); font-weight: 600; }
.page .nav-links a:is(:hover, :focus-visible) { color: var(--home-green-deep); }

.home-nav-label { display: block; overflow: hidden; }
.home-nav-track {
    display: block;
    position: relative;
    line-height: 1.45;
    transition: transform .26s cubic-bezier(.22,.75,.28,1);
}
.home-nav-track > span { position: absolute; top: 100%; left: 0; }
.page .nav-links a:is(:hover, :focus-visible) .home-nav-track { transform: translateY(-100%); }

.page .nav-links a::after,
.page .nav-links a.active::after {
    display: block;
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 1px;
    border-radius: 2px;
    background: var(--home-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .24s ease;
}
.page .nav-links a:is(.active, :hover, :focus-visible)::after { transform: scaleX(1); }

.home-stage {
    gap: clamp(10px, 1.5dvh, 19px);
    padding-top: clamp(7px, 1.2dvh, 15px);
    padding-bottom: 10px;
    overflow: visible;
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(13px, 1.9vh, 21px);
    font-size: 10.5px;
    letter-spacing: .26em;
    color: #3d8d78;
}

.home-eyebrow::before,
.home-eyebrow::after {
    content: '';
    width: clamp(16px, 2.6vw, 38px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(31,174,140,.42));
}

.home-eyebrow::after { background: linear-gradient(90deg, rgba(31,174,140,.42), transparent); }
.home-hero h1 { font-size: 76px; font-weight: 600; line-height: 1.05; color: var(--home-ink); }
.home-hero p { margin-top: clamp(14px, 2vh, 24px); max-width: 36em; font-size: clamp(13.5px, 1.2vh, 15.5px); line-height: 1.8; color: #5b645f; letter-spacing: .012em; }

.home-dock {
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(16,21,19,.07);
    border-radius: 20px;
    box-shadow: 0 1px 1px rgba(16,21,19,.03), 0 26px 64px -44px rgba(16,21,19,.3);
    overflow: hidden;
}

.home-entry {
    position: relative;
    gap: 17px;
    padding: clamp(22px, 3.4vh, 34px) clamp(20px, 1.8vw, 34px);
    color: var(--home-ink);
    overflow: hidden;
    transition: background .2s ease, box-shadow .2s ease;
}

.home-dock-ripple {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.home-entry:is(:hover, :focus-visible) {
    background: rgba(239,248,244,.72);
    box-shadow: inset 0 0 0 1px rgba(31,174,140,.27);
}
.home-entry:focus-visible { outline: 2px solid var(--home-green-deep); outline-offset: -3px; }
.home-entry-icon { position: relative; z-index: 1; width: 56px; height: 56px; overflow: hidden; background: #fbfbf7; border: 1px solid rgba(16,21,19,.07); color: #4a544f; transition: background .22s ease, border-color .22s ease, color .22s ease; }
.home-entry-icon .icon { width: 23px; height: 23px; transition: transform .23s ease, opacity .2s ease; }
.home-entry-icon::after {
    content: '';
    position: absolute;
    top: calc(50% - 5px);
    left: calc(50% - 7px);
    width: 10px;
    height: 10px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    opacity: 0;
    transform: translateY(10px) rotate(45deg);
    transition: transform .23s ease, opacity .2s ease;
}
.home-entry:is(:hover, :focus-visible) .home-entry-icon { background: #dff1e9; border-color: rgba(31,174,140,.24); color: var(--home-green-deep); }
.home-entry-copy { position: relative; z-index: 1; gap: 6px; }
.home-entry-copy strong { font-size: 20px; font-weight: 700; }
.home-entry-copy small { font-size: 14px; font-weight: 500; line-height: 1.5; color: #8b948e; }
.home-entry::after { position: relative; z-index: 1; width: 8px; height: 8px; border-color: #a7afa8; transition: transform .24s ease, border-color .24s ease; }
.home-entry:is(:hover, :focus-visible)::after { border-color: var(--home-green-deep); transform: rotate(45deg) translate(2px, -2px); }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .home-entry:is(:hover, :focus-visible) .home-entry-icon .icon { opacity: 0; transform: translateY(-10px); }
    .home-entry:is(:hover, :focus-visible) .home-entry-icon::after { opacity: 1; transform: translateY(0) rotate(45deg); }
}

.home-flow { gap: clamp(10px, 1.5vw, 22px); font-size: 12.5px; font-weight: 550; color: #717c76; }
.home-flow b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; color: var(--home-green-deep); opacity: .8; }
.home-flow span + span::before { width: clamp(14px, 1.8vw, 32px); margin-right: 0; background: linear-gradient(90deg, var(--home-line), rgba(229,229,222,.2)); }

.home-tile-frame { border-radius: 14px; background: #eceae3; box-shadow: 0 1px 2px rgba(16,21,19,.035), 0 14px 32px -26px rgba(16,21,19,.32); }
.home-tile-frame::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(16,21,19,.10); pointer-events: none; }
.home-tile:hover .home-tile-frame { box-shadow: 0 1px 2px rgba(16,21,19,.05), 0 26px 48px -26px rgba(16,21,19,.42); }
.home-media { transition: opacity .32s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.home-tile:hover .home-media.is-active { transform: scale(1.028); }
.home-tile figcaption { padding-top: 9px; font-size: 13.5px; font-weight: 500; letter-spacing: .02em; }

.home-partners { gap: clamp(14px, 1.8vw, 28px); padding-top: clamp(12px, 1.6vh, 18px); border-top-color: var(--home-line-soft); }
#homepagePartnersHeading { font-size: 11.5px; letter-spacing: .2em; color: #8b948e; }
.home-partner { height: 44px; padding: 0 10px; border-radius: 10px; box-shadow: 0 1px 2px rgba(16,21,19,.03), 0 6px 14px -10px rgba(16,21,19,.16); font-size: 12.5px; letter-spacing: .015em; }

.home-foot {
    --home-foot-qr-size: 60px;
    padding-block: 2px;
    gap: 6px 20px;
    border-top-color: var(--home-line-soft);
    background: rgba(247,246,242,.62);
    color: #6f7972;
}

.home-foot-details {
    min-width: 0;
    flex: 1 1 420px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 16px;
}

.home-foot-details > :empty { display: none; }

.home-foot-codes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-inline-start: auto;
}

.home-foot-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #5b645f;
    font: inherit;
    cursor: pointer;
}

.home-foot-contact:hover { color: var(--home-green-deep); }
.home-foot .contact-qr-panel::after { content: ''; position: absolute; inset: 100% 0 auto; height: 9px; }
.home-foot-qr { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; flex: none; width: var(--home-foot-qr-size); height: var(--home-foot-qr-size); overflow: hidden; border: 1px solid var(--home-line); border-radius: 8px; background: #fff; font-size: 10px; color: #8b948e; }
.home-foot-qr img { display: block; width: 100%; height: 100%; object-fit: contain; }

@media (prefers-reduced-motion: reduce) {
    .home-bg-grid, .home-bg-glow, .home-bg-sheen { animation: none !important; }
    .home-nav-track, .page .nav-links a::after, .home-entry, .home-entry::after { transition: none; }
    .page .nav-links a:is(:hover, :focus-visible) .home-nav-track { transform: none; }
}

@media (min-width: 901px) {
    .home-stage { grid-template-columns: minmax(0, 1fr); gap: clamp(8px, .9dvh, 11px); }
    .home-eyebrow { margin-bottom: 11px; }
    .home-hero h1 { font-size: 68px; }
    .home-hero p { margin-top: 11px; line-height: 1.65; }
    .home-entry { padding-block: 20px; }
    .home-works { width: min(94vw, max(1840px, 155dvh)); justify-self: center; }
    .home-gallery { --gallery-gap: clamp(8px, .7vw, 12px); --gallery-scale: .92; --gallery-vertical-space: 24px; }
}

@media (min-width: 901px) and (max-height: 850px) {
    .page .nav-inner { min-height: 50px; }
    .home-stage { padding-block: 8px; }
    .home-eyebrow { margin-bottom: 8px; }
    .home-hero h1 { font-size: 55px; }
    .home-hero p { font-size: 12.5px; line-height: 1.6; margin-top: 10px; }
    .home-entry { padding-block: 14px; }
    .home-entry-icon { width: 44px; height: 44px; }
    .home-entry-icon .icon { width: 20px; height: 20px; }
    .home-entry-copy strong { font-size: 17px; }
    .home-entry-copy small { font-size: 12px; }
    .home-flow { font-size: 11.5px; }
    .home-gallery { --gallery-vertical-space: 10px; }
    .home-tile figcaption { padding-top: 9px; font-size: 12px; }
    .home-partner { height: 36px; font-size: 11.5px; }
    .home-foot { --home-foot-qr-size: 52px; font-size: 11.5px; }
}

@media (max-width: 720px) {
    html, body { overflow: auto; }
    .home-hero h1 { font-size: 35px; }
    .home-entry { padding: 10px 4px; gap: 5px; }
    .home-entry-icon { width: 32px; height: 32px; }
    .home-entry-icon .icon { width: 18px; height: 18px; }
    .home-entry-copy { gap: 2px; }
    .home-entry-copy strong { font-size: 14px; }
    .home-entry-copy small { font-size: 11px; }
    .home-flow { font-size: 11.5px; }
    .home-foot { --home-foot-qr-size: 48px; padding-block: 6px 2px; }
    .home-foot-codes { width: 100%; justify-content: center; margin-inline-start: 0; }
    .home-foot-contact { gap: 6px; min-width: 0; }
}

@media (max-width: 365px) {
    .page .nav-inner { flex-wrap: wrap; padding-block: 5px; }
    .home-hero h1 { font-size: 30px; }
}
