/* 小学生英語・クイズ単元一覧専用 */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    color: #333;
    background: linear-gradient(to bottom, #fff 93px, #777 93px, #999 290px, #bbb 500px);
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

body { background-color: #111; }
.page-header .page-navigation { display: none; }
header.page-header { position: relative; z-index: 1000; }

.quiz-list-page {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.quiz-list-hero {
    position: relative;
    z-index: 0;
    width: 100%;
    margin-top: -85px;
    padding: 0;
    text-align: center;
}

.quiz-list-hero::after {
    content: '';
    position: absolute;
    right: -5px;
	z-index:5;
    bottom: -12px;
    z-index: 5;
    width: 56%;
    height: 220px;
    pointer-events: none;
    background: url('../images/hero-sectionVispo_quizListPage.svg') bottom / contain no-repeat;
}

.quiz-list-hero__content {
    position: relative;
    z-index: 3;
    min-height: 410px;
    padding: 40px 12px 235px;
    overflow: hidden;
    color: #fff;
    background-image: linear-gradient(to bottom, #4f0a16 0%, #2e040b 70%, #080808 100%);
    background-color: #111;
}
@media (min-width: 501px) {
.quiz-list-hero {
    margin-top: -45px;
}
.quiz-list-hero__content {
    border-radius:20px 20px 0 0;
}
.quiz-list-modes {
    border-radius: 0 0 20px 20px;
}
.quiz-list-hero__content {
    padding-top: 20px;
}
}

.quiz-list-hero__image {
    position: absolute;
    bottom: 20px;
    left: 50%;
    z-index: 1;
    width: calc(100% - 50px);
    max-width: 450px;
    height: 200px;
    overflow: hidden;
    border-radius: 25px;
    background: url('../english/el/bg.jpg') center / cover no-repeat;
    box-shadow: 0 0 16px rgba(0, 0, 0, .35) inset, 0 5px 0 rgba(0, 0, 0, .25) inset;
    transform: translateX(-50%);
}

.quiz-list-hero__title { position: relative; z-index: 2; margin-top: 0px; }
.quiz-list-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 10vw, 44px);
    font-weight: 900;
    line-height: 1.15;
    -webkit-text-stroke: 6px #000;
    paint-order: stroke fill;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
.quiz-list-hero__school { font-size: .75em; }
.quiz-list-modes__lead { color: #fff; font-weight: 900; }

/* 初回だけ、画面に少し入ってからゆっくり立ち上がるように表示 */
.quiz-unit.is-reveal-pending { opacity: 0; }
.quiz-unit.is-revealing { animation: quizUnitReveal 1.15s cubic-bezier(.2, .55, .3, 1) both; transform-origin: center center; }
@keyframes quizUnitReveal {
    from { opacity: 0; transform: translateY(22px) scale(.86); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.quiz-unit.is-reveal-pending:focus-within { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .quiz-unit.is-reveal-pending { opacity: 1; }
    .quiz-unit.is-revealing { animation: none; }
}

.quiz-list-hero__logo {
    position: absolute;
    top: 20px;
    left: 5px;
    width: 25%;
    max-width: 100px;
    height: 105px;
    background: url('../images/SP-hero-sectionTitleLogo_quiz.svg') center / contain no-repeat;
}
@media (min-width: 501px) {
.quiz-list-hero__logo {
    top: 5px;
    left: 5px;
}
}

.quiz-list-hero__subtitle {
    position: relative;
    z-index: 6;
    margin: 24px 0 0;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.6;
}

.quiz-list-modes { padding: 48px 35px 34px; color: #fff; background: #080808; }
.quiz-list-modes h2 { width: fit-content; margin: 0 auto 20px; padding: 7px 28px; border-radius: 24px; background: #fff; color: #111; font-size: 16px; font-weight: 800; line-height: 1.3; }
.quiz-list-modes dl { margin: 0; }
.quiz-list-modes dl > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 15px; margin-top: 18px; }
.quiz-list-modes dt { font-size: 14px; font-weight: 800; white-space: nowrap; }
.quiz-list-modes dt span { color: #ce7768; font-size: 23px; }
.quiz-list-modes dl > div + div dt span { color: #8c9fca; }
.quiz-list-modes dd { margin: 0; color: #aaa; font-size: 12px; font-weight: 700; line-height: 1.7; }
.quiz-list-chapters-heading { margin: 0 0 24px; text-align: center; }
.quiz-list-chapters-heading h2 { height: 30px; margin: 0; background: url('../images/SP-menuPage-phrase-chapters_quiz.svg') center / contain no-repeat; }
.quiz-list-chapters-heading p { margin: 6px 0 0; color: #606060; font-size: 14px; font-weight: 700; }

.quiz-list-content {
    position: relative;
    z-index: 10;
    margin-top: 0;
    padding: 28px 15px 48px;
    border-radius: 0 0;
    background: #bbb;
}

.quiz-chapter-list { min-height: 180px; }
.quiz-list-loading { padding: 60px 10px; color: #777; font-size: 13px; font-weight: 700; text-align: center; }
.quiz-chapter { margin: 0 -10px 15px; border-radius: 24px; }

.quiz-chapter__toggle {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 82px;
    padding: 20px 15px 20px 20px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: #420a13;
    box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .25s, box-shadow .25s;
}

.quiz-chapter.is-open .quiz-chapter__toggle { color: #fff; background: #111; box-shadow: inset 0 4px 0 #000; }
.quiz-chapter.is-open .quiz-chapter__toggle::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    border-top: 14px solid #111;
    border-right: 14px solid transparent;
    border-left: 14px solid transparent;
    transform: translateX(-50%);
}

.quiz-chapter__title { display: flex; flex-direction: column; gap: 2px; }
.quiz-chapter__number { color: #e0b56e; font-size: 11px; font-weight: 900; }
.quiz-chapter.is-open .quiz-chapter__number { color: #e07b7f; }
.quiz-chapter__title strong { font-size: 18px; font-weight: 800; line-height: 1.3; }
.quiz-chapter__title small { display: block; margin-top: 1px; color: inherit; font-size: 10px; font-weight: 700; opacity: .75; }

.quiz-chapter__toggle-icon {
    position: relative;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-left: 12px;
    border-radius: 50%;
    background: #ebc144;
}
.quiz-chapter__toggle-icon::before,
.quiz-chapter__toggle-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: #111;
    transform: translate(-50%, -50%);
    transition: height .25s, background .25s;
}
.quiz-chapter__toggle-icon::after { width: 2px; height: 12px; }
.quiz-chapter.is-open .quiz-chapter__toggle-icon { background: #5b656b; }
.quiz-chapter.is-open .quiz-chapter__toggle-icon::before { background: #fff; }
.quiz-chapter.is-open .quiz-chapter__toggle-icon::after { height: 0; }

.quiz-chapter__panel { display: none; padding: 20px 10px 35px; }
.quiz-chapter.is-open .quiz-chapter__panel { display: grid; gap: 13px; animation: quizFadeDown .3s ease both; }
@keyframes quizFadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.quiz-unit { overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .11); }
.quiz-unit__info { display: flex; align-items: center; gap: 12px; min-height: 104px; padding: 10px 10px 10px 16px; }
.quiz-unit__thumbnail {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    border: 3px solid #e8e6e6;
    border-radius: 16px;
    object-fit: cover;
    background: #e5e8ec;
}

.quiz-unit__copy { flex: 1 1 auto; min-width: 0; }
.quiz-unit__id { display: block; margin-bottom: 4px; color: #aaa; font-size: 11px; font-weight: 700; line-height: 1; }
.quiz-unit h3 { margin: 0; color: #111; font-size: 18px; font-weight: 700; line-height: 1.3; }
.quiz-unit__subtitle { margin: 4px 0 0; color: #888; font-size: 11px; font-weight: 600; line-height: 1.35; }
.quiz-unit__actions { display: grid; gap: 12px; padding: 0 12px 14px; }

.quiz-unit__primary,
.quiz-unit__secondary {
    display: flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
    border-radius: 13px;
    font-weight: 900;
    text-decoration: none;
}

.quiz-unit__primary {
    min-height: 58px;
    border: none;
    color: #fff;
    background: #5c0815;
    box-shadow: 0 4px 0 #36080f;
    font-size: 26px;
}
.quiz-button__main { line-height: 1; }
.quiz-button__sub { margin-left: 5px; font-size: 14px; font-weight: 800; line-height: 1; opacity:0.6;}
.quiz-unit__primary::after { content: '▶'; margin-left: 9px; font-size: 10px; }
.quiz-unit__secondary {
    min-height: 40px;
    border: none;
    color: #fff;
    background: #121940;
    box-shadow: 0 3px 0 #090e29;
    font-size: 20px;
}
.quiz-unit__secondary .quiz-button__sub { margin-left: 4px; font-size: 12px; font-weight: 700; }
.quiz-unit__secondary::after { content: '›'; margin-left: 8px; font-size: 17px; line-height: 1; }
.quiz-unit__primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #1679ad; }
.quiz-unit__secondary:active { transform: translateY(1px); box-shadow: 0 1px 0 #bbb; }

.quiz-list-footer-nav { padding: 0 15px 65px; text-align: center; }
.quiz-list-footer-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 2px solid #444;
    border-radius: 30px;
    color: #ddd;
    background: #222;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 3px 0 #000;
}

@media (max-width: 360px) {
    .quiz-list-modes { padding-right: 22px; padding-left: 22px; }
    .quiz-list-modes dl > div { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
    .quiz-unit__primary { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* クイズ開始ボタンの配置と共通矢印 */
.quiz-unit__primary,
.quiz-unit__secondary {
    align-items: center;
    justify-content: flex-start;
    padding: 0 18px 0 28px;
}

.quiz-unit__primary::after,
.quiz-unit__secondary::after {
    content: '';
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-left: auto;
    background: url('../images/myPage_icon_arrow-w.svg') center / contain no-repeat;
}
