/* 会員登録・ログイン・アカウント（PMS フォーム） */
/* 読み込み: mu-plugins/itabashi-member-pages.php。セレクタ先頭の :is() が .graybox または会員系固定ページの body を表す。 */

/* ========== 会員登録 #pms_register-form ========== */

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form.pms-form {
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-form-fields-wrapper {
	list-style: none;
	margin: 0;
	padding: 0;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-account-section-wrapper .pms-field {
	margin-bottom: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-field input[type="text"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-field input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.85rem;
	border: 1px solid #daccbd;
	border-radius: 6px;
	font-size: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-field input:focus {
	outline: none;
	border-color: #f08722;
	box-shadow: 0 0 0 2px rgba(240, 135, 34, 0.2);
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .itb-register-name-note {
	list-style: none;
	margin: -0.35rem 0 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .itb-register-name-note__text {
	margin: 0;
	font-size: 0.875rem;
	color: #e05555;
	line-height: 1.55;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form input.pms-form-submit[name="pms_register"] {
	display: block;
	min-width: 200px;
	margin: 1.5rem auto 0;
	padding: 0.75rem 1.75rem;
	border-radius: 6px;
	border: 1px solid #f08722;
	background: #f95;
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form input.pms-form-submit[name="pms_register"]:hover {
	filter: brightness(1.05);
}

/* ========== アカウント内 プロフィール編集 #pms_edit-profile-form（会員登録と同デザイン） ========== */

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form.pms-form {
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form .pms-form-fields-wrapper {
	list-style: none;
	margin: 0;
	padding: 0;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form .pms-field {
	margin-bottom: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form .pms-pass1-field,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form .pms-pass2-field {
	display: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form .pms-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form .pms-field input[type="text"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form .pms-field input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.85rem;
	border: 1px solid #daccbd;
	border-radius: 6px;
	font-size: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form .pms-field input:focus:not(:disabled) {
	outline: none;
	border-color: #f08722;
	box-shadow: 0 0 0 2px rgba(240, 135, 34, 0.2);
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form .pms-field input:disabled {
	opacity: 0.85;
	cursor: not-allowed;
	background-color: #f5f2ee;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form input[type="submit"][name="pms_edit_profile"] {
	display: block;
	min-width: 200px;
	margin: 1.5rem auto 0;
	padding: 0.75rem 1.75rem;
	border-radius: 6px;
	border: 1px solid #f08722;
	background: #f95;
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: none;
	text-shadow: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_edit-profile-form input[type="submit"][name="pms_edit_profile"]:hover {
	filter: brightness(1.05);
}

/* ========== プロフィール画像 #pms_edit-profile-form ========== */

:is(.graybox, body.page-account) .itb-profile-avatar-field {
	margin-bottom: 1rem;
}

:is(.graybox, body.page-account) .itb-profile-avatar-field label[for="itb_profile_avatar"] {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

:is(.graybox, body.page-account) .itb-profile-avatar-field__body {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1rem;
}

:is(.graybox, body.page-account) .itb-profile-avatar-field__preview {
	flex-shrink: 0;
}

:is(.graybox, body.page-account) .itb-profile-avatar-field__img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid #daccbd;
	background: #f5f2ee;
}

:is(.graybox, body.page-account) .itb-profile-avatar-field__controls {
	flex: 1 1 200px;
	min-width: 0;
}

:is(.graybox, body.page-account) .itb-profile-avatar-field input[type="file"] {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-size: 0.95rem;
}

:is(.graybox, body.page-account) .itb-profile-avatar-field__help {
	margin: 0.5rem 0 0;
	font-size: 0.85rem;
	color: #666;
	line-height: 1.5;
}

:is(.graybox, body.page-account) .itb-profile-avatar-field__remove {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.75rem;
	font-size: 0.9rem;
	cursor: pointer;
}

label[for="pms_user_login"]::after,
label[for="pms_user_email"]::after,
label[for="pms_pass1"]::after,
label[for="pms_pass2"]::after {
	content: ' *';
	color: #f66;
	font-weight: 700;
}

/* ========== パスワード再設定フォーム（ログインと同系のレイアウト・ボタン） ========== */
/* PMS の出力ID: メール送信フォーム=#pms_recover_password_form、新パスワード設定フォーム=#pms_new_password_form。
   body に page-password-reset クラスが付かないため ID を直接指定 */

#pms_recover_password_form.pms-form,
#pms_new_password_form.pms-form {
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

/* 説明文（Please enter your... の <p>） */
#pms_recover_password_form > p,
#pms_new_password_form > p {
	margin: 0 0 1.25rem;
	font-size: 14px;
	color: #666;
}

/* フィールドは <ul class="pms-form-fields-wrapper"><li class="pms-field"> で囲まれる */
#pms_recover_password_form .pms-form-fields-wrapper,
#pms_new_password_form .pms-form-fields-wrapper {
	list-style: none;
	margin: 0;
	padding: 0;
}

#pms_recover_password_form .pms-field,
#pms_new_password_form .pms-field {
	margin-bottom: 1rem;
}

#pms_recover_password_form .pms-field label,
#pms_new_password_form .pms-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

#pms_recover_password_form .pms-field input[type="text"],
#pms_recover_password_form .pms-field input[type="email"],
#pms_new_password_form .pms-field input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.85rem;
	border: 1px solid #daccbd;
	border-radius: 6px;
	font-size: 1rem;
}

#pms_recover_password_form .pms-field input:focus,
#pms_new_password_form .pms-field input:focus {
	outline: none;
	border-color: #f08722;
	box-shadow: 0 0 0 2px rgba(240, 135, 34, 0.2);
}

#pms_recover_password_form input[type="submit"],
#pms_new_password_form input[type="submit"] {
	display: block;
	min-width: 200px;
	margin: 1.5rem auto 0;
	padding: 0.75rem 1.75rem;
	border-radius: 6px;
	border: 1px solid #f08722 !important;
	background: #f95 !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: none;
	text-shadow: none;
}

#pms_recover_password_form input[type="submit"]:hover,
#pms_new_password_form input[type="submit"]:hover {
	filter: brightness(1.05);
}

/* ========== ログイン #pms_login（会員登録と同系のレイアウト・ボタン） ========== */

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login.pms-form {
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-username,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-password,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-remember {
	margin-bottom: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-username label,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-password label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-remember label {
	display: inline;
	font-weight: 600;
	margin-left: 0.35rem;
	vertical-align: middle;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login input.input[type="text"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login input.input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.85rem;
	border: 1px solid #daccbd;
	border-radius: 6px;
	font-size: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login input.input:focus {
	outline: none;
	border-color: #f08722;
	box-shadow: 0 0 0 2px rgba(240, 135, 34, 0.2);
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-submit {
	margin-top: 0.5rem;
	margin-bottom: 0;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-submit input#wp-submit.button.button-primary {
	display: block;
	min-width: 200px;
	margin: 1.5rem auto 0;
	padding: 0.75rem 1.75rem;
	border-radius: 6px;
	border: 1px solid #f08722 !important;
	background: #f95 !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: none;
	text-shadow: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-submit input#wp-submit.button.button-primary:hover {
	filter: brightness(1.05);
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_login .login-extra {
	margin: 0;
}

/* PMS 標準の「お忘れですか」リンクを非表示にして独自の itb-lost-password リンクに統一 */
#pms_login p.lost-password,
#pms_login .login-extra:has(a[href*="lostpassword"]),
#pms_login .login-extra:has(a[href*="password-reset"]) {
	display: none;
}

/* ========== アカウントページ - メイン（プラン / プロフィールの2タブ） ========== */

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation {
	margin-bottom: 2rem;
	border-bottom: none;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
	overflow: visible;
	position: relative;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
	position: relative;
	z-index: 0;
	border-bottom: 2px solid #daccbd;
	isolation: isolate;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation li {
	margin: 0;
	padding: 0;
	flex: 0 0 auto;
	border: none;
	width: auto;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation li.pms-account-navigation-link--payments {
	display: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation ul > li:not(.pms-account-navigation-link--payments) {
	flex: 1 1 0;
	min-width: 0;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation a {
	display: block;
	padding: 0.75rem 0.85rem;
	text-align: center;
	text-decoration: none;
	color: #333;
	font-weight: 600;
	border-bottom: none;
	transition: color 0.2s ease, background-color 0.2s ease;
	position: relative;
	z-index: 0;
	box-sizing: border-box;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation a:hover {
	color: #f08722;
	background-color: rgba(240, 135, 34, 0.06);
	text-decoration: none !important;
	border-bottom: none !important;
	box-shadow: none !important;
	outline: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation a:hover::after {
	content: none;
	display: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation a.pms-account-navigation-link--active {
	color: #f08722;
	background-color: transparent;
	border-left: none;
	padding-left: 0.85rem;
	z-index: 2;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation a.pms-account-navigation-link--active::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 4px;
	background-color: #f08722;
	z-index: 3;
	pointer-events: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-navigation a.pms-account-navigation-link--active:hover::after {
	content: '';
	display: block;
}

/* プラン管理ブロック直下のログアウト（mu-plugin で出力） */

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .itb-pms-account-logout-wrap {
	margin: 1.25rem 0 0;
	padding: 0;
	text-align: center;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .itb-pms-account-logout {
	display: inline;
	font-size: inherit;
	font-weight: inherit;
	color: #d9788a;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	background: none;
	border: none;
	padding: 0;
}

body:not(.logged-in) .pms-account-description {
	display: none !important;
}

/* ゲスト時、ログインフォーム上のリード段落（契約内容の確認…）を隠すフォールバック。
   フォーム後ろに差し込む再設定リンク（.itb-lost-password）まで巻き込まないよう除外する。 */
body:not(.logged-in) .graybox:has(#pms_login) > p:first-of-type:not(.itb-lost-password) {
	display: none !important;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .itb-pms-register-from-login-wrap {
	margin: 1rem 0 0;
	padding: 0;
	text-align: center;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin-top: 2rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table tbody {
	display: block;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table tr {
	display: flex;
	border-bottom: 1px solid #f0f0f0;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table tr:last-child {
	border-bottom: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table td {
	padding: 1.25rem 1.25rem;
	display: block;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table td:first-child {
	font-weight: 600;
	color: #666;
	font-size: 0.9rem;
	width: 124px;
	min-width: 124px;
	max-width: 124px;
	flex-shrink: 0;
	background: #f8f9fa;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table td:last-child {
	color: #333;
	flex: 1;
	font-size: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table__plan td:last-child {
	font-size: 1rem;
	font-weight: 400;
	color: #333;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table__status td:last-child {
	display: flex;
	align-items: center;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table__status .status-active {
	color: #28a745;
	font-weight: 400;
	font-size: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table__status .status-pending {
	color: #ffc107;
	font-weight: 400;
	font-size: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table__status .status-expired,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table__status .status-canceled {
	color: #dc3545;
	font-weight: 400;
	font-size: 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-details-table__actions td:last-child {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-action-link {
	display: inline-block;
	padding: 0.5rem 1.25rem;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	transition: all 0.2s ease;
	border: 1px solid;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-action-link__change {
	background: #f08722;
	color: #fff;
	border-color: #f08722;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-action-link__change:hover {
	background: #d97617;
	border-color: #d97617;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-action-link__cancel {
	background: #fff;
	color: #666;
	border-color: #ddd;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-action-link__cancel:hover {
	background: #f8f9fa;
	border-color: #999;
	color: #333;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-account-subscription-action-link__abandon {
	display: none !important;
}

/* ========== プラン変更フォーム（料金ページ .itb-card 系に寄せたレイアウト） ========== */

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form.pms-form {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-upgrade__message {
	grid-column: 1 / -1;
	margin: 0 0 8px;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-upgrade__message p {
	margin: 0 0 10px;
	font-size: 1rem;
	line-height: 1.6;
	color: #333;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-upgrade__group {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	margin-bottom: 20px;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan {
	background: #fff;
	border: 2px solid #daccbd;
	border-radius: 8px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-sizing: border-box;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
	cursor: pointer;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan:has(input:checked) {
	border-color: #f08722;
	box-shadow: 0 0 0 3px rgba(240, 135, 34, 0.25);
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan label {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	margin: 0;
	cursor: pointer;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	appearance: none;
	-webkit-appearance: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan:has(input[type="radio"]:focus-visible) {
	box-shadow: 0 0 0 3px rgba(240, 135, 34, 0.35);
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-name {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: #333;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-price {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
	margin: 0 0 4px;
	padding: 4px 0 12px;
	border-bottom: 1px solid #daccbd;
	box-sizing: border-box;
	color: #333;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-price .itb-pms-plan-price-label {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: #666;
	font-weight: 400;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-price .itb-pms-plan-price-line {
	margin: 0 0 2px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-price .itb-pms-plan-price-suffix {
	font-size: 0.65em;
	font-weight: 700;
	margin-left: 0.1em;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-price-value,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-currency {
	font-size: inherit;
	font-weight: inherit;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-trial,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-sign-up-fee {
	font-size: 13px;
	color: #666;
	line-height: 1.4;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-description {
	margin: 4px 0 0;
	width: 100%;
	font-size: 15px;
	line-height: 1.8;
	color: #333;
	font-style: normal;
	text-align: left;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-description em,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-description i {
	font-style: normal;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-description ul {
	list-style: none;
	margin: 8px auto 0;
	padding: 0;
	width: fit-content;
	max-width: 100%;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-description ul li {
	margin: 0 0 4px;
	padding-left: 1.35em;
	position: relative;
	text-align: left;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-description ul li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: #1f4f96;
	font-weight: 900;
	font-size: 1.1em;
	line-height: 1.5;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-description ul.itb-pms-plan-features,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan ul.itb-pms-plan-features {
	list-style: none;
	margin: 8px auto 0;
	padding: 0;
	width: fit-content;
	max-width: 100%;
	font-size: 15px;
	line-height: 1.8;
	color: #333;
	text-align: left;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-description ul.itb-pms-plan-features li,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan ul.itb-pms-plan-features li {
	margin: 0 0 4px;
	padding-left: 1.35em;
	position: relative;
	text-align: left;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan-description ul.itb-pms-plan-features li::before,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .pms-subscription-plan ul.itb-pms-plan-features li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: #1f4f96;
	font-weight: 900;
	font-size: 1.1em;
	line-height: 1.5;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-subscription-plan-description ul.itb-pms-plan-features,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-subscription-plan ul.itb-pms-plan-features {
	list-style: none;
	margin: 0.35rem 0 0;
	padding: 0;
	width: auto;
	max-width: 100%;
	font-size: 1rem;
	line-height: 1.55;
	color: #333;
	font-style: normal;
	text-align: left;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-subscription-plan-description ul.itb-pms-plan-features li,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-subscription-plan ul.itb-pms-plan-features li {
	margin: 0 0 0.2em;
	padding-left: 1.1em;
	position: relative;
	font-style: normal;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-subscription-plan-description ul.itb-pms-plan-features li::before,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-subscription-plan ul.itb-pms-plan-features li::before {
	content: "\30FB";
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 400;
	color: #333;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms_register-form .pms-subscription-plan-description {
	font-style: normal;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .itb-pms-change-actions,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-update-payment-method-form .itb-pms-change-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin: 1.25rem 0 1rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form input[type="submit"][name="pms_change_subscription"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-update-payment-method-form input[type="submit"][name="pms_update_payment_method"] {
	display: inline-block;
	min-width: 200px;
	margin: 1.25rem auto 0.75rem;
	padding: 0.5rem 1.75rem;
	border-radius: 6px;
	border: 1px solid #f08722;
	background: #f95;
	color: #fff !important;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: none;
	text-shadow: none;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form input[type="submit"][name="pms_change_subscription"]:hover,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-update-payment-method-form input[type="submit"][name="pms_update_payment_method"]:hover {
	filter: brightness(1.05);
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form input[type="submit"][name="pms_redirect_back"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-update-payment-method-form input[type="submit"][name="pms_redirect_back"] {
	display: inline-block;
	min-width: 200px;
	margin: 0 auto 1rem;
	padding: 0.5rem 1.25rem;
	border-radius: 6px;
	border: 1px solid #daccbd;
	background: #faf7f4;
	color: #333 !important;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .itb-pms-change-actions input[type="submit"][name="pms_change_subscription"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-change-subscription-form .itb-pms-change-actions input[type="submit"][name="pms_redirect_back"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-update-payment-method-form .itb-pms-change-actions input[type="submit"][name="pms_update_payment_method"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-update-payment-method-form .itb-pms-change-actions input[type="submit"][name="pms_redirect_back"] {
	margin: 0;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-update-payment-method-form .itb-pms-change-actions {
	gap: 24px;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-update-payment-method-form input[type="submit"][name="pms_update_payment_method"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) #pms-update-payment-method-form input[type="submit"][name="pms_redirect_back"] {
	min-width: 140px;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-form input[name="pms_recurring"],
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-form input[name="pms_recurring"] + label,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-form .pms-field-type-checkbox:has(input[name="pms_recurring"]),
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-form .pms-subscription-plan-auto-renew,
:is(.graybox, body.page-account, body.page-login, body.page-register, body.page-subscribe) .pms-subscription-plan-auto-renew {
	display: none !important;
}

/* ========== 支払い再試行など、専用 ID の付かない PMS フォーム ========== */
/*
 * 「支払いを再試行」画面（保留中サブスクの再決済）は固有の ID/クラスが付かないため、
 * アカウント文脈で ID 指定済みのフォーム（会員登録・プロフィール編集・ログイン・
 * プラン変更・支払い方法変更）以外の pms-form をまとめて拾い、他画面と同じ体裁にする。
 * ID 指定のルールの方が詳細度が高いので、それらは上書きされない。
 */

:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) {
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

/* 確認メッセージ（「…はまだ保留中です。お支払いを再試行しますか?」など） */
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) > p {
	margin: 0 0 1rem;
	font-size: 1rem;
	line-height: 1.6;
	color: #333;
}

:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .pms-field {
	margin-bottom: 1rem;
}

:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .pms-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .pms-field input[type="text"],
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .pms-field input[type="email"],
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .pms-field input[type="tel"],
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .pms-field input[type="number"],
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .pms-field input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.85rem;
	border: 1px solid #daccbd;
	border-radius: 6px;
	font-size: 1rem;
}

:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .pms-field input:focus:not(:disabled) {
	outline: none;
	border-color: #f08722;
	box-shadow: 0 0 0 2px rgba(240, 135, 34, 0.2);
}

/* 主ボタン（再試行・支払う 等）＝プラン変更／支払い方法変更と同じオレンジ */
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) input[type="submit"]:not([name="pms_redirect_back"]),
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) button[type="submit"]:not([name="pms_redirect_back"]) {
	display: inline-block;
	min-width: 200px;
	margin: 1.25rem auto 0.75rem;
	padding: 0.5rem 1.75rem;
	border-radius: 6px;
	border: 1px solid #f08722;
	background: #f95;
	color: #fff !important;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: none;
	text-shadow: none;
}

:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) input[type="submit"]:not([name="pms_redirect_back"]):hover,
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) button[type="submit"]:not([name="pms_redirect_back"]):hover {
	filter: brightness(1.05);
}

/* 戻るボタン＝他画面と同じグレー */
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) input[type="submit"][name="pms_redirect_back"],
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) button[name="pms_redirect_back"] {
	display: inline-block;
	min-width: 200px;
	margin: 0 auto 1rem;
	padding: 0.5rem 1.25rem;
	border-radius: 6px;
	border: 1px solid #daccbd;
	background: #faf7f4;
	color: #333 !important;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

/* 主・戻るを横並びにする（他画面の .itb-pms-change-actions と同じ間隔感） */
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .itb-pms-change-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 24px;
	margin: 1.25rem 0 1rem;
}

:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .itb-pms-change-actions input[type="submit"],
:is(.graybox, body.page-account) .pms-form:not(#pms_register-form):not(#pms_edit-profile-form):not(#pms_login):not(#pms-change-subscription-form):not(#pms-update-payment-method-form) .itb-pms-change-actions button {
	margin: 0;
}
