const style=document.createElement('style'); style.textContent=` /* =========================================== グローバル変数の定義 テーマ色、フォント、背景色などを一元管理 =========================================== */ :root { --main-font: "Segoe UI", sans-serif; /* メインフォント */ --bg-dark: rgba(20, 25, 30, 0.9); /* ダーク背景 */ --bg-light: rgba(230, 239, 248, 0.9); /* ライト背景 */ --color-bg: #f9f9f9; /* ページ背景色 */ --color-main: #004080; /* メインカラー */ --color-accent: #0077cc; /* アクセントカラー */ --color-danger: #d9534f; /* エラー色 */ --color-text: #333; /* テキストカラー */ --color-input-bg: #fff; /* 入力フィールド背景色 */ --color-border: #cfdde6; /* ボーダーカラー */ --color-error-bg: #fff5f5; /* エラーバックグラウンド */ --color-error-border: #d9534f; /* エラーボーダーカラー */ --border-radius: 6px; /* 角丸設定 */ --color-primary: #0078D4; /* プライマリーカラー */ } /* =========================================== ベースのスタイル設定 全体的なレイアウトとフォントのスタイルを指定 =========================================== */ *, *::before, *::after { box-sizing: border-box; /* ボックスサイズの設定 */ } body { font-family: var(--main-font); /* メインフォント */ margin: 0; padding: 2rem; /* ページ内の余白 */ background-color: var(--color-bg); /* 背景色 */ color: var(--color-text); /* テキスト色 */ line-height: 1.6; /* 行間 */ margin-left: var(--nav-width); /* ナビゲーション幅 */ word-break: break-all; /* 単語が長すぎると折り返す */ } a { cursor: pointer; font-weight: 700; } /* =========================================== 見出しのスタイル タイトルやサブタイトルの装飾 =========================================== */ h1 { font-size: 1.6rem; font-weight: 900; color: var(--color-main); /* メインカラー */ margin-bottom: 1.5rem; text-align: center; /* 中央揃え */ } h2.title { font-weight: 700; font-size: 1.25rem; padding-left: 0.75rem; /* 左側の余白 */ margin-top: 2rem; color: var(--color-primary); /* プライマリーカラー */ } h2.title::before { content: "◆ "; /* 見出し前にアイコン */ color: var(--color-accent); /* アクセントカラー */ font-weight: normal; } /* =========================================== コンテナのスタイル フォームやカード型レイアウトの設定 =========================================== */ .u-container { background: white; /* 白背景 */ border-radius: var(--border-radius); /* 角丸 */ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 影 */ padding: 2rem; /* 内側の余白 */ max-width: 720px; /* 最大幅 */ margin: 0 auto; /* 中央揃え */ } /* =========================================== ヘッダー・メッセージのスタイル 通知メッセージや警告などの装飾 =========================================== */ p.header_text, p.header_rmesg, p.header_emesg { font-size: 0.9rem; padding: 1rem; margin-bottom: 1.5rem; border-radius: var(--border-radius); } p.header_text { color: var(--color-main); /* メインカラー */ background-color: transparent; border: 1px solid #b3d7f5; /* メッセージ枠 */ border-left: 4px solid var(--color-accent); /* 左側のアクセントライン */ padding: 1rem; margin-bottom: 1.5rem; animation: softFadeIn 0.6s ease-out both; /* アニメーション */ letter-spacing: 0.03em; /* 文字間隔 */ } @keyframes softFadeIn { from { opacity: 0; } to { opacity: 1; } } p.header_rmesg { background-color: #e7f4ff; /* 成功メッセージ背景 */ border: 1px solid #a3d1ff; /* 枠線 */ color: #005fa3; /* テキストカラー */ } p.header_emesg { background-color: var(--color-error-bg); /* エラーメッセージ背景 */ border: 1px solid var(--color-error-border); /* エラー枠線 */ color: var(--color-danger); /* エラー色 */ } /* =========================================== フォームフィールドのスタイル 入力フォームやボタンの設定 =========================================== */ .smp_tmpl .title { font-weight: 700; margin-bottom: 0.5rem; width: 100%; color: var(--color-primary); } .smp_tmpl .caution { font-size: 0.85rem; color: #666; display: block; margin-top: 0.3rem; } .smp_tmpl .data { margin-top: 0.5rem; margin-left: 0; } /* 入力フィールドのスタイル */ .input { margin-bottom: 0.5rem; /* 下の余白 */ box-sizing: border-box; /* ボックスサイズ */ width: 100%; padding: 0.6rem; /* 内側の余白 */ border: none; border-radius: 2rem; /* 角丸 */ background: var(--bg-light); /* ライト背景 */ font-size: 1rem; color: var(--color-text); /* テキストカラー */ box-shadow: inset 2px 2px 4px rgba(80, 120, 160, 0.25), inset -2px -2px 4px rgba(255, 255, 255, 0.4); /* 内側シャドウ */ transition: box-shadow 0.3s ease, background-color 0.3s ease; /* フォーカス時のエフェクト */ } /* 入力フィールドにフォーカス時のスタイル */ .input:focus { outline: none; background-color: var(--bg-input); box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.8), inset 1px 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px var(--glow-blue); /* 光彩 */ } /* 入力エラー時のスタイル */ .input.error { border-color: #d9534f; /* エラーボーダー */ background-color: #fff5f5; /* エラー背景 */ } /* エラーメッセージのスタイル */ .msg { color: var(--color-danger); /* エラー色 */ font-size: 0.85rem; margin-top: 0.3rem; display: inline-block; } /* 必須フィールドを示すスタイル */ .need { background-color: var(--color-danger); /* エラー色 */ color: white; font-size: 0.8rem; padding: 0.2rem 0.5rem; margin-left: 0.5rem; border-radius: var(--border-radius); /* 角丸 */ vertical-align: middle; /* 縦揃え */ } /* 送信ボタンのスタイル */ .submit { width: 100%; display: inline-block; background-color: var(--color-main); /* メインカラー */ color: white; border: none; padding: 0.8rem 2rem; font-size: 1rem; font-weight: bold; border-radius: var(--border-radius); /* 角丸 */ cursor: pointer; transition: background-color 0.3s; margin-top: 1rem; } /* 送信ボタンのホバー効果 */ .submit:hover, .submit:focus { outline: none; background-color: var(--color-accent); /* アクセントカラー */ } /* 戻るボタンのスタイル */ input[name=SMPFORM_BACK] { width: 100%; display: inline-block; background: #666; color: white; border: none; padding: 0.8rem 2rem; font-size: 1rem; font-weight: bold; border-radius: var(--border-radius); /* 角丸 */ cursor: pointer; transition: background-color 0.3s; margin-top: 1rem; } /* 戻るボタンのホバー効果 */ input[name=SMPFORM_BACK]:hover, input[name=SMPFORM_BACK]:focus { outline: none; background-color: #adc2df; /* 明るい色 */ } /* スパイラルシール(フッターの案内など) */ .spiralSeal { margin-top: 2rem; width: 100%; font-size: 0.85rem; color: #666; } /* スパイラルシール内のテーブル設定 */ .spiralSeal td.description { padding: 0.5rem; vertical-align: middle; /* 中央揃え */ } .spiralSeal td.img { padding: 0.5rem; vertical-align: middle; /* 中央揃え */ } /* =========================================== レスポンシブ対応(画面幅が720px以下) モバイル対応用の設定 =========================================== */ @media (max-width: 720px) { body { padding: 1rem; /* 画面の余白を減らす */ } .u-container { padding: 1rem; /* コンテナ内の余白 */ } } /* --- DL構造補完(定義リストの見た目調整) --- */ .smp_tmpl dl { display: flex; flex-wrap: wrap; margin-bottom: 1.5rem; /* 下部余白 */ } .smp_tmpl dt { width: 100%; font-weight: bold; color: var(--color-main); /* メインカラー適用 */ margin-bottom: 0.3rem; text-align: left; } .smp_tmpl dd { width: 100%; margin: 0; text-align: left; } /* --- float回りのクリア処理(clearfix) --- */ .cf:before, .cf:after { content: ""; display: table; clear: both; } /* --- テキストエリア用補完スタイル --- */ textarea { resize: vertical; /* 縦方向のリサイズのみ許可 */ min-height: 120px; line-height: 1.5; width: 100%; border-radius: var(--border-radius); font-size: 0.85rem; padding: 0.6rem; border: none; background: var(--bg-light); /* ライトな背景色 */ box-shadow: inset 2px 2px 4px rgba(80, 120, 160, 0.25), inset -2px -2px 4px rgba(255, 255, 255, 0.4); /* ネオモーフィズム風影 */ transition: box-shadow 0.3s ease, background-color 0.3s ease; } textarea:focus { outline: none; background-color: var(--bg-input); /* フォーカス時背景変更 */ box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.8), inset 1px 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px var(--glow-blue); /* フォーカス時の視覚強調 */ } /* --- リストスタイルのリセット --- */ menu, ol, ul { list-style: none; margin: 0; padding: 0; } /* --- input本体を非表示に --- */ label input[type="radio"], label input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; } /* ラベル全体のスタイル(ボタン風) */ label { display: flex; align-items: center; justify-content: center; width: 100%; padding: 0.6rem; border-radius: 2rem; background: rgba(230, 239, 248, 0.9); box-shadow: inset 2px 2px 4px rgba(80, 120, 160, 0.25), inset -2px -2px 4px rgba(255, 255, 255, 0.4); cursor: pointer; transition: box-shadow 0.3s ease, background-color 0.3s ease; position: relative; /* for absolute input */ } /* テキスト部分のスタイル */ label>span { display: flex; align-items: center; justify-content: center; font-size: var(--fz-small); width: 100%; border-radius: 2rem; pointer-events: none; } /* チェックされた時のスタイル(has対応ブラウザ) */ label:has(input:checked) { background: var(--color-accent, #0077cc); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) inset; } /* inputにフォーカスが当たったら、それを含むlabelにスタイルを当てる */ label:has(input:focus-visible) { box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.8), inset 1px 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px var(--glow-blue); } /* ファイル変更ボタン */ input.clear { padding: 0.6rem; border-radius: 2rem; background: linear-gradient(to right, #73e0ff, #48b8ff); color: #fff; cursor: pointer; transition: box-shadow 0.3s ease, background-color 0.3s ease; position: relative; border: none; margin-left: 0.3rem; margin-bottom: 0.4rem; } input.clear:focus { outline: none; background-color: var(--bg-input); box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.8), inset 1px 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px var(--glow-blue); } input.clear:active { box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.8), inset 1px 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px var(--glow-blue); transform: scale(0.98); /* 軽く縮んだ感じを出す */ } /* --- セレクト用: カスタムスタイルのセレクトボックス --- */ select { width: 100%; padding: 0.6rem; border: none; border-radius: 2rem; background: var(--bg-light); font-size: 1rem; color: var(--color-text); box-shadow: inset 2px 2px 4px rgba(80, 120, 160, 0.25), inset -2px -2px 4px rgba(255, 255, 255, 0.4); appearance: none; /* OSデフォルトのセレクト矢印を非表示 */ -webkit-appearance: none; -moz-appearance: none; background-image: url('data:image/svg+xml;charset=UTF-8,'); /* 下向き矢印のSVGアイコンを背景に指定 */ background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 1rem; transition: box-shadow 0.3s ease, background-color 0.3s ease; text-align: center; } /* フォーカス時のスタイル変化(光る枠など) */ select:focus { outline: none; background-color: var(--bg-input); box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.8), inset 1px 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px var(--glow-blue); } /* --- 郵便番号フィールドのインライン化 --- */ .zipcode ul { display: flex; gap: 0.5rem; /* 項目間のスペース */ padding: 0; margin: 0; } .zipcode ul li { list-style: none; /* リストマーカー非表示 */ } .zipcode li.code01 input { max-width: 5rem; /* 郵便番号用の適度な幅 */ } .zipcode li.code02 input { max-width: 6rem; /* 郵便番号用の適度な幅 */ } /* 電話番号・時間・郵便番号などの共通インライン調整 */ .zipcode ul li, .phone ul li, .time ul li { width: auto; float: left; margin: 0 3px 0 0; } /* --- 電話番号フィールド(市外局番・市内局番・加入者番号)の調整 --- */ .phone li.num01 input, .phone li.num02 input, .phone li.num03 input { max-width: 6rem; /* 電話番号用の適度な幅 */ } /* --- 年の入力欄(西暦など)の調整 --- */ #SMP_STYLE .time .year { max-width: 6rem; } /* --- 時間関連入力欄(時・分など)の調整 --- */ #SMP_STYLE .time input { max-width: 4rem; } /* --- 金額入力欄の最大幅設定 --- */ #SMP_STYLE .price input { max-width: 10rem; } /* --- 数字(数値)入力欄の最大幅 --- */ #SMP_STYLE .num input { max-width: 6rem; } /* --- 整数入力用欄の幅制限 --- */ #SMP_STYLE .integer input { max-width: 6rem; } /* --- 実数(小数含む)入力欄の幅制限 --- */ #SMP_STYLE .real input { max-width: 10rem; } /* --- ファイル選択ボタンのスタイリング --- */ .data.file input[type="file"] { width: 100%; display: flex; align-items: center; justify-content: center; padding: 0.6rem; border: none; border-radius: 2rem; background: var(--bg-light); font-size: 0.95rem; color: var(--color-text); box-shadow: inset 2px 2px 4px rgba(80, 120, 160, 0.25), inset -2px -2px 4px rgba(255, 255, 255, 0.4); cursor: pointer; transition: box-shadow 0.3s ease, background-color 0.3s ease; margin-bottom: 0.4rem; } /* ファイルボタンにフォーカスしたときの反応 */ .data.file input[type="file"]:focus { outline: none; background-color: var(--bg-input); box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.8), inset 1px 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px var(--glow-blue); } /* --- 「必須」マークの位置調整 --- */ .title .need { display: inline-block; margin-left: 0.25rem; vertical-align: baseline; } /* --- エラーメッセージや注意メッセージのデザイン --- */ span.msg { display: block; margin-top: 0.3rem; color: var(--color-danger); font-size: 0.85rem; font-weight: bold; } /* --- データ入力ブロックの上下余白調整(file以外) --- */ .smp_tmpl .data:not(.file) { margin-top: 0.25rem; margin-bottom: 0.75rem; } /* --- サイドバー関連の変数定義 --- */ :root { --nav-width: 5rem; /* サイドバーの幅 */ --accent: #4fc3f7; /* アクセントカラー(ホバー時などに使用) */ --hover-bg: rgba(255, 255, 255, 0.1); /* サイドバーのリンクホバー背景 */ --radius: 0.75rem; /* 要素の角丸半径 */ } /* --- サイドバーの全体スタイル --- */ .side-header { position: fixed; /* 画面に固定表示 */ top: 0; left: 0; width: var(--nav-width); /* 変数で幅指定 */ height: 100vh; /* 画面全体の高さ */ background: linear-gradient(135deg, var(--color-main), var(--color-accent)); /* グラデーション背景 */ backdrop-filter: blur(8px); /* 背景のぼかし効果 */ display: flex; align-items: center; justify-content: center; z-index: 999; /* 最前面に表示 */ box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2); /* 右側への影 */ } .side-nav { width: 100%; } /* --- サイドメニュー(縦並びのメニュー) --- */ .side-menu { display: flex; flex-direction: column; /* 縦方向に並べる */ align-items: center; gap: 1.2rem; /* メニュー間の隙間 */ padding: 0; margin: 0; } .side-menu li { list-style: none; /* リストマーカー非表示 */ width: 100%; } .side-menu a { display: block; width: 100%; text-align: center; color: white; text-decoration: none; font-size: 0.85rem; font-weight: normal; padding: 0.75rem 0; /* 上下に余白 */ transition: all 0.3s ease; /* ホバー時のトランジション */ border-radius: var(--radius); /* 角を丸める */ } /* --- ホバー時のメニューアニメーション --- */ .side-menu a:hover { background: var(--hover-bg); /* 半透明の背景 */ color: var(--accent); /* アクセントカラーに変更 */ letter-spacing: 0.05em; /* 文字間隔を広げる */ } /* --- アコーディオンの枠スタイル --- */ .accordion { border: 1px solid var(--color-border); /* 枠線 */ border-radius: 0.75rem; /* 角丸 */ margin-bottom: 1rem; overflow: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); /* ほんのり影 */ background-color: white; transition: background 0.3s ease, box-shadow 0.3s ease; } .accordion:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); } /* --- アコーディオンの見出し部分 --- */ .accordion-toggle { width: 100%; padding: 1.25rem 1.5rem; text-align: left; background-color: transparent; border: none; font-size: 1rem; font-weight: bold; color: var(--color-main); cursor: pointer; transition: background-color 0.3s ease; position: relative; display: flex; align-items: center; justify-content: space-between; } /* --- フォーカス時の背景変化 --- */ .accordion-toggle:focus { outline: none; background-color: rgba(0, 119, 204, 0.05); } /* --- アコーディオン見出しの矢印アイコン --- */ .accordion-toggle::after { content: ""; display: inline-block; width: 8px; height: 8px; border: solid var(--color-main); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 0.3s ease; } /* --- アコーディオン展開時の矢印反転 --- */ .accordion-toggle.active::after { transform: rotate(-135deg); } /* --- アコーディオンの中身(非表示状態) --- */ .accordion-content { max-height: 0; overflow: hidden; padding: 0 1rem; background-color: var(--color-input-bg); color: var(--color-text); font-size: 0.95rem; transition: max-height 0.3s ease, padding 0.3s ease; } /* --- アクティブ時に中身を表示 --- */ .accordion-toggle.active+.accordion-content { padding: 1rem; max-height: 500px; /* 開いた時の高さ(必要に応じて調整) */ } /* --- カスタム変数の定義(テーマカラーやレイアウト設定) --- */ :root { --bg-glass: rgba(255, 255, 255, 0.25); /* 背景用のガラス風透明色 */ --bg-input: rgba(255, 255, 255, 0.6); /* 入力フィールドの背景色(フォーカス時) */ --shadow-light: rgba(255, 255, 255, 0.8); /* 明るめの影 */ --shadow-dark: rgba(174, 194, 224, 0.6); /* 暗めの影 */ --glow-blue: rgba(95, 157, 231, 0.5); /* フォーカス時の青い光彩 */ --border-glass: rgba(255, 255, 255, 0.4); /* 境界線のガラス風色 */ --color-accent: #50c6ff; /* アクセントカラー */ --color-text: #333; /* 文字色 */ --radius-xl: 20px; /* コンテナの角丸 */ --padding-container: 1.5rem; /* コンテナ内パディング */ } /* --- ページ全体の基本スタイル --- */ body { margin: 0; /* 更新フォームでは使用しない */ font-family: "Segoe UI", sans-serif; /* 読みやすいフォントを使用 */ background: linear-gradient(to bottom right, #dfefff, #f5fbff); /* グラデ背景 */ display: flex; /* フレックスで中央配置 */ justify-content: center; align-items: center; min-height: 100vh; padding: 1rem; } /* --- ログインフォームのスタイル --- */ .login-container { backdrop-filter: blur(15px); /* 背景をぼかしてガラス風に */ background: var(--bg-glass); /* 半透明背景 */ border: 1px solid var(--border-glass); /* 淡い境界線 */ border-radius: var(--radius-xl); /* 角丸 */ padding: var(--padding-container); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); /* 軽い影で浮かせる */ width: 100%; max-width: 360px; animation: fadeIn 0.5s ease-out; /* フェードインアニメーション */ } /* --- フェードインアニメーション定義 --- */ @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* --- タイトルスタイル --- */ h2 { text-align: center; color: var(--color-text); margin-bottom: 1rem; } /* --- 入力フォームのラッパー --- */ .form-group { margin-bottom: 1.2rem; } /* --- ラベル(入力名) --- */ label { font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--color-text); } /* --- テキスト・パスワード入力欄 --- */ input[type="text"], input[type="password"] { width: 100%; padding: 0.6rem; border: none; border-radius: 2rem; /* 丸みを帯びた入力欄 */ background: rgba(230, 239, 248, 0.9); /* 明るい背景 */ font-size: 1rem; color: var(--color-text); box-shadow: inset 2px 2px 4px rgba(80, 120, 160, 0.25), inset -2px -2px 4px rgba(255, 255, 255, 0.4); /* ネオモルフィズム風の内側影 */ transition: box-shadow 0.3s ease, background-color 0.3s ease; } /* --- 入力欄フォーカス時の装飾 --- */ input[type="text"]:focus, input[type="password"]:focus { outline: none; background-color: var(--bg-input); box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.8), inset 1px 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px var(--glow-blue); /* 外枠に青く光る効果 */ } /* --- ログインボタン --- */ .login-button { display: block; width: 100%; padding: 0.8rem; background: linear-gradient(to right, #73e0ff, #48b8ff); /* 明るい青グラデ */ border: none; border-radius: 100px; /* 丸みのあるボタン */ color: white; font-size: 1rem; box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light); /* 浮き上がるような影 */ cursor: pointer; transition: 0.3s ease; } /* --- ボタンにマウスを乗せたときのエフェクト --- */ .login-button:hover, .login-button:focus { outline: none; opacity: 0.9; box-shadow: 0 0 8px rgba(80, 198, 255, 0.5), 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light); } /* --- ボタンを押したときのエフェクト --- */ .login-button:active { box-shadow: none; transform: scale(0.9); /* 押し込むように縮小 */ } /* --- 補足テキスト(例:アカウントがない場合など) --- */ .form-footer { text-align: center; margin-top: 1rem; font-size: 0.85rem; color: #555; } /* --- モバイル端末向けレスポンシブ対応 --- */ @media (max-width: 480px) { :root { --padding-container: 1rem; /* モバイルでは余白を少なめに */ --radius-xl: 12px; /* 角丸も調整 */ } h2 { font-size: 1.3rem; /* タイトルサイズ調整 */ } .login-button, input[type="text"], input[type="password"] { font-size: 0.95rem; /* モバイル向けにフォントサイズ微調整 */ } } `; document.head.appendChild(style);