/* ==========================================================================
   1. Reset and global variables
   ブラウザ差分のリセットと全体で共有する値
   ========================================================================== */

:root{ --nav-gap: 12px; --sticky-header-offset: 76px; }
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { overflow-y: scroll; scrollbar-gutter: stable; }

/* ==========================================================================
   2. Base layout
   ページ全体の文字、背景、共通コンテナ
   ========================================================================== */
body {
	font-family: 'Segoe UI', Roboto, 'Hiragino Kaku Gothic ProN', 'メイリオ', system-ui, -apple-system, sans-serif;
	color: #2b2b2b;
	background: radial-gradient(1200px 600px at 10% 10%, #fff7f0 0%, transparent 10%),
							radial-gradient(900px 400px at 90% 90%, #f0fbff 0%, transparent 10%),
							#fff;
}
.container { max-width: 980px; margin: 0 auto; padding: 28px; }

/* メインコンテンツを画面中央へ配置 */
main.container { display: flex; justify-content: center; align-items: flex-start; width: 100%; max-width: none; box-sizing: border-box; padding: 48px 24px; min-height: calc(100vh - 140px); }

/* パネルの基本寸法。詳細な装飾はPanels節で定義 */
.panel {
	width: 100%;
	max-width: 920px;
	margin: 18px 0;
	/* slightly darker grayish card background */
	background: linear-gradient(180deg,#eceff1,#e6eaed);
	padding: 32px;
	border-radius: 16px;
	border: 1px solid rgba(0,0,0,0.08);
	box-shadow: 0 30px 70px rgba(12,18,28,0.10), 0 8px 24px rgba(12,18,28,0.06);
	text-align: center;
}

/* ==========================================================================
   3. Header and navigation
   固定ヘッダー、ロゴ、ナビゲーション、ドロップダウン
   ========================================================================== */
.site-header {
	background: linear-gradient(90deg,#ffb347 0%, #ffcc33 50%, #ff7bac 100%);
	color: #fff;
	box-shadow: 0 8px 30px rgba(255,115,172,0.12);
	position: sticky;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	backdrop-filter: saturate(120%) blur(6px);
}
.site-header .header-inner { display:flex; align-items:center; width:100%; max-width:980px; margin:0 auto; padding:16px 28px; min-height:64px; }
.logo { display:flex; align-items:center; height:100%; }
.logo a { color:#fff; text-decoration:none; font-weight:800; font-size:1.4rem; letter-spacing:0.6px; }
.nav-left, .nav-right { display:flex; gap:var(--nav-gap); align-items:center; }
.nav-right { margin-left: auto; }
.nav-left { margin-left: var(--nav-gap); }
.nav-left a, .nav-right a, .nav-dropdown__trigger {
	color: rgba(255,255,255,0.95);
	text-decoration:none;
	font-weight:700;
	padding:8px 12px;
	border-radius:999px;
	transition: transform .18s ease, box-shadow .18s ease;
	background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent);
}
.nav-left a:hover, .nav-right a:hover, .nav-dropdown__trigger:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }

/* お問い合わせメニューはホバー中のみ表示 */
.nav-dropdown { position: relative; }
.nav-dropdown__trigger { display: block; cursor: pointer; }
.nav-dropdown__trigger::after { content: " ▾"; }
.nav-dropdown__menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 160px;
	padding: 6px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 12px 30px rgba(12,18,28,0.16);
	z-index: 1000;
}
.nav-dropdown:hover .nav-dropdown__menu {
	display: block;
}
.nav-left .nav-dropdown__menu a {
	display: block;
	color: #333;
	padding: 10px 12px;
	border-radius: 6px;
	background: transparent;
}
.nav-left .nav-dropdown__menu a:hover {
	transform: none;
	background: #fff1f4;
	box-shadow: none;
}

/* サイト全体のリンク装飾を統一 */
a { text-decoration: none; color: inherit; }
a:hover, a:focus { text-decoration: none; }

/* ==========================================================================
   4. Home hero and action cards
   ホーム画面のヒーロー、説明文、主要導線カード
   ========================================================================== */
.hero { text-align:center; padding:64px 12px; }
.hero h2 {
	font-size:2.4rem;
	margin-bottom:10px;
	background: linear-gradient(90deg,#ff7bac,#ffd166,#7bf1a8);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.lead { color:#666; margin-bottom:22px; font-weight:500; }
.actions { display:flex; gap:18px; justify-content:center; flex-wrap:wrap; }
.card {
	display:inline-block;
	background: linear-gradient(180deg,#ffffff, #fff7f9);
	border-radius:16px;
	padding:20px 32px;
	box-shadow: 0 10px 30px rgba(99, 102, 241, 0.08);
	text-decoration:none;
	color:#2b2b2b;
	min-width:180px;
	text-align:center;
	font-weight:800;
	transform-origin:center;
	transition: transform .22s cubic-bezier(.2,.9,.2,1), box-shadow .22s ease;
}
.card:nth-child(1){ background: linear-gradient(135deg,#ffd1dc,#ffe6a7); }
.card:nth-child(2){ background: linear-gradient(135deg,#c1f7d5,#a7e8ff); }
.card:nth-child(3){ background: linear-gradient(135deg,#f8d1ff,#d1e6ff); }
.card:hover { transform: translateY(-8px) rotate(-1deg) scale(1.03); box-shadow: 0 20px 40px rgba(99,102,241,0.12); }
.home-legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; color: #666; font-size: 0.88rem; font-weight: 700; }
.home-legal-links a { color: #5f6368; }
.home-legal-links a:hover { color: #9d315d; }

/* ==========================================================================
   5. Panels
   各ページを囲む共通パネルと装飾
   ========================================================================== */
.panel {
	--panel-gray: #e9eef2;
	background: linear-gradient(180deg,#fff8f6 0%, var(--panel-gray) 100%);
	border: 1px solid rgba(255,120,140,0.12);
	padding: 28px;
	border-radius: 16px;
	position: relative;
	z-index: 1;
	color: #0b0b0b;
	box-shadow: 0 10px 30px rgba(255,115,172,0.06), 0 36px 80px rgba(12,18,28,0.12);
	transition: transform .22s cubic-bezier(.2,.9,.2,1), box-shadow .22s ease, filter .22s ease;
	text-align: center;
	overflow: visible;
	backdrop-filter: saturate(120%) blur(2px);
}

/* ヘッダーと同じ色調のアクセントバー */
.panel::after{
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	top: 10px;
	height: 6px;
	border-radius: 6px;
	background: linear-gradient(90deg,#ffb347 0%, #ffcc33 50%, #ff7bac 100%);
	box-shadow: 0 8px 20px rgba(255,115,172,0.10);
	z-index: 2;
	opacity: 0.98;
}

/* パネル下部の柔らかい影 */
.panel::before{
	content: "";
	position: absolute;
	left: 50%;
	top: 100%;
	transform: translate(-50%,-24%);
	width: 84%;
	height: 34px;
	background: rgba(12,18,28,0.08);
	filter: blur(26px);
	border-radius: 50%;
	z-index: -1;
	transition: transform .22s ease, filter .22s ease, opacity .22s ease;
	opacity: 1;
}

/* パネル直下のページ見出し */
.panel h1,
.panel h2 { margin-bottom: 20px; }

/* ==========================================================================
   6. Forms
   フォーム配置、入力欄、ラベル、画像プレビュー
   ========================================================================== */
.form-inner { max-width:520px; margin:0 auto; }
.form-row { margin-bottom:14px; }
/* 送信・戻るなどのボタングループ */
.form-row--center { margin-top:18px; display:flex; gap:8px; justify-content:center; }
/* フォーム上部の補助見出し */
.panel-heading { margin-bottom:12px; }
/* ログイン画面などの右寄せアクション */
.form-row--actions { text-align: right; margin-top:8px; }
.form-row label { display:block; margin-bottom:6px; font-weight:700; color:#333; text-align: center; }
.registration-start-date-note { display: block; margin-top: 6px; color: #666; font-size: 0.8rem; text-align: center; }
.form-label { display: block; margin-bottom: 6px; font-weight: 700; color: #333; text-align: center; }
.usage-month-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; max-width: 620px; margin: 0 auto; }
.usage-month-option { position: relative; display: block !important; min-height: 58px; margin: 0 !important; cursor: pointer; }
.usage-month-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.usage-month-option span { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 6px; width: 100%; min-height: 58px; padding: 7px 5px; border: 1px solid #d8dde1; border-radius: 8px; background: #fff; color: #555; font-weight: 800; transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.usage-month-option span::before { content: ""; display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid #b8bec4; border-radius: 4px; background: #fff; color: #fff; font-size: 0.75rem; line-height: 1; }
.usage-month-option input:checked + span { border-color: #ff7bac; background: linear-gradient(135deg,#fff0f6,#fff6d8); color: #9d315d; box-shadow: 0 5px 14px rgba(255,123,172,0.14); }
.usage-month-option input:checked + span::before { content: "✓"; border-color: #ff7bac; background: #ff7bac; }
.usage-month-option input:focus-visible + span { outline: 3px solid rgba(255,123,172,0.3); outline-offset: 2px; }
.usage-month-option:hover span { border-color: #ff9bc1; }
.usage-month-option.is-start span { border-color: #d53173; box-shadow: 0 0 0 2px rgba(255,123,172,0.18), 0 5px 14px rgba(255,123,172,0.14); }
.usage-month-option.is-start span::after { content: "請求月"; padding: 2px 5px; border-radius: 4px; background: #d53173; color: #fff; font-size: 0.62rem; }
.usage-month-option.is-fixed-start { cursor: default; }
.usage-month-option.is-fixed-start span { border-color: #d53173; background: linear-gradient(135deg,#ffe3ef,#fff0bf); }
.usage-month-option.is-fixed-start span::after { content: "開始月"; padding: 2px 5px; border-radius: 4px; background: #d53173; color: #fff; font-size: 0.62rem; }
.usage-month-option.is-derived { cursor: default; }
.usage-month-option.is-derived span { border-color: #aeb5bc; background: #e9ecef; color: #596168; box-shadow: none; }
.usage-month-option.is-derived span::before { border-color: #899198; background: #899198; }
.usage-month-option.is-derived span::after { content: none; }
.usage-month-option.is-unavailable { cursor: not-allowed; }
.usage-month-option.is-unavailable span { border-color: #d4d7da; background: repeating-linear-gradient(135deg,#f1f3f4 0,#f1f3f4 5px,#e4e7e9 5px,#e4e7e9 10px); color: #8b9298; box-shadow: none; }
.usage-month-option.is-unavailable span::before { border-color: #b8bdc1; background: #e2e5e7; }
.usage-month-option.is-unavailable span::after { content: none; }
.image-choice-selector { max-width: 620px; margin: 0 auto; }
.image-choice-search { width: 100%; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #e6e6e6; border-radius: 8px; background: #fff; font-size: 1rem; }
.image-choice-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(76px,96px)); justify-content: center; gap: 12px; }
.image-choice-empty { margin: 12px 0 0; color: #777; text-align: center; }
.subscription-name-selector { position: relative; }
.subscription-name-results { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; right: 0; max-height: 260px; overflow-y: auto; border: 1px solid #dfe3e8; border-radius: 10px; background: #fff; box-shadow: 0 14px 34px rgba(31,41,51,0.14); }
.subscription-name-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid #edf0f2; background: #fff; color: #222; text-align: left; cursor: pointer; }
.subscription-name-result:last-of-type { border-bottom: 0; }
.subscription-name-result:hover,
.subscription-name-result:focus { background: #fff5f9; outline: none; }
.subscription-name-result span { font-weight: 700; }
.category-result-main { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.category-result-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-result-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.category-picker { display: flex; align-items: flex-start; justify-content: center; gap: 8px; max-width: 360px; margin: 0 auto; }
[data-category-selector] { flex: 0 1 220px; min-width: 0; }
.category-create-button { flex: 0 0 auto; padding: 11px 12px; border-radius: 8px; white-space: nowrap; }
.category-name-result img { width: 1.15em; height: 1.15em; border-radius: 4px; object-fit: cover; flex: 0 0 auto; }
.category-action-button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: #f1f3f4; color: #5f6368; font-size: 0.85rem; font-style: normal; line-height: 1; cursor: pointer; }
.category-action-button:hover { background: #e8f0fe; color: #174ea6; }
.category-delete-button { color: #8a1f2d; }
.category-delete-button:hover { background: #ffe0e5; color: #b00020; }
.subscription-name-result[hidden] { display: none; }
.subscription-name-empty { margin: 0; padding: 12px; color: #777; font-size: 0.82rem; text-align: center; }
.image-choice-option { position: relative; display: block !important; aspect-ratio: 1; margin: 0 !important; cursor: pointer; }
.image-choice-option[hidden] { display: none !important; }
.image-choice-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.image-choice-option img,
.image-choice-option > span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 8px; border: 2px solid #d8dde1; border-radius: 12px; background: #fff; object-fit: contain; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.image-choice-option > span { color: #777; font-size: 0.72rem; }
.image-choice-option:hover img,
.image-choice-option:hover > span { border-color: #ff9bc1; transform: translateY(-2px); }
.image-choice-option input:checked + img,
.image-choice-option input:checked + span { border-color: #ff7bac; box-shadow: 0 0 0 3px rgba(255,123,172,0.2), 0 7px 18px rgba(255,123,172,0.18); }
.image-choice-check { position: absolute; top: 6px; right: 6px; display: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #ff7bac; color: #fff; font-size: 0.78rem; line-height: 1; box-shadow: 0 2px 7px rgba(157,49,93,0.3); }
.image-choice-option input:checked ~ .image-choice-check { display: grid; }
.image-choice-option input:focus-visible + img,
.image-choice-option input:focus-visible + span { outline: 3px solid rgba(255,123,172,0.3); outline-offset: 2px; }
.form-row input[type="text"], .form-row input[type="password"], .form-row input[type="email"], .form-row textarea {
	width:100%; padding:10px 12px; border-radius:8px; border:1px solid #e6e6e6; background:#fff; font-size:1rem;
}
.checkbox-label { display: flex !important; align-items: flex-start; justify-content: center; gap: 8px; text-align: left !important; line-height: 1.6; }
.checkbox-label input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; }
.checkbox-label a { color: #9d315d; text-decoration: underline; text-underline-offset: 2px; }
.legal-consent-field .field-errors { text-align: center; }
.legal-consent-message { margin: 0 0 16px; color: #555; line-height: 1.7; }
.legal-consent-documents { display: grid; gap: 8px; margin: 0 0 20px; }
.legal-consent-documents a { color: #9d315d; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   7. Buttons
   通常、強調、危険操作ボタンと操作状態
   ========================================================================== */
.btn { display:inline-block; background:linear-gradient(90deg,#ff7bac,#ffd166); color:#fff; padding:10px 16px; border-radius:999px; font-weight:800; border:none; cursor:pointer; background-size:200% 100%; background-position:0% 50%; transition: transform .16s ease, box-shadow .16s ease, filter .12s ease, background-position .3s ease; }
/* button要素とa要素で高さが揃うよう補正 */
button.btn {
	display: inline-block;
	padding: 14px 16px; /* increase vertical padding to enlarge button height */
	line-height: 1;
	font-family: inherit;
	font-size: inherit;
	vertical-align: middle;
	background-clip: padding-box;
}
.btn.btn--accent {
	/* .btn の見た目は維持しつつ色だけ赤系に変更
	   `.nav-right a` の背景指定に負けないようにセレクタを強めています */
	background: linear-gradient(90deg,#ff4b5c 0%, #ff7a80 100%);
	box-shadow: 0 6px 18px rgba(255,74,86,0.18);
}
.btn--danger { background: linear-gradient(90deg,#ff6b6b,#ff3b30); color:#fff; box-shadow: 0 6px 18px rgba(255,59,48,0.12); }

/* ホバー・押下時のフィードバック */
.btn:hover {
	transform: translateY(-4px) scale(1.02);
	box-shadow: 0 18px 40px rgba(12,18,28,0.12);
	filter: brightness(1.03);
	background-position:100% 50%;
}
.btn:active {
	transform: translateY(-2px) scale(0.995);
	box-shadow: 0 8px 22px rgba(12,18,28,0.10);
}
.btn.btn--accent:hover { box-shadow: 0 18px 40px rgba(255,74,86,0.12); }
.btn--danger:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 18px 40px rgba(255,59,48,0.14); filter: brightness(1.02); }
.errors { color:#b00020; margin-bottom:12px; }

/* ==========================================================================
   8. Validation and alerts
   フォーム全体エラー、フィールドエラー、入力状態
   ========================================================================== */
.alert { padding:10px 12px; border-radius:8px; margin-bottom:12px; }
.alert--error { background: #fff1f0; border: 1px solid #f5c2c7; color:#7a1a1a; }
.alert--error > .errorlist { margin: 0; padding: 0; list-style: none; }
.field-errors { color:#7a1a1a; font-size:0.95rem; margin-top:8px; }
.form-row input:invalid, .form-row textarea:invalid { outline: none; }
.form-row input, .form-row textarea { border: 1px solid #e6e6e6; padding:10px 12px; border-radius:8px; }
.form-row input:focus, .form-row textarea:focus { box-shadow: 0 6px 18px rgba(0,0,0,0.06); border-color:#c9c9c9; }
.form-row input[readonly] {
	background: #f5f7fa;
	color: #666;
	cursor: not-allowed;
}
.form .thumb {
	width: 120px;
	height: 120px;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 18px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(31,41,51,0.38); }
.modal__panel { position: relative; width: min(100%, 420px); padding: 22px; border-radius: 8px; background: #fff; box-shadow: 0 22px 60px rgba(31,41,51,0.26); }
.modal__panel h2 { margin: 0 0 18px; font-size: 1.2rem; text-align: center; }
.category-image-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(58px,72px)); justify-content: center; gap: 10px; max-height: 220px; overflow-y: auto; }
.category-image-option { position: relative; display: block !important; aspect-ratio: 1; margin: 0 !important; cursor: pointer; }
.category-image-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.category-image-option img,
.category-image-option span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 6px; border: 2px solid #d8dde1; border-radius: 8px; background: #fff; object-fit: contain; color: #777; font-size: 0.7rem; text-align: center; }
.category-image-option input:checked + img,
.category-image-option input:checked + span { border-color: #ff7bac; box-shadow: 0 0 0 3px rgba(255,123,172,0.18); }
.form .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ==========================================================================
   9. Contact pages
   お問い合わせ、サブスク提案、送信完了画面
   ========================================================================== */
.contact-target {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin: 0 auto 22px;
	padding: 12px 16px;
	max-width: 520px;
	background: linear-gradient(135deg,#d1e6ff,#c1f7d5);
	border-radius: 8px;
}
.contact-target span { color: #555; }
.contact-lead { margin-bottom: 20px; color: #666; }
.contact-empty { padding: 24px 0 8px; }
.contact-empty p { margin-bottom: 18px; }
.contact-thanks { max-width: 620px; }
.contact-thanks__mark {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: linear-gradient(135deg,#c1f7d5,#a7e8ff);
	color: #176b50;
	font-size: 1.8rem;
	font-weight: 800;
}
.contact-thanks p { margin-bottom: 20px; color: #666; }

/* ==========================================================================
   10. Select controls
   ネイティブselectとJavaScript生成のカスタムselect
   ========================================================================== */

/* JavaScriptが無効な場合にも使えるネイティブselect */
.select {
	width: auto;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid #e6e6e6;
	background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'><path fill='%23666' d='M7 10l5 5 5-5z'/></svg>") no-repeat calc(100% - 12px) center/12px 12px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	font-size: 1rem;
	color: #222;
}
.select:focus { box-shadow: 0 6px 18px rgba(0,0,0,0.06); border-color: #c9c9c9; outline: none; }
.select--inline { min-width: 120px; max-width: 220px; }
/* 月選択用の小さいselect */
.select--tiny { min-width: 60px; max-width: 100px; }

/* JavaScriptでネイティブselectを置き換える表示部品 */
.custom-select { position: relative; display: inline-block; width: 100%; }
.custom-select.select--inline { width: auto; }
.custom-select.select--tiny { width: auto; }
.custom-select__trigger {
	display:flex; align-items:center; justify-content:space-between; gap:8px;
	padding:10px 12px; border-radius:8px; border:1px solid #e6e6e6; background:#fff; cursor:pointer;
}
.custom-select__trigger:focus { outline: none; box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.custom-select.is-disabled .custom-select__trigger {
	background: #f5f7fa;
	color: #666;
	cursor: not-allowed;
}
.custom-select__list {
	position: absolute; left: 0; right: 0; top: calc(100% + 6px); background:#fff; border:1px solid #e6e6e6; border-radius:8px; box-shadow: 0 10px 30px rgba(12,18,28,0.06); max-height: 220px; overflow:auto; z-index: 60; padding:8px 0;
}
.custom-select__option { padding:8px 12px; cursor:pointer; color:#222; }
.custom-select__option:hover, .custom-select__option[aria-selected="true"] { background:#f5f7fa; }
.custom-select select { display:none; }

/* 用途別の幅指定 */
.custom-select.select--inline { min-width: 160px; max-width: 260px; width: 200px !important; }
.custom-select.select--tiny { min-width: 80px; }

/* 月選択の候補が折り返されないよう、リストだけ幅を広げる */
.custom-select.select--tiny .custom-select__list {
	left: 0;
	right: auto; /* allow the list to grow wider than the trigger */
	min-width: 140px; /* ensure one-line fit for short labels */
	width: max-content;
	box-sizing: border-box;
}

/* JavaScript無効時の月選択幅 */
select.select.select--tiny { width: 140px !important; box-sizing: border-box; }

/* JavaScript実行前の料金選択幅を固定 */
select.select.select--inline { width: 200px !important; box-sizing: border-box; }

/* カスタムselectのトリガーをラッパー幅に合わせる */
.custom-select__trigger { width: 100%; box-sizing: border-box; }

/* JavaScript初期化前のネイティブselectのちらつきを防止 */
.js select.select { visibility: hidden; }

/* ==========================================================================
   11. Inline field errors
   ラベル横に表示するバリデーションメッセージ
   ========================================================================== */
.label-with-error { display:inline-flex; align-items:center; gap:8px; }
.label-with-error label { display:inline-block; }
.form .label-with-error {
	display: flex;
	justify-content: center;
	width: 100%;
}
.field-errors-inline {
	color: #7a1a1a;
	background: #fff5f5;
	border: 1px solid #f5c2c7;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 0.9rem;
	margin-left: 8px;
	display: inline-block;
	line-height: 1;
	box-shadow: 0 1px 0 rgba(0,0,0,0.02) inset;
	transform: translateY(-4px);
}
.field-errors-inline[hidden] {
	display: none;
}

/* ==========================================================================
   12. Footer and small utilities
   フッターと単独で利用する補助スタイル
   ========================================================================== */
.site-footer { text-align:center; padding:18px 0; color:#7b7b7b; font-size:0.95rem; margin-top:48px; }
.site-footer__inner { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 20px; padding-top: 12px; padding-bottom: 24px; }
.site-footer a { color: #5f6368; font-weight: 700; }
.site-footer a:hover { color: #9d315d; }

.legal-panel { max-width: 900px; text-align: left; }
.legal-panel h1 { text-align: center; }
.legal-date { margin: -8px 0 24px; color: #666; text-align: center; font-size: 0.9rem; font-weight: 700; }
.legal-content { display: grid; gap: 16px; line-height: 1.85; }
.legal-content h2 { margin: 14px 0 -4px; color: #333; font-size: 1.08rem; text-align: left; }
.legal-content p { color: #333; }
.legal-content ul { margin-left: 1.3em; }
.legal-content li + li { margin-top: 6px; }

/* ロゴはアニメーションさせず静止表示 */
.logo a { display:inline-block; }

/* ==========================================================================
   13. Subscription result cards
   検索結果、サブスク管理、提案対象一覧のカード
   ========================================================================== */

/* デスクトップでは3列。画面幅に応じて後続のmedia queryで減らす */
.results-grid { display: grid; /* match original responsive: three columns with minimum width */ grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.mypage-panel { width: min(1920px, calc(100vw - 48px)); max-width: none; }
.subscription-management-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); justify-content: stretch; }
.subscription-management-grid .result-card { width: 100%; justify-self: stretch; }
.subscription-list-header { position: sticky; top: var(--sticky-header-offset); z-index: 90; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 16px; margin: 24px -12px 24px; padding: 12px; border: 1px solid rgba(229,233,238,0.90); border-radius: 8px; background: rgba(255,255,255,0.96); box-shadow: 0 10px 24px rgba(12,18,28,0.08); backdrop-filter: blur(8px); }
.subscription-list-side { display: flex; align-items: center; min-width: 0; }
.subscription-list-side--left { justify-content: flex-start; }
.management-toolbar { margin-bottom: 24px; }
.management-toolbar .management-navigation { grid-column: 2; }
.subscription-inline-register-button { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 13px; font-size: 0.84rem; }
.subscription-view-toggle { display: inline-flex; justify-self: end; gap: 4px; padding: 1px; border: 1px solid #e0e4e8; border-radius: 999px; background: #fff; box-shadow: 0 4px 12px rgba(12,18,28,0.07); }
.subscription-view-toggle-button { min-height: 34px; padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: #68717c; font: inherit; font-size: 0.84rem; font-weight: 800; cursor: pointer; }
.subscription-view-toggle-button.is-active { background: linear-gradient(90deg,#ff7bac,#ffd166); color: #fff; box-shadow: 0 5px 12px rgba(255,123,172,0.20); }
.category-group-list { display: grid; gap: 12px; margin-top: 16px; overflow-anchor: none; }
.subscription-category-group { position: relative; min-width: 0; overflow-anchor: none; }
.subscription-category-group-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 12px 16px; border: 1px solid #e5e9ee; border-radius: 8px; background: #fff; box-shadow: 0 6px 16px rgba(12,18,28,0.06); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.subscription-category-group-header:hover,
.subscription-category-group-header:focus,
.subscription-category-group.is-open .subscription-category-group-header { border-color: #ff9bc1; box-shadow: 0 10px 24px rgba(255,123,172,0.14); outline: none; }
.subscription-category-group-title { display: flex; align-items: center; min-width: 0; gap: 10px; }
.subscription-category-group-title img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; box-shadow: 0 4px 10px rgba(12,18,28,0.08); }
.subscription-category-group-title h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.subscription-category-group-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; color: #68717c; font-size: 0.86rem; font-weight: 800; white-space: nowrap; }
.subscription-category-group-summary strong { color: #9d315d; font-size: 1rem; }
.subscription-category-grid { display: none; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); justify-content: stretch; max-height: min(70vh, 680px); margin-top: 8px; padding: 14px; overflow-y: auto; overflow-anchor: none; border: 1px solid #e5e9ee; border-radius: 8px; background: rgba(255,255,255,0.98); box-shadow: 0 12px 28px rgba(12,18,28,0.12); backdrop-filter: blur(8px); }
.subscription-category-group.is-open .subscription-category-grid { display: grid; }
.subscription-category-grid .result-card { max-width: none; }
.subscription-category-grid--single { grid-template-columns: minmax(220px, 320px); justify-content: start; }
.subscription-category-grid--single .result-card { max-width: 320px; }
/* サブスク管理画面の利用中サブスク料金集計 */
.subscription-totals { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); width: min(100%, 920px); margin: 0 auto 24px; overflow: hidden; border-radius: 8px; background: linear-gradient(120deg,#ffb347 0%,#ffcc33 48%,#ff7bac 100%); color: #fff; text-align: left; box-shadow: 0 16px 34px rgba(255,123,172,0.22); }
.subscription-total { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 22px 26px; }
.subscription-total--primary { padding-top: 26px; padding-bottom: 26px; background: rgba(255,255,255,0.10); }
.subscription-total + .subscription-total { border-left: 1px solid rgba(255,255,255,0.38); }
.subscription-total-label { color: rgba(255,255,255,0.92); font-size: 0.9rem; font-weight: 800; }
.subscription-total-amount { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; white-space: nowrap; }
.subscription-total-amount strong { color: #fff; font-size: 2rem; line-height: 1.15; text-shadow: 0 2px 10px rgba(132,62,0,0.16); }
.subscription-total--primary .subscription-total-amount strong { font-size: 2.65rem; }
.subscription-total-amount span { font-size: 1rem; font-weight: 800; }
.subscription-total small { margin-top: 6px; color: rgba(255,255,255,0.88); font-size: 0.76rem; font-weight: 600; }
/* 下部に画像と操作ボタンを置くため余白を確保 */
.result-card { text-align: left; padding: 18px; min-height: 220px; display:flex; flex-direction:column; justify-content:space-between; position: relative; padding-bottom: 140px; }
.subscription-register-card { align-items: center; justify-content: center; gap: 18px; padding: 18px; border: 2px dashed #d9dde3; background: linear-gradient(145deg,#fff,#f8fafc); color: #68717c; text-align: center; text-decoration: none; box-shadow: 0 10px 28px rgba(31,41,51,0.07); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.subscription-register-card:hover { transform: translateY(-4px); border-color: #ff9bc1; background: #fff; box-shadow: 0 18px 38px rgba(31,41,51,0.11); }
.subscription-register-card-mark { position: relative; display: block; width: 112px; height: 112px; border: 2px solid #e2e6eb; border-radius: 50%; background: linear-gradient(145deg,#fff,#f2f5f8); box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(31,41,51,0.10); }
.subscription-register-card-mark::before,
.subscription-register-card-mark::after { content: ""; position: absolute; top: 50%; left: 50%; border-radius: 999px; background: linear-gradient(135deg,#ff7bac,#f2b94b); box-shadow: 0 2px 8px rgba(255,123,172,0.24); transform: translate(-50%,-50%); }
.subscription-register-card-mark::before { width: 52px; height: 10px; }
.subscription-register-card-mark::after { width: 10px; height: 52px; }
.subscription-register-card:hover .subscription-register-card-mark { border-color: #ffc0d8; box-shadow: inset 0 1px 0 #fff, 0 13px 28px rgba(255,123,172,0.16); }
.subscription-register-card-label { font-size: 1rem; font-weight: 800; letter-spacing: 0.04em; }
/* 一般サブスク */
.result-card.result-card--general {
	background: linear-gradient(135deg,#ffe6a7,#ffd1dc);
	border: 1px solid rgba(255,230,167,0.75);
	box-shadow: 0 10px 30px rgba(99, 102, 241, 0.08);
}
/* 独自サブスク */
.result-card.result-card--custom {
	background: linear-gradient(135deg,#d1e6ff,#c1f7d5);
	border: 1px solid rgba(209,230,255,0.75);
	box-shadow: 0 10px 30px rgba(99, 102, 241, 0.08);
}
/* 画像がある場合は画像を薄いカード背景として使用 */
.result-card.result-card--with-image {
	background:
		linear-gradient(135deg, rgba(255,255,255,0.84), rgba(255,255,255,0.70)),
		var(--card-image) center/cover no-repeat;
	border: 1px solid rgba(255,255,255,0.70);
	box-shadow: 0 10px 30px rgba(99, 102, 241, 0.08);
	color: #1f2933;
}
.result-card.result-card--with-image h4,
.result-card.result-card--with-image div {
	color: #1f2933 !important;
}
.result-card .thumb { position: absolute; left: 16px; bottom: 16px; width: 88px; height: 88px; overflow: hidden; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.result-card .thumb img { width: 100%; height: 100%; object-fit: cover; display:block; }

/* 編集・登録・選択ボタンを右下へ固定 */
.result-card .card-action { position: absolute; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; }
.result-card .card-action form { margin: 0; }
.result-card .card-action .btn { padding: 10px 14px; }
.result-card .card-action button.btn { padding-top: 14px; padding-bottom: 14px; }

/* サブスク管理画面の利用状態を明確に表示 */
.subscription-status { display: inline-flex; align-items: center; width: fit-content; margin-top: 8px; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; }
.subscription-status--active { background: #e4f7eb; color: #18733b; }
.subscription-status--paused { margin-top: 0; background: #ffe7e7; color: #ad2525; }
.subscription-kind { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 3px 9px 3px 5px; border: 1px solid transparent; border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.01em; box-shadow: 0 2px 7px rgba(31,41,51,0.08); }
.subscription-kind-icon { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 0.68rem; line-height: 1; }
.subscription-kind--general { border-color: #f1c759; background: #fff7d9; color: #795700; }
.subscription-kind--general .subscription-kind-icon { background: #e3a920; }
.subscription-kind--custom { border-color: #69c992; background: #e8faef; color: #17663a; }
.subscription-kind--custom .subscription-kind-icon { background: #2cab66; }
.subscription-edit-kind { display: flex; justify-content: center; margin: -8px 0 20px; }
.subscription-card-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.subscription-card-heading h4 { margin: 0; }
.subscription-annual-total { display: grid; gap: 3px; width: min(100%, 230px); margin: 0 0 11px; padding: 10px 13px 11px; border: 1px solid rgba(255,123,172,0.46); border-radius: 14px; background: rgba(255,255,255,0.92); color: #7a2b4f; box-shadow: 0 8px 18px rgba(157,49,93,0.16); font-weight: 900; }
.subscription-annual-total span { color: #7a2b4f; font-size: 0.78rem; letter-spacing: 0.03em; white-space: nowrap; }
.subscription-annual-total strong { color: #9d315d; font-size: 1.75rem; line-height: 1.02; white-space: nowrap; }
.result-card.result-card--with-image .subscription-annual-total { color: #7a2b4f !important; }
.result-card.result-card--with-image .subscription-annual-total span { color: #7a2b4f !important; }
.result-card.result-card--with-image .subscription-annual-total strong { color: #9d315d !important; }
.subscription-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.subscription-status-row .subscription-status { margin-top: 0; }
.status-toggle-form { margin: 0; }
.status-toggle-button { padding: 4px 10px; border: 1px solid #ad2525; border-radius: 999px; background: rgba(255,255,255,0.8); color: #ad2525; font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.status-toggle-button:hover { background: #ffe7e7; }
.status-toggle-button--resume { border-color: #18733b; color: #18733b; }
.status-toggle-button--resume:hover { background: #e4f7eb; }

/* 停止中サブスクは下部へまとめ、情報量を絞った小型カードにする */
.paused-subscriptions { margin-top: 72px; padding-top: 24px; border-top: 1px solid rgba(0,0,0,0.08); }
.paused-subscriptions-list { display: grid; gap: 10px; margin-top: 16px; }
.result-card.paused-subscription-card { min-height: 0; padding: 14px 190px 14px 76px; display: flex; justify-content: center; }
.paused-subscription-card .thumb { left: 14px; bottom: 50%; width: 48px; height: 48px; transform: translateY(50%); }
.paused-subscription-details { min-width: 0; }
.paused-subscription-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.paused-subscription-heading h4 { margin: 0; font-size: 1rem; }
.paused-subscription-meta { margin-top: 4px; color: #666; font-size: 0.82rem; }
.paused-subscription-card .card-action { right: 14px; bottom: 50%; transform: translateY(50%); }
.paused-subscription-card .card-action .btn { padding: 7px 11px; font-size: 0.82rem; }
.paused-subscription-card .card-action button.btn { padding-top: 10px; padding-bottom: 10px; }

/* ==========================================================================
   14. Billing calendar
   請求日と支払額を月単位で確認するカレンダー
   ========================================================================== */
.billing-calendar-panel { width: min(1240px, calc(100vw - 48px)); max-width: none; }
.management-navigation { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; }
.management-navigation-link { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 14px; border: 1px solid #e0e4e8; border-radius: 999px; background: #fff; color: #68717c; font-size: 0.84rem; font-weight: 800; box-shadow: 0 4px 12px rgba(12,18,28,0.07); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease; }
.management-navigation-link:hover { transform: translateY(-2px); border-color: #ff9bc1; color: #9d315d; box-shadow: 0 8px 18px rgba(255,123,172,0.16); }
.management-navigation-link.is-active { border-color: #ff7bac; background: linear-gradient(90deg,#ff7bac,#ffd166); color: #fff; box-shadow: 0 7px 16px rgba(255,123,172,0.22); }
.billing-calendar-header { display: flex; justify-content: center; align-items: center; margin-bottom: 20px; }
.billing-calendar-navigation { display: flex; align-items: center; gap: 18px; }
.billing-calendar-navigation-button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(90deg,#ff7bac,#ffd166); color: #fff; text-decoration: none; font-size: 1.7rem; font-weight: 800; line-height: 1; }
.billing-calendar-month { min-width: 150px; font-size: 1.3rem; font-weight: 800; }
.billing-calendar-today-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 13px; border-radius: 999px; background: #fff; color: #555; text-decoration: none; font-size: 0.82rem; font-weight: 800; box-shadow: 0 4px 12px rgba(12,18,28,0.08); }
.billing-calendar-today-button.is-disabled { color: #aaa; background: #f4f4f4; box-shadow: none; cursor: default; }
.billing-calendar-summary { display: grid; grid-template-columns: minmax(0,1.55fr) repeat(2,minmax(0,0.9fr)); width: 100%; margin: 0 0 24px; overflow: hidden; border-radius: 8px; background: linear-gradient(120deg,#ffb347 0%,#ffcc33 48%,#ff7bac 100%); color: #fff; text-align: left; box-shadow: 0 16px 34px rgba(255,123,172,0.22); }
.billing-calendar-summary-item { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 22px 26px; }
.billing-calendar-summary-item--primary { padding-top: 30px; padding-bottom: 30px; background: rgba(255,255,255,0.16); }
.billing-calendar-summary-item + .billing-calendar-summary-item { border-left: 1px solid rgba(255,255,255,0.38); }
.billing-calendar-summary-label { color: rgba(255,255,255,0.92); font-size: 0.9rem; font-weight: 800; }
.billing-calendar-summary-amount { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; white-space: nowrap; }
.billing-calendar-summary-amount strong { color: #fff; font-size: 2rem; line-height: 1.15; text-shadow: 0 2px 10px rgba(132,62,0,0.16); }
.billing-calendar-summary-item--primary .billing-calendar-summary-label { font-size: 1rem; }
.billing-calendar-summary-item--primary .billing-calendar-summary-amount strong { font-size: 3rem; }
.billing-calendar-summary-amount span { font-size: 1rem; font-weight: 800; }
.billing-calendar-summary-item small { margin-top: 6px; color: rgba(255,255,255,0.88); font-size: 0.76rem; font-weight: 600; }
.billing-calendar-scroll { overflow-x: auto; }
.billing-calendar { display: grid; grid-template-columns: repeat(7, minmax(130px,1fr)); min-width: 910px; overflow: hidden; border-radius: 8px; background: #d8dde1; gap: 1px; }
.billing-calendar-weekday { padding: 10px; background: #f4f6f7; color: #555; font-size: 0.86rem; font-weight: 800; }
.billing-calendar-weekday--sunday { color: #c43c3c; }
.billing-calendar-weekday--saturday { color: #2c63ad; }
.billing-calendar-day { min-height: 142px; padding: 9px; background: #fff; text-align: left; }
.billing-calendar-day--outside { background: #f1f3f4; color: #aaa; }
.billing-calendar-day--today { box-shadow: inset 0 0 0 3px #ff9b5a; }
.billing-calendar-day-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.billing-calendar-date { font-size: 0.84rem; font-weight: 800; }
.billing-calendar-register-link { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,123,172,0.12); color: #c83f76; text-decoration: none; font-size: 1rem; font-weight: 800; line-height: 1; }
.billing-calendar-register-link:hover { background: #ff7bac; color: #fff; }
.billing-calendar-day--outside .billing-calendar-register-link { opacity: 0.65; }
.billing-calendar-payments { display: grid; gap: 5px; }
.billing-payment { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 5px; min-width: 0; padding: 5px 6px; border-radius: 6px; color: #2b2b2b; text-decoration: none; font-size: 0.72rem; transition: transform .14s ease, box-shadow .14s ease; }
.billing-payment:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(12,18,28,0.12); }
.billing-payment--general { background: linear-gradient(135deg,#ffe6a7,#ffd1dc); }
.billing-payment--custom { background: linear-gradient(135deg,#d1e6ff,#c1f7d5); }
.billing-payment-mark { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.billing-payment-mark--text { display: grid; place-items: center; background: rgba(255,255,255,0.8); color: #444; font-weight: 800; }
.billing-payment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.billing-payment strong { white-space: nowrap; font-size: 0.72rem; }

/* 月ごとの請求金額 */
.monthly-billing-description { margin: -6px 0 22px; color: #666; }
.monthly-billing-total { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin-bottom: 22px; padding: 18px 22px; border-radius: 12px; background: linear-gradient(120deg,#ffb347,#ffcc33,#ff7bac); color: #fff; box-shadow: 0 12px 28px rgba(255,123,172,0.18); }
.monthly-billing-total span { font-weight: 800; }
.monthly-billing-total strong { font-size: 2rem; }
.monthly-billing-chart { margin: 0 0 24px; padding: 18px; overflow-x: auto; border: 1px solid #e2e6eb; border-radius: 14px; background: linear-gradient(145deg,#fff,#f7f9fb); box-shadow: 0 8px 20px rgba(31,41,51,0.07); }
.monthly-billing-chart h2 { margin: 0 0 14px; color: #333; font-size: 1.05rem; text-align: left; }
.monthly-billing-chart-bars { display: grid; grid-template-columns: repeat(12,minmax(38px,1fr)); align-items: end; gap: 10px; padding: 0 0 10px; }
.monthly-billing-chart-column { display: grid; grid-template-rows: auto 190px auto; align-items: end; gap: 7px; min-width: 0; color: #333; text-align: center; text-decoration: none; transition: transform .16s ease; }
.monthly-billing-chart-column:hover { transform: translateY(-3px); }
.monthly-billing-chart-column:hover .monthly-billing-chart-stack { box-shadow: 0 7px 15px rgba(255,123,172,0.16); }
.monthly-billing-chart-column:hover .monthly-billing-chart-stack::before { background: #fff4f8; }
.monthly-billing-chart-column:hover .monthly-billing-chart-stack::after { border-color: #ff7bac; box-shadow: inset 0 0 0 1px rgba(255,123,172,0.26); }
.monthly-billing-chart-column:hover .monthly-billing-chart-segment { filter: saturate(1.16) brightness(1.05); }
.monthly-billing-chart-column:hover strong,
.monthly-billing-chart-column:hover .monthly-billing-chart-label { color: #9d315d; }
.monthly-billing-chart-column--current .monthly-billing-chart-label { color: #111827; font-weight: 900; }
.monthly-billing-chart-column strong { color: #9d315d; font-size: 0.78rem; line-height: 1.2; white-space: nowrap; justify-self: center; }
.monthly-billing-chart-stack-group { display: grid; grid-template-columns: repeat(var(--split-count), minmax(0,1fr)); align-items: end; align-self: end; gap: 3px; box-sizing: border-box; width: 100%; height: calc(100% - 10px); }
.monthly-billing-chart-stack { position: relative; display: flex; flex-direction: column-reverse; justify-content: flex-start; box-sizing: border-box; height: var(--stack-height); min-height: 3px; overflow: hidden; border: 0; border-radius: 10px 10px 4px 4px; background: transparent; box-shadow: 0 3px 9px rgba(31,41,51,0.10); }
.monthly-billing-chart-stack::before { content: ""; position: absolute; z-index: 0; inset: 0; border-radius: 10px 10px 4px 4px; background: #eef1f5; box-shadow: inset 0 1px 4px rgba(31,41,51,0.08); pointer-events: none; }
.monthly-billing-chart-stack::after { content: ""; position: absolute; z-index: 2; inset: 0; border: 1px solid rgba(31,41,51,0.24); border-radius: 10px 10px 4px 4px; pointer-events: none; }
.monthly-billing-chart-stack--filled .monthly-billing-chart-segment { flex-grow: 1; }
.monthly-billing-chart-segment { position: relative; z-index: 1; display: block; box-sizing: border-box; min-height: 3px; height: var(--segment-height); border: 1px solid rgba(255,255,255,0.72); background: var(--segment-color); box-shadow: inset 0 0 0 1px rgba(31,41,51,0.06); }
.monthly-billing-chart-segment--image { background: linear-gradient(rgba(255,255,255,0.18), rgba(255,255,255,0.18)), var(--segment-image) center/cover no-repeat; }
.monthly-billing-chart-label { color: #111827; font-size: 0.82rem; font-weight: 800; }
.monthly-billing-chart-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #e6e9ee; }
.monthly-billing-chart-legend-item { display: inline-flex; align-items: center; gap: 6px; color: #555; font-size: 0.82rem; font-weight: 800; }
.monthly-billing-chart-legend-color { width: 12px; height: 12px; border-radius: 3px; background: var(--legend-color); box-shadow: 0 1px 4px rgba(31,41,51,0.16); }
.monthly-billing-chart-legend-image { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; box-shadow: 0 1px 4px rgba(31,41,51,0.16); }
.monthly-billing-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.monthly-billing-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-height: 148px; padding: 18px; border: 1px solid #e2e6eb; border-radius: 12px; background: linear-gradient(145deg,#fff,#f7f9fb); color: #333; text-align: left; box-shadow: 0 8px 20px rgba(31,41,51,0.07); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.monthly-billing-card:hover { transform: translateY(-3px); border-color: #ff9bc1; box-shadow: 0 14px 28px rgba(31,41,51,0.11); }
.monthly-billing-card--current { border-color: #ff9bc1; background: linear-gradient(145deg,#fff5f9,#fffaf0); }
.monthly-billing-month { font-weight: 800; }
.monthly-billing-card small { position: absolute; top: 14px; right: 14px; padding: 3px 7px; border-radius: 999px; background: #ff7bac; color: #fff; font-weight: 800; }
.monthly-billing-icons { position: absolute; right: 14px; bottom: 12px; display: flex; align-items: center; padding-left: 3px; }
.monthly-billing-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: -3px; overflow: hidden; border: 2px solid #fff; border-radius: 50%; background: linear-gradient(135deg,#fff0f6,#fff8df); color: #9d315d; font-size: 0.76rem; font-weight: 900; box-shadow: 0 3px 8px rgba(31,41,51,0.14); }
.monthly-billing-icon img { width: 100%; height: 100%; object-fit: cover; }
.monthly-billing-icon--more { background: #68717c; color: #fff; font-size: 0.7rem; }
.monthly-billing-card strong { margin-top: auto; font-size: 1.65rem; color: #9d315d; }
.monthly-billing-link { max-width: calc(100% - 105px); color: #777; font-size: 0.78rem; font-weight: 700; }

/* ==========================================================================
   15. Responsive adjustments
   タブレット・スマートフォン向けのレイアウト調整
   ========================================================================== */
@media (max-width:900px) {
  .results-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width:600px) {
  :root { --sticky-header-offset: 64px; }
  .site-header .header-inner{padding:12px; min-height:52px;}
  .subscription-list-header { grid-template-columns: 1fr; align-items: stretch; margin-left: -8px; margin-right: -8px; }
  .subscription-list-side,
  .management-navigation { width: 100%; justify-content: center; }
  .management-toolbar .management-navigation { grid-column: auto; }
  .subscription-view-toggle { width: 100%; }
  .subscription-view-toggle-button { flex: 1 1 0; }
  .subscription-category-grid--single { grid-template-columns: 1fr; }
  .subscription-category-grid--single .result-card { max-width: none; }
	.hero{padding:36px 12px;}
	.actions{flex-direction:column; align-items:center;}
	.usage-month-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
	.billing-calendar-panel { width: calc(100vw - 24px); padding: 20px 12px; }
	.billing-calendar-navigation { justify-content: center; flex-wrap: wrap; }
	.billing-calendar-summary { grid-template-columns: 1fr; }
	.billing-calendar-summary-item { padding: 18px 20px; }
	.billing-calendar-summary-item--primary { padding-top: 22px; padding-bottom: 22px; }
	.billing-calendar-summary-item + .billing-calendar-summary-item { border-top: 1px solid rgba(255,255,255,0.38); border-left: 0; }
	.billing-calendar-summary-amount strong { font-size: 1.75rem; }
	.billing-calendar-summary-item--primary .billing-calendar-summary-amount strong { font-size: 2.25rem; }
	.monthly-billing-grid { grid-template-columns: 1fr; }
  .card{width:92%;}
  .results-grid { grid-template-columns: 1fr; }
  .subscription-totals { grid-template-columns: 1fr; }
  .subscription-total { padding: 18px 20px; }
  .subscription-total--primary { padding-top: 22px; padding-bottom: 22px; }
  .subscription-total + .subscription-total { border-top: 1px solid rgba(255,255,255,0.38); border-left: 0; }
  .subscription-total-amount strong { font-size: 1.75rem; }
  .subscription-total--primary .subscription-total-amount strong { font-size: 2.25rem; }
  .result-card { height: auto; }
  .result-card.paused-subscription-card { padding: 14px 14px 64px 76px; }
  .paused-subscription-card .card-action { right: 14px; bottom: 12px; transform: none; }
}
