/* =========================
   Base
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body.app-body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
        "Segoe UI", sans-serif;
    background-color: #f7f7f7;
    color: #222;
    -webkit-font-smoothing: antialiased;
}

/* 全体レイアウト：上にヘッダ、下にタブ、真ん中にコンテンツ */

.app-main {
    padding: 72px 16px 72px; /* ヘッダ分 + フッタ分を空ける */
    max-width: 640px;
    margin: 0 auto;
}

/* =========================
   Header
   ========================= */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    z-index: 10;
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* YouTube状態ラベル */

.app-header-right {
    display: flex;
    align-items: center;
}

.yt-status {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.yt-status-ok {
    background-color: #e6f6f0;
    color: #137c4b;
    border-color: #b8e4d1;
}

.yt-status-ng {
    background-color: #fff4e6;
    color: #b35b00;
    border-color: #ffd9a6;
}

.yt-status-error {
    background-color: #fdecec;
    color: #b3261e;
    border-color: #f5b1ad;
}

.logout-link {
    font-size: 12px;
    color: #4b5563;
    text-decoration: none;
}

.logout-link:hover {
    text-decoration: underline;
}

/* =========================
   Bottom Nav
   ========================= */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -1px 3px rgba(15, 23, 42, 0.04);
    z-index: 10;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    color: #666666;
}

.bottom-nav-item span {
    pointer-events: none;
}

.bottom-nav-item.active {
    color: #e66b3f;
    font-weight: 600;
}

/* =========================
   Cards
   ========================= */

.card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    padding: 12px 14px;
    margin-bottom: 16px;
}

.card-header {
    margin-bottom: 8px;
}

.card-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.card-body {
    font-size: 14px;
}

.card-footer {
    margin-top: 8px;
    font-size: 12px;
}

/* 今日のステータス */

.today-status-card .status-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
}

.status-label {
    font-size: 12px;
    color: #666666;
}

.status-value {
    font-size: 14px;
    font-weight: 600;
}

/* =========================
   Buttons
   ========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    transition: background-color 0.18s ease, color 0.18s ease,
        border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-block {
    width: 100%;
}

.btn + .btn {
    margin-top: 8px;
}

/* メインカラーは少し落ち着いたオレンジ系 */

.btn-primary {
    background-color: #e66b3f;
    border-color: #e66b3f;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(230, 107, 63, 0.35);
}

.btn-primary:hover {
    background-color: #d95f34;
    border-color: #d95f34;
}

.btn-secondary {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-outline {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #4b5563;
}

.btn-outline:hover {
    background-color: #f9fafb;
}

/* =========================
   Forms
   ========================= */

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555555;
}

.input-textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    resize: vertical;
    min-height: 64px;
}

.input-textarea:focus {
    outline: none;
    border-color: #e66b3f;
    box-shadow: 0 0 0 1px rgba(230, 107, 63, 0.2);
}

.input-file {
    display: block;
    width: 100%;
    font-size: 13px;
}

/* =========================
   Text utilities
   ========================= */

.small-text {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

.post-links a {
    color: #e66b3f;
    text-decoration: none;
}

.post-links a:hover {
    text-decoration: underline;
}

/* LINEリンク */

.link-line-share {
    font-weight: 600;
}

/* カレンダーリンク */

.link-calendar {
    font-size: 12px;
    color: #e66b3f;
    text-decoration: none;
}

.link-calendar:hover {
    text-decoration: underline;
}

/* =========================
   Mini Calendar
   ========================= */

.mini-calendar-card .card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mini-day {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 1px solid transparent;
}

.mini-day-empty {
    background-color: #f3f4f6;
    color: #9ca3af;
}

.mini-day-practiced {
    background-color: #e6f6f0;
    color: #137c4b;
    border-color: #b8e4d1;
    font-weight: 600;
}

.mini-day-posted {
    background-color: #fff4e6;
    color: #b35b00;
    border-color: #ffd9a6;
    font-weight: 700;
}

/* =========================
   Sections
   ========================= */

.home-section {
    display: flex;
    flex-direction: column;
}

/* 仮プレースホルダ用 */

.placeholder {
    text-align: center;
    padding: 32px 8px;
    font-size: 14px;
    color: #6b7280;
}

/* =========================
   Responsive (軽め)
   ========================= */

@media (min-width: 768px) {
    .app-main {
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .app-header {
        height: 64px;
    }

    .bottom-nav {
        height: 64px;
    }

    .bottom-nav-item {
        font-size: 13px;
    }
}


/* Calendar */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-month-title {
  font-weight: 600;
}

.btn-nav {
  padding: 4px 8px;
  font-size: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-grid-header {
  margin-bottom: 6px;
  font-size: 12px;
  text-align: center;
  color: #6b7280;
}

.calendar-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 0;
  text-decoration: none;
  border-radius: 10px;
  background-color: #f9fafb;
  color: inherit;
  min-height: 44px;
}

.calendar-cell-empty {
  background: transparent;
}

.calendar-date-number {
  font-size: 13px;
  margin-bottom: 2px;
}

.calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background-color: #9ca3af; /* 練習済 */
  margin-top: 2px;
}

.calendar-dot-posted {
  background-color: #0f766e; /* 投稿済 */
}

.calendar-youtube-icon {
  font-size: 10px;
  margin-top: 2px;
}

.calendar-cell-selected {
  border: 1px solid #0f766e;
  background-color: #ecfdf5;
}

.calendar-cell-today {
  box-shadow: 0 0 0 1px #e5e7eb;
}

