/* TOUCHOFF 追加スタイル */
:root {
  --brand-orange: #f97316;
  --brand-orange-dark: #ea580c;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif; }

.btn-primary {
  background: var(--brand-orange);
  color: white;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background .2s;
}
.btn-primary:hover { background: var(--brand-orange-dark); }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }

.btn-outline {
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background .15s, border-color .15s;
}
.btn-outline:hover { background: #fafafa; border-color: #d1d5db; }

/* w-full クラスとの併用時、確実にブロック幅で展開する */
.btn-primary.w-full,
.btn-outline.w-full {
  display: flex;
  width: 100%;
}

.card {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  border: 1px solid #f1f1f1;
}

.input {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  width: 100%;
  font-size: 0.95rem;
}
.input:focus { outline: 2px solid var(--brand-orange); outline-offset: 0; border-color: var(--brand-orange); }

.badge {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f3f4f6;
}
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #e5e7eb; color: #374151; }

.slot-btn {
  border: 1px solid #e5e7eb;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  background: white;
  text-align: left;
  transition: all .15s;
}
.slot-btn:hover { border-color: var(--brand-orange); }
.slot-btn.reserved { background: #fff7ed; border-color: var(--brand-orange); }
.slot-btn.disabled { opacity: .5; cursor: not-allowed; }

.calendar-day {
  aspect-ratio: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
}
.calendar-day.weekend { color: #9ca3af; }
.calendar-day.today { background: #fff7ed; border: 1px solid var(--brand-orange); font-weight: 700; }
.calendar-day.selected { background: var(--brand-orange); color: white; font-weight: 700; }
.calendar-day.has-lesson::after { content: '•'; position: absolute; bottom: 2px; color: var(--brand-orange); font-size: 1rem; }
.calendar-day.reserved::after { content: '●'; color: var(--brand-orange); }
.calendar-day.past { color: #d1d5db; pointer-events: none; }

.alert { padding: 0.75rem 1rem; border-radius: 0.5rem; margin-bottom: 1rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }

.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th, .admin-table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid #f1f1f1; text-align: left; }
.admin-table th { background: #fafafa; font-weight: 600; font-size: 0.8rem; color: #4b5563; }
.admin-table tbody tr:hover { background: #fafafa; }

/* ===========================================================
   App Shell - モバイルアプリ風レイアウト
   モバイル: フルスクリーン
   PC: 中央寄せの最大幅コンテナ + 周辺グラデ背景
   =========================================================== */
.app-bg {
  background: #fafafa;
  min-height: 100vh;
}

.app-shell {
  background: #fafafa;
  min-height: 100vh;
  padding-bottom: 5rem; /* ボトムナビ分の余白 */
  position: relative;
}

.app-header {
  /* モバイル時はフル幅 */
}

.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

/* PC 表示 (768px 以上) - モバイルアプリのフレーム風に */
@media (min-width: 768px) {
  .app-bg {
    /* 黒〜オレンジのグラデ背景 */
    background: linear-gradient(135deg, #1f2937 0%, #111827 60%, #292524 100%);
    background-attachment: fixed;
    padding: 2rem 0;
  }
  .app-shell {
    max-width: 480px;
    margin: 0 auto;
    background: #fafafa;
    min-height: calc(100vh - 4rem);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
    padding-bottom: 5rem;
  }
  .app-header {
    position: sticky;
    top: 2rem;
    border-radius: 1.5rem 1.5rem 0 0;
  }
  .app-bottom-nav {
    position: absolute; /* shell 内に固定 */
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 1.5rem 1.5rem;
  }
}

/* 管理画面など広めに使いたいページ用ヘルパー */
.app-shell.wide {
  max-width: none;
}
