/* ============================================================
 * rinka-pet.css — りんかとペット育成 v2（/pet/・2026-09-26）
 * 本体は assets/js/rinka-pet.js。旧スタイル（fansite.css の .rinka-fs-pet__*）とは別名（.rpet-*）。
 * スマホ縦持ち最優先・横持ち／PCでも崩れない。prefers-reduced-motion では動きを止める。
 * UIの記号は絵文字ではなく共通アイコン（assets/img/pet/icons/・ゲーム共通素材からコピー）。
 * ========================================================== */

.rinka-fs-pet.rpet-app, .rpet-modal, .rpet-game {
	--rp-ink: #5a3a46;
	--rp-sub: #8a6a78;
	--rp-pink: #ff7fa8;
	--rp-pink-d: #d94f82;
	--rp-line: #fbe0ea;
	--rp-card: #fff;
	--rp-soft: #fff5f9;
}
.rpet-modal *, .rpet-modal *::before, .rpet-modal *::after, .rpet-game *, .rpet-game *::before, .rpet-game *::after { box-sizing: border-box; }
.rinka-fs-pet.rpet-app {
	max-width: 640px;
	margin: 8px auto 28px;
	padding: 0 12px;
	color: var(--rp-ink);
	font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
	-webkit-tap-highlight-color: transparent;
	overflow-x: clip;
	background: none;
	border: 0;
	box-shadow: none;
}
.rinka-fs-pet.rpet-app::before, .rinka-fs-pet.rpet-app::after { content: none; display: none; }
.rpet-app *, .rpet-app *::before, .rpet-app *::after { box-sizing: border-box; }
.rpet-loading { text-align: center; color: var(--rp-sub); padding: 40px 0; }
.rpet-ico { width: 30px; height: 30px; flex: none; object-fit: contain; display: inline-block; vertical-align: middle; }
.rpet-ico--s { width: 20px; height: 20px; }

.rpet-warn { background: #fff4e0; border: 2px solid #f5cf92; color: #7a4e12; border-radius: 14px; padding: 10px 12px; font-size: .86rem; line-height: 1.6; margin: 0 0 10px; }

/* ---------- ボタン ---------- */
.rpet-btn {
	appearance: none; border: 2px solid var(--rp-line); background: #fff; color: var(--rp-ink);
	font: inherit; font-weight: 800; font-size: .95rem; border-radius: 999px; padding: 11px 20px; min-height: 46px;
	box-shadow: 0 3px 0 #f3cfdc; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.rpet-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #f3cfdc; }
.rpet-btn--main { background: linear-gradient(180deg, #ff9fbf, var(--rp-pink)); border-color: var(--rp-pink-d); color: #fff; box-shadow: 0 3px 0 #c2447a; }
.rpet-btn:disabled { opacity: .5; cursor: default; }
.rpet-btn:focus-visible, .rpet-care:focus-visible, .rpet-tab:focus-visible, .rpet-wearbtn:focus-visible, .rpet-title:focus-visible, .rpet-bunny:focus-visible, .rpet-photo:focus-visible { outline: 3px solid #8fc3ff; outline-offset: 2px; }

/* ---------- 名前・段階 ---------- */
.rpet-head { background: var(--rp-card); border: 2px solid var(--rp-line); border-radius: 22px; padding: 12px 14px 12px; box-shadow: 0 4px 0 #f7d3e0; }
.rpet-head__name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.rpet-head__n { font-size: 1.35rem; font-weight: 900; letter-spacing: .02em; word-break: break-all; }
.rpet-lv { background: linear-gradient(180deg, #ff9fbf, var(--rp-pink)); color: #fff; font-weight: 900; font-size: .82rem; border-radius: 999px; padding: 3px 10px; }
.rpet-stage { background: #eef8ff; color: #4a7aa6; font-weight: 800; font-size: .78rem; border-radius: 999px; padding: 3px 10px; border: 1.5px solid #cfe6fb; }
.rpet-head__title { margin: 6px 0 0; font-size: .82rem; font-weight: 800; color: #b07a16; display: flex; align-items: center; gap: 4px; }
.rpet-exp { position: relative; height: 18px; border-radius: 999px; background: #fdeef5; overflow: hidden; margin: 10px 0 8px; box-shadow: inset 0 1px 2px rgba(0,0,0,.06); }
.rpet-exp > span { display: block; height: 100%; background: linear-gradient(90deg, #ffd6e8, var(--rp-pink)); border-radius: 999px; transition: width .6s cubic-bezier(.22,1,.36,1); }
.rpet-exp em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: .7rem; font-weight: 900; color: var(--rp-ink); letter-spacing: .04em; }
.rpet-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rpet-chip { display: flex; align-items: center; justify-content: center; gap: 3px; background: var(--rp-soft); border-radius: 12px; padding: 5px 4px; font-size: .74rem; font-weight: 700; color: var(--rp-sub); white-space: nowrap; min-width: 0; }
.rpet-chip b { color: var(--rp-ink); font-size: .95rem; }

/* ---------- ステージ（部屋） ---------- */
.rpet-scene {
	position: relative; margin: 12px 0 0; border-radius: 26px; padding: 18px 14px 16px;
	border: 2px solid #d9efe2; overflow: hidden; min-height: 280px;
	display: flex; flex-direction: column; align-items: center;
	background: linear-gradient(180deg, #e8fbf1 0%, #d7f5e6 60%, #c6ecd6 100%);
}
.rpet-scene__deco { position: absolute; inset: 0; pointer-events: none; opacity: .9; }
.rpet-bg--meadow .rpet-scene__deco, .rpet-swatch.rpet-bg--meadow { background:
	radial-gradient(circle at 12% 88%, #fff 0 5px, transparent 6px), radial-gradient(circle at 86% 82%, #ffd6e8 0 6px, transparent 7px),
	radial-gradient(circle at 70% 92%, #fff3a8 0 5px, transparent 6px), radial-gradient(circle at 25% 18%, rgba(255,255,255,.8) 0 18px, transparent 19px); }
.rpet-swatch.rpet-bg--meadow { background-color: #d7f5e6; }
.rpet-bg--room { background: linear-gradient(180deg, #fff0f6 0%, #ffe3ee 64%, #f7cfdd 64%, #f3c3d4 100%); border-color: #f7d3e0; }
.rpet-bg--room .rpet-scene__deco { background:
	repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.55) 34px 38px) top/100% 64% no-repeat,
	radial-gradient(circle at 88% 20%, #ffe27a 0 12px, transparent 13px); }
.rpet-bg--sakura { background: linear-gradient(180deg, #fff6fa 0%, #ffe6ef 100%); border-color: #ffd0e0; }
.rpet-bg--sakura .rpet-scene__deco { background:
	radial-gradient(ellipse 6px 4px at 10% 20%, #ffb3cc 98%, transparent), radial-gradient(ellipse 6px 4px at 30% 60%, #ffc6d8 98%, transparent),
	radial-gradient(ellipse 6px 4px at 80% 30%, #ffb3cc 98%, transparent), radial-gradient(ellipse 6px 4px at 65% 75%, #ffc6d8 98%, transparent),
	radial-gradient(ellipse 6px 4px at 90% 85%, #ffb3cc 98%, transparent), radial-gradient(ellipse 6px 4px at 18% 88%, #ffc6d8 98%, transparent); }
.rpet-bg--night { background: linear-gradient(180deg, #3b3a6b 0%, #5d5a99 70%, #7a73b3 100%); border-color: #5d5a99; }
.rpet-bg--night .rpet-scene__deco { background:
	radial-gradient(circle at 15% 15%, #fff 0 1.6px, transparent 2px), radial-gradient(circle at 40% 8%, #fff 0 1.4px, transparent 2px),
	radial-gradient(circle at 78% 18%, #fff 0 1.8px, transparent 2.4px), radial-gradient(circle at 90% 40%, #fff 0 1.2px, transparent 2px),
	radial-gradient(circle at 10% 50%, #fff 0 1.2px, transparent 2px), radial-gradient(circle at 84% 10%, #fff7c2 0 14px, transparent 15px); }
.rpet-bg--night .rpet-say { background: rgba(255,255,255,.92); }
.rpet-bg--snow { background: linear-gradient(180deg, #eef6ff 0%, #dcecff 100%); border-color: #cfe2f7; }
.rpet-bg--snow .rpet-scene__deco { background:
	radial-gradient(circle at 10% 20%, #fff 0 4px, transparent 5px), radial-gradient(circle at 35% 70%, #fff 0 3px, transparent 4px),
	radial-gradient(circle at 70% 25%, #fff 0 5px, transparent 6px), radial-gradient(circle at 88% 70%, #fff 0 3px, transparent 4px),
	radial-gradient(circle at 55% 90%, #fff 0 4px, transparent 5px); }
.rpet-bg--castle { background: linear-gradient(180deg, #fff8e6 0%, #ffe9b8 100%); border-color: #f3d58a; }
.rpet-bg--castle .rpet-scene__deco { background:
	linear-gradient(90deg, transparent 0 6%, #f0c5d4 6% 10%, transparent 10% 90%, #f0c5d4 90% 94%, transparent 94%) top/100% 100% no-repeat,
	radial-gradient(circle at 50% 6%, #ffe27a 0 9px, transparent 10px); }
.rpet-swatch { display: block; width: 100%; height: 100%; border-radius: 12px; }

.rpet-bunny { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; position: relative; z-index: 1; border-radius: 28px; }
.rpet-frame {
	position: relative; width: min(62vw, 250px); aspect-ratio: 1 / 1; max-width: 100%;
	border-radius: 28px; overflow: hidden; background: #cdf3e0;
	box-shadow: 0 8px 0 rgba(90,58,70,.08), 0 0 0 5px rgba(255,255,255,.8);
	transition: transform .2s ease;
}
.rpet-bunny__img, .rpet-frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rpet-tint--kinako { filter: sepia(.4) saturate(1.45) hue-rotate(-12deg) brightness(.99); }
.rpet-tint--lop { filter: hue-rotate(205deg) saturate(.6) brightness(1.03); }
.rpet-frame.is-asleep::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,40,110,.28), rgba(40,40,110,.12)); pointer-events: none; }
.rpet-zzz { position: absolute; right: 12%; top: 10%; z-index: 2; font-weight: 900; color: #fff; font-size: 1.3rem; letter-spacing: .2em; text-shadow: 0 2px 0 rgba(60,50,120,.5); animation: rpet-zzz 2.4s ease-in-out infinite; }
@keyframes rpet-zzz { 0%, 100% { transform: translateY(0); opacity: .7; } 50% { transform: translateY(-6px); opacity: 1; } }
.rpet-frame.is-fresh { box-shadow: 0 8px 0 rgba(90,58,70,.08), 0 0 0 5px rgba(255,255,255,.9), 0 0 22px rgba(143,211,255,.8); }
.rpet-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, transparent 60%); background-size: 250% 100%; animation: rpet-shine 3s ease-in-out infinite; pointer-events: none; }
@keyframes rpet-shine { 0% { background-position: 120% 0; } 60%, 100% { background-position: -80% 0; } }
.rpet-frame.is-hop { animation: rpet-hop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes rpet-hop { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-14px) scale(1.03, .97); } 60% { transform: translateY(0) scale(.98, 1.03); } 100% { transform: none; } }
.rpet-frame.is-flash::before { content: ""; position: absolute; inset: 0; background: #fff; z-index: 3; animation: rpet-flash .5s ease-out forwards; }
@keyframes rpet-flash { from { opacity: .95; } to { opacity: 0; } }

/* アクセサリー（段ごとに頭の位置へ） */
.rpet-acc { position: absolute; z-index: 2; width: 22%; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); pointer-events: none; filter: drop-shadow(0 2px 0 rgba(90,58,70,.18)); }
.rpet-acc svg { display: block; width: 100%; height: auto; }
.rpet-acc--at1 { left: 36%; top: 30%; --r: -22deg; }
.rpet-acc--at2 { left: 58%; top: 23%; --r: 12deg; }
.rpet-acc--at3 { left: 56%; top: 31%; --r: 12deg; }
.rpet-acc--at4 { left: 63%; top: 21%; --r: 16deg; }
.rpet-acc--at5 { left: 76%; top: 40%; --r: 18deg; }
.rpet-acc--crown_flower { width: 34%; }
.rpet-acc--crown_flower.rpet-acc--at2 { left: 44%; top: 22%; --r: -4deg; }
.rpet-acc--crown_flower.rpet-acc--at3 { left: 46%; top: 30%; --r: -6deg; }
.rpet-acc--crown_flower.rpet-acc--at4 { left: 50%; top: 20%; --r: 0deg; }
.rpet-acc--crown_flower.rpet-acc--at5 { left: 50%; top: 40%; --r: 0deg; width: 30%; }
.rpet-acc--bell.rpet-acc--at4 { left: 50%; top: 58%; --r: 0deg; width: 16%; }

.rpet-say {
	position: relative; z-index: 1; margin: 14px 0 0; background: #fff; border: 2px solid var(--rp-line);
	border-radius: 18px; padding: 8px 14px; font-weight: 800; font-size: .92rem; line-height: 1.6; text-align: center; max-width: 92%;
	box-shadow: 0 3px 0 #f7d3e0;
}
.rpet-say::before { content: ""; position: absolute; left: 50%; top: -9px; width: 14px; height: 14px; background: #fff; border-left: 2px solid var(--rp-line); border-top: 2px solid var(--rp-line); transform: translateX(-50%) rotate(45deg); }
.rpet-photo { position: absolute; right: 10px; top: 10px; z-index: 2; appearance: none; border: 2px solid var(--rp-line); background: #fff; border-radius: 50%; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; box-shadow: 0 3px 0 #f3cfdc; padding: 0; }
.rpet-photo .rpet-ico { width: 30px; height: 30px; }
.rpet-photo:active { transform: translateY(2px); box-shadow: 0 1px 0 #f3cfdc; }

.rpet-fx { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.rpet-p { position: absolute; bottom: 30%; width: 26px; height: 26px; animation: rpet-up 1.3s ease-out forwards; opacity: 0; }
.rpet-p .rpet-ico { width: 26px; height: 26px; }
.rpet-p--pet::before, .rpet-p--play::before { content: ""; position: absolute; inset: 4px; background: #ff8fb4; clip-path: path("M9 16 C-4 7 3 -2 9 4 C15 -2 22 7 9 16 Z"); }
.rpet-p--play::before { background: #ffd35c; clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 36%); }
.rpet-p--bath { border-radius: 50%; border: 2px solid #8fc3ff; background: radial-gradient(circle at 35% 35%, #fff 0 20%, rgba(191,233,255,.6) 21%); }
.rpet-p--sleep { font-weight: 900; color: #7a73b3; font-size: 1.2rem; }
@keyframes rpet-up { 0% { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-120px) scale(1.1); opacity: 0; } }

/* ---------- きもち ---------- */
.rpet-needs { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 12px 0 0; }
.rpet-need { display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid var(--rp-line); border-radius: 16px; padding: 6px 10px; }
.rpet-need .rpet-ico { width: 30px; height: 30px; }
.rpet-need__body { flex: 1; min-width: 0; }
.rpet-need__top { display: flex; justify-content: space-between; gap: 6px; font-size: .78rem; font-weight: 800; }
.rpet-need__v { color: var(--rp-sub); }
.rpet-need__bar { height: 10px; border-radius: 999px; background: #fdeef5; overflow: hidden; margin-top: 4px; }
.rpet-need__bar > span { display: block; height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.22,1,.36,1); }
.rpet-need--tummy .rpet-need__bar > span { background: linear-gradient(90deg, #ffcf8f, #ff9f68); }
.rpet-need--mood .rpet-need__bar > span { background: linear-gradient(90deg, #ffc0dc, #ff7fb2); }
.rpet-need--sleepy .rpet-need__bar > span { background: linear-gradient(90deg, #cfc6ff, #8f84e0); }
.rpet-need.is-low { border-color: #ffc27a; background: #fffaf0; }
.rpet-need.is-low .rpet-need__v { color: #b0641a; }

/* ---------- お世話ボタン ---------- */
.rpet-cares { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.rpet-care {
	position: relative; appearance: none; font: inherit; color: var(--rp-ink); cursor: pointer;
	display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 92px; padding: 10px 4px 8px;
	border-radius: 18px; border: 2px solid var(--rp-line); background: #fff; box-shadow: 0 4px 0 #f3cfdc;
	transition: transform .12s ease, box-shadow .12s ease;
}
.rpet-care .rpet-ico { width: 40px; height: 40px; }
.rpet-care:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #f3cfdc; }
.rpet-care__l { font-weight: 900; font-size: .9rem; line-height: 1.2; }
.rpet-care__s { font-size: .68rem; color: var(--rp-sub); font-weight: 700; min-height: 1em; line-height: 1.2; text-align: center; }
.rpet-care__tag { position: absolute; top: -8px; right: -4px; background: #ffe27a; color: #7a4e12; font-size: .6rem; font-weight: 900; border-radius: 999px; padding: 2px 6px; border: 1.5px solid #e0b34a; white-space: nowrap; }
.rpet-care:disabled { opacity: .55; cursor: default; box-shadow: 0 2px 0 #f3cfdc; }
.rpet-care--feed { background: linear-gradient(180deg, #fff9f0, #ffeeda); border-color: #f4d6ad; }
.rpet-care--pet { background: linear-gradient(180deg, #fff4f8, #ffe3ee); }
.rpet-care--play { background: linear-gradient(180deg, #f3fcf7, #dff5e9); border-color: #bfe6cf; }
.rpet-care--bath { background: linear-gradient(180deg, #f3faff, #def0ff); border-color: #bcdcf7; }
.rpet-care--sleep, .rpet-care--wake { background: linear-gradient(180deg, #f6f4ff, #e6e1ff); border-color: #d1c8f5; }
.rpet-care--game { background: linear-gradient(180deg, #fffbea, #fff0c2); border-color: #f0d98a; }
.rpet-kind { margin: 10px 0 0; text-align: center; font-size: .76rem; color: var(--rp-sub); line-height: 1.6; }

/* ---------- りんかのひとこと ---------- */
.rpet-rinka { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; background: #fff; border: 2px solid var(--rp-line); border-radius: 20px; padding: 10px 12px; }
.rpet-rinka__face { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid #ffd6e8; background: #ffecf4; }
.rpet-rinka__who { margin: 0; font-size: .72rem; font-weight: 900; color: var(--rp-pink-d); }
.rpet-rinka__text { margin: 2px 0 0; font-size: .92rem; line-height: 1.7; }

.rpet-grad { margin: 12px 0 0; background: #fffaf0; border: 2px solid #f3d58a; border-radius: 20px; padding: 12px; text-align: center; }
.rpet-grad p { margin: 6px 0 10px; font-size: .88rem; line-height: 1.7; }

/* ---------- タブ ---------- */
.rpet-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 16px 0 0; }
.rpet-tab { appearance: none; font: inherit; color: var(--rp-sub); border: 2px solid var(--rp-line); background: #fff; border-radius: 14px 14px 6px 6px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 800; cursor: pointer; min-height: 52px; }
.rpet-tab.is-on { color: var(--rp-ink); background: var(--rp-soft); border-color: #ffc2d8; }
.rpet-panel { background: var(--rp-soft); border: 2px solid #ffd6e6; border-radius: 6px 6px 20px 20px; padding: 12px; min-height: 120px; }
.rpet-empty { color: var(--rp-sub); font-size: .82rem; text-align: center; line-height: 1.7; margin: 8px 0; }
.rpet-h3 { font-size: .9rem; font-weight: 900; margin: 6px 0 8px; }

.rpet-diary { background: #fff; border-radius: 14px; padding: 10px 12px; margin: 0 0 8px; border: 1.5px solid var(--rp-line); }
.rpet-diary h3 { margin: 0; font-size: .92rem; font-weight: 900; color: var(--rp-pink-d); }
.rpet-diary__mood { margin: 4px 0 0; font-size: .86rem; }
.rpet-diary__c { margin: 2px 0 0; font-size: .78rem; color: var(--rp-sub); }
.rpet-diary ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: .8rem; }
.rpet-diary li { padding: 2px 0; }
.rpet-diary time { display: inline-block; min-width: 3.2em; color: var(--rp-sub); font-weight: 700; }

.rpet-album { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rpet-pic { margin: 0; border-radius: 14px; padding: 6px; border: 1.5px solid var(--rp-line); background: #fff; }
.rpet-pic__in { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; }
.rpet-pic__in img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rpet-pic figcaption { font-size: .66rem; color: var(--rp-sub); margin-top: 4px; text-align: center; line-height: 1.3; word-break: break-all; }
.rpet-pic figcaption b { color: var(--rp-pink-d); }
.rpet-grads { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rpet-grads li { background: #fff; border-radius: 999px; padding: 4px 10px; font-size: .8rem; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.rpet-grads small { color: var(--rp-sub); font-weight: 600; }

.rpet-wear { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.rpet-wearbtn { appearance: none; font: inherit; color: var(--rp-ink); border: 2px solid var(--rp-line); background: #fff; border-radius: 14px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; min-height: 88px; }
.rpet-wearbtn.is-on { border-color: var(--rp-pink); box-shadow: 0 0 0 3px #ffd6e6; }
.rpet-wearbtn:disabled { cursor: default; background: #faf6f8; }
.rpet-wearbtn__pic { width: 44px; height: 44px; display: grid; place-items: center; }
.rpet-wearbtn__pic svg { width: 40px; height: auto; }
.rpet-wearbtn__pic .rpet-ico { width: 26px; height: 26px; opacity: .8; }
.rpet-wearbtn__l { font-size: .7rem; font-weight: 800; text-align: center; line-height: 1.25; }
.rpet-wearbtn__s { font-size: .6rem; color: var(--rp-sub); text-align: center; line-height: 1.25; }
.rpet-none { width: 26px; height: 26px; border-radius: 50%; border: 2px dashed #e0bccb; }

.rpet-titles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.rpet-title { appearance: none; font: inherit; color: var(--rp-ink); border: 2px solid var(--rp-line); background: #fff; border-radius: 14px; padding: 8px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; cursor: pointer; min-height: 52px; }
.rpet-title .rpet-ico { grid-row: 1 / 3; }
.rpet-title__l { font-size: .8rem; font-weight: 900; }
.rpet-title__s { font-size: .64rem; color: var(--rp-sub); }
.rpet-title.is-on { border-color: #e0b34a; background: #fffaf0; }
.rpet-title:disabled { cursor: default; background: #faf6f8; }

.rpet-stats { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.rpet-stats div { background: #fff; border-radius: 12px; padding: 8px 10px; border: 1.5px solid var(--rp-line); }
.rpet-stats dt { font-size: .68rem; color: var(--rp-sub); font-weight: 700; }
.rpet-stats dd { margin: 2px 0 0; font-size: 1.05rem; font-weight: 900; }

/* ---------- 名前フォーム ---------- */
.rpet--hello .rpet-scene { min-height: 0; }
.rpet-nameform { margin: 12px 0 0; background: #fff; border: 2px solid var(--rp-line); border-radius: 20px; padding: 14px; text-align: center; }
.rpet-nameform__l { font-weight: 900; display: block; margin-bottom: 8px; }
.rpet-nameform__row { display: flex; gap: 8px; }
.rpet-nameform input { flex: 1; min-width: 0; font: inherit; font-size: 16px; border: 2px solid #f3c3d4; border-radius: 999px; padding: 10px 16px; color: var(--rp-ink); background: #fff; }
.rpet-nameform input:focus { outline: none; border-color: var(--rp-pink); box-shadow: 0 0 0 4px rgba(255,127,168,.18); }
.rpet-nameform__hint { font-size: .74rem; color: var(--rp-sub); margin: 8px 0 0; }

/* ---------- モーダル・ミニあそび ---------- */
.rpet-modal, .rpet-game { position: fixed; inset: 0; z-index: 100000; background: rgba(60,40,52,.45); display: flex; align-items: center; justify-content: center; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.rpet-modal__card { background: #fff; border-radius: 22px; padding: 18px; max-width: 420px; width: 100%; text-align: center; color: #5a3a46; font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif; line-height: 1.7; }
.rpet-modal__t { font-weight: 900; font-size: 1.05rem; margin: 0 0 6px; }
.rpet-modal__row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
html.rpet-noscroll, html.rpet-noscroll body { overflow: hidden; }
.rpet-game__card { position: relative; background: linear-gradient(180deg, #e8fbf1, #cdeedc); border-radius: 22px; width: min(100%, 480px); height: min(100%, 640px); display: flex; flex-direction: column; overflow: hidden; border: 3px solid #fff; color: #5a3a46; font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif; }
.rpet-game__hud { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: rgba(255,255,255,.75); font-weight: 900; }
.rpet-game__hud span { display: flex; align-items: center; gap: 4px; font-size: 1.05rem; min-width: 3.5em; }
.rpet-game__hud #rpg-combo { color: #d94f82; font-size: .82rem; justify-content: center; flex: 1; }
.rpet-game__x { appearance: none; border: 2px solid #fbe0ea; background: #fff; border-radius: 50%; width: 40px; height: 40px; font-size: 1.3rem; line-height: 1; color: #5a3a46; cursor: pointer; flex: none; }
.rpet-game canvas { flex: 1; width: 100%; min-height: 0; display: block; touch-action: none; cursor: grab; }
.rpet-game__help { margin: 0; padding: 6px 10px 10px; font-size: .74rem; text-align: center; background: rgba(255,255,255,.7); line-height: 1.5; }
.rpet-game__msg { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); display: none; background: rgba(255,255,255,.95); border-radius: 22px; padding: 16px 24px; font-size: 2.2rem; font-weight: 900; text-align: center; box-shadow: 0 6px 0 rgba(90,58,70,.12); min-width: 60%; }
.rpet-game__msg.is-on { display: block; }
.rpet-game__msg.is-result { font-size: .95rem; }
.rpet-game__big { font-size: 2.6rem; margin: 0; color: #d94f82; }

/* ---------- 横持ち・PC ---------- */
@media (min-width: 560px) {
	.rpet-needs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.rpet-need { flex-direction: column; align-items: stretch; text-align: center; }
	.rpet-need .rpet-ico { margin: 0 auto; }
	.rpet-cares { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.rpet-album { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.rpet-titles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.rpet-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (orientation: landscape) and (max-height: 520px) {
	.rpet-frame { width: min(34vw, 190px); }
	.rpet-scene { min-height: 0; }
	.rinka-fs-pet.rpet-app { max-width: 760px; }
	.rpet-game__card { height: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.rpet-zzz, .rpet-shine, .rpet-frame.is-hop, .rpet-p { animation: none !important; }
	.rpet-exp > span, .rpet-need__bar > span, .rpet-btn, .rpet-care { transition: none !important; }
}
