/* 名刺登録：白・黒・灰色＋差し色ピンクグレージュ、Noto Sans JP。グラデーションと影は使わない */
:root {
  --bg: #f6f5f3;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.74);
  --ink: #1b1b1b;
  --ink-2: #5c5c5c;
  --ink-3: #8f8f8f;
  --line: #e4e2df;
  --fill: #ebe9e6;
  --accent: #a56f6b;
  --accent-press: #8f5d59;
  --accent-soft: #f4ebea;
  --radius: 14px;
  --font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---- 画面の切り替え ---- */
/* 画面が横から入る動きの間も、ページが横にはみ出して揺れないようにする（clip は sticky の帯を止めない） */
#app { overflow-x: clip; }
.screen {
  display: none;
  min-height: 100dvh;
  flex-direction: column;
}
.screen.is-active { display: flex; animation: screen-in 0.32s var(--ease) both; }
.screen.is-back { animation-name: screen-back; }
@keyframes screen-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes screen-back { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

/* ---- 上の帯（白の半透明とぼかし） ---- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
}
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: calc(56px + var(--safe-t));
  padding: var(--safe-t) 12px 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.bar-title { flex: 1; margin: 0; font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.bar-count { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.bar-status { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.avatar {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.avatar:active { transform: scale(0.94); }
.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-left: -8px;
  border: 0; border-radius: 12px; background: transparent;
  cursor: pointer;
}
.icon-btn:active { background: var(--fill); }

/* ---- ホーム ---- */
.home, .review {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(32px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 16px; /* 16px 未満だと iPhone が拡大してしまう */
  transition: border-color 0.2s var(--ease), background-color 0.4s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235c5c5c' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.field textarea { min-height: 70px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field.is-unsure input, .field.is-unsure textarea { border-color: var(--accent); background: var(--accent-soft); }
.tag {
  font-size: 11px; line-height: 1; padding: 4px 6px; border-radius: 6px;
  background: var(--accent); color: #fff; font-weight: 700;
}
.tag.is-soft { background: var(--fill); color: var(--ink-2); font-weight: 500; }
.field-help { font-size: 12px; color: var(--ink-3); margin: 0; }
/* 気になる所（決まりに合わない所・Gemini が見つけた読み違いらしい所）の理由と、直す候補のボタン */
.field-issue {
  margin: 2px 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  font-size: 13px; line-height: 1.5; color: var(--accent-press);
  animation: issue-in 0.3s var(--ease) both;
}
.field-issue .issue-fix { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; color: var(--accent-press); border-color: var(--accent); }
@keyframes issue-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.field.is-filled input, .field.is-filled textarea { animation: filled 0.9s var(--ease); }
@keyframes filled { from { background-color: var(--accent-soft); } to { background-color: var(--surface); } }

.shoot {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 112px;
  border: 0; border-radius: 20px;
  background: var(--accent); color: #fff;
  font-size: 20px; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.16s var(--ease), background-color 0.2s var(--ease);
}
.shoot:active { transform: scale(0.97); background: var(--accent-press); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent;
  font-size: 16px; font-weight: 700; text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease), opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-press); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:active { background: var(--fill); }
.btn-wide { width: 100%; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.shoot-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
.shoot-text small { font-size: 13px; font-weight: 500; letter-spacing: 0.02em; opacity: 0.88; }
.shoot-hint { margin: -4px 4px 0; font-size: 13px; color: var(--ink-2); text-align: center; }
.ctx-note { margin: -2px 0 0; font-size: 12px; color: var(--ink-2); padding-left: 10px; border-left: 2px solid var(--accent); }

/* ---- 撮った名刺の一覧（左にスワイプすると「外す」が出る：Swipe Action） ---- */
.queue { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; scroll-margin-top: calc(72px + var(--safe-t)); animation: rise 0.3s var(--ease) both; }
.queue-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.queue h2 { margin: 0; font-size: 15px; }
.queue-progress { font-size: 13px; color: var(--ink-2); }
.queue-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.q-row { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); transition: height 0.3s var(--ease), opacity 0.3s var(--ease); }
.q-row:last-child { border-bottom: 0; }
.q-row.is-new { animation: q-in 0.42s var(--ease) both; }
.q-row.is-leaving { opacity: 0; border-bottom-width: 0; pointer-events: none; }
@keyframes q-in { from { opacity: 0; transform: translateY(-8px); background: var(--accent-soft); } to { opacity: 1; transform: none; background: var(--surface); } }
.q-remove {
  position: absolute; top: 0; right: 0; bottom: 0; width: 88px;
  border: 0; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.q-remove:active { background: var(--accent-press); }
.q-main {
  position: relative; z-index: 1;
  width: 100%; min-height: 68px;
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 14px;
  border: 0; background: var(--surface); text-align: left; cursor: pointer;
  touch-action: pan-y;
  transition: transform 0.28s var(--ease), background-color 0.2s var(--ease);
}
.q-main:active { background: var(--fill); }
.q-row.is-open .q-main { transform: translateX(-88px); }
.q-row.is-dragging .q-main { transition: none; }
.q-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; background: var(--fill); border: 1px solid var(--line); }
.q-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.q-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-sub { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-name .sk, .q-sub .sk { height: 12px; margin: 3px 0; }
.q-state {
  font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent;
  background: var(--fill); color: var(--ink-2); font-weight: 500;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.q-state.is-ok { background: var(--surface); border-color: var(--ink-3); color: var(--ink); }
.q-state.is-warn { background: var(--accent-soft); color: var(--accent-press); font-weight: 700; }
.q-state.is-busy { animation: pulse 1.3s ease-in-out infinite; }
.queue-help { margin: -2px 4px 0; font-size: 12px; color: var(--ink-3); }

/* 担当者（押して選ぶ。選んだ人は差し色、2人以上なら順番の数字） */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip {
  position: relative;
  min-height: 44px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.12s var(--ease);
}
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.chip-no { position: absolute; top: 4px; right: 10px; font-size: 11px; line-height: 1; opacity: 0.9; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13px; align-self: flex-start; }
#f-note { min-height: 140px; }
.recent { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; }
.recent h2 { margin: 0; font-size: 15px; }
.next-no { font-size: 13px; color: var(--ink-2); }
.recent-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.recent-list li { border-bottom: 1px solid var(--line); }
.recent-list li:last-child { border-bottom: 0; }
.recent-list a {
  display: grid; grid-template-columns: 64px 1fr; gap: 4px 10px;
  padding: 12px 14px; min-height: 56px;
  color: inherit; text-decoration: none;
}
.recent-list a:active { background: var(--fill); }
.recent-no { font-size: 13px; color: var(--ink-2); grid-row: span 2; align-self: center; }
.recent-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-company { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list li.is-new { animation: new-row 1.6s var(--ease); }
@keyframes new-row { 0% { background: var(--accent-soft); transform: translateY(-6px); opacity: 0; } 25% { opacity: 1; transform: none; } 100% { background: var(--surface); } }
.recent-empty { padding: 14px; color: var(--ink-2); font-size: 14px; }
.sk-row { display: flex; flex-direction: column; gap: 8px; padding: 14px; }

/* 左に線のある補足の箱 */
.callout {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  color: var(--ink);
  animation: rise 0.3s var(--ease) both;
}
.callout strong { display: block; margin-bottom: 2px; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout li { margin: 2px 0; }
.callout a { color: var(--ink); }
.callout .btn { margin-top: 8px; min-height: 40px; font-size: 14px; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- 確認の画面 ---- */
.review { padding-bottom: calc(110px + var(--safe-b)); }
.photo {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--fill); overflow: hidden; cursor: zoom-in;
  aspect-ratio: 16 / 10;
}
.photo img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.card-form { display: flex; flex-direction: column; gap: 14px; }
.card-form .field { animation: rise 0.35s var(--ease) both; animation-delay: calc(min(var(--i, 0), 8) * 25ms); }
.more summary {
  cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink-2);
  list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 28px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ''; width: 9px; height: 9px; border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: rotate(45deg); transition: transform 0.2s var(--ease); }
.more[open] summary::after { transform: rotate(225deg); }
.more #group-more-body { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.remove-btn { align-self: center; color: var(--ink-2); }

.actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 2fr; gap: 10px;
  padding: 10px 16px calc(10px + var(--safe-b));
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.actions .btn { min-height: 52px; }

/* ---- スケルトン（形だけを灰色で見せる。明るさだけをゆっくり変える） ---- */
.sk { display: block; background: var(--fill); border-radius: 8px; animation: pulse 1.3s ease-in-out infinite; }
.sk-title { width: 110px; height: 20px; }
.sk-avatar { width: 40px; height: 40px; border-radius: 50%; margin-left: auto; }
.sk-label { width: 34%; height: 12px; }
.sk-input { width: 100%; height: 46px; border-radius: 10px; }
.sk-input.tall { height: 70px; }
.sk-shoot { width: 100%; height: 112px; border-radius: 20px; }
.sk-line { width: 100%; height: 14px; }
.w40 { width: 40%; } .w60 { width: 60%; } .w80 { width: 80%; }
.skeleton-form { display: flex; flex-direction: column; gap: 14px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ---- ログイン ---- */
.login {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  width: 100%; max-width: 420px; margin: 0 auto; padding: 32px 24px calc(32px + var(--safe-b));
  text-align: center;
}
.login h1 { margin: 0; font-size: 26px; letter-spacing: 0.04em; }
.login-icon { border-radius: 18px; animation: rise 0.5s var(--ease) both; }
.login-note { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; }
.login .callout { text-align: left; width: 100%; }

/* ---- Bottom Sheet（メニュー） ---- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.28); animation: fade 0.2s ease both; }
.bottom-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px 16px calc(16px + var(--safe-b));
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.9);
  animation: sheet-up 0.32s var(--ease) both;
}
.bottom-sheet.is-closing { animation: sheet-down 0.22s ease-in both; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 6px; }
.sheet-title { margin: 0; font-weight: 700; }
.sheet-sub { margin: -6px 0 4px; color: var(--ink-2); font-size: 14px; word-break: break-all; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.bulk-names { margin: 0; padding: 10px 12px 10px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; max-height: 32vh; overflow: auto; }
.bulk-names li { margin: 2px 0; }
.bulk-ctx { font-size: 13px; color: var(--ink-2); padding-left: 10px; border-left: 2px solid var(--accent); }
.bulk-ctx p { margin: 2px 0; }

/* ---- 続けて撮るカメラ（黒の上に白の半透明とぼかしの帯。枠の外は少し暗くする） ---- */
.camera {
  position: fixed; inset: 0; z-index: 45;
  background: #000; color: #fff; overflow: hidden;
  animation: fade 0.22s ease both;
  /* 続けて押してもズームせず、下のページも動かさない。長押しで文字の選択や写真のメニューが出ないようにする */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.camera.is-closing { animation: fade-out 0.2s ease both; }
@keyframes fade-out { to { opacity: 0; } }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s var(--ease); }
.camera.is-ready video { opacity: 1; }
.cam-frame {
  position: absolute; left: 50%; top: 45%;
  width: min(78vw, 46vh, 420px); height: min(78vw, 46vh, 420px);
  transform: translate(-50%, -50%);
  border-radius: 18px;
  outline: 100vmax solid rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.camera.is-ready .cam-frame { opacity: 1; animation: frame-in 0.45s var(--ease) both; }
@keyframes frame-in { from { transform: translate(-50%, -50%) scale(1.06); } to { transform: translate(-50%, -50%) scale(1); } }
.cam-frame i { position: absolute; width: 34px; height: 34px; border: 3px solid #fff; }
.cam-frame i:nth-child(1) { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.cam-frame i:nth-child(2) { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.cam-frame i:nth-child(3) { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.cam-frame i:nth-child(4) { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 2; }
.cam-flash.is-on { animation: cam-flash 0.32s ease-out; }
@keyframes cam-flash { from { opacity: 0.8; } to { opacity: 0; } }
.cam-wait { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; font-size: 14px; color: rgba(255, 255, 255, 0.8); animation: pulse 1.3s ease-in-out infinite; }
.cam-top, .cam-bottom {
  position: absolute; left: 0; right: 0; z-index: 3;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
}
.cam-top { top: 0; padding: calc(12px + var(--safe-t)) 20px 12px; text-align: center; }
.cam-hint { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.5; }
.cam-status { margin: 2px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.85); min-height: 1.5em; }
.cam-bottom {
  bottom: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 16px 22px calc(18px + var(--safe-b));
}
.shutter {
  width: 78px; height: 78px; padding: 5px;
  border: 4px solid #fff; border-radius: 50%; background: transparent; cursor: pointer;
  transition: opacity 0.2s;
}
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform 0.12s var(--ease); }
.shutter:active span { transform: scale(0.86); }
.shutter:disabled { opacity: 0.35; cursor: default; }
.cam-thumb {
  justify-self: start; position: relative;
  width: 54px; height: 54px; padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 12px; background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.cam-thumb:disabled { opacity: 0.5; cursor: default; }
.cam-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; opacity: 0; }
.cam-thumb.has-photo img { opacity: 1; }
.cam-count {
  position: absolute; top: -9px; right: -9px;
  min-width: 24px; height: 24px; padding: 0 7px;
  display: grid; place-items: center;
  border-radius: 12px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
}
.cam-count.is-bump { animation: bump 0.32s var(--ease); }
@keyframes bump { 40% { transform: scale(1.3); } }
.cam-done {
  justify-self: end; min-height: 48px; min-width: 64px; padding: 0 14px;
  border: 0; border-radius: 12px; background: transparent; color: #fff;
  font-size: 17px; font-weight: 700; cursor: pointer;
}
.cam-done:active { background: rgba(255, 255, 255, 0.16); }
.cam-fly { position: absolute; z-index: 4; object-fit: cover; border-radius: 14px; border: 2px solid #fff; pointer-events: none; transform-origin: center; }
.cam-msg {
  position: absolute; left: 16px; right: 16px; top: 50%; z-index: 5;
  transform: translateY(-50%);
  max-width: 420px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px; border-radius: 16px;
  background: var(--surface); color: var(--ink);
  animation: rise 0.3s var(--ease) both;
}
.cam-msg p { margin: 0 0 4px; font-size: 15px; }

/* ---- 写真の拡大 ---- */
.viewer {
  position: fixed; inset: 0; z-index: 50; background: rgba(20, 20, 20, 0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: calc(16px + var(--safe-t)) 12px calc(16px + var(--safe-b));
  animation: fade 0.2s ease both;
}
.viewer img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 8px; background: #fff; }

/* ---- Toast（短いお知らせ。自動で消える） ---- */
.toast {
  position: fixed; left: 50%; z-index: 60;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--ink); color: #fff;
  font-size: 15px;
  animation: toast-in 0.34s var(--ease) both;
}
.toast a { color: #fff; font-weight: 700; white-space: nowrap; }
.toast-action {
  min-height: 32px; padding: 0 2px; border: 0; background: transparent;
  color: #fff; font-weight: 700; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.toast.is-leaving { animation: toast-out 0.25s ease-in both; }
.toast.is-error { background: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 12px); } }

/* ---- お知らせの画面（サーバーが返すページ） ---- */
.msg-body { display: flex; min-height: 100dvh; }
.msg { margin: auto; width: 100%; max-width: 420px; padding: 32px 24px; display: flex; flex-direction: column; gap: 14px; }
.msg h1 { margin: 0; font-size: 22px; }
.msg p { margin: 0 0 8px; color: var(--ink-2); }

@media (min-width: 720px) {
  .home, .review { padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
