@charset "UTF-8";
/* ====== merged style.css ====== */

/* 全体 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans JP", sans-serif;
    font-size: 16px;
    line-height: 1.4;
    background: #f3f6fb;
    color: #222;
}

/* 共通コンテナ（旧：container） */
.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 1rem 2rem 1rem;
    box-sizing: border-box;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ページ全体をカード風に（新：page-container） */
.page-container {
    max-width: 1200px;
    margin: 28px auto;
    background: #fff;
    border-radius: 12px;
    padding: 18px 22px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.page-container h1 {
    margin-top: 0.2em;
    margin-bottom: 0.5em;
}

.page-container h2 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* 見出し */
h1 {
    margin-top: 0;
    font-size: 1.4rem;
}

.top-right {
    text-align: right;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.error {
    color: #d00;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

label {
    display: block;
    margin: 0.4rem 0 0.15rem;
    font-size: 0.9rem;
}

/* フォーム系 */
input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

textarea {
    min-height: 4rem;
    resize: vertical;
}

button {
    margin-top: 0.6rem;
    padding: 0.45rem 1.1rem;
    font-size: 1rem;
    border-radius: 6px;
    border: none;
    background: #1976d2;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
button:hover { background:#155fa8; }
button:active { background:#0f4a84; }

/* 共通ボタンスタイル */
.btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    background: #4a90e2;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:hover {
    background: #357abf;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* 追加：小さいボタン */
.btn.btn-sm {
    padding: 4px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.btn.btn-sm:hover {
    transform: translateY(-1px);
}

/* ログアウトなど、控えめなボタンにしたい場合 */
.btn.btn-secondary {
    background: #9e9e9e;
}
.btn.btn-secondary:hover {
    background: #7e7e7e;
}

/* 教科選択（テーブル） */
.subject-table {
    border-collapse: collapse;
    margin-top: 1em;
    width: 100%;
    background: #fafafa;
}

.subject-table th,
.subject-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: center;
}

.subject-table th {
    background: #e0e7ff;
    font-weight: bold;
}

.subject-table tr:nth-child(even) td {
    background: #f8f9ff;
}

/* マイページの教科リスト */
.subject-list a {
    display: block;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.4rem;
    border-radius: 8px;
    text-decoration: none;
    background: #f3f7ff;
    border: 1px solid #d2ddff;
    color: #224488;
}
.subject-list a:hover {
    background: #e5efff;
}

/* メッセージボックス（統一：黄色系） */
.message-box {
    margin: 10px 0 16px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    font-size: 0.95rem;
}

/* 管理画面の説明カード */
.admin-note {
    margin: 10px 0 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f6f8ff;
    border: 1px solid #d9defa;
    color: #2b2f55;
    line-height: 1.5;
    font-size: 0.8rem;
}

.admin-form {
    padding: 0.6rem 0.8rem 0.7rem;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #e4e4e4;
}
.admin-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.45rem;
}
.admin-form-row label {
    min-width: 80px;
}

/* 横長ページ用 */
.container-wide {
    max-width: 1600px;
}

/* ヘッダのボタン列 */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 10px 0 16px;
}

.muted {
    color: #777;
    font-size: 0.85rem;
}

/* 出題条件フォーム */
.controls {
    margin-bottom: 1rem;
    padding: 0.7rem 0.8rem 0.6rem;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #e4e4e4;
}
.controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.4rem;
}
.controls-row label { margin: 0; }
.controls-row select,
.controls-row input[type="number"] {
    max-width: 140px;
}
.controls-row button { margin-left: auto; }

/* 問題一覧 */
.questions { margin-top: 0.7rem; }
.question-block {
    margin-bottom: 0.6rem;
    padding: 0.45rem 0.8rem 0.55rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.question-line {
    margin-bottom: 0.25rem;
    white-space: normal;
    font-weight: 500;
}
.answer-input {
    width: 100%;
    margin: 0;
}

/* 画像アップロードラベル（学習側） */
.photo-upload {
    margin-top: 0.25rem;
    font-size: 0.8rem;
}
.photo-upload input[type="file"] { font-size: 0.8rem; }

/* 単語リストなど */
.vocab-section {
    margin-top: 1.2rem;
    padding: 0.7rem 0.8rem 0.5rem;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #e4e4e4;
}
.vocab-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.vocab-section table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.vocab-section th,
.vocab-section td {
    padding: 0.22em 0.6em;
    vertical-align: top;
}
.vocab-section th {
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* ログへのリンク */
.log-link {
    margin-top: 0.8rem;
    font-size: 0.9rem;
}
.log-link a {
    color: #1976d2;
    text-decoration: none;
}
.log-link a:hover { text-decoration: underline; }

/* お父さん専用設定 */
hr {
    margin: 1.4rem 0 0.9rem;
    border: none;
    border-top: 1px solid #ddd;
}
.settings-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

/* ログ一覧・ログ表示テーブル */
.log-table {
    width: 100%;
    table-layout: fixed; /* セル幅を固定化して、内容で横に伸びないようにする */
    border-collapse: collapse;
    margin-top: 0.6rem;
    font-size: 0.9rem;
}
.log-table th,
.log-table td {
    border: 1px solid #ddd;
    padding: 0.2rem 0.4rem;
    white-space: pre-wrap;      /* 改行は活かしつつ折り返す */
    overflow-wrap: anywhere;    /* 長い英数字でも強制的に折り返す（最重要） */
    word-break: break-word;     /* 古いブラウザ向け保険 */
    vertical-align: top;
}
.log-table th { background: #f0f0f0; }


/* 行単位編集テーブル（管理DB編集） */
.db-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.8rem;
    background: #fafafa;
}

.db-table th,
.db-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    vertical-align: top;
    font-size: 0.9rem;
}

.db-table th {
    background: #e0e7ff;
    font-weight: 700;
    text-align: center;
}

.db-table__lineno {
    width: 72px;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
    background: #f8f9ff;
}

.db-table__textarea {
    width: 100%;
    height: 2.8em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
}

.db-table__imgcell {
    width: 310px;
    font-size: 0.85rem;
    color: #555;
}

.db-table__delete {
    width: 70px;
    text-align: center;
}

.confirm-row {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

/* ページャ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 14px 0;
}
.pager .pager-info {
    color: #555;
    font-size: 0.9rem;
    margin-left: auto;
}
.pager a.btn { text-decoration: none; }
.pager .btn.btn-secondary { background: #b0b0b0; }

/* サムネイル（管理画面：既存） */
.thumbnail {
    width: 200px;
    max-height: 200px;
    object-fit: contain;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

/* サムネイル（別名：thumb-img） */
.thumb-img {
    max-width: 120px;
    max-height: 120px;
    cursor: zoom-in;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}
.thumb-img:hover { opacity: 0.8; }

/* クリック拡大用Overlay（別実装） */
#img-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
#img-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    cursor: zoom-out;
}

/* モーダル共通（thumbnail側で使用） */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.75);
}

.modal-content {
    margin: 3% auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    cursor: zoom-out;
    background: #fff;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
}

/* 追加：確認モーダル（カード） */
.modal-card {
    background: #fff;
    margin: 4% auto;
    max-width: 980px;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}
.modal-card h3 { margin: 0 0 10px; }
.modal-card .modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.modal-card .modal-block {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background: #fafafa;
}
.modal-card .modal-block h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}
.modal-card pre {
    margin: 0;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
}
.modal-card img {
    max-width: 100%;
    max-height: 340px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
}
.modal-card .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

/* 行ハイライト */
.highlight-line { animation: highlightFlash 2s ease-out; }
@keyframes highlightFlash {
    0%   { background-color: #fff3cd; }
    100% { background-color: transparent; }
}

/* admin_db_textarea_edit 用（行番号付き） */
.editor-wrapper {
    position: relative;
    display: flex;
    max-height: 480px;
    overflow: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}
/* 行番号 */
.line-numbers {
    background: #f0f0f0;
    padding: 8px 6px;
    text-align: right;
    color: #666;
    font-family: Consolas, monospace;
    font-size: 0.9rem;      /* textarea と合わせる */
    line-height: 1.35;      /* textarea と合わせる（重要） */
    user-select: none;
    border-right: 1px solid #ccc;
    white-space: pre;

    height: 480px;          /* textarea と同じ高さに固定 */
    overflow: hidden;       /* 自分ではスクロールしない（同期で動かす） */
    box-sizing: border-box;
    min-width: 3.2em;
}

/* 本文 */
#dbTextarea {
    width: 100%;
    height: 480px;
    font-family: Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.35;      /* 行番号と必ず一致させる（重要） */
    box-sizing: border-box;
    padding: 8px 10px;
    white-space: pre;
    overflow: auto;
    border: none;
    outline: none;
    resize: vertical;
}



/* 今日のポイント（冒頭メッセージ） */
.intro-card{
    margin: 14px 0 12px;
    padding: 14px 16px;
    background: #f0ffff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 5px 10px rgba(0,0,0,.06);
    width: 70%;
    max-width: 720px;
}
.intro-card__header { margin-bottom: 10px; }
.intro-card__badge{
    display: inline-block;
    padding: 4px 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #2f3a5a;
    background: #eef9ff;
    border: 1px solid #aaa;
    border-radius: 3px;
}
.intro-card__body{
    white-space: pre-wrap;
    line-height: 1.7;
    color: #1f2a44;
}

/* レスポンシブ */
@media (max-width: 1800px) {
    .container {
        padding: 0.8rem 0.9rem 1.1rem;
        border-radius: 0;
        box-shadow: none;
    }
    .controls-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .controls-row button {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 1400px) {
    .container-wide {
        max-width: calc(100% - 32px);
    }
}

@media (max-width: 820px) {
    .modal-card .modal-row {
        grid-template-columns: 1fr;
    }
}


/* ===== 管理画面共通 ===== */

.admin-logo {
    width: 30%;
    /*max-width: 400px;*/
}

.admin-userinfo {
    text-align: right;
    margin-top: -8px;
    font-size: 0.9em;
    color: #444;
}

.admin-userinfo span {
    opacity: 0.7;
}

.message-box {
    margin: 12px 0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.95em;
}

.message-box.is-success {
    background: #e8f5e9;
    color: #256029;
}

.message-box.is-warn {
    background: #fff8e1;
    color: #7a5a00;
}

.message-box.is-error {
    background: #fdecea;
    color: #8a1f17;
}




#previewModalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#previewModal {
  background: #fff;
  width: min(900px, 92vw);
  max-height: 90vh;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

#previewModal .modal-header {
  padding: 10px 14px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#previewModal .modal-header button {
  font-size: 20px;
  border: none;
  background: none;
  cursor: pointer;
}

#previewModal .modal-body {
  padding: 14px;
  overflow-y: auto;
}

#previewList li {
  margin-bottom: 12px;
}



.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.dashboard-title {
    margin: 0;
}

.dashboard-meta {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

.dashboard-meta a {
    color: #4a90e2;
    text-decoration: none;
}
.dashboard-meta a:hover {
    text-decoration: underline;
}

.menu-section-title {
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 0;
    list-style: none;
    margin: 0;
}

.menu-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
}

.menu-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.menu-card-icon {
    font-size: 1.7rem;
}

.menu-card-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.menu-card-desc {
    font-size: 0.85rem;
    color: #666;
    margin: 0.3rem 0 0.8rem;
}

.menu-card .btn {
    align-self: flex-start;
    font-size: 0.85rem;
    padding: 4px 10px;
}



/* 追従ボタン */
.vocab-fab{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background:#4CAF50;
  color:#fff;
  text-decoration:none;
  box-shadow:0 2px 6px rgba(0,0,0,.25);
  cursor:pointer;
  user-select:none;
}

/* オーバーレイ */
.vocab-overlay{
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 9998;
  background: rgba(0,0,0,.35);
  display: none;
}

/* カード本体 */
.vocab-card{
  position: absolute;
  right: 16px;
  bottom: 140px;          /* ボタンの上に出す */
  width: min(520px, calc(100% - 32px));
  max-height: min(70vh, 560px);
  overflow: auto;
  background:#fff;
  border-radius:12px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);
  border: 1px solid #ddd;
  padding: 12px;
}

.vocab-card h2{ margin: 0 0 8px 0; font-size: 18px; }
.vocab-card .vocab-close{
  float: right;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.vocab-card table{ width:100%; border-collapse: collapse; }
.vocab-card th,.vocab-card td{ border-bottom:1px solid #eee; padding:6px 8px; }

/* 追従ボタン（冒頭メッセージ） */
.intro-fab{
  position: fixed;
  right: 16px;
  bottom: 72px; /* vocabボタンの上 */
  z-index: 9999;
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background:#4CAF50;
  color:#fff;
  text-decoration:none;
  box-shadow:0 2px 6px rgba(0,0,0,.25);
  cursor:pointer;
  user-select:none;
}

/* オーバーレイ（冒頭メッセージ） */
.intro-popup-overlay{
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 9998;
  background: rgba(0,0,0,.35);
  display: none; /* 初期は必ず非表示 */
}

/* ポップアップカード本体（冒頭メッセージ） */
.intro-popup{
  position: absolute;
  right: 16px;
  bottom: 128px; /* introボタンの上に出す */
  width: min(700px, calc(100% - 32px));
  max-height: min(70vh, 620px);
  overflow: auto;
  background:#fff;
  border-radius:12px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);
  border: 1px solid #ddd;
  padding: 12px 14px;
}

.intro-popup h2{ margin: 0 0 8px 0; font-size: 18px; }
.intro-popup .intro-close{
  float: right;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.intro-popup .intro-body{
  white-space: pre-wrap;
  line-height: 1.7;
}


.stg-btn {
  background: #111;
  color: #00ff66;
  border: 2px solid #00ff66;
  padding: 10px 18px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stg-btn:hover {
  background: #00ff66;
  color: #000;
  box-shadow: 0 0 12px #00ff66;
}

.stg-btn:active {
  transform: scale(0.96);
  box-shadow: 0 0 4px #00ff66;
}


.stg-btn-minimal {
  background: transparent;
  color: #00ff66;
  border: 1px solid #00ff66;
  padding: 1px 1px;
  font-family: monospace;
  cursor: pointer;
  transition: 0.15s;
  font-size: 12px;

}

.stg-btn-minimal:hover {
  background: rgba(0,255,102,0.15);
  box-shadow: 0 0 8px #00ff66;
}

.stg-btn-minimal.danger:hover {
  background: #ff0033;
  border-color: #ff0033;
  box-shadow: 0 0 12px #ff0033;
}


/* practice.php: 手書き回答 */
.draw-actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.draw-file-label {
    font-size: 0.86rem;
    color: #555;
}

.draw-modal {
    z-index: 12000;
}

.draw-modal-card {
    width: min(1100px, 95vw);
    margin: 2vh auto;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.draw-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.draw-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.draw-close {
    margin-top: 0;
    padding: 2px 10px;
    font-size: 1.2rem;
    line-height: 1.2;
}

.draw-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.draw-toolbar label {
    margin: 0;
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.draw-toolbar button {
    margin-top: 0;
    padding: 6px 10px;
    font-size: 0.9rem;
}

.draw-help {
    margin: 8px 0 10px;
    font-size: 0.85rem;
    color: #555;
}

.draw-canvas-wrap {
    position: relative;
    width: 100%;
    max-height: 68vh;
    overflow: auto;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    touch-action: none;
    background: #fff;
}

#drawBgCanvas,
#drawCanvas {
    display: block;
    width: min(100%, 1000px);
    height: auto;
    margin: 0 auto;
}

#drawBgCanvas {
    position: relative;
    z-index: 1;
}

#drawCanvas {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    cursor: crosshair;
}

.draw-modal-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}


/* practice.php: 手書き回答 改善 */
.question-image--answer {
    margin: 8px 0 10px;
}

.question-image-label {
    margin: 0 0 6px;
    font-size: 0.86rem;
    color: #444;
}

.answer-question-image {
    display: block;
    width: min(100%, 1000px);
    max-height: 420px;
    object-fit: contain;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    cursor: zoom-in;
}

.draw-modal {
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 12px;
    background: rgba(0, 0, 0, 0.55);
}

.draw-modal-card {
    width: min(1120px, 98vw);
    max-height: calc(100vh - 48px);
    overflow: auto;
    margin: 0;
}

.draw-question-meta {
    margin-bottom: 8px;
    border: 1px solid #d8e2f0;
    background: #f6f9ff;
    border-radius: 8px;
    padding: 8px 10px;
}

.draw-question-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.draw-question-text {
    white-space: pre-wrap;
    line-height: 1.5;
}

.draw-canvas-wrap {
    background: #eef2f7;
}

#drawBgCanvas,
#drawCanvas {
    width: min(100%, 1100px);
}

#drawBgCanvas {
    background: #fff;
}
