/* ゆるっとノートのサービス画面を一つのノート風デザインへ揃える。
 * 設計思想：方眼、赤鉛筆、紙の面を共通化し、案内と管理操作を同じ世界で迷わず使えるようにする。 */

:root {
    --c-primary: #c93636; /* 主操作と赤鉛筆の色 */
    --c-primary-dark: #982626; /* hover時の濃い赤 */
    --c-ink: #17191c; /* 見出しと手描き線の黒 */
    --c-ink-soft: #565e68; /* 説明文の鉛筆色 */
    --c-line: #20242a; /* 紙の面を区切る黒線 */
    --c-rule: #9fb5c6; /* 方眼上の区切り線 */
    --c-bg: #fbfcfd; /* 方眼紙の地色 */
    --c-bg-soft: #f6f4ee; /* 入力補助面の紙色 */
    --c-marker: #fff39d; /* 手書き印の黄色 */
    --system-font: "Yu Gothic", "YuGothic", "Hiragino Sans", "Noto Sans JP", "Meiryo", sans-serif; /* ノート本文の書体 */
    --sh-sm: 3px 3px 0 var(--c-ink); /* 小さい紙面の硬い影 */
    --sh-md: 5px 5px 0 var(--c-ink); /* 浮く紙面の硬い影 */
    --sh-primary-md: 1px 1px 0 var(--c-ink); /* 主操作hoverの押し込み影 */
    --r-md: 9px; /* 入力とbuttonの角丸 */
    --r-lg: 14px; /* sectionの角丸 */
    --r-pill: 999px; /* 主操作と状態表示の丸み */
    --nav-h: 72px; /* system headerの高さ */
}

* { box-sizing: border-box; }

html {
    min-width: 320px;
    background: var(--c-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--c-ink);
    background-color: var(--c-bg);
    background-image:
        linear-gradient(to right, rgb(126 171 205 / 15%) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(126 171 205 / 15%) 1px, transparent 1px),
        linear-gradient(to right, rgb(126 171 205 / 7%) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(126 171 205 / 7%) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
    font-family: var(--system-font);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

:focus-visible {
    outline: 3px solid var(--c-primary-dark);
    outline-offset: 3px;
}

/* system headerはlogoと最小限の入口だけを表示する。 */
.system-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--nav-h);
    padding: 10px max(20px, calc((100vw - 1120px) / 2));
    border-bottom: 1.5px solid var(--c-line);
    background: rgb(255 255 255 / 94%);
    backdrop-filter: blur(10px);
}

.system-brand {
    display: flex;
    align-items: center;
    width: min(230px, 42vw);
    min-height: 44px;
}

.system-brand img {
    width: 100%;
    height: auto;
}

.system-header nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.system-header nav a,
.text-link,
.nav-status {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: var(--r-md);
    color: var(--c-primary-dark);
    font-weight: 700;
    white-space: nowrap;
}

.nav-status { color: var(--c-ink-soft); }

.system-header nav a:hover,
.text-link:hover { background: var(--c-bg-soft); }

/* つかいかたは標準detailsで開き、全記事を画面移動なしに選ばせる。 */
.guide-menu { position: relative; }

.guide-menu summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 10px;
    border-radius: var(--r-md);
    color: var(--c-primary-dark);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    white-space: nowrap;
}

.guide-menu summary::-webkit-details-marker { display: none; }
.guide-menu summary::after { margin-left: 6px; content: "⌄"; }
.guide-menu[open] summary::after { content: "⌃"; }
.guide-menu summary:hover,
.guide-menu[open] summary { background: var(--c-bg-soft); }

.guide-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(292px, calc(100vw - 28px));
    padding: 8px;
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--sh-md);
}

.system-header .guide-menu-panel a {
    width: 100%;
    border-radius: var(--r-md);
    white-space: normal;
}

.system-footer {
    padding: 24px 20px 40px;
    border-top: 1px solid var(--c-line);
}

.system-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.system-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 12px;
    color: var(--c-primary-dark);
    font-weight: 700;
}

/* system pageは説明、入力、結果を上から読む一列構造。 */
.system-page {
    width: min(100% - 40px, 1000px);
    margin: 0 auto;
    padding: 56px 0 88px;
}

.system-page.narrow { width: min(100% - 40px, 620px); }

.system-page > h1,
.system-page > header h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.2;
    letter-spacing: -.035em;
}

.page-kicker,
.section-kicker,
.tutorial-page .eyebrow {
    margin: 0 0 8px;
    color: var(--c-primary-dark);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.page-lead,
.section-lead,
.tutorial-page .tutorial-lead,
.system-page > h1 + p {
    margin: 14px 0 30px;
    color: var(--c-ink-soft);
    font-size: 1.05rem;
}

.section-lead { margin: -12px 0 22px; font-size: .95rem; }

.system-page > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.system-page > header a:not(.primary-button) {
    flex: none;
    color: var(--c-primary-dark);
    font-weight: 750;
}

.system-page section,
.system-page form:not(.plain-form) { margin-top: 24px; }

.paper-card,
.system-page > section {
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--sh-sm);
}

.onboarding-card { display: grid; gap: 18px; margin-top: 26px; }

.onboarding-card > :first-child { margin-top: 0; }
.onboarding-card > :last-child { margin-bottom: 0; }
.onboarding-card > * { margin-block: 0; }
.onboarding-card p { color: var(--c-ink-soft); }

.success-card { text-align: center; }

.url-field {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    background: var(--c-bg-soft);
}

.url-field > span { padding-left: 12px; color: var(--c-ink-soft); font-weight: 600; }

.system-page .url-field input:not([type="checkbox"]) {
    min-width: 0;
    border: 0;
    border-radius: 0;
}

.consent-links { display: flex; flex-wrap: wrap; gap: 4px; margin: -14px 0 0; }

.setup-list {
    display: grid;
    gap: 0;
    margin: 0 0 24px;
    padding: 0;
    counter-reset: setup;
    list-style: none;
}

.setup-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
    counter-increment: setup;
}

.setup-list li > div { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 2px 10px; }
.setup-list li > div::before { grid-row: 1 / 3; content: counter(setup); color: var(--c-primary); font-size: 1.35rem; font-weight: 900; }
.setup-list small { display: block; }

.channel-link-form {
    padding: 18px;
    border-radius: var(--r-md);
    background: var(--c-bg-soft);
}

.channel-link-form h3 { margin: 0; }

.system-page h2 {
    margin: 0 0 20px;
    font-size: 1.35rem;
}

/* 法務文書は冒頭の短い目次と同じ定義一覧で迷わず読ませる。 */
.legal-page { width: min(100% - 40px, 780px); }

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 34px;
}

.legal-nav a {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    color: var(--c-primary-dark);
    background: var(--c-bg-soft);
    font-weight: 700;
}

.legal-page dl {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr);
    margin: 0;
    border-top: 1px solid var(--c-line);
}

.legal-page dt,
.legal-page dd {
    margin: 0;
    padding: 15px 12px;
    border-bottom: 1px solid var(--c-line);
}

.legal-page dt { font-weight: 800; }
.legal-page p { line-height: 1.85; }

.system-page ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.system-page li {
    padding: 12px 0;
    border-bottom: 1px solid var(--c-line);
}

.system-page li:last-child { border-bottom: 0; }

/* 入力はlabelを説明の正本にし、mobileでも一列を保つ。 */
.system-page form {
    display: grid;
    gap: 18px;
}

.system-page label {
    display: grid;
    gap: 7px;
    color: var(--c-ink);
    font-weight: 700;
}

.system-page label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-weight: 600;
}

.consent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.consent label { display: inline-flex; align-items: center; min-height: 44px; }

.system-page input:not([type="checkbox"]),
.system-page select,
.system-page textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    color: var(--c-ink);
    background: #fff;
}

.system-page textarea {
    min-height: 130px;
    resize: vertical;
}

.system-page input[type="checkbox"] {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 2px 0 0;
    accent-color: var(--c-primary);
}

.system-page input[type="file"] { padding: 7px; }
.system-page small { color: var(--c-ink-soft); }

#url-result,
.form-error { min-height: 1.7em; }

.form-error {
    margin: 0;
    color: #a32727;
    font-weight: 700;
}

/* 全操作は44px以上を保ち、主操作だけを塗る。 */
.system-page button,
.primary-button,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid var(--c-line);
    border-radius: var(--r-pill);
    color: var(--c-ink);
    background: #fff;
    cursor: pointer;
    font-weight: 750;
}

.system-page button:not(.primary-button):hover {
    border-color: var(--c-primary);
    background: var(--c-bg-soft);
}

.primary-button,
.system-page .primary-button {
    border-color: var(--c-line);
    color: #fff;
    background: var(--c-primary);
    box-shadow: var(--sh-sm);
}

.primary-button:hover,
.system-page .primary-button:hover {
    background: var(--c-primary-dark);
    box-shadow: var(--sh-primary-md);
}

.action-large { min-width: 180px; padding: 15px 30px; font-size: 1.05rem; }

.primary-button img {
    width: 25px;
    height: 20px;
    object-fit: contain;
}

.system-page .danger-button {
    color: #9d2929;
    border-color: #e4baba;
}

/* dashboardは今日の状態から日常設定、低頻度操作の順に並べる。 */
.dashboard-head .page-kicker { margin-bottom: 5px; }

.dashboard-state {
    display: inline-flex;
    margin: 10px 0 0;
    padding: 4px 11px;
    border-radius: var(--r-pill);
    background: var(--c-marker);
    font-size: .85rem;
    font-weight: 800;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.dashboard-nav {
    position: sticky;
    top: calc(var(--nav-h) + 10px);
    z-index: 5;
    display: flex;
    gap: 6px;
    margin: 24px 0;
    padding: 7px;
    border: 1px solid var(--c-line);
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / 94%);
    box-shadow: var(--sh-sm);
}

.dashboard-nav a {
    display: grid;
    flex: 1;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--r-pill);
    color: var(--c-primary-dark);
    font-weight: 800;
    place-items: center;
}

.dashboard-nav a:hover { background: var(--c-bg-soft); }

#profile,
#channels,
#appearance,
#features { scroll-margin-top: calc(var(--nav-h) + 80px); }

#dashboard > .quota {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    background: var(--c-bg-soft);
}

.quota p { margin: 0; }

.quota .plan-summary,
.quota .quota-values {
    display: grid;
    align-content: start;
    gap: 10px;
}

.quota-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quota-values p {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    padding: 14px;
    border-radius: var(--r-md);
    background: #fff;
}

.quota-values span { grid-column: 1 / 3; color: var(--c-ink-soft); font-size: .86rem; font-weight: 750; }
.quota-values small { color: var(--c-ink-soft); }
.plan-name { color: var(--c-primary-dark); font-weight: 900; }

.plan-details summary {
    min-height: 44px;
    padding: 9px 0;
    color: var(--c-primary-dark);
    cursor: pointer;
    font-weight: 750;
}

.plan-details p { color: var(--c-ink-soft); }

.quota .plan-summary small { color: var(--c-ink-soft); }

.quota strong {
    color: var(--c-primary-dark);
    font-size: 1.65rem;
}

.setting-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.setting-item {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 18px;
    border-radius: var(--r-md);
    background: var(--c-bg-soft);
}

.setting-item label { margin: 0; }

.system-page input.file-input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--c-line);
    border-radius: var(--r-pill);
    color: #fff;
    background: var(--c-primary);
    cursor: pointer;
    font-weight: 750;
}

.system-page input.file-input[type="file"]:focus-visible + .upload-button { outline: 3px solid var(--c-primary-dark); outline-offset: 3px; }

.channel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.inline-form {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form select { width: min(100%, 320px); }
.user-notices li { color: var(--c-ink-soft); }

.danger-zone { border-color: #d5a1a1 !important; box-shadow: none !important; }
.danger-zone > details > summary { min-height: 44px; padding: 6px 0; color: #8b2424; cursor: pointer; font-weight: 850; }
.danger-zone-body { padding-top: 18px; }
.danger-zone-body h2 { font-size: 1.05rem; }

[data-result] {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

#channel-setup > .primary-button + [data-result] { margin-bottom: 0; }

/* トップは旧来の手描きHeroから三つの特徴へ読み進める。 */
.red {
    color: var(--c-primary);
    text-decoration: underline;
    text-decoration-color: var(--c-primary);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

/* ───── ヒーロー ───── */
.landing-main .hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 56px 24px 48px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    border-radius: 0;
    background: transparent;
}
@media (min-width: 880px) {
    .landing-main .hero {
        grid-template-columns: 1.05fr 0.95fr;
        padding: 80px 24px 72px;
        gap: 56px;
    }
}
.landing-main .hero-title {
    font-size: 36px;
    line-height: 1.35;
    margin: 0 0 24px;
    font-weight: 900;
    letter-spacing: 0.01em;
}
@media (min-width: 880px) { .landing-main .hero-title { font-size: 52px; } }
.hero-sub {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-ink-soft);
    margin: 0 0 32px;
    max-width: 520px;
    line-height: 1.85;
}
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.landing-main .btn-red {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 16px 32px;
    border: 1.5px solid var(--c-ink);
    border-radius: var(--r-pill);
    color: #fff;
    background: var(--c-primary);
    box-shadow: 4px 4px 0 var(--c-ink);
    font-size: 17px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .1s ease, box-shadow .1s ease;
}

.landing-main .btn-red:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--c-ink);
}

.landing-main .btn-outline {
    padding: 16px 26px;
    border: 1.5px solid var(--c-ink);
    font-size: 15px;
    font-weight: 900;
}
.landing-main .btn-outline:hover { background: var(--c-bg); }

/* ヒーロー右側: ノートカード重ね挿絵 */
.hero-visual {
    position: relative;
    min-height: 360px;
}
.note-card {
    position: absolute;
    background: #fff;
    border: 1.5px solid var(--c-ink);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 4px 4px 0 var(--c-ink);
    font-size: 13px;
    font-weight: 700;
    color: var(--c-ink-soft);
    line-height: 1.7;
    /* カード内ミニ罫線 */
    background-image: linear-gradient(to bottom,
        transparent 0,
        transparent 40px,
        #eaeef3 40px,
        #eaeef3 41px,
        transparent 41px);
    background-size: 100% 28px;
    background-position: 0 36px;
}
.note-card .nc-tag {
    font-size: 11px;
    color: var(--c-primary);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    font-weight: 900;
}
.note-card .nc-title {
    font-size: 16px;
    color: var(--c-ink);
    margin-bottom: 8px;
    font-weight: 900;
}
.nc-1 { top: 10px;  left: 8%;   width: 260px; transform: rotate(-5deg); z-index: 1; }
.nc-2 { top: 90px;  left: 32%;  width: 270px; transform: rotate(3deg);  z-index: 2; }
.nc-3 { top: 200px; left: 14%;  width: 280px; transform: rotate(-2deg); z-index: 3; }

/* キラキラ装飾 */
.sparkle {
    position: absolute;
    font-size: 28px;
    color: var(--c-primary);
    font-weight: 900;
}
.spark-1 { top: -10px; right: 24%; transform: rotate(15deg); }
.spark-2 { bottom: 10px; right: 10%; font-size: 22px; }

/* ───── セクション共通 ───── */
.section {
    max-width: 1120px;
    margin: 0 auto;
    padding: 56px 24px;
}
.section-divider {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}
.section-divider hr {
    border: none;
    border-top: 1.5px dashed var(--c-rule);
    margin: 0;
}
.welcome {
    text-align: center;
    padding: 56px 24px 24px;
}
.welcome-eyebrow {
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
}
.welcome-eyebrow::before { content: "✨"; color: var(--c-primary); }
.welcome-eyebrow::after  { content: "✨"; color: var(--c-primary); }
.welcome-logo {
    height: 1.5em;       /* 文字に合わせた高さ */
    width: auto;
    vertical-align: middle;
    display: inline-block;
}
.welcome-lead {
    font-size: 17px;
    font-weight: 700;
    margin: 0 auto;
    max-width: 720px;
    color: var(--c-ink-soft);
    line-height: 1.9;
}
.welcome-bubble {
    display: inline-block;
    margin-top: 14px;
    padding: 6px 18px;
    background: var(--c-marker);
    border: 1.5px solid var(--c-ink);
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 900;
    transform: rotate(-2deg);
}

/* ───── 機能セクション (①②③) ───── */
.feature-block {
    margin: 0 auto 56px;
    max-width: 980px;
}
.feature-num {
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 16px;
    line-height: 1.4;
}
.feature-num .num-mark {
    color: var(--c-primary);
    margin-right: 6px;
}
@media (min-width: 720px) {
    .feature-num { font-size: 30px; }
}
.feature-illustration {
    background: #fff;
    border: 1.5px solid var(--c-ink);
    border-radius: 14px;
    box-shadow: 4px 4px 0 var(--c-ink);
    padding: 28px 24px;
    margin: 0 0 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feature-illustration svg {
    width: 100%;
    max-width: 720px;
    height: auto;
    display: block;
}
.feature-body {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.95;
    color: var(--c-ink-soft);
    margin: 0;
}
.feature-body p { margin: 0 0 10px; }

/* ───── CTA ストリップ ───── */
.cta-strip {
    max-width: 1120px;
    margin: 24px auto 48px;
    padding: 48px 24px;
    text-align: center;
}
.cta-title {
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 24px;
}

@media (max-width: 540px) {
    .landing-main .hero { padding: 44px 16px 40px; }
    .landing-main .hero-title { font-size: 28px; }
    .hero-visual { min-height: 320px; overflow: hidden; }
    .nc-1, .nc-2, .nc-3 { width: 205px; }
    .nc-1 { left: 0; }
    .nc-2 { right: 0; left: auto; }
    .nc-3 { left: 10%; }
    .welcome-eyebrow { gap: 5px; font-size: 18px; }
    .welcome-eyebrow::before,
    .welcome-eyebrow::after { content: none; }
    .welcome-eyebrow span { white-space: nowrap; }
    .welcome-logo { width: 142px; height: auto; }
}

/* チュートリアルは完成像、準備、操作、公開後の順に読み進める。 */
.tutorial-page { width: min(100% - 40px, 760px); }
.tutorial-page .back-link { margin: -12px 0 24px -12px; }
.tutorial-page .eyebrow + h1 { margin-top: 0; }

.tutorial-points li {
    position: relative;
    padding-left: 30px;
}

.tutorial-points li::before {
    position: absolute;
    top: 12px;
    left: 2px;
    color: var(--c-primary-dark);
    content: "✓";
    font-weight: 900;
}

.channel-type {
    display: inline-block;
    margin: 0 0 10px;
    padding: 8px 13px;
    border-radius: var(--r-pill);
    background: #eef1ff;
}

.tutorial-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tutorial-steps li {
    display: grid;
    padding: 18px 0;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 14px;
}

.tutorial-steps > li > span {
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: var(--c-primary);
    font-weight: 800;
    place-items: center;
}

.tutorial-steps h3 { margin: 1px 0 5px; font-size: 1.05rem; }
.tutorial-steps p { margin: 0; color: var(--c-ink-soft); }

.post-example pre {
    margin: 0;
    overflow-x: auto;
    padding: 18px;
    border-radius: var(--r-md);
    color: var(--c-ink);
    background: var(--c-bg-soft);
    font: inherit;
    white-space: pre-wrap;
}

.tutorial-start { text-align: center; }
.tutorial-start p { margin: -8px 0 18px; color: var(--c-ink-soft); }

.guide-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
}

.guide-links a {
    display: flex;
    min-height: 48px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--c-line);
    color: var(--c-primary-dark);
    font-weight: 750;
    justify-content: space-between;
    align-items: center;
}

.guide-links a:hover { border-color: var(--c-primary-dark); }

@media (max-width: 720px) {
    :root { --nav-h: 64px; }
    .system-header { padding: 8px 16px; }
    .system-brand { width: min(175px, 46vw); }
    .system-header nav { gap: 0; }

    .system-header nav a {
        padding: 9px 8px;
        font-size: .88rem;
    }

    .guide-menu summary { padding: 9px 8px; font-size: .88rem; }

    .guide-menu-panel {
        position: fixed;
        top: calc(var(--nav-h) - 1px);
        right: 14px;
    }

    .nav-status { display: none; }

    .system-page,
    .system-page.narrow {
        width: min(100% - 28px, 1000px);
        padding: 36px 0 64px;
    }

    .legal-page dl { grid-template-columns: 1fr; }
    .legal-page dt { padding-bottom: 4px; border-bottom: 0; }
    .legal-page dd { padding-top: 4px; }

    .system-page > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions { width: 100%; flex-wrap: wrap; }

    .dashboard-nav { top: calc(var(--nav-h) + 6px); }

    .system-page > section { padding: 20px; }

    #dashboard > .quota,
    .setting-grid,
    .guide-links { grid-template-columns: 1fr; }

    .quota-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .setup-list li { grid-template-columns: 1fr; }

    .system-page button,
    .primary-button { max-width: 100%; }

    .channel-row {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (max-width: 420px) {
    .dashboard-nav a { padding-inline: 6px; font-size: .84rem; }
    .quota-values { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
    .system-page button,
    .primary-button,
    .system-header a {
        transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
    }
}
