/* ==========================================
   1. 基本レイアウト・全体設定
   ========================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f1f5f9;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 24pt;
    letter-spacing: 1px;
}

header p {
    margin: 10px 0 0 0;
    font-size: 12pt;
    opacity: 0.9;
}

/* 大見出し */
.main-section-title {
    font-family: 'Yu Gothic', 'Meiryo', sans-serif;
    font-size: 18pt;
    font-weight: bold;
    letter-spacing: 1px;
    color: #ffffff;
    background: repeating-linear-gradient(
        -45deg,
        #1e293b,
        #1e293b 4px,
        #1d2636 4px,
        #1d2636 8px
    );
    padding: 12px 20px;
    border-radius: 8px;
    margin-top: 50px;
    margin-bottom: 65px;
    border-left: 8px solid #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.main-section-title:first-of-type {
    margin-top: 10px;
}

/* ==========================================
   2. 学習ブロック外枠（ステップエリア）
   ========================================== */
.step-section {
    background-color: #ffffff;
    border-radius: 0 15px 15px 15px;
    padding: 25px 30px 30px 30px;
    margin-top: 50px;
    margin-bottom: 55px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    border: 2px solid #1e3a8a;
}

.step-title {
    font-size: 14pt;
    color: #ffffff;
    background-color: #1e3a8a;
    margin: 0;
    padding: 0 20px;
    position: absolute;
    left: -2px;
    top: -42px;
    height: 42px;
    display: flex;
    align-items: center;
    font-weight: bold;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

/* 1-1 画像スタイル (トリミングなし・左揃え) */
.intro-list-v {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.intro-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.intro-item h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #1e3a8a;
}

.intro-item ul {
    padding-left: 20px;
    margin: 0 0 15px 0;
    font-size: 10.5pt;
    line-height: 1.6;
}

.intro-img-wrapper {
    text-align: left;
}

.intro-img-wide {
    max-width: 100%;
    height: auto;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #e2e8f0;
    display: inline-block;
}

/* ==========================================
   3. メールデモ画面（1-2, 1-3 & 演習用）
   ========================================== */
.main-layout {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.left-editor {
    display: table-cell;
    width: 60%;
    padding-right: 15px;
    vertical-align: top;
}

.right-nav {
    display: table-cell;
    width: 40%;
    padding-left: 15px;
    vertical-align: top;
}

.email-client {
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.client-header {
    background: #2d3748;
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 0.95rem;
}

.form-group {
    border-bottom: 1px solid #edf2f7;
    padding: 8px 12px;
    display: table;
    width: 100%;
}

.form-group label {
    display: table-cell;
    width: 70px;
    font-weight: bold;
    color: #4a5568;
    font-size: 0.85rem;
    vertical-align: top;
    padding-top: 8px;
}

.form-group input, .form-group textarea {
    display: table-cell;
    width: 100%;
    border: 1px solid #e2e8f0;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: #3182ce;
    background-color: #f7fafc;
}

textarea {
    resize: vertical;
    min-height: 450px;
    font-family: inherit;
    line-height: 1.6;
}

.client-footer {
    padding: 10px 15px;
    background: #f7fafc;
    text-align: right;
}

/* 1-2, 1-3 解説デモ用の本文（さっきの大きさに戻したコンパクトサイズ） */
.demo-client textarea {
    resize: vertical;
    min-height: 240px;
    font-family: inherit;
    line-height: 1.6;
}

/* 2-1 実技演習用の本文（しっかり書き込めるサイズ） */
.task-client textarea {
    resize: vertical;
    min-height: 450px;
    font-family: inherit;
    line-height: 1.6;
}

.nav-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    min-height: 300px;
}

.task-nav-panel {
    min-height: 520px;
}

.panel-title {
    font-size: 1rem;
    font-weight: bold;
    color: #1e3a8a;
    margin-top: 0;
    border-bottom: 2px solid #cbd5e0;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* コピー不可の住所確認ボックス */
.address-info-box {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
    user-select: none;
    -webkit-user-select: none;
}

.address-info-box span.addr-highlight {
    font-weight: bold;
    color: #e53e3e;
    background-color: #fff5f5;
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 4px;
}

.subject-item {
    background: white;
    padding: 8px;
    margin-bottom: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

.subject-item:hover {
    background: #ebf8ff;
    border-color: #63b3ed;
}

.step-container {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.step-header {
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.step-content {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.4;
}

.sample-box {
    background: #f7fafc;
    border-left: 3px solid #3b82f6;
    padding: 8px;
    margin: 6px 0;
    font-size: 0.85rem;
    cursor: pointer;
}

.sample-box:hover {
    background: #eff6ff;
}

.step-nav-btns {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}

.step-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
}

.step-btn:hover:not([disabled]) {
    background: #e2e8f0;
}

.step-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* NG解説用警告ボックス */
.warning-explain-box {
    background-color: #fff1f2;
    border-left: 4px solid #e11d48;
    padding: 12px;
    border-radius: 4px;
    color: #9f1239;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.example-box {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.8rem;
    color: #334155;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* ==========================================
   4. 演習課題エリア設定
   ========================================== */
.task-selector-area {
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.task-selector {
    margin-bottom: 10px;
}

.task-selector label {
    font-weight: bold;
    margin-right: 10px;
}

.task-btn {
    padding: 6px 14px;
    margin-right: 5px;
    border: 1px solid #cbd5e0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.task-btn.active {
    background: #2563eb;
    color: white;
    border-color: #1d4ed8;
    font-weight: bold;
}

.task-goal {
    font-size: 0.95rem;
    color: #1e3a8a;
    font-weight: bold;
    background: #eff6ff;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #2563eb;
}

.send-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 8px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95rem;
}

.send-btn:hover {
    background-color: #1d4ed8;
}

/* グレーの「送信」ボタン（デモ用） */
.btn-dummy {
    background-color: #94a3b8;
    color: white;
    border: none;
    padding: 8px 22px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: not-allowed;
}

/* ==========================================
   5. 提出バー & 成果物出力エリア
   ========================================== */
.submission-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
}

.student-info-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.student-info-inputs label {
    font-size: 11pt;
    font-weight: bold;
    color: #475569;
}

.student-info-inputs input {
    padding: 8px 12px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    font-size: 11pt;
    outline: none;
}

.student-info-inputs input:focus {
    border-color: #2563eb;
}

.input-short { 
    width: 70px; 
    text-align: center; 
}

.input-medium { 
    width: 180px; 
}

.btn-success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    font-size: 12pt;
    font-weight: bold;
    padding: 10px 25px;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* 提出用課題一覧シートのエリア */
#submission-preview {
    margin-top: 25px;
    padding: 15px;
    background: #f0f9ff;
    border: 2px solid #0284c7;
    border-radius: 10px;
    display: none;
}

.preview-header {
    border-bottom: 2px solid #0284c7;
    padding-bottom: 6px;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: #0369a1;
}

.preview-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
    background: #ffffff;
    table-layout: fixed; /* 列幅固定 */
}

.preview-grid th, .preview-grid td {
    border: 1px solid #bae6fd;
    padding: 4px 5px;
    vertical-align: top;
    text-align: left;
    word-break: break-all;
}

.preview-grid th {
    background-color: #e0f2fe;
    color: #0369a1;
    text-align: center;
}

/* 判定列・課題列の折り返し防止 */
.preview-grid td:nth-child(1),
.preview-grid td:nth-child(3) {
    text-align: center;
    white-space: nowrap;
}

.status-success { color: #16a34a; font-weight: bold; }
.status-fail { color: #dc2626; font-weight: bold; }

/* 本文セル：スクロール無し・フォントサイズ縮小で全文出力 */
.pre-text {
    white-space: pre-wrap;
    margin: 0;
    font-family: inherit;
    font-size: 0.75em;
    line-height: 1.35;
    word-break: break-all;
}

/* フッター */
.site-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #cbd5e1;
    text-align: center;
}

.site-footer p {
    font-size: 9.5pt;
    color: #64748b;
    margin: 0;
}



/* 数値入力欄（<input type="number">）の上下ボタン（スピンボタン）を非表示にする */
/* Chrome, Safari, Edge, Opera 用 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* Ex問題用：文例のコピー・選択禁止スタイル */
.example-no-copy {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    background-color: #fff5f5;
    border: 1px dashed #fca5a5;
    cursor: default;
}