:root {
	--profile-accent: #f97316;
	--profile-accent-soft: #fef3e2;
	--profile-text: #111827;
	--profile-muted: #6b7280;
	--profile-soft: #9ca3af;
	--profile-border: #e5e7eb;
	--profile-danger-bg: #fee2e2;
	--profile-danger: #ef4444;
}

html,
body {
	margin: 0;
	min-height: 100%;
	background: #f8fafc;
	color: var(--profile-text);
	font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

a {
	color: inherit;
}

.profile-screen {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: #f8fafc;
}

.profile-hero {
	padding: 24px 16px 34px;
	text-align: center;
	color: #ffffff;
	background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

.profile-avatar-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.profile-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 36px;
	background: #ffffff;
	color: var(--profile-accent);
	font-size: 28px;
	font-weight: 900;
	overflow: hidden;
}

.profile-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.profile-avatar__edit {
	position: absolute;
	right: 0;
	bottom: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 6px 14px rgba(255, 255, 255, 0.18);
}

.profile-avatar__edit img {
	width: 13px;
	height: 13px;
	display: block;
}

.profile-hero__name {
	margin: 18px 0 6px;
	font-size: 20px;
	font-weight: 900;
}

.profile-hero__sub {
	margin: 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
}

.profile-main {
	flex: 1;
	padding: 0 16px 92px;
}

.profile-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin-top: -20px;
	border: 1px solid var(--profile-border);
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
	overflow: hidden;
}

.profile-stats__item {
	padding: 14px 8px;
	text-align: center;
}

.profile-stats__item + .profile-stats__item {
	border-left: 1px solid var(--profile-border);
}

.profile-stats__item strong {
	display: block;
	color: var(--profile-accent);
	font-size: 20px;
	font-weight: 900;
}

.profile-stats__item span {
	display: block;
	margin-top: 3px;
	color: var(--profile-muted);
	font-size: 11px;
	font-weight: 500;
}

.profile-menu {
	margin-top: 16px;
	border: 1px solid var(--profile-border);
	border-radius: 14px;
	background: #ffffff;
	overflow: hidden;
}

.profile-card {
	margin-top: 16px;
	padding: 16px;
	border: 1px solid var(--profile-border);
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.profile-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.profile-card__title {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
}

.profile-card__action {
	font-size: 12px;
	font-weight: 700;
	color: var(--profile-accent);
	text-decoration: none;
}

.profile-card__action.is-pressed {
	opacity: 0.72;
}

.profile-card__empty {
	margin: 0;
	color: var(--profile-muted);
	font-size: 13px;
	line-height: 1.6;
}

.profile-info-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.profile-info-grid__item {
	padding: 12px;
	border-radius: 12px;
	background: #f9fafb;
	border: 1px solid #f1f5f9;
}

.profile-info-grid__label {
	display: block;
	margin-bottom: 6px;
	color: var(--profile-muted);
	font-size: 11px;
	font-weight: 600;
}

.profile-info-grid__value {
	display: block;
	color: var(--profile-text);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.45;
	word-break: break-word;
}

.profile-children-list {
	display: grid;
	gap: 12px;
}

.profile-child-card {
	display: block;
	padding: 14px;
	border-radius: 12px;
	background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
	border: 1px solid #fed7aa;
	text-decoration: none;
}

.profile-child-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.profile-child-card__name {
	font-size: 15px;
	font-weight: 800;
}

.profile-child-card__meta {
	color: var(--profile-muted);
	font-size: 12px;
	margin-top: 4px;
}

.profile-child-card__action {
	position: relative;
	padding-right: 14px;
	color: var(--profile-accent);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.profile-child-card__action::after {
	content: "";
	position: absolute;
	top: 4px;
	right: 2px;
	width: 6px;
	height: 6px;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(45deg);
}

.profile-child-card__facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 12px;
}

.profile-child-card__fact {
	min-width: 0;
}

.profile-child-card__fact-label {
	display: block;
	margin-bottom: 4px;
	color: var(--profile-muted);
	font-size: 11px;
	font-weight: 600;
}

.profile-child-card__fact-value {
	display: block;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.45;
	word-break: break-word;
}

.profile-menu__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 14px 16px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	text-decoration: none;
	box-sizing: border-box;
}

.profile-menu__item + .profile-menu__item {
	border-top: 1px solid var(--profile-border);
}

.profile-menu__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--profile-accent-soft);
	flex-shrink: 0;
}

.profile-menu__icon img {
	width: 18px;
	height: 18px;
	display: block;
}

.profile-menu__label {
	flex: 1;
	min-width: 0;
	font-size: 14px;
	font-weight: 500;
}

.profile-menu__arrow {
	position: relative;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.profile-menu__arrow::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 4px;
	width: 6px;
	height: 6px;
	border-top: 1.5px solid var(--profile-soft);
	border-right: 1.5px solid var(--profile-soft);
	transform: rotate(45deg);
}

.profile-menu__item.is-pressed {
	background: rgba(249, 115, 22, 0.05);
}

.profile-hero--guest {
	padding-bottom: 52px;
}

.profile-avatar--guest {
	background: rgba(255, 255, 255, 0.22);
	border: 1.5px dashed rgba(255, 255, 255, 0.85);
}

.profile-avatar--guest img {
	width: 34px;
	height: 34px;
	filter: brightness(0) invert(1);
	opacity: 0.9;
}

.profile-hero__cta {
	display: flex;
	gap: 10px;
	margin: 16px 6px 0;
}

.profile-hero__btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
}

.profile-hero__btn.is-solid {
	background: #ffffff;
	color: #ea580c;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-hero__btn.is-ghost {
	border: 1.5px solid rgba(255, 255, 255, 0.9);
	color: #ffffff;
}

.profile-value-card {
	margin-top: -20px;
	border: 1px solid #fed7aa;
	border-radius: 14px;
	background: linear-gradient(180deg, #fff7ed 0%, #ffffff 62%);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
	overflow: hidden;
}

.profile-value-card h2 {
	margin: 0;
	padding: 13px 15px 11px;
	border-bottom: 1px solid #fed7aa;
	background: rgba(255, 255, 255, 0.55);
	color: #c2410c;
	font-size: 13px;
	font-weight: 800;
}

.profile-value-card__row {
	display: flex;
	gap: 11px;
	align-items: flex-start;
	padding: 11px 15px;
}

.profile-value-card__row + .profile-value-card__row {
	border-top: 1px solid #ffedd5;
}

.profile-value-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid #fed7aa;
	border-radius: 9px;
	background: #ffffff;
	flex-shrink: 0;
}

.profile-value-card__icon img {
	width: 16px;
	height: 16px;
}

.profile-value-card__text b,
.profile-value-card__text small {
	display: block;
}

.profile-value-card__text b {
	font-size: 13px;
	font-weight: 800;
	line-height: 1.35;
}

.profile-value-card__text small {
	margin-top: 2px;
	color: var(--profile-muted);
	font-size: 11.5px;
	line-height: 1.5;
}

.profile-section-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 20px 2px 8px;
	color: var(--profile-soft);
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.05em;
}

.profile-section-label__lock {
	font-weight: 700;
	letter-spacing: 0;
}

.profile-menu__item--locked {
	cursor: pointer;
	background: #fcfcfd;
}

.profile-menu__item--locked .profile-menu__icon {
	background: #f3f4f6;
}

.profile-menu__item--locked .profile-menu__icon img {
	filter: grayscale(1);
	opacity: 0.42;
}

.profile-menu__item--locked .profile-menu__label {
	color: var(--profile-soft);
}

.profile-menu__lock {
	position: relative;
	width: 16px;
	height: 16px;
	color: #c3c8d0;
	flex-shrink: 0;
}

.profile-menu__lock::before,
.profile-menu__lock::after {
	content: "";
	position: absolute;
	left: 3px;
	width: 10px;
	border: 1.8px solid currentColor;
}

.profile-menu__lock::before {
	top: 1px;
	height: 8px;
	border-bottom: 0;
	border-radius: 7px 7px 0 0;
}

.profile-menu__lock::after {
	top: 7px;
	height: 7px;
	border-radius: 2px;
	background: #ffffff;
}

.profile-menu__tag {
	padding: 3px 7px;
	border: 1px solid #fed7aa;
	border-radius: 999px;
	background: var(--profile-accent-soft);
	color: #c2410c;
	font-size: 10.5px;
	font-weight: 800;
	white-space: nowrap;
}

.profile-primary-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 16px;
	height: 46px;
	border-radius: 12px;
	background: var(--profile-accent);
	color: #ffffff;
	font-size: 15px;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(249, 115, 22, 0.32);
}

.profile-completion-card {
	padding: 14px;
	border: 1px solid #fed7aa;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.profile-completion-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.profile-completion-card__copy {
	min-width: 0;
	flex: 1;
}

.profile-completion-card__head h2 {
	margin: 0;
	font-size: 15px;
	font-weight: 900;
}

.profile-completion-card__head p {
	margin: 5px 0 0;
	color: var(--profile-muted);
	font-size: 12px;
	line-height: 1.5;
}

.profile-completion-card__head span {
	color: #c2410c;
	font-size: 12px;
	font-weight: 900;
	white-space: nowrap;
}

.profile-completion-card__bar {
	width: 100%;
	margin: 10px 0 2px;
	height: 6px;
	border-radius: 3px;
	background: #ffedd5;
	overflow: hidden;
}

.profile-completion-card__bar i {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--profile-accent);
}

.profile-completion-step {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	color: inherit;
	text-decoration: none;
}

.profile-completion-step + .profile-completion-step {
	border-top: 1px solid var(--profile-border);
}

.profile-completion-step__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 1.5px solid #fdba74;
	border-radius: 11px;
	background: #ffffff;
	color: #fb923c;
	font-size: 11px;
	font-weight: 800;
	flex-shrink: 0;
}

.profile-completion-step.is-done .profile-completion-step__mark {
	background: #dcfce7;
	color: #16a34a;
}

.profile-completion-step__text {
	min-width: 0;
	flex: 1;
}

.profile-completion-step__text b,
.profile-completion-step__text small {
	display: block;
}

.profile-completion-step__text b {
	font-size: 13px;
	font-weight: 850;
}

.profile-completion-step.is-done .profile-completion-step__text b {
	color: #16a34a;
}

.profile-completion-step__text small {
	margin-top: 2px;
	color: var(--profile-muted);
	font-size: 11.5px;
	line-height: 1.45;
}

.profile-completion-step__action {
	padding: 7px 13px;
	border-radius: 999px;
	background: var(--profile-accent);
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
	box-shadow: 0 3px 9px rgba(249, 115, 22, 0.32);
}

.profile-completion-step.is-done .profile-completion-step__action {
	border: 1px solid var(--profile-border);
	background: #ffffff;
	color: var(--profile-soft);
	box-shadow: none;
}

.profile-screen:not(.is-guest) .profile-menu__tag {
	background: #f3f4f6;
	border-color: #e5e7eb;
	color: #9ca3af;
}

.profile-screen:not(.is-guest) .profile-menu__tag.is-pending {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #c2410c;
}

.profile-child-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 22px 18px;
	border: 1px dashed #fed7aa;
	border-radius: 14px;
	background: #ffffff;
	text-align: center;
}

.profile-child-empty__icon {
	position: relative;
	width: 42px;
	height: 42px;
	margin-bottom: 10px;
	border: 2px solid #fed7aa;
	border-radius: 21px;
}

.profile-child-empty__icon::before,
.profile-child-empty__icon::after {
	content: "";
	position: absolute;
	background: var(--profile-accent);
}

.profile-child-empty__icon::before {
	left: 12px;
	top: 19px;
	width: 18px;
	height: 2px;
}

.profile-child-empty__icon::after {
	left: 12px;
	top: 7px;
	width: 2px;
	height: 12px;
}

.profile-child-empty b {
	font-size: 15px;
	font-weight: 900;
}

.profile-child-empty span:not(.profile-child-empty__icon) {
	margin-top: 5px;
	color: var(--profile-muted);
	font-size: 12px;
	line-height: 1.55;
}

.profile-child-empty a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 14px;
	min-width: 150px;
	height: 42px;
	border-radius: 12px;
	background: var(--profile-accent);
	color: #ffffff;
	font-size: 14px;
	font-weight: 850;
	text-decoration: none;
}

.profile-auth-sheet,
.profile-locale-sheet {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1300;
}

.profile-auth-sheet.is-open,
.profile-locale-sheet.is-open {
	display: block;
}

.profile-auth-sheet__mask,
.profile-locale-sheet__mask {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.5);
}

.profile-auth-sheet__panel,
.profile-locale-sheet__panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 10px 20px 22px;
	border-radius: 20px 20px 0 0;
	background: #ffffff;
	box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.22);
}

.profile-auth-sheet__grab {
	width: 38px;
	height: 4px;
	margin: 0 auto 16px;
	border-radius: 2px;
	background: #e5e7eb;
}

.profile-auth-sheet__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border: 1px solid #fed7aa;
	border-radius: 16px;
	background: var(--profile-accent-soft);
}

.profile-auth-sheet__icon span {
	width: 18px;
	height: 18px;
	border: 2px solid var(--profile-accent);
	border-radius: 3px;
}

.profile-auth-sheet h2,
.profile-locale-sheet h2 {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 900;
	text-align: center;
}

.profile-auth-sheet p {
	margin: 0 0 18px;
	color: var(--profile-muted);
	font-size: 13px;
	line-height: 1.65;
	text-align: center;
}

.profile-auth-sheet p span {
	display: block;
}

.profile-guest-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 18px 0 8px;
	color: var(--profile-soft);
	font-size: 12px;
}

.profile-guest-footer a {
	color: inherit;
	text-decoration: none;
}

.profile-guest-footer a + a::before {
	content: "·";
	margin: 0 8px;
	color: #c3c8d0;
}

.profile-content-screen {
	background: #f8fafc;
}

.profile-content-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 82px;
	padding: 18px 54px 22px;
	color: #ffffff;
	background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
	box-shadow: 0 8px 18px rgba(249, 115, 22, 0.18);
}

.profile-content-hero h1 {
	margin: 0;
	font-size: 19px;
	font-weight: 900;
	line-height: 1.3;
	text-align: center;
}

.profile-content-hero h1 a {
	color: inherit;
	text-decoration: none;
}

.profile-content-back {
	position: absolute;
	left: 16px;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 17px;
	background: rgba(255, 255, 255, 0.2);
	text-decoration: none;
	transform: translateY(-50%);
}

.profile-content-back::before {
	content: "";
	width: 10px;
	height: 10px;
	border-left: 2px solid #ffffff;
	border-bottom: 2px solid #ffffff;
	transform: rotate(45deg);
	margin-left: 4px;
}

.profile-content-main {
	margin-top: -10px;
}

.profile-content-body {
	padding: 18px;
	border: 1px solid var(--profile-border);
	border-radius: 14px;
	background: #ffffff;
	color: var(--profile-text);
	font-size: 14px;
	line-height: 1.8;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.profile-content-body :first-child {
	margin-top: 0;
}

.profile-content-body :last-child {
	margin-bottom: 0;
}

.profile-content-body img {
	max-width: 100%;
	height: auto;
}

.profile-locale-sheet__list {
	margin-top: 16px;
	border: 1px solid var(--profile-border);
	border-radius: 14px;
	overflow: hidden;
}

.profile-locale-sheet__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	color: var(--profile-text);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.profile-locale-sheet__item + .profile-locale-sheet__item {
	border-top: 1px solid var(--profile-border);
}

.profile-locale-sheet__item.is-active {
	color: var(--profile-accent);
	background: var(--profile-accent-soft);
}

.profile-locale-sheet__item.is-active::after {
	content: "✓";
	font-weight: 900;
}

.profile-auth-sheet__btn,
.profile-auth-sheet__later {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 46px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 800;
	text-decoration: none;
}

.profile-auth-sheet__btn.is-solid {
	background: var(--profile-accent);
	color: #ffffff;
	box-shadow: 0 6px 16px rgba(249, 115, 22, 0.3);
}

.profile-auth-sheet__btn.is-outline {
	margin-top: 10px;
	border: 1.5px solid var(--profile-accent);
	color: #ea580c;
}

.profile-auth-sheet__later {
	margin-top: 4px;
	border: 0;
	background: transparent;
	color: var(--profile-soft);
}

.profile-child-card.is-pressed {
	background: linear-gradient(180deg, #ffedd5 0%, #ffffff 100%);
}

.profile-logout {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 12px;
	padding: 13px 20px;
	border-radius: 10px;
	background: var(--profile-danger-bg);
	color: var(--profile-danger);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.profile-bottom-nav {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	align-items: center;
	height: 70px;
	padding-bottom: env(safe-area-inset-bottom, 0);
	border-top: 1px solid var(--profile-border);
	background: #ffffff;
}

.profile-bottom-nav__item,
.profile-bottom-nav__plus {
	text-decoration: none;
}

.profile-bottom-nav__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	color: var(--profile-soft);
}

.profile-bottom-nav__item img {
	width: 22px;
	height: 22px;
	opacity: 0.45;
}

.profile-bottom-nav__item small {
	font-size: 10px;
	font-weight: 500;
}

.profile-bottom-nav__item.is-active {
	color: var(--profile-accent);
}

.profile-bottom-nav__item.is-active img {
	opacity: 1;
}

.profile-bottom-nav__plus {
	display: flex;
	justify-content: center;
}

.profile-bottom-nav__plus span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-top: -14px;
	border-radius: 23px;
	background: var(--profile-accent);
	box-shadow: 0 4px 14px rgba(249, 115, 22, 0.45);
}

.profile-bottom-nav__plus img {
	width: 22px;
	height: 22px;
}

@media (max-width: 360px) {
	.profile-main {
		padding-left: 14px;
		padding-right: 14px;
	}

	.profile-menu__label {
		font-size: 13px;
	}

	.profile-info-grid,
	.profile-child-card__facts {
		grid-template-columns: 1fr;
	}

	.profile-child-card__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.profile-child-card__meta {
		text-align: left;
	}
}
