/* TODO-GIGA site shared styles.
 * washi (sepia) background, marker-like serif for headings, rounded body.
 * Aim: 個人開発 LP でも「作った人が楽しんでる」感が出る温かさ */

:root {
    --sepia: #f5ebd7;
    --sepia-dark: #e7d8b7;
    --ink: #3a2f1f;
    --ink-soft: #6b5a41;
    --accent: #d97a3a;
    --accent-soft: #f2b988;
    --card: #fffaf0;
    --link: #b25d1f;
    --border: rgba(58, 47, 31, 0.15);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--sepia);
    background-image:
        radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.35), transparent 40%),
        radial-gradient(circle at 80% 85%, rgba(217, 122, 58, 0.08), transparent 45%);
    color: var(--ink);
    font-family: -apple-system, "Hiragino Maru Gothic ProN", "Yu Gothic UI",
        "Segoe UI", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
    color: var(--ink);
    letter-spacing: 0.02em;
    line-height: 1.4;
    margin-top: 2em;
}

h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.4rem; border-bottom: 1px dashed var(--border); padding-bottom: 0.3em; }
h3 { font-size: 1.15rem; }

a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
a:hover { color: var(--accent); }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 0.7em;
    text-decoration: none;
    color: var(--ink);
}

.site-header .brand img {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    box-shadow: 0 2px 6px rgba(58, 47, 31, 0.15);
}

.site-header .brand-name {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
    font-size: 1.15rem;
    font-weight: 700;
}

.lang-switch {
    position: relative;
}

.lang-switch select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4em 2em 0.4em 0.9em;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%233a2f1f' d='M0 0h12L6 8z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.7em center;
}

.site-main {
    flex: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 1rem 1.5rem 3rem;
    width: 100%;
}

.site-main.wide { max-width: 960px; }

.site-footer {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.85rem;
    border-top: 1px dashed var(--border);
    margin-top: auto;
}

.site-footer nav {
    display: flex;
    justify-content: center;
    gap: 1.4em;
    flex-wrap: wrap;
    margin-bottom: 0.6em;
}

.site-footer a { color: var(--ink-soft); }

.card {
    background: var(--card);
    border-radius: 18px;
    padding: 1.6rem 1.4rem;
    box-shadow: 0 4px 24px rgba(58, 47, 31, 0.08);
    margin: 1.4rem 0;
}

.hero {
    text-align: center;
    padding: 2.5rem 1rem 1rem;
}

.hero .app-icon {
    width: 120px;
    height: 120px;
    border-radius: 26px;
    box-shadow: 0 8px 32px rgba(58, 47, 31, 0.18);
    margin-bottom: 1.2rem;
}

.hero h1 {
    font-size: 2.4rem;
    margin: 0.3em 0 0.2em;
}

.hero .tagline {
    font-size: 1.15rem;
    color: var(--ink-soft);
    margin: 0 0 1.6rem;
}

.hero .tagline-sub {
    font-size: 1rem;
    color: var(--ink-soft);
    margin: -1.2rem 0 0;
}

/* 実画面の並び。狭い画面では横スクロールに逃がして、縦に間延びさせない */
.shots {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin: 2.5rem 0 0;
    overflow-x: auto;
    padding: 0.5rem 1.5rem 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }

.shots img {
    width: 232px;
    flex: 0 0 auto;
    border-radius: 22px;
    scroll-snap-align: center;
    box-shadow: 0 6px 28px rgba(58, 47, 31, 0.16);
    background: var(--card);
}

/* 真ん中の絵巻を主役にする。狭い画面では横並びが崩れるので等倍に戻す */
@media (min-width: 760px) {
    .shots { align-items: center; }
    .shots img:nth-child(2) {
        width: 268px;
        box-shadow: 0 10px 36px rgba(58, 47, 31, 0.22);
    }
}

/* hero だけでなく CTA でも使うので .hero 配下に限定しない */
.badges {
    display: flex;
    justify-content: center;
    gap: 0.8em;
    flex-wrap: wrap;
    margin-top: 1.6rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background: var(--ink);
    color: var(--sepia);
    text-decoration: none;
    padding: 0.75em 1.4em;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.15s ease;
}
.badge:hover { transform: translateY(-2px); color: var(--sepia); }
.badge.soon { background: var(--sepia-dark); color: var(--ink); cursor: default; }
.badge.soon:hover { transform: none; }

/* 4 枚なので 2×2。auto-fit だと 3+1 になって余りが目立つ */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin: 2.5rem 0;
}

@media (min-width: 700px) {
    .features { grid-template-columns: 1fr 1fr; }
}

.feature {
    background: var(--card);
    border-radius: 16px;
    padding: 1.4rem 1.2rem;
    text-align: center;
    box-shadow: 0 3px 16px rgba(58, 47, 31, 0.07);
}

.feature img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.feature h3 { margin: 0.4em 0 0.3em; font-size: 1.05rem; }
.feature p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

.mascots {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin: 2rem 0 0;
}

.mascots img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    animation: bounce 3s ease-in-out infinite;
}
.mascots img:nth-child(2) { animation-delay: 0.4s; }
.mascots img:nth-child(3) { animation-delay: 0.8s; }
.mascots img:nth-child(4) { animation-delay: 1.2s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* auth action pages */
.auth-panel {
    max-width: 480px;
    margin: 2.5rem auto;
    background: var(--card);
    border-radius: 22px;
    padding: 2.4rem 1.8rem;
    text-align: center;
    box-shadow: 0 6px 28px rgba(58, 47, 31, 0.12);
}

.auth-panel .status-icon {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin-bottom: 0.6rem;
}

.auth-panel h1 { font-size: 1.6rem; }

.auth-panel p { color: var(--ink-soft); }

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.8em 1.8em;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(178, 93, 31, 0.25);
    transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--link); color: #fff; transform: translateY(-1px); }
.btn:disabled { background: var(--sepia-dark); color: var(--ink-soft); cursor: not-allowed; box-shadow: none; }

.field {
    margin: 1rem 0;
    text-align: left;
}
.field label {
    display: block;
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 0.3em;
}
.field input {
    width: 100%;
    padding: 0.75em 0.9em;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 122, 58, 0.15);
}

.error { color: #b74d3f; font-size: 0.9rem; margin-top: 0.6rem; }

.legal-toc {
    background: var(--card);
    border-radius: 14px;
    padding: 1rem 1.4rem;
    margin: 1.4rem 0 2rem;
    font-size: 0.92rem;
}
.legal-toc ol { padding-left: 1.4em; margin: 0.4em 0; }
.legal-toc li { margin: 0.15em 0; }

.updated {
    color: var(--ink-soft);
    font-size: 0.85rem;
    margin-top: 0;
}

@media (max-width: 600px) {
    h1 { font-size: 1.6rem; }
    .hero h1 { font-size: 1.9rem; }
    .hero .tagline { font-size: 1rem; }
    .site-main { padding: 1rem 1rem 2rem; }
    .auth-panel { padding: 1.8rem 1.2rem; }
    .card { padding: 1.2rem 1rem; }
    .hero .tagline-sub { font-size: 0.95rem; }
    .shots { gap: 0.9rem; padding: 0.5rem 1rem 1rem; }
    .shots img { width: 200px; }
}

/* キリル文字だけ、日本語フォントの全角グリフに落ちて字送りが崩れる。
   `-apple-system` は Chrome ではキリルまで解決されず、次に並ぶ
   `Hiragino Maru Gothic ProN` の**全角キリル**が使われるため、
   ロシア語のページが「У с л о в и я」と間延びして描画されていた。

   見出しはさらに悪く、`h1,h2,h3` の font-family に欧文フォントが 1 つも無い
   （明朝体の日本語フォントだけ）ので、逃げ場が無い。

   **ロシア語のときだけ**欧文フォントを先に置いて避ける。他の 11 言語は
   フォント指定に触れないので、見た目は 1px も変わらない。
   ラテン文字とタイ文字は元から正しく描画されている（確認済み）。 */
html[lang="ru"] body {
    font-family: "Helvetica Neue", Arial, -apple-system, sans-serif;
}

html[lang="ru"] h1,
html[lang="ru"] h2,
html[lang="ru"] h3 {
    font-family: Georgia, "Times New Roman", serif;
}
