:root {
    --ink: #102433;
    --muted: #637684;
    --blue-950: #07334f;
    --blue-900: #0a4166;
    --blue-800: #0e567f;
    --blue-700: #13709f;
    --blue-500: #5bb8ee;
    --blue-100: #dff3ff;
    --blue-50: #f2faff;
    --red: #e93451;
    --cream: #fffaf0;
    --paper: #ffffff;
    --line: #dce7ed;
    --yellow: #ffd970;
    --green: #2b9a70;
    --shadow: 0 18px 45px rgba(9, 62, 96, .13);
    --shadow-soft: 0 8px 22px rgba(9, 62, 96, .09);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 15px;
    --shell: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(91,184,238,.14), transparent 28%),
        linear-gradient(180deg, #f8fcff 0, #fff 32%, #f7fbfd 100%);
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.shell { width: min(calc(100% - 36px), var(--shell)); margin-inline: auto; }
.sr-only {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; background: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(248,252,255,.86);
    border-bottom: 1px solid rgba(14,86,127,.09);
    backdrop-filter: blur(14px);
}
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.brand-mark { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; display: grid; place-items: center; padding: 5px; background: #fff; border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-soft); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; transform: none; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { color: var(--blue-950); letter-spacing: .08em; font-size: .96rem; }
.brand-copy small { color: var(--muted); margin-top: 5px; font-size: .72rem; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.text-button, .icon-button, .back-button { border: 0; background: transparent; cursor: pointer; font-weight: 800; }
.text-button { color: var(--blue-800); padding: 10px 12px; }
.pill-link { text-decoration: none; background: var(--blue-900); color: white; border-radius: 999px; padding: 11px 17px; font-size: .86rem; font-weight: 800; box-shadow: var(--shadow-soft); }

.view { display: none; min-height: calc(100vh - 146px); }
.view.is-active { display: block; animation: viewIn .28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero-wrap { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--blue-950), var(--blue-800)); color: white; }
.hero-wrap::before,
.hero-wrap::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; }
.hero-wrap::before { width: 420px; height: 420px; right: -145px; top: -220px; }
.hero-wrap::after { width: 190px; height: 190px; left: 44%; bottom: -130px; }
.hero-grid { position: relative; z-index: 1; min-height: 405px; display: grid; grid-template-columns: 1.45fr .55fr; gap: 70px; align-items: center; padding-block: 70px; }
.eyebrow, .section-kicker { display: block; color: var(--blue-500); font-weight: 900; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; }
.hero-copy h1 { margin: 12px 0 18px; font-size: clamp(2.65rem, 6vw, 5.4rem); line-height: .97; letter-spacing: -.055em; }
.hero-copy h1 em { color: var(--yellow); font-style: normal; }
.hero-copy p { max-width: 650px; color: rgba(255,255,255,.83); font-size: clamp(.98rem, 1.4vw, 1.12rem); line-height: 1.9; margin: 0; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.hero-badges span { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.09); padding: 8px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.today-card { justify-self: end; width: min(100%, 280px); padding: 28px; border-radius: var(--radius-xl); background: rgba(255,255,255,.96); color: var(--ink); box-shadow: 0 26px 60px rgba(0,0,0,.19); transform: rotate(2deg); }
.today-label { display: block; color: var(--blue-700); font-weight: 900; letter-spacing: .11em; }
.today-primary { display: flex; align-items: baseline; gap: 6px; }
.today-primary strong { display: inline-block; margin-top: 7px; color: var(--blue-950); font-size: 4.1rem; line-height: 1; }
.today-primary span { font-weight: 900; }
.today-secondary { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; color: var(--muted); font-weight: 800; }
.today-secondary strong { color: var(--blue-800); font-size: 1.35rem; line-height: 1; }
.mini-progress { height: 8px; margin: 22px 0 12px; border-radius: 999px; background: var(--blue-100); overflow: hidden; }
.mini-progress span { display: block; width: 0; height: 100%; background: var(--red); border-radius: inherit; transition: width .3s ease; }
.today-card small { display: block; color: var(--muted); line-height: 1.6; }

.content-shell { padding-block: 42px 70px; }
.toolbar { display: flex; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 42px; }
.search-box { min-width: min(100%, 420px); display: flex; align-items: center; gap: 10px; background: white; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; box-shadow: var(--shadow-soft); }
.search-box svg { width: 20px; fill: none; stroke: var(--blue-800); stroke-width: 2; stroke-linecap: round; }
.search-box input { width: 100%; height: 48px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.filter-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: white; border-radius: 999px; padding: 9px 12px; cursor: pointer; color: var(--muted); font-weight: 800; box-shadow: 0 3px 10px rgba(9,62,96,.04); }
.filter-chip small { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: var(--blue-50); color: var(--blue-800); font-size: .66rem; text-align: center; }
.filter-chip.is-empty { opacity: .58; }
.filter-chip.is-active { background: var(--blue-900); color: white; border-color: var(--blue-900); }
.filter-chip.is-active small { background: rgba(255,255,255,.16); color: white; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-heading h2, .conversion-band h2 { margin: 6px 0 0; color: var(--blue-950); font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.035em; }
.result-count { color: var(--muted); font-weight: 800; font-size: .86rem; }
.deck-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.deck-card { position: relative; min-height: 285px; display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); transition: transform .2s ease, box-shadow .2s ease; }
.deck-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.deck-accent { height: 9px; background: var(--deck-accent, var(--blue-700)); }
.deck-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.deck-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.level-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 9px; border-radius: 999px; background: var(--blue-100); color: var(--blue-900); font-size: .73rem; font-weight: 900; }
.deck-count { color: var(--muted); font-size: .8rem; font-weight: 800; }
.deck-card h3 { margin: 18px 0 9px; color: var(--blue-950); font-size: 1.36rem; line-height: 1.35; }
.deck-card p { flex: 1; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.75; }
.deck-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.deck-tags span { background: var(--blue-50); color: var(--blue-800); padding: 5px 8px; border-radius: 7px; font-size: .7rem; font-weight: 800; }
.deck-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.deck-progress { flex: 1; }
.deck-progress small { display: block; color: var(--muted); margin-bottom: 6px; }
.deck-progress-bar { height: 6px; background: #edf3f6; overflow: hidden; border-radius: 999px; }
.deck-progress-bar span { display: block; height: 100%; width: 0; background: var(--deck-accent, var(--blue-700)); border-radius: inherit; }
.study-button { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 10px 15px; background: var(--blue-900); color: white; cursor: pointer; font-weight: 900; }
.empty-state { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-lg); background: white; }

.conversion-band { margin-top: 55px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding: 32px 35px; border-radius: var(--radius-xl); background: var(--cream); border: 1px solid #f0e4c9; box-shadow: var(--shadow-soft); }
.conversion-band p { margin: 10px 0 0; color: var(--muted); }
.conversion-band a { background: var(--red); color: white; text-decoration: none; font-weight: 900; border-radius: 999px; padding: 14px 20px; white-space: nowrap; }

.study-shell { max-width: 850px; padding-block: 30px 65px; }
.study-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.back-button { justify-self: start; color: var(--blue-800); padding: 8px 0; }
.study-title-wrap { min-width: 0; text-align: center; }
.study-title-wrap h1 { margin: 6px 0 0; color: var(--blue-950); font-size: clamp(1.1rem, 3vw, 1.55rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-button { justify-self: end; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: white; box-shadow: var(--shadow-soft); }
.study-progress-wrap { margin: 26px 0 22px; }
.study-progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; font-weight: 900; }
.study-progress { height: 9px; margin-top: 9px; background: #e7f0f4; border-radius: 999px; overflow: hidden; }
.study-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-700), var(--blue-500)); transition: width .25s ease; }

.study-stage { perspective: 1600px; }
.flashcard { position: relative; min-height: 485px; outline: none; cursor: pointer; }
.flashcard:focus-visible { outline: 4px solid rgba(91,184,238,.38); outline-offset: 8px; border-radius: var(--radius-xl); }
.card-inner { position: relative; width: 100%; min-height: inherit; transform-style: preserve-3d; transition: transform .56s cubic-bezier(.2,.75,.2,1); }
.flashcard.is-flipped .card-inner { transform: rotateY(180deg); }
.card-face { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: var(--radius-xl); backface-visibility: hidden; overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(14,86,127,.14); }
.card-front { background: linear-gradient(145deg, #fff, #f5fbff); }
.card-back { background: linear-gradient(145deg, var(--blue-950), var(--blue-800)); color: white; transform: rotateY(180deg); }
.card-topline { display: flex; justify-content: space-between; align-items: center; padding: 22px 25px 0; color: var(--muted); font-size: .76rem; font-weight: 900; }
.card-back .card-topline { color: rgba(255,255,255,.7); }
.round-action { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; box-shadow: var(--shadow-soft); }
.card-back .round-action { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.2); }
.card-center { flex: 1; display: grid; align-content: center; justify-items: center; text-align: center; padding: 30px; }
.card-prompt, .answer-label { color: var(--blue-700); font-family: Georgia, serif; font-style: italic; font-weight: 700; }
.card-center h2, .card-answer h2 { margin: 12px 0; letter-spacing: -.04em; }
.card-center h2 { color: var(--blue-950); font-size: clamp(2.65rem, 8vw, 5.5rem); line-height: 1.05; }
.card-hint { color: var(--muted); margin: 4px 0 0; }
.flip-hint { padding: 17px; text-align: center; background: rgba(14,86,127,.05); color: var(--muted); font-size: .78rem; font-weight: 800; }
.card-back .flip-hint { color: rgba(255,255,255,.7); background: rgba(0,0,0,.08); }
.card-answer { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 38px 28px; text-align: center; overflow-y: auto; }
.card-back .answer-label { color: var(--yellow); }
.card-answer h2 { font-size: clamp(1.9rem, 6vw, 3.6rem); }
.card-reading { margin: -3px 0 20px; color: rgba(255,255,255,.72); }
.example-box { width: min(100%, 620px); display: grid; gap: 7px; padding: 18px 20px; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.17); border-radius: var(--radius-md); }
.example-box strong { font-size: 1.05rem; line-height: 1.6; }
.example-box span { color: rgba(255,255,255,.74); font-size: .88rem; }
.card-note { width: min(100%, 620px); color: rgba(255,255,255,.8); font-size: .82rem; line-height: 1.7; margin: 16px 0 0; }
.resource-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.resource-links a { display: inline-flex; align-items: center; gap: 6px; color: white; text-decoration: none; padding: 8px 11px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-size: .75rem; font-weight: 900; }
.resource-links a:hover { background: rgba(255,255,255,.2); }

.reveal-area { display: grid; justify-items: center; gap: 8px; margin-top: 22px; }
.primary-button, .secondary-button, .danger-button { border-radius: 999px; padding: 13px 22px; cursor: pointer; font-weight: 900; }
.primary-button { border: 0; background: var(--blue-900); color: white; box-shadow: var(--shadow-soft); }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--blue-900); }
.danger-button { border: 1px solid #f2bdc6; background: #fff3f5; color: #b71e37; }
.reveal-area small, .keyboard-help { color: var(--muted); }
.rating-area { margin-top: 21px; text-align: center; }
.rating-area > p { margin: 0 0 11px; color: var(--muted); font-weight: 800; }
.rating-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rating { border: 1px solid var(--line); border-radius: var(--radius-md); background: white; min-height: 73px; display: grid; align-content: center; gap: 4px; cursor: pointer; box-shadow: 0 4px 12px rgba(9,62,96,.06); transition: transform .15s ease, border-color .15s ease; }
.rating:hover { transform: translateY(-2px); border-color: var(--blue-500); }
.rating strong { font-size: .86rem; }
.rating span { color: var(--muted); font-size: .7rem; }
.rating.again strong { color: #c62942; }
.rating.hard strong { color: #b06710; }
.rating.good strong { color: var(--blue-700); }
.rating.easy strong { color: var(--green); }
.keyboard-help { display: block; margin-top: 10px; font-size: .72rem; }

.complete-shell { max-width: 850px; padding-block: 55px 75px; }
.complete-card { background: white; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); padding: clamp(30px, 7vw, 65px); text-align: center; }
.complete-icon { width: 75px; height: 75px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 50%; background: #e2f7ef; color: var(--green); font-size: 2.3rem; font-weight: 900; }
.complete-card h1 { color: var(--blue-950); margin: 12px 0; font-size: clamp(2rem, 5vw, 3.4rem); }
.complete-card > p { color: var(--muted); line-height: 1.8; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 32px 0; }
.stats-grid div { padding: 18px; border-radius: var(--radius-md); background: var(--blue-50); }
.stats-grid strong { display: block; color: var(--blue-900); font-size: 1.9rem; }
.stats-grid span { color: var(--muted); font-size: .76rem; font-weight: 800; }
.complete-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.complete-resources { margin-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.complete-resources a { text-decoration: none; color: var(--blue-900); font-weight: 900; border-bottom: 2px solid var(--blue-100); padding-bottom: 2px; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3,30,46,.58); backdrop-filter: blur(5px); }
.modal-panel { position: relative; width: min(100%, 540px); max-height: calc(100vh - 36px); overflow-y: auto; background: white; border-radius: var(--radius-xl); box-shadow: 0 30px 80px rgba(0,0,0,.3); padding: 32px; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--blue-50); color: var(--blue-900); cursor: pointer; font-size: 1.4rem; }
.modal-panel h2 { margin: 7px 0 22px; color: var(--blue-950); }
.setting-row { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.setting-row span { display: grid; gap: 4px; }
.setting-row small { color: var(--muted); line-height: 1.45; }
.setting-row input { width: 22px; height: 22px; accent-color: var(--blue-800); }
.data-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.data-actions .secondary-button, .data-actions .danger-button { font-size: .78rem; padding: 10px 13px; }
.file-button { display: inline-flex; align-items: center; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.privacy-note { margin: 18px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.65; }

.site-footer { border-top: 1px solid var(--line); background: white; }
.footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: .74rem; }
.footer-inner nav { display: flex; gap: 15px; }
.footer-inner a { text-decoration: none; font-weight: 800; color: var(--blue-800); }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr .6fr; gap: 30px; }
    .deck-grid { grid-template-columns: repeat(2, 1fr); }
    .toolbar { align-items: stretch; flex-direction: column; }
    .filter-chips { justify-content: flex-start; }
}
@media (max-width: 650px) {
    .shell { width: min(calc(100% - 24px), var(--shell)); }
    .header-inner { min-height: 64px; }
    .brand-copy small, .text-button { display: none; }
    .brand-mark { width: 42px; height: 42px; flex-basis: 42px; padding: 4px; }
    .pill-link { padding: 9px 12px; font-size: .72rem; }
    .hero-grid { min-height: auto; grid-template-columns: 1fr; gap: 30px; padding-block: 50px; }
    .hero-copy h1 { font-size: clamp(2.45rem, 13vw, 4rem); }
    .today-card { justify-self: stretch; width: 100%; transform: none; padding: 22px; }
    .today-primary strong { font-size: 3rem; }
    .today-secondary { margin-top: 8px; }
    .deck-grid { grid-template-columns: 1fr; }
    .conversion-band { grid-template-columns: 1fr; padding: 27px 23px; }
    .conversion-band a { text-align: center; }
    .study-shell { padding-top: 20px; }
    .study-topbar { grid-template-columns: auto 1fr auto; }
    .back-button { font-size: 0; }
    .back-button span { font-size: 1.4rem; }
    .flashcard { min-height: 455px; }
    .card-center { padding: 25px 18px; }
    .card-center h2 { font-size: clamp(2.4rem, 15vw, 4.4rem); }
    .card-answer { padding: 15px 20px 22px; }
    .rating-grid { grid-template-columns: repeat(2, 1fr); }
    .keyboard-help { display: none; }
    .stats-grid { gap: 7px; }
    .stats-grid div { padding: 15px 7px; }
    .stats-grid strong { font-size: 1.45rem; }
    .footer-inner { padding-block: 20px; flex-direction: column; justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* v1.1 — classement par niveau de DELF/仏検 et message de sauvegarde */
.deck-groups { display: grid; gap: 42px; }
.deck-group { min-width: 0; }
.deck-group-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}
.deck-group-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 14px; }
.deck-group-heading h3 { margin: 0; color: var(--blue-950); font-size: 1.12rem; }
.deck-group-heading > span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.kentei-number {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--blue-900);
    color: #fff;
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .02em;
}
.deck-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cefr-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: #fff;
    font-size: .69rem;
    font-weight: 900;
}

.notice-panel { width: min(100%, 570px); text-align: left; }
.notice-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 19px;
    background: var(--blue-100);
    color: var(--blue-900);
    font-size: 2rem;
    font-weight: 900;
}
.notice-panel h2 { margin-bottom: 13px; font-size: clamp(1.55rem, 5vw, 2.15rem); }
.notice-panel > p { color: var(--muted); line-height: 1.75; }
.notice-panel > p strong { color: var(--blue-950); }
.notice-list {
    display: grid;
    gap: 9px;
    margin: 20px 0;
    padding: 17px 18px 17px 38px;
    border-radius: var(--radius-md);
    background: var(--blue-50);
    color: var(--ink);
    line-height: 1.65;
}
.notice-tip {
    padding-left: 13px;
    border-left: 4px solid var(--yellow);
    font-size: .86rem;
}
.notice-accept { width: 100%; margin-top: 12px; min-height: 50px; }

@media (max-width: 650px) {
    .brand { gap: 9px; }
    .brand-copy strong { font-size: .82rem; letter-spacing: .06em; }
    .filter-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
    .filter-chip { flex: 0 0 auto; }
    .deck-groups { gap: 34px; }
    .deck-group-heading { align-items: start; }
    .deck-group-heading > div { display: grid; gap: 7px; }
    .notice-panel { padding: 27px 22px; }
}

/* v1.1.0 — navigation des jeux, aide mobile et support du projet */
.app-menu {
    position: relative;
    z-index: 45;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.app-menu-inner {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.game-tabs,
.site-shortcuts {
    display: flex;
    align-items: center;
    gap: 8px;
}
.game-tab {
    min-height: 46px;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    padding: 7px 13px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
}
.game-tab > span {
    grid-row: 1 / 3;
    font-size: 1.1rem;
}
.game-tab strong {
    color: var(--blue-950);
    font-size: .84rem;
    line-height: 1.1;
}
.game-tab small {
    font-size: .64rem;
    line-height: 1.1;
}
.game-tab:hover,
.game-tab.is-active {
    border-color: var(--line);
    background: var(--blue-50);
}
.game-tab.is-active {
    box-shadow: inset 0 -3px 0 var(--blue-700);
}
.site-shortcuts a,
.help-shortcut {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--blue-800);
    text-decoration: none;
    font-size: .76rem;
    font-weight: 900;
    cursor: pointer;
}
.site-shortcuts a:hover,
.help-shortcut:hover {
    border-color: var(--line);
    background: var(--blue-50);
}
.site-shortcuts .support-link {
    border-color: #f0dfb9;
    background: var(--cream);
    color: #845315;
}
.help-shortcut {
    width: 36px;
    padding: 0;
    border-color: var(--line);
    background: #fff;
    font-size: 1rem;
}

.coming-soon-shell {
    max-width: 900px;
    padding-block: 62px 82px;
}
.coming-soon-card {
    padding: clamp(30px, 7vw, 70px);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}
.coming-soon-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin: 0 auto 22px;
    border-radius: 24px;
    background: var(--blue-100);
    color: var(--blue-900);
    font-size: 2.2rem;
}
.coming-soon-card h1 {
    margin: 10px 0 14px;
    color: var(--blue-950);
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    line-height: 1;
}
.coming-soon-card h1 small {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: .27em;
    letter-spacing: .08em;
}
.coming-soon-card > p {
    max-width: 680px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.9;
}
.coming-soon-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 28px 0;
}
.coming-soon-features span {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue-800);
    font-size: .78rem;
    font-weight: 900;
}
.coming-soon-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.coming-soon-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sound-status {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 13px;
    margin: 18px 0 4px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 5px 15px rgba(9,62,96,.05);
}
.sound-status[data-state="ready"] {
    border-color: #bfe6d7;
    background: #f2fbf7;
}
.sound-status[data-state="error"] {
    border-color: #f1bec8;
    background: #fff5f7;
}
.sound-status[data-state="playing"] {
    border-color: #b6ddf4;
    background: var(--blue-50);
}
.sound-status-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--blue-100);
}
.sound-status > div:nth-child(2) {
    display: grid;
    gap: 3px;
}
.sound-status strong {
    color: var(--blue-950);
    font-size: .84rem;
}
.sound-status small {
    color: var(--muted);
    line-height: 1.45;
}
.sound-status-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}
.sound-enable-button,
.sound-help-button {
    min-height: 36px;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: .74rem;
    font-weight: 900;
}
.sound-enable-button {
    border: 0;
    background: var(--blue-900);
    color: #fff;
}
.sound-help-button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--blue-800);
}
.setting-test-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}
.setting-test-row > span {
    display: grid;
    gap: 4px;
}
.setting-test-row small {
    color: var(--muted);
    line-height: 1.45;
}
.setting-test-row .secondary-button {
    padding: 9px 13px;
    font-size: .75rem;
}

.help-panel {
    width: min(100%, 690px);
}
.help-section {
    padding: 19px 0;
    border-top: 1px solid var(--line);
}
.help-section h3 {
    margin: 0 0 10px;
    color: var(--blue-950);
    font-size: 1rem;
}
.help-section p,
.help-section li {
    color: var(--muted);
    line-height: 1.75;
}
.help-section ol,
.help-section ul {
    display: grid;
    gap: 7px;
    margin: 0 0 16px;
    padding-left: 24px;
}
.help-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.help-links a {
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue-900);
    text-decoration: none;
    font-size: .76rem;
    font-weight: 900;
}
.app-toast {
    position: fixed;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 160;
    width: min(calc(100% - 28px), 520px);
    transform: translateX(-50%);
    padding: 12px 15px;
    border-radius: 14px;
    background: var(--blue-950);
    color: #fff;
    box-shadow: 0 18px 42px rgba(0,0,0,.25);
    text-align: center;
    font-size: .82rem;
    font-weight: 800;
}
.app-toast.is-error {
    background: #9d2136;
}

@media (max-width: 850px) {
    .app-menu-inner {
        align-items: stretch;
        flex-direction: column;
        padding-block: 9px;
        gap: 7px;
    }
    .game-tabs,
    .site-shortcuts {
        width: 100%;
    }
    .game-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .game-tab {
        justify-content: center;
    }
    .site-shortcuts {
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }
    .site-shortcuts a,
    .help-shortcut {
        flex: 0 0 auto;
    }
}

@media (max-width: 650px) {
    .header-actions .text-button:first-child { display: none; }
    .app-menu .shell { width: min(calc(100% - 18px), var(--shell)); }
    .game-tab { min-height: 43px; padding: 6px 9px; }
    .site-shortcuts a { font-size: .71rem; padding: 6px 9px; }
    .sound-status {
        grid-template-columns: auto 1fr;
        align-items: start;
        margin-top: 14px;
        padding: 12px;
    }
    .sound-status-actions {
        grid-column: 1 / -1;
        width: 100%;
    }
    .sound-enable-button,
    .sound-help-button {
        flex: 1;
    }
    .coming-soon-shell { padding-block: 36px 58px; }
    .coming-soon-card { padding: 30px 20px; }
    .help-panel { padding: 27px 21px; }
    .setting-test-row { grid-template-columns: 1fr; gap: 10px; }
}

/* 1.4.0 — parcours virtuel 仏検5級 complet */
.deck-card.is-collection {
    border-width: 2px;
    border-color: color-mix(in srgb, var(--deck-accent) 45%, var(--line));
    background: linear-gradient(180deg, color-mix(in srgb, var(--deck-accent) 8%, white), var(--paper) 42%);
}
.deck-card.is-collection .study-button { background: var(--deck-accent, var(--blue-900)); }
.complete-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff4c7;
    color: #735100;
    border: 1px solid #ead48a;
    font-size: .69rem;
    font-weight: 900;
}
