/* 貴志川いちご狩り園 予約画面（LIFF）
   いちごをイメージした、やわらかく親しみのあるデザイン */
:root{
  /* いちごの実 */
  --berry:#e8425c;
  --berry-deep:#c22a44;
  --berry-light:#ff7d94;
  --berry-tint:#ffeef1;
  --berry-tint2:#ffe0e6;
  /* いちごのヘタ・葉 */
  --leaf:#57a44c;
  --leaf-tint:#eaf6e7;
  /* ミルク・クリーム */
  --cream:#fff7f3;
  --cream2:#fffdfb;
  --white:#ffffff;
  /* 文字 */
  --text:#4a3b3d;
  --text-soft:#8a7579;
  --text-faint:#b5a3a6;
  /* 差し色 */
  --gold:#e8a33d;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:"Hiragino Maru Gothic ProN","Noto Sans JP","Hiragino Sans",sans-serif;
  background:var(--cream);
  color:var(--text);
  font-size:15px; line-height:1.75;
  -webkit-text-size-adjust:100%;
}
#app{max-width:520px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column;background:var(--cream);}

/* ───── ヘッダー ───── */
.app-header{
  background:var(--berry);
  color:#fff;
  padding:14px 18px;
  display:flex; align-items:center; gap:11px;
  padding-top:calc(14px + env(safe-area-inset-top));
  position:relative; overflow:hidden;
}
/* ヘッダーの背景に薄い水玉 */
.app-header::after{
  content:""; position:absolute; right:-30px; top:-30px;
  width:130px; height:130px; border-radius:50%;
  background:rgba(255,255,255,.10);
}
.logo-badge{position:relative;z-index:1;flex-shrink:0;}
.header-text{position:relative;z-index:1;}
.header-text .title{font-size:15px;font-weight:700;letter-spacing:.05em;}
.header-text .sub{font-size:11.5px;opacity:.9;letter-spacing:.08em;}

/* ───── ステップ表示 ───── */
.steps-indicator{
  display:flex; background:var(--white);
  padding:11px 12px; gap:6px; justify-content:center;
  border-bottom:1px solid var(--berry-tint2);
}
.steps-indicator .step{
  font-size:11.5px; padding:5px 12px; border-radius:999px;
  color:var(--text-faint); white-space:nowrap; transition:all .2s;
}
.steps-indicator .step.active{
  background:var(--berry); color:#fff; font-weight:700;
  box-shadow:0 2px 6px rgba(232,66,92,.28);
}

main{flex:1;padding:20px 16px 30px;}
.step-panel.hidden{display:none;}

h2{
  font-size:17px; margin:0 0 6px; font-weight:700; color:var(--berry-deep);
  display:flex; align-items:center; gap:7px;
}
h2::before{
  content:""; width:7px; height:7px; border-radius:50%;
  background:var(--berry-light); flex-shrink:0;
}
.lead{font-size:12.5px;color:var(--text-soft);margin:0 0 16px;padding-left:14px;}

/* ───── カレンダー ───── */
.month-nav{
  display:flex; align-items:center; justify-content:center;
  gap:16px; margin:8px 0 14px;
}
.month-nav span{font-size:17px;font-weight:700;min-width:130px;text-align:center;color:var(--berry-deep);}
.month-nav button{
  width:36px;height:36px;border-radius:50%;border:none;
  background:var(--white); color:var(--berry); font-size:19px;
  cursor:pointer; line-height:1; box-shadow:0 2px 6px rgba(200,120,130,.16);
}
.month-nav button:active{background:var(--berry-tint);}
.month-nav button:disabled{opacity:.3;box-shadow:none;cursor:default;}

.calendar-weekdays{
  display:grid;grid-template-columns:repeat(7,1fr);gap:5px;
  font-size:11.5px;color:var(--text-soft);text-align:center;margin-bottom:6px;font-weight:700;
}
.calendar-weekdays .sun{color:var(--berry);}
.calendar-weekdays .sat{color:#5b8fc7;}

.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;}
.cal-cell{
  aspect-ratio:1/1; border:none; border-radius:14px; font-size:15px;
  display:flex; align-items:center; justify-content:center;
  font-family:inherit; cursor:pointer; padding:0; font-weight:700;
  transition:transform .12s;
}
.cal-cell.blank{background:none;pointer-events:none;}
.cal-cell.open{
  background:var(--white); color:var(--berry-deep);
  box-shadow:0 2px 5px rgba(200,120,130,.14);
  border:1.5px solid var(--berry-tint2);
}
.cal-cell.open:active{transform:scale(.93);background:var(--berry-tint);}
.cal-cell.closed{
  background:transparent; color:var(--text-faint);
  cursor:default; font-weight:400; border:1.5px solid transparent;
}
.cal-cell.selected{
  background:var(--berry); color:#fff;
  box-shadow:0 3px 10px rgba(232,66,92,.4); border-color:var(--berry);
  transform:scale(1.04);
}
.cal-loading{grid-column:1/-1;text-align:center;color:var(--text-faint);font-size:12px;padding:26px 0;}

.month-note{
  background:var(--berry-tint); border-radius:10px;
  padding:10px 13px; margin-top:12px;
  font-size:12px; line-height:1.6; color:var(--berry-deep); text-align:center;
}
.month-note.hidden{display:none;}

.legend{
  display:flex;gap:16px;justify-content:center;margin:14px 0 6px;
  font-size:11.5px;color:var(--text-soft);
}
.legend .dot{
  display:inline-block;width:12px;height:12px;border-radius:4px;
  margin-right:5px;vertical-align:-2px;
}
.legend .dot.open{background:var(--white);border:1.5px solid var(--berry-tint2);}
.legend .dot.closed{background:#f0e6e4;}

.selected-note{
  text-align:center; font-size:14px; font-weight:700; color:var(--berry);
  min-height:24px; margin:12px 0 14px;
}
.selected-note.closed-notice{
  background:var(--berry-tint); border-radius:12px;
  padding:12px 14px; font-size:13px; line-height:1.7; font-weight:400;
  color:var(--berry-deep);
}

/* ───── お知らせバナー ───── */
.known-banner{
  background:var(--leaf-tint); border-radius:12px;
  padding:12px 14px; font-size:12.5px; line-height:1.7;
  margin-bottom:18px; color:#3d7534;
  display:flex; gap:8px;
}
.known-banner::before{content:"🍓";flex-shrink:0;font-size:15px;}
.known-banner.hidden{display:none;}

/* ───── 入力欄 ───── */
.field{display:block;margin-bottom:20px;}
.field-label{display:block;font-size:13.5px;font-weight:700;margin-bottom:7px;color:var(--text);}
.field-label em{
  font-style:normal;font-size:10px;background:var(--berry);color:#fff;
  padding:2px 7px;border-radius:999px;margin-left:7px;font-weight:700;vertical-align:1.5px;
}
.field input[type=text],.field input[type=tel],.field textarea{
  width:100%; padding:13px 14px;
  border:2px solid var(--berry-tint2); border-radius:12px;
  font-size:16px; font-family:inherit; background:var(--white); color:var(--text);
}
.field input::placeholder,.field textarea::placeholder{color:var(--text-faint);}
.field input:focus,.field textarea:focus{
  outline:none; border-color:var(--berry-light);
  box-shadow:0 0 0 3px var(--berry-tint);
}
.field input.has-error,.field textarea.has-error{
  border-color:var(--berry); background:var(--berry-tint);
}
.field-hint{display:block;font-size:11.5px;color:var(--text-soft);margin-top:6px;line-height:1.6;}

/* ───── 希望時間（30分刻み・4列）───── */
.slot-list{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;}
.slot-list.has-error{outline:2px solid var(--berry);outline-offset:5px;border-radius:12px;}
.slot-btn{
  padding:12px 2px; border:2px solid var(--berry-tint2); border-radius:11px;
  background:var(--white); color:var(--text); font-size:13px;
  font-family:inherit; cursor:pointer; font-weight:700; transition:all .15s;
  white-space:nowrap; letter-spacing:-.02em;
}
.slot-btn:active{transform:scale(.96);}
.slot-btn.sel{
  border-color:var(--berry); background:var(--berry); color:#fff;
  box-shadow:0 3px 8px rgba(232,66,92,.3);
}

/* ───── 人数 ───── */
.count-rows{
  background:var(--white); border-radius:14px; padding:4px 16px;
  box-shadow:0 2px 8px rgba(200,120,130,.1);
}
.count-rows.has-error{outline:2px solid var(--berry);outline-offset:4px;}
.count-row{
  display:flex;justify-content:space-between;align-items:center;
  padding:13px 0;border-bottom:1px dashed var(--berry-tint2);
}
.count-row:last-child{border-bottom:none;}
.count-name{display:block;font-size:14.5px;font-weight:700;}
.count-desc{display:block;font-size:11px;color:var(--text-soft);}
.stepper{display:flex;align-items:center;gap:13px;}
.step-btn{
  width:38px;height:38px;border-radius:50%;border:none;
  background:var(--berry-tint); color:var(--berry); font-size:19px; font-weight:700;
  cursor:pointer; line-height:1; display:flex; align-items:center;
  justify-content:center; padding:0; transition:all .12s;
}
.step-btn:active{background:var(--berry);color:#fff;transform:scale(.9);}
.count-value{font-size:19px;font-weight:700;min-width:26px;text-align:center;}
.total-line{
  text-align:right; font-size:13.5px; color:var(--text-soft);
  margin:12px 2px 0; font-weight:700;
}
.total-line strong{font-size:24px;color:var(--berry);margin:0 4px;}

/* ───── 確認カード ───── */
.confirm-card{
  background:var(--white); border-radius:16px;
  padding:18px 20px; margin-bottom:18px;
  box-shadow:0 3px 12px rgba(200,120,130,.13);
}
.confirm-card dl{display:grid;grid-template-columns:auto 1fr;gap:11px 16px;margin:0;}
.confirm-card dt{font-size:12px;color:var(--text-soft);white-space:nowrap;}
.confirm-card dd{font-size:14.5px;font-weight:700;margin:0;word-break:break-all;}
.confirm-card dt.hidden,.confirm-card dd.hidden{display:none;}

.notice{
  background:var(--berry-tint); border-radius:14px; padding:14px 16px;
  font-size:12.5px; line-height:1.8; color:var(--berry-deep); margin-bottom:20px;
}
.notice strong{color:var(--berry);}

/* ───── ボタン ───── */
.btn-primary,.btn-outline{
  display:block; width:100%; padding:16px; border-radius:14px;
  font-size:16px; font-weight:700; font-family:inherit;
  cursor:pointer; text-align:center; transition:transform .12s;
}
.btn-primary{
  background:var(--berry); color:#fff; border:none;
  box-shadow:0 4px 12px rgba(232,66,92,.32);
}
.btn-primary:active{transform:scale(.98);}
.btn-primary:disabled{
  background:#f0e2e2; color:var(--text-faint);
  cursor:default; box-shadow:none;
}
.btn-outline{
  background:var(--white); color:var(--berry);
  border:2px solid var(--berry-tint2);
}
.nav-buttons{display:flex;gap:10px;}
.nav-buttons .btn-outline{flex:1;}
.nav-buttons .btn-primary{flex:2;}

/* ───── 完了 ───── */
.done-icon{
  font-size:56px; text-align:center; margin:24px 0 12px;
  animation:pop .5s ease-out;
}
@keyframes pop{
  0%{transform:scale(0);} 60%{transform:scale(1.2);} 100%{transform:scale(1);}
}
#panel-done h2{justify-content:center;}
#panel-done h2::before{display:none;}
.done-body{
  text-align:center;font-size:13.5px;color:var(--text-soft);
  line-height:1.9;margin:0 0 22px;
}

/* ───── エラー ───── */
.error-banner{
  background:var(--berry); color:#fff; padding:14px 16px;
  border-radius:12px; font-size:13px; line-height:1.7; margin-top:18px;
  box-shadow:0 3px 10px rgba(232,66,92,.3);
}
.error-banner.hidden{display:none;}

/* ───── フッター ───── */
.app-footer{
  background:var(--white); color:var(--text-soft); text-align:center;
  padding:18px 16px; font-size:11.5px; line-height:1.9;
  border-top:1px solid var(--berry-tint2);
  padding-bottom:calc(18px + env(safe-area-inset-bottom));
}
.app-footer a{
  color:var(--berry); font-size:19px; font-weight:700;
  text-decoration:none; letter-spacing:.05em;
}
