/* build: FS2606.83 */
/* ==========================================================================
   考査情報ページ — style.css  ANIWAS 26 v2.4
   ========================================================================== */

:root { --w-max: 1200px; }

* { box-sizing: border-box; margin: 0; padding: 0; }

.ei-container {
    max-width: var(--w-max);
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(8px, 4vw, 16px) 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Noto Sans JP', system-ui, sans-serif;
    font-size: 16px;
    color: var(--c-txt);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.15s; }

/* ============================================================
   ヘッダー
   ============================================================ */
.ei-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--c-panel);
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.ei-title { font-size: 1.8rem; font-weight: 800; flex: 1; }

.ei-info-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ei-fetch-item {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-txt);
    white-space: nowrap;
}

.ei-refresh-btn {
    display: inline-flex;
    align-items: center;
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    height: calc(1rem * 1.55 + 12px);
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 700;
    color: var(--c-txt);
    transition: color 0.15s;
    box-sizing: border-box;
}
.ei-refresh-btn:hover { color: var(--c-hover-txt); }

.ei-back {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-txt);
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    height: calc(1rem * 1.55 + 12px);
    white-space: nowrap;
    text-decoration: none !important;
    box-sizing: border-box;
}
.ei-back:hover { color: var(--c-hover-txt); }

/* ============================================================
   改修お知らせ（アコーディオン・臨時公開用 FS2606.81）
   ============================================================ */
.ei-ann {
    background: var(--c-panel);
    border: var(--border-w) solid var(--c-brand);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    margin: 8px 0 4px;
    overflow: hidden;
}

.ei-ann-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: var(--c-panel);
    border: none;
    border-radius: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.ei-ann-head:hover .ei-ann-title { color: var(--c-hover-txt); }

.ei-ann-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--c-brand);
    line-height: 1.4;
    transition: color 0.15s;
}

.ei-ann-arrow {
    font-size: 0.9rem;
    color: var(--c-brand);
    flex-shrink: 0;
    transition: transform 0.2s ease-out;
}
.ei-ann.is-open .ei-ann-arrow { transform: rotate(180deg); }

.ei-ann-body {
    padding: 4px 18px 18px;
    border-top: var(--border-w) solid var(--c-border-lt);
}

.ei-ann-body p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--c-txt);
    line-height: 1.8;
    margin: 10px 0 0;
}

.ei-ann-sec {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--c-brand);
    margin: 18px 0 0;
}

.ei-ann-list {
    margin: 8px 0 0;
    padding-left: 1.5em;
}
.ei-ann-list li {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-txt);
    line-height: 1.8;
}

/* ← Portal 押下時のアテンション */
@keyframes ei-ann-flash {
    0%, 100% { box-shadow: var(--shadow-1); }
    50%      { box-shadow: 0 0 0 4px rgba(0, 68, 204, 0.25); }
}
.ei-ann.is-flash { animation: ei-ann-flash 0.7s ease-in-out 2; }

@media (max-width: 600px) {
    .ei-ann-title { font-size: 1.05rem; }
    .ei-ann-body  { padding: 4px 14px 16px; }
}

/* ============================================================
   タブ
   ============================================================ */
.ei-tabs {
    display: flex;
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.ei-tab {
    flex: 1;
    padding: 12px 12px;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--c-panel);
    border: none;
    border-right: var(--border-w) solid var(--c-border);
    border-radius: 0;
    color: var(--c-txt);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.ei-tab:last-child { border-right: none; }
.ei-tab:hover:not(.active) { color: var(--c-hover-txt); }
.ei-tab.active { background: var(--c-active); color: #fff; }

/* ============================================================
   コンテンツエリア
   ============================================================ */
.ei-content { display: none; }
.ei-content.active { display: block; }

.ei-msg {
    text-align: center;
    padding: 32px;
    color: var(--c-muted);
    font-weight: 700;
    font-size: 1.1rem;
}

.ei-notice {
    background: #fff8e1;
    border: var(--border-w) solid #e0a800;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 700;
    color: #6d4c00;
    margin-bottom: 4px;
}

/* ============================================================
   提出物 — カレンダー（月次グリッド）+ 考査当日 一体型
   ============================================================ */
.sub-cal-panel {
    background: var(--c-panel);
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    margin-bottom: 4px;
}

.sub-cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: var(--border-w) solid var(--c-border-lt);
}

.sub-cal-month-label { font-size: 1.6rem; font-weight: 800; }

.sub-cal-nav-btns { display: flex; gap: 2px; align-items: center; }

.sub-cal-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
    background: none !important;
    border: none;
    cursor: pointer;
    color: var(--c-txt) !important;
    padding: 0 4px;
    transition: color 0.15s;
}
.sub-cal-arrow svg { width: 36px; height: 36px; display: block; }
.sub-cal-arrow:hover,
.sub-cal-arrow:active { color: var(--c-hover-txt) !important; background: none !important; }

.sub-cal-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: var(--border-w) solid var(--c-border-lt);
    background: var(--c-bg);
}

.sub-cal-dow {
    text-align: center;
    padding: 8px 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--c-sub);
}
.sub-cal-dow.is-sun { color: var(--c-red); }
.sub-cal-dow.is-sat { color: var(--c-brand); }

.sub-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }

.sub-cal-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 4px 6px;
    min-height: 82px;
    border-bottom: 1px solid var(--c-border-lt);
    border-right: 1px solid var(--c-border-lt);
    gap: 3px;
    position: relative;
}
.sub-cal-cell:nth-child(7n) { border-right: none; }
.sub-cal-cell.empty         { visibility: hidden; }
.sub-cal-cell.is-today      { background: #eef1fc; }

/* 過去日：枠線を残して中身を白くにごらせる */
.sub-cal-cell.is-past::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.62);
    pointer-events: none;
}

/* 前月・翌月の日付：薄く表示 */
.sub-cal-cell.is-other-month .sub-cal-day-num {
    color: var(--c-muted);
    font-weight: 400;
}
.sub-cal-cell.is-other-month .sub-cal-badge,
.sub-cal-cell.is-other-month .sub-cal-exam-label {
    opacity: 0.5;
}

.sub-cal-day-num {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1;
}
.sub-cal-cell.is-sun .sub-cal-day-num { color: var(--c-red); }
.sub-cal-cell.is-sat .sub-cal-day-num { color: var(--c-brand); }
.sub-cal-cell.is-today .sub-cal-day-num { color: var(--c-active); font-weight: 800; }

.sub-cal-badge {
    display: block;
    width: 100%;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 2px 4px;
    border: var(--border-w) solid var(--c-active);
    border-radius: 3px;
    color: var(--c-active);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s, color 0.12s;
}
.sub-cal-badge:hover {
    background: var(--c-active);
    color: #fff;
}
.sub-cal-badge.is-done {
    border-color: var(--c-border-lt);
    color: var(--c-muted);
    text-decoration: line-through;
}

/* 考査当日セクション（カレンダーパネル内） */
.sub-exam-day {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 16px;
    border-top: var(--border-w) solid var(--c-border-lt);
    background: var(--c-panel);
}

.sub-exam-day-label {
    font-size: 1rem;
    font-weight: 800;
    color: var(--c-txt);
    flex-shrink: 0;
    white-space: nowrap;
    padding-top: 2px;
}

.sub-exam-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.sub-exam-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.sub-exam-subject {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--c-active);
    border: 1px solid var(--c-active);
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    white-space: nowrap;
}

.sub-exam-desc { color: var(--c-txt); font-weight: 600; }
.sub-exam-item.is-done .sub-exam-desc { text-decoration: line-through; color: var(--c-muted); }

/* ============================================================
   提出物 — コントロールボタン
   ============================================================ */
.sub-controls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px 0;
}

.sub-ctrl-btn {
    padding: 7px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--c-panel);
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-txt);
    cursor: pointer;
    transition: color 0.15s;
    box-shadow: var(--shadow-1);
}
.sub-ctrl-btn:hover { color: var(--c-hover-txt); }
.sub-ctrl-btn.is-active { background: var(--c-active); color: #fff; border-color: var(--c-active); }

/* ============================================================
   提出物 — フラットリスト
   ============================================================ */
.sub-list-panel {
    background: var(--c-panel);
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.sub-separator {
    padding: 7px 16px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--c-txt);
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border-lt);
    letter-spacing: 0.05em;
}

@keyframes ei-check-pop {
    0%   { transform: translateX(0) scale(1); }
    25%  { transform: translateX(5px) scale(1.005); }
    65%  { transform: translateX(-2px) scale(0.998); }
    100% { transform: translateX(0) scale(1); }
}

.sub-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px 17px;
    border-bottom: 1px solid var(--c-border-lt);
    transition: background 0.15s;
    position: relative;
}
.sub-row:last-child { border-bottom: none; }
.sub-row.is-done { background: #f5faf5; }
.sub-row.just-checked { animation: ei-check-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

.sub-row-check {
    flex-shrink: 0;
    padding-top: 4px;
    cursor: pointer;
}

.sub-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--c-active);
}

.sub-row-body { flex: 1; min-width: 0; }

.sub-row-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.sub-row-abbr {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--c-txt);
    border: 1.5px solid var(--c-border);
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
    white-space: nowrap;
}

.sub-row-title {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--c-txt);
    word-break: break-word;
}
.sub-row.is-done .sub-row-title { text-decoration: line-through; color: var(--c-muted); }

.sub-row-date {
    font-size: 1rem;
    font-weight: 800;
    color: var(--c-txt);
    white-space: nowrap;
    flex-shrink: 0;
}

.sub-row-expand {
    font-size: 0.7rem;
    color: var(--c-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.sub-row.is-expanded .sub-row-expand { transform: rotate(180deg); }

.sub-row-detail {
    margin-top: 8px;
    font-size: 1.05rem;
    color: var(--c-txt);
    line-height: 1.6;
}

.sub-row-detail-text {
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 6px;
}

.sub-row-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: var(--border-w) solid var(--c-border-lt);
    flex-wrap: wrap;
    white-space: normal;
}

.sub-row-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.sub-progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    min-width: 40px;
}

.sub-progress-fill {
    height: 100%;
    background: var(--c-active);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.sub-progress-fill.is-complete { background: var(--c-success); }

.sub-progress-input {
    font-size: 0.9rem;
    color: var(--c-sub);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sub-pages-input {
    width: 50px;
    padding: 3px 6px;
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    text-align: right;
    color: var(--c-txt);
}
.sub-pages-input:focus { outline: none; border-color: var(--c-active); }

/* ============================================================
   試験範囲 — 科目ナビ
   ============================================================ */
.ei-sub-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 6px;
    scrollbar-width: thin;
}

.sub-nav-btn {
    flex-shrink: 0;
    padding: 9px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--c-panel);
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-txt);
    cursor: pointer;
    transition: color 0.15s;
    box-shadow: var(--shadow-1);
}
.sub-nav-btn:hover { color: var(--c-hover-txt); }

/* ============================================================
   試験範囲 — モード切替
   ============================================================ */
.scope-mode-wrap {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    background: var(--c-panel);
}

.scope-mode-label { display: none; }

.scope-mode-btn {
    padding: 8px 22px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-right: var(--border-w) solid var(--c-border);
    border-radius: 0;
    background: transparent;
    color: var(--c-txt);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.scope-mode-btn:last-child { border-right: none; }
.scope-mode-btn:hover:not(.active) { color: var(--c-hover-txt); }
.scope-mode-btn.active { background: var(--c-active); color: #fff; }

/* ============================================================
   試験範囲 — カード
   ============================================================ */
.ei-scope-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scope-card {
    background: var(--c-panel);
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.scope-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: var(--border-w) solid var(--c-border-lt);
    flex-wrap: wrap;
    gap: 6px;
}

.scope-card-header-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scope-card-title { font-size: 1.6rem; font-weight: 800; }

.collection-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: var(--border-w) solid;
}
.badge-predicted { border-color: var(--c-brand);   color: var(--c-brand); }   /* 予測情報=青 */
.badge-official  { border-color: var(--c-success); color: var(--c-success); } /* 公式情報=緑 */
.badge-certified { border-color: #b08000;          color: #b08000; }          /* 認定情報=黄(アンバー) */

.scope-card-body {
    position: relative;
    max-height: 130px;
    overflow: hidden;
    padding: 12px 16px;
    transition: max-height 0.35s ease;
}
.scope-card-body::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 54px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
    transition: opacity 0.25s;
}
.scope-card.expanded .scope-card-body { max-height: 3000px; }
.scope-card.expanded .scope-card-body::after { opacity: 0; }

/* 試験範囲のフィールドラベル */
.scope-field-label {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--c-txt);
    display: inline-block;
    margin-bottom: 6px;
    margin-top: 12px;
    letter-spacing: 0.02em;
}
.scope-field-label:first-child { margin-top: 0; }

/* § セクション */
.scope-sec { margin-bottom: 6px; }
.scope-sec:last-child { margin-bottom: 0; }

.scope-sec-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--c-txt);
    display: block;
    margin-bottom: 3px;
}

.scope-sec-body {
    font-size: 1rem;
    color: var(--c-txt);
    line-height: 1.6;
    white-space: pre-wrap;
    padding-left: 10px;
}

.scope-updated {
    font-size: 0.9rem;
    color: var(--c-muted);
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--c-border-lt);
}

.scope-card-footer {
    display: flex;
    align-items: center;
    border-top: var(--border-w) solid var(--c-border-lt);
}

.scope-expand-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 800;
    font-family: inherit;
    color: var(--c-active);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}
.scope-expand-btn:hover { color: var(--c-hover-txt); }

.scope-goto-sub {
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--c-muted);
    background: transparent;
    border: none;
    border-left: var(--border-w) solid var(--c-border-lt);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
}
.scope-goto-sub:hover { color: var(--c-active); }

/* ============================================================
   試験範囲 — 表モード
   ============================================================ */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-panel);
    box-shadow: var(--shadow-1);
}

.scope-table { width: 100%; border-collapse: collapse; }

.scope-table th,
.scope-table td {
    border-bottom: 1px solid var(--c-border-lt);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    font-size: 1rem;
    line-height: 1.6;
}
.scope-table tr:last-child td { border-bottom: none; }
.scope-table tbody tr:nth-child(even) { background: #f8f8f8; }
.scope-table th {
    background: var(--c-bg);
    font-weight: 800;
    white-space: nowrap;
    border-bottom: var(--border-w) solid var(--c-border);
    font-size: 0.95rem;
}
.scope-table td .scope-sec-title { font-size: 1rem; }
.scope-table td .scope-sec-body  { font-size: 0.92rem; }
.scope-table .scope-field-label  { font-size: 0.82rem; margin-top: 6px; }

/* ============================================================
   試験日程
   ============================================================ */
.ei-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sch-day {
    background: var(--c-panel);
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.sch-day-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 13px 16px;
    background: var(--c-bg);
    border-bottom: var(--border-w) solid var(--c-border-lt);
}

.sch-day-label { font-size: 1.5rem; font-weight: 800; color: var(--c-txt); }
.sch-day-date  { font-size: 1.15rem; font-weight: 700; color: var(--c-txt); }

.sch-periods { display: flex; flex-direction: column; }

.sch-period-row {
    display: flex;
    min-height: 56px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--c-border-lt);
}
.sch-period-row:last-child { border-bottom: none; }

.sch-period-time {
    width: 70px;
    flex-shrink: 0;
    padding: 10px 8px;
    text-align: center;
    background: var(--c-bg);
    border-right: var(--border-w) solid var(--c-border-lt);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sch-period-num   { font-size: 1.1rem; font-weight: 700; color: var(--c-txt); }
.sch-period-range { font-size: 0.85rem; color: var(--c-muted); margin-top: 2px; }

.sch-period-info {
    flex: 1;
    padding: 10px 16px;
    display: flex;
    align-items: center;
}

.sch-period-subject { font-size: 1.4rem; font-weight: 800; color: var(--c-txt); }

/* 考査日カレンダーセル */
.sub-cal-cell.is-exam-day { background: #fff0ee; }

.sub-cal-exam-label {
    display: block;
    width: 100%;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--c-red);
    border: 1.5px solid var(--c-red);
    border-radius: 3px;
    padding: 2px 3px;
    line-height: 1.3;
    text-align: center;
    letter-spacing: 0.03em;
}

/* 底辺進捗バー（格納時） */
.sub-row-bar-outer {
    position: absolute;
    bottom: 5px; left: 12px; right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sub-row-bar {
    flex: 1;
    height: 8px;
    background: var(--c-border-lt);
    border-radius: 4px;
    overflow: hidden;
}
.sub-row-bar-fill {
    height: 100%;
    background: var(--c-active);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.sub-row-bar-fill.is-complete { background: var(--c-success); }
.sub-row-bar-pct {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--c-active);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}
.sub-row.is-expanded .sub-row-bar-outer { display: none; }

/* → 試験範囲 ボタン */
.sub-goto-scope {
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--c-active);
    background: transparent;
    border: var(--border-w) solid var(--c-active);
    border-radius: 0;
    padding: 4px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.sub-goto-scope:hover { color: var(--c-hover-txt); }

/* 提出物リスト — インライン進捗 */
.sub-row-pct {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--c-active);
    flex-shrink: 0;
    white-space: nowrap;
}

/* 提出物リスト — 更新時刻 */
.sub-row-updated {
    font-size: 0.82rem;
    color: var(--c-muted);
}

/* 展開時進捗 % */
.sub-progress-pct {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--c-active);
    white-space: nowrap;
    margin-right: 4px;
}

/* 免責事項 */
.ei-disclaimer {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-muted);
    line-height: 1.7;
    padding: 2px 4px;
    margin-top: 4px;
}

/* ============================================================
   コントロール — 縦線区切り
   ============================================================ */
.sub-ctrl-divider {
    width: 1px;
    height: 28px;
    background: var(--c-border);
    align-self: center;
    flex-shrink: 0;
    margin: 0 2px;
}

/* コントロール内セグメントボタン（サイズ抑制） */
.sub-ctrl-seg {
    margin-bottom: 0;
    box-shadow: none;
}
.sub-ctrl-seg .scope-mode-btn {
    padding: 7px 12px;
    font-size: 0.88rem;
}

/* ============================================================
   提出物 — メタバッジ（status / type）
   ============================================================ */
.sub-row-meta {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.sub-meta-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid;
    line-height: 1.5;
}
.sub-badge-confirmed { border-color: var(--c-success); color: var(--c-success); }
.sub-badge-estimated { border-color: var(--c-muted);   color: var(--c-muted); }
.sub-badge-type      { border-color: var(--c-border);  color: var(--c-txt); }

/* ============================================================
   提出物 — 非選択科目セパレーター
   ============================================================ */
.sub-separator-nonsel {
    color: var(--c-muted);
    border-top: var(--border-w) solid var(--c-border);
    background: #ececec;
}

/* ============================================================
   試験範囲カード — フィールドセクション区切り
   ============================================================ */
.scope-field-section {
    border-top: 1px solid var(--c-border-lt);
    padding-top: 10px;
    margin-top: 10px;
}
.scope-field-section:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}
.scope-field-section .scope-field-label { margin-top: 0; }

/* ============================================================
   提出物 — 状況セパレーター色
   ============================================================ */
.sub-separator-official  { color: var(--c-success); background: #eef7ee; }
.sub-separator-estimated { color: var(--c-brand);   background: #eef1fc; }

/* ============================================================
   科目選択プルダウン
   ============================================================ */
.sub-sel-subject {
    height: calc(0.95rem * 1.55 + 14px);
    padding: 0 28px 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-panel);
    color: var(--c-txt);
    cursor: pointer;
    box-shadow: var(--shadow-1);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230a0a0a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}
.sub-sel-subject:focus { outline: none; border-color: var(--c-active); }

/* 試験範囲コントロール行（カード/一覧表＋科目選択）*/
.scope-ctrl-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.scope-ctrl-row .scope-mode-wrap { margin-bottom: 0; }
/* プルダウン（.sub-sel-subject）と高さを揃える */
.scope-ctrl-row .scope-mode-btn { padding: 5px 22px; }

/* ============================================================
   試験範囲 — 非選択科目セパレーター
   ============================================================ */
.scope-nonsel-sep {
    padding: 7px 16px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--c-muted);
    background: var(--c-bg);
    border: var(--border-w) solid var(--c-border);
    border-radius: var(--radius-sm);
    margin: 4px 0;
}

.scope-nonsel-sep-row td {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--c-muted);
    background: var(--c-bg) !important;
    border-top: var(--border-w) solid var(--c-border);
}

/* 提出物 — 学習カウンタボタン */
.sub-learn-btn {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--c-txt);
    background: transparent;
    border: var(--border-w) solid var(--c-border);
    border-radius: 0;
    padding: 4px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-block;
}
.sub-learn-btn:hover { color: var(--c-hover-txt); }

/* 提出物 — 展開時 種別表示 */
.sub-row-type {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--c-muted);
    margin-top: 4px;
    margin-bottom: 4px;
}

/* ============================================================
   モバイル
   ============================================================ */
@media (max-width: 768px) {
    .ei-container { width: 100%; padding: 0 clamp(8px, 4vw, 16px) 16px; }

    .ei-header {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: "title back" "info info";
        gap: 4px 8px;
        padding: 6px 12px;
    }
    .ei-title    { grid-area: title; font-size: 1.4rem; }
    .ei-back     { grid-area: back; font-size: 0.85rem; padding: 0 10px; height: calc(0.85rem * 1.55 + 10px); }
    .ei-info-ctrl { grid-area: info; justify-self: end; }
    .ei-fetch-item { font-size: 0.85rem; }
    .ei-refresh-btn { font-size: 0.85rem; padding: 0 10px; height: calc(0.85rem * 1.55 + 12px); }

    .ei-tab { font-size: 1rem; padding: 11px 4px; }
    .ei-sub-nav { flex-wrap: wrap; overflow-x: hidden; gap: 4px; }
    .sub-nav-btn { flex-shrink: 0; padding: 7px 14px; font-size: 0.95rem; }

    .sub-cal-nav { padding: 8px 12px; }
    .sub-cal-month-label { font-size: 1.3rem; }
    .sub-cal-nav-btn { padding: 5px 12px; font-size: 0.9rem; }
    .sub-cal-dow   { font-size: 0.85rem; padding: 6px 0; }
    .sub-cal-cell  { min-height: 68px; padding: 6px 3px 4px; }
    .sub-cal-day-num { font-size: 1.1rem; }
    .sub-cal-badge { font-size: 0.72rem; padding: 1px 2px; }

    .sub-exam-day  { padding: 8px 12px; gap: 10px; }
    .sub-exam-day-label { font-size: 0.9rem; }
    .sub-exam-desc { font-size: 0.88rem; }

    .sub-ctrl-btn { font-size: 0.88rem; padding: 6px 12px; }
    /* 科目選択を2行目へ */
    .sub-controls { flex-wrap: wrap; gap: 4px 6px; }
    .sub-ctrl-divider { width: 100%; height: 0; background: transparent; margin: 0; }
    .sub-sel-subject { font-size: 0.85rem; }

    .sub-row { padding: 10px 12px 18px; }
    .sub-row-title { font-size: 0.95rem; }
    .sub-row-date  { font-size: 0.88rem; }
    .sub-row-detail-text { font-size: 0.88rem; }

    .scope-card-header { padding: 10px 12px; }
    .scope-card-body   { padding: 10px 12px; }
    .scope-card-title  { font-size: 1.25rem; }
    .scope-sec-title   { font-size: 0.95rem; }
    .scope-sec-body    { font-size: 0.85rem; }
    .scope-mode-btn    { font-size: 0.9rem; padding: 6px 14px; }
    .scope-mode-label  { font-size: 0.9rem; }

    .scope-table th,
    .scope-table td { padding: 7px 8px; font-size: 0.82rem; }
    .collection-badge { font-size: 0.82rem; padding: 3px 8px; }

    .sch-day-header     { padding: 10px 12px; gap: 6px; }
    .sch-day-label      { font-size: 1.3rem; }
    .sch-day-date       { font-size: 1rem; }
    .sch-period-row     { min-height: 54px; }
    .sch-period-time    { width: 64px; padding: 8px 4px; }
    .sch-period-num     { font-size: 1rem; }
    .sch-period-range   { font-size: 0.78rem; }
    .sch-period-subject { font-size: 1.2rem; }
}
