/* ==========================================================
   ITDM Headache Memo – スタイル
   ========================================================== */

.hm-wrap,
.hm-list-section {
	max-width: 640px;
	margin: 0 auto;
	padding: 0 16px;
	font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
	font-size: 15px;
	color: #333;
	box-sizing: border-box;
}

/* ----------------------------------------------------------
   通知
   ---------------------------------------------------------- */
.hm-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.6;
}
.hm-notice--success { background: #e6f4ea; color: #256029; border: 1px solid #a8d5ad; }
.hm-notice--error   { background: #fdecea; color: #b00020; border: 1px solid #f5c6c6; }
.hm-notice ul { margin: 0; padding-left: 18px; }

/* ----------------------------------------------------------
   セクションタイトル
   ---------------------------------------------------------- */
.hm-section-title {
	font-size: 18px;
	font-weight: bold;
	margin: 24px 0 16px;
	padding-bottom: 8px;
	border-bottom: 2px solid #e0e0e0;
}

/* ----------------------------------------------------------
   フォームフィールド共通
   ---------------------------------------------------------- */
.hm-field { margin-bottom: 20px; }

.hm-label {
	display: block;
	font-weight: bold;
	margin-bottom: 6px;
	font-size: 14px;
}

.hm-required {
	font-size: 11px;
	color: #d32f2f;
	background: #fdecea;
	padding: 1px 5px;
	border-radius: 3px;
	margin-left: 4px;
	font-weight: normal;
}

.hm-input,
.hm-textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 15px;
	background: #fff;
	-webkit-appearance: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.hm-input:focus,
.hm-textarea:focus {
	outline: none;
	border-color: #1a73e8;
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}
.hm-textarea { resize: vertical; }

.hm-hint {
	font-size: 12px;
	color: #666;
	margin: 4px 0 0;
}

/* ----------------------------------------------------------
   痛みスケール
   ---------------------------------------------------------- */
.hm-pain-scale {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 4px;
}

.hm-pain-item { display: block; }
.hm-pain-item input[type="radio"] { display: none; }

.hm-pain-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid #ccc;
	font-weight: bold;
	cursor: pointer;
	font-size: 14px;
	background: #f5f5f5;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	user-select: none;
}

.hm-pain-item input[type="radio"]:checked + .hm-pain-btn {
	background: #1a73e8;
	border-color: #1a73e8;
	color: #fff;
}

/* 痛さ 8〜10 は赤系 */
.hm-pain-btn[data-level="8"],
.hm-pain-btn[data-level="9"],
.hm-pain-btn[data-level="10"] {
	border-color: #e53935;
	color: #c62828;
}
.hm-pain-item input:checked + .hm-pain-btn[data-level="8"],
.hm-pain-item input:checked + .hm-pain-btn[data-level="9"],
.hm-pain-item input:checked + .hm-pain-btn[data-level="10"] {
	background: #e53935;
	border-color: #e53935;
	color: #fff;
}

/* ----------------------------------------------------------
   チェックボックス
   ---------------------------------------------------------- */
.hm-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hm-check-item {
	display: flex;
	align-items: center;
	gap: 0;
	cursor: pointer;
}

.hm-check-item input[type="checkbox"] {
	display: none;
}

.hm-check-item span {
	display: inline-block;
	padding: 6px 12px;
	background: #f0f0f0;
	border-radius: 20px;
	border: 1px solid #ddd;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hm-check-item input:checked + span {
	background: #e8f0fe;
	border-color: #1a73e8;
	color: #1a73e8;
	font-weight: bold;
}

/* ----------------------------------------------------------
   ボタン
   ---------------------------------------------------------- */
.hm-btn {
	display: inline-block;
	padding: 13px 32px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: opacity 0.2s;
	line-height: 1;
}

.hm-btn--primary {
	background: #1a73e8;
	color: #fff;
	width: 100%;
}

.hm-btn--primary:hover {
	opacity: 0.88;
}

/* ----------------------------------------------------------
   ログインリンク
   ---------------------------------------------------------- */
.hm-login-notice {
	text-align: center;
	padding: 40px 16px;
	color: #555;
}
.hm-login-notice a {
	color: #1a73e8;
	text-decoration: underline;
}

/* ----------------------------------------------------------
   一覧
   ---------------------------------------------------------- */
.hm-empty {
	color: #888;
	text-align: center;
	padding: 40px 0;
}

.hm-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hm-list-item {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

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

.hm-list-date {
	font-weight: bold;
	font-size: 16px;
}

.hm-pain-badge {
	font-size: 12px;
	font-weight: bold;
	padding: 3px 10px;
	border-radius: 12px;
	white-space: nowrap;
}
.hm-pain-badge--low  { background: #e6f4ea; color: #256029; }
.hm-pain-badge--mid  { background: #fff8e1; color: #e65100; }
.hm-pain-badge--high { background: #fdecea; color: #b00020; }

.hm-list-row {
	margin: 5px 0;
	font-size: 14px;
	line-height: 1.6;
}

.hm-list-label {
	color: #888;
	font-size: 12px;
}

.hm-list-memo {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #f0f0f0;
	font-size: 14px;
	color: #444;
	word-break: break-all;
}

/* ----------------------------------------------------------
   レスポンシブ
   ---------------------------------------------------------- */
@media (max-width: 480px) {
	.hm-pain-btn  { width: 34px; height: 34px; font-size: 13px; }
	.hm-section-title { font-size: 16px; }
	.hm-list-date { font-size: 15px; }
}
