/* Home page first-visit feature tour */
body.is-home-tour-open {
    overflow: hidden;
}

.home-tour {
    position: fixed;
    inset: 0;
    z-index: 10050;
    pointer-events: none;
}

.home-tour.is-active {
    pointer-events: auto;
}

.home-tour[hidden] {
    display: none !important;
}

.home-tour__screen {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: transparent;
    transition: background 0.3s ease;
}

.home-tour.is-finish-visible .home-tour__screen {
    background: rgba(8, 18, 28, 0.84);
    cursor: default;
}

.home-tour__spotlight {
    position: fixed;
    z-index: 1;
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(8, 18, 28, 0.84);
    outline: 2px solid rgba(255, 255, 255, 0.92);
    outline-offset: 3px;
    pointer-events: none;
    transition: top 0.4s ease, left 0.4s ease, width 0.4s ease, height 0.4s ease, opacity 0.25s ease;
    opacity: 0;
}

.home-tour.is-step-visible .home-tour__spotlight {
    opacity: 1;
}

.home-tour__callout {
    position: fixed;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    max-width: min(92vw, 16rem);
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.home-tour.is-step-visible .home-tour__callout {
    opacity: 1;
    transform: translateY(0);
}

.home-tour__arrow {
    width: clamp(4.5rem, 14vw, 6.5rem);
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.home-tour__arrow path {
    stroke: #fff;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.home-tour__label {
    margin: 0;
    font-family: 'Caveat', 'Segoe Print', cursive;
    font-size: clamp(1.65rem, 5vw, 2.35rem);
    font-weight: 700;
    line-height: 1.05;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    transform: rotate(-3deg);
}

.home-tour__sub {
    margin: 0;
    font-family: 'Caveat', 'Segoe Print', cursive;
    font-size: clamp(1.15rem, 3.5vw, 1.55rem);
    font-weight: 600;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transform: rotate(-2deg);
}

.home-tour__callout--flip .home-tour__arrow {
    transform: scaleY(-1);
}

.home-tour__callout--flip-left .home-tour__arrow {
    transform: scaleX(-1);
}

.home-tour__callout--pointed {
    align-items: flex-start;
    max-width: min(92vw, 14rem);
}

.home-tour__pointer {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.home-tour__pointer-text {
    position: relative;
    z-index: 1;
    padding: 0 0.1rem;
}

.home-tour__pointer--down .home-tour__label {
    margin-bottom: -0.1rem;
}

.home-tour__pointer--down .home-tour__sub {
    margin-top: 0;
}

.home-tour__arrow-track {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-top: -0.35rem;
    padding-left: 0.15rem;
}

.home-tour__arrow--down {
    width: clamp(3.25rem, 10vw, 4.25rem);
    height: auto;
    transform: none;
}

.home-tour__hint {
    position: fixed;
    left: 50%;
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    z-index: 2;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    pointer-events: none;
    animation: home-tour-hint-pulse 2.2s ease-in-out infinite;
}

@keyframes home-tour-hint-pulse {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

.home-tour__finish {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: min(92vw, 22rem);
    padding: 1.5rem 1.35rem 1.25rem;
    border-radius: var(--radius-lg, 16px);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.home-tour.is-finish-visible .home-tour__finish {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.home-tour.is-finish-visible .home-tour__callout,
.home-tour.is-finish-visible .home-tour__spotlight,
.home-tour.is-finish-visible .home-tour__hint {
    opacity: 0;
    pointer-events: none;
}

.home-tour__finish-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-display, 'Outfit', system-ui, sans-serif);
    font-size: 1.35rem;
    color: var(--color-primary-dark, #095555);
}

.home-tour__finish-text {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--color-text-muted, #6b7280);
}

.home-tour__dont-show {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--color-text, #1a1a2e);
    cursor: pointer;
    user-select: none;
}

.home-tour__dont-show input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary, #0d6e6e);
}

.home-tour__dismiss {
    width: 100%;
}
