/* ==========================================================================
   HAPEE · shared page components (store buttons, blog, inner pages)
   ========================================================================== */

/* ---------- store buttons ---------- */
.store-row { display: flex; flex-wrap: wrap; gap: 14px; }
.store-btn { display: inline-flex; align-items: center; gap: 14px; padding: 12px 24px 12px 18px; min-width: 200px; border-radius: 18px; background: #000; color: #fff; border: 1.5px solid rgba(255, 255, 255, .28); transition: transform .4s var(--ease-spring), box-shadow .4s, background .3s, border-color .3s; }
.store-btn i { font-size: 30px; line-height: 1; }
.store-btn small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; opacity: .8; line-height: 1.2; }
.store-btn b { display: block; font: 700 19px/1.15 var(--font-display); letter-spacing: -.01em; }
a.store-btn:hover { transform: translateY(-4px) scale(1.02); border-color: var(--gold); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .55); }
.store-btn.apk { background: var(--gold); color: #073a36; border-color: transparent; }
.store-btn.apk small { opacity: .75; }
a.store-btn.apk:hover { box-shadow: 0 18px 40px -8px var(--glow); border-color: transparent; }
.store-btn.web { background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px); }
.store-btn.is-soon { opacity: .6; cursor: not-allowed; border-style: dashed; }
.store-light .store-btn { background: var(--brand); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .store-light .store-btn { background: var(--surface-2); border-color: var(--line); }
.store-light .store-btn.apk { background: var(--gold); color: #073a36; }

/* ---------- blog cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; position: relative; transition: transform .5s var(--ease), box-shadow .5s, border-color .4s; }
.post-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.post-card::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), var(--card-spot), transparent 60%); opacity: 0; transition: opacity .4s; }
.post-card:hover::before { opacity: 1; }
.pc-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.post-card:hover .pc-media img { transform: scale(1.07); }
.pc-ph { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 70% 20%, rgba(244, 196, 48, .45), transparent 50%), linear-gradient(145deg, #127a72, #073a36); }
.pc-emoji { font-size: 74px; filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .3)); transition: transform .8s var(--ease-spring); }
.post-card:hover .pc-emoji { transform: scale(1.18) rotate(-8deg); }
.pc-cat { position: absolute; left: 16px; top: 16px; padding: 6px 14px; border-radius: 999px; background: var(--gold); color: #073a36; font: 800 12px var(--font-body); letter-spacing: .04em; }
.pc-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.pc-meta { display: flex; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.pc-body h3 { font-size: 22px; line-height: 1.25; margin-bottom: 10px; }
.pc-body h3 a:hover { color: var(--accent-text); }
.pc-body p { color: var(--muted); font-size: 15.5px; margin-bottom: 20px; }
.pc-more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--accent-text); }
.pc-more i { transition: transform .3s var(--ease); }
.post-card:hover .pc-more i { transform: translateX(6px); }
.post-card-big { grid-column: 1 / -1; flex-direction: row; }
.post-card-big .pc-media { flex: 1.2; aspect-ratio: auto; min-height: 340px; }
.post-card-big .pc-body { flex: 1; justify-content: center; padding: clamp(28px, 4vw, 56px); }
.post-card-big h3 { font-size: clamp(28px, 3vw, 42px); }
.post-card-big .pc-body p { font-size: 17.5px; }
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .post-grid { grid-template-columns: 1fr; } .post-card-big { flex-direction: column; } .post-card-big .pc-media { min-height: 220px; aspect-ratio: 16/10; } }

/* ---------- blog index layout ---------- */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.blog-layout .post-grid { grid-template-columns: repeat(2, 1fr); }
.blog-aside { position: sticky; top: 96px; display: grid; gap: 22px; }
.aside-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.aside-box h4 { font-size: 17px; margin-bottom: 16px; }
.search-form { display: flex; position: relative; }
.search-form .input { padding-right: 56px; border-radius: 999px; }
.search-form button { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: var(--on-accent); }
.cat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.cat-list a { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; font-weight: 600; transition: background .25s, padding .3s var(--ease); }
.cat-list a:hover, .cat-list a.is-on { background: var(--surface-2); padding-left: 20px; }
.cat-list small { background: var(--surface-2); border-radius: 999px; padding: 0 10px; font-weight: 700; color: var(--muted); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { padding: 6px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; transition: all .25s; }
.tag-cloud a:hover, .tag-cloud a.is-on { background: var(--gold); color: var(--on-accent); border-color: var(--gold); }
.aside-cta { background: linear-gradient(150deg, #0c5a54, #052825); color: #fff; border: 0; text-align: center; }
.aside-cta img { width: 64px; margin: 0 auto 14px; border-radius: 18px; }
.aside-cta p { font-size: 15px; color: #bfe0da; margin-bottom: 18px; }
.empty { text-align: center; padding: 80px 20px; }
.empty .em { font-size: 70px; margin-bottom: 10px; }
@media (max-width: 1060px) { .blog-layout { grid-template-columns: 1fr; } .blog-aside { position: static; grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .blog-layout .post-grid { grid-template-columns: 1fr; } .blog-aside { grid-template-columns: 1fr; } }

/* ---------- article ---------- */
.article-hero { padding-bottom: 0; }
.article-hero h1 { max-width: 22ch; font-size: clamp(34px, 5vw, 66px); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 30px; color: #bfe0da; font-size: 15px; font-weight: 600; }
.article-meta .author { display: flex; align-items: center; gap: 12px; color: #fff; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #073a36; font: 800 18px var(--font-display); overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-meta span i { color: var(--gold); margin-right: 6px; }
.article-cover { position: relative; z-index: 2; margin-top: 56px; margin-bottom: -90px; }
.article-cover figure { margin: 0; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 21 / 9; background: var(--surface-2); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-wrap { padding-top: 130px; }
.article-wrap.no-cover { padding-top: 70px; }
.article-grid { display: grid; grid-template-columns: 64px minmax(0, 760px) 300px; gap: 46px; justify-content: center; align-items: start; }
.share-rail { position: sticky; top: 110px; display: grid; gap: 10px; justify-items: center; }
.share-rail a, .share-rail button { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); transition: all .35s var(--ease-spring); font-size: 18px; }
.share-rail a:hover, .share-rail button:hover { background: var(--gold); color: var(--on-accent); border-color: var(--gold); transform: translateY(-4px) rotate(8deg); }
.share-rail small { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; letter-spacing: .15em; font-size: 11px; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.toc h4 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 12px; border-left: 3px solid var(--line); font-size: 14.5px; font-weight: 600; color: var(--muted); border-radius: 0 10px 10px 0; transition: all .25s; }
.toc a.l3 { padding-left: 26px; font-weight: 500; }
.toc a:hover, .toc a.is-on { color: var(--text); border-left-color: var(--gold); background: var(--surface-2); }
.progress-bar { position: fixed; left: 0; top: 0; height: 4px; width: 0; background: linear-gradient(90deg, var(--gold), #fff4c2); z-index: 200; box-shadow: 0 0 14px var(--gold); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 50px 0 36px; }
.author-box { display: flex; gap: 22px; padding: 30px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin: 40px 0; }
.author-box .avatar { width: 72px; height: 72px; font-size: 28px; }
.author-box h4 { margin-bottom: 4px; } .author-box p { margin: 0; color: var(--muted); font-size: 15.5px; }
.faq-block { margin: 50px 0; }
.faq-block h2 { font-size: 30px; margin-bottom: 20px; }
.related { background: var(--bg-2); }
.rail-side { position: sticky; top: 100px; display: grid; gap: 22px; }
@media (max-width: 1180px) { .article-grid { grid-template-columns: 56px minmax(0, 1fr); } .rail-side { grid-column: 1 / -1; position: static; grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .article-grid { grid-template-columns: 1fr; } .share-rail { position: static; display: flex; justify-content: center; } .share-rail small { display: none; } .rail-side { grid-template-columns: 1fr; } .author-box { flex-direction: column; } .article-cover figure { aspect-ratio: 16/10; } }

/* ---------- inner page blocks ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.feature-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.feature { padding: 30px; }
.feature .f-emoji { width: 62px; height: 62px; display: grid; place-items: center; font-size: 32px; background: var(--surface-2); border-radius: 20px; margin-bottom: 20px; transition: transform .6s var(--ease-spring); }
.feature:hover .f-emoji { transform: rotate(-10deg) scale(1.12); }
.feature h3 { font-size: 21px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 1000px) { .feature-grid, .feature-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-grid, .feature-grid.cols-2, .feature-grid.cols-4 { grid-template-columns: 1fr; } }
.timeline { position: relative; display: grid; gap: 22px; padding-left: 40px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: linear-gradient(var(--gold), transparent); }
.tl-item { position: relative; }
.tl-item::before { content: ''; position: absolute; left: -38px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); border: 4px solid var(--bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 28%, transparent); }
.tl-item h3 { font-size: 20px; margin-bottom: 4px; } .tl-item p { margin: 0; color: var(--muted); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(26px, 4vw, 48px); box-shadow: var(--shadow-md); }
.form-card h2 { font-size: 30px; }
.contact-cards { display: grid; gap: 16px; }
.contact-card { display: flex; gap: 18px; align-items: center; padding: 22px 24px; }
.contact-card i { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; background: var(--surface-2); font-size: 22px; color: var(--accent-text); flex-shrink: 0; }
.contact-card b { display: block; font: 700 17px var(--font-display); } .contact-card span { color: var(--muted); font-size: 15px; }
.legal { max-width: 800px; margin-inline: auto; }
.legal h2 { font-size: 26px; margin-top: 2em; } .legal ul { padding-left: 1.3em; } .legal li { margin-bottom: .5em; color: var(--muted); } .legal p { color: var(--muted); }
.big-num { font: 800 clamp(60px, 9vw, 120px)/1 var(--font-display); letter-spacing: -.06em; }
.error-wrap { text-align: center; padding: 40px 0 120px; }
.error-wrap .code { font: 800 clamp(110px, 22vw, 260px)/.9 var(--font-display); letter-spacing: -.07em; color: var(--gold); display: flex; justify-content: center; align-items: center; gap: .04em; }
.error-wrap .code svg { width: .72em; height: .72em; color: var(--gold); }
.error-wrap .code .eye { fill: currentColor; transform-box: fill-box; transform-origin: center; animation: blink 4s infinite; }
.cta-banner { border-radius: var(--r-xl); padding: clamp(36px, 5vw, 70px); background: linear-gradient(140deg, #0c5a54, #052825); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; box-shadow: var(--shadow-lg); }
.cta-banner h2 { margin: 0; max-width: 20ch; } .cta-banner .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stat-pill-row { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 34px; }
.stat-pill-row div b { display: block; font: 800 40px/1 var(--font-display); color: var(--gold); letter-spacing: -.04em; } .stat-pill-row div span { font-size: 14px; color: #9cc3bc; font-weight: 600; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.release-card { padding: 28px 32px; display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.release-card .rc-meta { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.release-card .rc-meta i { color: var(--accent-text); margin-right: 5px; }
.hash { font: 12.5px 'Consolas', monospace; color: var(--muted); word-break: break-all; }
