/* ============================================================
   lottery.miryu-kamiya.com  style.css
   配色はアプリアイコン（3色のボール）とスクリーンショットの藍色に合わせる
   ============================================================ */
:root {
    --paper: #f5f4fb;
    --paper-2: #ebe9f8;
    --white: #ffffff;
    --ink: #1e1c3a;
    --ink-dim: #5d5a7b;
    --indigo: #4a44b5;
    --indigo-dark: #37329a;
    --lilac: #dad7f6;
    --line: rgba(30, 28, 58, 0.12);
    --night: #17161d;
    --night-2: #24212f;
    --night-text: #e9e7f5;
    --night-dim: #aaa6c2;

    --coral: #e4553f;
    --coral-dark: #a8301f;
    --teal: #17a08e;
    --teal-dark: #0b6a5d;
    --blue: #2f6fdc;
    --blue-dark: #1b449a;

    --max-width: 1080px;
    --header-h: 64px;
    --gutter: 20px;
    --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
}

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

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "palt" 1;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--indigo);
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--indigo-dark);
}

:focus-visible {
    outline: 3px solid var(--indigo);
    outline-offset: 3px;
    border-radius: 4px;
}

ul,
ol {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 200;
    padding: 8px 14px;
    background: var(--indigo);
    color: var(--white);
    border-radius: 8px;
}

.skip-link:focus {
    top: 12px;
}

h1,
h2,
h3 {
    line-height: 1.4;
    font-weight: 900;
    letter-spacing: 0.01em;
    text-wrap: balance;
    word-break: auto-phrase;
}

h2 {
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    margin-bottom: 18px;
}

/* ---------------- Header ---------------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 244, 251, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: var(--max-width);
    height: var(--header-h);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    min-width: 0;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 900;
    font-size: 1.05rem;
    white-space: nowrap;
}

.site-nav ul {
    display: flex;
    gap: 4px;
}

.site-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--ink-dim);
    font-size: 0.93rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--ink);
    background: var(--paper-2);
}

.site-nav a[aria-current="page"] {
    color: var(--indigo);
    background: var(--lilac);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    position: relative;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
    position: absolute;
    left: 50%;
    width: 18px;
    height: 2px;
    margin-left: -9px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s, background 0.2s;
}

.menu-toggle-bars {
    top: 50%;
    margin-top: -1px;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
    content: "";
    left: 0;
    margin-left: 0;
}

.menu-toggle-bars::before {
    top: -6px;
}

.menu-toggle-bars::after {
    top: 6px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

/* ---------------- Hero ---------------- */
.hero {
    padding: 56px 0 72px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 48px;
}

.ball-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    margin-bottom: 30px;
}

.ball-item {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: ball-drop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(var(--i) * 0.12s + 0.1s);
}

.ball {
    --c: var(--blue);
    --c-dark: var(--blue-dark);
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
    color: var(--c-dark);
    background:
        radial-gradient(circle at 50% 50%, #fff 0 36%, transparent 37%),
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.75), transparent 28%),
        radial-gradient(circle at 50% 45%, var(--c) 50%, var(--c-dark) 100%);
    box-shadow: 0 10px 18px -8px var(--c-dark);
}

.ball-coral { --c: var(--coral); --c-dark: var(--coral-dark); }
.ball-teal  { --c: var(--teal);  --c-dark: var(--teal-dark); }
.ball-blue  { --c: var(--blue);  --c-dark: var(--blue-dark); }

.ball-label {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.ball-label strong {
    font-size: 0.98rem;
}

.ball-label span {
    font-size: 0.8rem;
    color: var(--ink-dim);
}

@keyframes ball-drop {
    from {
        opacity: 0;
        transform: translateY(-26px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: clamp(1.8rem, 4.4vw, 2.9rem);
    line-height: 1.35;
    margin-bottom: 20px;
}

.hero-body {
    max-width: 34em;
    color: var(--ink-dim);
    font-size: 1.04rem;
    margin-bottom: 28px;
}

.hero-note {
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--ink-dim);
}

.hero-visual {
    justify-self: center;
}

.hero-visual img {
    width: min(100%, 300px);
    border-radius: 30px;
    box-shadow:
        0 1px 0 var(--line),
        0 30px 60px -24px rgba(55, 50, 154, 0.45);
}

/* ---------------- Store buttons ---------------- */
.store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 24px;
    border-radius: 14px;
    background: var(--indigo);
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
}

.store-btn:hover {
    background: var(--indigo-dark);
    color: var(--white);
}

.store-btn svg {
    flex-shrink: 0;
}

.store-btn.is-disabled {
    background: var(--white);
    color: var(--ink-dim);
    border-color: var(--line);
    cursor: default;
}

/* ---------------- Sections ---------------- */
.section {
    padding: 72px 0;
}

.section-lead {
    color: var(--ink-dim);
    margin: -8px 0 28px;
    max-width: 40em;
}

/* About */
.section-about {
    background: var(--white);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.about-grid p {
    max-width: 38em;
    color: var(--ink-dim);
}

.about-grid p + p {
    margin-top: 14px;
}

.app-meta {
    border-top: 2px solid var(--ink);
}

.app-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.app-meta dt {
    color: var(--ink-dim);
    font-size: 0.9rem;
}

.app-meta dd {
    font-weight: 700;
    text-align: right;
}

/* Screens */
.section-screens {
    background: var(--night);
    color: var(--night-text);
}

.section-screens .section-lead {
    color: var(--night-dim);
}

.screens-strip {
    --edge: max(var(--gutter), calc((100vw - var(--max-width)) / 2 + var(--gutter)));
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px var(--edge) 18px;
    scroll-padding-inline: var(--edge);
    scrollbar-color: var(--night-2) transparent;
}

.screen {
    flex: 0 0 232px;
    scroll-snap-align: start;
}

.screen-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    border-radius: 20px;
}

.screen-open img {
    width: 100%;
    border-radius: 20px;
}

.screen figcaption {
    padding: 14px 2px 0;
    line-height: 1.6;
}

.screen figcaption strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.screen figcaption span {
    font-size: 0.86rem;
    color: var(--night-dim);
}

/* Steps（実際の操作順なので番号付き） */
.steps {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-top: 58px;
    color: var(--ink-dim);
}

.steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--lilac);
    color: var(--indigo);
    font-weight: 900;
    font-size: 1.1rem;
}

.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 54px;
    right: -8px;
    height: 2px;
    background: var(--lilac);
}

/* Plans */
.section-plans {
    background: var(--white);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.table-scroll {
    position: relative; /* 表内の visually-hidden が横スクロールの外にはみ出さないように */
    overflow-x: auto;
}

.plan-table {
    width: 100%;
    border-collapse: collapse;
}

.plan-table th,
.plan-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.plan-table tbody th {
    text-align: left;
    font-weight: 400;
}

.plan-table thead th {
    font-size: 1rem;
    font-weight: 900;
    border-bottom: 2px solid var(--ink);
    vertical-align: bottom;
}

.plan-table thead small {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-dim);
}

.plan-table .is-featured {
    background: rgba(74, 68, 181, 0.07);
}

.plan-table thead .is-featured {
    color: var(--indigo);
    border-bottom-color: var(--indigo);
}

.mark-yes {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--teal);
    position: relative;
    vertical-align: middle;
}

.mark-yes::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.plan-table tbody tr:last-child td {
    font-weight: 700;
}

.plan-note {
    margin-top: 18px;
    font-size: 0.9rem;
    color: var(--ink-dim);
    max-width: 46em;
}

/* Notice */
.notice {
    padding: 28px 30px;
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--coral);
    border-radius: 6px 16px 16px 6px;
}

.notice h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.notice li {
    position: relative;
    padding-left: 1.2em;
    color: var(--ink-dim);
}

.notice li + li {
    margin-top: 6px;
}

.notice li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--coral);
}

/* CTA */
.section-cta {
    padding-top: 24px;
    text-align: center;
}

.section-cta h2 {
    margin-bottom: 24px;
}

.section-cta .store-buttons {
    justify-content: center;
}

/* ---------------- Modal ---------------- */
.modal {
    max-width: min(92vw, 460px);
    max-height: 92vh;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

.modal::backdrop {
    background: rgba(12, 11, 20, 0.85);
}

.modal img {
    max-height: 88vh;
    width: auto;
    margin: 0 auto;
    border-radius: 22px;
}

.modal-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* ---------------- Sub pages ---------------- */
.page-head {
    padding: 52px 0 36px;
    border-bottom: 1px solid var(--line);
}

.page-head h1 {
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    margin-bottom: 8px;
}

.page-head p {
    color: var(--ink-dim);
}

.policy {
    max-width: 760px;
}

.policy-updated {
    font-size: 0.9rem;
    color: var(--ink-dim);
    margin-bottom: 20px;
}

.policy > p,
.policy > ul {
    margin-bottom: 14px;
}

.policy h2 {
    font-size: 1.2rem;
    margin: 40px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.policy > ul li {
    position: relative;
    padding-left: 1.2em;
}

.policy > ul li::before {
    content: "";
    position: absolute;
    left: 0.2em;
    top: 0.8em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--indigo);
}

.policy-toc {
    margin: 24px 0 8px;
    padding: 18px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.policy-toc ol {
    list-style: decimal;
    padding-left: 1.4em;
    columns: 2;
    column-gap: 28px;
    font-size: 0.93rem;
}

.policy-toc li {
    break-inside: avoid;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 26px;
    border: 0;
    border-radius: 12px;
    background: var(--indigo);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--indigo-dark);
    color: var(--white);
}

/* Form */
.form-wrap {
    max-width: 680px;
}

.form-note {
    color: var(--ink-dim);
    font-size: 0.93rem;
    margin-bottom: 26px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.required {
    display: inline-block;
    margin-left: 6px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--coral);
    color: var(--white);
    font-size: 0.72rem;
    vertical-align: middle;
    line-height: 1.7;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(30, 28, 58, 0.24);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(74, 68, 181, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-privacy {
    font-size: 0.85rem;
    color: var(--ink-dim);
    margin-bottom: 16px;
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 22px;
    font-weight: 700;
}

.alert-success {
    background: rgba(23, 160, 142, 0.12);
    color: var(--teal-dark);
}

.alert-error {
    background: rgba(228, 85, 63, 0.12);
    color: var(--coral-dark);
}

/* ---------------- Footer ---------------- */
.footer {
    padding: 48px 0 36px;
    background: var(--night);
    color: var(--night-dim);
    font-size: 0.9rem;
}

.footer-inner {
    display: grid;
    gap: 22px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand img {
    border-radius: 10px;
}

.footer-name {
    color: var(--night-text);
    font-weight: 900;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.footer-nav a {
    color: var(--night-text);
    text-decoration: none;
}

.footer-nav a:hover {
    text-decoration: underline;
    color: var(--white);
}

.footer-note {
    font-size: 0.82rem;
}

.footer-copy {
    font-size: 0.8rem;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero-visual img {
        width: min(72vw, 280px);
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 20px;
    }

    .steps li:nth-child(2)::after {
        display: none;
    }
}

@media (max-width: 760px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        display: none;
        padding: 10px var(--gutter) 18px;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 30px -18px rgba(30, 28, 58, 0.4);
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
    }

    .site-nav a {
        padding: 12px 14px;
        font-size: 1rem;
    }

    .br-wide {
        display: none;
    }

    .section {
        padding: 56px 0;
    }

    .hero {
        padding: 36px 0 56px;
    }

    .screen {
        flex-basis: 200px;
    }

    .policy-toc ol {
        columns: 1;
    }

    .notice {
        padding: 22px 20px;
    }
}

@media (max-width: 480px) {
    .ball {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .steps li {
        padding: 4px 0 0 58px;
        min-height: 42px;
    }

    .steps li::after {
        display: none;
    }

    .store-btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .plan-table th,
    .plan-table td {
        padding: 12px 6px;
        font-size: 0.9rem;
    }

    .plan-table tbody th {
        padding-left: 2px;
    }

    .plan-table td,
    .plan-table thead th:not(:first-child) {
        width: 26%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .ball-item {
        animation: none;
    }
}
