/* ============================================================
 * rinka-today.css — 今日のりんか（/today/）2026-09-26 作り直し
 * テンプレート: templates/fansite-today.php ／ 動き: assets/js/rinka-today.js
 * 旧スタイル（fansite.css の .rinka-fs-today*）とは別名（.rwt-*）。rinka-world-2026.css は触らず上から整える。
 * スマホ縦持ち最優先・横持ち／PC でも崩れない。押せる所は 44px 以上。prefers-reduced-motion で動きを止める。
 * ========================================================== */

.rwt, .rwt-sheet {
	--rwt-ink: #4a3540;
	--rwt-sub: #76606c;
	--rwt-rose: #d9487f;
	--rwt-rose-ink: #b83a72;
	--rwt-pink: #ff8fbf;
	--rwt-lav: #c9b3ff;
	--rwt-line: #f4d9e6;
	--rwt-card: #fff;
	--rwt-soft: #fff5f9;
	--rwt-grad: linear-gradient(120deg, #ff8fbf, #c9a2ff 60%, #9fd0ff);
	--rwt-shadow: 0 12px 32px -10px rgba(184, 58, 114, .22), 0 2px 6px rgba(184, 58, 114, .06);
}
.rwt {
	position: relative;
	max-width: 760px;
	margin: 6px auto 30px;
	padding: 0 2px;
	color: var(--rwt-ink);
	font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
	-webkit-tap-highlight-color: transparent;
}
.rwt *, .rwt *::before, .rwt *::after, .rwt-sheet * { box-sizing: border-box; }
.rwt p, .rwt-sheet p { margin: 0; }
.rwt-sheet { font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif; color: var(--rwt-ink); }
.rwt-ico { width: 28px; height: 28px; flex: none; object-fit: contain; display: inline-block; vertical-align: middle; }
.rwt-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 主役カード（絵＋ひとこと） ---------- */
.rwt-hero {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	border-radius: 30px;
	background: var(--rwt-card);
	box-shadow: var(--rwt-shadow);
	border: 1px solid var(--rwt-line);
	overflow: hidden;
}
.rwt-hero__media {
	position: relative;
	margin: 0;
	aspect-ratio: 4 / 5;
	max-height: 78vh;
	background: linear-gradient(160deg, #fdeef5, #f3ecff);
	overflow: hidden;
}
.rwt-hero__img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover; object-position: 50% 18%;
	display: block;
}
.rwt-hero__ph { position: absolute; inset: 0; display: grid; place-items: center; }
.rwt-hero__ph img { width: 42%; max-width: 180px; height: auto; border-radius: 50%; box-shadow: 0 10px 30px rgba(184, 58, 114, .18); }
.rwt-hero__media::after {
	content: '';
	position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
	background: linear-gradient(to top, rgba(255, 255, 255, .55), transparent);
	pointer-events: none;
}
.rwt-hero__date {
	position: absolute; left: 12px; top: 12px; z-index: 1;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 14px 6px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .88);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	box-shadow: 0 4px 14px rgba(184, 58, 114, .16);
	font-weight: 800; font-size: .92rem; color: var(--rwt-rose-ink);
	letter-spacing: .02em;
}
.rwt-hero__date .rwt-ico { width: 26px; height: 26px; }

.rwt-hero__body { padding: 16px 16px 18px; display: grid; gap: 14px; align-content: start; }

.rwt-pending {
	padding: 10px 14px; border-radius: 16px;
	background: #fff7e3; border: 1px dashed #f0c56a; color: #7a5a1c;
	font-size: .88rem; line-height: 1.6;
}

/* ふきだし */
.rwt-say { display: flex; align-items: flex-end; gap: 10px; }
.rwt-say__face {
	width: 54px; height: 54px; flex: none;
	border-radius: 50%; object-fit: cover;
	border: 3px solid #fff; box-shadow: 0 4px 12px rgba(184, 58, 114, .2);
	background: #fde7f0;
}
.rwt-say__msg {
	position: relative; flex: 1; min-width: 0;
	padding: 14px 16px;
	border-radius: 20px 20px 20px 6px;
	background: var(--rwt-soft);
	border: 2px solid #fbd9e7;
	font-size: 1.06rem; font-weight: 700; line-height: 1.75;
	color: var(--rwt-ink);
	text-wrap: pretty;
	overflow-wrap: anywhere;
}

/* イイネ・リアクション（rinka-reactions.js が描く中身を /today/ だけ大きく） */
.rwt .rinka-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; justify-content: flex-start; }
.rwt .rinka-reactions__like {
	min-height: 44px; min-width: 44px;
	padding: 0 16px;
	border-radius: 999px;
	font-size: .95rem;
	display: inline-flex; align-items: center; gap: 6px;
}
.rwt .rinka-reactions__rx { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rwt .rinka-reactions__rx-btn {
	position: relative;
	min-width: 44px; min-height: 44px; width: 44px; height: 44px;
	padding: 0;
	border-radius: 14px;
	display: inline-grid; place-items: center;
	background: #fff; border: 2px solid var(--rwt-line);
	box-shadow: 0 3px 0 #f6dbe7;
	transition: transform .15s ease, box-shadow .15s ease;
}
.rwt .rinka-reactions__rx-btn:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 #f6dbe7; }
.rwt .rinka-reactions__rx-btn.is-on { border-color: var(--rwt-pink); background: #ffeef5; }
.rwt .rinka-reactions__rx-btn:disabled { opacity: .45; }
.rwt .rinka-reactions__rx-btn[data-rx] .rinka-reactions__rx-emoji {
	display: block; width: 30px; height: 30px;
	font-size: 0; line-height: 0; color: transparent;
	background: center / contain no-repeat;
}
.rwt .rinka-reactions__rx-btn[data-rx="cute"] .rinka-reactions__rx-emoji { background-image: url("../img/today/versus.webp"); }
.rwt .rinka-reactions__rx-btn[data-rx="sparkle"] .rinka-reactions__rx-emoji { background-image: url("../img/today/sparkle.webp"); }
.rwt .rinka-reactions__rx-btn[data-rx="clap"] .rinka-reactions__rx-emoji { background-image: url("../img/today/trophy.webp"); }
.rwt .rinka-reactions__rx-btn[data-rx="bunny"] .rinka-reactions__rx-emoji { background-image: url("../img/today/carrot.webp"); }
.rwt .rinka-reactions__rx-btn[data-rx="fire"] .rinka-reactions__rx-emoji { background-image: url("../img/today/true.webp"); }
.rwt .rinka-reactions__rx-btn[data-rx="flower"] .rinka-reactions__rx-emoji { background-image: url("../img/today/leaf.webp"); }
.rwt .rinka-reactions__rx-count {
	position: absolute; right: -6px; top: -8px;
	min-width: 20px; height: 20px; padding: 0 5px;
	border-radius: 999px; background: var(--rwt-rose); color: #fff;
	font-size: .7rem; font-weight: 800; line-height: 20px; text-align: center;
}

/* ボタン */
.rwt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rwt-actions .rwt-btn { white-space: nowrap; padding: 8px 10px; font-size: .95rem; }
.rwt-actions:has(> .rwt-btn--fav[hidden]) { grid-template-columns: 1fr; }
.rwt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 50px; padding: 8px 16px;
	border-radius: 999px;
	font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	border: 2px solid transparent;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.rwt-btn:focus-visible, .rwt-sheet__item:focus-visible, .rwt-sheet__close:focus-visible, .rwt .rinka-reactions button:focus-visible {
	outline: 3px solid #9b7bff; outline-offset: 2px;
}
.rwt-btn .rwt-ico { width: 26px; height: 26px; }
.rwt-btn--main {
	color: #fff; background: var(--rwt-grad);
	box-shadow: 0 6px 0 #d777a6, 0 10px 22px -8px rgba(184, 58, 114, .5);
	text-shadow: 0 1px 1px rgba(160, 40, 100, .35);
}
.rwt-btn--main:active { transform: translateY(3px); box-shadow: 0 3px 0 #d777a6; }
.rwt-btn--ghost { color: var(--rwt-rose-ink); background: #fff; border-color: #f6c1d7; box-shadow: 0 4px 0 #f6dbe7; }
.rwt-btn--ghost:active { transform: translateY(2px); box-shadow: 0 2px 0 #f6dbe7; }
.rwt-btn--fav { color: var(--rwt-rose-ink); background: #fff; border-color: #f6c1d7; box-shadow: 0 4px 0 #f6dbe7; }
.rwt-heart { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; flex: none; }
.rwt-btn--fav .rwt-fav__on { display: none; }
.rwt-btn--fav.is-on { background: #ffe8f1; border-color: var(--rwt-pink); }
.rwt-btn--fav.is-on .rwt-heart { fill: var(--rwt-rose); stroke: var(--rwt-rose); }
.rwt-btn--fav.is-on .rwt-fav__on { display: inline; }
.rwt-btn--fav.is-on .rwt-fav__off { display: none; }
.rwt-btn--fav.is-pop .rwt-heart { animation: rwt-pop .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes rwt-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------- シェア・保存シート ---------- */
.rwt-sheet {
	position: fixed; inset: 0; z-index: 2147483000;
	display: flex; align-items: flex-end; justify-content: center;
	padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
	background: rgba(74, 53, 64, 0);
	transition: background-color .18s ease;
}
.rwt-sheet.is-open { background: rgba(74, 53, 64, .38); }
.rwt-sheet__panel {
	width: 100%; max-width: 460px;
	max-height: calc(100vh - 40px); overflow-y: auto;
	padding: 18px 14px 14px;
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 -10px 40px rgba(74, 53, 64, .25);
	display: grid; gap: 10px;
	transform: translateY(24px); opacity: 0;
	transition: transform .2s cubic-bezier(.22, .8, .24, 1), opacity .18s ease;
}
.rwt-sheet.is-open .rwt-sheet__panel { transform: none; opacity: 1; }
.rwt-sheet__title { margin: 0 4px 2px; font-weight: 900; font-size: 1.02rem; color: var(--rwt-ink); text-align: center; }
.rwt-sheet__item {
	display: flex; align-items: center; gap: 12px;
	width: 100%; min-height: 64px;
	padding: 10px 14px;
	border-radius: 18px;
	border: 2px solid var(--rwt-line);
	background: var(--rwt-soft);
	color: var(--rwt-ink); font: inherit; text-align: left; cursor: pointer;
}
.rwt-sheet__item:active { background: #ffe8f1; }
.rwt-sheet__item .rwt-ico { width: 40px; height: 40px; }
.rwt-sheet__txt { display: grid; gap: 2px; min-width: 0; }
.rwt-sheet__txt b { font-size: 1rem; font-weight: 800; }
.rwt-sheet__txt small { font-size: .8rem; color: var(--rwt-sub); line-height: 1.45; }
.rwt-sheet__close {
	min-height: 48px; border-radius: 999px; border: 0;
	background: #f4eef2; color: var(--rwt-sub);
	font: inherit; font-weight: 800; cursor: pointer;
}
html.rwt-sheet-open { overflow: hidden; }

/* ---------- 下のカード ---------- */
.rwt-card {
	margin-top: 16px;
	padding: 16px 16px 18px;
	border-radius: 24px;
	background: var(--rwt-card);
	border: 1px solid var(--rwt-line);
	box-shadow: 0 6px 20px -10px rgba(184, 58, 114, .2);
}
.rwt-card__h {
	display: flex; align-items: center; gap: 8px;
	margin: 0 0 12px !important; padding: 0 !important;
	font-size: 1.06rem !important; font-weight: 900; line-height: 1.35;
	color: var(--rwt-ink);
	border: 0 !important; background: none !important;
}
.rwt-card__h::before, .rwt-card__h::after { display: none !important; }
.rwt-card__h .rwt-ico { width: 32px; height: 32px; }

/* ボイスと日記 */
.rwt-voice__theme {
	display: inline-block; margin-bottom: 10px !important;
	padding: 4px 12px; border-radius: 999px;
	background: #f3ecff; color: #6b4fb8; font-weight: 800; font-size: .88rem;
}
.rwt-voice__audio { width: 100%; height: 44px; display: block; }
.rwt-voice__note { margin-top: 6px !important; font-size: .8rem; color: var(--rwt-sub); }
.rwt-diary { margin-top: 14px; padding: 14px; border-radius: 18px; background: #fffdf6; border: 1px dashed #efd9a8; }
.rwt-diary__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 800; color: #8a6a2a; }
.rwt-diary__head .rwt-ico { width: 26px; height: 26px; }
.rwt-diary__title { color: var(--rwt-ink); }
.rwt-diary__body { margin-top: 8px !important; line-height: 1.9; font-size: .96rem; }

/* きょうのりんかメモ（アイコン＋見出し→中身の2段） */
.rwt-memo__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.rwt-memo__item {
	display: flex; align-items: center; gap: 12px;
	padding: 12px 14px;
	border-radius: 18px;
	background: var(--rwt-soft);
	border: 1px solid #fbe0ea;
	margin: 0;
}
.rwt-memo__item::before { display: none !important; }
.rwt-memo__item .rwt-ico { width: 48px; height: 48px; }
.rwt-memo__txt { min-width: 0; display: grid; gap: 2px; }
.rwt-memo__label { font-size: .78rem; font-weight: 800; color: var(--rwt-rose-ink); letter-spacing: .04em; white-space: nowrap; }
.rwt-memo__value { font-size: 1rem; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.rwt-memo__item--scene { background: #f6f1ff; border-color: #e6dcff; }
.rwt-memo__item--scene .rwt-memo__label { color: #6b4fb8; }
.rwt-memo__item--lucky { background: #effaf6; border-color: #cdeee2; }
.rwt-memo__item--lucky .rwt-memo__label { color: #2e7d64; }

/* きみのあしあと */
.rwt-mine__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rwt-mine__stat {
	display: flex; align-items: center; gap: 8px; min-width: 0;
	padding: 10px 12px; border-radius: 16px;
	background: var(--rwt-soft); border: 1px solid #fbe0ea;
	font-size: .84rem; color: var(--rwt-sub); font-weight: 700;
}
.rwt-mine__stat .rwt-ico { width: 34px; height: 34px; }
.rwt-mine__stat > span { display: grid; line-height: 1.25; min-width: 0; }
.rwt-mine__stat b { font-size: 1.4rem; color: var(--rwt-rose-ink); font-weight: 900; }
.rwt-stamps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rwt-stamp {
	position: relative;
	display: grid; justify-items: center; gap: 2px;
	padding: 6px 0 8px; border-radius: 14px;
	background: #faf6f8; border: 1px solid #f1e6ec;
	margin: 0;
}
.rwt-stamp::before { display: none !important; }
.rwt-stamp__w { font-size: .7rem; font-weight: 800; color: var(--rwt-sub); }
.rwt-stamp__mark { width: 30px; height: 30px; display: grid; place-items: center; }
.rwt-stamp__mark .rwt-ico { width: 30px; height: 30px; }
.rwt-stamp__mark i { width: 14px; height: 14px; border-radius: 50%; border: 2px dashed #e4cfd9; }
.rwt-stamp__d { font-size: .76rem; font-weight: 800; color: var(--rwt-ink); }
.rwt-stamp.is-on { background: #fff; border-color: #f6c1d7; }
.rwt-stamp.is-today { border: 2px solid var(--rwt-pink); box-shadow: 0 4px 12px -4px rgba(217, 72, 127, .5); }
.rwt-next {
	display: flex; align-items: center; gap: 8px;
	margin-top: 12px !important; padding: 10px 14px;
	border-radius: 16px; background: #fff8e8; color: #7a5a1c;
	font-weight: 800; font-size: .92rem;
}
.rwt-saved { margin-top: 14px; }
.rwt-saved__h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; }
.rwt-saved__h b { margin-left: auto; min-width: 28px; padding: 2px 8px; border-radius: 999px; background: #ffe3ee; color: var(--rwt-rose-ink); text-align: center; }
.rwt-saved__grid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rwt-saved__cell { margin: 0; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: #fdeef5; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(184, 58, 114, .15); }
.rwt-saved__cell::before { display: none !important; }
.rwt-saved__cell img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.rwt-saved__cell.is-today { border-color: var(--rwt-pink); }
.rwt-saved__all { margin-top: 12px; width: 100%; }
.rwt-saved__hint { margin-top: 12px !important; font-size: .86rem; color: var(--rwt-sub); line-height: 1.7; }

/* もっと会いたくなったら */
.rwt-more__links { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* ---------- 幅があるとき ---------- */
@media (min-width: 560px) {
	.rwt-memo__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.rwt-memo__item { flex-direction: column; align-items: flex-start; }
	.rwt-more__links { grid-template-columns: 1fr 1fr; }
	.rwt-saved__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* 横持ちスマホ・タブレット・PC：絵と文を横ならび */
@media (min-width: 640px) and (orientation: landscape), (min-width: 820px) {
	.rwt-hero { grid-template-columns: minmax(0, 54%) minmax(0, 1fr); }
	.rwt-hero__media { aspect-ratio: auto; min-height: 100%; max-height: none; }
	.rwt-hero__media { height: auto; }
	.rwt-hero__media::before { content: ''; display: block; padding-top: 125%; }
	.rwt-hero__body { padding: 22px 20px; align-content: center; }
}
@media (min-width: 640px) and (orientation: landscape) and (max-height: 520px) {
	.rwt-hero__media::before { padding-top: 0; min-height: 86vh; }
	.rwt-hero { grid-template-columns: minmax(0, 44%) minmax(0, 1fr); }
}

/* ---------- 動きを減らす ---------- */
@media (prefers-reduced-motion: reduce) {
	.rwt *, .rwt *::before, .rwt *::after { animation: none !important; transition: none !important; }
	.rwt-sheet, .rwt-sheet__panel { transition: none !important; }
}

/* hidden 属性を display 指定より優先（2026-09-26） */
.rwt [hidden], .rwt-sheet[hidden], .rwp [hidden], .rwp-modal[hidden] { display: none !important; }
