/* ============================================================
   奈良ベリーガーデン 農園パスポート アプリスタイル
   Mobile-first / Green theme
   ============================================================ */

/* ---- リセット・ベース ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
  background: #FAFAF7;
  color: #2C2C2A;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ---- カラー変数 ---- */
:root {
  --green-dark:   #1B5E20;
  --green:        #2E7D32;
  --green-mid:    #388E3C;
  --green-light:  #E8F5E9;
  --green-pale:   #F1F8F2;
  --gray:         #888;
  --gray-light:   #EEE;
  --white:        #FFF;
  --danger:       #C62828;
  --warning-bg:   #FFF9C4;
  --nav-height:   64px;
}

/* ---- ヘッダー ---- */
.app-header {
  background: var(--green-dark);
  color: var(--white);
  padding: 1rem 1.25rem .75rem;
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; gap: .75rem; }
.header-label { font-size: .75rem; opacity: .75; }
.header-title { font-size: 1.125rem; font-weight: 600; margin-left: auto; margin-right: auto; }
.header-back  { font-size: .875rem; opacity: .85; }

/* ---- ボトムナビ ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--white);
  border-top: 1px solid #DDD;
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; padding: .5rem 0;
  color: var(--gray); font-size: .625rem;
  transition: color .15s;
}
.nav-item.active { color: var(--green); }
.nav-item:active { opacity: .7; }
.nav-icon  { font-size: 1.375rem; }
.nav-label { font-size: .625rem; }

/* ---- メインコンテンツ ---- */
.main {
  padding: 1rem 1rem calc(var(--nav-height) + 1rem);
  max-width: 500px; margin: 0 auto;
}

/* ---- ログイン画面 ---- */
.page-login { background: var(--green-pale); }
.login-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.login-hero { text-align: center; margin-bottom: 2rem; }
.login-logo { font-size: 5rem; line-height: 1; margin-bottom: .75rem; }
.login-title { font-size: 1.375rem; font-weight: 700; color: var(--green-dark); line-height: 1.4; margin-bottom: .5rem; }
.login-sub   { font-size: .875rem; color: var(--gray); line-height: 1.7; }
.login-card  { background: var(--white); border-radius: 16px; padding: 1.5rem; width: 100%; max-width: 340px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.btn-line {
  display: flex; align-items: center; justify-content: center; gap: .625rem;
  width: 100%; background: #06C755; color: var(--white);
  border-radius: 10px; padding: .875rem 1rem;
  font-size: .9375rem; font-weight: 600;
  transition: opacity .15s;
}
.btn-line:active { opacity: .85; }
.login-note { font-size: .75rem; color: var(--gray); text-align: center; margin-top: .875rem; line-height: 1.6; }
.admin-link  { display: block; text-align: center; font-size: .75rem; color: var(--gray); margin-top: .875rem; }
.privacy-link { margin-top: 1.5rem; font-size: .75rem; color: var(--gray); }
.privacy-link a { text-decoration: underline; }

/* ---- 進捗バー ---- */
.progress-section { margin-bottom: 1.25rem; }
.progress-meta { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--gray); margin-bottom: .375rem; }
.progress-bar-wrap { background: #DDD; border-radius: 8px; height: 8px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--green); border-radius: 8px; transition: width .4s ease; }
.complete-badge { text-align: center; margin-top: .5rem; font-size: .875rem; font-weight: 600; color: var(--green-dark); }

/* ---- スタンプグリッド ---- */
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  padding-bottom: .5rem;
}
.stamp-item { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.stamp-circle {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid;
  transition: transform .15s;
}
.stamp-item.acquired .stamp-circle { background: var(--green-light); border-color: var(--green); }
.stamp-item.locked   .stamp-circle { background: #F0F0F0; border-color: #CCC; filter: grayscale(1); opacity: .45; }
.stamp-emoji { font-size: 2rem; line-height: 1; }
.stamp-name  { font-size: .625rem; text-align: center; color: #555; line-height: 1.3; word-break: break-all; }
.stamp-badge { font-size: .5625rem; background: var(--green-light); color: var(--green-dark); padding: 1px 6px; border-radius: 10px; }

/* ---- スタンプ獲得画面 ---- */
.acquired-main { text-align: center; padding-top: 1.5rem; }
.acquired-new-badge {
  display: inline-block; background: var(--green); color: var(--white);
  font-size: .75rem; font-weight: 700; padding: 2px 10px;
  border-radius: 10px; margin-bottom: .375rem; letter-spacing: .05em;
}
.acquired-subtitle { font-size: .875rem; color: var(--gray); margin-bottom: 1.5rem; }
.acquired-stamp    { margin-bottom: 1.5rem; }
.big-stamp-circle {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--green-light); border: 3px solid var(--green);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .75rem;
}
.big-stamp-circle.new { border-color: var(--green-dark); border-width: 4px; animation: pop .4s ease; }
.big-stamp-emoji { font-size: 3.5rem; line-height: 1; }
.acquired-name   { font-size: 1.375rem; font-weight: 700; color: var(--green-dark); }
.info-card { background: var(--white); border-radius: 12px; padding: .875rem 1rem; text-align: left; margin-bottom: .75rem; border: 1px solid #E0E0E0; }
.info-label { font-size: .75rem; color: var(--gray); margin-bottom: .25rem; }
.info-value { font-size: .875rem; color: #333; line-height: 1.6; }

/* ---- パスポート ---- */
.passport-card {
  background: var(--green-dark); color: var(--white);
  border-radius: 16px; padding: 1.375rem 1.25rem;
  margin-bottom: 1.25rem;
}
.passport-label { font-size: .6875rem; opacity: .7; margin-bottom: .25rem; }
.passport-name  { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.passport-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: .5rem; }
.ps-item { background: rgba(255,255,255,.15); border-radius: 10px; padding: .75rem .5rem; text-align: center; }
.ps-num  { font-size: 1.5rem; font-weight: 700; }
.ps-lab  { font-size: .625rem; opacity: .8; margin-top: 2px; }

.history-section { }
.section-title   { font-size: .875rem; font-weight: 600; color: #444; margin-bottom: .75rem; }
.history-item    { display: flex; align-items: flex-start; gap: .75rem; padding: .625rem 0; border-bottom: 1px solid #EEE; }
.history-emojis  { font-size: 1.375rem; line-height: 1; flex-shrink: 0; }
.history-names   { font-size: .8125rem; color: #333; line-height: 1.4; }
.history-date    { font-size: .6875rem; color: var(--gray); margin-top: 2px; }
.empty-msg       { font-size: .875rem; color: var(--gray); text-align: center; padding: 2rem 0; }

/* ---- コンプリート画面 ---- */
.page-complete { background: var(--green-pale); }
.complete-main { text-align: center; padding-top: 3rem; }
.complete-hero { margin-bottom: 2rem; }
.complete-icon  { font-size: 5rem; margin-bottom: .75rem; }
.complete-title { font-size: 1.5rem; font-weight: 700; color: var(--green-dark); margin-bottom: .75rem; }
.complete-sub   { font-size: .875rem; color: #555; line-height: 1.7; }
.complete-card  { background: var(--white); border-radius: 16px; padding: 1.25rem; margin-bottom: 1.5rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.complete-name  { font-size: 1rem; font-weight: 600; color: var(--green-dark); margin-bottom: .375rem; }
.complete-badge-text { font-size: .875rem; color: #555; }

/* ---- 汎用ボタン ---- */
.btn {
  display: block; width: 100%; text-align: center;
  padding: .875rem 1rem; border-radius: 10px;
  font-size: .9375rem; font-weight: 600;
  transition: opacity .15s; margin-bottom: .75rem;
}
.btn:active { opacity: .8; }
.btn-primary   { background: var(--green); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--green); border: 1.5px solid var(--green); }
.btn-share     { background: #1DA1F2; color: var(--white); }

/* ---- アラート ---- */
.alert { border-radius: 10px; padding: .75rem 1rem; font-size: .875rem; margin-bottom: 1rem; line-height: 1.5; }
.alert-error   { background: #FFEBEE; color: var(--danger); }
.alert-success { background: var(--green-light); color: var(--green-dark); }

/* ---- 管理画面 ---- */
.page-admin { background: #F5F5F5; }
.page-admin-login { background: var(--green-pale); display: flex; align-items: center; justify-content: center; min-height: 100dvh; }
.admin-login-wrap { padding: 1.5rem; width: 100%; max-width: 400px; }
.admin-login-card { background: var(--white); border-radius: 16px; padding: 2rem; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.admin-login-title { font-size: 1.125rem; font-weight: 700; text-align: center; margin-bottom: 1.25rem; color: var(--green-dark); }

.admin-layout { min-height: 100dvh; }
.admin-header {
  background: var(--green-dark); color: var(--white);
  padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
}
.admin-header h1 { font-size: 1rem; font-weight: 600; }
.admin-nav { display: flex; gap: 1rem; }
.admin-nav a { font-size: .875rem; opacity: .85; }
.admin-nav a:hover { opacity: 1; }

.admin-main { padding: 1.5rem; max-width: 960px; margin: 0 auto; }
.admin-main h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; color: var(--green-dark); }
.admin-main h3 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; color: #444; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.admin-stat-card { background: var(--white); border-radius: 12px; padding: 1.25rem; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--green-dark); }
.stat-lab { font-size: .75rem; color: var(--gray); margin-top: 4px; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); font-size: .875rem; margin-bottom: 1.5rem; }
.admin-table th { background: var(--green-dark); color: var(--white); padding: .625rem 1rem; text-align: left; font-weight: 600; font-size: .8125rem; }
.admin-table td { padding: .625rem 1rem; border-bottom: 1px solid #EEE; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: #F6F2FF;
  border: 1px solid rgba(91, 44, 160, 0.14);
}
.admin-thumb-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.admin-variety-name {
  font-weight: 700;
  color: var(--green-dark);
}
.admin-variety-sub {
  margin-top: 4px;
  font-size: .75rem;
  color: var(--gray);
}

.admin-form { background: var(--white); border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }

.form-group { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem; }
.form-group label { font-size: .8125rem; font-weight: 500; color: #444; }
.form-group input, .form-group textarea, .form-group select {
  border: 1px solid #CCC; border-radius: 8px; padding: .5rem .75rem;
  font-size: .875rem; font-family: inherit; background: var(--white);
  transition: border-color .15s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--green); }
.form-group textarea { resize: vertical; }

.btn-sm {
  display: inline-block; padding: .25rem .625rem; border-radius: 6px;
  font-size: .75rem; font-weight: 500; background: var(--green-light);
  color: var(--green-dark); margin-right: .25rem; cursor: pointer;
  border: 1px solid var(--green);
}
.btn-sm:hover { background: var(--green); color: var(--white); }

/* ---- モーダル ---- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 1rem;
}
.modal-inner {
  background: var(--white); border-radius: 16px; padding: 1.5rem;
  width: 100%; max-width: 480px; max-height: 90dvh; overflow-y: auto;
}
.modal-wide { max-width: 720px; }
.modal-inner h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--green-dark); }
.admin-image-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  border: 1px dashed rgba(91, 44, 160, 0.26);
  border-radius: 16px;
  background: #FAF7FF;
  padding: 12px;
}
.admin-image-preview {
  width: 100%;
  max-width: 240px;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
}
.admin-image-empty {
  font-size: .875rem;
  color: var(--gray);
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
}

/* ---- 管理画面 品種テーブル行 ---- */
.admin-variety-cell {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.admin-variety-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: #F0EBF8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.375rem;
}
.admin-variety-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-rating-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: .75rem;
  color: #555;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

/* ---- 管理画面 画像パネル ---- */
.admin-image-panel {
  margin-bottom: .75rem;
}
.admin-image-panel .admin-image-preview {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: #F0EBF8;
  border: 1px dashed rgba(91,44,160,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: .5rem;
  font-size: 2.5rem;
}
.admin-image-panel .admin-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.admin-inline-check {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .8125rem;
  color: #555;
  cursor: pointer;
}
.admin-help {
  font-size: .75rem;
  color: var(--gray);
  margin-top: 2px;
}

/* ---- ホームフッター（管理者リンク） ---- */
.home-footer { text-align: center; padding: 1.5rem 1rem 2rem; }
.home-admin-link { font-size: .75rem; color: rgba(44,44,42,.35); text-decoration: none; }
.home-admin-link:hover { color: rgba(44,44,42,.6); }

/* ---- アニメーション ---- */
@keyframes pop {
  0%   { transform: scale(.6); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   UI改善版：ブルーベリーパスポート 紫テーマ上書き
   既存CSSの一番下に追加
   ============================================================ */

:root {
  --purple-dark: #1d0f4a;
  --purple-main: #5b2ca0;
  --purple-mid: #6b35a0;
  --purple-soft: #efe7ff;
  --purple-pale: #f8f3ff;
  --cream-bg: #fbf7f0;
  --green-cta: #229b2f;
  --green-cta-dark: #187a25;
  --gold: #d8a42f;
  --text-main: #241b3f;
  --text-sub: #6f6884;
  --card-shadow: 0 8px 24px rgba(38, 24, 76, 0.13);
  --nav-height: 72px;
}

/* ---- 全体 ---- */
body {
  background:
    radial-gradient(circle at top left, rgba(111, 67, 180, 0.13), transparent 30%),
    linear-gradient(180deg, #fbf7ff 0%, var(--cream-bg) 52%, #fffaf5 100%);
  color: var(--text-main);
}

/* ---- ヘッダー：参考画像寄せ ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-main) 58%, #3a1b78 100%);
  color: #fff;
  padding: 14px 16px;
  border-radius: 0;
  box-shadow: 0 4px 16px rgba(29, 15, 74, 0.22);
}

.header-inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-inner::before {
  content: "BP";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--purple-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
}

.header-label {
  display: none;
}

.header-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
}


/* ---- メイン ---- */
.main {
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 16px calc(var(--nav-height) + 28px);
}

/* ---- パスポートカード：マイページ風 ---- */
.passport-card {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 42%),
    linear-gradient(135deg, #fff 0%, #f0e5ff 100%);
  color: var(--text-main);
  border-radius: 24px;
  padding: 22px 18px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(91, 44, 160, 0.1);
}

.passport-label {
  display: inline-block;
  padding: 5px 10px;
  background: var(--purple-main);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  opacity: 1;
  margin-bottom: 12px;
}

.passport-name {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 16px;
}

.passport-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.ps-item {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(91, 44, 160, 0.12);
  border-radius: 16px;
  padding: 12px 6px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(38, 24, 76, 0.06);
}

.ps-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--purple-main);
}

.ps-lab {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* ---- 履歴カード ---- */
.history-section {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(91, 44, 160, 0.08);
}

.section-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--purple-dark);
  margin-bottom: 14px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee7f8;
}

.history-item:last-child {
  border-bottom: none;
}

.history-emojis {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--purple-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex: 0 0 auto;
}

.history-names {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.history-date {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 3px;
}

.empty-msg {
  padding: 22px 12px;
  background: #faf7ff;
  border-radius: 16px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.7;
}

/* ---- 進捗 ---- */
.progress-section {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--card-shadow);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-main);
  font-weight: 800;
  margin-bottom: 10px;
}

.progress-bar-wrap {
  background: #e8e4ec;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-cta), #4fbd4f);
  border-radius: 999px;
}

/* ---- コレクション：2列カード化 ---- */
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 8px;
}

.stamp-item {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 14px 8px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(91, 44, 160, 0.1);
  box-shadow: 0 6px 18px rgba(38, 24, 76, 0.1);
}

.stamp-circle {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f5edff, #fff);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(91, 44, 160, .08);
}

.stamp-item.acquired .stamp-circle {
  background: linear-gradient(135deg, #fff7df, #f3e8ff);
  border: 1.5px solid #f0c45a;
}

.stamp-item.locked .stamp-circle {
  background: #efefef;
  filter: grayscale(1);
  opacity: .7;
}

.stamp-emoji {
  font-size: 34px;
}

.stamp-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  text-align: center;
}

.stamp-badge {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-cta);
  color: #fff;
  font-size: 0;
}

.stamp-badge::before {
  content: "✓";
  font-size: 15px;
  font-weight: 900;
  line-height: 24px;
}

/* 未取得に鍵マーク */
.stamp-item.locked::after {
  content: "🔒";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* ---- 汎用ボタン ---- */
.btn,
.btn-primary,
.btn-secondary {
  border-radius: 14px;
  font-weight: 900;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-cta), var(--green-cta-dark));
  color: #fff;
  box-shadow: 0 6px 16px rgba(34, 155, 47, 0.25);
}

.btn-secondary {
  background: #fff;
  color: var(--purple-main);
  border: 1.5px solid rgba(91, 44, 160, 0.45);
}

/* ---- 下部ナビ：参考画像寄せ ---- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,.97);
  border-top: 1px solid rgba(38, 24, 76, 0.1);
  box-shadow: 0 -6px 22px rgba(38, 24, 76, 0.12);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 50;
}

.nav-item {
  min-width: 0;
  padding: 7px 2px 5px;
  color: #756f84;
  font-size: 10px;
  gap: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item.active {
  color: var(--purple-main);
  font-weight: 900;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
  opacity: 0.72;
  filter: grayscale(1) brightness(0.72);
  transition: transform .18s ease, opacity .18s ease, filter .18s ease;
}

.nav-label {
  font-size: 10px;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-scan {
  position: relative;
  color: var(--text-main);
}

.nav-scan .nav-icon {
  width: 48px;
  height: 48px;
  margin-top: -22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e7e0f2;
  box-shadow: 0 5px 16px rgba(38, 24, 76, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-scan .nav-icon img,
.nav-scan .scan-circle img,
.nav-qr-btn img {
  width: 24px;
  height: 24px;
  opacity: 1;
  filter: none;
}

.nav-item.active .nav-icon img {
  opacity: 1;
  filter: none;
  transform: translateY(-1px);
}

/* ---- ログイン画面も参考画像寄せ ---- */
.page-login {
  background:
    radial-gradient(circle at top right, rgba(91, 44, 160, 0.22), transparent 36%),
    linear-gradient(180deg, #fbf7ff 0%, #fffaf5 100%);
}

.login-card {
  border-radius: 22px;
  box-shadow: var(--card-shadow);
}

.btn-line {
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(6, 199, 85, 0.22);
}

/* =========================
   Variety Ratings
========================= */

.variety-ratings-mini {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(229,216,196,.8);
    font-size: 11px;
    line-height: 1.5;
    color: #6B5D52;
    font-weight: 700;
}

.rating-mini-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.rating-mini-row strong {
    color: #C9920A;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.rating-list {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(229,216,196,.9);
}

.rating-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 14px;
    font-weight: 700;
}

.rating-label {
    color: #1A3A6E;
}

.rating-stars {
    color: #C9920A;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.variety-season {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    display: inline-block;
    background: #F7F1E4;
    color: #5B3A1E;
    font-size: 12px;
    font-weight: 800;
}

/* ============================================================
   Home / Login Before Page
   ============================================================ */

.page-home {
  background:
    radial-gradient(circle at 18% 0%, rgba(107, 53, 160, 0.18), transparent 34%),
    radial-gradient(circle at 90% 18%, rgba(34, 155, 47, 0.12), transparent 28%),
    linear-gradient(180deg, #fbf7ff 0%, #fffaf5 100%);
}

.home-page {
  width: 100%;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: 40px;
  color: var(--text-main, #241b3f);
}

.home-hero {
  padding: 34px 20px 24px;
}

.home-hero-inner {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 34px 22px 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 8%, rgba(255,255,255,.86), transparent 32%),
    linear-gradient(145deg, #351461 0%, #5B2CA0 48%, #1A3A6E 100%);
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(38, 24, 76, 0.22);
}

.home-hero-inner::after {
  content: "";
  position: absolute;
  inset: auto -30px -72px -30px;
  height: 150px;
  background: rgba(255,255,255,.08);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

.home-visual {
  position: relative;
  width: 132px;
  height: 112px;
  margin: 0 auto 18px;
}

.berry-cluster {
  position: relative;
  width: 100%;
  height: 100%;
}

.berry {
  position: absolute;
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.55), transparent 16%),
    radial-gradient(circle at 65% 70%, rgba(16, 8, 80, .35), transparent 42%),
    linear-gradient(145deg, #7D5CFF 0%, #38208C 58%, #190A50 100%);
  box-shadow:
    inset 0 -8px 12px rgba(0,0,0,.18),
    0 8px 18px rgba(9, 4, 40, .24);
}

.b1 {
  width: 58px;
  height: 58px;
  left: 22px;
  top: 30px;
}

.b2 {
  width: 52px;
  height: 52px;
  left: 60px;
  top: 20px;
}

.b3 {
  width: 46px;
  height: 46px;
  left: 50px;
  top: 64px;
}

.b4 {
  width: 38px;
  height: 38px;
  left: 18px;
  top: 70px;
  opacity: .92;
}

.leaf {
  position: absolute;
  display: block;
  width: 44px;
  height: 24px;
  background: linear-gradient(135deg, #6DC36D, #1F8B3A);
  border-radius: 90% 10% 90% 10%;
  box-shadow: 0 6px 12px rgba(0,0,0,.12);
}

.l1 {
  left: 22px;
  top: 8px;
  transform: rotate(-28deg);
}

.l2 {
  right: 16px;
  top: 2px;
  transform: rotate(18deg) scale(.9);
}

.l3 {
  left: 58px;
  top: 0;
  transform: rotate(-4deg) scale(.78);
  opacity: .86;
}

.home-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 34px;
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: .04em;
}

.home-title .large {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
  letter-spacing: .12em;
  opacity: .88;
}

.home-subtitle {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 700;
  opacity: .92;
}

.home-cta-buttons {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.line-login-btn,
.guest-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.line-login-btn {
  gap: 10px;
  background: #06C755;
  color: #ffffff;
  box-shadow: 0 7px 18px rgba(6, 199, 85, 0.28);
}

.line-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #06C755;
  font-size: 15px;
  font-weight: 900;
}

.guest-btn {
  background: rgba(255,255,255,.14);
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,.42);
  backdrop-filter: blur(8px);
}

.guest-btn-bottom {
  margin-top: 10px;
  color: var(--purple-main, #5b2ca0);
  background: #ffffff;
  border-color: rgba(91, 44, 160, 0.28);
}

.home-summary,
.home-stats,
.how-to-section,
.achievement-section {
  padding: 0 20px;
  margin-top: 18px;
}

.summary-card,
.stat-card,
.step-card,
.achievement-banner {
  background: #ffffff;
  border: 1px solid rgba(91, 44, 160, 0.08);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(38, 24, 76, 0.10);
}

.summary-card {
  padding: 22px 20px;
}

.summary-label,
.section-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--purple-main, #5b2ca0);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

.summary-title,
.section-title {
  margin: 0;
  color: var(--purple-dark, #1d0f4a);
  font-size: 22px;
  line-height: 1.45;
  font-weight: 900;
}

.summary-text {
  margin-top: 12px;
  color: var(--text-sub, #6f6884);
  font-size: 14px;
  line-height: 1.8;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  padding: 16px 8px;
  text-align: center;
  border-radius: 20px;
}

.stat-number {
  color: var(--purple-main, #5b2ca0);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.stat-label {
  margin-top: 7px;
  color: var(--text-sub, #6f6884);
  font-size: 11px;
  font-weight: 800;
}

.home-section-header {
  margin-bottom: 14px;
}

.steps-grid {
  display: grid;
  gap: 12px;
}

.step-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
}

.step-number {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--purple-main, #5b2ca0), #7B4DCC);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(91, 44, 160, .22);
}

.step-title {
  margin: 0;
  color: var(--purple-dark, #1d0f4a);
  font-size: 16px;
  font-weight: 900;
}

.step-description {
  margin-top: 6px;
  color: var(--text-sub, #6f6884);
  font-size: 13px;
  line-height: 1.7;
  font-weight: 700;
}

.achievement-banner {
  position: relative;
  overflow: hidden;
  padding: 22px 20px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 214, 91, .32), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #fff7df 100%);
}

.achievement-icon {
  font-size: 38px;
  line-height: 1;
}

.achievement-text {
  margin-top: 8px;
  color: #6B4C00;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 900;
}

.achievement-sub {
  margin: 10px auto 0;
  max-width: 320px;
  color: #6B5D52;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 700;
}

.bottom-login-cta {
  margin-top: 16px;
  padding-bottom: 10px;
}

@media (min-width: 520px) {
  .home-hero {
    padding-top: 44px;
  }

  .home-title {
    font-size: 38px;
  }
}
.admin-rating-summary { display: flex; flex-wrap: wrap; gap: .375rem; }
.admin-rating-summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: .25rem .45rem;
  border-radius: 999px;
  background: #f4f6ef;
  color: var(--green-dark);
  font-size: .75rem;
  font-weight: 700;
}
.admin-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.admin-help { font-size: .75rem; color: #666; }
.admin-modal-inner { width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); overflow-y: auto; }
.admin-image-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-image-preview {
  width: 92px;
  height: 92px;
  border-radius: 20px;
  background: #f4f6ef;
  border: 1px solid rgba(45, 90, 27, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 2rem;
  flex-shrink: 0;
}
.admin-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.admin-inline-check { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; color: #444; }
