.tlnf-app,
.tlnf-app * {
	box-sizing: border-box;
}

.tlnf-app {
	--tlnf-ink: #3c2b25;
	--tlnf-muted: #7d6c64;
	--tlnf-gold: #bd8b2f;
	--tlnf-gold-dark: #96651d;
	--tlnf-gold-light: #f8e8b9;
	--tlnf-red: #9f2f37;
	--tlnf-red-dark: #7d2028;
	--tlnf-cream: #fffaf0;
	--tlnf-line: rgba(137, 92, 32, .2);
	position: relative;
	isolation: isolate;
	overflow: hidden;
	width: 100%;
	max-width: 760px;
	margin: 32px auto;
	padding: clamp(24px, 5vw, 48px);
	border: 1px solid rgba(189, 139, 47, .3);
	border-radius: 28px;
	background:
		radial-gradient(circle at top left, rgba(255, 229, 157, .5), transparent 32%),
		linear-gradient(145deg, #fffdf7 0%, #fff8ea 54%, #fffdf9 100%);
	box-shadow: 0 22px 65px rgba(88, 55, 25, .13);
	color: var(--tlnf-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
	line-height: 1.75;
}

.tlnf-app__glow {
	position: absolute;
	z-index: -1;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	filter: blur(2px);
	opacity: .5;
	pointer-events: none;
}

.tlnf-app__glow--one {
	top: -130px;
	right: -90px;
	background: radial-gradient(circle, rgba(213, 164, 72, .32), transparent 68%);
}

.tlnf-app__glow--two {
	bottom: -150px;
	left: -110px;
	background: radial-gradient(circle, rgba(159, 47, 55, .16), transparent 68%);
}

.tlnf-hero {
	position: relative;
	text-align: center;
}

.tlnf-eyebrow,
.tlnf-result__caption,
.tlnf-score-card__eyebrow {
	margin: 0;
	color: var(--tlnf-gold-dark);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .18em;
	line-height: 1.4;
}

.tlnf-title {
	margin: 10px 0 8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--tlnf-ink);
	font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
	font-size: clamp(25px, 5vw, 38px);
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.35;
}

.tlnf-lead {
	margin: 0;
	color: var(--tlnf-muted);
	font-size: 14px;
}

.tlnf-today {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 18px 0 0;
	padding: 5px 14px;
	border: 1px solid var(--tlnf-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, .65);
	color: #76592b;
	font-size: 12px;
	font-weight: 700;
}

.tlnf-panel {
	margin-top: 28px;
	padding: clamp(20px, 4vw, 30px);
	border: 1px solid var(--tlnf-line);
	border-radius: 20px;
	background: rgba(255, 255, 255, .78);
	box-shadow: 0 10px 30px rgba(94, 57, 22, .06);
	backdrop-filter: blur(5px);
}

.tlnf-form {
	margin: 0;
}

.tlnf-field + .tlnf-fieldset {
	margin-top: 22px;
}

.tlnf-label {
	display: block;
	margin: 0 0 9px;
	padding: 0;
	color: var(--tlnf-ink);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.5;
}

.tlnf-optional {
	display: inline-block;
	margin-left: 7px;
	padding: 2px 7px;
	border-radius: 999px;
	background: #eee7de;
	color: #76685f;
	font-size: 10px;
	font-weight: 700;
	vertical-align: 1px;
}

.tlnf-date {
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 11px 15px;
	border: 1px solid #d9c7ae;
	border-radius: 12px;
	outline: none;
	background: #fff;
	box-shadow: inset 0 1px 2px rgba(70, 43, 20, .04);
	color: var(--tlnf-ink);
	font: inherit;
	font-size: 16px;
	line-height: 1.3;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.tlnf-date:focus {
	border-color: var(--tlnf-gold);
	box-shadow: 0 0 0 4px rgba(189, 139, 47, .13);
}

.tlnf-help {
	margin: 7px 0 0;
	color: var(--tlnf-muted);
	font-size: 11px;
	line-height: 1.6;
}

.tlnf-fieldset {
	min-width: 0;
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	padding: 0;
	border: 0;
}

.tlnf-segments {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.tlnf-segment {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.tlnf-segment input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.tlnf-segment span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border: 1px solid #ddccb3;
	border-radius: 11px;
	background: #fff;
	color: #6e5a4e;
	font-size: 14px;
	font-weight: 800;
	transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.tlnf-segment input:checked + span {
	border-color: var(--tlnf-gold);
	background: linear-gradient(135deg, #fff7df, #f8e4ad);
	box-shadow: 0 5px 15px rgba(151, 100, 28, .12);
	color: var(--tlnf-gold-dark);
	transform: translateY(-1px);
}

.tlnf-segment input:focus-visible + span {
	box-shadow: 0 0 0 4px rgba(189, 139, 47, .18);
}

.tlnf-error {
	margin: 14px 0 0;
	padding: 9px 12px;
	border-radius: 9px;
	background: #fff0f0;
	color: #9b2828;
	font-size: 13px;
	font-weight: 700;
}

.tlnf-draw-button {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 58px;
	margin: 24px 0 0;
	padding: 14px 20px;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--tlnf-red), var(--tlnf-red-dark));
	box-shadow: 0 9px 24px rgba(125, 32, 40, .24), inset 0 1px rgba(255, 255, 255, .25);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: .04em;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
}

.tlnf-draw-button:hover {
	box-shadow: 0 12px 28px rgba(125, 32, 40, .3), inset 0 1px rgba(255, 255, 255, .25);
	transform: translateY(-2px);
}

.tlnf-draw-button:focus-visible,
.tlnf-again-button:focus-visible {
	outline: 3px solid rgba(189, 139, 47, .45);
	outline-offset: 3px;
}

.tlnf-draw-button__shine {
	position: absolute;
	top: -70%;
	left: -30%;
	width: 18%;
	height: 240%;
	background: rgba(255, 255, 255, .25);
	transform: rotate(25deg);
	transition: left .65s ease;
}

.tlnf-draw-button:hover .tlnf-draw-button__shine {
	left: 115%;
}

.tlnf-result[hidden] {
	display: none !important;
}

.tlnf-result {
	margin-top: 30px;
	animation: tlnf-reveal .6s ease both;
}

.tlnf-result__intro {
	text-align: center;
}

.tlnf-rank {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 138px;
	min-height: 138px;
	margin: 12px auto 8px;
	padding: 18px;
	border: 2px solid rgba(159, 47, 55, .68);
	border-radius: 50%;
	background: radial-gradient(circle, #fffef9 28%, #fff4d8 70%, #f6dda0 100%);
	box-shadow: 0 0 0 7px rgba(189, 139, 47, .11), 0 14px 35px rgba(105, 60, 24, .13);
	color: var(--tlnf-red);
	font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
	font-size: 34px;
	font-weight: 800;
	letter-spacing: .05em;
	line-height: 1;
}

.tlnf-rank::before,
.tlnf-rank::after {
	position: absolute;
	color: var(--tlnf-gold);
	font-size: 13px;
	content: "✦";
}

.tlnf-rank::before { top: 17px; }
.tlnf-rank::after { bottom: 17px; }

.tlnf-rank-message {
	margin: 12px 0 0;
	color: var(--tlnf-muted);
	font-size: 14px;
	font-weight: 700;
}

.tlnf-number-card {
	position: relative;
	margin-top: 26px;
	padding: 24px 18px 20px;
	border: 1px solid rgba(189, 139, 47, .32);
	border-radius: 20px;
	background:
		linear-gradient(90deg, rgba(189, 139, 47, .05) 1px, transparent 1px),
		linear-gradient(rgba(189, 139, 47, .05) 1px, transparent 1px),
		linear-gradient(145deg, #fffdf7, #fff8e9);
	background-size: 18px 18px, 18px 18px, auto;
	text-align: center;
}

.tlnf-number-card__label {
	margin: 0 0 14px;
	color: #755b32;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .08em;
}

.tlnf-number-balls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: clamp(7px, 2vw, 13px);
	min-height: 68px;
}

.tlnf-number-ball {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp(48px, 12vw, 64px);
	height: clamp(48px, 12vw, 64px);
	border: 2px solid rgba(189, 139, 47, .65);
	border-radius: 50%;
	background: radial-gradient(circle at 35% 28%, #fffef4 0%, #ffeebd 48%, #d6a74f 100%);
	box-shadow: inset 0 2px 4px rgba(255, 255, 255, .9), 0 8px 18px rgba(126, 80, 24, .18);
	color: #694515;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(24px, 7vw, 34px);
	font-weight: 700;
	line-height: 1;
	animation: tlnf-ball-in .5s cubic-bezier(.2, .85, .32, 1.25) var(--tlnf-delay) both;
}

.tlnf-number-string {
	margin: 16px 0 0;
	color: var(--tlnf-muted);
	font-size: 12px;
}

.tlnf-number-string strong {
	color: var(--tlnf-ink);
	font-size: 15px;
	letter-spacing: .1em;
}

.tlnf-number-note {
	margin: 5px 0 0;
	color: var(--tlnf-muted);
	font-size: 11px;
}

.tlnf-score-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 16px;
}

.tlnf-score-card {
	margin: 0;
	padding: 20px;
	border: 1px solid var(--tlnf-line);
	border-radius: 17px;
	background: rgba(255, 255, 255, .82);
	box-shadow: 0 8px 22px rgba(91, 54, 20, .06);
}

.tlnf-score-card--money {
	background: linear-gradient(145deg, #fffdf7, #fff5d8);
}

.tlnf-score-card--overall {
	background: linear-gradient(145deg, #fffdfb, #f8f0ef);
}

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

.tlnf-score-card h4 {
	margin: 4px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--tlnf-ink);
	font-size: 17px;
	font-weight: 800;
	line-height: 1.4;
}

.tlnf-score-card--money h4 span { color: var(--tlnf-gold-dark); }
.tlnf-score-card--overall h4 span { color: var(--tlnf-red); }

.tlnf-score {
	display: flex;
	align-items: baseline;
	gap: 3px;
	margin: 0;
	white-space: nowrap;
}

.tlnf-score strong {
	color: var(--tlnf-red);
	font-size: 28px;
	font-weight: 800;
	line-height: 1;
}

.tlnf-score span {
	color: var(--tlnf-muted);
	font-size: 10px;
}

.tlnf-meter {
	overflow: hidden;
	height: 7px;
	margin-top: 14px;
	border-radius: 99px;
	background: rgba(94, 72, 57, .12);
}

.tlnf-meter span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #d9aa4f, #a42e39);
	transition: width 1s cubic-bezier(.2, .8, .2, 1);
}

.tlnf-score-message {
	margin: 14px 0 0;
	color: #6e5d54;
	font-size: 12px;
	line-height: 1.75;
}

.tlnf-advice-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 14px;
}

.tlnf-advice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
	padding: 14px;
	border: 1px solid var(--tlnf-line);
	border-radius: 14px;
	background: rgba(255, 255, 255, .7);
}

.tlnf-advice__icon {
	display: inline-flex;
	flex: 0 0 27px;
	align-items: center;
	justify-content: center;
	width: 27px;
	height: 27px;
	border-radius: 50%;
	background: #f5e5bb;
	color: #8e621e;
	font-size: 14px;
	font-weight: 900;
	line-height: 1;
}

.tlnf-advice p {
	margin: 0;
	color: var(--tlnf-muted);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.5;
}

.tlnf-advice strong {
	display: block;
	margin-top: 4px;
	color: var(--tlnf-ink);
	font-size: 12px;
	font-weight: 800;
	line-height: 1.65;
}

.tlnf-oracle {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 14px;
	padding: 18px;
	border: 1px solid rgba(159, 47, 55, .2);
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(159, 47, 55, .07), rgba(189, 139, 47, .08));
}

.tlnf-oracle__mark {
	display: flex;
	flex: 0 0 42px;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(159, 47, 55, .24);
	border-radius: 50%;
	background: rgba(255, 255, 255, .7);
	color: var(--tlnf-red);
	font-size: 18px;
}

.tlnf-oracle p {
	margin: 0;
	color: var(--tlnf-red);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .08em;
}

.tlnf-oracle strong {
	display: block;
	margin-top: 3px;
	color: var(--tlnf-ink);
	font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
	font-size: 15px;
	line-height: 1.65;
}

.tlnf-again-button {
	display: block;
	margin: 20px auto 0;
	padding: 8px 16px;
	border: 0;
	border-bottom: 1px solid currentColor;
	background: transparent;
	color: #80622d;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.tlnf-disclaimer {
	margin: 24px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--tlnf-line);
	color: #8b7d74;
	font-size: 10px;
	line-height: 1.75;
}

@keyframes tlnf-reveal {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes tlnf-ball-in {
	from { opacity: 0; transform: translateY(13px) scale(.8) rotate(-8deg); }
	to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@media (max-width: 640px) {
	.tlnf-app {
		margin: 24px auto;
		border-radius: 20px;
	}

	.tlnf-score-grid,
	.tlnf-advice-grid {
		grid-template-columns: 1fr;
	}

	.tlnf-advice {
		align-items: center;
	}

	.tlnf-score-card {
		padding: 18px;
	}
}

@media (max-width: 390px) {
	.tlnf-app {
		padding: 21px 14px;
	}

	.tlnf-panel {
		padding: 18px 14px;
	}

	.tlnf-number-card {
		padding-right: 10px;
		padding-left: 10px;
	}

	.tlnf-number-balls {
		gap: 6px;
	}

	.tlnf-number-ball {
		width: 45px;
		height: 45px;
		font-size: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tlnf-app *,
	.tlnf-app *::before,
	.tlnf-app *::after {
		scroll-behavior: auto !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

