/* ===== 写真登録ページ ===== */
.pgt-up {
  --pgt-key: #72184b;
  max-width: 720px;
  margin: 0 auto 3em;
  color: #2b2b2b;
}
.pgt-up *, .pgt-up *::before, .pgt-up *::after { box-sizing: border-box; }

/* 共通パーツ */
.pgt-up-btn {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 20px;
  border: 0;
  border-radius: 6px;
  background: var(--pgt-key);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .05em;
  cursor: pointer;
  transition: opacity .2s;
}
.pgt-up-btn:hover { opacity: .88; }
.pgt-up-btn:disabled { opacity: .35; cursor: not-allowed; }

.pgt-up-msg {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
}
.pgt-up-msg.is-error { background: #fdf0f0; color: #b32d2e; border-left: 4px solid #d63638; }

/* ログイン */
.pgt-up-login {
  max-width: 380px;
  margin: 0 auto;
  padding: 28px 24px;
  border: 1px solid #e5e5e5;
  border-top: 4px solid var(--pgt-key);
  border-radius: 6px;
  background: #fff;
}
.pgt-up-lead { margin: 0 0 18px; font-size: 15px; line-height: 1.7; }
.pgt-up-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.pgt-up-input {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px; /* iPhoneで自動ズームしないよう16px */
}
.pgt-up-input:focus { outline: none; border-color: var(--pgt-key); box-shadow: 0 0 0 2px rgba(0, 0, 0, .06); }

/* 手順 */
.pgt-up-step { margin: 0 0 28px; }
.pgt-up-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}
.pgt-up-step-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pgt-key);
  color: #fff;
  font-size: 14px;
}

/* 写真選択 */
.pgt-up-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  padding: 20px;
  border: 2px dashed #cfcfcf;
  border-radius: 8px;
  background: #fafafa;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.pgt-up-drop:hover,
.pgt-up-drop.is-over { border-color: var(--pgt-key); background: #fff; }
.pgt-up-drop.has-files { min-height: 70px; }
.pgt-up-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.pgt-up-drop-text { color: #555; font-size: 15px; line-height: 1.6; }
.pgt-up-drop-text small { color: #888; font-size: 12px; }

.pgt-up-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.pgt-up-preview {
  position: relative;
  margin: 0 !important;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
  list-style: none !important;
  transition: opacity .3s;
}
.pgt-up-preview::before { content: none !important; }
.pgt-up-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgt-up-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
}
.pgt-up-state {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 0;
  font-size: 11px;
  text-align: center;
  color: #fff;
}
.pgt-up-state:empty { display: none; }
.pgt-up-preview.is-uploading .pgt-up-state { background: rgba(0, 0, 0, .55); }
.pgt-up-preview.is-uploading img { opacity: .5; }
.pgt-up-preview.is-done .pgt-up-state { background: #008a20; }
.pgt-up-preview.is-done { opacity: .6; }
.pgt-up-preview.is-failed .pgt-up-state { background: #d63638; }
.pgt-up-form.is-busy .pgt-up-remove { display: none; }

/* カテゴリー */
.pgt-up-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.pgt-up-cat { position: relative; margin: 0; cursor: pointer; }
.pgt-up-cat input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.pgt-up-cat span {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--pgt-key);
  border-radius: 999px;
  background: #fff;
  color: var(--pgt-key);
  font-size: 15px;
  line-height: 1.3;
  transition: background-color .2s, color .2s;
}
.pgt-up-cat span::before { content: "＋ "; font-size: 12px; }
.pgt-up-cat input:checked + span { background: var(--pgt-key); color: #fff; }
.pgt-up-cat input:checked + span::before { content: "✓ "; }
.pgt-up-cat input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 0, 0, .15); }
.pgt-up-note { margin: 10px 0 0; color: #777; font-size: 13px; }

/* 状況表示 */
.pgt-up-status { margin: 0 0 16px; font-size: 14px; line-height: 1.7; }
.pgt-up-status:empty { display: none; }
.pgt-up-status.is-info { padding: 12px 14px; border-radius: 6px; background: #f3f5f8; }
.pgt-up-status.is-success { padding: 12px 14px; border-radius: 6px; background: #edfaef; color: #00691a; border-left: 4px solid #00a32a; }
.pgt-up-status.is-error { padding: 12px 14px; border-radius: 6px; background: #fdf0f0; color: #b32d2e; border-left: 4px solid #d63638; }

/* ログアウト */
.pgt-up-logout { margin-top: 24px; text-align: center; }
.pgt-up-link {
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: #777;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
