@charset "UTF-8";
/* =====================================================================
   デートのページ（page-talk-date.php ／ js/talk-date.js）
   全画面（header-app.php）。スマホでもスクロールなしで1画面に収まる。
   上に場所の帯、まん中にキャラ、下にセリフの枠と返事の候補。
   ===================================================================== */

html.jlgAppHtml, html.jlgAppHtml body.jlgAppBody{ margin: 0 !important; padding: 0 !important; height: 100%; overflow: hidden; background: #1c1726; }

.jlgDate{
	--dt-ink: #241a33;
	--dt-bg1: #ffe3f1;
	--dt-bg2: #e8dcff;
	--dt-accent: #ff4f9a;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: auto;
	height: 100%;
	height: var(--jlg-app-h, 100%);
	display: flex;
	justify-content: center;
	background: #1c1726;
	color: var(--dt-ink);
	font-family: var(--jlg-font, "Hiragino Sans", "Noto Sans JP", sans-serif);
	line-height: 1.7;
	-webkit-text-size-adjust: 100%;
}
.jlgDate *, .jlgDate *::before, .jlgDate *::after{ box-sizing: border-box; }
.jlgDate p, .jlgDate ol{ margin: 0; padding: 0; }
.jlgDate p{ text-align: inherit !important; }
.jlgDate ol{ list-style: none; }

/* スポットごとの色 */
.jlgDate.is-spot-cafe{ --dt-bg1: #fff1df; --dt-bg2: #f4d9c2; --dt-accent: #c9773a; }
.jlgDate.is-spot-aquarium{ --dt-bg1: #cdeeff; --dt-bg2: #2f6fb8; --dt-accent: #1f7fd6; }
.jlgDate.is-spot-amusement{ --dt-bg1: #fff3b8; --dt-bg2: #ffb3d6; --dt-accent: #ff4f9a; }
.jlgDate.is-spot-movie{ --dt-bg1: #3a2346; --dt-bg2: #120d1c; --dt-accent: #ffcf5c; }
.jlgDate.is-spot-shopping{ --dt-bg1: #ffe1ef; --dt-bg2: #d9d2ff; --dt-accent: #b43cc8; }
.jlgDate.is-spot-park{ --dt-bg1: #e6f8d8; --dt-bg2: #9fd9a8; --dt-accent: #2f9e57; }
.jlgDate.is-spot-gym{ --dt-bg1: #e7ebf2; --dt-bg2: #8a96ad; --dt-accent: #ef4b3c; }
.jlgDate.is-spot-hotel{ --dt-bg1: #4a2a4f; --dt-bg2: #170f21; --dt-accent: #ff7fb5; }
.jlgDate.is-spot-hotel .jlgDate__stage{ transition: background .6s ease; }
.jlgDate.is-spot-nightview{ --dt-bg1: #2b2f6b; --dt-bg2: #0c0f2b; --dt-accent: #ffd36b; }

/* 画面いっぱい（パソコンでは縦長のスマホくらいの幅で真ん中に） */
.jlgDate__stage{
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 520px;
	height: 100%;
	height: 100dvh;
	height: var(--jlg-app-h, 100dvh); /* 本当に見えている高さ（header-app.php で計る） */
	overflow: hidden;
	background: linear-gradient(170deg, var(--dt-bg1) 0%, var(--dt-bg2) 100%);
	/* 下のボタン（戻る・ホーム・アプリ一覧／iPhoneのバー）と重ならないよう、少なくとも12pxあける */
	padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
.jlgDate__bg{ position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.jlgDate__bg span{ font-size: min(70vw, 34dvh, 320px); line-height: 1; opacity: .13; transform: translateY(-18%); filter: saturate(.6); }
/* 背景の画像がある時（管理画面「キャラクター ＞ デートの背景」）：画像を敷いて、絵文字は消す。文字が読みやすいよう上下を少し暗く */
.jlgDate__bgImg{ position: absolute; inset: 0; background-position: center; background-size: cover; background-repeat: no-repeat; opacity: 0; transition: opacity 1.6s ease !important; }
.jlgDate__bgImg.is-on{ opacity: 1; }
.jlgDate__bg span{ position: relative; transition: opacity .8s ease; }
.jlgDate.has-bg .jlgDate__bg span, .jlgDate.has-bg.has-stand .jlgDate__bg span{ opacity: 0; }
.jlgDate__bg::after{ content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 55%, rgba(0,0,0,.35) 100%); opacity: 0; transition: opacity 1.2s ease; }
.jlgDate.has-bg .jlgDate__bg::after{ opacity: 1; }
/* 背景のじわっとは、動きではなく明るさの変化なので、「動きを減らす」設定の端末でも同じように出す */

/* 上の帯 */
.jlgDate__top{
	position: relative;
	flex: none;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	padding-top: calc(10px + env(safe-area-inset-top, 0px));
	background: rgba(255, 255, 255, .74);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.jlgDate__exit{ display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%; color: var(--dt-ink); font-size: 26px; line-height: 1; text-decoration: none; }
.jlgDate__exit:hover{ background: rgba(0, 0, 0, .06); }
.jlgDate__where{ display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.jlgDate__where b{ font-size: 15px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jlgDate__where small{ color: #6b5d78; font-size: 12px; }
.jlgDate__steps{ display: flex; flex: none; gap: 6px; }
.jlgDate__steps li{ width: 9px; height: 9px; border-radius: 50%; background: rgba(36, 26, 51, .16); }
.jlgDate__steps li.is-done{ background: var(--dt-accent); opacity: .5; }
.jlgDate__steps li.is-now{ background: var(--dt-accent); box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 5px var(--dt-accent); }

/* キャラ（残りの高さに合わせて大きさが変わる） */
.jlgDate__her{ position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px 0; }
.jlgDate__face{
	display: block;
	width: min(52vw, 30dvh, 240px);
	aspect-ratio: 1 / 1;
	max-height: 100%;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 0 0 5px rgba(255, 255, 255, .85), 0 22px 40px -18px rgba(36, 26, 51, .55);
	transition: transform .35s ease, filter .35s ease;
	filter: saturate(.92) brightness(.97);
}
.jlgDate__face img{ display: block; width: 100%; height: 100%; object-fit: cover; }
.jlgDate.is-talking .jlgDate__face{ transform: translateY(-4px) scale(1.03); filter: none; }
.jlgDate__mark{ position: absolute; top: 12%; left: calc(50% + min(19vw, 11dvh, 92px)); font-size: 32px; font-weight: 900; line-height: 1; opacity: 0; pointer-events: none; }
.jlgDate__mark.is-good{ color: #ff4f9a; animation: jlgDtUp 1.5s ease both; }
.jlgDate__mark.is-bad{ animation: jlgDtUp 1.5s ease both; }
@keyframes jlgDtUp{ 0%{ opacity: 0; transform: translateY(10px) scale(.6); } 20%{ opacity: 1; transform: translateY(0) scale(1.1); } 80%{ opacity: 1; } 100%{ opacity: 0; transform: translateY(-24px); } }

/* 立ち絵（透過PNG）：ノベルゲームのように正面に立たせる。足元はセリフの枠の後ろに入る */
.jlgDate__top{ z-index: 3; }
.jlgDate__sprite{
	position: absolute;
	left: 0;
	right: 0;
	/* 頭の上の余白：--dt-headroom の数字を変えると調整できます（大きくすると余白が広がり、絵は少し小さくなる） */
	--dt-headroom: clamp(14px, 3.5dvh, 32px);
	top: calc(var(--dt-top, 58px) + var(--dt-headroom));
	bottom: 0;
	z-index: 1;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	pointer-events: none;
	overflow: hidden;
}
.jlgDate__sprite img{
	position: absolute;
	left: 50%;
	bottom: 0;
	height: 100%;
	max-width: 118%;
	object-fit: contain;
	object-position: center bottom;
	transform: translateX(-50%);
	filter: drop-shadow(0 12px 18px rgba(36, 26, 51, .28)) brightness(.95);
	transition: opacity .4s ease, transform .35s ease, filter .35s ease;
}
.jlgDate__sprite img.is-in, .jlgDate__sprite img.is-out{ opacity: 0; }
.jlgDate.is-talking .jlgDate__sprite img{ filter: drop-shadow(0 12px 18px rgba(36, 26, 51, .28)) brightness(1); transform: translateX(-50%) translateY(-3px); }
.jlgDate.has-stand .jlgDate__face{ display: none; }
.jlgDate.is-pose .jlgDate__sprite{ bottom: var(--dt-box, 0px); transition: bottom .35s ease; }
.jlgDate.has-stand .jlgDate__mark{ top: 6%; left: auto; right: 14%; z-index: 2; }
.jlgDate.has-stand .jlgDate__bg span{ opacity: .08; }
.jlgDate__her{ z-index: 1; }

/* セリフの枠（中身が多い時は、枠の中だけスクロール） */
.jlgDate__box{
	position: relative;
	z-index: 2;
	flex: none;
	max-height: 64%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 10px 4px;
	padding: 12px 16px 16px;
	border-radius: 18px;
	background: rgba(255, 255, 255, .95);
	box-shadow: 0 10px 30px -16px rgba(36, 26, 51, .5);
	cursor: pointer;
	min-height: 132px;
}
.jlgDate__box.is-pop .jlgDate__text{ animation: jlgDtIn .24s ease both; }
@keyframes jlgDtIn{ from{ opacity: 0; transform: translateY(4px); } }
.jlgDate p.jlgDate__scene{ color: #8a7b97; font-size: 11px; letter-spacing: .08em; }
.jlgDate p.jlgDate__who{ min-height: 1.4em; margin-top: 2px; font-size: 13px; font-weight: 900; line-height: 1.4; }
.jlgDate p.jlgDate__who.is-her{ color: var(--dt-accent); }
.jlgDate p.jlgDate__who.is-me{ color: #06a24a; }
.jlgDate p.jlgDate__text{ margin-top: 2px; font-size: 15.5px; line-height: 1.8; text-align: left !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.jlgDate p.jlgDate__text.is-nar{ color: #5c4f69; font-size: 14px; font-style: italic; }
.jlgDate p.jlgDate__text.is-me{ color: #1f5133; }
.jlgDate p.jlgDate__text.is-sys{ color: #9a3412; font-size: 14px; }
.jlgDate p.jlgDate__text.is-wait{ color: #9a8fa6; letter-spacing: 4px; }
.jlgDate__next{ position: absolute; right: 12px; bottom: 6px; padding: 2px 6px; border: 0; background: none; color: var(--dt-accent); font-size: 14px; cursor: pointer; animation: jlgDtBlink 1s ease-in-out infinite; }
@keyframes jlgDtBlink{ 50%{ opacity: .3; transform: translateY(2px); } }

/* 返事 */
.jlgDate__choices{ display: grid; gap: 7px; margin-top: 10px; }
.jlgDate__choices:empty{ display: none; }
.jlgDate__choices.is-styles{ grid-template-columns: 1fr 1fr; }

/* その日だけの呼び名の入力 */
.jlgDate__nameForm{ display: grid; gap: 8px; }
.jlgDate__nameLabel{ font-size: 13px; font-weight: 700; color: var(--dt-ink); }
.jlgDate__nameInput{
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid var(--dt-accent);
	border-radius: 14px;
	background: #fff;
	color: var(--dt-ink);
	font-family: inherit;
	font-size: 16px; /* 16px未満だと、iPhoneで入力時に画面が拡大される */
	line-height: 1.4;
}
.jlgDate__nameInput:focus{ outline: 2px solid var(--dt-accent); outline-offset: 1px; }
.jlgDate__nameInput.is-err{ border-color: #e0475b; background: #fff5f6; }
.jlgDate__choices .jlgDate__nameOk{ text-align: center; font-weight: 700; background: var(--dt-accent); color: #fff; border-color: var(--dt-accent); }
.jlgDate__choices .jlgDate__nameOk:hover:not(:disabled){ background: var(--dt-accent); filter: brightness(1.05); }
.jlgDate__nameNote{ margin: -3px 2px 2px; font-size: 11.5px; line-height: 1.55; color: #6b6478; }
.jlgDate__nameSkip{ justify-self: center; padding: 2px 6px; border: 0; background: none; color: #6b6478; font-family: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.jlgDate__choice{
	display: block;
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--dt-accent);
	border-radius: 14px;
	background: #fff;
	color: var(--dt-ink);
	font-family: inherit;
	font-size: 14.5px;
	line-height: 1.45;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: transform .12s, background .12s;
	-webkit-tap-highlight-color: transparent;
}
.jlgDate__choices.is-styles .jlgDate__choice{ padding: 11px 6px; text-align: center; font-weight: 700; white-space: nowrap; }
.jlgDate__choice:hover:not(:disabled){ transform: translateY(-1px); background: #fff7fb; }
.jlgDate__choice:focus{ outline: none; }
.jlgDate__choice:focus-visible{ outline: 2px solid var(--dt-accent); outline-offset: 2px; }
.jlgDate__choice:disabled{ opacity: .5; cursor: default; }
.jlgDate__choice.is-picked{ opacity: 1; background: var(--dt-accent); color: #fff; }
.jlgDate__choice.is-back{ background: var(--dt-accent); color: #fff; font-weight: 900; text-align: center; }

/* 終わり */
.jlgDate p.jlgDate__text.is-end{ display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center !important; }
.jlgDate__result{ font-size: 20px; font-weight: 900; }
.jlgDate.is-end-great .jlgDate__result{ color: #ff4f9a; }
.jlgDate.is-end-awkward .jlgDate__result{ color: #6b5d78; }
.jlgDate__gain{ font-size: 14px; font-weight: 700; }
.jlgDate__badge{ padding: 2px 12px; border-radius: 999px; background: linear-gradient(120deg, #3b2fa8, #b43cc8 50%, #ff0090); color: #fff; font-size: 12px; font-weight: 700; }
.jlgDate__extra{ color: #6b5d78; font-size: 12.5px; line-height: 1.6; }
.jlgDate.is-end .jlgDate__box{ cursor: default; }

/* 入れない時 */
.jlgDate__empty{ align-self: center; width: calc(100% - 32px); max-width: 480px; padding: 32px 24px; border-radius: 20px; background: #fff6fb; text-align: center; }
.jlgDate__empty p{ font-size: 15px; }
.jlgDate__empty a{ display: inline-block; margin-top: 16px; padding: 10px 22px; border-radius: 999px; background: #ff4f9a; color: #fff; font-weight: 700; text-decoration: none; }

/* 背の低い画面（横向き・小さいスマホ） */
@media (max-height: 600px){
	.jlgDate__face{ width: min(40vw, 24dvh, 200px); }
	.jlgDate__box{ min-height: 0; padding: 10px 14px 12px; }
	.jlgDate p.jlgDate__text{ font-size: 14.5px; line-height: 1.7; }
	.jlgDate__choice{ padding: 8px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce){
	.jlgDate__box.is-pop .jlgDate__text, .jlgDate__next, .jlgDate__mark.is-good, .jlgDate__mark.is-bad{ animation: none; }
	.jlgDate__mark.is-good, .jlgDate__mark.is-bad{ opacity: 1; }
}
