/* rands-app.com ------------------------------------------------------------
   依存なしの素の CSS。色は :root のトークン、アプリページは --accent で差し替え。
   論理プロパティ（inline-start 等）を使っているので RTL（ar/he/ur）でも崩れない。
--------------------------------------------------------------------------- */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f2f1ec;
  --ink: #17171a;
  --ink-2: #5a5a60;
  --ink-3: #8e8e93;
  --line: rgba(23, 23, 26, 0.08);
  --brand: #4a56d6;
  --brand-ink: #ffffff;
  --accent: #4a56d6;
  --accent-dark: #262a5c;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(23,23,26,.08);
  --shadow-lg: 0 24px 60px rgba(23,23,26,.18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue",
          "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans", Arial, sans-serif;
  --wrap: 1120px;
  --narrow: 720px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111114;
    --surface: #1b1b20;
    --surface-2: #232329;
    --ink: #f3f3f5;
    --ink-2: #b4b4bb;
    --ink-3: #7c7c85;
    --line: rgba(255,255,255,0.09);
    --brand: #7b86ff;
    --brand-ink: #0e0f2a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .lead { word-break: auto-phrase; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { max-width: var(--narrow); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section-title { text-align: center; margin-bottom: 1.5em; }

/* --- ヘッダ --- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand img { border-radius: 7px; }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 22px; margin-inline-start: auto; }
.site-nav a { color: var(--ink-2); font-weight: 500; font-size: .95rem; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.lang-switch select, .footer-lang select, .menu-lang select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: .9rem; color: var(--ink-2);
  background: var(--surface-2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><path fill='%238e8e93' d='M7 10l5 5 5-5z'/></svg>") no-repeat;
  background-position: right 10px center;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 30px 6px 14px; max-width: 180px;
}
[dir="rtl"] .lang-switch select, [dir="rtl"] .footer-lang select, [dir="rtl"] .menu-lang select { background-position: left 10px center; padding: 6px 14px 6px 30px; }

/* 狭い画面: ナビと言語切替をメニューボタンの中へ */
.menu-button {
  display: none; margin-inline-start: auto; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-button .icon-close { display: none; }
.menu-button[aria-expanded="true"] .icon-open { display: none; }
.menu-button[aria-expanded="true"] .icon-close { display: block; }
.menu-panel { display: none; border-top: 1px solid var(--line); background: var(--bg); }
.menu-panel .wrap { display: block; min-height: 0; padding: 4px 0 18px; }
.menu-nav { display: flex; flex-direction: column; }
.menu-nav a { display: block; padding: 12px 4px; color: var(--ink); font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.menu-nav a:hover { text-decoration: none; color: var(--brand); }
.menu-lang { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 4px 0; color: var(--ink-2); font-size: .95rem; }
.menu-lang select { max-width: 60%; }
@media (max-width: 880px) {
  .site-nav, .lang-switch { display: none; }
  .menu-button { display: inline-flex; }
  .menu-panel:not([hidden]) { display: block; }
}

/* --- ヒーロー（トップ） --- */
.hero { padding: 72px 0 56px; }
.hero-home { text-align: center; }
.hero-home .lead { margin-inline: auto; }
.hero-icons { display: flex; justify-content: center; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-icons img { width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--shadow); transition: transform .2s; }
.hero-icons a:hover img { transform: translateY(-4px) scale(1.04); }

/* --- アプリ一覧カード --- */
.apps { padding: 24px 0 72px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.app-card {
  display: flex; gap: 18px; padding: 24px; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.app-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.app-icon { width: 80px; height: 80px; border-radius: 18px; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.app-icon.lg { width: 96px; height: 96px; border-radius: 22px; }
.app-card h3 { margin: 4px 0 4px; font-size: 1.25rem; }
.app-sub { color: var(--ink-2); margin-bottom: 12px; font-size: .95rem; }
.more { color: var(--brand); font-weight: 600; font-size: .92rem; }
.about-blurb { padding: 56px 0 80px; text-align: center; }
.about-blurb p { margin-inline: auto; max-width: 60ch; color: var(--ink-2); }
.link-arrow { font-weight: 600; }

/* --- ボタン --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px;
  background: var(--surface-2); color: var(--ink); border-radius: 999px; font-weight: 600;
  border: 1px solid var(--line); transition: transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
/* 送れない状態（枚数・容量の問題があるとき）の送信ボタン */
.btn:disabled, .btn:disabled:hover {
  opacity: .45; cursor: not-allowed; transform: none; box-shadow: none;
}
.btn-store { background: var(--ink); color: var(--bg); border-color: transparent; padding: 14px 26px; font-size: 1.02rem; }
@media (prefers-color-scheme: dark) { .btn-store { background: #fff; color: #111; } }

/* --- スクリーンショット（端末風の枠） --- */
.shot { background: #000; box-shadow: var(--shadow-lg); }
.shot-iphone { border-radius: 9.5% / 4.4%; border: 5px solid #16161a; }
.shot-ipad { border-radius: 3.2% / 4.3%; border: 6px solid #16161a; }
.shot-watch { border-radius: 24%; border: 5px solid #16161a; }

/* --- アプリ詳細：ヒーロー --- */
.hero-app {
  background:
    radial-gradient(60% 80% at 80% 20%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    var(--bg);
  padding: 56px 0 0; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; }
.hero-copy { padding-bottom: 64px; }
.app-ident { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.app-name { font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0; line-height: 1.2; }
.platforms { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.platform-badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .01em;
  background: color-mix(in srgb, var(--pf) 20%, var(--surface));
  color: var(--ink); border: 1px solid color-mix(in srgb, var(--pf) 42%, transparent);
}
.pf-iphone { --pf: #3b82f6; }   /* iPhone: 青 */
.pf-ipad   { --pf: #8b5cf6; }   /* iPad: 紫 */
.pf-watch  { --pf: #14b8a6; }   /* Apple Watch: ティール */
.pf-other  { --pf: var(--accent); }
.hero-app h1 { max-width: 20ch; font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.hero-app .lead { font-size: 1.1rem; }
.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.price { color: var(--ink-2); font-size: .9rem; }
.badge {
  display: inline-block; margin-top: 22px; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--ink);
}
.hero-shot { display: flex; justify-content: center; align-items: flex-end; }
.hero-shot .shot { width: min(340px, 100%); margin-bottom: -60px; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  /* スマホは左寄せ（App Store の見え方に近い） */
  .hero-copy { padding-bottom: 20px; }
  .hero-app h1, .hero-app .lead { max-width: none; }
  /* 狭い画面では表紙の画像は出さない（すぐ下にスクショが並ぶため） */
  .hero-shot { display: none; }
}

/* --- アプリ詳細：App Store のスクショを並べる箱 --- */
.shots { padding: 96px 0 24px; }
.shots-title { font-size: 1.05rem; color: var(--ink-2); margin: 0 0 14px; font-weight: 600; }
.shots-box { position: relative; padding: 4px 0; }
.shots-row {
  --gap: 8px; --per: 3.4;   /* --per = 一度に見える枚数。端数にして次の1枚を必ず見切れさせる */
  display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 0 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.shots-row.row-iphone.wide { --per: 2.3; }   /* 横向きのスクショは大きく。
   1枚だと元画像（横720px）より大きく引き伸ばされて粗くなるので2枚にしている */
.shots-row.row-ipad { --per: 2.3; }
.shots-row.row-ipad.wide { --per: 2.3; }
.shots-row.row-watch { --per: 4.4; }
.shots-row::-webkit-scrollbar { display: none; }
.shots-row .shot {
  flex: none; height: auto; scroll-snap-align: start; border-radius: 16px;
  /* 箱の幅に対する割合で決めるので、どの画面幅でも端の1枚が必ず見切れる */
  width: calc((100% - var(--gap) * (var(--per) - 1)) / var(--per));
}
.shots-row .shot-watch { border-radius: 22px; }
/* 端で切れている部分をぼかす（続きがあることを見せる）。
   端まで来ている側は JS が at-start / at-end を付けて消す。 */
.shots-box::before, .shots-box::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 18px; pointer-events: none;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 1; transition: opacity .2s;
}
.shots-box::before {
  inset-inline-start: 0;
  -webkit-mask-image: linear-gradient(to right, #000 20%, transparent);
  mask-image: linear-gradient(to right, #000 20%, transparent);
}
.shots-box::after {
  inset-inline-end: 0;
  -webkit-mask-image: linear-gradient(to left, #000 20%, transparent);
  mask-image: linear-gradient(to left, #000 20%, transparent);
}
[dir="rtl"] .shots-box::before { -webkit-mask-image: linear-gradient(to left, #000 20%, transparent); mask-image: linear-gradient(to left, #000 20%, transparent); }
[dir="rtl"] .shots-box::after { -webkit-mask-image: linear-gradient(to right, #000 20%, transparent); mask-image: linear-gradient(to right, #000 20%, transparent); }
.shots-box.at-start::before, .shots-box.at-end::after { opacity: 0; }

/* iPad / Apple Watch: 開いたときに読み込む */
.device-details { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.device-details > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; cursor: pointer; font-weight: 600; list-style: none;
}
.device-details > summary::-webkit-details-marker { display: none; }
.device-details[open] > summary { border-bottom: 1px solid var(--line); }

.device-details .shots-box { padding: 18px 22px 10px; }
.chev { width: 10px; height: 10px; border-inline-end: 2px solid var(--ink-3); border-block-end: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; flex: none; }
details[open] > summary .chev { transform: rotate(-135deg); }
@media (max-width: 820px) {
  .shots { padding-top: 28px; }
  .shots-row { --per: 1.4; }
  .shots-row.row-iphone.wide { --per: 1.15; }
  .shots-row.row-ipad { --per: 1.25; }
  .shots-row.row-ipad.wide { --per: 1.1; }
  .shots-row.row-watch { --per: 1.5; }
  .device-details .shots-box { padding-inline: 16px; }
  .platform-badge { padding: 2px 9px; font-size: .7rem; }
}

/* --- 説明（App Store の説明文から） --- */
.details { padding: 64px 0; }
.details .intro { margin: 0 auto 40px; color: var(--ink-2); text-align: center; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.detail-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px;
}
.detail-card > summary { display: block; list-style: none; cursor: default; }
.detail-card > summary::-webkit-details-marker { display: none; }
.detail-card h3 { font-size: 1.05rem; margin-bottom: .6em; padding-inline-start: 12px; border-inline-start: 3px solid var(--accent); }
.detail-card > summary .chev { display: none; }
/* 画面が狭いときだけタップで開閉する（JS が open を付け外しする） */
@media (max-width: 820px) {
  .detail-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
  .detail-card > summary h3 { margin-bottom: 0; }
  .detail-card > summary .chev { display: block; }
  .detail-card:not([open]) { padding-bottom: 20px; }
  .detail-body { padding-top: 14px; }
}
.detail-card p, .detail-card li { font-size: .95rem; color: var(--ink-2); }
.detail-card ul, .detail-card ol { margin: 0; padding-inline-start: 1.3em; }
.detail-card ul + ul, .detail-card ol + ol { margin-top: -1px; }
.detail-card li { margin: .2em 0; }
.detail-card ul + p, .detail-card ol + p { margin-top: .8em; }

/* --- CTA --- */
.cta-band { padding: 72px 0 96px; text-align: center; }
.cta-band .app-icon { margin: 0 auto 20px; }
.cta-band p { color: var(--ink-2); }

/* --- 固定ページ --- */
.prose { padding: 56px 0 80px; }
.prose h1 { margin-bottom: .6em; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.6em; }
.prose li { margin: .3em 0; }
.prose .updated { color: var(--ink-3); font-size: .9rem; }
.legal-notice {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; font-size: .9rem; color: var(--ink-2);
}
.legal-notice a { margin-inline-start: 10px; white-space: nowrap; }
.help-app a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .95rem; }
.help-app img { border-radius: 7px; }
.help-shot { margin: 24px 0; }
.help-shot .shot { width: min(300px, 100%); }
.form-note { color: var(--ink-3); font-size: .9rem; margin-top: -4px; }
.email-alt { color: var(--ink-2); font-size: .95rem; margin-top: 2em; }
.cta-contact { margin-top: 18px; font-size: .92rem; }
.cta-contact a { color: var(--ink-2); }
/* 広告の通報フォーム */
.report-form { margin: 28px 0; display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field-label { font-weight: 600; }
.field-help { color: var(--ink-3); font-size: .88rem; }
.field-note { color: var(--ink-3); font-size: .88rem; }
.report-form select, .report-form textarea, .report-form input[type="email"] {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
}
.report-form textarea { resize: vertical; min-height: 7em; }
.report-form input[type="file"] { font-size: .9rem; color: var(--ink-2); }
.report-form select:focus-visible, .report-form textarea:focus-visible,
.report-form input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* 選んだ画像のプレビュー（通報フォーム） */
.shot-previews {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.shot-preview {
  position: relative; width: 96px;
  border-radius: 10px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.shot-preview img { display: block; width: 100%; height: 96px; object-fit: cover; }
.shot-preview.is-bad { border-color: #ff3b30; }
.shot-preview-size {
  display: block; padding: 4px 6px;
  font-size: .72rem; color: var(--ink-3); text-align: center;
}
.shot-preview-remove {
  position: absolute; inset-block-start: 4px; inset-inline-end: 4px;
  width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .62); color: #fff;
  font-size: 15px; line-height: 24px; cursor: pointer;
}
.shot-preview-remove:hover { background: rgba(0, 0, 0, .8); }
.shot-preview-remove:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
[data-shot-error] span { display: block; }
[data-shot-error] span + span { margin-block-start: 4px; }

/* 送信完了ページ */
.form-done { text-align: center; }
.form-done-mark { color: #34c759; margin-block-end: 4px; }
.form-done-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-block-start: 26px; }

.form-sent, .form-error {
  border-radius: 14px; padding: 14px 18px; border: 1px solid var(--line); background: var(--surface);
}
.form-sent { border-color: color-mix(in srgb, #34c759 50%, transparent); }
.form-error { border-color: color-mix(in srgb, #ff3b30 50%, transparent); }
.app-list { display: grid; gap: 10px; margin: 28px 0; }
.app-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; }
.app-row:hover { text-decoration: none; box-shadow: var(--shadow); }
.app-row .app-icon { width: 56px; height: 56px; border-radius: 13px; }
.app-row small { color: var(--ink-2); }

/* --- 言語選択 / 404 --- */
.lang-page { padding: 72px 0; text-align: center; }
.lang-page .brand { justify-content: center; font-size: 1.4rem; margin-bottom: 28px; }
.lang-page .brand img { border-radius: 10px; }
.lang-page h1 { font-size: 1.6rem; }
.lang-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.lang-list a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.lang-list a:hover, .lang-list a.is-match { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* --- フッタ --- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; background: var(--surface-2); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--ink-2); margin-top: 12px; }
.footer-nav h2, .footer-lang h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: .8em; }
.footer-nav a { display: block; color: var(--ink-2); padding: 3px 0; }
.footer-nav a:hover { color: var(--ink); }
.copyright { margin: 40px 0 0; color: var(--ink-3); font-size: .85rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  html { scroll-behavior: auto; }
}
