:root {
    --bg: #ffffff;
    --bg-soft: #f7f6f3;
    --card: #ffffff;
    --ink: #1f2328;
    --ink-2: #3b434c;
    --muted: #59636e;
    --line: #e5e3de;
    --line-strong: #d4d1ca;
    --green: #1b6b43;
    --green-dark: #14532f;
    --green-tint: #eaf4ee;
    --coral: #c4362f;
    --coral-dark: #a32b25;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(31, 35, 40, .05), 0 4px 16px rgba(31, 35, 40, .06);
    --shadow-lift: 0 2px 4px rgba(31, 35, 40, .06), 0 12px 28px rgba(31, 35, 40, .10);
    --head: 64px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.22; margin: 0 0 .5em; color: var(--ink); font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid rgba(27, 107, 67, .45); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 880px; }
.wrap-article { max-width: 820px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; top: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 20px; height: var(--head); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { width: 34px; height: 34px; }
.brand span { font: 800 20px/1 var(--font); letter-spacing: -.02em; }
.brand b { color: var(--green); font-weight: 800; margin-left: 3px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.nav a[aria-current] { color: var(--green); background: var(--green-tint); font-weight: 600; }
.nav .nav-play { background: var(--coral); color: #fff; font-weight: 600; padding: 8px 16px; margin-right: 8px; }
.nav .nav-play:hover { background: var(--coral-dark); color: #fff; }
.header-tools { display: flex; align-items: center; gap: 4px; }
.lang-dd { position: relative; }
.lang-dd summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); border: 1px solid var(--line); }
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary:hover { background: var(--bg-soft); }
.lang-dd svg { width: 16px; height: 16px; fill: currentColor; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift); min-width: 170px; }
.dd-menu a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; }
.dd-menu a:hover, .dd-menu a[aria-current] { background: var(--bg-soft); }
.menu-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; padding: 12px 10px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.menu-btn:hover { background: var(--bg-soft); }

@media (max-width: 1080px) {
    .header-in { gap: 8px; }
    .header-tools { margin-left: auto; gap: 8px; }
    .menu-btn { display: flex; }
    .nav { display: none; position: absolute; left: 0; right: 0; top: var(--head); margin: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(31, 35, 40, .10); }
    .nav a { padding: 12px 14px; font-size: 16px; }
    .nav .nav-play { margin: 0 0 6px; text-align: center; padding: 12px 16px; }
    .nav-open .nav { display: flex; }
    .nav-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-open .menu-btn span:nth-child(2) { opacity: 0; }
    .nav-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Game */
.game-sec { background: var(--bg-soft); padding: 20px 24px 24px; border-bottom: 1px solid var(--line); }
.game-wrap { max-width: 1200px; margin: 0 auto; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: var(--shadow-lift); background: #fbd8a6; }
.game-frame { height: calc(100vh - var(--head) - 44px); height: calc(100svh - var(--head) - 44px); min-height: 520px; max-height: 900px; }
.game-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) {
    .game-sec { padding: 0; border-bottom: 0; }
    .game-wrap { border-radius: 0; border: 0; box-shadow: none; }
    /* ShareThis pins a 40px share bar to the bottom of small screens. */
    .game-frame { height: calc(100vh - var(--head) - 41px); height: calc(100svh - var(--head) - 41px); min-height: 460px; }
    body { padding-bottom: 40px; }
}

/* Hero under the game */
.hero { padding: 56px 0 48px; text-align: center; background: var(--bg); }
.hero h1 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 800; letter-spacing: -.025em; margin-bottom: 16px; }
.hero-lead { font: 400 18px/1.65 var(--font); color: var(--ink-2); max-width: 68ch; margin: 0 auto 28px; letter-spacing: 0; }
.btn, .gpt_but { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--coral); color: #fff; font: 600 17px/1 var(--font); padding: 15px 30px; border-radius: 12px; text-decoration: none; box-shadow: 0 1px 2px rgba(31, 35, 40, .12), 0 6px 16px rgba(196, 54, 47, .22); transition: background .15s, transform .15s; }
.btn:hover, .gpt_but:hover { background: var(--coral-dark); color: #fff; transform: translateY(-1px); }

/* Ad slots */
.ad-slot { max-width: 1200px; margin: 0 auto; padding: 0 24px; text-align: center; }
.ad-slot > div:not(:empty) { margin: 32px auto; }

/* Sections */
.sec { padding: 72px 0; }
.sec-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-title { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; text-align: center; margin-bottom: 14px; }
.sec-sub { text-align: center; color: var(--muted); max-width: 68ch; margin: 0 auto 36px; font-size: 18px; }
.more { text-align: center; margin: 32px 0 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.more-link { display: inline-block; font-weight: 600; font-size: 16px; text-decoration: none; padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; color: var(--green); }
.more-link::after { content: " →"; }
.more-link:hover { border-color: var(--green); background: var(--green-tint); color: var(--green-dark); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { display: flex; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.step-n { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--green-tint); color: var(--green); font: 700 17px/36px var(--font); text-align: center; }
.step .number { font: 700 18px/1.35 var(--font); margin: 5px 0 6px; }
.step p { margin: 0 0 .4em; color: var(--ink-2); }
.step p:last-child { margin-bottom: 0; }
.step-outro { text-align: center; margin-top: 26px; font-weight: 600; }

.fruit-chain { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(11, 1fr); gap: 10px; max-width: 1140px; }
.fruit-chain li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 4px 10px; text-align: center; box-shadow: var(--shadow); }
.fruit-chain li.droppable { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green), var(--shadow); }
.fruit-chain img { width: 56px; height: 56px; object-fit: contain; }
.fc-n { position: absolute; top: 6px; left: 8px; font: 600 12px/1 var(--font); color: var(--muted); }
.fc-name { display: block; font-weight: 600; font-size: 13px; margin-top: 6px; color: var(--ink); }
.chain-legend { text-align: center; color: var(--muted); font-size: 15px; margin-top: 16px; }
.chain-legend .dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--green); vertical-align: -2px; margin-right: 4px; }
@media (max-width: 980px) { .fruit-chain { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 520px) { .fruit-chain { grid-template-columns: repeat(4, 1fr); gap: 8px; } .fruit-chain img { width: 44px; height: 44px; } .fc-name { font-size: 12px; } }

.faq { display: grid; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item summary h3 { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.faq-item summary:hover h3 { color: var(--green); }
.faq-a { padding: 0 22px 20px; color: var(--ink-2); }
.faq-a p:last-child { margin: 0; }

.tips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: tip; }
.tip { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); counter-increment: tip; }
.tip::before { content: counter(tip, decimal-leading-zero); display: block; font: 700 13px/1 var(--font); letter-spacing: .08em; color: var(--green); margin-bottom: 12px; }
.tip h3 { font-size: 18px; }
.tip p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 900px) { .tips { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tips { grid-template-columns: 1fr; } }

.about-text { font-size: 18px; text-align: left; color: var(--ink-2); }
.share-buttons { margin-top: 24px; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-lift); color: var(--ink); }
.card-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--green); }
.card strong { font: 700 18px/1.3 var(--font); letter-spacing: -.01em; margin: 8px 0 8px; }
.card:hover strong { color: var(--green); }
.card-text { color: var(--muted); font-size: 15px; line-height: 1.55; }
@media (max-width: 980px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

.frames_block { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 1000px; margin: 0 auto; }
.we_but { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; text-decoration: none; color: var(--muted); box-shadow: var(--shadow); font-size: 14px; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
.we_but b { color: var(--ink); font-size: 16px; font-weight: 600; }
.we_but:hover { color: var(--muted); border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.wemage { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
@media (max-width: 760px) { .frames_block { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .frames_block { grid-template-columns: 1fr; } }

.langs { padding: 56px 0; }
.lang-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.lang_but { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 18px; text-decoration: none; color: var(--ink); font-weight: 500; }
.lang_but:hover { border-color: var(--green); color: var(--green); }
.flag { width: 20px; height: auto; }

/* Articles */
.article { padding: 40px 0 64px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green); text-decoration: underline; }
.article h1 { font-size: clamp(32px, 4.8vw, 46px); font-weight: 800; letter-spacing: -.025em; margin-bottom: 16px; }
.lead { font-size: 20px; line-height: 1.6; color: var(--ink-2); max-width: 72ch; }
.meta { font-size: 14px; color: var(--muted); }
.play-cta { display: flex; align-items: center; gap: 16px; background: var(--green-tint); border: 1px solid #cfe5d8; border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink); margin: 26px 0 36px; }
.play-cta img { width: 52px; height: 52px; flex-shrink: 0; }
.play-cta > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; line-height: 1.35; color: var(--ink-2); font-size: 15px; }
.play-cta strong { font: 700 18px/1.25 var(--font); color: var(--ink); }
.play-cta .btn { font-size: 16px; padding: 12px 22px; }
.play-cta:hover { color: var(--ink); }
.play-cta:hover .btn { background: var(--coral-dark); }
.prose { max-width: 72ch; }
.prose > p, .prose li { color: var(--ink-2); }
.prose h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 20px; margin: 1.5em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--green); }
.prose strong { color: var(--ink); }
.prose .faq { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 16px; }
.prose th, .prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); color: var(--ink); }
.prose th { background: var(--bg-soft); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.prose tr:last-child td { border-bottom: 0; }
.fruit-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.fruit-cell img { width: 34px; height: 34px; }
.inline-fruit { width: 40px; height: 40px; vertical-align: middle; margin-right: 10px; }
@media (max-width: 600px) { .lead { font-size: 18px; } .play-cta .btn { padding: 11px 16px; } }

/* Legal pages */
.legal { padding: 44px 0 72px; }
.legal .container, .legal .fb-wrap { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.legal .row, .legal [class*="col-"] { display: block; width: auto; margin: 0; padding: 0; }
.legal section { padding: 0; }
.legal .page-next-level { text-align: center; margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); color: var(--muted); }
.legal .page-next-level h1, .legal .fb-wrap h1 { font-size: clamp(32px, 4.8vw, 44px); font-weight: 800; letter-spacing: -.025em; color: var(--ink); }
.legal .text-dark { color: var(--ink); font-weight: 600; }
.legal h2, .legal h3 { margin-top: 1.5em; font-size: 22px; }
.legal p, .legal li, .legal address { color: var(--ink-2); }
.legal address { font-style: normal; margin-bottom: 1em; }
.legal .btn-primary { display: inline-block; margin-top: 10px; background: var(--green); color: #fff; padding: 11px 20px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.legal .btn-primary:hover { background: var(--green-dark); color: #fff; }

/* Footer */
.site-footer { background: #1f2328; color: #c9d1d9; padding: 56px 0 32px; margin-top: 0; }
.site-footer a { color: #c9d1d9; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-top { display: grid; grid-template-columns: 1.3fr 1.5fr 1fr 1fr; gap: 32px; }
.foot-brand .brand { color: #fff; margin-bottom: 14px; }
.foot-brand .brand:hover { color: #fff; text-decoration: none; }
.foot-brand .brand b { color: #7fd6a2; }
.foot-brand p { color: #b3bcc6; font-size: 15px; max-width: 36ch; }
.foot-col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.foot-title { font: 700 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: .08em; color: #fff; margin: 0 0 6px; }
.foot-note { color: #9ea7b1; font-size: 13px; margin: 32px 0 0; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; }
.foot-note + .foot-note { border-top: 0; padding-top: 0; margin-top: 8px; }
.foot-copy { color: #9ea7b1; font-size: 13px; margin: 8px 0 0; }
@media (max-width: 860px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-top { grid-template-columns: 1fr; } }

@media (min-width: 900px) {
    .prose, .legal .container, .faq-a, .about-text { font-size: 18px; }
    .lead { font-size: 21px; }
}

@media (max-width: 600px) {
    body { font-size: 17px; }
    .wrap { padding: 0 18px; }
    .sec { padding: 52px 0; }
    .hero { padding: 40px 0 36px; text-align: left; }
    .hero-lead { font-size: 17px; }
    .sec-sub { text-align: left; font-size: 17px; }
    .step { padding: 16px; gap: 14px; }
}
