/* Main home page — shared tokens, section heads, buttons and motion for the
   panel-managed sections in includes/web/home/. Every section ships its own
   stylesheet next to this file; this one is linked once from web/index.html. */

.zr-home {
    --hm-red: #d8291c;
    --hm-red-2: #ef3b2d;
    --hm-red-deep: #a91c12;
    --hm-tint: #fdeeec;
    --hm-ink: #23201f;
    --hm-ink-bg: #23201f;
    --hm-ink-2: #181514;
    --hm-text: #2e2a29;
    --hm-muted: #6f6866;
    --hm-line: #ebe7e5;
    --hm-soft: #f7f5f4;
    --hm-r: 22px;
    --hm-r-sm: 14px;
    --hm-shadow: 0 1px 2px rgba(35, 32, 31, 0.04), 0 12px 32px -12px rgba(35, 32, 31, 0.14);
    --hm-shadow-lg: 0 2px 6px rgba(35, 32, 31, 0.06), 0 28px 60px -20px rgba(35, 32, 31, 0.28);
    --hm-display: "Jost", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --hm-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --hm-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.zr-home.zr-home > .hm-sec {
    padding-top: 30px;
    padding-bottom: 30px;
    font-family: var(--hm-font);
    color: var(--hm-text);
}
.zr-home.zr-home > .hm-sec--tint {
    background-image: linear-gradient(var(--hm-soft), var(--hm-soft));
}
.zr-home.zr-home > .hm-sec--flush-top {
    padding-top: 8px;
}

.hm-sec h2,
.hm-sec h3 {
    font-family: var(--hm-display);
}
.hm-sec a {
    text-decoration: none;
}

/* --- section head -------------------------------------------------------- */
.hm-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 32px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.hm-head-copy {
    flex: 1 1 420px;
    min-width: 0;
}
.hm-head--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.hm-head--center .hm-head-copy {
    flex: none;
}
.hm-head--center .hm-sub {
    margin-left: auto;
    margin-right: auto;
}
.hm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-family: var(--hm-font);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hm-red);
}
.hm-eyebrow::before {
    content: "";
    flex: none;
    width: 15px;
    height: 15px;
    background: currentColor;
    -webkit-mask: url("../../../../img/web/home/zr-star.svg") center / contain no-repeat;
    mask: url("../../../../img/web/home/zr-star.svg") center / contain no-repeat;
}
.hm-h2 {
    margin: 0;
    font-family: var(--hm-display);
    font-size: clamp(24px, 1.95vw, 31px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--hm-ink);
}
.hm-sub {
    max-width: 720px;
    margin: 6px 0 0;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--hm-muted);
}

/* text on the dark / red bands: scoped above every shared heading rule */
.zr-home .hm-sec .hm-eyebrow--light {
    color: #ff8a80;
}
.zr-home .hm-sec .hm-h2--light,
.zr-home .hm-sec .hm-h2--light a {
    color: #fff;
}
.zr-home .hm-sec .hm-sub--light {
    color: rgba(255, 255, 255, 0.74);
}

/* --- buttons & links ----------------------------------------------------- */
.hm-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: 1.5px solid var(--hm-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hm-ink);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}
.hm-more svg {
    transition: transform 0.2s var(--hm-ease);
}
.hm-more:hover {
    border-color: var(--hm-red);
    color: var(--hm-red);
}
.hm-more:hover svg {
    transform: translateX(3px);
}
.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 50px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--hm-red-2), var(--hm-red));
    box-shadow: 0 10px 24px -10px rgba(216, 41, 28, 0.7);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 0.2s var(--hm-ease), box-shadow 0.2s;
}
.hm-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -12px rgba(216, 41, 28, 0.75);
}
.hm-btn--light {
    background: #fff;
    color: var(--hm-ink);
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.5);
}
.hm-btn--light:hover {
    color: var(--hm-red);
}

/* --- segmented tabs (all panels stay in the DOM) ------------------------- */
.hm-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
    background: var(--hm-soft);
    border: 1px solid var(--hm-line);
}
.hm-tab {
    height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--hm-muted);
    font-family: var(--hm-font);
    font-size: 13.5px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.hm-tab:hover {
    color: var(--hm-ink);
}
.hm-tab[aria-selected="true"] {
    background: #fff;
    color: var(--hm-red);
    box-shadow: 0 2px 8px -2px rgba(35, 32, 31, 0.16);
}
.hm-panel[hidden] {
    display: none !important;
}

/* --- rail (horizontal scroll-snap list) ---------------------------------- */
.hm-rail {
    position: relative;
}
.hm-rail-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 20px) / 4);
    gap: 20px;
    margin: 0;
    padding: 6px 2px 18px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.hm-rail-track::-webkit-scrollbar {
    display: none;
}
.hm-rail-track > * {
    scroll-snap-align: start;
    min-width: 0;
}
.hm-rail-nav {
    display: flex;
    gap: 10px;
}
.hm-nb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--hm-line);
    border-radius: 50%;
    background: #fff;
    color: var(--hm-ink);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, opacity 0.2s;
}
.hm-nb:hover {
    border-color: var(--hm-red);
    color: var(--hm-red);
}
.hm-nb:disabled {
    opacity: 0.35;
    cursor: default;
    border-color: var(--hm-line);
    color: var(--hm-ink);
}

/* --- icon chip ----------------------------------------------------------- */
.hm-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--hm-tint);
    color: var(--hm-red);
}

/* --- photo placeholder: the image hides itself when it fails to load ----- */
.hm-photo {
    position: relative;
    display: block;
    overflow: hidden;
    background:
        url("../../../../img/web/home/zr-star-soft.svg") 50% 50% / min(46%, 220px) no-repeat,
        radial-gradient(120% 90% at 0% 0%, rgba(216, 41, 28, 0.12), transparent 60%),
        linear-gradient(135deg, #fbf3f2, #f1eeec);
}
.hm-photo > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hm-photo > img.is-broken {
    visibility: hidden;
}

/* --- reveal on scroll (only once JS marks the page) ---------------------- */
.hm-js .hm-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--hm-ease), transform 0.7s var(--hm-ease);
    transition-delay: calc(var(--hm-d, 0) * 70ms);
}
.hm-js .hm-reveal.is-in {
    opacity: 1;
    transform: none;
}

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

/* --- brand star motif ---------------------------------------------------- */
.hm-star {
    display: inline-block;
    flex: none;
}
.hm-star-wm {
    position: absolute;
    z-index: 0;
    color: var(--hm-red);
    opacity: 0.06;
    pointer-events: none;
    animation: hm-spin 90s linear infinite;
}
@keyframes hm-spin {
    to {
        transform: rotate(360deg);
    }
}
.hm-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--hm-red);
}
.hm-divider::before,
.hm-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hm-line) 30%, var(--hm-line) 70%, transparent);
}

/* --- Zeny mascot (layers on one 512x512 canvas) -------------------------- */
.hm-zeny {
    position: relative;
    display: inline-block;
    flex: none;
    width: var(--zeny-s, 160px);
    height: var(--zeny-s, 160px);
}
.hm-zeny-in {
    position: absolute;
    inset: 0;
}
.hm-zeny img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}
.hm-zeny-hand {
    transform-origin: 26.6% 66%;
}
.hm-zeny-blink {
    opacity: 0;
}
.hm-zeny.is-alive .hm-zeny-in {
    animation: hm-z-float 4s ease-in-out infinite;
}
.hm-zeny.is-alive .hm-zeny-hand {
    animation: hm-z-wave 5.5s ease-in-out infinite;
}
.hm-zeny.is-alive .hm-zeny-lines {
    animation: hm-z-lines 5.5s ease-in-out infinite;
}
.hm-zeny.is-alive .hm-zeny-blink {
    animation: hm-z-blink 4.3s steps(1, end) infinite 1.2s;
}
@keyframes hm-z-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3.5%); }
}
@keyframes hm-z-wave {
    0% { transform: rotate(0); }
    6% { transform: rotate(-9deg); }
    12% { transform: rotate(7deg); }
    18% { transform: rotate(-9deg); }
    24% { transform: rotate(7deg); }
    30% { transform: rotate(-6deg); }
    36%, 100% { transform: rotate(0); }
}
@keyframes hm-z-lines {
    0%, 38%, 100% { opacity: 1; transform: none; }
    6%, 18%, 30% { opacity: 0.35; transform: translateX(2%); }
}
@keyframes hm-z-blink {
    0%, 92% { opacity: 0; }
    93%, 96% { opacity: 1; }
    97%, 100% { opacity: 0; }
}
.hm-bubble {
    position: relative;
    display: inline-block;
    padding: 10px 14px;
    border-radius: 16px 16px 16px 4px;
    background: #fff;
    color: var(--hm-ink);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: 0 12px 30px -10px rgba(35, 32, 31, 0.35);
}
.hm-bubble b {
    color: var(--hm-red);
}

/* star-shaped "new" badge */
.hm-starbadge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.hm-starbadge .hm-star {
    animation: hm-spin 12s linear infinite;
}

@media (max-width: 1199px) {
    .hm-rail-track {
        grid-auto-columns: calc((100% - 2 * 20px) / 3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-js .hm-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hm-sec *,
    .hm-sec *::before,
    .hm-sec *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hm-zeny *,
    .hm-star-wm,
    .hm-starbadge .hm-star {
        animation: none !important;
    }
}

.hm-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.hm-rail-nav[hidden] {
    display: none;
}

/* --- editor style presets (EDITOR_CONTRACT §3) ----------------------------
   Classes appear only when a section has a saved style option; with no
   options nothing below matches, so the default page is unchanged.
   Brand palette only: white, warm light grey, warm black #23201f, brand red. */
.zr-home.zr-home > .hm-sec.hm-bg-white {
    background: #fff;
}
.zr-home.zr-home > .hm-sec.hm-bg-light {
    background: var(--hm-soft);
}
.zr-home.zr-home > .hm-sec.hm-bg-ink {
    background: #23201f;
    color: rgba(255, 255, 255, 0.86);
}
.zr-home.zr-home > .hm-sec.hm-bg-red {
    background: linear-gradient(135deg, #d8291c, #b11f14);
    color: #fff;
}
.zr-home.zr-home > .hm-sec.hm-bg-photo {
    background:
        linear-gradient(0deg, rgba(24, 21, 20, 0.78), rgba(24, 21, 20, 0.5)),
        var(--hm-bg-image, none) center / cover no-repeat,
        #23201f;
    color: #fff;
}
.zr-home .hm-sec.hm-bg-ink .hm-h2,
.zr-home .hm-sec.hm-bg-ink .hm-h2 a,
.zr-home .hm-sec.hm-bg-red .hm-h2,
.zr-home .hm-sec.hm-bg-red .hm-h2 a,
.zr-home .hm-sec.hm-bg-photo .hm-h2,
.zr-home .hm-sec.hm-bg-photo .hm-h2 a {
    color: #fff;
}
.zr-home .hm-sec.hm-bg-ink .hm-sub,
.zr-home .hm-sec.hm-bg-red .hm-sub,
.zr-home .hm-sec.hm-bg-photo .hm-sub {
    color: rgba(255, 255, 255, 0.78);
}
.zr-home .hm-sec.hm-bg-ink .hm-eyebrow,
.zr-home .hm-sec.hm-bg-photo .hm-eyebrow {
    color: #ff8a80;
}
.zr-home .hm-sec.hm-bg-red .hm-eyebrow {
    color: #fff;
}
.zr-home .hm-sec.hm-bg-ink .hm-more,
.zr-home .hm-sec.hm-bg-red .hm-more,
.zr-home .hm-sec.hm-bg-photo .hm-more {
    color: #fff;
}

.zr-home.zr-home > .hm-sec.hm-space-s {
    padding-top: 16px;
    padding-bottom: 16px;
}
.zr-home.zr-home > .hm-sec.hm-space-m {
    padding-top: 30px;
    padding-bottom: 30px;
}
.zr-home.zr-home > .hm-sec.hm-space-l {
    padding-top: 56px;
    padding-bottom: 56px;
}

.zr-home .hm-sec.hm-align-start .hm-head {
    text-align: start;
}
.zr-home .hm-sec.hm-align-center .hm-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.zr-home .hm-sec.hm-align-center .hm-head-copy {
    flex-basis: auto;
}
.zr-home .hm-sec.hm-align-center .hm-sub {
    margin-left: auto;
    margin-right: auto;
}

.zr-home.zr-home > .hm-sec.hm-width-wide {
    padding-left: max(var(--zr-hdr-pad, 12px), calc((100% - 1640px) / 2));
    padding-right: max(var(--zr-hdr-pad, 12px), calc((100% - 1640px) / 2));
}

.hm-noanim .hm-reveal,
.hm-js .hm-noanim .hm-reveal {
    opacity: 1;
    transform: none;
    transition: none;
}
.hm-noanim *,
.hm-noanim *::before,
.hm-noanim *::after {
    animation-play-state: paused !important;
}

/* layout variant (featured tours): slider = default rail, grid = wrapped */
.hm-layout-grid .hm-rail-track {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
}
@media (max-width: 1199px) {
    .hm-layout-grid .hm-rail-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* the same presets on a module spotlight panel */
.sp-panel.hm-bg-light {
    background: var(--hm-soft);
}
.sp-panel.hm-bg-white {
    background: #fff;
}
.sp-panel.hm-bg-ink {
    background: #23201f;
}
.sp-panel.hm-bg-red {
    background: linear-gradient(135deg, #fbeceb, #fff 60%);
}
.sp-panel.hm-bg-ink .sp-h,
.sp-panel.hm-bg-ink .sp-step b,
.sp-panel.hm-bg-ink .sp-story-tx {
    color: #fff;
}
.sp-panel.hm-space-s .sp-below {
    gap: 8px;
}
.sp-panel.hm-space-l .sp-below {
    gap: 24px;
}
.sp-panel.hm-noanim *,
.sp-panel.hm-noanim *::before,
.sp-panel.hm-noanim *::after {
    animation-play-state: paused !important;
}

/* hero presets (homepage only: these hooks exist only in web/index.html) */
.search-area.hm-bg-ink,
.search-area.hm-bg-white,
.search-area.hm-bg-light,
.search-area.hm-bg-red {
    background-image: none !important;
}
.search-area.hm-bg-ink {
    background-color: #23201f !important;
}
.search-area.hm-bg-red {
    background-color: #b11f14 !important;
    background-image: linear-gradient(135deg, #d8291c, #8f180f) !important;
}
.search-area.hm-bg-white {
    background-color: #fff !important;
}
.search-area.hm-bg-light {
    background-color: #f7f5f4 !important;
}
.search-area.hm-bg-ink > .search-area-bg,
.search-area.hm-bg-red > .search-area-bg,
.search-area.hm-bg-white > .search-area-bg,
.search-area.hm-bg-light > .search-area-bg {
    display: none;
}
.search-area.hm-bg-photo > .mask {
    background:
        linear-gradient(0deg, rgba(24, 21, 20, 0.55), rgba(24, 21, 20, 0.25)),
        var(--hm-bg-image, none) center / cover no-repeat;
    opacity: 1;
}
.search-area.hm-bg-white .searchbar-hero-text,
.search-area.hm-bg-light .searchbar-hero-text {
    color: #23201f !important;
}
.search-area.hm-align-center .searchbar-hero-text {
    text-align: center;
}
