/* もちもちペット — やわらかい・ふわふわのトークン */
:root {
  --milk: #fffaf3;
  --milk-2: #fff0e6;
  --milk-3: #fde3e6;
  --ichigo: #ff8fb1;
  --ichigo-2: #ffb8cc;
  --ichigo-ink: #b02f63;
  --ichigo-deep: #e2638c;
  --ramune: #9ee3f5;
  --ramune-2: #c9f0fa;
  --ramune-ink: #17698a;
  --cream: #ffe9b8;
  --ink: #4b2b3a;
  --ink-2: #6e4a5b;
  --g-food: #ff8a5c;
  --g-energy: #e9a419;
  --g-mood: #f0507f;
  --g-clean: #2fa6cf;
  --night: #2d2a52;
  --f-head: "Hachi Maru Pop", "M PLUS Rounded 1c", system-ui, sans-serif;
  --f-body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --f-num: "Fredoka", "M PLUS Rounded 1c", system-ui, sans-serif;
  --r-card: 28px;
  --r-pill: 999px;
  --blob: 48% 52% 46% 54% / 58% 56% 44% 42%;
  --shadow: 0 6px 0 rgba(226, 99, 140, .18), 0 14px 28px rgba(176, 47, 99, .12);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabh: 66px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: #ffe3ec radial-gradient(circle at 20% 20%, #ffffff 0 3px, transparent 4px) 0 0 / 34px 34px, linear-gradient(160deg, #ffe3ec, #dff4fb);
  overflow: hidden;
  line-break: strict;
  -webkit-tap-highlight-color: transparent;
}
button, a, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 22px; height: 22px; flex: none; }
.num { font-family: var(--f-num); font-weight: 600; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-feature-settings: "palt"; word-break: keep-all; overflow-wrap: normal; font-weight: 400; }

.app {
  position: fixed;
  inset: 0;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--milk);
}
@media (min-width: 600px) { .app { box-shadow: 0 30px 80px rgba(176, 47, 99, .22); } }

.view { position: absolute; inset: 0 0 calc(var(--tabh) + var(--sab)) 0; display: none; flex-direction: column; overflow: hidden; }
.view.is-on { display: flex; }
.view.is-in { animation: popIn 380ms var(--spring) both; }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.view--letter { inset: 0; z-index: 5; }
.scroller { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 28px; }

/* ===== ボタン ===== */
.soft-btn {
  --b1: #fff;
  --b2: #fff;
  --sh: rgba(176, 47, 99, .25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 22px;
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: 16px;
  background: linear-gradient(180deg, var(--b1), var(--b2));
  box-shadow: 0 5px 0 var(--sh), inset 0 2px 0 rgba(255, 255, 255, .6);
  transition: transform 260ms var(--spring), box-shadow 120ms;
  touch-action: manipulation;
  user-select: none;
}
.soft-btn span { white-space: nowrap; }
.soft-btn:active { transform: translateY(4px) scale(1.03, .9); box-shadow: 0 1px 0 var(--sh); transition-duration: 70ms; }
.soft-btn--ichigo { --b1: #ffc2d4; --b2: var(--ichigo); --sh: var(--ichigo-deep); color: var(--ink); }
.soft-btn--ramune { --b1: #d9f5fc; --b2: var(--ramune); --sh: #58b9d8; color: var(--ink); }
.soft-btn--night { --b1: #fff3c9; --b2: #ffd973; --sh: #c79a2b; color: var(--ink); }
.soft-btn--danger { --b1: #e2557b; --b2: #c3365f; --sh: #7f1d3c; color: #fff; }
.soft-btn--plain { --b1: #fff; --b2: var(--milk-2); --sh: #e9c6cf; }
.soft-btn--wide { width: 100%; }
.soft-btn--wide span { white-space: normal; word-break: keep-all; text-align: center; line-height: 1.4; }
.soft-btn--s { min-height: 44px; padding: 6px 16px; font-size: 14px; }
.round-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 0 rgba(176, 47, 99, .18);
  color: var(--ink);
  transition: transform 260ms var(--spring);
  flex: none;
}
.round-btn:active { transform: scale(.86); transition-duration: 60ms; }
.link { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; font-weight: 800; color: var(--ichigo-ink); text-decoration: underline; text-underline-offset: 4px; }

/* ===== ホーム ===== */
.view--home { background: var(--milk); }
.plate-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(var(--sat) + 10px) 14px 4px; }
.nameplate {
  flex: 1;
  min-width: 0;
  padding: 2px 16px 4px;
  background: #fff;
  border-radius: var(--blob);
  box-shadow: var(--shadow);
}
.nameplate__name { font-family: var(--f-head); font-size: 23px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nameplate__age { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ichigo-ink); white-space: nowrap; }
.nameplate__age .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ichigo); }
.clock { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--ramune-2); color: var(--ramune-ink); font-family: var(--f-num); font-weight: 600; font-size: 15px; white-space: nowrap; }
.clock svg { width: 16px; height: 16px; }
.clock.is-fast { background: var(--ramune-ink); color: #fff; }

.gauges { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 10px 6px; }
.gauge { display: grid; justify-items: center; gap: 0; }
.gauge__ring {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--c);
  background: conic-gradient(var(--c) calc(var(--v) * 360deg), #f6dfe6 0);
  transition: --v 600ms;
}
.gauge__ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.gauge__ring svg { position: relative; width: 20px; height: 20px; }
.gauge__k { font-size: 11px; font-weight: 800; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }
.gauge__v { font-size: 15px; line-height: 1.1; }
.gauge.is-low .gauge__ring { animation: lowPulse 1.2s ease-in-out infinite; }
.gauge.is-low .gauge__v { color: #b3123f; }
@keyframes lowPulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(240, 80, 127, .25); } }

.room {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 2px 10px 0;
  border-radius: 34px;
  overflow: hidden;
  background: #f9d9cf url(/app-development/apps/a017/img/room.webp) center 72% / cover no-repeat;
  box-shadow: inset 0 0 0 4px #fff, 0 10px 24px rgba(176, 47, 99, .14);
  touch-action: none;
}
.pet-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.bubble {
  position: absolute;
  left: 50%;
  top: 14px;
  max-width: 78%;
  padding: 8px 16px;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  word-break: keep-all;
  box-shadow: 0 4px 0 rgba(176, 47, 99, .15);
  transform: translate(-50%, 6px) scale(.9);
  opacity: 0;
  transition: opacity 200ms, transform 300ms var(--spring);
  pointer-events: none;
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 16px; background: #fff; border-radius: 0 0 6px 0; transform: translateX(-50%) rotate(45deg); }
.bubble.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.pethint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.pethint svg { width: 18px; height: 18px; color: var(--ichigo-ink); animation: wave 1.6s ease-in-out infinite; }
@keyframes wave { 50% { transform: rotate(-18deg) translateX(-3px); } }
.pethint.is-off { display: none; }
.sleepbar, .bathbar {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 26px;
}
.sleepbar { background: #2d2a52; color: #fff; }
.bathbar { background: #fff; color: var(--ink); }
.sleepbar.is-on, .bathbar.is-on { display: flex; }
.sleepbar__t, .bathbar__t { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; line-height: 1.45; word-break: keep-all; }
.bathbar__t b { font-size: 18px; color: var(--ramune-ink); margin-left: 4px; }
.sleepbar__t svg { color: #ffd973; }

.grow { flex: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 20px 2px; }
.grow__k { font-size: 13px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.grow__bar { height: 10px; border-radius: 6px; background: var(--milk-3); overflow: hidden; }
.grow__bar i { display: block; height: 100%; width: 40%; border-radius: 6px; background: repeating-linear-gradient(-45deg, var(--ichigo) 0 8px, var(--ichigo-2) 8px 16px); transition: width 600ms; }
.grow__v { font-size: 15px; white-space: nowrap; }

.actions { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 18px 8px; }
.act { display: grid; justify-items: center; gap: 2px; min-height: 76px; touch-action: manipulation; }
.act__blob {
  width: 58px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--blob);
  color: var(--ink);
  transition: transform 300ms var(--spring), border-radius 600ms;
  box-shadow: 0 5px 0 var(--sh), inset 0 3px 0 rgba(255, 255, 255, .6);
}
.act__blob svg { width: 28px; height: 28px; }
.act--food .act__blob { background: #ffd2bf; --sh: #f19b7a; }
.act--bath .act__blob { background: var(--ramune); --sh: #5cbad8; border-radius: 54% 46% 52% 48% / 46% 60% 40% 54%; }
.act--sleep .act__blob { background: #ffe39a; --sh: #d8aa3a; border-radius: 44% 56% 58% 42% / 60% 48% 52% 40%; }
.act:active .act__blob { transform: scale(1.12, .82); transition-duration: 80ms; }
.act__t { font-weight: 800; font-size: 14px; }
.act:disabled { opacity: .5; }
.act.is-want .act__blob { animation: want 1.4s ease-in-out infinite; }
@keyframes want { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px) scale(1.04, .96); } 60% { transform: translateY(0) scale(.98, 1.04); } }

.tray {
  position: absolute;
  left: 10px; right: 10px; bottom: 8px;
  z-index: 6;
  padding: 12px 14px 14px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 -6px 30px rgba(176, 47, 99, .2);
  transform: translateY(120%);
  transition: transform 340ms var(--spring);
}
.tray.is-on { transform: none; }
.tray__head { display: flex; align-items: center; justify-content: space-between; }
.tray__head h2 { font-family: var(--f-head); font-size: 20px; }
.round-btn--sm { width: 44px; height: 44px; background: var(--milk-2); box-shadow: none; }
.tray__hint { font-size: 13px; font-weight: 700; color: var(--ink-2); word-break: keep-all; }
.foods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.food {
  display: grid;
  justify-items: center;
  padding: 6px 4px 8px;
  border-radius: 22px;
  background: var(--milk);
  border: 2px solid var(--milk-3);
  touch-action: none;
  transition: transform 260ms var(--spring);
}
.food img { width: 62px; height: 62px; pointer-events: none; }
.food:active { transform: scale(.94); }
.food__n { font-weight: 800; font-size: 15px; line-height: 1.4; }
.food__e { font-size: 12px; font-weight: 700; color: var(--ichigo-ink); white-space: nowrap; }
.drag-food { position: fixed; z-index: 70; width: 70px; height: 70px; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(176, 47, 99, .25)); transform: translate(-50%, -60%); }

/* ===== 共通の見出し ===== */
.title-bar { flex: none; padding: calc(var(--sat) + 14px) 18px 10px; background: var(--milk); }
.title-bar h1 { font-family: var(--f-head); font-size: 28px; line-height: 1.3; }
.title-bar__sub { font-weight: 700; font-size: 14px; color: var(--ichigo-ink); word-break: keep-all; }
.title-bar__sub b { font-size: 18px; }
.sec { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-family: var(--f-head); font-size: 19px; line-height: 1.4; }
.sec::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: var(--blob); background: var(--ichigo); }
.note { font-size: 14px; color: var(--ink-2); margin-top: 8px; word-break: normal; }
.note--in { margin-top: 10px; }
.card { background: #fff; border-radius: var(--r-card); padding: 14px; box-shadow: var(--shadow); }

/* ===== おせわ ===== */
.view--care, .view--album, .view--settings { background: var(--milk); }
.need { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--r-card); background: linear-gradient(120deg, #ffe0ea, #e3f7fd); }
.need__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--blob); background: #fff; color: var(--ichigo-ink); }
.need__k { font-size: 12px; font-weight: 800; color: var(--ichigo-ink); }
.need__t { font-weight: 800; font-size: 15px; line-height: 1.5; word-break: keep-all; }
.bars { list-style: none; display: grid; gap: 10px; padding: 14px; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); }
.bars li { display: grid; grid-template-columns: 28px 64px 1fr 44px; align-items: center; gap: 8px; }
.bars svg { width: 22px; height: 22px; }
.bars__k { font-weight: 800; font-size: 14px; white-space: nowrap; }
.bars__track { height: 14px; border-radius: 8px; background: #f7e6eb; overflow: hidden; }
.bars__track i { display: block; height: 100%; border-radius: 8px; transition: width 500ms; }
.bars__v { text-align: right; font-size: 16px; white-space: nowrap; }
.lean { display: grid; grid-template-columns: 1fr 108px; gap: 12px; align-items: center; padding: 14px; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); }
.lean__bars { list-style: none; display: grid; gap: 8px; }
.lean__bars li { display: grid; grid-template-columns: 56px 1fr 26px; gap: 6px; align-items: center; font-size: 13px; font-weight: 800; }
.lean__bars .t { height: 10px; border-radius: 6px; background: #f3e4ea; overflow: hidden; }
.lean__bars .t i { display: block; height: 100%; border-radius: 6px; }
.lean__bars b { text-align: right; font-size: 14px; }
.lean__guess { display: grid; justify-items: center; text-align: center; padding: 8px 4px; border-radius: 22px; background: var(--milk-2); }
.lean__guess img { width: 72px; height: 66px; object-fit: contain; filter: brightness(0) opacity(.28); }
.lean__guess img.is-known { filter: none; }
.lean__k { font-size: 12px; font-weight: 800; color: var(--ink-2); margin-top: 2px; }
.lean__v { font-family: var(--f-head); font-size: 15px; line-height: 1.35; word-break: keep-all; }
.diary { list-style: none; position: relative; padding-left: 4px; }
.diary::before { content: ""; position: absolute; left: 58px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: repeating-linear-gradient(var(--ichigo-2) 0 6px, transparent 6px 11px); }
.diary li { position: relative; display: grid; grid-template-columns: 48px 26px 1fr; gap: 6px; align-items: start; padding: 6px 0; }
.diary__t { font-family: var(--f-num); font-weight: 600; font-size: 14px; color: var(--ink-2); text-align: right; padding-top: 2px; white-space: nowrap; }
.diary__dot { position: relative; z-index: 1; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--ichigo-2); color: var(--ichigo-ink); }
.diary__dot svg { width: 15px; height: 15px; }
.diary__x { font-weight: 700; font-size: 14px; line-height: 1.6; padding-top: 2px; word-break: normal; }
.diary__day { padding: 10px 0 4px 64px !important; display: block !important; font-weight: 800; font-size: 13px; color: var(--ichigo-ink); }
.empty { display: grid; justify-items: center; gap: 6px; padding: 22px; text-align: center; border-radius: var(--r-card); background: #fff; }
.empty svg { width: 36px; height: 36px; color: var(--ichigo); }
.empty p { font-weight: 700; word-break: keep-all; }

/* ===== アルバム ===== */
.forms { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.form-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px 10px 14px;
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}
.form-card:first-child { grid-column: span 2; grid-template-columns: 120px 1fr; justify-items: start; text-align: left; align-items: center; gap: 12px; }
.form-card img { width: 100px; height: 92px; object-fit: contain; }
.form-card:first-child img { width: 120px; height: 110px; }
.form-card.is-unknown img { filter: brightness(0) opacity(.18); }
.form-card__n { font-family: var(--f-head); font-size: 17px; line-height: 1.35; word-break: keep-all; }
.form-card__d { font-size: 13px; font-weight: 700; color: var(--ink-2); line-height: 1.6; word-break: normal; }
.form-card__tag { position: absolute; top: 10px; right: 10px; padding: 0 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; background: var(--ramune-2); color: var(--ramune-ink); white-space: nowrap; }
.form-card.is-unknown .form-card__tag { background: var(--milk-2); color: var(--ink-2); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; border-radius: var(--r-card); background: #fff url(/app-development/apps/a017/img/album.webp) center / cover; }
.step { display: grid; justify-items: center; padding: 8px 4px; border-radius: 20px; background: rgba(255, 255, 255, .94); text-align: center; }
.step img { width: 64px; height: 58px; object-fit: contain; }
.step.is-future img { filter: brightness(0) opacity(.18); }
.step__k { font-weight: 800; font-size: 13px; line-height: 1.5; }
.step__d { font-family: var(--f-num); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.view--album .soft-btn--wide { margin-top: 16px; }
.past { list-style: none; display: grid; gap: 8px; }
.past li { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 22px; background: #fff; }
.past img { width: 52px; height: 48px; object-fit: contain; }
.past__n { font-weight: 800; line-height: 1.45; word-break: keep-all; }
.past__n small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.past__d { font-family: var(--f-num); font-size: 13px; color: var(--ink-2); white-space: nowrap; }

/* ===== 設定 ===== */
.lbl { display: block; font-weight: 800; }
.lbl small { margin-left: 8px; font-size: 12px; color: var(--ink-2); }
.name-row { display: flex; gap: 8px; margin-top: 6px; }
.input { flex: 1; min-width: 0; min-height: 48px; padding: 8px 14px; border-radius: 18px; border: 2px solid var(--ichigo-2); background: var(--milk); font-weight: 800; font-size: 16px; }
.input:focus { outline: 3px solid var(--ramune); outline-offset: 1px; }
.err { min-height: 0; font-size: 13px; font-weight: 800; color: #b3123f; }
.err:empty { display: none; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--milk-2); }
.seg button { min-height: 44px; border-radius: var(--r-pill); font-weight: 800; transition: background 200ms, transform 250ms var(--spring); }
.seg button[aria-pressed="true"] { background: var(--ichigo); box-shadow: 0 3px 0 var(--ichigo-deep); }
.seg button:active { transform: scale(.94); }
.list { padding: 4px 14px; }
.li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; border-bottom: 2px dotted var(--milk-3); }
.li:last-child { border-bottom: 0; }
.li__k { font-weight: 800; }
.li__k small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 700; line-height: 1.4; }
.li--btn { width: 100%; justify-content: flex-start; color: #b3123f; font-weight: 800; }
.toggle { position: relative; width: 60px; height: 36px; flex: none; border-radius: var(--r-pill); background: #e9d3da; transition: background 200ms; }
.toggle i { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(75, 43, 58, .2); transition: transform 320ms var(--spring); }
.toggle[aria-checked="true"] { background: var(--ichigo-deep); }
.toggle[aria-checked="true"] i { transform: translateX(24px); }
.howto { list-style: none; display: grid; gap: 12px; }
.howto li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.howto__n { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--blob); background: var(--ramune-2); color: var(--ramune-ink); font-size: 15px; }
.howto p { font-size: 14px; word-break: normal; }
.howto b { display: block; font-weight: 800; font-size: 15px; }
.about { display: grid; gap: 12px; }
.about__head { display: flex; gap: 12px; align-items: center; }
.about__head img { width: 64px; height: 64px; border-radius: 16px; }
.about__name { font-family: var(--f-head); font-size: 20px; line-height: 1.3; }
.about__ver { font-size: 13px; color: var(--ink-2); }
.about__note { font-size: 14px; word-break: normal; }
.about__k { font-weight: 800; font-size: 14px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 2px 12px; border-radius: var(--r-pill); background: var(--milk-2); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* ===== 置き手紙 ===== */
.view--letter { background: #ffe7d9; }
.letter { padding: 0 0 calc(var(--sab) + 24px); }
.letter__pic { height: 46vh; min-height: 260px; background: #f7c9b7 url(/app-development/apps/a017/img/letter.webp) center 60% / cover no-repeat; }
.letter__paper {
  position: relative;
  margin: -40px 16px 0;
  padding: 22px 18px 18px;
  border-radius: 26px;
  background: #fffdf8 repeating-linear-gradient(transparent 0 31px, #f6dfe4 31px 32px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}
.letter__k { justify-self: start; padding: 0 12px; border-radius: var(--r-pill); background: var(--ichigo); font-weight: 800; font-size: 13px; }
.letter__h { font-family: var(--f-head); font-size: 24px; line-height: 1.4; }
.letter__body { font-size: 15px; line-height: 2.1; word-break: normal; }
.letter__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.letter__stats div { padding: 8px 12px; border-radius: 18px; background: var(--milk-2); }
.letter__stats dt { font-size: 12px; font-weight: 800; color: var(--ink-2); word-break: keep-all; }
.letter__stats dd { white-space: nowrap; font-weight: 700; }
.letter__stats b { font-size: 24px; }

/* ===== お祝い ===== */
.celebrate {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(75, 43, 58, .55);
}
.celebrate.is-on { display: flex; }
.celebrate__card {
  width: 100%;
  max-width: 340px;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px 18px 12px;
  border-radius: 36px;
  background: #fff radial-gradient(circle at 50% 30%, #ffe3ec, #fff 60%);
  text-align: center;
  animation: popIn 500ms var(--spring) both;
}
.celebrate__k { padding: 2px 14px; border-radius: var(--r-pill); background: var(--ramune-2); color: var(--ramune-ink); font-weight: 800; font-size: 14px; }
.celebrate__pic { width: 170px; height: 160px; display: grid; place-items: center; }
.celebrate__pic img { width: 160px; height: 150px; object-fit: contain; animation: reveal 900ms var(--spring) both; }
@keyframes reveal { 0% { transform: scale(.2) rotate(-20deg); filter: brightness(0) opacity(.2); } 50% { filter: brightness(0) opacity(.2); } 100% { transform: none; filter: none; } }
.celebrate__h { font-family: var(--f-head); font-size: 26px; line-height: 1.35; }
.celebrate__t { font-size: 14px; text-align: left; word-break: normal; }

/* ===== タブ ===== */
.tabs {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  height: calc(var(--tabh) + var(--sab));
  padding: 6px 10px calc(var(--sab) + 6px);
  background: #fff;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -6px 20px rgba(176, 47, 99, .1);
}
.tab { display: grid; justify-items: center; align-content: center; gap: 0; border-radius: 22px; font-size: 12px; font-weight: 800; color: var(--ink-2); transition: background 200ms, transform 260ms var(--spring); }
.tab svg { width: 24px; height: 24px; }
.tab:active { transform: scale(.9); }
.tab.is-on { background: var(--milk-3); color: var(--ichigo-ink); }
.tab.is-on svg { animation: tabBounce 500ms var(--spring); }
@keyframes tabBounce { 30% { transform: scale(1.2, .8); } 60% { transform: scale(.9, 1.15); } }
.app.is-letter .tabs { display: none; }

/* シート・トースト・スプラッシュ */
.veil { position: absolute; inset: 0; z-index: 50; background: rgba(75, 43, 58, .45); opacity: 0; pointer-events: none; transition: opacity 200ms; }
.veil.is-on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 51; display: grid; gap: 12px; padding: 10px 18px calc(var(--sab) + 18px); border-radius: 30px 30px 0 0; background: var(--milk); transform: translateY(110%); transition: transform 360ms var(--spring); }
.sheet.is-on { transform: none; }
.sheet__grab { justify-self: center; width: 44px; height: 5px; border-radius: 3px; background: #e7c3cf; }
.sheet h2 { font-family: var(--f-head); font-size: 21px; line-height: 1.4; }
.sheet p { word-break: normal; }
.toast { position: absolute; left: 50%; top: calc(var(--sat) + 14px); z-index: 60; max-width: calc(100% - 32px); padding: 8px 18px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-weight: 800; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; transition: opacity 200ms, transform 300ms var(--spring); word-break: keep-all; text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.splash { position: absolute; inset: 0; z-index: 80; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: linear-gradient(160deg, #ffe3ec, #dff4fb); }
.splash.is-on { display: flex; }
.splash img { width: 116px; height: 116px; border-radius: 28px; box-shadow: 0 12px 30px rgba(176, 47, 99, .25); animation: squishIn 700ms var(--spring); }
.splash p { font-family: var(--f-head); font-size: 24px; }
.splash.is-out { animation: fadeOut 260ms ease-in forwards; }
@keyframes squishIn { 0% { transform: scale(.3, .2); } 60% { transform: scale(1.1, .9); } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
.fallback { position: absolute; left: 16px; right: 16px; top: 40%; z-index: 99; padding: 16px; border-radius: 20px; background: #fff; font-weight: 800; text-align: center; }
.fallback--js { display: none; }
html:not(.ready) .fallback--js { display: block; opacity: 0; animation: late 0s 5s forwards; }
@keyframes late { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .view.is-in, .celebrate__card, .celebrate__pic img, .splash img, .tab.is-on svg, .act.is-want .act__blob, .gauge.is-low .gauge__ring, .pethint svg { animation: none !important; }
  .tray, .sheet, .toast, .bubble { transition: none; }
}
@media (max-height: 700px) {
  .gauge__ring { width: 42px; height: 42px; }
  .act { min-height: 66px; }
  .act__blob { width: 50px; height: 46px; }
}
