/* ==========================================================================
   FlexRobin 使い方ガイド（本編ページ）スタイル (howto.css)
   guide.css の上に重ねて使う。画像は、スマホの画面写真なので、幅を抑えて中央に置く。
   ========================================================================== */

.howto-lead {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--theme-text, #0f172a);
    margin-bottom: 1.5rem;
}

/* 目次 */
.howto-toc {
    background-color: var(--theme-surface, #ffffff);
    border: 1px solid var(--theme-border, #cbd5e1);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

.guide-container .howto-toc-title {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    padding: 0;
    border: 0;
}

.howto-toc ol {
    margin: 0;
    padding-left: 1.5rem;
    list-style: decimal;
}

.howto-toc li {
    margin: 0.25rem 0;
    line-height: 1.6;
}

.howto-toc a {
    color: var(--theme-primary-text, #0272ab);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.howto-section {
    scroll-margin-top: 5rem;
}

/* 手順 */
.howto-steps {
    list-style: none;
    counter-reset: howto-step;
    margin: 0 0 1.25rem;
    padding: 0;
}

.howto-steps li {
    counter-increment: howto-step;
    position: relative;
    min-height: 2rem;
    padding: 0.125rem 0 0.75rem 2.75rem;
    line-height: 1.75;
    color: var(--theme-text, #0f172a);
}

.howto-steps li::before {
    content: counter(howto-step);
    position: absolute;
    left: 0;
    top: 0.125rem;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    /* 面は薄く、枠と数字はテーマの文字色。ボタン色の上に文字を置かないので、どのテーマでも読める */
    background-color: var(--theme-primary-light, #e0f2fe);
    border: 2px solid var(--theme-primary, #0284c7);
    color: var(--theme-primary-text, #0272ab);
    font-weight: 700;
    text-align: center;
    line-height: calc(2rem - 4px);
    box-sizing: border-box;
}

.howto-list {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
    list-style: disc;
    line-height: 1.75;
    color: var(--theme-text, #0f172a);
}

.howto-list li {
    margin: 0.25rem 0;
}

/* 画面写真: スマホの画面を、そのままの縦横比で、中央に置く */
.howto-figure {
    margin: 1.25rem auto 1.5rem;
    max-width: 18rem;
    text-align: center;
}

.howto-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--theme-border, #cbd5e1);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.howto-figure figcaption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--theme-text-muted, #475569);
}

/* 補足・注意。背景と文字色を、組で指定する（テーマを変えても、読める） */
.howto-note {
    margin: 1.25rem 0;
    padding: 0.875rem 1rem;
    border-left: 4px solid;
    border-radius: 0.5rem;
}

.howto-note p {
    margin: 0;
    line-height: 1.75;
}

.howto-note.is-tip {
    background-color: #e0f2fe;
    border-color: #0369a1;
    color: #0c4a6e;
}

.howto-note.is-tip p {
    color: #0c4a6e;
}

.howto-note.is-warn {
    background-color: #fef3c7;
    border-color: #b45309;
    color: #78350f;
}

.howto-note.is-warn p {
    color: #78350f;
}

/* 入口のページへのカード */
.howto-cards {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.howto-cards a {
    display: block;
    min-height: 44px;
    padding: 0.875rem 1rem;
    background-color: var(--theme-surface, #ffffff);
    border: 1px solid var(--theme-border, #cbd5e1);
    border-left: 4px solid var(--theme-primary, #0284c7);
    border-radius: 0.5rem;
    color: var(--theme-text, #0f172a);
    text-decoration: none;
}

.howto-cards a:hover,
.howto-cards a:focus-visible {
    background-color: var(--theme-primary-light, #e0f2fe);
}

.howto-cards strong {
    display: block;
    color: var(--theme-primary-text, #0272ab);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.howto-cards span {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--theme-text-muted, #475569);
}

.howto-table {
    width: 100%;
}

.howto-table th,
.howto-table td {
    vertical-align: top;
}

.howto-next ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
    line-height: 1.8;
}

.howto-next a {
    color: var(--theme-primary-text, #0272ab);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (min-width: 640px) {
    .howto-figure {
        max-width: 20rem;
    }
}
