/* ============================================================
   meishi-app の見た目。当社のテーマ(スキル spiralturn-theme):
   ピンク〜コーラルのグラデーションは主役のボタン(撮る・保存・下書きを開く)と上の帯だけ。地は淡いブラッシュ、文字は紺。
   文字の大きさ: スマホ=本文16px・小さい字13px / PC(768px 以上)=本文17px・小さい字14px(下の @media)
   押せる物は高さ 44px 以上
   ============================================================ */
:root {
  --grad: linear-gradient(120deg, #e3007f 0%, #ff4f8b 35%, #ff8a7a 70%, #ffb38a 100%);
  --pink: #ff4f8b;
  --coral: #ff8a7a;
  --blush: #fff8f6;
  --blush2: #ffeef2;
  --card: #ffffff;
  --navy: #2b3350;
  --sub: #6b7088;
  --line: #f0e2e2;
  --ok: #1f9d6b;
  --warn: #d9480f;
  --fs: 16px;
  --fs-s: 13px;
  --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* .btn などの display より hidden を優先する */
html, body { margin: 0; }
body {
  background: var(--blush);
  color: var(--navy);
  font-family: 'Zen Maru Gothic', system-ui, sans-serif;
  font-size: var(--fs);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
.num, input[type=date], input[type=email], input[type=tel] { font-family: 'Quicksand', 'Zen Maru Gothic', sans-serif; }
.wrap { max-width: 720px; margin: 0 auto; padding: 12px 16px 120px; }
.center { text-align: center; }

/* 上の帯(左右のボタンは見えない時も場所を取り、見出しを真ん中にそろえる) */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
  background: var(--grad); color: #fff;
}
.bar-title { flex: 1; margin: 0; font-size: 18px; font-weight: 700; text-align: center; }
.bar-back, .bar-menu { width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.2); color: #fff; font-size: 24px; line-height: 1; }

/* 部品 */
.panel { background: var(--card); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: 0 2px 10px rgba(227,0,127,.06); }
.panel h2 { margin: 0 0 8px; font-size: 17px; }
.muted { color: var(--sub); font-size: var(--fs-s); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 18px; border-radius: 999px;
  font: inherit; font-weight: 700; cursor: pointer;
  background: #fff; color: var(--navy); border: 1.5px solid var(--line);
}
.btn.main { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 16px rgba(255,79,139,.3); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
.stack > * + * { margin-top: 10px; }
a.link { display: inline-block; min-height: 44px; line-height: 44px; color: #c2185b; font-weight: 700; }
a.link.disabled { color: #c9b9c2; }

label.f { display: block; font-size: var(--fs-s); color: var(--sub); margin-top: 10px; }
label.f input, label.f textarea, label.f select {
  display: block; width: 100%; margin-top: 4px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 16px; color: var(--navy); background: #fff; /* 16px 未満だと iPhone が拡大する */
}
label.f input:focus, label.f textarea:focus, .search:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,79,139,.15); }
label.f textarea { min-height: 96px; resize: vertical; }
label.f textarea.body { min-height: 200px; overflow: hidden; line-height: 1.7; }
label.f.check input { border-color: var(--warn); background: #fff4ef; }
.hint-warn { color: var(--warn); font-size: var(--fs-s); }

/* たためる欄 */
details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: '▼'; margin-left: auto; font-size: 12px; color: var(--sub); transition: transform .2s; }
details[open] > summary::after { transform: rotate(180deg); }
details.more { margin-top: 10px; border-top: 1px dashed var(--line); }
details.more > summary { font-size: var(--fs-s); color: var(--sub); }

/* カテゴリーの札 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--navy); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.on { background: var(--blush2); color: #c2185b; border-color: var(--pink); font-weight: 700; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 13px; background: #ffeef2; color: #c2185b; }
.tag.oem { background: #eef1ff; color: #3949ab; }
.tag.welfare { background: #eafaf2; color: #1b7f57; }
.tag.interested { background: #fff4e6; color: #c25e00; }
.tag.other { background: #f1f1f4; color: #555; }

/* 写真 */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shot { position: relative; aspect-ratio: 91/55; border-radius: 12px; border: 2px dashed #ffc2cf; background: #fff; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; color: var(--sub); font-size: var(--fs-s); }
.shot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.shot input { position: absolute; inset: 0; opacity: 0; }
.shots.cap { margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--sub); }
.dup { border: 1.5px solid var(--warn); background: #fff4ef; border-radius: 12px; padding: 12px; margin: 10px 0; }
.zoom { position: fixed; inset: 0; z-index: 100; background: rgba(20,20,30,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; }
.zoom img { max-width: 100%; max-height: 80vh; object-fit: contain; background: #fff; border-radius: 8px; }

/* 一覧 */
.item { display: flex; gap: 12px; align-items: center; padding: 12px; background: #fff; border-radius: 14px; margin: 8px 0; border: 1px solid var(--line); cursor: pointer; }
.item .who { flex: 1; min-width: 0; }
.item .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .who > span { display: block; color: var(--sub); font-size: var(--fs-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .who > span:empty { display: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.state { font-size: 13px; padding: 1px 10px; border-radius: 999px; background: #f4f4f6; }
.state.none { color: var(--warn); background: #fff1ea; font-weight: 700; }
.state.drafted { color: #c25e00; background: #fff4e6; }
.state.sent { color: var(--ok); background: #eafaf2; }
.state.skip { color: var(--sub); }
h2 .state:empty { display: none; }
.empty { text-align: center; padding: 28px 12px; color: var(--sub); }

/* 今日お礼を送る方(淡い地。中のカードを押す) */
.todo { background: var(--blush2); border: 1.5px solid #ffc2cf; border-radius: var(--radius); padding: 12px; margin: 12px 0; }
.todo-head { font-weight: 700; color: #c2185b; padding: 2px 4px; }
.todo-head.warn { color: var(--warn); margin-top: 8px; }
.todo-head .num { font-size: 24px; }

/* 宛先の確かめ */
.to-box { border: 1.5px solid #e6d3da; border-radius: 14px; padding: 12px; background: #fbf6f8; }
.to-box .to-name { font-size: 20px; font-weight: 700; }
.to-box .to-mail { font-family: 'Quicksand', monospace; font-size: 17px; word-break: break-all; }
.okrow { margin: 14px 0 10px; gap: 10px; min-height: 44px; }
.okrow input { flex: 0 0 24px; height: 24px; accent-color: var(--pink); }
.okrow span { flex: 1; }

/* 一覧(メールアドレス) */
.mailrow { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.mailrow:last-child { border-bottom: 0; }
.mailrow .addr { font-family: 'Quicksand', 'Zen Maru Gothic', sans-serif; word-break: break-all; }

/* 下の固定ボタン */
.fab { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px); background: linear-gradient(to top, var(--blush) 70%, rgba(255,248,246,0)); }
.fab .btn { max-width: 688px; margin: 0 auto; display: flex; }

/* お知らせ(上の帯のすぐ下に出す・本文やボタンに重ねない) */
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 68px); transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: var(--fs-s); z-index: 50; max-width: 90vw; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; }
.spinner.pink { border-color: #ffc2cf; border-top-color: var(--pink); }
@keyframes spin { to { transform: rotate(360deg); } }
.menu-list button { display: block; width: 100%; min-height: 52px; text-align: left; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--navy); }
.search { width: 100%; padding: 12px 14px; border-radius: 999px; border: 1.5px solid var(--line); font: inherit; font-size: 16px; background: #fff; }

/* PC(768px 以上): 本文 17px・2列の入力 */
@media (min-width: 768px) {
  :root { --fs: 17px; --fs-s: 14px; }
  .wrap { padding-top: 20px; }
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .bar-title { font-size: 20px; }
}
