:root {
    --ht-ink: #111111;
    --ht-paper: #F7F7F5;
    --ht-paper-deep: #EFEFEC;
    --ht-field: #2E5D49;
    --ht-moss: #2A2A28;
    --ht-sand: #B9B9B2;
    --ht-line: rgba(17, 17, 17, 0.12);
    --ht-header-height: 72px;
    --ht-shell: min(1680px, calc(100vw - clamp(40px, 12vw, 208px)));
    --ht-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--ht-header-height);
    background: var(--ht-paper);
}

body.hometown-page {
    margin: 0;
    color: var(--ht-ink);
    background: var(--ht-paper);
    font-family: "Inter", "Helvetica Neue", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    line-height: 1.65;
    overflow-x: clip;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.hometown-page.is-modal-open,
body.hometown-page.is-menu-open {
    overflow: hidden;
}

.hometown-page a {
    color: inherit;
    text-decoration: none;
}

.hometown-page button,
.hometown-page input {
    font: inherit;
}

.hometown-page button,
.hometown-page a {
    -webkit-tap-highlight-color: transparent;
}

.hometown-shell {
    width: var(--ht-shell);
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hometown-skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 10px 16px;
    color: #fff;
    background: #10130f;
    transform: translateY(-140%);
    transition: transform 180ms ease;
}

.hometown-skip-link:focus {
    transform: translateY(0);
}

/* Header */
.hometown-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: var(--ht-header-height);
    color: #F7F7F5;
    transition: color 400ms ease;
}

.hometown-header::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: rgba(239, 239, 235, 0);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: background 400ms ease, border-color 400ms ease, backdrop-filter 400ms ease;
}

.hometown-header[data-theme="light"] {
    color: var(--ht-ink);
}

.hometown-header[data-theme="light"]::before {
    background: rgba(239, 239, 235, 0.88);
    border-bottom-color: rgba(17, 17, 17, 0.09);
    backdrop-filter: blur(14px) saturate(110%);
    -webkit-backdrop-filter: blur(14px) saturate(110%);
}

.hometown-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: min(1760px, calc(100vw - 56px));
    height: 100%;
    margin-inline: auto;
}

.hometown-brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    justify-self: start;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.hometown-brand__mark {
    position: relative;
    display: block;
    width: 28px;
    height: 28px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.hometown-brand__mark i {
    position: absolute;
    left: 6px;
    width: 14px;
    height: 1px;
    background: currentColor;
    transform: rotate(-18deg);
}

.hometown-brand__mark i:nth-child(1) { top: 8px; }
.hometown-brand__mark i:nth-child(2) { top: 13px; width: 17px; left: 5px; }
.hometown-brand__mark i:nth-child(3) { top: 18px; width: 11px; left: 8px; }

.hometown-nav {
    display: flex;
    gap: clamp(24px, 3vw, 52px);
    align-items: center;
    justify-self: center;
}

.hometown-nav a {
    position: relative;
    padding: 9px 0;
    font-size: 12px;
    font-weight: 550;
    opacity: 0.7;
    transition: opacity 220ms ease;
}

.hometown-nav a::after {
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;
    height: 1px;
    content: "";
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 350ms var(--ht-ease);
}

.hometown-nav a:hover,
.hometown-nav a:focus-visible,
.hometown-nav a.is-active {
    opacity: 1;
}

.hometown-nav a.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hometown-header__actions {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-self: end;
}

.hometown-platform-link {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    font-size: 11px;
    opacity: 0.65;
    transition: opacity 220ms ease;
}

.hometown-platform-link:hover,
.hometown-platform-link:focus-visible {
    opacity: 1;
}

.hometown-platform-link svg {
    width: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.hometown-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    height: 34px;
    padding: 0 17px;
    color: inherit;
    cursor: pointer;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 12px;
    transition: color 260ms ease, background 260ms ease;
}

.hometown-login-button:hover,
.hometown-login-button:focus-visible {
    color: var(--ht-ink);
    background: #F4F4F1;
}

.hometown-header[data-theme="light"] .hometown-login-button:hover,
.hometown-header[data-theme="light"] .hometown-login-button:focus-visible {
    color: #F4F4F1;
    background: var(--ht-ink);
}

.hometown-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    color: inherit;
    cursor: pointer;
    background: none;
    border: 0;
}

.hometown-menu-button i {
    display: block;
    width: 22px;
    height: 1px;
    margin: 6px auto;
    background: currentColor;
    transition: transform 300ms var(--ht-ease);
}

/* Shared typography and animation */
.hometown-eyebrow,
.hometown-section-index {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hometown-section-head {
    display: grid;
    grid-template-columns: 0.32fr 1.38fr 0.3fr;
    gap: 38px;
    align-items: end;
    padding-top: clamp(100px, 13vh, 160px);
    padding-bottom: clamp(58px, 8vh, 96px);
    border-bottom: 1px solid var(--ht-line);
}

.hometown-section-head > div {
    grid-column: 2;
}

.hometown-section-index {
    align-self: start;
    opacity: 0.52;
}

.hometown-section-head h2 {
    margin: 13px 0 0;
    font-size: clamp(52px, 6vw, 108px);
    font-weight: 520;
    line-height: 1;
    letter-spacing: -0.065em;
}

.hometown-ready [data-enter] {
    opacity: 1;
    transform: none;
    transition: none;
}

.hometown-ready [data-enter-kind="media"] {
    transform: none;
    transition: none;
}

.hometown-ready [data-enter-delay="1"] { transition-delay: 100ms; }
.hometown-ready [data-enter-delay="2"] { transition-delay: 180ms; }

.hometown-ready [data-enter].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Hero */
.hometown-hero {
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    color: #F7F7F5;
    background: #3b4639;
    isolation: isolate;
    overflow: hidden;
    place-items: end start;
}

.hometown-hero__media,
.hometown-hero__overlay {
    position: absolute;
    inset: 0;
}

.hometown-hero__media {
    z-index: -2;
    background-color: #ffffff;
    transform: none;
    animation: none;
}

.hometown-hero__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 1000ms var(--ht-ease);
    will-change: transform;
}

.hometown-hero__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
}

.hometown-hero__slide--video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes hometown-hero-settle {
    to { transform: scale(1); }
}

.hometown-hero__overlay {
    z-index: -1;
    background: linear-gradient(180deg, rgba(16, 21, 16, 0.46) 0%, rgba(16, 21, 16, 0.04) 44%, rgba(16, 21, 16, 0.72) 100%);
}

.hometown-hero__content {
    padding-bottom: clamp(105px, 14vh, 170px);
}

.hometown-hero__content .hometown-eyebrow {
    margin-bottom: 26px;
    opacity: 0.75;
}

.hometown-hero h1 {
    max-width: 1250px;
    margin: 0;
    font-size: clamp(48px, 6vw, var(--hometown-title-size, 112px));
    font-weight: 470;
    line-height: 1.18;
    letter-spacing: -0.06em;
}

.hometown-hero h1 span {
    display: block;
}

.hometown-hero__coordinates {
    position: absolute;
    top: 50%;
    right: 32px;
    display: flex;
    gap: 80px;
    align-items: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 8px;
    letter-spacing: 0.18em;
    opacity: 0.48;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
}

.hometown-scroll-cue {
    position: absolute;
    right: max(48px, calc((100vw - min(1540px, calc(100vw - 96px))) / 2));
    bottom: 34px;
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 10px;
    letter-spacing: 0.12em;
    opacity: 0.7;
}

.hometown-scroll-cue i {
    position: relative;
    display: block;
    width: 1px;
    height: 46px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
}

.hometown-scroll-cue i::after {
    position: absolute;
    inset: 0;
    content: "";
    background: #fff;
    animation: hometown-scroll 2.1s ease-in-out infinite;
}

@keyframes hometown-scroll {
    0% { transform: translateY(-110%); }
    48%, 55% { transform: translateY(0); }
    100% { transform: translateY(110%); }
}

/* About */
.hometown-about {
    min-height: 100vh;
    color: var(--ht-ink);
    background: var(--ht-paper);
}

.hometown-about__mosaic {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(9, minmax(42px, 5.8vw));
    gap: 16px;
    padding-block: clamp(70px, 10vh, 130px);
}

.about-media {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #a7ad98;
}

.about-media--1 {
    z-index: 2;
    grid-row: 1 / 8;
    grid-column: 1 / 7;
}

.about-media--2 {
    grid-row: 2 / 6;
    grid-column: 8 / 13;
}

.about-media--3 {
    z-index: 3;
    grid-row: 6 / 10;
    grid-column: 7 / 11;
}

.about-media__slides,
.about-media__placeholder {
    width: 100%;
    height: 100%;
}

.about-media__slides {
    position: absolute;
    inset: 0;
}

.about-media__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.015);
    transition:
        opacity 900ms var(--ht-ease),
        transform 1.2s var(--ht-ease);
}

.about-media__slide.is-active {
    z-index: 1;
    opacity: 1;
    transform: scale(1);
}

.about-media:hover .about-media__slide.is-active {
    transform: scale(1.025);
}

.about-media__dots {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4;
    display: flex;
    gap: 6px;
    padding: 7px 9px;
    background: rgba(17, 23, 17, 0.34);
    backdrop-filter: blur(8px);
}

.about-media__dots button {
    width: 18px;
    height: 2px;
    padding: 0;
    background: rgba(247, 247, 245, 0.42);
    border: 0;
    cursor: pointer;
    transition: width 300ms var(--ht-ease), background-color 300ms var(--ht-ease);
}

.about-media__dots button.is-active {
    width: 28px;
    background: #F7F7F5;
}

.about-media__placeholder {
    position: relative;
    color: rgba(247, 247, 245, 0.72);
    background: #66705b;
}

.about-media--2 .about-media__placeholder { background: #9b8866; }
.about-media--3 .about-media__placeholder { background: #3e4d40; }

.about-media__placeholder svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.about-media__placeholder path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    opacity: 0.45;
}

.about-media__placeholder > span {
    position: absolute;
    right: 24px;
    bottom: 16px;
    font-size: clamp(54px, 8vw, 130px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.08em;
    opacity: 0.2;
}

.about-media figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 18px 22px;
    color: #F7F7F5;
    background: rgba(17, 23, 17, 0.58);
    backdrop-filter: blur(8px);
    font-size: 11px;
    letter-spacing: 0.08em;
    z-index: 3;
}

.about-media figcaption span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    opacity: 0.55;
}

.hometown-about__story {
    display: grid;
    grid-template-columns: 0.45fr 1.55fr;
    gap: clamp(60px, 10vw, 170px);
    padding-block: clamp(80px, 12vh, 160px);
    border-top: 1px solid var(--ht-line);
}

.about-guide {
    position: sticky;
    top: calc(var(--ht-header-height) + 48px);
    align-self: start;
}

.about-guide > div {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 15px;
    padding: 17px 0;
    border-bottom: 1px solid var(--ht-line);
}

.about-guide span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    opacity: 0.45;
}

.about-guide strong {
    font-size: 13px;
    font-weight: 550;
    letter-spacing: 0.08em;
}

.about-copy {
    max-width: 900px;
}

.about-copy p {
    margin: 0;
    color: #32362f;
    font-family: "Songti SC", "SimSun", serif;
    font-size: clamp(17px, 1.25vw, 22px);
    line-height: 2.05;
    text-align: justify;
}

.about-copy p + p {
    padding-top: clamp(42px, 6vh, 70px);
    margin-top: clamp(42px, 6vh, 70px);
    border-top: 1px solid var(--ht-line);
}

/* Works */
.hometown-works {
    min-height: 100vh;
    padding-bottom: clamp(100px, 13vh, 160px);
    color: #F5F5F3;
    background: #111111;
    overflow: hidden;
}

.hometown-section-head--light {
    border-bottom-color: rgba(241, 241, 238, 0.16);
    /* Works section has no controls row — collapse to 2 columns. */
    grid-template-columns: 0.32fr 1.38fr;
}

.works-viewport {
    width: 100%;
    margin-top: clamp(68px, 9vh, 110px);
    overflow: hidden;
    scrollbar-width: none;
}
.works-viewport::-webkit-scrollbar { display: none; }

.works-track {
    --works-gap: clamp(20px, 2.2vw, 42px);
    display: flex;
    width: max-content;
    padding-bottom: 24px;
    will-change: transform;
}

.works-set {
    display: flex;
    gap: var(--works-gap);
    align-items: flex-start;
    padding-right: var(--works-gap);
}

.work-poster {
    flex: 0 0 clamp(220px, 19vw, 340px);
    width: clamp(220px, 19vw, 340px);
    padding: 0;
    color: inherit;
    cursor: zoom-in;
    background: transparent;
    border: 0;
    text-align: left;
}

.hometown-hero__media { transform: translate3d(0, var(--hero-parallax, 0px), 0) scale(1.06); will-change: transform; }

.work-poster__surface {
    display: block;
    width: 100%;
    aspect-ratio: 0.707 / 1;
    overflow: hidden;
    background: #E7E7E2;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 600ms var(--ht-ease), border-color 300ms ease;
}

.work-poster:hover .work-poster__surface,
.work-poster:focus-visible .work-poster__surface {
    border-color: rgba(255, 255, 255, 0.38);
    transform: scale(1.025);
}

.work-poster__surface > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #F7F7F5;
}

/* Uploaded posters use their intrinsic ratio instead of being letterboxed in
   a fixed A-series frame. Placeholder cards retain the fixed ratio above. */
.work-poster__surface--image {
    aspect-ratio: auto;
    background: transparent;
}

.work-poster__surface--image > img {
    height: auto;
    object-fit: initial;
    background: transparent;
}

.work-poster__placeholder {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 24px;
    color: #222222;
    background: #E0E0DA;
    overflow: hidden;
}

.work-poster:nth-child(3n + 2) .work-poster__placeholder { background: #D6D6D0; }
.work-poster:nth-child(3n) .work-poster__placeholder { background: #C9C9C2; }

.work-poster__map {
    position: absolute;
    inset: 13% -20% 18%;
    display: block;
    border: 1px solid rgba(17, 17, 17, 0.25);
    border-radius: 50%;
    transform: rotate(-22deg);
}

.work-poster__map::before,
.work-poster__map::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(17, 17, 17, 0.2);
    border-radius: 50%;
}

.work-poster__map::before { inset: 16% -8%; }
.work-poster__map::after { inset: 34% -16%; }

.work-poster__placeholder small {
    position: relative;
    z-index: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 8px;
    letter-spacing: 0.14em;
}

.work-poster__placeholder strong {
    position: absolute;
    right: 16px;
    bottom: 8%;
    font-size: clamp(74px, 8vw, 132px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.1em;
    opacity: 0.2;
}

.work-poster__placeholder em {
    position: absolute;
    bottom: 28px;
    left: 24px;
    z-index: 1;
    font-family: "Songti SC", "SimSun", serif;
    font-size: 26px;
    font-style: normal;
    font-weight: 600;
    writing-mode: vertical-rl;
}

.work-poster__caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 17px;
    font-size: 12px;
}

.work-poster__caption b {
    font-weight: 550;
}

.work-poster__caption i {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 8px;
    font-style: normal;
    letter-spacing: 0.12em;
    opacity: 0.42;
}

/* Finals */
.hometown-finals {
    min-height: 100vh;
    background: var(--ht-paper-deep);
}

.final-player {
    padding-top: clamp(64px, 9vh, 110px);
}

.final-player__toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 24px;
}

.final-years {
    display: flex;
    gap: 10px;
}

.final-years button {
    min-width: 70px;
    padding: 8px 0;
    color: inherit;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-bottom: 1px solid transparent;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    opacity: 0.42;
    transition: opacity 240ms ease, border-color 240ms ease;
}

.final-years button:hover,
.final-years button:focus-visible,
.final-years button.is-active {
    border-bottom-color: currentColor;
    opacity: 1;
}

.final-player__toolbar > p {
    margin: 0;
    font-size: 12px;
    opacity: 0.55;
}

.final-player__screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    color: #F5F5F3;
    background: #111111;
    overflow: hidden;
}

.final-player__screen iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.final-player__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 30px;
    text-align: center;
}

.final-player__placeholder[hidden],
.final-player__screen iframe[hidden] {
    display: none;
}

.final-player__placeholder::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
}

.final-player__play {
    position: relative;
    z-index: 1;
    display: grid;
    width: 74px;
    height: 74px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    place-items: center;
}

.final-player__play span {
    width: 0;
    height: 0;
    margin-left: 5px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid currentColor;
}

.final-player__placeholder p {
    position: relative;
    z-index: 1;
    margin: 23px 0 6px;
    font-size: clamp(20px, 2vw, 34px);
    letter-spacing: 0.06em;
}

.final-player__placeholder small {
    position: relative;
    z-index: 1;
    font-size: 10px;
    opacity: 0.48;
}

/* Footer — dark closing band, shared with the portal system */
.hometown-footer {
    margin-top: clamp(80px, 12vh, 150px);
    background: #111111;
    color: #F5F5F3;
}

.hometown-footer__inner {
    padding-top: clamp(44px, 6vw, 80px);
    display: grid;
    grid-template-columns: 4fr 2fr 2fr;
    gap: 30px;
}

.hometown-footer__brand strong {
    display: block;
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1;
}

.hometown-footer__brand p {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(245, 245, 243, 0.56);
}

.hometown-footer__title {
    margin: 0 0 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(245, 245, 243, 0.56);
}

.hometown-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hometown-footer__col li {
    padding-block: 5px;
}

.hometown-footer__col a {
    font-size: 13px;
    color: rgba(245, 245, 243, 0.56);
    transition: color 250ms var(--ht-ease);
}

.hometown-footer__col a:hover {
    color: #F5F5F3;
}

.hometown-footer__bottom {
    grid-column: 1 / -1;
    margin-top: clamp(28px, 4vw, 48px);
    padding: 20px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(245, 245, 243, 0.56);
}

.hometown-footer__top {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(245, 245, 243, 0.56);
    transition: color 250ms var(--ht-ease);
}

.hometown-footer__top:hover {
    color: #F5F5F3;
}

/* Login modal */
.login-modal,
.work-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    padding: 20px;
    place-items: center;
}

.login-modal[hidden],
.work-modal[hidden] {
    display: none;
}

.login-modal__backdrop,
.work-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 15, 11, 0.68);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    opacity: 0;
    transition: opacity 320ms ease;
}

.login-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 40px));
    padding: 30px clamp(28px, 4vw, 54px) 44px;
    color: var(--ht-ink);
    background: #F7F7F5;
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 380ms var(--ht-ease), transform 380ms var(--ht-ease);
}

.login-modal.is-open .login-modal__backdrop,
.work-modal.is-open .work-modal__backdrop {
    opacity: 1;
}

.login-modal.is-open .login-modal__dialog {
    opacity: 1;
    transform: translateY(0);
}

.login-modal__close,
.work-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    color: inherit;
    cursor: pointer;
    background: transparent;
    border: 0;
    place-items: center;
}

.login-modal__close svg,
.work-modal__close svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.login-modal__tabs {
    display: flex;
    gap: 4px;
    padding-right: 38px;
    border-bottom: 1px solid var(--ht-line);
}

.login-modal__tabs button {
    flex: 1;
    padding: 12px 4px;
    color: inherit;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-bottom: 1px solid transparent;
    font-size: 11px;
    opacity: 0.45;
    transform: translateY(1px);
}

.login-modal__tabs button.is-active {
    border-bottom-color: currentColor;
    opacity: 1;
}

.login-modal__brand {
    padding: 38px 0 34px;
}

.login-modal__brand p {
    margin: 0 0 9px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 8px;
    letter-spacing: 0.18em;
    opacity: 0.45;
}

.login-modal__brand h2 {
    margin: 0;
    font-size: clamp(25px, 5vw, 38px);
    font-weight: 550;
    line-height: 1.15;
    letter-spacing: -0.045em;
    white-space: nowrap;
}

.login-form__field + .login-form__field {
    margin-top: 21px;
}

.login-form__field label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
    opacity: 0.65;
}

.login-form__field input {
    width: 100%;
    height: 48px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.35);
    border-radius: 0;
    outline: none;
    font-size: 14px;
    transition: border-color 200ms ease;
}

.login-form__field input:focus {
    border-bottom-color: var(--ht-ink);
}

.login-form__field input::placeholder {
    color: rgba(17, 17, 17, 0.34);
}

.login-form__submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 50px;
    padding: 0 20px;
    margin-top: 34px;
    color: #F4F4F1;
    cursor: pointer;
    background: var(--ht-moss);
    border: 0;
    font-size: 13px;
}

.login-form__submit svg {
    width: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
    transition: transform 300ms var(--ht-ease);
}

.login-form__submit:hover svg,
.login-form__submit:focus-visible svg {
    transform: translateX(5px);
}

.login-form__message {
    min-height: 20px;
    margin: 13px 0 -15px;
    color: #6f5940;
    font-size: 11px;
}

/* Work lightbox */
.work-modal {
    z-index: 310;
}

.work-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    width: min(1100px, calc(100vw - 44px));
    max-height: calc(100vh - 44px);
    max-height: calc(100svh - 44px);
    color: #F5F5F3;
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    transition: opacity 380ms var(--ht-ease), transform 380ms var(--ht-ease);
}

.work-modal.is-open .work-modal__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.work-modal__close {
    color: #fff;
    background: rgba(16, 19, 16, 0.66);
}

.work-modal__media {
    display: grid;
    width: 100%;
    height: min(78vh, 900px);
    height: min(78svh, 900px);
    place-items: center;
}

.work-modal__media .work-poster__surface {
    width: auto;
    max-width: 100%;
    height: 100%;
    aspect-ratio: 0.707 / 1;
    transform: none;
}

.work-modal__media .work-poster__surface--image {
    width: auto;
    height: auto;
    max-height: 100%;
    aspect-ratio: auto;
}

.work-modal__media img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(78vh, 900px);
    max-height: min(78svh, 900px);
    object-fit: contain;
}

.work-modal__dialog > p {
    margin: 13px 0 0;
    font-size: 12px;
    letter-spacing: 0.08em;
}

/* Responsive */
@media (max-width: 1100px) {
    :root {
        --ht-shell: calc(100vw - 64px);
    }

    .hometown-header__inner {
        width: calc(100vw - 40px);
    }

    .hometown-nav {
        gap: 24px;
    }

    .hometown-platform-link span {
        display: none;
    }

    .hometown-about__story {
        grid-template-columns: 0.5fr 1.5fr;
        gap: 64px;
    }
}

@media (max-width: 820px) {
    :root {
        --ht-header-height: 64px;
        --ht-shell: calc(100vw - 40px);
    }

    .hometown-header__inner {
        grid-template-columns: 1fr auto;
        width: calc(100vw - 28px);
    }

    .hometown-nav {
        position: fixed;
        inset: 0;
        z-index: 2;
        display: flex;
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
        justify-content: center;
        padding-inline: 24px;
        color: #F6F6F3;
        visibility: hidden;
        background: #1d251e;
        opacity: 0;
        transition: opacity 350ms ease, visibility 0s linear 350ms;
    }

    .is-menu-open .hometown-nav {
        visibility: visible;
        opacity: 1;
        transition-delay: 0s;
    }

    .hometown-nav a {
        font-size: clamp(30px, 7vw, 50px);
        font-weight: 500;
        line-height: 1.35;
        letter-spacing: -0.05em;
    }

    .hometown-nav a::after {
        display: none;
    }

    .hometown-header__actions,
    .hometown-brand {
        position: relative;
        z-index: 3;
    }

    .hometown-menu-button {
        display: block;
    }

    .is-menu-open .hometown-header {
        color: #F6F6F3;
    }

    .is-menu-open .hometown-header::before {
        background: transparent;
        border-color: transparent;
        backdrop-filter: none;
    }

    .is-menu-open .hometown-menu-button i:first-of-type {
        transform: translateY(3.5px) rotate(45deg);
    }

    .is-menu-open .hometown-menu-button i:last-of-type {
        transform: translateY(-3.5px) rotate(-45deg);
    }

    .hometown-platform-link {
        display: none;
    }

    .hometown-section-head {
        grid-template-columns: 0.25fr 1.75fr;
        gap: 24px;
    }

    .hometown-section-head > div {
        grid-column: 2;
    }

    .hometown-works__hint {
        display: none;
    }

    .hometown-about__mosaic {
        grid-template-rows: repeat(10, minmax(38px, 8vw));
    }

    .about-media--1 { grid-row: 1 / 7; grid-column: 1 / 9; }
    .about-media--2 { grid-row: 2 / 6; grid-column: 9 / 13; }
    .about-media--3 { grid-row: 7 / 11; grid-column: 5 / 12; }

    .hometown-about__story {
        grid-template-columns: 1fr;
        gap: 58px;
    }

    .about-guide {
        position: static;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 13px;
    }

    .about-guide > div {
        display: block;
        padding: 12px 0;
    }

    .about-guide strong {
        display: block;
        margin-top: 8px;
        font-size: 11px;
    }

    .works-viewport {
        padding: 0 20px 18px;
        overflow: hidden;
        touch-action: pan-y;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .works-track {
        animation: none;
    }

    .work-poster {
        flex-basis: min(68vw, 310px);
        width: min(68vw, 310px);
    }
}

@media (max-width: 560px) {
    :root {
        --ht-shell: calc(100vw - 32px);
    }

    .hometown-brand {
        gap: 8px;
        font-size: 12px;
    }

    .hometown-brand__mark {
        width: 24px;
        height: 24px;
    }

    .hometown-header__actions {
        gap: 8px;
    }

    .hometown-login-button {
        min-width: 54px;
        height: 31px;
        padding: 0 13px;
        font-size: 11px;
    }

    .hometown-hero__content {
        padding-bottom: 105px;
    }

    .hometown-hero h1 {
        font-size: clamp(28px, 7.4vw, 42px);
        line-height: 1.28;
    }

    .hometown-hero__coordinates {
        display: none;
    }

    .hometown-scroll-cue {
        right: 16px;
        bottom: 24px;
    }

    .hometown-scroll-cue span {
        display: none;
    }

    .hometown-section-head {
        display: block;
        padding-top: 86px;
        padding-bottom: 44px;
    }

    .hometown-section-index {
        margin-bottom: 34px;
    }

    .hometown-section-head h2 {
        font-size: clamp(42px, 13vw, 64px);
    }

    .hometown-about__mosaic {
        display: grid;
        grid-template-columns: 1fr 0.68fr;
        grid-template-rows: 280px 180px;
        gap: 10px;
        padding-block: 56px;
    }

    .about-media--1 { grid-row: 1; grid-column: 1 / -1; }
    .about-media--2 { grid-row: 2; grid-column: 1; }
    .about-media--3 { grid-row: 2; grid-column: 2; }

    .about-media figcaption {
        padding: 12px;
        font-size: 9px;
    }

    .hometown-about__story {
        padding-block: 62px 90px;
    }

    .about-guide {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-copy p {
        font-size: 16px;
        line-height: 1.95;
        text-align: left;
    }

    .about-copy p + p {
        padding-top: 34px;
        margin-top: 34px;
    }

    .works-viewport {
        margin-top: 52px;
        padding-inline: 16px;
    }

    .final-player {
        padding-top: 48px;
    }

    .final-player__toolbar {
        display: block;
    }

    .final-years {
        justify-content: space-between;
    }

    .final-years button {
        min-width: 0;
        flex: 1;
    }

    .final-player__toolbar > p {
        margin-top: 18px;
    }

    .final-player__placeholder small {
        max-width: 260px;
    }

    .hometown-footer__inner {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .hometown-footer__brand {
        grid-column: 1 / -1;
    }

    .login-modal {
        padding: 12px;
    }

    .login-modal__dialog {
        width: calc(100vw - 24px);
        padding: 24px 22px 38px;
    }

    .login-modal__tabs {
        padding-right: 28px;
    }

    .login-modal__tabs button {
        font-size: 10px;
    }

    .login-modal__brand h2 {
        font-size: clamp(23px, 7vw, 31px);
    }

    .work-modal {
        padding: 12px;
    }

    .work-modal__dialog {
        width: calc(100vw - 24px);
        max-height: calc(100svh - 24px);
    }

    .work-modal__media {
        height: 76svh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hometown-hero__media { transform: none !important; }
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hometown-ready [data-enter] {
        opacity: 1;
        transform: none;
    }
}

/* ------------------------------------------------------------------
   Process section — 4-step horizontal flow
   ------------------------------------------------------------------ */
.hometown-process {
    padding-bottom: clamp(80px, 12vh, 160px);
    color: var(--ht-ink);
    background: var(--ht-paper);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--ht-line);
    margin-top: clamp(40px, 6vh, 80px);
}

.process-step {
    position: relative;
    padding: var(--s-6) var(--s-5) var(--s-6) 0;
    border-right: 1px solid var(--ht-line);
}

.process-step:last-child {
    border-right: 0;
}

.process-step__num {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ht-moss);
    margin: 0 0 var(--s-5);
}

.process-step__num::before {
    content: "";
    width: 24px;
    height: 1px;
    background: currentColor;
}

.process-step__en {
    margin: 0 0 var(--s-3);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ht-ink);
    opacity: 0.55;
}

.process-step__title {
    margin: 0 0 var(--s-3);
    font-size: clamp(20px, 1.8vw, 26px);
    font-weight: 550;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ht-ink);
}

.process-step p {
    margin: 0;
    color: var(--ht-ink);
    opacity: 0.72;
    font-size: 14px;
    line-height: 1.7;
    max-width: 30ch;
}

@media (max-width: 920px) {
    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .process-step:nth-child(2n) { border-right: 0; }
    .process-step:nth-child(-n+2) { border-bottom: 1px solid var(--ht-line); }
}

@media (max-width: 560px) {
    .process-grid { grid-template-columns: 1fr; }
    .process-step { border-right: 0; border-bottom: 1px solid var(--ht-line); }
    .process-step:last-child { border-bottom: 0; }
}
