/* ------------------------------
   基本設定・リセット
------------------------------ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Helvetica Neue", "Arial", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  background-color: #eef0f3;
  color: #333;
  line-height: 1.5;
}

/* ------------------------------
   レイアウト
------------------------------ */
.app-container {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  gap: 30px;
}
@media (min-width: 768px) {
  .app-container {
    flex-direction: row;
    padding: 40px;
  }
}

/* ------------------------------
   左側：操作パネル
------------------------------ */
.control-panel {
  flex: 1;
  max-width: 400px;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.control-panel h1 {
  font-size: 22px;
  margin-bottom: 5px;
  font-weight: bold;
  color: #111;
}
.desc {
  color: #666;
  font-size: 13px;
  margin-bottom: 25px;
}
.control-group {
  margin-bottom: 20px;
}
.control-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  color: #111;
}
.control-group input[type="month"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
}
.control-group input:focus {
  outline: none;
  border-color: #111;
}
.hint {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
  line-height: 1.4;
}
.btn {
  width: 100%;
  padding: 16px;
  background-color: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 10px;
}
.btn:hover {
  background-color: #333;
}
.btn:disabled {
  background-color: #999;
  cursor: not-allowed;
}

/* ------------------------------
   右側：プレビューパネル (画像化対象)
------------------------------ */
.preview-panel {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 80vh; /* スマホでのプレビュー時、全体の高さを制限 */
  overflow-y: auto; /* 縦長コンテンツをスクロール可能に */
  background-color: #eef0f3;
  border-radius: 12px;
  padding: 20px;
}

@media (min-width: 768px) {
  .preview-panel {
    height: auto; /* PCでは高さをコンテンツに合わせる */
    overflow-y: visible;
  }
}

.capture-area {
  width: 100%;
  /* max-width: 500px; を削除 */
  /* aspect-ratio: 4 / 5; を削除。コンテンツ全体の高さをとる */
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  position: relative;
  height: auto; /* コンテンツに合わせて広がる */
}
.capture-inner {
  display: flex;
  flex-direction: column;
  height: auto; /* height: 100%; から変更 */
  padding: 10% 8%;
}

/* ヘッダー部分 */
.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8%;
}

/* 左：年と月 */
.header-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 5px;
  border-bottom: 2px dotted #aaa; /* 点線 */
}
.cal-year {
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: #333;
  line-height: 1;
  margin-bottom: 8px;
}
.cal-month-en {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #333;
  line-height: 1;
}

/* 中央：ロゴ */
.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #111; /* 外枠 */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px;
}
.logo-inner-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid #111; /* 内枠 */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff; /* 透過ロゴでも背景が白になるように指定 */
}
#logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 右：数字の月 */
.header-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}
.cal-month-num {
  font-size: 5rem;
  font-weight: bold;
  color: #111;
  line-height: 0.8;
  letter-spacing: -0.05em;
}

/* カレンダー本体 */
.cal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 曜日 */
.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid #111;
  border-left: 1px solid #111;
  margin-bottom: 4px;
}
.weekday-cell {
  text-align: center;
  font-size: 0.9rem;
  font-weight: bold;
  padding: 6px 0;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  color: #111;
}

/* 日付グリッド */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  flex: 1; /* 残りの高さを埋める */
  border-top: 1px solid #111;
  border-left: 1px solid #111;
}
.day-cell {
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* 縦長なので余白を微調整 */
  cursor: pointer;
  background-color: #fff;
  transition: background-color 0.1s;
  position: relative;
}
.day-cell:hover {
  background-color: #f9f9f9;
}
.date-num {
  font-size: 1.2rem;
  font-weight: 500;
  color: #111;
  line-height: 1;
}
.date-num.other-month {
  color: #bbb; /* 前月・来月は薄く */
}

/* 予定スタンプ */
.status-mark {
  margin-top: auto;
  margin-bottom: 15px; /* 縦長なので下余白を多めに */
  font-size: 0.85rem;
  font-weight: bold;
  width: 32px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* 定休日スタンプ */
.status-closed {
  background-color: #111;
  color: #fff;
  border-radius: 50%;
  width: 24px;
}
/* ★(ディナーのみ)スタンプ */
.status-star {
  color: #111;
  font-size: 1.3rem;
}
/* 通常営業スタンプ */
.status-normal {
  color: #111;
  font-size: 0.7rem;
  border: 1px solid #111;
  border-radius: 4px;
  white-space: nowrap;
  padding: 0 2px;
}
/* ☆(白抜きの星)スタンプ */
.status-star-white {
  color: #111;
  font-size: 1.3rem;
}
/* ■(黒塗りの四角)スタンプ */
.status-square-black {
  color: #111;
  font-size: 1.1rem;
}