/*
 * PHP共通フレーム
 * Sources:
 * - components/frame/AppFrame.tsx
 * - components/frame/GlobalBannerLayer.tsx
 * - components/frame/GlobalAlertBox.tsx
 * - components/frame/LoadingOverlay.tsx
 * - components/frame/MatchingModal.tsx
 * - components/frame/RestrictedOverlay.tsx
 */

html:has(body.tk-app-frame) {
	min-height: 100%;
	background: linear-gradient(135deg, #ffd5e3, #f6e2ff 48%, #dfe3ff);
}

body.tk-app-frame {
	position: relative;
	width: 100%;
	max-width: 390px;
	min-height: 100vh;
	margin: 0 auto;
	overflow-x: hidden;
	color: #333;
	background: #fff;
	box-shadow: 0 0 26px rgba(33, 33, 33, 0.08);
	font-family: Inter, "Noto Sans JP", system-ui, -apple-system, sans-serif;
}

body.tk-app-frame > header,
body.tk-app-frame > main {
	width: 100%;
	max-width: 390px;
}

body.tk-app-frame > main {
	min-height: 100vh;
	padding-top: 56px !important;
	padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

/* AuthShell相当の未ログイン画面にはAppFrameのHeader/BottomNav余白を足さない。 */
body.tk-app-frame.nologin > main {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}
body.tk-app-frame.nologin > main.tk-renewal > * {
	width: 100%;
	max-width: none;
	margin: 0;
}

body.nologin.tk-app-frame > main.maintenance.tk-maintenance-renewal {
	position: relative;
	inset: auto;
	display: flex;
	width: 100%;
	max-width: 390px;
	height: auto;
	min-height: 100vh;
	margin: 0 auto;
	padding: 96px 20px 40px !important;
	align-items: center;
	justify-content: center;
	color: #333;
	background: #fff;
	font-size: 16px;
	text-align: center;
	box-sizing: border-box;
}

body.nologin.tk-app-frame > main.tk-maintenance-renewal > section {
	width: 100%;
	margin: 0;
	padding: 40px 24px;
	border: 1px solid #ffe1ea;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 18px 44px rgba(252, 70, 120, .12);
	box-sizing: border-box;
}

body.nologin.tk-app-frame > main.tk-maintenance-renewal .tk-maintenance-icon {
	display: grid;
	width: 76px;
	height: 76px;
	margin: 0 auto;
	place-items: center;
	border-radius: 50%;
	color: #fc4678;
	background: #fff1f5;
	box-shadow: 0 12px 24px rgba(252, 70, 120, .12);
}

body.nologin.tk-app-frame > main.tk-maintenance-renewal .tk-maintenance-icon svg {
	width: 34px;
	height: 34px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

body.nologin.tk-app-frame > main.tk-maintenance-renewal h3 {
	width: 100%;
	max-width: none;
	margin: 24px 0 0;
	color: #30323a;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.25;
}

body.nologin.tk-app-frame > main.tk-maintenance-renewal p {
	margin: 20px 0 0;
	color: #666;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.9;
}

/* マイページ更新版はヘッダー56px＋セクション上余白24px。 */
body.tk-app-frame > main.mypage.tk-mypage-renewal {
	padding-top: 80px !important;
}

body.tk-app-frame > main.mypage.tk-mypage-renewal .profile_image > ul {
	height: 65px;
	max-width: none;
}

body.tk-app-frame > main.mypage.tk-mypage-renewal .profile_image > ul li {
	height: 65px;
	min-height: 65px;
}

body.tk-app-frame > main.mypage.tk-mypage-renewal .profile_image .btns {
	justify-content: center;
}

body.tk-app-frame > main.mypage.tk-mypage-renewal .profile_image .btns a {
	width: 100%;
	max-width: none;
	height: 40px;
	min-height: 40px;
	line-height: 19.5px;
}

body.tk-app-frame > main.mypage.tk-mypage-renewal .otomeBox {
	height: 138px;
	box-sizing: border-box;
}

body.tk-app-frame > main.mypage.tk-mypage-renewal > ul.nav {
	margin-top: 24px;
}

body.tk-app-frame > main.mypage.tk-mypage-renewal > ul.nav > li > a {
	min-height: 72px;
}

body.tk-app-frame > main::before,
body.tk-app-frame > main::after {
	display: none;
	content: none;
}

body.tk-app-frame > .tk-renewal[aria-label="メインナビゲーション"] {
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* AppHeader */
body.tk-app-frame > header:not(.tk-frame-header) {
	position: fixed;
	top: 0;
	left: 50%;
	z-index: 50;
	display: block;
	width: 100%;
	max-width: 390px;
	height: 57px !important;
	min-height: 57px;
	max-height: 57px;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	border: 0;
	border-bottom: 1px solid #eee;
	background: #fff;
	box-shadow: none;
	transform: translateX(-50%);
}
body.tk-app-frame > header:not(.tk-frame-header) > .container {
	position: relative;
	display: grid;
	width: 100%;
	height: 56px;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	grid-template-columns: 56px minmax(0, 1fr) 56px;
	align-items: center;
}
body.tk-app-frame > header:not(.tk-frame-header) h2 {
	grid-row: 1;
	grid-column: 2;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	color: #222;
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}
body.tk-app-frame > header:not(.tk-frame-header) .arrow_back {
	position: static;
	display: block;
	grid-row: 1;
	grid-column: 1;
	justify-self: center;
	width: 44px;
	height: 44px;
	margin: 0;
}
body.tk-app-frame > header:not(.tk-frame-header) .arrow_back a {
	display: flex;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	color: #333;
	background: none;
	font-size: 0;
}
body.tk-app-frame > header:not(.tk-frame-header) .arrow_back a::before {
	display: none;
	content: none;
}
body.tk-app-frame > header:not(.tk-frame-header) .arrow_back svg {
	display: block;
	width: 31px;
	height: 31px;
	flex: 0 0 31px;
}
body.tk-app-frame > header:not(.tk-frame-header) > .container > :not(h2):not(.arrow_back):not(.arrow_close) {
	grid-row: 1;
	grid-column: 3;
	justify-self: center;
}
body.tk-app-frame > .tk-frame-header {
	position: fixed;
	top: var(--safe-area-top, 0);
	left: 50%;
	z-index: 50;
	display: block;
	width: 100%;
	max-width: 390px;
	height: 57px !important;
	min-height: 57px;
	max-height: 57px;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	border: 0;
	border-bottom: 1px solid #eee;
	color: #222;
	background: #fff;
	box-shadow: none;
	transform: translateX(-50%);
}
body.tk-app-frame > .tk-frame-header .tk-frame-header__grid {
	display: grid;
	width: 100%;
	height: 56px;
	padding: 0;
	grid-template-columns: 56px minmax(0, 1fr) 56px;
	align-items: center;
}
body.tk-app-frame > .tk-frame-header .tk-frame-header__side {
	display: flex;
	min-width: 0;
	height: 56px;
	align-items: center;
	justify-content: center;
}
body.tk-app-frame > .tk-frame-header .tk-frame-header__back {
	display: flex;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	color: #333;
}

body.tk-app-frame > .tk-frame-header.tk-login-subheader .tk-frame-header__back {
	position: absolute;
	top: 8px;
	left: 12px;
	width: 40px;
	height: 40px;
}
body.tk-app-frame > .tk-frame-header h1 {
	width: 100%;
	max-width: none;
	min-width: 0;
	margin: 0;
	justify-self: center;
	overflow: hidden;
	color: #222;
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}
body.tk-app-frame > .tk-frame-header h1 picture {
	display: flex;
	width: 100%;
	height: 40px;
	align-items: center;
	justify-content: center;
}
body.tk-app-frame > .tk-frame-header h1 img {
	position: static;
	display: block;
	width: auto;
	max-width: 150px;
	height: 34px;
	max-height: 34px;
	margin: 0 auto;
	object-fit: contain;
}

body.tk-app-frame > .tk-frame-header.tk-login-subheader h1 {
	width: fit-content;
	max-width: 278px;
}
body.tk-app-frame > .tk-frame-header .tk-frame-header__right > span,
body.tk-app-frame > .tk-frame-header .tk-frame-header__right > a {
	position: static;
	display: flex;
	width: 44px;
	height: 44px;
	margin: 0;
	align-items: center;
	justify-content: center;
}
body.tk-app-frame > .tk-frame-header .tk-frame-header__right a {
	display: flex;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	color: #fc4678;
	font-size: 11px;
	font-weight: 900;
}
body.tk-app-frame > .tk-frame-header .tk-frame-header__right img {
	width: 22px;
	height: 22px;
	object-fit: contain;
}
body.tk-app-frame > .tk-frame-header .tk-frame-header__right svg {
	display: block;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/*
 * 更新済み画面でも、フレーム所有のヘッダーとBottomNavを表示する。
 * 本文テンプレート側では共通部品を重複させない。
 */
body.tk-frame-shared-active #root > header,
body.tk-frame-shared-active #root > main > header,
body.tk-frame-shared-active #root > div > header:first-child,
body.tk-frame-shared-active #root header.fixed,
body.tk-frame-shared-active #root nav[aria-label="メインナビゲーション"] {
	display: none !important;
}

/* GlobalBannerLayer */
body.tk-app-frame > .banner-container {
	position: fixed;
	inset: 0;
	z-index: 998;
	display: flex;
	width: 100%;
	max-width: 390px;
	height: 100%;
	padding: 20px;
	box-sizing: border-box;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	background: rgba(32, 33, 37, 0.72);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

body.tk-app-frame > .banner-container > div {
	width: 100%;
	max-width: 350px;
	max-height: calc(100vh - 96px);
	padding: 0;
	overflow: hidden auto;
	border: 1px solid #ffe0e8;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 16px 34px rgba(252, 70, 120, 0.12);
}

body.tk-app-frame > .banner-container .banner-image {
	display: block;
	width: 100%;
	min-height: 76px;
	padding: 0;
	background: linear-gradient(135deg, #fff1f5, #f1edff);
}

body.tk-app-frame > .banner-container .banner-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
}

body.tk-app-frame > .banner-container > .closeBtn {
	position: relative;
	width: 32px;
	height: 32px;
	margin: 12px 0 0;
	font-size: 0;
}

body.tk-app-frame > .banner-container > .closeBtn a {
	display: grid;
	width: 28px;
	height: 28px;
	place-items: center;
	border-radius: 999px;
	color: #777;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 5px 12px rgba(33, 33, 33, 0.1);
}

body.tk-app-frame > .banner-container > .closeBtn a svg {
	display: block;
	width: 15px;
	height: 15px;
}

body.tk-app-frame > .point-container > div {
	padding: 24px 20px;
	border-radius: 22px;
	text-align: center;
	background: #fff;
}

body.tk-app-frame > .point-container .txt { width: 100%; }
body.tk-app-frame > .point-container .tk-point-gift {
	display: block;
	width: 32px;
	height: 32px;
	margin: 0 auto;
	color: #fc4678;
}
body.tk-app-frame > .point-container h2 {
	margin: 8px 0 0;
	color: #fc4678;
	font-size: 34px;
	font-weight: 900;
	line-height: 1;
}
body.tk-app-frame > .point-container h2 small { margin-left: 4px; font-size: 15px; }
body.tk-app-frame > .point-container .rank {
	display: grid;
	width: 62px;
	height: 62px;
	margin: 12px auto 0;
	place-items: center;
	border-radius: 999px;
	background: linear-gradient(135deg, #ff7d9a, #8b5cf6);
}
body.tk-app-frame > .point-container .rank img { width: 54px; height: 54px; object-fit: contain; }
body.tk-app-frame > .point-container h3 { margin: 8px 0 0; color: #30323a; font-size: 18px; font-weight: 900; }
body.tk-app-frame > .point-container .description,
body.tk-app-frame > .point-container .pt { margin: 6px 0 0; color: #777; font-size: 12px; font-weight: 800; }
body.tk-app-frame > .point-container .btns { margin: 20px 0 0; }
body.tk-app-frame > .point-container .btns a.btn {
	display: flex;
	width: 100%;
	height: 48px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	color: #fff;
	background: linear-gradient(180deg, #ff7d9a, #fc4f7e);
	box-shadow: 0 13px 24px rgba(252, 79, 126, 0.22);
	font-size: 14px;
	font-weight: 900;
	line-height: 1;
}

/* GlobalAlertBox / LoadingOverlay */
body.tk-app-frame > .alertBox,
body.tk-app-frame > .loadingBox {
	position: fixed;
	inset: 0;
	z-index: 999;
	display: flex;
	width: 100%;
	max-width: 390px;
	height: 100%;
	padding: 20px;
	box-sizing: border-box;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: rgba(32, 33, 37, 0.72);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

body.tk-app-frame > .alertBox > div,
body.tk-app-frame > .loadingBox > div {
	width: 100%;
	max-width: 342px;
	padding: 28px 24px;
	border-radius: 24px;
	color: #30323a;
	background: #fff;
	box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

body.tk-app-frame > .alertBox h3 {
	display: flex;
	margin: 0;
	justify-content: center;
	color: #fc4678;
}
body.tk-app-frame > .alertBox h3 svg {
	display: block;
	width: 36px;
	height: 36px;
}

body.tk-app-frame > .alertBox .description {
	margin: 16px 0 0;
	color: #606060;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.9;
}

body.tk-app-frame > .alertBox .btns { margin: 24px 0 0; }
body.tk-app-frame > .alertBox .btns a.btn3,
body.tk-app-frame > .alertBox .btns a.btn {
	display: flex;
	width: 100%;
	height: 52px;
	align-items: center;
	justify-content: center;
	border: 1px solid #ffd2de;
	border-radius: 999px;
	color: #fc4678;
	background: #fff;
	font-size: 15px;
	font-weight: 900;
	line-height: 1;
}
body.tk-app-frame > .alertBox .btns a.btn {
	border: 0;
	color: #fff;
	background: linear-gradient(180deg, #ff7d9a, #fc4f7e);
}
body.tk-app-frame > .loadingBox > div { text-align: center; }
body.tk-app-frame > .loadingBox p {
	display: flex;
	margin: 0;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #fc4678;
	font-size: 14px;
	font-weight: 900;
}
body.tk-app-frame > .loadingBox .tk-loading-spinner {
	width: 22px;
	height: 22px;
	animation: tk-frame-spin 1s linear infinite;
}
@keyframes tk-frame-spin {
	to { transform: rotate(360deg); }
}

/* AppConfirmDialog: 既存PHPの文言・onclickをReact共通確認ダイアログへ接続する。 */
body.tk-app-frame .confirmBox {
	position: fixed;
	inset: 0;
	z-index: 100;
	width: 100%;
	max-width: 390px;
	height: 100%;
	margin: 0 auto;
	padding: 20px;
	box-sizing: border-box;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: rgba(32, 33, 37, 0.72);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}
body.tk-app-frame .confirmBox > div,
body.tk-app-frame .confirmBox > .tk-confirm-dialog__card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 350px;
	height: auto;
	margin: 0;
	padding: 32px 24px 28px;
	box-sizing: border-box;
	border-radius: 28px;
	color: #30323a;
	background: #fff;
	box-shadow: 0 24px 54px rgba(0, 0, 0, 0.3);
	text-align: center;
}
body.tk-app-frame .confirmBox > .tk-confirm-dialog__backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: default;
}
body.tk-app-frame .confirmBox h2,
body.tk-app-frame .confirmBox h3,
body.tk-app-frame .confirmBox .ttl {
	margin: 0;
	color: #30323a;
	font-size: 21px;
	font-weight: 900;
	line-height: 1.375;
	text-align: center;
}
body.tk-app-frame .confirmBox p,
body.tk-app-frame .confirmBox .description {
	margin: 16px 0 0;
	color: #606060;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.9;
	text-align: center;
}
body.tk-app-frame .confirmBox .btns {
	display: flex;
	width: 100%;
	margin: 28px 0 0;
	flex-direction: column;
	gap: 12px;
}
body.tk-app-frame .confirmBox .btns a.btn,
body.tk-app-frame .confirmBox .btns a.btn3,
body.tk-app-frame .confirmBox .btns button.btn,
body.tk-app-frame .confirmBox .btns button.btn3 {
	display: flex;
	width: 100%;
	margin: 0;
	padding: 0 16px;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
}
body.tk-app-frame .confirmBox .btns .btn {
	order: 1;
	height: 54px;
	border: 0;
	color: #fff;
	background: linear-gradient(180deg, #ff7d9a, #fc4f7e);
	box-shadow: 0 13px 24px rgba(252, 79, 126, 0.24);
}
body.tk-app-frame .confirmBox .btns .btn3 {
	order: 2;
	height: 52px;
	border: 1px solid #ffd2de;
	color: #fc4678;
	background: #fff;
	box-shadow: none;
	font-weight: 900;
}
body.tk-app-frame .confirmBox .btns .btn:hover,
body.tk-app-frame .confirmBox .btns .btn:focus-visible {
	border: 0;
	color: #fff;
	background: linear-gradient(180deg, #ff7d9a, #fc4f7e);
	box-shadow: 0 13px 24px rgba(252, 79, 126, 0.24);
	transform: none;
}
body.tk-app-frame .confirmBox .btns .btn3:hover,
body.tk-app-frame .confirmBox .btns .btn3:focus-visible {
	border-color: #ffd2de;
	color: #fc4678;
	background: #fff;
	box-shadow: none;
	transform: none;
}
body.tk-app-frame .confirmBox .btns .btn::after,
body.tk-app-frame .confirmBox .btns .btn3::after {
	display: none;
	content: none;
}
body.tk-app-frame .confirmBox > .closeBtn {
	display: none !important;
}

/* Profile action sheet: React ProfileDialog(actions) */
body.tk-app-frame > .tk-profile-actions {
	position: fixed;
	inset: 0;
	z-index: 70;
	width: 100%;
	max-width: 390px;
	height: 100%;
	margin: 0 auto;
	padding: 0 16px;
	box-sizing: border-box;
	flex-direction: row;
	align-items: flex-end;
	justify-content: center;
	background: rgba(0, 0, 0, 0.55);
}
body.tk-app-frame > .tk-profile-actions > div {
	position: relative;
	bottom: auto;
	left: auto;
	right: auto;
	width: 100%;
	max-width: 390px;
	height: auto;
	margin: 0;
	padding: 20px 20px calc(10px + env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
	border-radius: 30px 30px 0 0;
	background: #fff;
	box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.22);
}
body.tk-app-frame > .tk-profile-actions .tk-profile-actions__label {
	margin: 0 0 16px;
	color: #777;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.5;
	text-align: center;
}
body.tk-app-frame > .tk-profile-actions ul,
body.tk-app-frame > .tk-profile-actions .tk-profile-actions__list {
	display: grid;
	width: 100%;
	margin: 0;
	padding: 0;
	gap: 10px;
}
body.tk-app-frame > .tk-profile-actions li {
	width: 100%;
	margin: 0;
	padding: 0;
}
body.tk-app-frame > .tk-profile-actions .tk-profile-action {
	display: flex;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 0 16px;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	border: 1px solid #e1e1e1;
	border-radius: 14px;
	color: #555;
	background: #fff;
	box-shadow: 0 8px 18px rgba(80, 80, 90, 0.05);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.4;
	text-align: center;
}
body.tk-app-frame > .tk-profile-actions .tk-profile-action:hover,
body.tk-app-frame > .tk-profile-actions .tk-profile-action:focus-visible {
	border-color: #e1e1e1;
	color: #555;
	background: #fff;
	box-shadow: 0 8px 18px rgba(80, 80, 90, 0.05);
	transform: none;
}
body.tk-app-frame > .tk-profile-actions .tk-profile-action--community {
	border-color: #ffd8e0;
	color: #fc4678;
	background: #fff7fa;
	box-shadow: 0 8px 18px rgba(252, 70, 120, 0.06);
}
body.tk-app-frame > .tk-profile-actions .tk-profile-action--community:hover,
body.tk-app-frame > .tk-profile-actions .tk-profile-action--community:focus-visible {
	border-color: #ffd8e0;
	color: #fc4678;
	background: #fff7fa;
	box-shadow: 0 8px 18px rgba(252, 70, 120, 0.06);
}
body.tk-app-frame > .tk-profile-actions .tk-profile-action--block {
	border-color: #d8d8d8;
	color: #4d4650;
	background: #f7f7f8;
	box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}
body.tk-app-frame > .tk-profile-actions .tk-profile-action--block:hover,
body.tk-app-frame > .tk-profile-actions .tk-profile-action--block:focus-visible {
	border-color: #d8d8d8;
	color: #4d4650;
	background: #f7f7f8;
	box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}
body.tk-app-frame > .tk-profile-actions .tk-profile-actions__cancel,
body.tk-app-frame > .tk-profile-actions .btns .btn {
	display: flex;
	width: 100%;
	min-height: 54px;
	margin: 20px 0 0;
	padding: 0 16px;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	color: #fff;
	background: linear-gradient(180deg, #ff7d9a, #fc4f7e);
	box-shadow: 0 13px 24px rgba(252, 79, 126, 0.28);
	font-size: 16px;
	font-weight: 900;
	line-height: 1;
}
body.tk-app-frame > .tk-profile-actions .tk-profile-actions__cancel:hover,
body.tk-app-frame > .tk-profile-actions .tk-profile-actions__cancel:focus-visible,
body.tk-app-frame > .tk-profile-actions .btns .btn:hover,
body.tk-app-frame > .tk-profile-actions .btns .btn:focus-visible {
	border: 0;
	color: #fff;
	background: linear-gradient(180deg, #ff7d9a, #fc4f7e);
	box-shadow: 0 13px 24px rgba(252, 79, 126, 0.28);
	transform: none;
}
body.tk-app-frame > .tk-profile-actions > div > .closeBtn {
	display: none !important;
}

/* BottomNav: React BottomNav と同じ nav > div > a 構造 */
body.tk-app-frame > .tk-bottom-nav {
	position: fixed;
	right: auto;
	bottom: 0;
	left: 50%;
	z-index: 60;
	display: block;
	width: 100%;
	max-width: 390px;
	height: 72px;
	margin: 0;
	padding: 0;
	border: 0;
	border-top: 1px solid #eee;
	background: #fff;
	box-shadow: 0 -8px 18px rgba(33,33,33,.05);
	transform: translateX(-50%);
	overflow: hidden;
}
body.tk-app-frame > .tk-bottom-nav .tk-bottom-nav__grid {
	display: grid;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	grid-template-columns: repeat(5,minmax(0,1fr));
}
body.tk-app-frame > .tk-bottom-nav .tk-bottom-nav__item {
	position: relative;
	display: flex;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	color: #8f8f8f;
	font-size: 9px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
}
body.tk-app-frame > .tk-bottom-nav .tk-bottom-nav__item svg {
	display: block;
	width: 20px;
	height: 20px;
	margin: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
body.tk-app-frame > .tk-bottom-nav .tk-bottom-nav__item[aria-current="page"] {
	color: #fc4678;
}
body.tk-app-frame > .tk-bottom-nav .tk-bottom-nav__item[aria-current="page"] svg {
	stroke-width: 2.6;
}
body.tk-app-frame > .tk-bottom-nav .tk-bottom-nav__item.item_dashboard[aria-current="page"] svg {
	fill: currentColor;
}
body.tk-app-frame > .tk-bottom-nav .tk-bottom-nav__badge {
	position: absolute;
	top: 7px;
	right: 18px;
	display: flex;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	border-radius: 999px;
	color: #fff;
	background: #fc4678;
	font-size: 9px;
	font-weight: 900;
	line-height: 1;
	box-sizing: border-box;
}

/* MatchingModal */
body.tk-app-frame > .matching-container {
	position: fixed;
	inset: 0;
	z-index: 999;
	display: flex;
	width: 100%;
	max-width: 390px;
	height: 100%;
	min-height: 100vh;
	padding: 12px 16px !important;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	color: #333;
	background: linear-gradient(135deg, #fff8fa, #f3eeff);
}
body.tk-app-frame > .matching-container[style*="display:none"],
body.tk-app-frame > .matching-container[style*="display: none"],
body.tk-app-frame > .alertBox[style*="display:none"],
body.tk-app-frame > .alertBox[style*="display: none"],
body.tk-app-frame > .loadingBox[style*="display:none"],
body.tk-app-frame > .loadingBox[style*="display: none"] {
	display: none !important;
}

body.tk-app-frame > .matching-container > .tk-matching-card {
	position: relative;
	width: 100%;
	margin: auto;
	padding: 8px 8px 4px;
}

body.tk-app-frame > .matching-container .tk-matching-close {
	position: absolute;
	z-index: 3;
	top: 12px;
	right: 12px;
	display: grid;
	width: 32px;
	height: 32px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 999px;
	color: #777;
	background: rgba(255, 255, 255, 0.8);
	box-shadow: 0 8px 18px rgba(33, 33, 33, 0.08);
}
body.tk-app-frame > .matching-container .tk-matching-close svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.6;
	stroke-linecap: round;
}

body.tk-app-frame > .matching-container .tk-matching-title {
	margin: 0;
	color: #30323a;
	font-size: 24px;
	font-weight: 900;
	line-height: 1.2;
	text-align: center;
}
body.tk-app-frame > .matching-container .tk-matching-title strong {
	color: transparent;
	background: linear-gradient(90deg, #fc4678, #9a7bff);
	background-clip: text;
	-webkit-background-clip: text;
	font: inherit;
}

body.tk-app-frame > .matching-container .img {
	position: relative;
	display: flex;
	width: 206px;
	margin: 16px auto 0;
	align-items: center;
	justify-content: space-between;
	background: none;
	aspect-ratio: auto;
}
body.tk-app-frame > .matching-container .tk-matching-line {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 98px;
	height: 4px;
	border-radius: 999px;
	background: linear-gradient(90deg, #ffd5e0, #fc4678, #d8cbff);
	transform: translate(-50%, -50%);
}
body.tk-app-frame > .matching-container .tk-matching-heart {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: grid;
	width: 46px;
	height: 46px;
	place-items: center;
	border: 4px solid #fff;
	border-radius: 999px;
	color: #fff;
	background: linear-gradient(180deg, #ff7d9a, #fc4678);
	box-shadow: 0 12px 24px rgba(252, 70, 120, 0.28);
	transform: translate(-50%, -50%);
	box-sizing: border-box;
}
body.tk-app-frame > .matching-container .tk-matching-heart svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
body.tk-app-frame > .matching-container .img img,
body.tk-app-frame > .matching-container .img img:first-child {
	position: relative;
	z-index: 1;
	width: 76px;
	height: 76px;
	margin: 0;
	border: 4px solid #fff;
	border-radius: 999px;
	object-fit: cover;
	box-shadow: 0 12px 24px rgba(33, 33, 33, 0.15);
}

body.tk-app-frame > .matching-container .tk-matching-compose {
	margin-top: 16px;
	padding: 14px;
	border: 1px solid #ffe1ea;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 16px 36px rgba(48, 50, 58, 0.1);
}
body.tk-app-frame > .matching-container .tk-matching-compose h2 {
	margin: 0;
	color: #30323a;
	font-size: 16px;
	font-weight: 900;
}
body.tk-app-frame > .matching-container .tk-matching-compose > p {
	margin: 4px 0 0;
	color: #8a7c84;
	font-size: 12px;
	font-weight: 700;
}
body.tk-app-frame > .matching-container textarea {
	width: 100%;
	min-height: 46px;
	margin-top: 10px;
	padding: 10px 16px;
	resize: none;
	border: 1px solid #ffd8e2;
	border-radius: 15px;
	outline: 0;
	color: #555;
	background: #fff9fb;
	font: 700 14px/1.6 "Noto Sans JP", sans-serif;
	box-sizing: border-box;
}
body.tk-app-frame > .matching-container textarea:focus {
	border-color: #fc4678;
	box-shadow: 0 0 0 4px #ffeaf0;
}
body.tk-app-frame > .matching-container .tk-message-templates {
	display: grid;
	margin-top: 10px;
	gap: 8px;
}
body.tk-app-frame > .matching-container .tk-message-template {
	display: grid;
	grid-template-columns: 30px 1fr;
	align-items: center;
	min-height: 46px;
	padding: 8px 12px;
	gap: 10px;
	border: 1px solid #ffe1ea;
	border-radius: 15px;
	color: #555;
	background: #fff8fa;
	box-shadow: 0 8px 18px rgba(252, 70, 120, 0.06);
	font: 800 12px/1.38 "Noto Sans JP", sans-serif;
	text-align: left;
	white-space: pre-line;
}
body.tk-app-frame > .matching-container .tk-message-template > span {
	display: grid;
	width: 30px;
	height: 30px;
	place-items: center;
	border-radius: 999px;
	color: #fc4678;
	background: #fff;
	box-shadow: 0 6px 14px rgba(252, 70, 120, 0.1);
}
body.tk-app-frame > .matching-container .tk-message-template > span svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
body.tk-app-frame > .matching-container .tk-message-template > b {
	font: inherit;
}
body.tk-app-frame > .matching-container .floatingBox {
	position: static;
	display: grid;
	width: 100%;
	max-width: none;
	margin: 12px 0 0;
	padding: 0;
	gap: 8px;
}
body.tk-app-frame > .matching-container .btns a.btn {
	display: flex;
	width: 100%;
	height: 48px;
	margin: 0;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	color: #fff;
	background: linear-gradient(180deg, #ff7d9a, #fc4f7e);
	box-shadow: 0 14px 24px rgba(252, 70, 120, 0.26);
	font-size: 13px;
	font-weight: 900;
	line-height: 1;
}
body.tk-app-frame > .matching-container .btns a.btn:first-child {
	gap: 8px;
	padding: 0 16px;
}
body.tk-app-frame > .matching-container .btns a.btn:first-child svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
body.tk-app-frame > .matching-container .btns a.btn:first-child svg:last-child {
	width: 20px;
	height: 20px;
	margin-left: 0;
	stroke-width: 3;
}
body.tk-app-frame > .matching-container .btns a.btn:first-child::after { display: none; }
body.tk-app-frame > .matching-container .btns button.closeBtn {
	display: flex;
	width: auto;
	height: 32px;
	margin: 0 auto;
	padding: 0 12px;
	align-items: center;
	justify-content: center;
	border: 0;
	color: #777;
	background: transparent;
	box-shadow: none;
	font: 900 12px/1 "Noto Sans JP", sans-serif;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* RestrictedOverlay */
body.tk-app-frame .warning-banner {
	gap: 12px;
	padding: 12px 16px;
	border-radius: 14px;
	background: #d92525;
	box-shadow: 0 10px 20px rgba(217, 37, 37, 0.18);
}
body.tk-app-frame .warning-banner__icon { width: 28px; height: 28px; }
body.tk-app-frame .warning-banner__text { margin: 0; font-size: 12px; font-weight: 900; line-height: 1.6; }
body.tk-app-frame .tmpl_restricted-overlay {
	padding: 24px;
	border-radius: 22px;
	background: rgba(32, 33, 37, 0.88);
	text-align: center;
}
body.tk-app-frame .restricted-overlay {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	padding: 24px;
	box-sizing: border-box;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 22px;
	background: rgba(32, 33, 37, 0.88);
	text-align: center;
}
body.tk-app-frame .restricted-overlay__icon {
	display: grid;
	width: 64px;
	height: 64px;
	margin: 0 auto;
	place-items: center;
	border: 2px solid #fff;
	border-radius: 999px;
}
body.tk-app-frame .restricted-overlay__icon svg { width: 36px; height: 36px; }
body.tk-app-frame .restricted-overlay__text { margin: 16px 0 0; color: #fff; font-size: 21px; font-weight: 900; }
body.tk-app-frame .restricted-overlay__btn {
	display: inline-flex;
	min-height: 38px;
	margin-top: 16px;
	padding: 0 20px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	color: #30323a;
	background: #fff;
	font-size: 12px;
	font-weight: 900;
}

@media (max-width: 390px) {
	body.tk-app-frame { box-shadow: none; }
}
