/* ひよりとしんやの水族館日記 — 見本（最終版CSS）の色・寸法を引き継いだ本番用スタイル */
:root {
  --bg: #edf6fd;          /* 背景：淡い青 */
  --soft: #e0effa;        /* カード・選択状態：背景より少し濃い淡い青 */
  --soft2: #d7eafa;
  --line: #d2e4f2;
  --card: #ffffff;
  --text: #244c54;
  --sub: #5a7b85;
  --accent: #438397;      /* 主要ボタン：青緑 */
  --accent-dark: #356b83;
  --heart: #c64e63;       /* ハート：赤系 */
  --star: #ca9a39;        /* 星：金色 */
  --star-off: #c3d8d4;
  --draft-bg: #f5efdf; --draft-text: #6e5a2f;
  --danger: #b4344b;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --kb: 0px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 15px; line-height: 1.65; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #6bb3c9; outline-offset: 2px; }
img { max-width: 100%; }
code { background: var(--soft); padding: 1px 5px; border-radius: 6px; }

/* ヘッダー */
.app-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  max-width: 560px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 6px; min-width: 0; }
.title-fish { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.app-header h1 { margin: 0; font-weight: 600; white-space: nowrap; letter-spacing: 0; font-size: clamp(13px, 4.1vw, 17px); overflow: hidden; }
.avatar { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; border: 2px solid #fff; background: var(--soft2); color: #42758c; font-weight: 600; padding: 0; }

main { max-width: 560px; margin: 0 auto; padding: 6px max(18px, env(safe-area-inset-left)) 28px max(18px, env(safe-area-inset-right)); min-height: 60dvh; }
body.has-nav main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 28px); }
h2 { font-size: 23px; line-height: 1.45; font-weight: 600; margin: 6px 0 12px; letter-spacing: .03em; }
h3 { font-size: 16px; font-weight: 600; margin: 4px 0; }
h3.mt { margin-top: 24px; }
p { margin: 8px 0; }
small { font-size: 12px; color: var(--sub); letter-spacing: .03em; }
.sub { font-size: 13px; color: var(--sub); }
.note { font-size: 12px; color: var(--sub); text-align: center; margin: 18px 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row.two > * { flex: 1; min-width: 0; }
.topline { font-size: 12px; color: #527779; letter-spacing: .05em; }

/* ボタン */
.primary { border: 0; border-radius: 16px; background: var(--accent); color: #fff; padding: 12px 18px; min-height: 48px; font-weight: 600; }
.primary:active { background: var(--accent-dark); }
.secondary { border: 1px solid #b4d0df; background: #fff; color: #3a6f80; border-radius: 16px; padding: 11px 15px; min-height: 48px; font-weight: 600; }
.danger-btn { border: 0; border-radius: 16px; background: var(--danger); color: #fff; padding: 12px 18px; min-height: 48px; font-weight: 600; }
.wide { width: 100%; }
.add { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 20px; font-size: 16px; }
.textbutton { border: 0; background: none; color: #3f7484; padding: 8px 0; font-size: 14px; min-height: 40px; text-align: left; display: block; }
.textbutton.small { font-size: 12px; min-height: 32px; padding: 4px 0; display: inline-block; }
.textbutton.danger { color: var(--danger); }
.back { margin: 0 0 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.chip { border: 1px solid var(--line); border-radius: 20px; background: #fff; color: #4f7280; padding: 8px 13px; font-size: 13px; min-height: 40px; }
.chip[aria-pressed=true] { background: var(--soft2); border-color: #a6c8e1; color: var(--accent-dark); font-weight: 600; }
.chip.heart { color: var(--heart); flex-shrink: 0; }
.chip.heart[aria-pressed=true] { color: #c33e56; background: #fce9ed; border-color: #edc0c9; }
.like { color: var(--heart); display: inline-block; }
.like[aria-pressed=true] { color: #c33e56; font-weight: 600; }

/* 入力 */
.field { display: block; margin: 14px 0; color: #46696e; font-size: 13px; }
input, textarea, select {
  display: block; width: 100%; min-width: 0; border: 1px solid #c9dceb; background: #fff; color: var(--text);
  border-radius: 12px; padding: 11px; margin-top: 6px; font-size: 16px; /* 16px未満だとiPhoneで自動ズームする */
}
input[type=date] { min-height: 46px; -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; min-height: 120px; }
textarea.short { min-height: 70px; }
.fixed { display: block; margin-top: 6px; padding: 11px; border-radius: 12px; background: var(--soft); font-size: 15px; }
.alert { background: #fbe9ec; color: #8f2438; border-radius: 12px; padding: 10px 12px; font-size: 13px; white-space: pre-line; }

/* 思い出カード */
.memory { background: var(--card); border: 1px solid #e0eaf2; border-radius: 20px; overflow: hidden; margin-bottom: 16px; }
.cover { position: relative; display: block; width: 100%; height: 200px; border: 0; padding: 0; overflow: hidden;
  background: linear-gradient(150deg, #bfe0f0, #7fb7cf 55%, #4d8aa6); }
.cover .cover-fish { position: absolute; right: 18px; bottom: 14px; width: 70px; opacity: .35; filter: brightness(3); }
.cover.real { background: var(--soft); }
.cover .ph, .cover .ph img { width: 100%; height: 100%; }
.cover .ph img { object-fit: cover; }
.tag { position: absolute; top: 12px; left: 12px; background: #f7fbfee8; color: #3e6a78; padding: 4px 10px; border-radius: 20px; font-size: 12px; z-index: 1; }
.memory-body { padding: 14px 16px 10px; }
.memory-title { border: 0; background: transparent; text-align: left; padding: 2px 0; display: block; width: 100%; }
.memory-title h3 { font-size: 18px; }
.draft-flag { font-size: 13px; color: var(--draft-text); background: var(--draft-bg); padding: 9px 11px; border-radius: 10px; margin: 10px 0 2px; }
.draft-mini { color: var(--draft-text); }
.empty { text-align: center; padding: 26px 0 18px; }
.empty-art { width: 150px; height: 175px; object-fit: contain; display: block; margin: 0 auto 16px; }
.empty p { color: var(--sub); font-size: 14px; }

/* 写真 */
.ph { position: relative; display: block; background: var(--soft); overflow: hidden; }
.ph img { display: block; width: 100%; height: auto; }
.ph .ph-msg { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; text-align: center; font-size: 12px; color: var(--sub); padding: 8px; }
.ph.is-error .ph-msg { display: flex; }
.ph.is-error img { visibility: hidden; }
.ph.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, #ffffff80 50%, transparent 80%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.photo-grid > button, .photo-image { border: 0; background: var(--soft); padding: 0; border-radius: 12px; overflow: hidden; width: 100%; display: block; position: relative; }
.photo-grid .ph, .photo-image .ph { aspect-ratio: 1; }
.photo-grid .ph img, .photo-image .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-item { background: #fff; border: 1px solid #e0eaf2; border-radius: 12px; overflow: hidden; }
.photo-item .photo-image { border-radius: 0; }
.cover-badge { position: absolute; left: 6px; top: 6px; background: var(--accent); color: #fff; font-size: 11px; border-radius: 8px; padding: 1px 7px; }
.photo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 6px 4px; }
.photo-actions button { font-size: 12px; border: 0; border-radius: 8px; background: #edf4f8; color: #426b78; min-height: 36px; min-width: 36px; padding: 5px 7px; }
.photo-actions button[aria-pressed=true] { background: var(--soft2); font-weight: 600; }
.upload { display: block; width: 100%; border: 1px dashed #abcce3; border-radius: 16px; background: #e5f2fc; color: #4f7d92; padding: 22px 10px; margin: 12px 0 6px; text-align: center; font-weight: 600; }
.upload.small { padding: 14px 10px; font-weight: 500; font-size: 14px; }
.upload-label { position: relative; overflow: hidden; cursor: pointer; }
.upload-label input { position: absolute; inset: 0; opacity: 0; margin: 0; padding: 0; width: 100%; height: 100%; cursor: pointer; }
.upload-label:focus-within { outline: 3px solid #6bb3c9; outline-offset: 2px; }
.creature-edit { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.creature-photo { border: 0; padding: 0; background: none; width: 140px; border-radius: 12px; overflow: hidden; display: block; margin: 8px 0; }
.creature-photo .ph { aspect-ratio: 1; } .creature-photo img { width: 100%; height: 100%; object-fit: cover; }

/* 日記 */
.diary { background: #fff; border: 1px solid #e0eaf2; border-radius: 18px; padding: 14px 16px; margin: 14px 0; }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.badge { padding: 2px 9px; border-radius: 12px; background: #eef3f6; }
.badge.ok { background: var(--soft2); color: var(--accent-dark); }
.feature { background: var(--soft); border-radius: 12px; padding: 10px 12px; margin-top: 12px; font-size: 14px; }
.feature p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.feature-label { font-size: 12px; color: var(--sub); }
.rating-view { margin-top: 10px; }
.total { font-size: 14px; margin: 8px 0 0; }
.reactions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid #edf2f5; margin-top: 12px; padding-top: 4px; }
.comments { margin-top: 4px; }
.comment-item { background: var(--soft); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.comment-item p { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form .field { margin-bottom: 8px; }
.link-title { border: 0; background: none; padding: 0; font-size: inherit; font-weight: inherit; text-align: left; color: inherit; }
.panel { background: #fff; border: 1px solid #dce9f3; border-radius: 17px; padding: 14px 16px; margin: 16px 0; }
.panel.common { background: #f7fbfe; }
.danger-zone { background: #fffafb; border-color: #f0d6dc; }

/* 評価 */
.scores { margin: 10px 0 0; font-size: 13px; }
.scores > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid #dcebf2; }
.scores dt { flex-shrink: 0; }
.scores dd { margin: 0; display: flex; align-items: center; gap: 6px; }
.scores .num { font-size: 12px; color: var(--sub); min-width: 3.2em; text-align: right; }
.stars-view span { color: var(--star-off); font-size: 15px; letter-spacing: -1px; }
.stars-view span.on { color: var(--star); }
.rating { border: 0; padding: 0; margin: 18px 0; min-width: 0; }
.rating legend { font-size: 14px; color: #46696e; font-weight: 600; }
.stars { display: flex; gap: 2px; margin: 6px 0 2px; }
.star { position: relative; width: 46px; height: 46px; display: grid; place-items: center; cursor: pointer; color: var(--star-off); font-size: 34px; line-height: 1; }
.star[data-filled=true] { color: var(--star); }
.star input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.star:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 8px; }
.rating output { font-size: 13px; color: #527779; }
.share-note { font-size: 13px; color: #406c78; background: var(--soft); padding: 12px 13px; border-radius: 13px; margin-top: 20px; }

/* 保存ボタン（画面下に追従。キーボード表示中も上に出る） */
.save-dock {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--kb) + max(10px, var(--safe-b)));
  width: min(calc(100% - 24px), 536px);
  background: #f7fbfe; border: 1px solid #ccdfec; border-radius: 19px; box-shadow: 0 6px 26px #2a567529; padding: 10px;
}
.save-dock .row button { flex: 1; min-height: 50px; padding: 10px 6px; }
.save-dock p { margin: 2px 4px 8px; }
.dock-spacer { height: 120px; }

/* 一覧 */
.directory-hero { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.directory-hero img { width: 84px; height: 100px; object-fit: contain; opacity: .9; }
.count { margin: 0; }
.place { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.place-info { flex: 1; min-width: 0; }
.place-link { border: 0; background: none; color: var(--text); font-weight: 600; font-size: 15px; text-align: left; padding: 4px 0; display: block; width: 100%; min-height: 36px; overflow-wrap: anywhere; }
.status { display: block; font-size: 12px; color: #4f7882; }
.basic-info { margin: 4px 0 22px; padding: 16px; background: #fff; border: 1px solid #dce9f3; border-radius: 17px; }
.basic-info dl { margin: 10px 0; font-size: 14px; }
.basic-info dt { font-size: 12px; color: #638095; margin-bottom: 4px; }
.basic-info dd { margin: 0; overflow-wrap: anywhere; }
.info-links { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0; }
.info-links a { display: inline-flex; align-items: center; padding: 9px 13px; border: 1px solid #c3dcec; border-radius: 10px; color: #386d87; background: var(--bg); text-decoration: none; font-size: 14px; min-height: 44px; }
.visit { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; background: #fff; border: 1px solid #e0eaf2; padding: 14px 16px; border-radius: 14px; margin: 10px 0; }
.comment { background: var(--soft); border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-size: 14px; }

/* 達成率・ランキング */
.metric { background: #d9ecfa; border-radius: 22px; padding: 20px; margin: 18px 0; text-align: center; }
.metric h3 { font-size: 18px; }
.number { font-size: 44px; color: #2e6f80; line-height: 1.3; font-weight: 600; }
.number span { font-size: 16px; font-weight: 500; }
.region-button { display: block; width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid #d6e5ef; background: transparent; text-align: left; }
.track { height: 8px; background: #d9e8f4; border-radius: 8px; margin-top: 8px; overflow: hidden; }
.track span { display: block; height: 100%; background: #6fa9c9; border-radius: 8px; }
.rank .rank-no { font-weight: 600; font-size: 16px; color: var(--accent-dark); }
.rank .score { font-size: 16px; }
.rank .star { color: var(--star); width: auto; height: auto; display: inline; font-size: 16px; }

/* 設定 */
.setting { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: flex; justify-content: space-between; text-align: left; padding: 16px 2px; font-size: 15px; min-height: 52px; }

/* 下部ナビ */
.app-nav {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: flex; justify-content: center;
  background: #fff; border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + var(--safe-b));
}
.app-nav[hidden] { display: none; }
.app-nav button { flex: 1; max-width: 112px; min-width: 0; border: 0; background: none; color: #6c8790; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; font-size: 11px; min-height: 50px; }
.app-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-nav span { white-space: nowrap; padding: 0 6px; border-radius: 9px; }
.app-nav button[aria-current=page] { color: #2c6a80; font-weight: 600; }
.app-nav button[aria-current=page] span { background: var(--soft2); }

/* 通知・読み込み */
.toast { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 60px);
  width: min(calc(100% - 32px), 520px); background: #2f5f6f; color: #fff; border-radius: 14px; padding: 12px 14px; font-size: 14px; box-shadow: 0 8px 24px #183d4a40; }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 60px 0; color: var(--sub); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--soft2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
.spinner.small { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ログイン */
.login { text-align: center; padding-top: 10px; }
.login form { text-align: left; }
.login-art { width: 110px; height: 128px; object-fit: contain; }

/* ダイアログ */
dialog { border: 0; padding: 0; }
dialog::backdrop { background: #173534b8; }
.lightbox { width: min(94vw, 680px); max-height: 92dvh; border-radius: 18px; background: #f7fbfe; color: var(--text); padding: 14px; }
.lb-stage { margin: 10px 0; display: grid; place-items: center; }
.lb-stage img, .lb-stage .ph { max-width: 100%; max-height: 70dvh; object-fit: contain; display: block; background: transparent; }
.lb-stage .ph img { width: auto; height: auto; max-height: 70dvh; }
.lightbox button { background: var(--soft); color: #315e6b; border: 0; border-radius: 10px; padding: 10px 14px; min-height: 44px; }
.confirm { width: min(92vw, 440px); border-radius: 18px; background: #fff; color: var(--text); padding: 18px; }
.confirm .row button { flex: 1; }

/* 誕生日画面（見本の配置を引き継ぐ） */
.gift { position: relative; text-align: center; padding: 20px 0 10px; isolation: isolate; }
.gift-from { font-size: 13px; letter-spacing: .14em; color: var(--sub); margin: 8px 0 0; position: relative; z-index: 1; }
.gift-scene { position: relative; height: 340px; margin: 14px auto 6px; max-width: 380px; background: radial-gradient(ellipse at 50% 55%, #d3eefa 0%, #e4f3fc80 55%, transparent 72%); }
.gift-scene img { position: absolute; object-fit: contain; }
.g-clione { left: 2%; top: 0; width: 88px; height: 130px; transform: rotate(-10deg); animation: float 5s ease-in-out infinite; }
.g-eels { left: 37%; top: 26px; width: 80px; height: 100px; }
.g-squid { right: 0; top: 0; width: 92px; height: 118px; transform: rotate(13deg); }
.g-whaleshark { left: 0; top: 140px; width: 46%; max-width: 175px; height: 95px; transform: rotate(-5deg); }
.g-slug { right: 0; top: 160px; width: 100px; height: 75px; }
.g-oarfish { right: 0; bottom: 0; width: 96%; height: 88px; transform: rotate(-6deg); }
@keyframes float { 50% { translate: 0 -6px; } }
.bubble { position: absolute; border: 1.5px solid #b0d7eb; border-radius: 50%; width: 15px; height: 15px; }
.bubble.b1 { left: 10%; bottom: 96px; width: 11px; height: 11px; }
.bubble.b2 { right: 3%; top: 132px; width: 20px; height: 20px; }
.bubble.b3 { left: 46%; top: 132px; width: 9px; height: 9px; }
.bubble.b4 { left: 30%; top: 4px; width: 13px; height: 13px; }
.spark { position: absolute; color: #d7ae60; font-size: 22px; }
.spark.s1 { right: 26%; top: 6px; } .spark.s2 { left: 28%; top: 120px; font-size: 16px; color: #8fc3dc; } .spark.s3 { right: 6%; top: 236px; font-size: 14px; }
.gift-title { font-size: clamp(20px, 6.2vw, 26px); white-space: nowrap; letter-spacing: .02em; margin: 14px 0 8px; color: #306c86; }
.gift-date { display: inline-block; font-size: 13px; color: #557f97; background: #e2f0fb; border-radius: 16px; padding: 4px 16px; margin-bottom: 28px; }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.confetti span { position: absolute; width: 8px; height: 5px; border-radius: 2px; opacity: .8; }
.confetti span:nth-child(1) { left: 4%; top: 6px; background: #d7b36e; transform: rotate(20deg); }
.confetti span:nth-child(2) { left: 22%; top: 30px; background: #9acac2; width: 5px; height: 5px; border-radius: 50%; }
.confetti span:nth-child(3) { right: 22%; top: 14px; background: #e6b2b7; transform: rotate(28deg); }
.confetti span:nth-child(4) { right: 2%; top: 64px; background: #8fbfdb; }
.confetti span:nth-child(5) { left: 1%; top: 200px; background: #e6b2b7; width: 5px; height: 5px; border-radius: 50%; }
.confetti span:nth-child(6) { right: 1%; top: 210px; background: #a7cdbd; transform: rotate(-25deg); }
.confetti span:nth-child(7) { left: 9%; top: 380px; background: #d7b36e; transform: rotate(40deg); }
.confetti span:nth-child(8) { right: 6%; top: 400px; background: #b6b7de; }
.confetti span:nth-child(9) { left: 2%; top: 455px; background: #9acac2; transform: rotate(-30deg); }
.confetti span:nth-child(10) { left: 50%; top: 2px; background: #b6b7de; width: 5px; height: 5px; border-radius: 50%; }
.confetti span:nth-child(11) { right: 15%; top: 470px; background: #e6b2b7; transform: rotate(15deg); }
.confetti span:nth-child(12) { right: 3%; top: 520px; background: #d7b36e; width: 5px; height: 5px; border-radius: 50%; }
.confetti span:nth-child(13) { left: 16%; top: 520px; background: #8fbfdb; transform: rotate(60deg); }
.confetti span:nth-child(14) { left: 70%; top: 44px; background: #a7cdbd; transform: rotate(-50deg); }
body[data-screen=gift] .app-header .avatar { visibility: hidden; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
@media (max-width: 350px) {
  main { padding-left: 14px; padding-right: 14px; }
  h2 { font-size: 21px; }
  .gift-scene { height: 300px; }
  .g-squid { width: 78px; height: 100px; } .g-clione { width: 74px; height: 110px; }
  .g-whaleshark { top: 120px; } .g-slug { top: 140px; width: 84px; }
  .star { width: 42px; height: 42px; font-size: 31px; }
}

/* 水族館の検索 */
.aq-picker > label { display: block; }
.field.inner { margin: 12px 0 0; }
.aq-chosen { font-size: 14px; background: var(--soft2); color: var(--accent-dark); border-radius: 10px; padding: 8px 11px; margin: 8px 0; }
.aq-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.aq-option { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid #c9dceb; background: #fff; border-radius: 12px; padding: 10px 12px; min-height: 46px; font-size: 15px; }
.aq-option small { flex-shrink: 0; }
.aq-option[aria-selected=true] { background: var(--soft2); border-color: #a6c8e1; font-weight: 600; }

/* 新着 */
.new-badge { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; background: var(--heart); border-radius: 9px; padding: 0 7px; line-height: 18px; vertical-align: 2px; letter-spacing: .03em; }
.new-note { display: block; width: 100%; text-align: left; border: 0; border-radius: 10px; background: #fdeef1; color: #9c3348; font-size: 14px; padding: 9px 11px; margin: 10px 0 2px; min-height: 40px; }
.diary.is-new { border-color: #efc2cb; box-shadow: 0 0 0 3px #fbe6ea; }
.app-nav button { position: relative; }
.app-nav button .dot, .app-nav button[aria-current=page] .dot { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--heart); color: #fff; font-size: 10px; line-height: 17px; text-align: center; padding: 0 4px; font-weight: 600; }

/* 共有のお祝い */
.celebrate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: #173a4a33; animation: cel-fade .2s ease-out; padding: 20px; }
.celebrate.out { opacity: 0; transition: opacity .25s; }
.cel-card { position: relative; overflow: hidden; width: min(320px, 100%); background: linear-gradient(180deg, #f4faff, #dcefff); border-radius: 24px; padding: 26px 18px 20px; text-align: center; box-shadow: 0 14px 40px #1a4a6040; animation: cel-pop .35s cubic-bezier(.2,1.4,.4,1); }
.cel-card img { width: 120px; height: 110px; object-fit: contain; position: relative; z-index: 1; animation: cel-float 1.6s ease-in-out infinite; }
.cel-title { font-size: 19px; font-weight: 600; color: #306c86; margin: 10px 0 2px; position: relative; z-index: 1; }
.cel-card .sub { position: relative; z-index: 1; margin: 0; }
.cel-bubble { position: absolute; bottom: -20px; width: 12px; height: 12px; border: 1.5px solid #9fcbe4; border-radius: 50%; animation: cel-rise 2.2s ease-in infinite; }
.cel-bubble:nth-child(1) { left: 8%; animation-delay: 0s; } .cel-bubble:nth-child(2) { left: 20%; width: 8px; height: 8px; animation-delay: .5s; }
.cel-bubble:nth-child(3) { left: 33%; width: 16px; height: 16px; animation-delay: .2s; } .cel-bubble:nth-child(4) { left: 47%; animation-delay: .9s; }
.cel-bubble:nth-child(5) { left: 60%; width: 9px; height: 9px; animation-delay: .35s; } .cel-bubble:nth-child(6) { left: 72%; width: 18px; height: 18px; animation-delay: .7s; }
.cel-bubble:nth-child(7) { left: 84%; animation-delay: .1s; } .cel-bubble:nth-child(8) { left: 92%; width: 7px; height: 7px; animation-delay: 1.1s; }
.cel-bubble:nth-child(9) { left: 54%; width: 6px; height: 6px; animation-delay: 1.4s; border-color: #e6b2b7; }
@keyframes cel-rise { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-300px); opacity: 0; } }
@keyframes cel-pop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes cel-float { 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes cel-fade { from { opacity: 0; } }
.comment-item.is-new { box-shadow: inset 3px 0 0 var(--heart); }

/* 書きかけの復元 */
.resume { background: #fff8e8; border: 1px solid #ecd9a8; border-radius: 16px; padding: 12px 14px; margin: 12px 0 4px; }
.resume p { margin: 0 0 10px; }
.resume .row button { flex: 1; min-height: 44px; }
/* はじめての案内 */
.empty.first { padding-top: 10px; }
.first-steps { list-style: none; padding: 0; margin: 14px auto 18px; max-width: 320px; text-align: left; display: grid; gap: 8px; }
.first-steps li { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #dce9f3; border-radius: 12px; padding: 9px 12px; font-size: 14px; }
.first-steps span { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--soft2); color: var(--accent-dark); font-weight: 600; display: grid; place-items: center; font-size: 13px; }
