/* ===== PhotoShare - Responsive Stylesheet ===== */
:root {
  --c-bg:       #edf5ff;
  --c-surface:  #f8fbff;
  --c-border:   #d3e1ef;
  --c-input-border: #9dc0e8;
  --c-text:     #1f2933;
  --c-text2:    #5f6b76;
  --c-primary:  #2f5f86;
  --c-primary-h:#264e6e;
  --c-accent:   #2f7a5a;
  --c-accent-h: #275f47;
  --c-danger:   #ef4444;
  --c-danger-h: #dc2626;
  /* 差し色：サンセット暖色（装飾・CTA・強調用。意味色のグリーン/レッドとは役割を分ける） */
  --c-warm:     #f97316;
  --c-warm-h:   #ea580c;
  --c-amber:    #fbbf24;
  --c-warm-soft:#fff4ec;
  --grad-sunset: linear-gradient(120deg, #f97316 0%, #fb923c 48%, #fbbf24 100%);
  --radius:     12px;
  --shadow:     0 18px 42px rgba(15,23,42,.08);
  --max-w:      1140px;
  --font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Yu Gothic UI', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: linear-gradient(180deg, #eff7ff 0%, #edf5ff 44%, #f4f1ff 72%, #fdf2ec 100%);
  color: var(--c-text);
  line-height: 1.7;
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.ui-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.content-primary { width: 100%; max-width: 1040px; margin: 0 auto; }

/* ---------- Ad slot ---------- */
/* min-height はネットワークごとの実寸に合わせる。読み込みで本文が飛ぶ（CLS）のを防ぐ。 */
.ad-slot { margin: 1.5rem auto; min-height: 120px; text-align: center; }
.ad-slot-label { display: block; font-size: .7rem; color: var(--c-text2); letter-spacing: .05em; margin-bottom: .3rem; }
.ad-slot .adsbygoogle { display: block; }
/* AdMax・楽天とも PC とスマホで別サイズのタグを配信している（app/ads/*-pc / *-sp）。
   ラベルが上に 26px 積まれるので min-height は「広告の高さ + 26px」。
   タグの出し分けは User-Agent、ここは viewport 幅なので境界は完全には一致しない。
   ずれるのは横向きスマホなどに限られ、影響は数十pxの余白差にとどまる。 */
.ad-slot-admax { min-height: 116px; }      /* PC 728x90 + ラベル分 */
.ad-slot-rakuten { min-height: 226px; }    /* PC 728x200 + ラベル分 */
@media (max-width: 767px) {
  .ad-slot-admax { min-height: 126px; }    /* スマホ 320x100 + ラベル分 */
  .ad-slot-rakuten { min-height: 306px; }  /* スマホ 336x280 + ラベル分 */
}
/* スマホではカードの内寸が 300px 台前半しかなく、320px 幅の広告（320x50 等）が
   収まらない。枠だけカードの左右パディングを打ち消して全幅にする。
   カードの外に置かれた枠は元から全幅なので、対象は .card の直下だけ。 */
@media (max-width: 480px) {
  .card > .ad-slot-admax, .card > .ad-slot-rakuten { margin-left: -.95rem; margin-right: -.95rem; }
}
/* 各社の発行タグは幅固定の iframe / table を返すので、枠側で中央寄せする。 */
.ad-slot-admax > :not(.ad-slot-label),
.ad-slot-rakuten > :not(.ad-slot-label) { margin-left: auto; margin-right: auto; }
/* 楽天は幅可変のタグもあるので、枠に収まらない分は縮める。 */
.ad-slot-rakuten iframe, .ad-slot-rakuten img, .ad-slot-rakuten table { max-width: 100%; }
.ad-slot-rakuten table { margin: 0 auto; }
/* AdMax の 728x90 は、端末判定が User-Agent なのでタブレットにも配信される。
   タブレット幅では枠の内寸が 670px 前後しかないが、iframe を縮めると広告が
   切れてしまうため縮小はかけない。代わりに枠だけを横スクロールさせて、
   ページ全体に横スクロールが出るのを防ぐ。 */
.ad-slot-admax { overflow-x: auto; }
/* 中央寄せのまま横スクロールさせると左端に届かなくなるので、
   728px が収まらない幅では左寄せに切り替える（内寸が足りるのは viewport 826px 以上）。 */
@media (max-width: 860px) {
  .ad-slot-admax { text-align: left; }
}
/* 右サイド 160x600 スカイスクレイパーの2カラム（アップロード・アルバム・写真ページ）。
   広告列は 160px + 余白 24px = 184px。
   アルバム・写真ページは本文が可変幅で、狭めるとギャラリーと写真が小さくなる。
   1140px の枠の外には余白が余っているので、そこを使って本文幅を保ったまま列を足す。
   ヘッダー・フッター・固定バーも一緒に広げて、本文の左右端が全体と揃うようにする。
   アップロード画面は本文が 820px 固定で 1004px に収まるため、広げない。 */
.page-share.has-side-ad .container,
.page-photo.has-side-ad .container { max-width: calc(var(--max-w) + 184px); }
.page-share.has-side-ad .bulk-bar form,
.page-share.has-side-ad .label-bar-inner { max-width: calc(var(--max-w) + 184px); }

.layout-with-aside { display: flex; align-items: flex-start; justify-content: center; gap: 1.5rem; }
.layout-with-aside > .content-primary { flex: 0 1 820px; min-width: 0; }
.layout-with-aside > .layout-main { flex: 1 1 auto; min-width: 0; }
.side-ad { flex: 0 0 160px; }
/* サイドバーの枠だけは寸法が別物。スクロール追従はしない（アップロード中に
   フォームの横へ出続けると、誤クリックでアップロードが中断しうるため）。 */
.side-ad .ad-slot-admax { min-height: 626px; overflow-x: visible; text-align: center; }
/* 2カラムを維持できない幅では広告列を本文の下へ回す。display:none にはしない。
   広告は描画された時点で表示回数が計上されるので、読み込んだ広告は隠さない
   （スマホにはタグ片が無く、そもそも列ごと出力されない）。 */
@media (max-width: 1060px) {
  .layout-with-aside { flex-direction: column; align-items: center; }
  .layout-with-aside > .content-primary,
  .layout-with-aside > .layout-main { flex: 1 1 auto; width: 100%; }
  .side-ad { flex: 0 0 auto; }
}

/* タグ未設置のプレースホルダ（app/ads/*.html）。開発時に寸法を見るためだけのもの。
   実タグと同じ挙動を見たいので、枠に収まらなくても縮めない（max-width を付けない）。 */
.ad-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; flex: 0 0 auto; width: var(--ad-ph-w, 100%); min-height: var(--ad-ph-h, 200px); margin: 0 auto; padding: 1rem; border: 1px dashed var(--c-border); border-radius: 8px; color: var(--c-text2); font-size: .85rem; line-height: 1.5; }
.ad-placeholder small { font-size: .72rem; opacity: .8; }

/* ---------- Header ---------- */
.site-header { position: relative; background: linear-gradient(180deg, rgba(248,252,255,.94), rgba(241,248,255,.84)); color: var(--c-text); padding: 1rem 0; border-bottom: 1px solid rgba(191,219,254,.82); box-shadow: 0 10px 30px rgba(15,23,42,.05); backdrop-filter: blur(14px); }
.site-header::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-sunset); }
.header-inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--c-text); text-decoration: none; font-size: 1.55rem; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.logo .ui-icon { font-size: 1.2rem; color: var(--c-warm); }
.logo-badge { padding: .12rem .4rem; border-radius: 999px; background: var(--c-warm-soft); color: var(--c-warm-h); font-size: .64rem; font-weight: 700; letter-spacing: .02em; }
.tagline { color: var(--c-text2); font-size: .95rem; }
.header-nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.header-link { display: inline-flex; align-items: center; gap: .45rem; color: var(--c-text2); text-decoration: none; font-size: .96rem; padding: .45rem .85rem; border-radius: 999px; transition: background .15s, color .15s; }
.header-link:hover { background: var(--c-warm-soft); color: var(--c-warm-h); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: #24313a; color: rgba(255,255,255,.72); text-align: center; padding: 1.25rem 0; margin-top: auto; font-size: .92rem; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad-sunset); opacity: .85; }
.footer-nav { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.footer-link { color: rgba(255,255,255,.84); text-decoration: none; }
.footer-link:hover { color: var(--c-amber); text-decoration: underline; }

/* ---------- Card ---------- */
.card { background: linear-gradient(160deg, rgba(255,255,255,.82), rgba(241,248,255,.72)); border: 1px solid rgba(209,222,234,.9); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(14px); padding: 1.75rem; margin-bottom: 1.5rem; }
.card h1 { font-size: 1.65rem; margin-bottom: .85rem; line-height: 1.35; }
.card-narrow { max-width: 480px; margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font-weight: 600; text-align: center; border: none; border-radius: 8px; cursor: pointer; padding: .72rem 1.25rem; font-size: 1rem; text-decoration: none; transition: background .2s, opacity .2s, transform .15s; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-h); }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-h); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { background: var(--c-danger-h); }
.btn-warm { background: var(--grad-sunset); color: #fff; box-shadow: 0 8px 20px rgba(249,115,22,.26); }
.btn-warm:hover { filter: brightness(1.05); box-shadow: 0 10px 24px rgba(249,115,22,.34); }
.btn-outline { background: transparent; border: 1.5px solid var(--c-primary); color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: .52rem .9rem; font-size: .92rem; }
.link-btn { background: none; border: none; color: var(--c-primary); cursor: pointer; text-decoration: underline; font-size: inherit; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; font-size: 1.1rem; padding: .2rem .35rem; border-radius: 4px; text-decoration: none; color: var(--c-text2); }
.icon-btn:hover { background: var(--c-bg); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: .35rem; font-size: .96rem; color: #334155; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-control { width: 100%; padding: .72rem .85rem; border: 2px solid var(--c-input-border); border-radius: 8px; font-size: 1rem; font-family: var(--font); background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(245,250,255,.9)); box-shadow: inset 0 1px 0 rgba(255,255,255,.72); color: var(--c-text); }
.form-group input:focus, .form-group select:focus, .form-control:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(74,144,217,.15); }
.form-group input::placeholder,
.form-control::placeholder { color: #7b8794; }
.form-group--check label { display: flex; align-items: center; gap: .4rem; font-weight: 400; }
.radio-group { display: flex; flex-direction: column; gap: .5rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1.25rem; }

.options { margin-top: 1rem; }
.options summary { cursor: pointer; font-weight: 600; color: #075985; user-select: none; font-size: 1rem; }

/* ---------- Upload Intro ---------- */
.page-upload { background: linear-gradient(180deg, #eef7ff 0%, #f3f8ff 44%, #edf6f2 100%); }
.page-upload .card { background: rgba(255,255,255,.72); border: 1px solid rgba(217,230,242,.84); box-shadow: 0 18px 44px rgba(15,23,42,.08); backdrop-filter: blur(14px); }
.upload-intro {
  padding: 1.6rem 1.8rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(205,225,243,.92);
  background:
    radial-gradient(circle at 92% 8%, rgba(249,115,22,.16), transparent 38%),
    radial-gradient(circle at 8% 96%, rgba(14,165,233,.10), transparent 40%),
    linear-gradient(145deg, rgba(255,255,255,.92) 0%, rgba(247,251,255,.84) 60%, rgba(255,247,240,.8) 100%);
}
.upload-hero { position: relative; overflow: hidden; isolation: isolate; }
.upload-hero::after {
  content: "";
  position: absolute;
  inset: auto -18% -54% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,146,60,.28), rgba(251,146,60,0));
  z-index: -1;
}
.upload-kicker { margin: 0 0 .45rem; font-size: .84rem; letter-spacing: .08em; font-weight: 700; color: var(--c-warm-h); }
.upload-intro-heading { font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 800; margin-bottom: .8rem; color: #0f172a; line-height: 1.3; }
.upload-intro-heading .heading-phrase { display: inline-block; }
.upload-intro-text { margin: 0; font-size: 1.08rem; color: #334155; line-height: 1.85; }
.upload-hero-metrics { margin-top: 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.metric-item { border: 1px solid rgba(215,230,242,.9); border-radius: 14px; padding: .9rem .95rem; background: rgba(255,255,255,.76); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
.metric-value { display: block; font-size: 1.2rem; font-weight: 800; color: #0f172a; line-height: 1.2; }
.metric-label { display: block; margin-top: .18rem; font-size: .84rem; color: #64748b; }
.upload-features { list-style: none; margin: .95rem 0 0; padding: 0; display: grid; gap: .45rem; }
.upload-features li { font-size: .97rem; color: #334155; line-height: 1.72; padding-left: 1rem; position: relative; }
.upload-features li::before { content: ""; position: absolute; left: 0; top: .72em; width: .42rem; height: .42rem; border-radius: 50%; background: var(--grad-sunset); transform: translateY(-50%); }
.upload-features li strong { color: #0f172a; }
.upload-intro-links { margin-top: .95rem; display: flex; gap: .9rem; flex-wrap: wrap; }
.upload-intro-links a { color: #0c4a6e; font-size: .96rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(147,197,253,.9); }
.upload-intro-links a:hover { color: var(--c-warm-h); border-bottom-color: var(--c-warm); }
.trust-strip-title { margin-bottom: .9rem; font-size: 1.18rem; }
.trust-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.trust-point { padding: 1rem 1.05rem; border-radius: 14px; border: 1px solid rgba(219,231,243,.86); background: rgba(248,251,255,.74); backdrop-filter: blur(10px); }
.trust-point h3 { font-size: 1rem; margin-bottom: .32rem; color: #0f172a; }
.trust-point p { font-size: .95rem; line-height: 1.75; color: #475569; }
.faq-section h2 { margin-bottom: .9rem; font-size: 1.2rem; }
.faq-list { display: grid; gap: .55rem; }
.faq-item { border: 1px solid rgba(219,231,243,.86); border-radius: 12px; background: rgba(255,255,255,.76); padding: .8rem 1rem; backdrop-filter: blur(10px); }
.faq-item summary { cursor: pointer; font-weight: 700; color: var(--c-text); list-style: none; position: relative; padding-right: 1.3rem; font-size: 1rem; }
.faq-item summary::after { content: "+"; position: absolute; right: .15rem; top: 50%; transform: translateY(-50%); color: var(--c-primary); font-size: 1.05rem; }
.faq-item[open] summary::after { content: "-"; }
.faq-item p { margin-top: .45rem; color: var(--c-text2); font-size: .96rem; line-height: 1.85; }
.page-upload .upload-hero,
.page-upload #uploadSection,
.page-upload .trust-strip,
.page-upload .faq-section { animation: none; }

/* ---------- Simple upload page refresh ---------- */
.page-upload {
  background:
    radial-gradient(circle at 50% -12%, rgba(47,95,134,.16), transparent 34rem),
    linear-gradient(180deg, #f5f9ff 0%, #edf5ff 54%, #f8fbff 100%);
}
.page-upload .main-content { padding-top: 1.35rem; padding-bottom: 3rem; }
.page-upload .content-primary { max-width: 820px; }
.page-upload .card {
  border-radius: 8px;
  border-color: rgba(199,216,232,.88);
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 34px rgba(20,55,83,.08);
  backdrop-filter: none;
}
.page-upload .upload-hero,
.page-upload .trust-strip,
.page-upload #uploadSection,
.page-upload .result-card,
.page-upload .faq-section,
.page-upload .notice-box {
  animation: upload-rise .48s cubic-bezier(.2,.7,.2,1) both;
}
.page-upload .upload-hero { animation-delay: .02s; }
.page-upload .trust-strip { animation-delay: .06s; }
.page-upload .notice-box,
.page-upload #uploadSection { animation-delay: .1s; }
.page-upload .upload-hero::after { display: none; }
.page-upload .upload-intro {
  padding: 1.35rem 1.35rem 1.2rem;
  margin-bottom: .85rem;
  overflow: hidden;
  border-color: rgba(16,42,67,.96);
  background: #102a43;
  color: #fff;
}
.page-upload .upload-kicker {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .65rem;
  padding: .22rem .55rem;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: var(--c-warm);
  color: #fff;
  font-size: .78rem;
  letter-spacing: .05em;
}
.page-upload .upload-intro-heading {
  margin-bottom: .55rem;
  color: #fff;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: .01em;
  white-space: nowrap;
}
.page-upload .upload-intro-text {
  color: rgba(255,255,255,.82);
  font-size: clamp(.82rem, 1.55vw, .95rem);
  line-height: 1.75;
  white-space: normal;
}
.page-upload .upload-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .8rem;
}
.page-upload .metric-item {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .42rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  box-shadow: none;
}
.page-upload .metric-value {
  color: #fff;
  font-size: .95rem;
  font-weight: 900;
}
.page-upload .metric-label {
  margin: 0;
  color: rgba(255,255,255,.7);
  font-size: .78rem;
}
.page-upload .upload-features { display: none; }
.page-upload .upload-features li {
  padding: .32rem .55rem;
  border-radius: 999px;
  background: #f1f7ff;
  color: #405466;
  font-size: .86rem;
  line-height: 1.45;
}
.page-upload .upload-features li::before { display: none; }
.page-upload .upload-intro-links { margin-top: .9rem; }
.page-upload .upload-intro-links a {
  border-bottom-color: rgba(255,255,255,.3);
  color: #fff;
}
.page-upload .upload-intro-links a:hover {
  border-bottom-color: var(--c-amber);
  color: var(--c-amber);
}
.page-upload .trust-strip {
  padding: .85rem;
  margin-bottom: .9rem;
  background: rgba(255,255,255,.74);
}
.page-upload .trust-strip-title {
  margin-bottom: .5rem;
  font-size: .96rem;
  color: #102a43;
}
.page-upload .trust-points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
}
.page-upload .trust-point {
  padding: .65rem;
  border-radius: 8px;
  border: 1px solid rgba(218,230,240,.9);
  background: #fbfdff;
  box-shadow: none;
}
.page-upload .trust-point h3 {
  margin-bottom: .18rem;
  color: var(--c-primary);
  font-size: .94rem;
}
.page-upload .trust-point p {
  color: #5f6b76;
  font-size: .84rem;
  line-height: 1.55;
}
.page-upload .ad-slot {
  margin: 1.15rem auto;
  overflow: hidden;
}
.page-upload .ad-slot .adsbygoogle { max-width: 100%; }
.page-upload #uploadSection,
.page-upload #collectSection {
  --form-padding: 1.45rem;
  --section-line: #fdba74;
  --section-glow: rgba(249,115,22,.12);
  position: relative;
  padding: var(--form-padding);
  border: 2px solid var(--section-line);
  background: #fff;
  box-shadow: 0 18px 44px var(--section-glow);
  scroll-margin-top: 1rem;
}
.page-upload #collectSection {
  --section-line: #93c5fd;
  --section-glow: rgba(59,130,246,.12);
}
.page-upload #uploadSection h2,
.page-upload #collectSection h2 {
  margin-bottom: .9rem;
  color: #102a43;
  font-size: 1.28rem;
}
.page-upload .dropzone {
  border: 1.5px dashed rgba(47,95,134,.35);
  border-radius: 8px;
  padding: 2.4rem 1rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(245,250,255,.95));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.page-upload .dropzone:hover,
.page-upload .dropzone.dragover {
  transform: translateY(-2px);
  border-color: var(--c-warm);
  background: linear-gradient(180deg, #fff, #fff8f1);
  box-shadow: 0 14px 28px rgba(249,115,22,.12);
}
.page-upload .dropzone-icon {
  width: 42px;
  height: 42px;
  margin-bottom: .65rem;
  color: var(--c-warm);
  transition: transform .18s ease;
}
.page-upload .dropzone:hover .dropzone-icon,
.page-upload .dropzone.dragover .dropzone-icon { transform: translateY(-2px); }
.page-upload .dropzone-text {
  color: #102a43;
  font-size: clamp(1.2rem, 2.2vw, 1.35rem);
  font-weight: 900;
}
.page-upload .dropzone-select-hint {
  margin-top: .45rem; color: var(--c-primary);
  font-size: 1rem; font-weight: 700;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
}
.page-upload .dropzone:focus-visible {
  outline: 3px solid rgba(47,95,134,.48); outline-offset: 3px;
  border-color: var(--c-primary);
}
.page-upload .dropzone-details { margin-top: .85rem; }
.page-upload .dropzone-note {
  color: #71808f;
  font-size: .84rem;
  line-height: 1.65;
}
.page-upload .dropzone-limits { margin-top: .22rem; color: #536678; font-size: .78rem; }
.page-upload .link-btn {
  color: var(--c-primary);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.page-upload .upload-options {
  margin-top: 1rem;
  padding: .95rem;
  border-radius: 8px;
  border-color: rgba(199,216,232,.92);
  background: #f8fbff;
  box-shadow: none;
  backdrop-filter: none;
}
.page-upload .upload-options summary {
  color: #102a43;
  font-size: 1rem;
}
.page-upload .upload-options summary::before {
  width: .45rem;
  height: .45rem;
  border-radius: 999px;
  background: var(--c-warm);
}
.page-upload .options-lead,
.page-upload .options-subtle {
  color: #5f6b76;
  font-size: .88rem;
}
.page-upload .upload-settings-grid { gap: .7rem; }
.page-upload .upload-setting {
  padding: .8rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.page-upload .upload-setting-primary {
  border-color: rgba(249,115,22,.25);
  background: #fffaf5;
}
.page-upload .upload-setting-primary::before { display: none; }
.page-upload .upload-setting-primary:focus-within {
  transform: none;
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.page-upload .upload-setting-primary label {
  color: #20313f;
  font-size: .95rem;
}
.page-upload .setting-icon { color: var(--c-warm); }
.page-upload .btn-warm {
  margin-top: .95rem;
  min-height: 3rem;
  background: var(--c-warm);
  box-shadow: 0 10px 22px rgba(249,115,22,.24);
}
.page-upload .btn-warm:hover {
  transform: translateY(-1px);
  background: var(--c-warm-h);
}
.page-upload #collectSection .upload-setting-primary {
  border-color: rgba(59,130,246,.38);
  background: #f3f7ff;
}
.page-upload #collectSection .upload-setting-primary:focus-within {
  box-shadow: 0 0 0 3px rgba(59,130,246,.13);
}
.page-upload #collectSection .setting-icon { color: #3b82f6; }
.page-upload #collectSection .upload-setting-primary input[type="text"],
.page-upload #collectSection .upload-setting-primary select { border-color: #93c5fd; }
.page-upload #collectSection .upload-setting-primary input[type="text"]:focus,
.page-upload #collectSection .upload-setting-primary select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.page-upload #collectSection .btn-warm {
  background: linear-gradient(120deg, #38bdf8 0%, #3b82f6 100%);
  box-shadow: 0 10px 24px rgba(59,130,246,.25);
}
.page-upload #collectSection .btn-warm:hover {
  background: linear-gradient(120deg, #22b5f5 0%, #2563eb 100%);
  box-shadow: 0 12px 28px rgba(59,130,246,.34);
}
.page-upload .progress-bar-wrap {
  height: 10px;
  background: #e4eef8;
}
.page-upload .progress-bar {
  background: linear-gradient(90deg, var(--c-primary), var(--c-warm));
}
.page-upload .result-card {
  border-left: 0;
  border-top: 3px solid var(--c-accent);
}
.page-upload .faq-section {
  padding: 1.1rem;
  background: rgba(255,255,255,.75);
}
.page-upload .faq-item {
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

@keyframes upload-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .page-upload .upload-hero,
  .page-upload .trust-strip,
  .page-upload #uploadSection,
  .page-upload .result-card,
  .page-upload .faq-section,
  .page-upload .notice-box {
    animation: none;
  }
  .page-upload .dropzone,
  .page-upload .dropzone-icon,
  .page-upload .btn-warm {
    transition: none;
  }
  .page-upload .dropzone:hover,
  .page-upload .dropzone.dragover,
  .page-upload .btn-warm:hover {
    transform: none;
  }
}

/* ---------- Notice ---------- */
/* TIPS はできるだけ1行に収まる細い帯にする。アイコン・ラベル・本文を
   ベースライン揃えで横並びにし、枠線1本＋薄い背景だけの軽い見た目にする。 */
.notice-box {
  display: flex;
  gap: .5rem;
  align-items: baseline;
  padding: .5rem .8rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(191,219,254,.82);
  border-radius: 8px;
  background: rgba(240,248,255,.6);
  font-size: .85rem;
  line-height: 1.6;
}
.notice-icon {
  flex-shrink: 0;
  color: #0369a1;
  font-size: .92rem;
}
.notice-label {
  flex-shrink: 0;
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .06em;
  color: #0369a1;
}
.notice-text {
  margin: 0;
  min-width: 0;
  color: #475569;
  word-break: break-word;
}

/* ---------- Announcement Bar (アップロード/アルバムページの新着お知らせ帯) ---------- */
.announce-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .9rem;
  margin-bottom: .75rem;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(47,95,134,.1), rgba(47,95,134,.05));
  border: 1px solid rgba(191,219,254,.9);
  color: var(--c-text);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.announce-bar:hover { background: linear-gradient(120deg, rgba(47,95,134,.16), rgba(47,95,134,.08)); border-color: var(--c-primary); }
.announce-bar-label { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 700; color: var(--c-primary); white-space: nowrap; }
.announce-bar-date { flex: 0 0 auto; font-size: .82rem; color: var(--c-text2); white-space: nowrap; }
.announce-bar-title { flex: 1 1 auto; min-width: 0; font-size: .92rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce-bar-more { flex: 0 0 auto; color: var(--c-text2); font-size: .85rem; }

/* NEW バッジ（帯・一覧共通） */
.news-new {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: .05rem .4rem;
  border-radius: 999px;
  background: var(--c-warm);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* ---------- News List (/news) ---------- */
.news-item {
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(209,222,234,.75);
}
.news-item:first-of-type { padding-top: 0; }
.news-item:last-of-type { border-bottom: none; }
.news-item:target {
  background: rgba(224,242,254,.55);
  border-radius: 10px;
  padding: 1.1rem 1rem;
  margin: 0 -1rem;
}
.news-item-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; flex-wrap: wrap; }
.news-date { font-size: .85rem; color: var(--c-text2); }
.news-cat { display: inline-flex; align-items: center; padding: .1rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 600; background: rgba(226,232,240,.82); color: var(--c-text2); }
.news-cat-feature     { background: rgba(47,122,90,.14);  color: var(--c-accent-h); }
.news-cat-important   { background: rgba(239,68,68,.14);  color: var(--c-danger-h); }
.news-cat-maintenance { background: rgba(251,191,36,.18); color: #92400e; }
.news-title { margin: 0 0 .4rem; font-size: 1.1rem; }
.news-body { color: #334155; line-height: 1.8; word-break: break-word; }

/* ---------- Dropzone ---------- */
.dropzone { border: 2px dashed rgba(251,146,60,.55); border-radius: var(--radius); text-align: center; padding: 2.75rem 1.15rem; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(255,247,237,.75)); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 24px rgba(249,115,22,.07); }
.dropzone:hover, .dropzone.dragover { border-color: #f97316; background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,237,213,.7)); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 12px 32px rgba(249,115,22,.14); }
.dropzone-icon { color: #f97316; margin-bottom: .7rem; }
.dropzone-text { font-size: 1.14rem; font-weight: 700; }
.dropzone-sub { color: #475569; font-size: .98rem; margin-top: .35rem; }
.dropzone-note { color: #64748b; font-size: .9rem; margin-top: .55rem; }
/* ドロップ用とタップ用の見出しは両方 markup にあり、環境で出し分ける（下の coarse pointer 指定） */
.dropzone-text-tap { display: none; }

/* タッチ端末（スマホ・タブレット）向け。
   ファイルのドラッグ&ドロップができないので、D&D を前提にした広い落とし場所は
   ただの縦スペースになる。タップ領域として十分な高さだけ残して縮め、
   見出しも「タップして選択」に差し替える。
   幅ではなく入力デバイスで判定するのは、狭いだけのデスクトップ窓では
   D&D が普通に使えるため。
   .page-upload 側に同じ指定があるものは、詳細度で負けないよう両方書く。 */
@media (hover: none) and (pointer: coarse) {
  .dropzone,
  .page-upload .dropzone { padding: 1.15rem .9rem; }
  .dropzone-icon,
  .page-upload .dropzone-icon { width: 26px; height: 26px; margin-bottom: .3rem; }
  .dropzone-text,
  .page-upload .dropzone-text { font-size: 1.02rem; }
  .dropzone-text-drop { display: none; }
  .dropzone-text-tap { display: inline; }
  /* 見出し自体が「タップして選択」になるので、同じことを繰り返さない */
  .dropzone-select-hint,
  .page-upload .dropzone-select-hint { display: none; }
  .dropzone-details,
  .page-upload .dropzone-details { margin-top: .5rem; }
  .dropzone-note,
  .page-upload .dropzone-note { font-size: .74rem; line-height: 1.5; }
  .page-upload .dropzone-limits { font-size: .7rem; }
}


/* ---------- File List ---------- */
.file-list { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; max-height: 300px; overflow-y: auto; }
.file-item { display: flex; align-items: center; gap: .75rem; background: rgba(255,255,255,.62); border: 1px solid rgba(219,231,243,.8); border-radius: 10px; padding: .55rem .7rem; backdrop-filter: blur(8px); }
.file-preview { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(203,213,225,.65); }
.file-icon { font-size: 1.5rem; }
.file-info { flex: 1; min-width: 0; }
.file-name { display: block; font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: .86rem; color: var(--c-text2); }
.file-remove { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--c-danger); padding: .2rem .4rem; }
.file-item-more { text-align: center; font-size: .86rem; color: var(--c-text2); padding: .4rem 0; }

/* 動画サンプルの変換待ち */
.video-pending { position: relative; display: inline-block; max-width: 100%; }
.video-pending .photo-full { opacity: .55; }
.video-pending-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; width: max-content; max-width: 90%; text-align: center; background: rgba(15,23,42,.82); color: #fff; font-size: .92rem; line-height: 1.5; padding: .7rem 1rem; border-radius: 10px; }
.file-count { margin-top: .6rem; font-size: .96rem; color: var(--c-text2); }

.upload-options {
  margin-top: 1.15rem;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid rgba(191,219,254,.82);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,.78), rgba(239,247,255,.68));
  backdrop-filter: blur(12px);
}
.upload-options summary {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: #0c4a6e;
  letter-spacing: .01em;
}
.upload-options summary::before {
  content: "";
  width: 4px;
  height: 1.15em;
  border-radius: 2px;
  background: var(--grad-sunset);
}
.options-lead { margin: .8rem 0 1rem; color: #475569; font-size: .95rem; line-height: 1.7; }
.options-subtle { margin: 1.35rem 0 .7rem; color: #64748b; font-size: .88rem; line-height: 1.6; }
.upload-settings-grid { gap: .85rem; }
.upload-settings-grid .form-group { margin-bottom: 0; }
.upload-settings-grid-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upload-settings-grid-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upload-restrictions { margin-top: 1.2rem; }
.upload-restrictions summary {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding-top: .9rem; border-top: 1px solid var(--c-border);
  color: #526579; cursor: pointer; font-size: .9rem; font-weight: 700;
  list-style: none; user-select: none;
}
.upload-restrictions summary::-webkit-details-marker { display: none; }
.page-upload .upload-restrictions summary::before { display: none; }
.upload-restrictions summary::after {
  content: "+"; flex: 0 0 auto; display: grid; place-items: center;
  width: 1.65rem; height: 1.65rem; border-radius: 50%;
  background: #eaf2fb; color: var(--c-primary); font-size: 1.15rem; line-height: 1;
}
.upload-restrictions[open] summary::after { content: "−"; }
.upload-restrictions .upload-settings-grid { margin-top: .7rem; }
/* 追加投稿画面の任意入力（投稿者名・コメント）。D&Dエリアの下・アップロード
   ボタンの上に置くので、上下どちらとも間隔を空ける。コメントは文字数が多く
   なるので投稿者名より広く取る */
.upload-settings-grid-optional {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  margin: 1.35rem 0;
}
.upload-setting {
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(191,219,254,.74);
}
.upload-setting-primary {
  position: relative;
  overflow: hidden;
  padding-top: 1.15rem;
  background: linear-gradient(150deg, #ffffff, #fff7f0);
  border-color: rgba(251,146,60,.5);
  box-shadow: 0 16px 34px rgba(249,115,22,.12);
  transition: box-shadow .2s, transform .2s;
}
.upload-setting-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-sunset);
}
.upload-setting-primary:focus-within {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(249,115,22,.18);
}
.upload-setting-primary label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: 1.06rem;
  font-weight: 700;
  color: #0f172a;
}
.setting-icon { flex-shrink: 0; color: #f97316; }
.upload-setting-primary input[type="text"],
.upload-setting-primary select { min-height: 3rem; font-size: 1.03rem; background: rgba(255,255,255,.96); }
.upload-setting-primary input[type="text"]:focus,
.upload-setting-primary select:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 3px rgba(249,115,22,.16);
}
.upload-setting-secondary { background: linear-gradient(145deg, rgba(255,255,255,.58), rgba(241,248,255,.48)); }
.upload-setting-secondary label { color: #475569; font-size: .92rem; }
/* 閲覧パスワード等の任意項目。カード自体は控えめな配色にする一方、
   テキストボックスは何色の上に乗っても入力欄とわかるよう白背景で揃える */
.upload-setting-secondary input[type="text"],
.upload-setting-secondary input[type="password"],
.upload-setting-secondary input[type="number"],
.upload-setting-secondary select { background: #fff; }

/* ---------- Progress ---------- */
.progress-section { margin: 1rem 0; }
.progress-bar-wrap { background: var(--c-bg); border-radius: 50px; height: 12px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--c-primary), #6d8fb0 35%, var(--c-warm) 78%, var(--c-amber)); border-radius: 50px; transition: width .3s; }
.progress-bar.processing {
  background: repeating-linear-gradient(-45deg, var(--c-warm), var(--c-warm) 10px, var(--c-amber) 10px, var(--c-amber) 20px);
  background-size: 28px 28px;
  animation: progress-stripe .6s linear infinite;
}
@keyframes progress-stripe { 0% { background-position: 0 0; } 100% { background-position: 28px 0; } }
.progress-text { text-align: center; margin-top: .35rem; font-size: .92rem; color: var(--c-text2); }

/* ---------- Result ---------- */
.result-card { border-left: 4px solid var(--c-accent); }
.result-card h2 { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.25rem; margin-bottom: .6rem; }
.share-url-group { display: flex; gap: .5rem; margin-top: .75rem; }
.share-url-input { flex: 1; padding: .72rem .85rem; border: 1.5px solid rgba(191,219,254,.82); border-radius: 8px; font-size: .98rem; background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(241,248,255,.88)); }

/* ---------- 完了画面のアクション ---------- */
/* 完了画面ではボタンが3つ並ぶが、やりたい順は画面ごとに決まっている。
   .result-action-main を付けた1つだけを1段目に全幅で出し、残りを2段目に2列で並べる。
   flex + flex-wrap だと文字数しだいで折り返し位置が変わり、狭い画面で
   半端な幅のボタンが残るので grid で段を固定する。 */
.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .9rem;
}
.result-actions .btn { min-height: 3rem; }
.result-action-main {
  grid-column: 1 / -1;
  min-height: 3.4rem;
  font-size: 1.08rem;
  font-weight: 700;
}
/* .page-upload .btn-warm の上マージンは、この並びでは段が離れるだけなので打ち消す */
.page-upload .result-actions .btn-warm { margin-top: 0; }
.result-action-arrow { margin-left: .1rem; font-size: .95em; }
/* スマホでは2列にすると1列あたり150px前後しかなく、
   「QRコードを表示」がアイコンごと折り返すので縦積みにする */
@media (max-width: 519px) {
  .result-actions { grid-template-columns: 1fr; }
}
/* アップロード完了ページ（/upload/complete/{token}）。完了直後にやることだけを見せる */
.complete-narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.complete-back { margin-top: 1.2rem; font-size: .9rem; }

/* ---------- 追加投稿用コード（アップロード完了画面のみ表示） ---------- */
.append-code-box { margin-top: 1.1rem; padding: 1rem 1.15rem; border: 1.5px solid rgba(249,115,22,.45); border-radius: 14px; background: var(--c-warm-soft); text-align: center; }
.append-code-label { margin: 0 0 .5rem; font-size: 1.05rem; font-weight: 600; color: var(--c-text); }
/* コードとコピーボタンは1行に横並び。狭い画面では折り返して2行に落ちる */
.append-code-row { display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.append-code-value { font-size: 1.9rem; font-weight: 700; letter-spacing: .25em; line-height: 1.2; color: var(--c-text); }
.append-code-hint { display: flex; gap: .5rem; align-items: flex-start; text-align: left; margin: .85rem 0 0; padding-top: .75rem; border-top: 1px dashed rgba(249,115,22,.35); font-size: .85rem; line-height: 1.7; color: var(--c-text); }
.append-code-hint .ui-icon { flex-shrink: 0; margin-top: .2rem; font-size: 1rem; color: var(--c-warm); }
.append-code-hint strong { color: var(--c-warm-h); }

/* ---------- 写真を集める（モード切替タブ・作成フォーム・完了画面） ---------- */
/* タブに見えるがただのリンク。別ページに分けているのは、それぞれ独自の
   title / description / canonical を持たせるため（mode_tabs.php 参照） */
.mode-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: calc(-1 * var(--form-padding)) calc(-1 * var(--form-padding)) 1.4rem;
  padding: .7rem; gap: .65rem; border-bottom: 1px solid #d3e1ef;
  border-radius: 8px 8px 0 0; background: #edf3f9;
}
.mode-tab {
  --tab-start: #fb923c;
  --tab-end: #f97316;
  --tab-glow: rgba(249,115,22,.34);
  --tab-soft-start: #fff7ed;
  --tab-soft-end: #ffedd5;
  --tab-soft-border: #fdba74;
  --tab-soft-text: #c2410c;
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 62px; padding: 1rem .75rem; border: 1px solid var(--tab-soft-border);
  border-radius: 12px; text-decoration: none;
  background: linear-gradient(145deg, var(--tab-soft-start), var(--tab-soft-end));
  color: var(--tab-soft-text); text-align: center; line-height: 1.4;
  box-shadow: 0 8px 20px rgba(15,42,67,.1), inset 0 1px 0 rgba(255,255,255,.96);
  transition: transform .15s, box-shadow .15s, color .15s, border-color .15s;
}
.mode-tab[data-mode="collect"] {
  --tab-start: #38bdf8;
  --tab-end: #3b82f6;
  --tab-glow: rgba(59,130,246,.34);
  --tab-soft-start: #eff6ff;
  --tab-soft-end: #dbeafe;
  --tab-soft-border: #93c5fd;
  --tab-soft-text: #2563eb;
}
.mode-tab:hover {
  transform: translateY(-2px); border-color: var(--tab-start); color: var(--tab-soft-text);
  box-shadow: 0 13px 28px rgba(15,42,67,.16), inset 0 1px 0 rgba(255,255,255,.96);
}
.mode-tab .ui-icon { font-size: 1.25rem; color: inherit; }
.mode-tab-label { font-weight: 800; font-size: 1.25rem; color: inherit; white-space: nowrap; }
.mode-tab.is-current {
  border-color: rgba(255,255,255,.72);
  background: linear-gradient(145deg, var(--tab-start) 0%, var(--tab-end) 100%);
  color: #fff;
  transform: translateY(-2px);
  text-shadow: 0 1px 2px rgba(15,42,67,.18);
  box-shadow: 0 14px 30px var(--tab-glow), 0 5px 12px rgba(15,42,67,.14), inset 0 1px 0 rgba(255,255,255,.38);
}
.mode-tab.is-current:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px var(--tab-glow), 0 7px 14px rgba(15,42,67,.16), inset 0 1px 0 rgba(255,255,255,.4);
}
.mode-tab:active,
.mode-tab.is-current:active {
  transform: translateY(0) scale(.985);
  box-shadow: 0 7px 16px var(--tab-glow), 0 3px 8px rgba(15,42,67,.13), inset 0 1px 0 rgba(255,255,255,.3);
}
.mode-tab:focus-visible { outline: 3px solid #2f5f86; outline-offset: -5px; }
.mode-tab.is-current:focus-visible { outline-color: #fff; }

/* ---- バナー版（ヘッダー直下・ヒーローの上） ----
   フォーム上のタブ版が「行き先を変える」ものなのに対し、こちらは
   「2大機能が並んでいる」ことをページを開いた瞬間に伝えるためのもの。
   橙=送る / 青=集めるを保ちつつ、控えめな光彩と曲線で上品な奥行きを付ける。 */
.mode-tabs-banner {
  margin: 0 0 1rem;             /* カードの中ではないので負のマージンは要らない */
  padding: 0;
  gap: 0;                       /* 2色をぴったり半分ずつ突き合わせる */
  border: 1px solid rgba(255,255,255,.82); border-radius: 16px; overflow: hidden;
  background: rgba(255,255,255,.72);
  box-shadow: 0 20px 46px rgba(15,42,67,.14), 0 6px 16px rgba(15,42,67,.08);
}
.mode-tabs-banner .mode-tab {
  --banner-start: #f97316;
  --banner-mid: #e85d0c;
  --banner-end: #9a3412;
  --banner-glow-x: 12%;
  --banner-orbit-x: 88%;
  --banner-bg-position: 0% 42%;
  --banner-bg-position-hover: 9% 34%;
  min-height: 104px; padding: 1.25rem 1rem;
  border: 0; border-radius: 0;
  overflow: hidden; isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16) 0%, transparent 46%, rgba(15,42,67,.12) 100%),
    radial-gradient(circle at var(--banner-glow-x) 0%, rgba(255,255,255,.42) 0, rgba(255,255,255,.12) 24%, transparent 49%),
    linear-gradient(122deg, var(--banner-start) 0%, var(--banner-mid) 50%, var(--banner-end) 100%);
  background-size: 100% 100%, 145% 145%, 100% 100%;
  background-position: center, var(--banner-bg-position), center;
  color: #fff; text-align: left;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(15,42,67,.14);
  transform: none;
  transition: background-position .35s ease, filter .2s ease, transform .15s ease;
}
.mode-tabs-banner .mode-tab[data-mode="collect"] {
  --banner-start: #3b82f6;
  --banner-mid: #2563eb;
  --banner-end: #1e40af;
  --banner-glow-x: 88%;
  --banner-orbit-x: 12%;
  --banner-bg-position: 100% 42%;
  --banner-bg-position-hover: 91% 34%;
}
.mode-tabs-banner .mode-tab::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at var(--banner-orbit-x) 145%, transparent 0 58px, rgba(255,255,255,.19) 59px 60px, transparent 61px 83px, rgba(255,255,255,.1) 84px 85px, transparent 86px),
    linear-gradient(112deg, transparent 18%, rgba(255,255,255,.13) 44%, transparent 64%);
  opacity: .8;
  transition: opacity .25s ease, transform .35s ease;
}
.mode-tabs-banner .mode-tab > * { position: relative; z-index: 1; }
.mode-tabs-banner .mode-tab + .mode-tab { border-left: 1px solid rgba(255,255,255,.28); }
.mode-tabs-banner .mode-tab:hover {
  background-position: center, var(--banner-bg-position-hover), center;
  filter: brightness(1.035) saturate(1.02);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), inset 0 -1px 0 rgba(15,42,67,.14);
}
.mode-tabs-banner .mode-tab:hover::before { opacity: 1; transform: translate3d(-4px,-1px,0) scale(1.015); }
.mode-tabs-banner .mode-tab:active { transform: scale(.995); filter: brightness(.97); box-shadow: none; }
.mode-tabs-banner .mode-tab .ui-icon {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 2.8rem; height: 2.8rem; border: 1px solid rgba(255,255,255,.34); border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff; font-size: 1.45rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 6px 16px rgba(15,42,67,.12);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.mode-tabs-banner .mode-tab-body { display: flex; flex-direction: column; gap: .15rem; }
.mode-tabs-banner .mode-tab-label {
  font-family: 'Yu Gothic', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 900; line-height: 1.12; letter-spacing: .045em;
  font-feature-settings: "palt" 1;
  text-shadow: none;
}
.mode-tabs-banner .mode-tab-note { display: block; font-size: clamp(.76rem, 1.5vw, .88rem); font-weight: 600; opacity: .9; white-space: nowrap; }
/* 現在地は白い下線だけで示す。色の面積は左右同じままにしたいので、
   反対側を暗くしたり縮めたりはしない */
.mode-tabs-banner .mode-tab.is-current::after {
  content: ""; position: absolute; left: 1.25rem; right: 1.25rem; bottom: 5px;
  z-index: 2; height: 4px; border-radius: 999px; background: rgba(255,255,255,.94);
  box-shadow: 0 0 11px rgba(255,255,255,.7), 0 2px 5px rgba(15,42,67,.16);
}
.mode-tabs-banner .mode-tab:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

@media (prefers-reduced-motion: reduce) {
  .mode-tabs-banner .mode-tab,
  .mode-tabs-banner .mode-tab::before { transition: none; }
}

/* 説明文はバナー版だけのもの。タブ版では markup に残したまま隠す */
.mode-tab-note { display: none; }

/* 3ステップの説明。番号を丸で出し、見出しと補足を縦に積む */
.collect-steps { list-style: none; display: grid; gap: .6rem; margin: 1.1rem 0 0; padding: 0; }
.collect-steps li { display: flex; align-items: flex-start; gap: .7rem; }
.collect-step-num {
  flex: 0 0 auto; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-sunset); color: #fff; font-weight: 700; font-size: .9rem;
}
.collect-step-body { font-size: .96rem; line-height: 1.7; color: #344452; }
.collect-step-body strong { display: block; color: var(--c-text); }

/* 小さな3択と、選んだ項目に必要な補足・入力だけを表示する。 */
.collect-passcode { min-width: 0; border: 0; padding: 0; margin: 1.3rem 0; }
.collect-passcode legend { display: flex; align-items: center; gap: .4rem; font-size: .95rem; font-weight: 700; color: var(--c-text); padding: 0; }
.collect-passcode-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; max-width: 30rem; margin-top: .6rem; }
.collect-passcode .collect-radio {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; margin: 0; padding: .55rem .35rem; border: 1px solid #c3d2e0;
  border-radius: 7px; background: #f3f6fa; color: #465669; font-size: .9rem; cursor: pointer;
}
.collect-passcode .collect-radio:hover { border-color: #2f5f86; }
.collect-radio span { white-space: nowrap; }
.collect-radio input[type="radio"] { margin: 0; flex: 0 0 auto; accent-color: #1e3a5f; }
.collect-passcode .collect-radio:has(input:checked) { border-color: #1e3a5f; background: #1e3a5f; color: #fff; font-weight: 700; }
.collect-passcode .collect-radio:has(input:focus-visible) { outline: 3px solid #2f5f86; outline-offset: 2px; }
.collect-passcode-custom { margin-top: .65rem; }
.collect-passcode-input { max-width: 22rem; }
.collect-passcode [hidden] { display: none; }
.field-note { margin: .35rem 0 0; font-size: .82rem; color: var(--c-text2); line-height: 1.6; }

/* パスコード無しのアルバムで出す注意書き。append-code-box の代わりに入る */
.collect-open-note { display: flex; gap: .5rem; align-items: flex-start; text-align: left; margin: 1.1rem 0 0; padding: .8rem 1rem; border: 1px solid var(--c-border); border-radius: 12px; background: rgba(255,255,255,.72); font-size: .9rem; line-height: 1.7; }
.collect-open-note .ui-icon { flex-shrink: 0; margin-top: .15rem; color: var(--c-primary); }
.collect-next { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--c-border); text-align: left; }
.collect-next-title { margin: 0 0 .4rem; font-weight: 700; color: var(--c-text); }
.collect-next ol { margin: 0; padding-left: 1.3rem; font-size: .92rem; line-height: 1.9; color: #344452; }

/* ヒーロー内の3ステップは濃紺背景に合わせて白系の文字にする。 */
.page-collect .upload-intro-heading,
.page-collect .upload-intro-text { white-space: normal; }
.page-collect .upload-kicker,
.page-collect .upload-hero .collect-step-num {
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 58%, #1e40af 100%);
  box-shadow: 0 5px 14px rgba(37,99,235,.28), inset 0 1px 0 rgba(255,255,255,.2);
}
.page-collect .upload-kicker { border-color: rgba(147,197,253,.52); }
.page-upload .upload-hero .collect-step-body { color: rgba(255,255,255,.82); }
.page-upload .upload-hero .collect-step-body strong { color: #fff; }
/* 写真0枚のアルバム。ここでできることは「入れる」だけなので案内ごと主役にする */
.album-empty { margin: 0 0 1rem; padding: 2.2rem 1.25rem; border: 1.5px dashed rgba(249,115,22,.5); border-radius: 14px; background: var(--c-warm-soft); text-align: center; }
.album-empty-title { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--c-text); }
.album-empty-text { margin: .4rem 0 1.1rem; font-size: .95rem; line-height: 1.7; color: #344452; }

@media(max-width:540px) {
  .mode-tabs { gap: .45rem; padding: .55rem; }
  .mode-tab { min-height: 56px; gap: .4rem; padding: .85rem .4rem; }
  .mode-tab .ui-icon { font-size: 1.15rem; }
  .mode-tab-label { font-size: clamp(1rem, 4.5vw, 1.125rem); }
  /* バナー版は狭い画面でも左右の2分割を保つ（並んでいること自体が伝えたい情報）。
     タブ版の gap/padding を打ち消し、アイコンを上に載せた縦積みにして高さを詰める */
  .mode-tabs-banner { gap: 0; padding: 0; }
  .mode-tabs-banner .mode-tab { min-height: 84px; flex-direction: column; gap: .3rem; padding: .85rem .5rem; text-align: center; }
  .mode-tabs-banner .mode-tab .ui-icon { width: 2.05rem; height: 2.05rem; font-size: 1rem; }
  .mode-tabs-banner .mode-tab-body { align-items: center; gap: .1rem; }
  .mode-tabs-banner .mode-tab-label { font-size: clamp(1rem, 4.5vw, 1.15rem); }
  .mode-tabs-banner .mode-tab-note { display: none; }
  .mode-tabs-banner .mode-tab::before { opacity: .48; }
  .mode-tabs-banner .mode-tab:hover::before { opacity: .62; }
  .mode-tabs-banner .mode-tab.is-current::after { left: .75rem; right: .75rem; bottom: 4px; }
  .collect-passcode-choices { grid-template-columns: .7fr 1fr 1.3fr; }
  .collect-passcode .collect-radio { gap: .25rem; padding-inline: .2rem; font-size: .8rem; }
  .album-empty { padding: 1.6rem 1rem; }
}
/* ---------- Gallery ---------- */
.share-card { max-width: 100%; }
.share-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.share-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.share-actions form { display: contents; } /* ZIP一括ダウンロードをform化した際もボタンの並びを崩さない */
/* アルバム操作の2段目（押した先のページで完結する補助操作）。1段目と同じボタン体裁で右に寄せる */
.share-actions-sub { justify-content: flex-end; margin: -.25rem 0 1rem; padding-top: .75rem; border-top: 1px solid var(--c-border); }
/* データ追加はフィルターの下・ギャラリーの直前に左寄せで置く */
.album-add-action { margin: 0 0 1rem; }
.meta { color: var(--c-text2); font-size: .96rem; }

.upload-cta { margin-bottom: 1.2rem; padding: 1.15rem 1.25rem; border-radius: 14px; border: 1px solid rgba(191,219,254,.82); background: linear-gradient(160deg, rgba(255,255,255,.8), rgba(238,247,255,.7)); box-shadow: 0 14px 32px rgba(15,23,42,.05); backdrop-filter: blur(12px); display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.upload-cta-kicker { margin: 0 0 .25rem; color: var(--c-warm-h); font-size: .8rem; letter-spacing: .04em; font-weight: 700; }
.upload-cta-title { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--c-text); line-height: 1.45; }
.upload-cta-text { margin: .25rem 0 0; font-size: .96rem; color: #344452; line-height: 1.7; }
.upload-cta-link { flex-shrink: 0; text-decoration: none; color: #fff; font-size: .95rem; font-weight: 700; background: var(--grad-sunset); border-radius: 999px; padding: .72rem 1.15rem; box-shadow: 0 8px 20px rgba(249,115,22,.28); transition: filter .15s, transform .15s, box-shadow .15s; }
.upload-cta-link:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(249,115,22,.36); }

.gallery-grid { display: flex; flex-wrap: wrap; gap: 2px; }
.gallery-item { overflow: hidden; background: var(--c-surface); transition: opacity .15s; flex-grow: 0; flex-shrink: 0; position: relative; }
.gallery-item:hover { opacity: .88; }
.thumb-link { display: block; text-decoration: none; width: 100%; height: 100%; }
.thumb-container { width: 100%; height: 100%; overflow: hidden; background: #1a1a2e; position: relative; }
.thumb-container img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2.5rem; color: rgba(255,255,255,.85); text-shadow: 0 2px 8px rgba(0,0,0,.5); pointer-events: none; }
/* Justified gallery: hide items until JS layout runs */
.gallery-grid:not(.justified) .gallery-item { opacity: 0; animation: galleryFallback 0s 1.5s forwards; }
@keyframes galleryFallback { to { opacity: 1; } }
.gallery-grid.justified .gallery-item { animation: none; }
/* 安全網: JS の justified レイアウトが未適用でも原寸大で巨大化させず2列で縮退する */
.gallery-grid:not(.justified) .gallery-item { width: calc(50% - .5px); aspect-ratio: 1 / 1; }

/* 追加投稿のグループ区切り。囲まず水平線のみで区切る。flex-basis:100% の
   flex アイテムにすることで必ず単独行として折り返させ、justified の行組みが
   区切りをまたがないようにする（実際のセグメント分割は app.js 側）。 */
.gallery-divider { flex: 0 0 100%; width: 100%; flex-shrink: 0; box-sizing: border-box; margin: 1.1rem 0 .6rem; padding-top: .7rem; border-top: 1px solid var(--c-border); display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .7rem; font-size: 1rem; }
.gallery-divider:first-child { margin-top: 0; }
.gallery-divider-title { font-weight: 700; font-size: 1.12rem; color: var(--c-text); }
.gallery-divider-meta { font-size: .95rem; color: var(--c-text2); }
.gallery-grid:not(.justified) .gallery-divider { opacity: 0; animation: galleryFallback 0s 1.5s forwards; }
.gallery-grid.justified .gallery-divider { animation: none; }
.gallery-divider.filtered-out { display: none; }

/* ---------- ZIP File Icon ---------- */
.zip-icon-container { width: 100%; height: 100%; background: linear-gradient(135deg, #1e293b 0%, #334155 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; }
.zip-icon-container .zip-icon-svg { width: 56px; height: 56px; opacity: .9; }
.zip-icon-container .zip-icon-label { color: rgba(255,255,255,.7); font-size: .75rem; font-weight: 500; text-align: center; padding: 0 .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90%; }
/* .photo-viewer 自体は背景なし(下記)になったため、ZIP表示だけ自前で暗い背景を持つ
   （中の文字がrgba(255,255,255,..)で白系のため、明るい背景だと読めなくなる） */
.photo-viewer .zip-icon-detail { width: 100%; background: linear-gradient(135deg, #1e293b 0%, #334155 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem; gap: 1rem; }
.photo-viewer .zip-icon-detail .zip-icon-svg { width: 96px; height: 96px; opacity: .9; }
.photo-viewer .zip-icon-detail .zip-detail-name { color: rgba(255,255,255,.85); font-size: 1.1rem; font-weight: 500; }
.photo-viewer .zip-icon-detail .zip-detail-size { color: rgba(255,255,255,.55); font-size: .9rem; }
.photo-viewer .zip-icon-detail .btn { margin-top: .5rem; }

/* ---------- Photo Detail ---------- */
.photo-detail { padding-top: .75rem; }
.photo-nav-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
/* 以前は背景 #111 で写真を囲んでいたが、アスペクト比が合わない写真の余白から
   黒が透けて見えて不評だったため、背景を無くしてカードの地色に馴染ませる */
.photo-viewer { text-align: center; margin-bottom: 1rem; overflow: hidden; min-height: 50vh; display: flex; align-items: center; justify-content: center; }
/* カラーラベルの枠は .photo-viewer(縦横比が違う写真ではみ出た分だけ余白ができる箱)
   ではなく、実際に写る写真本体(.photo-full / zip表示)に付ける。外側の箱に付けると、
   余白の分だけ枠と写真の間に隙間が空いて見えてしまうため */
.photo-full, .photo-viewer .zip-icon-detail { border: 4px solid transparent; }
.photo-viewer[data-color-label="red"]    .photo-full, .photo-viewer[data-color-label="red"]    .zip-icon-detail { border-color: #ef4444; }
.photo-viewer[data-color-label="yellow"] .photo-full, .photo-viewer[data-color-label="yellow"] .zip-icon-detail { border-color: #eab308; }
.photo-viewer[data-color-label="green"]  .photo-full, .photo-viewer[data-color-label="green"]  .zip-icon-detail { border-color: #22c55e; }
.photo-viewer[data-color-label="blue"]   .photo-full, .photo-viewer[data-color-label="blue"]   .zip-icon-detail { border-color: #3b82f6; }
.photo-viewer[data-color-label="purple"] .photo-full, .photo-viewer[data-color-label="purple"] .zip-icon-detail { border-color: #a855f7; }
/* width:100% を付けると、containでできた余白から親の黒背景が透けて見える(枠に見える)ため付けない。
   横幅は max-width + .photo-viewer 側のflex中央寄せで揃う */
.photo-full { max-width: 100%; max-height: 75vh; object-fit: contain; }
.preview-notice { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .35rem; text-align: center; font-size: .98rem; background: linear-gradient(145deg, rgba(240,249,255,.9), rgba(226,242,255,.82)); border: 1.5px solid rgba(125,211,252,.88); border-radius: 10px; color: #0f4c81; padding: .8rem 1.2rem; margin: .75rem 0 1rem; line-height: 1.6; }
/* ファイル名以下の情報は水平線で上と区切る */
.photo-info { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--c-border); }
.photo-title { font-size: 1.35rem; margin-bottom: .55rem; }
.photo-meta { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; font-size: .95rem; color: var(--c-text2); }

/* ---------- Photo Pager ---------- */
.photo-pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1.5rem 0; padding-top: 1rem; border-top: 1px solid var(--c-border); }
.photo-pager-top { margin-top: 0; padding-top: 0; border-top: none; }
.photo-pager .btn { margin: 0; }
.photo-pager .disabled { opacity: .4; pointer-events: none; }

/* ---------- EXIF ---------- */
.exif-section { margin-top: 1rem; }
.exif-section summary { cursor: pointer; font-weight: 500; color: var(--c-primary); }
.exif-content { margin-top: .75rem; }
.exif-row { display: flex; padding: .42rem 0; border-bottom: 1px solid var(--c-bg); font-size: .96rem; }
.exif-label { font-weight: 500; width: 10rem; flex-shrink: 0; }
.exif-value { color: var(--c-text2); word-break: break-all; }
.exif-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.exif-table th, .exif-table td { text-align: left; padding: .3rem .5rem; border-bottom: 1px solid var(--c-bg); }
.exif-section-head { background: var(--c-bg); font-weight: 600; }
.exif-key { font-weight: 500; white-space: nowrap; width: 12rem; }

/* ---------- Lightbox (Google Photos風) ---------- */
/* --lb-reel-h はリールの実高さ（サムネ60px + 枠4px + 上下パディング .6rem×2 ≒ 84px）。
   写真の下端をこの帯の上で止めるため、値はここ1か所で持つ */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.95); z-index: 1000; display: flex; align-items: center; justify-content: center; --lb-reel-h: 84px; }
.lightbox.lb-fade-in { animation: lbFadeIn .3s ease; }
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-img-wrap { display: flex; align-items: center; justify-content: center; width: 92vw; height: 92vh; overflow: hidden; will-change: transform, opacity; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; transform-origin: center center; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; will-change: transform; }
.lightbox-close { position: absolute; top: .8rem; right: .8rem; background: rgba(0,0,0,.4); border: none; color: #fff; font-size: 1.8rem; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%; cursor: pointer; z-index: 1001; transition: background .2s; }
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1); border: none; color: #fff; font-size: 1.6rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; z-index: 1001; transition: background .2s, opacity .3s; }
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-counter { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: .85rem; z-index: 1001; pointer-events: none; transition: bottom .2s ease; }

/* サムネイルリール（トグル式） */
.lightbox-reel-toggle { position: absolute; top: .8rem; left: .8rem; background: rgba(0,0,0,.4); border: none; color: #fff; font-size: 1.2rem; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%; cursor: pointer; z-index: 1001; transition: background .2s; }
.lightbox-reel-toggle:hover { background: rgba(255,255,255,.2); }
.lightbox-reel-toggle[aria-expanded="true"] { background: rgba(255,255,255,.35); }
.lightbox-reel { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; overflow-x: auto; overflow-y: hidden; background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0)); z-index: 1001; -webkit-overflow-scrolling: touch; }
.lightbox-reel[hidden] { display: none; }
.lb-reel-thumb { flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; opacity: .55; line-height: 0; transition: opacity .2s, border-color .2s; }
.lb-reel-thumb img { display: block; height: 60px; width: auto; object-fit: cover; border-radius: 4px; }
.lb-reel-thumb:hover { opacity: .85; }
.lb-reel-thumb.is-active { opacity: 1; border-color: #fff; }
/* 帯のぶんを下端に確保してから、その残りの中で写真を中央に置く。
   高さを縮めるだけだと写真は画面全体の中央に留まったままで、帯と重なる */
.lightbox.reel-open { padding-bottom: var(--lb-reel-h); }
.lightbox.reel-open .lightbox-img-wrap { height: calc(92vh - var(--lb-reel-h)); }
.lightbox.reel-open .lightbox-counter { bottom: calc(.8rem + var(--lb-reel-h)); }
.lightbox.reel-open .lightbox-nav { top: calc(50% - var(--lb-reel-h) / 2); }

@media (max-width: 768px) {
  .lightbox { --lb-reel-h: 68px; }  /* サムネ48px + 枠4px + 上下パディング .4rem×2 */
  .lightbox-nav { display: none; }
  .lightbox-counter { bottom: .5rem; font-size: .75rem; }
  .lightbox-reel-toggle { width: 36px; height: 36px; line-height: 36px; font-size: 1.05rem; }
  .lightbox-reel { padding: .4rem .6rem; gap: .4rem; }
  .lb-reel-thumb img { height: 48px; }
  /* カウンターの基準がPCの.8remと違うのでここだけ残す */
  .lightbox.reel-open .lightbox-counter { bottom: calc(.5rem + var(--lb-reel-h)); }
}

/* ---------- Alerts ---------- */
.alert { padding: .8rem 1rem; border-radius: 10px; font-size: .95rem; margin-bottom: .75rem; }
.alert-danger { background: #fef2f2; color: var(--c-danger); border: 1px solid #fecaca; }
.alert-warning { background: linear-gradient(145deg, rgba(240,249,255,.92), rgba(226,242,255,.84)); color: #0f4c81; border: 1px solid rgba(125,211,252,.88); }
.alert-success { background: #f0fdf4; color: var(--c-accent); border: 1px solid #bbf7d0; }
.alert strong { display: inline-flex; align-items: center; gap: .45rem; }

/* ---------- お問い合わせフォームのハニーポット ----------
   display:none だと一部ボットが「非表示」を検知して回避するため、
   画面外への配置で視覚的にのみ隠す（レイアウトには影響させない）。 */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.text-danger { color: var(--c-danger); }
.text-success { color: var(--c-accent); }
.text-primary { color: var(--c-primary); }
.delete-form .delete-result { margin-top: .5rem; font-size: .92rem; }
.new-link-desc { font-size: .95rem; color: var(--c-text2); line-height: 1.8; margin-bottom: .75rem; }
.sub-section { border-top: 1px solid var(--c-border); padding-top: 1rem; }
.sub-section summary { cursor: pointer; font-weight: 500; user-select: none; font-size: 1rem; }

/* ---------- Filter Bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: center; padding: .9rem 1rem; margin-bottom: 1rem; background: linear-gradient(160deg, rgba(255,255,255,.8), rgba(238,247,255,.68)); border: 1px solid rgba(191,219,254,.82); border-radius: 12px; box-shadow: 0 12px 28px rgba(15,23,42,.04); backdrop-filter: blur(10px); }
.filter-group { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.filter-label { font-size: .92rem; font-weight: 500; color: var(--c-text2); margin-right: .15rem; }
/* 折りたたみボタンはピル型の見た目だけ .filter-btn と共有する。
   .filter-btn を付けないのは、filterBar の委譲ハンドラに拾わせないため */
.filter-btn,
.filter-toggle { display: inline-flex; align-items: center; gap: .35rem; background: var(--c-surface); border: 1.5px solid var(--c-border); color: var(--c-text2); padding: .4rem .75rem; border-radius: 999px; font-size: .92rem; cursor: pointer; transition: all .15s; font-family: var(--font); }
.filter-toggle:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter-toggle[aria-expanded="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.filter-summary { font-size: .92rem; color: var(--c-primary); font-weight: 500; }
/* 展開時は1行占有して、条件のグループをボタンの下に並べる */
.filter-panel { flex: 0 0 100%; display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: center; }
/* 既定: PCは展開 / スマホは折りたたみ。ユーザーが開閉すると #filterBar の状態クラスが勝つ */
@media (max-width: 768px) { .filter-panel { display: none; } }
#filterBar.filter-open .filter-panel { display: flex; }
#filterBar.filter-collapsed .filter-panel { display: none; }
.filter-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter-btn.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.filter-btn.filter-pick.active { background: var(--c-accent); border-color: var(--c-accent); }
.filter-btn.filter-reject.active { background: var(--c-danger); border-color: var(--c-danger); }
.filter-check { display: flex; align-items: center; gap: .35rem; font-size: .92rem; cursor: pointer; }
.filter-check input { cursor: pointer; }
.selected-count { font-size: .9rem; color: var(--c-primary); font-weight: 500; }

/* Color filter dots (multi-select) in filter bar */
.color-filter-dot { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid transparent; cursor: pointer; transition: all .15s; flex-shrink: 0; padding: 0; }
.color-filter-dot:hover { transform: scale(1.18); }
.color-filter-dot.active { border-color: var(--c-text); box-shadow: 0 0 0 1.5px rgba(255,255,255,.9), 0 0 0 3.5px currentColor; }
.color-filter-dot.color-red    { background: #ef4444; color: #ef4444; }
.color-filter-dot.color-yellow { background: #eab308; color: #eab308; }
.color-filter-dot.color-green  { background: #22c55e; color: #22c55e; }
.color-filter-dot.color-blue   { background: #3b82f6; color: #3b82f6; }
.color-filter-dot.color-purple { background: #a855f7; color: #a855f7; }

/* ---------- Bulk Action Bar ---------- */
/* .card の backdrop-filter は fixed の包含ブロックになるため、バーは必ず .card の外に置く */
.bulk-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; background: var(--c-primary); color: #fff; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgba(0,0,0,.2); }
.bulk-bar form { display: flex; align-items: center; justify-content: center; gap: .75rem; max-width: var(--max-w); margin: 0 auto; }
.bulk-info { font-size: .92rem; font-weight: 500; }
.btn-ghost-white { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
.btn-ghost-white:hover { background: rgba(255,255,255,.15); }

/* ---------- Bulk Label Bar (選択時・画面上部フローティング) ---------- */
/* .bulk-bar と同じく .card の外に置くこと（backdrop-filter が fixed の包含ブロックになる） */
.label-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; background: var(--c-primary); color: #fff; padding: calc(.5rem + env(safe-area-inset-top)) 1rem .5rem; box-shadow: 0 2px 12px rgba(0,0,0,.2); }
.label-bar[hidden] { display: none; }
.label-bar-inner { display: flex; align-items: center; justify-content: center; gap: .4rem .9rem; flex-wrap: wrap; max-width: var(--max-w); margin: 0 auto; }
.label-bar-count { font-size: .92rem; font-weight: 500; }
.label-bar-group { display: flex; align-items: center; gap: .35rem; }
.label-bar-title { font-size: .85rem; opacity: .85; }
.label-bar .color-label-btn { width: 24px; height: 24px; border-width: 2px; }
.label-bar .btn-bulk-pick   { background: var(--c-accent); color: #fff; }
.label-bar .btn-bulk-reject { background: var(--c-danger); color: #fff; }
/* 送信中は二重適用を防ぐ */
.label-bar.is-busy { opacity: .6; pointer-events: none; }

/* ---------- Select Mode Bar (mobile-only) ---------- */
.select-bar { display: none; }            /* PCでは非表示 */
.select-bar-actions { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; }
/* hidden属性をdisplay指定より優先（入口ボタン/操作群の表示切替を確実に） */
.select-bar [hidden] { display: none !important; }

/* フローティングバーに最下段の写真とフッターが隠れないよう余白を確保 */
.page-share.bulk-bar-open { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }

/* トースト（JS生成）。下部バー表示中は重ならないよう持ち上げる */
.toast { bottom: 2rem; }
.bulk-bar-open .toast { bottom: 6rem; }

/* ---------- Gallery Item - Marking ---------- */
.gallery-item { position: relative; -webkit-touch-callout: none; }
.item-checkbox-wrap { position: absolute; top: .4rem; left: .4rem; z-index: 10; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.85); border-radius: 4px; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.item-checkbox-wrap:has(input:checked) { opacity: 1; }
.item-checkbox { cursor: pointer; width: 16px; height: 16px; accent-color: var(--c-primary); }

/* Pick/Reject Overlay (top-right of thumbnail) */
.pick-overlay { position: absolute; top: .35rem; right: .4rem; z-index: 8; display: flex; gap: .2rem; }
.pick-btn { width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; font-size: .95rem; display: flex; align-items: center; justify-content: center; transition: all .15s; opacity: 0; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pick-btn.active { opacity: 1 !important; }
.pick-yes { background: rgba(255,255,255,.9); color: var(--c-text2); }
.pick-yes:hover { background: var(--c-accent); color: #fff; }
.pick-yes.active { background: var(--c-accent); color: #fff; }
.pick-no { background: rgba(255,255,255,.9); color: var(--c-text2); }
.pick-no:hover { background: var(--c-danger); color: #fff; }
.pick-no.active { background: var(--c-danger); color: #fff; }

/* タッチ端末では長押しで :hover がエミュレートされ、触れないチェックボックスが
   出てしまうため、ホバーによる表示はポインタ端末限定にする */
@media (hover: hover) {
  .gallery-item:hover .item-checkbox-wrap { opacity: 1; }
  .gallery-item:hover .pick-btn { opacity: .85; }
}

/* Star rating in gallery footer */
/* バッジは表示専用。帯がサムネのリンク領域（下端）を奪わないようにする */
.gallery-item-footer { padding: .35rem .6rem; display: flex; justify-content: space-between; align-items: center; gap: .3rem; position: absolute; bottom: 0; left: 0; right: 0; z-index: 5; background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; pointer-events: none; }
.star-rating { display: flex; gap: .1rem; }
.star-num { font-size: .94rem; color: #fbbf24; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.star-rating .star { font-size: .95rem; color: var(--c-border); cursor: pointer; transition: color .1s; user-select: none; line-height: 1; }
.star-rating .star:hover,
.star-rating .star.hover { color: #fbbf24; }
.star-rating .star.filled { color: #fbbf24; }
.item-actions { display: flex; gap: .45rem; flex-shrink: 0; align-items: center; }
.item-actions .icon-btn { color: rgba(255,255,255,.85); }
/* コメント・いいね件数バッジ（控えめにフッター帯へ統合） */
.item-actions .stat-badge { display: inline-flex; align-items: center; gap: .15rem; font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.92); text-shadow: 0 1px 3px rgba(0,0,0,.5); line-height: 1; }
.item-actions .stat-badge .ui-icon { font-size: .82rem; }

/* Selection mode */
.gallery-grid.select-mode .gallery-item { cursor: pointer; }
.gallery-grid.select-mode .thumb-link { pointer-events: none; }
.gallery-grid.select-mode .item-actions a { pointer-events: none; opacity: .4; }
.gallery-grid.select-mode .item-checkbox-wrap { opacity: 1; }

/* Pick status visual indicators on items */
.gallery-item[data-pick="picked"] { box-shadow: 0 0 0 2.5px var(--c-accent), 0 1px 6px rgba(0,0,0,.07); }
.gallery-item[data-pick="rejected"] { opacity: .5; }
.gallery-item[data-pick="rejected"]:hover { opacity: .8; }
.gallery-item.filtered-out { display: none; }

/* Color label frame — ::after 疑似要素で画像の上に「色枠＋白ハロー」を重ねる。
   inset:0 + border(内向き) なので要素の外に出ず、隣の写真と重ならない。
   z-index 6 = 画像・gallery-item-footer(5) の上 / pick-overlay(8)・checkbox(10) の下。 */
.gallery-item[data-color]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  border: 4px solid transparent;
  border-radius: inherit;
  box-sizing: border-box;
}
.gallery-item[data-color="red"]::after    { border-color: #ef4444; box-shadow: inset 0 0 0 2px rgba(255,255,255,.82); }
.gallery-item[data-color="yellow"]::after { border-color: #ca8a04; box-shadow: inset 0 0 0 2px rgba(255,255,255,.82); }
.gallery-item[data-color="green"]::after  { border-color: #16a34a; box-shadow: inset 0 0 0 2px rgba(255,255,255,.82); }
.gallery-item[data-color="blue"]::after   { border-color: #2563eb; box-shadow: inset 0 0 0 2px rgba(255,255,255,.82); }
.gallery-item[data-color="purple"]::after { border-color: #9333ea; box-shadow: inset 0 0 0 2px rgba(255,255,255,.82); }

/* ---------- Photo Detail Rating ---------- */
.photo-rating { margin-bottom: 1rem; position: relative; }
.photo-rating-row { display: flex; align-items: center; justify-content: center; gap: 1rem 1.25rem; flex-wrap: wrap; padding: .85rem; background: linear-gradient(160deg, rgba(255,255,255,.78), rgba(237,246,255,.72)); border: 1px solid rgba(191,219,254,.74); border-radius: 12px; backdrop-filter: blur(10px); }
/* 採用/不採用・星・カラーを総称して「ラベル」と呼ぶ。行頭の見出し */
.photo-rating-label { font-size: .92rem; font-weight: 600; color: var(--c-text2); }
.photo-pick-buttons { display: flex; gap: .5rem; }
/* 採用/不採用・星・カラーのトリガーは高さ36pxで完全にそろえる。
   PC は「採用/不採用」の文字も出す（スマホはアイコンのみ＝末尾のメディアクエリで span を隠す） */
.pick-btn-lg { height: 36px; padding: 0 .85rem; border-radius: 999px; border: 1.5px solid var(--c-border); background: var(--c-surface); cursor: pointer; font-size: .95rem; line-height: 1; font-family: var(--font); transition: all .15s; display: flex; align-items: center; gap: .35rem; }
.pick-btn-lg .ui-icon { font-size: 1.05rem; }
.pick-btn-lg:hover { border-color: var(--c-primary); }
.pick-btn-lg.pick-yes.active { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.pick-btn-lg.pick-no.active { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }

/* PC はインラインの星＋色玉（従来表示）、スマホはドロップダウン。表示切替は末尾のメディアクエリ */
.label-inline { display: inline-flex; align-items: center; gap: 1rem 1.15rem; }
.photo-star-rating { display: flex; gap: .2rem; }
.star-lg { font-size: 1.55rem; line-height: 1; color: var(--c-border); cursor: pointer; transition: color .15s; user-select: none; }
.star-lg:hover, .star-lg.hover { color: #fbbf24; }
.star-lg.filled { color: #fbbf24; }
.star-lg .ui-icon { pointer-events: none; }
.photo-color-labels { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

/* 星・カラーのドロップダウン（スマホ用）。トリガーは現在値を絵で見せる。
   メニューはトリガー下に浮かせる */
.label-dd { display: inline-flex; }
.label-dd-trigger { height: 36px; display: inline-flex; align-items: center; gap: .4rem; padding: 0 .55rem; border: 1.5px solid var(--c-input-border); border-radius: 8px; background: var(--c-surface); cursor: pointer; font-family: var(--font); line-height: 1; }
.label-dd-trigger:hover { border-color: var(--c-primary); }
.label-dd-trigger[aria-expanded="true"] { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(74,144,217,.15); }
.dd-caret { font-size: .7rem; color: var(--c-text2); }
.dd-stars { display: inline-flex; align-items: center; gap: 1px; font-size: .95rem; line-height: 1; }
.dd-stars .bi-star { color: var(--c-border); }
.dd-stars .bi-star-fill { color: #fbbf24; }
.dd-color-dot { width: 16px; height: 16px; border-radius: 50%; background: transparent; display: inline-flex; align-items: center; justify-content: center; }
/* 未選択は◯に斜線（メニューの「なし」と同じ bi-slash-circle）。色が付いたら塗りつぶし、斜線は隠す */
.dd-color-dot[data-color=""] .bi-slash-circle { font-size: 16px; line-height: 1; color: var(--c-text2); }
.dd-color-dot:not([data-color=""]) .bi-slash-circle { display: none; }
.dd-color-dot[data-color="red"]    { background: #ef4444; }
.dd-color-dot[data-color="yellow"] { background: #eab308; }
.dd-color-dot[data-color="green"]  { background: #22c55e; }
.dd-color-dot[data-color="blue"]   { background: #3b82f6; }
.dd-color-dot[data-color="purple"] { background: #a855f7; }

/* メニューはラベルカード(.photo-rating)の直下・中央に1つだけ浮かせる。
   トリガーの位置に依存しないので、狭い画面でも画面外に出ない */
.label-dd-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; z-index: 30; display: flex; align-items: center; gap: .4rem; padding: .5rem .7rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px; box-shadow: 0 10px 28px rgba(15,23,42,.14); white-space: nowrap; }
.label-dd-menu[hidden] { display: none; }
.dd-clear { border: none; background: none; color: var(--c-text2); font-size: .82rem; font-family: var(--font); cursor: pointer; padding: .2rem .35rem; border-radius: 6px; }
.dd-clear:hover { background: var(--c-bg); color: var(--c-text); }
.dd-star-row { display: inline-flex; gap: .1rem; }
.dd-star { font-size: 1.5rem; line-height: 1; color: var(--c-border); cursor: pointer; }
.dd-star.on { color: #fbbf24; }
.dd-color-opt { flex-shrink: 0; }
.dd-color-opt.sel { border-color: var(--c-text); border-width: 3.5px; transform: scale(1.12); }
.dd-color-none { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--c-border); background: var(--c-surface); display: inline-flex; align-items: center; justify-content: center; color: var(--c-text2); cursor: pointer; padding: 0; }
.dd-color-none.sel { border-color: var(--c-text); color: var(--c-text); }
/* PC はインライン表示なのでドロップダウンは隠す */
@media (min-width: 769px) { .label-dd { display: none; } }

/* ---------- Color Labels (bulk label-bar で共用) ---------- */
.color-label-btn { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid transparent; cursor: pointer; transition: all .15s; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); position: relative; }
.color-label-btn:hover { transform: scale(1.15); }
.color-label-btn.active { 
  border-color: var(--c-text); 
  border-width: 3.5px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 0 8px 0 currentColor, inset 0 0 0 1px rgba(0,0,0,.1); 
  transform: scale(1.15);
}
.color-label-btn.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 18px;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  line-height: 1;
}
.color-label-btn.color-red    { background: #ef4444; }
.color-label-btn.color-yellow { background: #eab308; }
.color-label-btn.color-green  { background: #22c55e; }
.color-label-btn.color-blue   { background: #3b82f6; }
.color-label-btn.color-purple { background: #a855f7; }

/* ---------- いいね・コメント (Photo Detail) ---------- */
.photo-social { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--c-border); }
/* 写真直下: いいね(左) / シェア・ダウンロード(右) */
/* 写真直下: いいねは中央、シェア・ダウンロードは右。空の1列目で左右のバランスを取る */
.photo-actions-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; margin: .75rem 0 1rem; }
.photo-actions-row .photo-like-btn { grid-column: 2; }
.photo-actions-row .photo-nav-actions { grid-column: 3; justify-self: end; }
.photo-like-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem 1.1rem; border: 1.5px solid var(--c-border); border-radius: 999px;
  background: var(--c-surface); color: var(--c-text2); font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.photo-like-btn:hover { border-color: var(--c-danger); color: var(--c-danger); }
.photo-like-btn .ui-icon { font-size: 1.1rem; transition: transform .15s; }
.photo-like-btn.liked { border-color: var(--c-danger); color: var(--c-danger); background: #fef2f2; }
.photo-like-btn.liked .ui-icon { transform: scale(1.1); }
.photo-like-btn .like-count { min-width: 1.2em; text-align: center; }

/* コメントの下に置く「アルバムに戻る」 */
.photo-back-row { margin-top: 1.25rem; }

/* この写真をシェア モーダル */
.modal-box.share-sheet { max-width: 380px; }
.share-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: .5rem; margin-top: 1rem; }
.share-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: .7rem .4rem; border: 1.5px solid var(--c-border); border-radius: 10px; background: var(--c-surface); color: var(--c-text); font-size: .8rem; font-family: var(--font); text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s; }
.share-opt[hidden] { display: none; }
.share-opt:hover { border-color: var(--c-primary); background: var(--c-bg); }
.share-opt i { font-size: 1.4rem; }
.share-qr { margin-top: 1rem; text-align: center; }
.share-qr-box { display: inline-block; padding: 14px; background: #fff; border-radius: 10px; line-height: 0; }
.share-qr-box canvas, .share-qr-box img { width: 200px; height: 200px; }
.share-qr .btn { margin-top: .6rem; }

.photo-comments { max-width: 640px; margin: 0 auto; }
.comments-title { font-size: 1.1rem; margin-bottom: .75rem; }
.comments-title .comment-count { color: var(--c-text2); font-weight: 400; font-size: .95rem; }
.comment-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.comment-item { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .55rem .8rem; background: var(--c-bg); border-radius: 8px; }
.comment-body { word-break: break-word; flex: 1; }
.comment-time { flex-shrink: 0; font-size: .8rem; color: var(--c-text2); white-space: nowrap; }
.comment-empty { color: var(--c-text2); font-size: .95rem; padding: .25rem 0; }
.comment-form { display: flex; gap: .5rem; }
.comment-input { flex: 1; padding: .55rem .8rem; border: 1.5px solid var(--c-border); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.comment-input:focus { outline: none; border-color: var(--c-primary); }
.comment-form .btn { flex-shrink: 0; }

/* ---------- About Page ---------- */
.about-page { line-height: 1.85; }
.about-page h1 { font-size: 1.9rem; margin-bottom: .6rem; }
.about-lead { font-size: 1.08rem; color: var(--c-text2); margin-bottom: 2rem; }
.about-section { margin-bottom: 2.5rem; }
.about-section h2 { position: relative; font-size: 1.32rem; margin-bottom: 1rem; padding-bottom: .45rem; border-bottom: 2px solid var(--c-border); }

/* ---------- Photographer landing page ---------- */
.photographer-page { max-width: 1040px; margin: 0 auto; }
.photographer-hero { overflow: hidden; padding: clamp(1.5rem, 4vw, 3rem); background: radial-gradient(circle at 88% 12%, rgba(125,211,252,.3), transparent 31%), linear-gradient(135deg, #f8fbff 0%, #eef7ff 52%, #fff3ed 100%); }
.photographer-hero-copy { max-width: 780px; }
.photographer-hero h1 { max-width: 18em; margin-bottom: 1rem; font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.3; color: #0f2b4a; }
.photographer-lead { max-width: 46em; color: #405368; font-size: 1.08rem; line-height: 1.9; }
.photographer-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.photographer-note { margin-top: .65rem; color: var(--c-text2); font-size: .86rem; }
.photographer-workflow { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 2rem; }
.photographer-workflow > div { position: relative; display: grid; gap: .15rem; padding: 1rem 1rem 1rem 3.4rem; border: 1px solid rgba(175,202,226,.75); border-radius: 14px; background: rgba(255,255,255,.75); }
.photographer-workflow span { position: absolute; top: 50%; left: 1rem; width: 1.7rem; height: 1.7rem; transform: translateY(-50%); border-radius: 50%; background: var(--c-primary); color: #fff; text-align: center; font-size: .82rem; font-weight: 700; line-height: 1.7rem; }
.photographer-workflow strong { color: #183b5d; }
.photographer-workflow small { color: var(--c-text2); }
.photographer-section { padding: clamp(1.35rem, 3vw, 2.25rem); }
.section-eyebrow { margin-bottom: .25rem; color: var(--c-warm-h); font-size: .78rem; font-weight: 800; letter-spacing: .11em; }
.photographer-section > h2 { margin-bottom: 1.4rem; font-size: clamp(1.45rem, 3vw, 2rem); color: #173652; }
.photographer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.photographer-grid article { padding: 1.2rem; border: 1px solid var(--c-border); border-radius: 14px; background: rgba(255,255,255,.7); }
.photographer-grid article > .bi { display: inline-grid; width: 2.25rem; height: 2.25rem; margin-bottom: .7rem; place-items: center; border-radius: 10px; background: #e7f3ff; color: var(--c-primary); font-size: 1.15rem; }
.photographer-grid h3 { margin-bottom: .35rem; color: #173652; font-size: 1.04rem; }
.photographer-grid p { color: var(--c-text2); font-size: .94rem; line-height: 1.75; }
.delivery-steps { display: grid; gap: .8rem; list-style: none; }
.delivery-steps li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 1rem; padding: 1rem; border-left: 3px solid #6aa8d8; background: rgba(239,247,255,.72); }
.delivery-steps li > span { color: var(--c-primary); font-size: 1.2rem; font-weight: 800; }
.delivery-steps h3 { margin-bottom: .15rem; color: #173652; font-size: 1.04rem; }
.delivery-steps p { color: var(--c-text2); font-size: .95rem; }
.photographer-cta { padding: clamp(1.5rem, 4vw, 2.5rem); text-align: center; background: linear-gradient(120deg, #153b60, #2f5f86); color: #fff; }
.photographer-cta h2 { margin-bottom: .45rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.photographer-cta p { margin-bottom: 1.2rem; color: rgba(255,255,255,.82); }
.about-section h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 2.4rem; height: 2px; background: var(--grad-sunset); border-radius: 2px; }
.terms-page { line-height: 1.9; }
.terms-date { margin-top: -.25rem; margin-bottom: 1.5rem; color: var(--c-text2); font-size: 1rem; }
.terms-list { margin: .75rem 0 0 1.25rem; }
.terms-list li { margin-bottom: .5rem; color: var(--c-text2); font-size: .96rem; }
.terms-note { margin-top: .75rem; color: var(--c-text2); font-size: .96rem; }

/* Steps */
.about-steps { display: flex; flex-direction: column; gap: 1.25rem; }
.about-step { display: flex; gap: 1rem; align-items: flex-start; }
.step-number { flex-shrink: 0; width: 2.5rem; height: 2.5rem; background: var(--grad-sunset); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; box-shadow: 0 6px 14px rgba(249,115,22,.25); }
.step-content h3 { font-size: 1.08rem; margin-bottom: .25rem; }
.step-content p { color: var(--c-text2); font-size: .98rem; }

/* Formats */
.about-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; }
.format-group { background: linear-gradient(160deg, rgba(255,255,255,.82), rgba(238,247,255,.7)); border-radius: 12px; border: 1px solid rgba(191,219,254,.78); padding: 1rem 1.25rem; box-shadow: 0 12px 26px rgba(15,23,42,.04); }
.format-group h3 { font-size: 1rem; margin-bottom: .5rem; }
.format-group ul { list-style: none; padding: 0; }
.format-group ul li { font-size: .96rem; color: var(--c-text2); padding: .15rem 0; }
.format-group ul li::before { content: "\2022"; color: var(--c-primary); margin-right: .5rem; }
.format-note { font-size: .9rem; color: var(--c-text2); margin-top: .5rem; }

/* Features */
.about-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.feature-item { background: linear-gradient(160deg, rgba(255,255,255,.82), rgba(238,247,255,.7)); border-radius: 12px; border: 1px solid rgba(191,219,254,.78); padding: 1rem 1.25rem; box-shadow: 0 12px 26px rgba(15,23,42,.04); }
.feature-item h3 { font-size: 1rem; margin-bottom: .35rem; }
.feature-item p { font-size: .96rem; color: var(--c-text2); }

/* Table */
.about-table { width: 100%; border-collapse: collapse; font-size: .96rem; }

/* ---------- Guide (blog) ---------- */
.guide-eyebrow { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: var(--c-warm-h); text-transform: uppercase; }

.guide-index-head { margin-bottom: 1.75rem; }
.guide-index-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: .35rem 0 .55rem; }
.guide-index-head p { color: var(--c-text2); max-width: 42em; }

.guide-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.guide-card { display: flex; flex-direction: column; gap: .55rem; padding: 1.25rem; border: 1px solid rgba(191,219,254,.78); border-radius: 14px; background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(238,247,255,.72)); box-shadow: 0 12px 26px rgba(15,23,42,.05); transition: transform .15s, box-shadow .15s; }
.guide-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(15,23,42,.1); }
.guide-card h2, .guide-card h3 { font-size: 1.08rem; line-height: 1.55; margin: 0; }
.guide-card h2 a, .guide-card h3 a { color: var(--c-text); text-decoration: none; }
.guide-card h2 a:hover, .guide-card h3 a:hover { color: var(--c-primary); }
.guide-card p { font-size: .94rem; color: var(--c-text2); flex: 1; margin: 0; }
.guide-card-meta { display: flex; align-items: center; gap: .55rem; font-size: .78rem; color: var(--c-text2); flex-wrap: wrap; }
.guide-chip { display: inline-block; padding: .16rem .6rem; border-radius: 999px; background: var(--c-warm-soft); color: var(--c-warm-h); font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.guide-card-more { font-size: .85rem; font-weight: 700; color: var(--c-primary); }

.guide-crumbs { font-size: .82rem; color: var(--c-text2); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.guide-crumbs a { color: var(--c-text2); text-decoration: none; }
.guide-crumbs a:hover { color: var(--c-primary); text-decoration: underline; }
.guide-crumbs [aria-current] { color: var(--c-text); }

/* 幅は広告枠から決まっている。カード内寸（この値 - border 2px - padding 56px）が
   AdMax の PC バナー 728px を収める必要があるため 820px。トップページの
   .page-upload .content-primary と同じ幅でもある。 */
.guide-article { max-width: 820px; margin-left: auto; margin-right: auto; line-height: 1.9; }
.guide-article > header { margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--c-border); }
.guide-article h1 { font-size: clamp(1.6rem, 4.2vw, 2.35rem); line-height: 1.42; margin: .4rem 0 .75rem; }
.guide-byline { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .84rem; color: var(--c-text2); }
.guide-lead { font-size: 1.08rem; color: var(--c-text2); margin: 1.2rem 0 0; }

.guide-toc { margin: 1.5rem 0; padding: 1rem 1.25rem; border: 1px solid rgba(191,219,254,.78); border-radius: 12px; background: rgba(255,255,255,.6); }
.guide-toc p { font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: var(--c-text2); margin-bottom: .5rem; }
.guide-toc ol { margin: 0; padding-left: 1.4rem; display: grid; gap: .35rem; }
.guide-toc a { color: var(--c-primary); text-decoration: none; font-size: .94rem; }
.guide-toc a:hover { text-decoration: underline; }

.guide-article section { margin: 2rem 0; scroll-margin-top: 1.5rem; }
.guide-article section > h2 { position: relative; font-size: 1.3rem; line-height: 1.5; margin-bottom: .8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--c-border); }
.guide-article section > h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 2.4rem; height: 2px; background: var(--grad-sunset); border-radius: 2px; }
.guide-article h3 { font-size: 1.06rem; margin: 1.3rem 0 .4rem; }
.guide-article p { margin: .85rem 0; }
.guide-article ul, .guide-article ol { margin: .85rem 0 .85rem 1.4rem; }
.guide-article li { margin: .35rem 0; color: var(--c-text2); }
.guide-article a { color: var(--c-primary); }
.guide-anchor { margin-left: .4rem; color: var(--c-border); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .15s; }
.guide-article h2:hover .guide-anchor { opacity: 1; }

/* 記事本文のインライン図解。SVGをそのまま貼っても崩れないよう幅を明示する
   （グローバルな img{max-width:100%} が無いため、素のままだとモバイルではみ出す）。 */
.guide-figure { margin: 1.6rem 0; padding: 1.1rem; border: 1px solid rgba(191,219,254,.78); border-radius: 12px; background: rgba(255,255,255,.6); color: var(--c-primary); }
.guide-figure svg, .guide-figure img { display: block; width: 100%; height: auto; max-width: 100%; }
.guide-figure figcaption { margin-top: .6rem; font-size: .84rem; color: var(--c-text2); text-align: center; }

.guide-keypoints { margin: 2rem 0; padding: 1.25rem 1.5rem; border-radius: 14px; border: 1px solid rgba(45,122,90,.28); background: linear-gradient(160deg, rgba(233,247,240,.85), rgba(238,247,255,.6)); }
.guide-keypoints h2 { font-size: 1.1rem; margin-bottom: .6rem; border: 0; padding: 0; }
.guide-keypoints h2::after { display: none; }
.guide-keypoints ul { margin: 0; padding-left: 1.3rem; }
.guide-keypoints li { margin: .4rem 0; color: var(--c-text); }

.guide-faq { margin: 2rem 0; }
.guide-faq > h2 { font-size: 1.2rem; margin-bottom: .8rem; }

.guide-cta { margin-top: 2rem; padding: 1.5rem; border-radius: 16px; text-align: center; background: linear-gradient(120deg, #153b60, #2f5f86); color: #fff; }
.guide-cta h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.guide-cta p { color: rgba(255,255,255,.85); margin-bottom: 1rem; }
.guide-cta .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.guide-cta .btn-outline:hover { background: rgba(255,255,255,.12); }

.guide-related { max-width: 820px; margin: 1.5rem auto 0; }  /* .guide-article と揃える */
.guide-related > h2 { font-size: 1.15rem; margin-bottom: .9rem; }

@media (max-width: 640px) {
  .guide-article, .guide-related { max-width: 100%; }
}

/* ===== Admin Panel ===== */
.admin-panel { max-width: 1200px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.admin-header h1 { margin-bottom: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end; }
.admin-actions > form { display: flex; }
.admin-actions .btn { flex: 0 0 auto; white-space: nowrap; }

.admin-summary { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; padding: 1.1rem; background: linear-gradient(160deg, rgba(255,255,255,.82), rgba(238,247,255,.7)); border-radius: 14px; border: 1px solid rgba(191,219,254,.82); box-shadow: 0 14px 30px rgba(15,23,42,.05); backdrop-filter: blur(10px); }
.summary-item { text-align: center; min-width: 80px; }
.summary-num { display: block; font-size: 1.5rem; font-weight: 700; color: var(--c-primary); }
.summary-label { font-size: .9rem; color: var(--c-text2); }
.summary-sub { display: block; font-size: .78rem; color: var(--c-text2); margin-top: .15rem; }

/* 発展の記録: グラフのタブ・モード切替 */
.stat-tabs, .stat-modes { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.stat-modes { margin-bottom: 1rem; }
.stat-tab.is-active, .stat-mode.is-active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.stat-chart-box { position: relative; height: 320px; margin-bottom: 1.25rem; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin-table th, .admin-table td { padding: .7rem .75rem; border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: middle; }
.admin-table thead th { background: rgba(237,245,255,.96); font-weight: 600; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.admin-table tbody tr:hover { background: rgba(74,144,217,.04); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--c-text2); }
.text-danger { color: var(--c-danger); }
.text-nowrap { white-space: nowrap; }

.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover { color: var(--c-primary); }

.album-name-cell a { color: var(--c-primary); text-decoration: none; font-weight: 500; }
.album-name-cell a:hover { text-decoration: underline; }

.badge { display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; padding: .14rem .45rem; border-radius: 999px; vertical-align: middle; margin-left: .3rem; }
.badge-lock { background: rgba(226,232,240,.82); color: var(--c-text2); }
.badge-expired { background: var(--c-danger); color: #fff; }
.badge-active { background: var(--c-accent); color: #fff; }

.remaining { font-size: .84rem; color: var(--c-text2); }
.row-expired { opacity: .55; }
.row-attention { background: rgba(239,68,68,.05); border-left: 3px solid var(--c-danger); }

/* Storage bar */
.storage-bar { margin-bottom: 1.25rem; }
.storage-label { font-size: .9rem; color: var(--c-text2); margin-bottom: .35rem; }
.storage-track { position: relative; display: flex; height: 10px; background: rgba(226,232,240,.82); border-radius: 50px; overflow: visible; }
.storage-fill { height: 100%; background: var(--c-accent); border-radius: 50px; transition: width .3s; }
.storage-fill.over-threshold { background: var(--c-danger); }
.storage-fill-zip { background: var(--c-primary); opacity: .55; }
.storage-fill:first-child { border-radius: 50px 0 0 50px; }
.storage-threshold { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--c-danger); border-radius: 1px; }
.storage-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .84rem; color: var(--c-text2); margin-top: .35rem; }
.legend-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }
.legend-dot-photo { background: var(--c-accent); }
.legend-dot-zip { background: var(--c-primary); opacity: .55; }
.storage-state { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; margin-left: .4rem; }
.storage-state-ok { background: #dbeafe; color: var(--c-primary); }
.storage-state-warn { background: #fef3c7; color: #d97706; }
.storage-state-stop { background: #fef3c7; color: #d97706; }
.storage-state-pause { background: #fde8e8; color: var(--c-danger); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: linear-gradient(160deg, rgba(255,255,255,.88), rgba(238,247,255,.78)); border: 1px solid rgba(191,219,254,.82); border-radius: var(--radius); padding: 1.5rem; max-width: 420px; width: 90%; box-shadow: 0 18px 40px rgba(0,0,0,.16); backdrop-filter: blur(14px); }
.modal-box h3 { margin-bottom: .75rem; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; }

/* Error log table */
.admin-table-logs .log-message { max-width: 500px; word-break: break-word; }
.log-level { display: inline-block; padding: .15rem .45rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.log-level-error { background: #fde8e8; color: var(--c-danger); }
.log-level-warning { background: #fef3c7; color: #d97706; }
.log-level-info { background: #dbeafe; color: var(--c-primary); }
.log-context { margin-top: .35rem; }
.log-context summary { font-size: .86rem; color: var(--c-primary); cursor: pointer; }
.log-context pre { font-size: .84rem; background: rgba(237,245,255,.88); border: 1px solid rgba(209,222,234,.78); padding: .6rem; border-radius: 8px; overflow-x: auto; margin-top: .3rem; white-space: pre-wrap; word-break: break-all; }
.filter-bar select, .filter-bar input[type="text"] { padding: .4rem .65rem; border: 2px solid var(--c-input-border); border-radius: 8px; font-size: .92rem; font-family: var(--font); background: var(--c-surface); color: var(--c-text); }
.log-event { font-family: ui-monospace, monospace; font-size: .8rem; color: var(--c-text2); white-space: nowrap; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: 1.25rem; }
.page-info { font-size: .92rem; color: var(--c-text2); }

/* Alert */
.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .95rem; }
.alert-danger { background: #fde8e8; color: var(--c-danger); }

@media (max-width: 768px) {
  .admin-table { font-size: .84rem; }
  .admin-table th, .admin-table td { padding: .45rem .4rem; }
  .admin-summary { gap: 1rem; }
  .summary-num { font-size: 1.2rem; }
  .admin-header { align-items: flex-start; }
  .admin-actions { justify-content: flex-start; }
  .stat-chart-box { height: 240px; }
}
.about-table th, .about-table td { padding: .6rem 1rem; text-align: left; border-bottom: 1px solid var(--c-border); }
.about-table th { background: var(--c-bg); font-weight: 500; width: 45%; }

/* CTA */
.about-cta { text-align: center; padding-top: 1rem; }
.btn-lg { font-size: 1.1rem; padding: .82rem 2rem; }

/* Hide header nav on photo detail page */
.page-photo .header-nav { display: none; }

.pick-btn .ui-icon,
.pick-btn-lg .ui-icon,
.filter-btn .ui-icon,
.badge .ui-icon,
.file-icon .ui-icon { pointer-events: none; }

/* ---------- Responsive ---------- */
.main-content { padding-top: 2rem; padding-bottom: 2rem; }

@media(max-width:768px) {
  .label-bar { padding: calc(.4rem + env(safe-area-inset-top)) .5rem .4rem; }
  .label-bar-inner { gap: .3rem .6rem; }
  .label-bar .btn { padding: .4rem .7rem; font-size: .85rem; }
  .header-nav { width: 100%; margin-left: 0; overflow-x: auto; }
  .header-link { white-space: nowrap; }
  .photographer-workflow, .photographer-grid { grid-template-columns: 1fr; }
  .photographer-actions .btn { width: 100%; }
  .delivery-steps li { grid-template-columns: 2.5rem 1fr; gap: .65rem; }
  .gallery-grid { gap: 2px; }
  /* サブピクセル超過が残っても折り返さず微縮小で吸収する（モバイルのみ） */
  .gallery-item { flex-shrink: 1; }
  .gallery-divider { margin: .85rem 0 .5rem; font-size: .92rem; }
  .gallery-divider-title { font-size: 1.02rem; }
  .share-card { padding: .75rem .5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .upload-settings-grid-primary,
  .upload-settings-grid-secondary,
  .upload-settings-grid-optional { grid-template-columns: 1fr; }
  .page-upload .upload-restrictions {
    padding: .6rem .7rem; border: 1px solid rgba(157,192,232,.72); border-radius: 8px;
    background: rgba(255,255,255,.7);
  }
  .page-upload .upload-restrictions summary {
    min-height: 44px; padding: 0; border-top: 0;
    color: #264e6e; font-size: .95rem;
  }
  .page-upload .content-primary { max-width: 640px; }
  /* 幅が足りない画面では1行維持をやめてフレーズ単位で折り返す */
  .page-upload .upload-intro-heading,
  .page-upload .upload-intro-text { white-space: normal; }
  .page-upload .trust-points {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
  }
  .page-upload .trust-point {
    flex: 1 1 6.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: .48rem .55rem;
    text-align: center;
  }
  .page-upload .trust-point h3 { margin: 0; }
  .page-upload .trust-point p { display: none; }
  .page-upload .upload-intro { padding: 1.35rem 1.1rem; }
  .page-upload #uploadSection,
  .page-upload #collectSection { --form-padding: 1.1rem; }
  /* スマホではアルバム名・枚数・有効期限を中央に */
  .share-header { flex-direction: column; align-items: center; text-align: center; }
  .upload-hero-metrics { grid-template-columns: 1fr; }
  .trust-points { grid-template-columns: 1fr; }
  .upload-cta { flex-direction: column; align-items: flex-start; }
  .upload-cta-link { width: 100%; text-align: center; }
  /* 帯を2行に折り返す: 1行目=ラベル+日付、2行目=見出し */
  .announce-bar { flex-wrap: wrap; }
  .announce-bar-title { flex-basis: 100%; order: 3; }
  .announce-bar-more { display: none; }
  .photo-viewer { min-height: 0; }
  .photo-full { max-height: none; }
  /* スマホ: ラベルはドロップダウン表示、採用/不採用はアイコンのみ */
  .label-inline { display: none; }
  .pick-btn-lg span { display: none; }
  .pick-btn-lg { padding: 0 .7rem; }
  /* 狭い画面ではいいねを1段目・シェア/DLを2段目、どちらも中央寄せ */
  .photo-actions-row { grid-template-columns: 1fr; justify-items: center; }
  .photo-actions-row .photo-like-btn,
  .photo-actions-row .photo-nav-actions { grid-column: 1; justify-self: center; }
  .photo-actions-row .photo-nav-actions { justify-content: center; }
  .exif-row { flex-direction: column; }
  .exif-label { width: auto; }
  .filter-bar { gap: .35rem .5rem; padding: .5rem; }
  .item-checkbox-wrap { opacity: 0; pointer-events: none; }
  .gallery-grid.select-mode .item-checkbox-wrap { opacity: 1; pointer-events: auto; }
  /* 選択モードバー：常に画面下部にフローティング（非選択時は入口ボタンのみのピル表示） */
  .select-bar {
    display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; margin: 0;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
    pointer-events: none;                 /* 非選択時は下の写真をタップできるようにする */
  }
  .select-bar > .btn { pointer-events: auto; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
  /* 選択モード中はソリッドな操作バーに切り替える */
  .select-bar.active {
    pointer-events: auto;
    background: var(--c-primary); color: #fff;
    box-shadow: 0 -2px 12px rgba(0,0,0,.2);
  }
  .select-bar.active .filter-check, .select-bar.active .bulk-info { color: #fff; }
  .bulk-bar { display: none !important; }       /* スマホではPC用バーを使わない */
  .filter-bar .filter-group:has(#selectAllCheck) { display: none; } /* PC用全選択を隠す */
  /* 入口ボタンが常時フローティングするため、常に余白を確保 */
  .page-share { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
  .pick-overlay { display: none; }
  .gallery-grid.pick-mode .pick-overlay { display: flex; }
  .gallery-grid.pick-mode .gallery-item .pick-btn { opacity: .85; }
}

@media(max-width:480px) {
  .gallery-grid { gap: 1px; }
  .container.main-content { padding-left: .25rem; padding-right: .25rem; }
  .page-upload .container.main-content { padding-left: .8rem; padding-right: .8rem; }
  .page-upload .card { padding: .95rem; }
  .page-upload .upload-intro-heading { font-size: 1.5rem; white-space: normal; }
  .page-upload .upload-hero-metrics { gap: .4rem; }
  .page-upload .metric-item { padding: .35rem .5rem; }
  .dropzone { padding: 1.5rem .75rem; }
  .card { padding: 1rem; }
  /* share-card は .card より左右余白を詰めてギャラリー幅を確保する（.card{padding:1rem} に勝つ詳細度） */
  .card.share-card { padding: .5rem .25rem; }
  .share-url-group { flex-direction: column; }
}

/* Print-friendly */
@page { margin: 15mm; }

@media print {
  .site-header, .site-footer, .lightbox,
  .maintenance-banner, .announce-bar, .notice-box,
  .ad-slot, .side-ad, .upload-cta, .filter-bar,
  .bulk-bar, .label-bar, .toast,
  .no-print { display: none !important; }

  body { background: #fff; }
  .container.main-content { max-width: none; padding: 0; }
  .card {
    background: #fff; border: 0; box-shadow: none;
    backdrop-filter: none; margin: 0; padding: 0;
  }

  .page-qr .qr-sheet { page-break-inside: avoid; break-inside: avoid; }
}

/* ---------- QR印刷ページ ---------- */
.qr-sheet { text-align: center; }
.qr-sheet-brand { font-size: .85rem; color: var(--c-text2); letter-spacing: .06em; }
.qr-sheet-title { margin: .4rem 0 0; }
.qr-sheet-code { display: inline-block; margin: 1.2rem 0; padding: 24px; background: #fff; border-radius: 12px; line-height: 0; }
.qr-sheet-code canvas, .qr-sheet-code img { width: 260px; height: 260px; }
.qr-sheet-url { font-size: .95rem; word-break: break-all; }
.qr-sheet-expires, .qr-sheet-hint { color: var(--c-text2); font-size: .9rem; margin-top: .4rem; }
.qr-sheet-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }

@media print {
  .qr-sheet-code { padding: 8mm; }
  .qr-sheet-code canvas, .qr-sheet-code img { width: 70mm; height: 70mm; }
}

/* ===== メンテナンスモード ===== */
/* 管理者が通常サイトを見ているときに出る固定バー（解除し忘れ防止） */
.maintenance-banner {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: .5rem 1rem; padding: .5rem 1rem;
  background: var(--grad-sunset); color: #fff;
  font-size: .9rem; font-weight: 700; text-align: center;
  box-shadow: 0 2px 10px rgba(249,115,22,.28);
}
.maintenance-banner a { color: #fff; text-decoration: underline; font-weight: 700; }

.admin-bypass-banner { background: var(--c-primary); box-shadow: 0 2px 10px rgba(47,95,134,.28); }

/* 503 画面 */
.maintenance-card { text-align: center; }
.maintenance-card .maintenance-icon { font-size: 2.4rem; color: var(--c-warm); margin-bottom: .5rem; }
.maintenance-card h1 { font-size: 1.4rem; margin-bottom: .75rem; }
.maintenance-message { font-size: 1.02rem; margin-bottom: .75rem; }
.maintenance-until {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-bottom: .75rem; padding: .35rem .8rem;
  background: var(--c-warm-soft); border: 1px solid rgba(251,146,60,.5); border-radius: var(--radius);
  font-size: .92rem; color: var(--c-warm-h);
}

/* 管理パネルの状態表示 */
.maintenance-admin {
  margin-bottom: 1.5rem; padding: .85rem 1rem;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: var(--c-surface);
}
.maintenance-admin-on { border-color: rgba(251,146,60,.7); background: var(--c-warm-soft); }
.maintenance-admin-status { display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.maintenance-admin-on .maintenance-admin-status { color: var(--c-warm-h); }
.maintenance-admin-hint { margin-top: .4rem; font-size: .82rem; line-height: 1.6; }
.maintenance-admin-hint code {
  display: inline-block; margin-top: .2rem; padding: .1rem .4rem;
  background: rgba(15,23,42,.06); border-radius: 6px; font-size: .82rem; word-break: break-all;
}
.maintenance-modal-msg { margin: .5rem 0 1rem; text-align: left; }
.maintenance-modal-msg label { display: block; font-size: .82rem; color: var(--c-text2); margin-bottom: .3rem; }
.maintenance-modal-msg textarea {
  width: 100%; padding: .5rem .65rem; border: 1px solid var(--c-border); border-radius: 8px;
  font-family: inherit; font-size: .9rem; resize: vertical;
}

/* アルバム履歴（/my）。中身は app.js が localStorage から組み立てる */
.album-history-item { padding: .9rem 0; border-bottom: 1px solid var(--c-border); }
.album-history-item:last-child { border-bottom: 0; }
.album-history-name { display: block; font-weight: 600; word-break: break-all; }
.album-history-item .meta { margin: .25rem 0 .5rem; }

/* 管理画面のノード一覧（複数サーバー構成のときだけ出る） */
.cluster-admin { margin: 1rem 0; }
.cluster-table { margin-top: .5rem; }
.cluster-table td { vertical-align: top; }
.cluster-current { background: rgba(0, 122, 204, .06); }
