@charset "utf-8";
/* 視力検査（乱視・老眼チェック）専用CSS  接頭辞 eys

   ★素の要素セレクタを1つも書かない（CLAUDE.md B-13）。
     このファイルはページ全体に読み込まれるので、body{} や button{} を書くと
     ヘッダー・サイドバー・フッターまで巻き込む。
     すべて .eys- か #eys で始める。

   ★contents.css が input / select / button に appearance:none を当てている。
     そのため レンジスライダーは「印の出ない只の箱」になり、セレクタは矢印が消える。
     ここで明示的に戻す（CLAUDE.md B-8 と同じ罠）。

   ★.eys-stage の中の SVG は絶対に縮めない。
     max-width:100% を当てると、視標の実寸が狂って出る数字が嘘になる。
     収まらない視標はそもそも出さない作りにしてある（eysUsableSteps）。

   ★波括弧の釣り合いを崩さない。余分な } が1つあるだけで次の規則が丸ごと捨てられる
     （CLAUDE.md B-10）。node checkbox-check.js が見ている。
*/

/* ===== 全体 ===== */
.eys-wrap { font-size: 14px; line-height: 1.7; color: #333; }

/* ===== タブ ===== */
.eys-tabs {
	display: flex; flex-wrap: wrap; gap: 4px;
	border-bottom: 2px solid #1e3a5f; margin: 0 0 18px;
}
.eys-tab {
	appearance: none; -webkit-appearance: none;
	flex: 1 1 auto; min-width: 0;
	padding: 10px 6px; border: 1px solid #ccc; border-bottom: 0;
	border-radius: 4px 4px 0 0; background: #f4f6f8; color: #333;
	font-size: 13px; font-weight: 700; line-height: 1.3;
	cursor: pointer; float: none;
}
.eys-tab.is-on { background: #1e3a5f; border-color: #1e3a5f; color: #fff; }

/* ===== 見出し・文章 ===== */
.eys-h3 {
	margin: 24px 0 10px; padding: 0 0 6px;
	border-bottom: 1px solid #ddd;
	font-size: 17px; font-weight: 700; color: #1e3a5f;
}
.eys-lead { margin: 0 0 12px; font-size: 14px; }
.eys-cap { margin: 6px 0 0; font-size: 13px; font-weight: 700; text-align: center; }
.eys-ask { margin: 14px 0 10px; font-size: 15px; font-weight: 700; text-align: center; }
.eys-note {
	margin: 10px 0 0; padding: 10px 12px;
	background: #fffbe6; border-left: 4px solid #e0b400;
	font-size: 13px; line-height: 1.7;
}
.eys-disc {
	margin: 18px 0 0; padding: 12px 14px;
	background: #f4f6f8; border-left: 4px solid #1e3a5f;
	font-size: 13px; line-height: 1.8;
}
.eys-src { margin: 20px 0 0; font-size: 11px; line-height: 1.8; color: #666; }
.eys-sub { margin: 0; }
.eys-pane { margin: 0; }

/* ===== ものさし合わせ ===== */
.eys-cal {
	margin: 0 0 22px; padding: 14px;
	background: #f0f7ff; border: 1px solid #b8d4f0; border-radius: 6px;
}
/* ★★ここに max-width:100% を書いてはいけない。
     バーが画面幅で止まるのに、スライダーの値だけが進むので
     1mm あたりの px が最大2.70倍に膨らみ、視力が2.70倍高く出る
     （2026-11-24 に実測。真の視力0.3が0.81と出た）。
     視標と同じ扱いにする ── **縮めない。横に逃がすだけ。** */
.eys-calbar-area { margin: 14px 0 0; overflow-x: auto; }
.eys-calbar {
	height: 54px; background: #fff;
	border: 2px solid #1e3a5f; border-radius: 4px;
	box-sizing: border-box;
}
.eys-calbar-in {
	display: block; height: 100%;
	background: repeating-linear-gradient(90deg, #1e3a5f 0, #1e3a5f 1px, transparent 1px, transparent 10px);
}
.eys-calnote { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: #444; }
.eys-done {
	margin: 12px 0 0; padding: 8px 10px;
	background: #e6f7ea; border-left: 4px solid #23ac38;
	font-size: 13px; font-weight: 700;
}
.eys-warn {
	margin: 12px 0 0; padding: 8px 10px;
	background: #fdecea; border-left: 4px solid #c0392b;
	font-size: 13px; font-weight: 700;
}

/* レンジスライダーを戻す。
   ★詳細度で tool-form.css の .wrapper .block #inputBlock input (0,1,2,1) に勝つ必要がある。
     #eysWrap と #inputBlock の id 2つで (0,2,1,1)。 */
#eysWrap #inputBlock input[type="range"] {
	appearance: auto; -webkit-appearance: auto;
	width: 100%; height: 28px;
	margin: 0; padding: 0; border: 0; background: none;
	accent-color: #1e3a5f; cursor: pointer;
}

/* ===== 入力欄（#inputBlock の外にあるぶん） ===== */
.eys-fields { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.eys-field {
	flex: 1 1 260px; min-width: 0;
	display: flex; flex-direction: column; gap: 4px;
}
.eys-flabel { font-size: 13px; font-weight: 700; color: #1e3a5f; }
.eys-fin { display: flex; align-items: center; gap: 6px; }
.eys-fhint { font-size: 12px; color: #666; line-height: 1.6; }
/* 距離を自動で入れたときの知らせ。なぜ変えたかを書くので目に入る色にする。 */
/* 検査中に視距離を思い出させる。入れた値を前提に描いているので、
   ここがずれていると結果がそのぶんずれる。 */
.eys-rundist { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 400; color: #c0392b; }
.eys-distauto { color: #1e3a5f; background: #eef4fb; border-left: 3px solid #1e3a5f; padding: 5px 8px; margin-top: 4px; }
.eys-distauto[hidden] { display: none; }
.eys-unit { font-size: 13px; flex: 0 0 auto; }

/* appearance を戻す。#eysWrap だけだと contents.css の指定に負けることがあるので
   要素と属性まで書いて詳細度を上げる。 */
#eysWrap .eys-fin select,
#eysWrap .eys-fin input[type="number"] {
	appearance: auto; -webkit-appearance: auto;
	box-sizing: border-box; max-width: 100%;
	padding: 7px 8px; border: 1px solid #aaa; border-radius: 4px;
	background: #fff; color: #333; font-size: 14px; line-height: 1.4;
}
#eysWrap .eys-fin select { flex: 1 1 auto; min-width: 0; }
#eysWrap .eys-fin input.eys-num { width: 7em; flex: 0 0 auto; text-align: right; }

/* ===== 測れる範囲の知らせ ===== */
.eys-limit {
	margin: 0 0 14px; padding: 10px 12px;
	background: #fff; border: 1px dashed #1e3a5f; border-radius: 4px;
	font-size: 13px; line-height: 1.8;
}
.eys-limit-ng { color: #c0392b; font-weight: 700; }

/* ===== 手順の箇条書き ===== */
.eys-howto { margin: 12px 0 16px; padding: 0 0 0 1.4em; }
.eys-howto li { list-style: disc; margin: 0 0 6px; font-size: 13px; line-height: 1.7; }

/* ===== ボタン ===== */
/* ★.eys-row を flex にすると子の float は無視される。
     それでも .lowerCommon .btn_form { float:left } を打ち消す意図を残すため
     float:none も明示する（btn-float-check.js が見る）。 */
.eys-row {
	display: flex; align-items: center; gap: 12px;
	margin: 14px 0 0; clear: both;
}
.eys-row-wrap { flex-wrap: wrap; }
.eys-row .btn_form { float: none; margin: 0; }
.eys-btn { flex: 0 0 auto; }
.eys-btn-sub {
	appearance: none; -webkit-appearance: none;
	padding: 10px 16px; border: 1px solid #1e3a5f; border-radius: 4px;
	background: #fff; color: #1e3a5f;
	font-size: 13px; font-weight: 700; line-height: 1.3;
	cursor: pointer; float: none;
}

/* ===== 検査中 ===== */
.eys-runhead {
	margin: 0 0 10px; padding: 8px 10px;
	background: #1e3a5f; color: #fff; border-radius: 4px;
	font-size: 13px; text-align: center;
}
.eys-runhead strong { font-size: 16px; }

/* 視標を置く白地。
   ★中の SVG を縮めない。overflow:auto で逃がすだけにする。 */
.eys-stage {
	display: flex; align-items: center; justify-content: center;
	min-height: 120px; margin: 0 auto; padding: 10px;
	background: #fff; border: 1px solid #ddd; border-radius: 4px;
	overflow: auto;
}
.eys-stage > svg { display: block; flex: 0 0 auto; }
.eys-stage-sm { min-height: 0; }

.eys-pad { display: grid; gap: 8px; margin: 0 auto; max-width: 340px; }
.eys-pad-4 { grid-template-columns: repeat(2, 1fr); }
.eys-pad-8 { grid-template-columns: repeat(4, 1fr); }
.eys-padbtn {
	appearance: none; -webkit-appearance: none;
	padding: 14px 4px; border: 1px solid #1e3a5f; border-radius: 4px;
	background: #fff; color: #1e3a5f;
	font-size: 15px; font-weight: 700; line-height: 1.2;
	cursor: pointer; float: none; min-width: 0;
}
.eys-sizenote { margin: 12px 0 0; font-size: 12px; color: #666; text-align: center; line-height: 1.7; }

/* ===== 結果 ===== */
.eys-result {
	margin: 0 0 4px; padding: 14px;
	background: #f0f7ff; border: 1px solid #b8d4f0; border-radius: 6px;
}
.eys-big { margin: 0 0 8px; font-size: 16px; }
.eys-big strong { font-size: 30px; color: #1e3a5f; }
.eys-gradeline { margin: 0 0 8px; font-size: 14px; }
.eys-gradeline strong { font-size: 20px; color: #1e3a5f; }
.eys-gradedesc { display: block; font-size: 12px; color: #555; margin: 2px 0 0; }
.eys-copied { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: #23ac38; }
.eys-log { margin: 16px 0 0; }
.eys-logttl { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #1e3a5f; }
.eys-tblwrap { overflow-x: auto; }
.eys-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.eys-tbl th, .eys-tbl td {
	padding: 6px 8px; border: 1px solid #ccc; text-align: center; white-space: nowrap;
}
.eys-tbl th { background: #eef2f6; font-weight: 700; }

/* ===== 乱視 ===== */
.eys-astig-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 0 0 6px; }
.eys-astig-cell { flex: 0 0 auto; }
/* 答えのボタン。文が長いので flex 行の中で縮んでよい。
   （イベントは #eysPaneAstig に委譲しているので、この class は目印も兼ねる） */
.eys-astig-ans { flex: 0 1 auto; min-width: 0; }
.eys-astig-out {
	margin: 12px 0 0; padding: 12px 14px;
	background: #f0f7ff; border: 1px solid #b8d4f0; border-radius: 4px;
	font-size: 13px; line-height: 1.8;
}

/* ===== 老眼 ===== */
.eys-neartext {
	margin: 0 0 14px; padding: 16px 10px;
	background: #fff; border: 1px solid #ddd; border-radius: 4px;
	text-align: center; line-height: 1.6; overflow-x: auto; white-space: nowrap;
}
/* ★ものさし未設定の知らせは折り返す。
     nowrap は見本の文字を折らないための指定なので、知らせの文にまで効くと
     375px で 23px はみ出す（実測。箱に overflow-x があるので切れはしないが、
     最初に目に入る文が横に逃げるのは良くない）。 */
.eys-neartext .eys-limit-ng { display: block; white-space: normal; }

/* ===== 見え方チェック ===== */
.eys-caution {
	margin: 14px 0 0; padding: 12px 14px;
	background: #fdecea; border-left: 4px solid #c0392b; border-radius: 0 4px 4px 0;
	font-size: 13px; line-height: 1.8;
}
.eys-caution-ttl { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: #c0392b; }
.eys-caution p { margin: 0; }

/* ===== スマホ ===== */
@media screen and (max-width: 662px) {
	.eys-tab { flex: 1 1 46%; font-size: 12px; padding: 9px 4px; }
	.eys-h3 { font-size: 16px; }
	.eys-fields { gap: 10px; }
	.eys-field { flex: 1 1 100%; }
	.eys-row { flex-wrap: wrap; }
	.eys-row .btn_form, .eys-btn-sub { width: 100%; }
	.eys-big strong { font-size: 26px; }
	.eys-pad { max-width: 100%; }
}

@media screen and (max-width: 420px) {
	.eys-wrap { font-size: 13px; }
	.eys-cal { padding: 10px; }
	.eys-pad-8 { grid-template-columns: repeat(2, 1fr); }
	.eys-padbtn { font-size: 14px; padding: 13px 2px; }
	.eys-tbl th, .eys-tbl td { padding: 5px 6px; font-size: 12px; }
	.eys-note, .eys-disc { padding: 9px 10px; font-size: 12px; }
}
