* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Pretendard", "Nunito", sans-serif;

  /* ピンク大理石背景 */
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 230, 240, 0.9), rgba(255, 240, 245, 0.7)),
    radial-gradient(circle at 80% 40%, rgba(245, 210, 220, 0.8), rgba(255, 240, 245, 0.6)),
    radial-gradient(circle at 40% 80%, rgba(250, 220, 230, 0.8), rgba(255, 240, 245, 0.7)),
    #fdf6f8;
  background-blend-mode: overlay;

  color: #5a4a4a;
  letter-spacing: 0.2px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px;
}

.header h1 {
  text-align: center;
  font-size: 1.7rem;
  color: #c79aaa;
  margin-bottom: 20px;
  font-weight: 600;
}

/* 日付欄＋保存ボタン */
.date-save-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}

.cute-date-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8eef2;
  border: 1px solid #e8d2da;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.cute-date-wrapper:hover {
  background: #f2e4ea;
}

.date-icon {
  font-size: 1.2rem;
  color: #c79aaa;
}

.date-display {
  font-size: 1rem;
  color: #5a4a4a;
  font-weight: 500;
}

.hidden-date {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* 上部タブ */
.tab-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #e8d2da;
  background: #f8eef2;
  color: #5a4a4a;
  cursor: pointer;
}

.tab.active {
  background: #d3a7b7;
  color: #fff;
}

/* 今日ビュー */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.column {
  background: #ffffffee;
  border-radius: 12px;
  padding: 18px;
  border: 1px solid #e9d4db;
}

.column h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: #c79aaa;
  font-weight: 600;
}

/* タイムライン（1日ビュー） */
.timeline {
  position: relative;
  height: 1000px;
  border-left: 2px solid #dcbac6;
  background: linear-gradient(to bottom, #fff 0%, #fbf6f8 100%);
  border-radius: 10px;
  cursor: pointer;
}

.timeline-hour {
  position: absolute;
  left: -42px;
  font-size: 0.72rem;
  color: #a88c95;
  padding: 2px 4px;
  opacity: 0.85;
}

/* イベントブロック（1日ビュー） */
.event-block {
  position: absolute;
  left: 10px;
  right: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #4a3f3f;
  background-color: #f4e3ea;
  border: 1px solid #e8d2da;
  cursor: pointer;
  transition: 0.15s ease;
}

.event-block:hover {
  background-color: #edd8e1;
}

/* 編集ブロック */
.editable-block {
  padding: 12px;
  background: #f8eef2;
  border-radius: 10px;
  border: 1px solid #e8d2da;
  cursor: pointer;
  min-height: 60px;
  color: #4a3f3f;
  transition: 0.15s ease;
}

.editable-block:hover {
  background: #f2e4ea;
}

/* 達成度 */
.achievement-value {
  font-size: 1.8rem;
  text-align: center;
  padding: 14px;
  background: #f5e8ed;
  border-radius: 12px;
  color: #c79aaa;
  font-weight: 600;
  border: 1px solid #e8d2da;
}

/* ----------------------------- */
/* モーダル（A：ふわふわミルキーピンク） */
/* ----------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: #00000030;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-a {
  background: #fdf3f7;
  padding: 26px;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  border: 1px solid #e9d4db;
}

.modal-a h2 {
  margin-top: 0;
  color: #c79aaa;
  text-align: center;
  font-weight: 600;
}

.modal-label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #b48a99;
}

.modal-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e8d2da;
  background: #fff;
  font-size: 0.95rem;
  margin-top: 4px;
}

.time-row {
  display: flex;
  gap: 12px;
}

/* モーダルボタン */
.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}

button.primary {
  background: #d3a7b7;
  color: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  border: none;
  font-weight: 600;
}

button.secondary {
  background: #f2e4ea;
  border-radius: 999px;
  padding: 8px 18px;
  border: none;
  color: #6a5a5a;
}

button.delete-btn {
  background: #e8b4c0;
  color: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  border: none;
  font-weight: 600;
}

/* ----------------------------- */
/* 週ビュー（縦軸タイムライン） */
/* ----------------------------- */

.hidden {
  display: none;
}

.weekly {
  padding: 10px;
  position: relative;
}

/* 内部タブ（予定 / 実際の行動） */
.inner-tab-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.inner-tab {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid #e8d2da;
  background: #f8eef2;
  color: #5a4a4a;
  cursor: pointer;
}

.inner-tab.active {
  background: #d3a7b7;
  color: #fff;
}

/* 7列の週カレンダー */
.weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  height: 1000px;
  position: relative;
}

/* 各日の縦列 */
.week-day-col {
  position: relative;
  background: #ffffffdd;
  border: 1px solid #e8d2da;
  border-radius: 12px;
  overflow: hidden;
}

/* 日付ヘッダー */
.week-day-header {
  text-align: center;
  padding: 6px;
  background: #f8eef2;
  border-bottom: 1px solid #e8d2da;
  color: #c79aaa;
  font-weight: 600;
  font-size: 0.9rem;
}

/* 時間ラベル */
.week-time-axis {
  position: absolute;
  left: -45px;
  width: 40px;
  text-align: right;
  font-size: 0.7rem;
  color: #a88c95;
  pointer-events: none;
}

/* 週ビューのイベント */
.week-event-block {
  position: absolute;
  left: 6px;
  right: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f4e3ea;
  border: 1px solid #e8d2da;
  font-size: 0.75rem;
  color: #4a3f3f;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  cursor: pointer;
}