body {
  font-family: Arial, sans-serif;
  margin: 0;
  color: #333;
  background: #fff;
}

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 30px;
  box-sizing: border-box;
}

.header,
.settings,
.result-area,
.info,
.setting-section,
.debug-toggle {
  width: 100%;
  max-width: 700px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  max-width: 700px;
  margin-bottom: 10px;
}

.header h1 {
  margin: 0;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.policy {
  line-height: 1.7;
}

.policy h1 {
  font-size: 26px;
}

.policy h2 {
  font-size: 18px;
}

.policy code {
  word-break: break-all;
}

.policy-meta {
  color: #666;
  font-size: 13px;
}

.policy-back {
  margin-top: 30px;
}

.policy-en {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
}

.policy-en h1 {
  font-size: 22px;
}

.account-info {
  font-size: 13px;
  color: #666;
  text-align: right;
}

h1 {
  margin-bottom: 10px;
}

h2 {
  margin-top: 30px;
}

.settings {
  display: flex;
  gap: 20px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 20px;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  font-weight: bold;
}

.output-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.output-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  font-size: 14px;
  cursor: pointer;
}

input[type="date"],
select {
  padding: 8px;
  font-size: 16px;
}

button {
  padding: 9px 18px;
  border: 1px solid #00bfae;
  border-radius: 6px;
  background: white;
  color: #008f83;
  cursor: pointer;
  font-size: 14px;
}

.settings button {
  padding: 14px 52px;
  margin-left: 16px;
  font-size: 16px;
  font-weight: bold;
}

button:hover {
  background: #f0fffd;
}

button.primary {
  background: #00c7b7;
  color: white;
}

button.primary:hover {
  background: #00b3a5;
}

.result-area {
  margin-top: 25px;
}

textarea {
  width: 100%;
  max-width: 700px;
  height: 300px;
  padding: 12px;
  box-sizing: border-box;
  font-family: monospace;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
}

.buttons {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.buttons button {
  padding: 14px 52px;
  font-size: 16px;
  font-weight: bold;
}

.info {
  margin-top: 25px;
  padding: 15px;
  background: #f5f5f5;
  max-width: 700px;
  box-sizing: border-box;
}

.info.intro {
  margin-top: 12px;
}

.info.intro .note {
  margin-top: 0;
}

#status {
  min-height: 1.5em;
  padding-top: 15px;
}

.error {
  color: #d00;
}

.success {
  color: #1565c0;
}

.debug {
  margin-top: 30px;
  max-width: 900px;
}

.debug-day {
  border: 1px solid #ddd;
  margin-bottom: 10px;
  padding: 12px;
  background: #fafafa;
}

.debug-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
}

.event {
  margin: 4px 0;
  padding: 4px 8px;
  background: white;
}

.daytime {
  background: #fff3cd;
}

.nighttime {
  background: #dbeafe;
}

.detail-area {
  margin-top: 10px;
}

.detail-content {
  margin-top: 10px;
  padding: 10px;
  background: white;
  border: 1px solid #ddd;
}

.loading-detail {
  color: #666;
}

.setting-section {
  max-width: 700px;
  margin-top: 25px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f5f5f5;
  box-sizing: border-box;
}

.time-settings {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.time-group {
  display: flex;
  align-items: end;
  gap: 8px;
}

.calendar-list {
  margin-top: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding: 10px;
  background: white;
  border: 1px solid #ddd;
}

.calendar-item {
  margin: 5px 0;
}

.calendar-item label {
  font-weight: normal;
  cursor: pointer;
}

.note {
  margin-top: 10px;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.debug-toggle {
  margin-top: 20px;
  padding: 10px 15px;
  background: #f5f5f5;
  max-width: 700px;
  box-sizing: border-box;
}

.small-buttons {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.fixed-exclusion {
  margin-top: 10px;
  padding: 8px 10px;
  background: white;
  border: 1px solid #ddd;
  color: #666;
  font-size: 13px;
}

/* GAS版のインライン指定を CSP に合わせて移したもの */
[hidden] {
  display: none !important;
}

.time-separator {
  padding-bottom: 8px;
}

#debugSection {
  display: none;
}

/* Pages版で追加した表示 */
.warning {
  color: #b35c00;
}

.login-button {
  margin-left: 8px;
}

.login-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.login-notice {
  max-width: 700px;
  box-sizing: border-box;
  margin: 10px 0 0;
  padding: 8px 12px;
  border-left: 4px solid #00c7b7;
  border-radius: 4px;
  background: #e8f9f7;
  color: #1e4a46;
  font-size: 14px;
  line-height: 1.6;
}

@media screen and (max-width: 1000px) {

/* 横スクロール防止(スクロール時のガタつき対策) */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

/* 全体の文字 */
body {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

/* ページ幅 */
.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 12px;
  box-sizing: border-box;
}

/* タイトル */
.header {
  display: block;
  max-width: none;
}

.header h1 {
  font-size: 26px;
  margin: 0 0 6px;
}

.account-info {
  font-size: 14px;
  text-align: left;
}

/* 説明 */
.info {
  width: 100%;
  max-width: none;
  font-size: 17px;
  line-height: 1.7;
  box-sizing: border-box;
}

.info h2,
.info h3 {
  font-size: 21px;
}

/* 検索エリア */
.settings {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.settings .field {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.settings label {
  display: block;
  font-size: 17px;
  font-weight: bold;
  margin-bottom: 6px;
}

/* 日付入力 */
input[type="date"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 48px;
  padding: 0 12px;
  line-height: 46px;
  box-sizing: border-box;
  font-size: 17px;
  color: #333;
  -webkit-text-fill-color: #333;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
}

.settings .field {
  min-width: 0;
}

/* 予定を取得 */
.settings button {
  width: 100%;
  max-width: none;
  height: 52px;
  margin-left: 0;
  font-size: 17px;
  font-weight: bold;
  border-radius: 8px;
}

/* 結果 */
.result-area {
  width: 100%;
  max-width: none;
}

textarea {
  width: 100%;
  max-width: none;
  height: 180px;
  padding: 12px;
  box-sizing: border-box;
  font-size: 17px;
  line-height: 1.7;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: #fff;
}

/* コピー・クリア */
.buttons {
  width: 100%;
  display: flex;
  gap: 8px;
}

.buttons button {
  flex: 1;
  height: 48px;
  font-size: 16px;
  border-radius: 8px;
}

/* 判定条件・時間設定など */
.setting-section {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  font-size: 17px;
  line-height: 1.7;
}

.setting-section h2,
.setting-section h3 {
  font-size: 21px;
}

/* 時刻セレクト */
.time-settings {
  width: 100%;
}

.time-group select {
  font-size: 17px;
  min-height: 44px;
}

/* タップ領域確保 */
.small-buttons button {
  min-height: 44px;
  font-size: 16px;
}

/* 横はみ出し防止(スクロール時のガタつき対策) */
.debug-toggle {
  box-sizing: border-box;
}

}

