/* ホーム画面に追加の案内(2026-10-20)。みんなのナマペディアとがんばるナマケモノで同じファイルを使う。
   色は両アプリ共通の名前(--color-primary など)を使うので、アプリごとの色になる */

/* ---- 下から出るおすすめ ---- */
.install-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    margin: 0 auto;
    max-width: 560px;
    padding: 18px 18px calc(16px + env(safe-area-inset-bottom));
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 28px rgba(43, 33, 24, .16);
    color: var(--color-text);
    animation: install-sheet-in var(--dur-3, .5s) var(--ease-out, cubic-bezier(.2, .8, .2, 1)) both;
}
.install-sheet[hidden] { display: none; }
.install-sheet.is-static { animation: none; }
.install-sheet.is-leaving { animation: install-sheet-out var(--dur-2, .3s) cubic-bezier(.32, 0, .67, 0) both; }
@keyframes install-sheet-in { from { transform: translateY(100%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes install-sheet-out { to { transform: translateY(100%); opacity: 0; } }

.install-sheet__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border: 0;
    background: none;
    color: var(--color-text-muted);
    font-size: 18px;
    border-radius: 50%;
}
.install-sheet__head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; padding-right: 32px; }
.install-sheet__icon { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 2px 6px rgba(43, 33, 24, .18); flex: none; }
.install-sheet__title { font-weight: 800; font-size: 16px; line-height: 1.4; margin: 0; }
.install-sheet__lead { font-size: 13px; color: var(--color-text-muted); margin: 2px 0 0; }
.install-sheet__merits { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; font-size: 14px; }
.install-sheet__merits i { color: var(--color-primary); width: 1.4em; text-align: center; }

/* 端末ごとに出す部分を切り替える(data-device はJSが付ける) */
.install-sheet [data-for] { display: none; }
.install-sheet[data-device="ios"] [data-for~="ios"],
.install-sheet[data-device="ios26"] [data-for~="ios26"],
.install-sheet[data-device="ios-other"] [data-for~="ios-other"],
.install-sheet[data-device="android"] [data-for~="android"],
.install-sheet[data-device="android-samsung"] [data-for~="android-samsung"],
.install-sheet[data-device="inapp"] [data-for~="inapp"] { display: block; }
.install-sheet [hidden] { display: none !important; }

.install-sheet__steps {
    background: var(--color-surface-alt);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 0 0 12px;
    font-size: 14px;
}
.install-sheet__steps ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.install-sheet__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.install-sheet__actions .btn { flex: 1 1 auto; }
.install-sheet__actions [data-install-prompt] { flex: 1 1 100%; }
.install-sheet__later { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; }
.install-sheet__later button { border: 0; background: none; color: var(--color-text-muted); padding: 6px 2px; text-decoration: underline; }

/* 手順の中に出すボタンの見本(本物と同じ形の小さな印) */
.ig-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 1.9em;
    height: 1.9em;
    padding: 0 .45em;
    border-radius: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: #0A7AFF;
    font-size: .9em;
    vertical-align: -.35em;
    white-space: nowrap;
}
.ig-key--android { color: var(--color-text); }
.ig-key--text { color: var(--color-text); font-weight: 700; }

/* ---- 案内ページ ---- */
.ig-hero {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 20px;
    border-radius: 20px;
    background: var(--color-surface-alt);
    margin-bottom: 20px;
}
.ig-hero__icon { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 4px 12px rgba(43, 33, 24, .18); flex: none; }
.ig-hero h1 { margin: 0 0 4px; }
.ig-hero p { margin: 0; color: var(--color-text-muted); font-size: 14px; }

.ig-merits { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 24px; }
.ig-merit {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--color-text-muted);
}
/* 2列で奇数枚のとき、最後の1枚は横いっぱいにして余白を作らない */
.ig-merit:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ig-merit strong { display: block; color: var(--color-text); font-size: 15px; margin-bottom: 2px; }
.ig-merit i { color: var(--color-primary); margin-right: 4px; }

.ig-device-note { font-size: 13px; color: var(--color-text-muted); margin-bottom: 8px; }
.ig-device-note strong { color: var(--color-text); }

.ig-guide {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
}
.ig-guide h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.ig-guide__sub { font-size: 13px; color: var(--color-text-muted); margin: 0 0 14px; }
.ig-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: ig; }
.ig-step { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; counter-increment: ig; }
.ig-step::before {
    content: counter(ig);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ig-step__text { font-size: 15px; line-height: 1.6; padding-top: 3px; }
.ig-step__note { display: block; font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }

/* 画面の見本(ブラウザの帯・メニュー・ホーム画面) */
.ig-mock {
    grid-column: 2;
    margin-top: 8px;
    max-width: 300px;
    border-radius: 14px;
    background: #F2F2F7;
    border: 1px solid #DCDCE2;
    padding: 10px 12px;
    font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
    font-size: 13px;
    color: #1C1C1E;
}
.ig-mock--dark { background: #2B2B2E; border-color: #2B2B2E; color: #F2F2F7; }
.ig-mock--android { background: #fff; border-color: #DADCE0; font-family: Roboto, "Noto Sans JP", sans-serif; }
.ig-bar { display: flex; justify-content: space-around; align-items: center; color: #0A7AFF; font-size: 17px; }
.ig-bar--android { justify-content: space-between; color: #5F6368; }
.ig-url {
    flex: 1;
    margin: 0 8px;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(118, 118, 128, .14);
    color: #3C3C43;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ig-bar--android .ig-url { background: #F1F3F4; border-radius: 999px; text-align: left; }
.ig-menu { display: grid; gap: 1px; background: #DCDCE2; border-radius: 10px; overflow: hidden; }
.ig-menu > div { background: #fff; padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ig-menu i { color: #3C3C43; width: 1.2em; text-align: center; }
.ig-mock--android .ig-menu { background: transparent; gap: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.ig-mock--android .ig-menu > div { justify-content: flex-start; gap: 14px; }
.ig-dim { opacity: .45; }
.ig-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 700; }
.ig-sheet-head span { color: #0A7AFF; font-weight: 400; }
.ig-sheet-head .ig-add { color: #0A7AFF; font-weight: 700; }
.ig-switch { width: 36px; height: 22px; border-radius: 999px; background: #34C759; position: relative; flex: none; }
.ig-switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.ig-home { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; justify-items: center; padding: 6px 0; }
.ig-home__app { width: 44px; height: 44px; border-radius: 11px; background: #C7C7CC; }
.ig-home__me { display: grid; justify-items: center; gap: 3px; font-size: 10px; white-space: nowrap; }
.ig-home__me img { width: 44px; height: 44px; border-radius: 11px; }

/* 押す所の印。3回だけ輪が広がって止まる */
.ig-hit { position: relative; border-radius: 10px; box-shadow: 0 0 0 2px var(--color-accent); }
.ig-menu > .ig-hit { box-shadow: inset 0 0 0 2px var(--color-accent); background: #FFF6EC; font-weight: 700; }
.ig-hit::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid var(--color-accent);
    animation: ig-ring 1.6s var(--ease-out, cubic-bezier(.2, .8, .2, 1)) 3;
    opacity: 0;
    pointer-events: none;
}
.ig-bar .ig-hit { padding: 2px 6px; }
@keyframes ig-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }

.ig-others summary { cursor: pointer; font-weight: 700; padding: 10px 0; color: var(--color-primary); }
.ig-done {
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
    display: none;
}
[data-install-device="done"] .ig-done { display: block; }

/* 動きを減らす設定: 下から出さずに短いフェードだけ(閉じるときはJSがすぐ消す)、押す所の輪は広げない */
@media (prefers-reduced-motion: reduce) {
    .install-sheet { animation: install-sheet-fade .2s linear both; }
    .ig-hit::after { animation: none; }
}
@keyframes install-sheet-fade { from { opacity: 0; } to { opacity: 1; } }
