.gl-scheduler-wrapper {
  padding: 0 16px;
}

.gl-scheduler-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.gl-scheduler-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 600;
  color: #333;
}

.gl-scheduler-button {
  background: #0073aa;
  color: #fff;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
  justify-self: start;
  margin: 16px auto;
}

.gl-scheduler-button:hover {
  background: #005e8a;
}


.gl-scheduler-search-button {
  text-align: center;
}

.gl-scheduler-inputs {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gl-scheduler-memo {
  min-width: 200px;
}

.memo-container {
  position: relative;
}

.gl-scheduler-memo .memo-input {
  width: 100%;
  min-height: 20px;
  padding: 4px 4px 4px 4px;
  border: none;
  border-radius: 4px;
  font-size: 12px !important;
  font-family: inherit;
  resize: vertical;
  word-wrap: break-word;
  word-break: break-all;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  transition: padding 0.2s, border-color 0.3s, background-color 0.3s;
}

.gl-scheduler-memo .memo-input:focus {
  outline: none;
  padding: 4px 30px 4px 4px;
}

.gl-scheduler-memo .memo-input.memo-saved {
  background-color: #d4edda;
}

.gl-scheduler-memo .memo-input.memo-error {
  background-color: #f8d7da;
}

.memo-save-btn {
  position: absolute;
  top: 4px;
  right: -2px;
  background: rgba(0, 115, 170, 0.7);
  color: white;
  border: none;
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 10;
}

.memo-save-btn:hover {
  background: rgba(0, 94, 138, 0.9);
}

.genesis-inputs-title {
  margin: 8px 0;
}

.gl-scheduler-input-birth-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gl-scheduler-birth-input {
  width: 110px;
  border-width: 1px;
}

.gl-scheduler-link-destiny {
  margin-top: 8px;
  font-size: small;
}

.gl-scheduler-date-input {
  width: 110px;
  border-width: 1px;
}

.energy-analysys-inputs-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.gl-scheduler-inputs-koyomi-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.gl-scheduler-inputs-koyomi {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 8px;
}

.gl-scheduler-inputs-koyomi .gl-scheduler-birth-input {
  margin-right: 0px;
}

.scheduler-tool-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  margin-top: 26px;
}

.scheduler-menu-container {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.scheduler-tool-icon {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  width: 34px;
}

.scheduler-tool-icon:hover {
  background-color: #f0f0f0;
}

.scheduler-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  min-width: 200px;
  max-width: 300px;
}

.scheduler-menu-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.scheduler-menu-item:last-child {
  border-bottom: none;
}

.scheduler-menu-item:hover {
  background-color: #f5f5f5;
}

.scheduler-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: none;
}

.scheduler-menu-header {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.scheduler-menu-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
}

.scheduler-menu-close:hover {
  color: #333;
}

.gl-scheduler-inputs .gl-scheduler-birth-input,
.gl-scheduler-inputs-koyomi .gl-scheduler-birth-input {
  width: 120px;
  text-align: center;
  height: auto;
  line-height: normal;
  vertical-align: middle;
}

.gl-scheduler-results {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
}

.energy_analysis-results {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
}

.gl-scheduler-gender {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px auto;
}

.gl-scheduler-detail-option {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px auto;
}

.gl-scheduler_table {
  border-collapse: collapse;
  /* width: 100%; */
  max-width: 1104px;
  font-size: 14px;
}

.energy_analysis-results .gl-scheduler_table {
  border-collapse: collapse;
  /* width: 100%; */
  max-width: 680px;
  font-size: 14px;
}

.gl-scheduler_table_left {
  width: 48px;
}

.gl-scheduler_table th,
.gl-scheduler_table td {
  border: 1px solid #555555;
  text-align: center;
  padding: 4px;
  vertical-align: middle;
}

.gl-scheduler_table th {
  background-color: #cccccc;
}

.gl-scheduler_table .gray {
  background-color: #999999;
  color: white;
}

.gl-scheduler_table .em {
  font-weight: bold;
}

.gl-scheduler-title-left {
  text-align: center;
  vertical-align: middle;
  writing-mode: vertical-rl;
  background-color: #cccccc;
}

.gl-scheduler-left {
  vertical-align: middle;
}

.gl-scheduler-left {
  text-align: center;
  vertical-align: middle;
  writing-mode: vertical-rl;
}

.gl-scheduler-samll {
  font-size: smaller;
}

.gl-scheduler-xsamll {
  font-size: x-small;
}

.gl-scheduler_total {
  border-top: double 3px #000000;
}

.gl-scheduler_yin {
  background-color: #888888;
  color: white;
}

/* .gl-scheduler-monthly-title{
 } */

.gl-scheduler-monthly-title-item {
  margin: 0 8px;
}

.gl-scheduler-monthly-title-item-small {
  margin: 0 8px;
  font-size: smaller;
}

.gl-scheduler-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px auto 16px;
  flex-direction: column;
}

.gl-scheduler-header-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px auto;
  flex-wrap: wrap;
}

.gl-scheduler-header-row-relation {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px auto;
  font-size: smaller;
  line-height: normal;
}

.gl-scheduler-header-item {
  margin: 0 4px 8px;
}

.gl-scheduler-spring_tide {
  color: #0000AA;
}

/* 検索履歴ポップアップ */
.history-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

.history-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  min-width: 300px;
  max-width: 400px;
  max-height: 500px;
  overflow: hidden;
}

.history-popup-header {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
  position: relative;
}

.history-popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
}

.history-popup-close:hover {
  color: #333;
}

.history-popup-content {
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-item:last-child {
  border-bottom: none;
}

.history-item-content {
  flex: 1;
  padding: 12px 16px;
  cursor: pointer;
}

.history-item-content:hover {
  background-color: #f5f5f5;
}

.history-item-actions {
  padding: 8px 12px;
}

.history-edit-btn {
  background: #0073aa;
  color: white;
  border: none;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s;
}

.history-edit-btn:hover {
  background: #005e8a;
}

.history-details {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

/* destiny.php用の誕生日入力とツールボタンのレイアウト */
.genesis-birth-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.genesis-birth-input-wrapper .genesis-birth-input {
  flex: 1;
}

.genesis-birth-input-wrapper .scheduler-tool-wrapper {
  margin-top: 0;
}

/* 性別選択の調整 */
.genesis-gender {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 8px auto;
}

.genesis-gender-options {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

/* 日干・月支指定オプション（性別選択内） */
.genesis-gender .genesis-override-selects {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}

.genesis-override-group {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.genesis-override-group label {
  font-weight: 500;
  color: #555;
  font-size: 0.8rem;
  min-width: 2.5rem;
}

.genesis-override-select {
  padding: 0.375rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  background-color: white;
  font-size: 0.7rem !important;
  line-height: 1.2;
  min-width: 3.5rem;
  height: auto;
}

.genesis-override-select:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.1);
}

.genesis-override-select option {
  font-size: 0.7rem !important;
  line-height: 1.2;
}

/* 縦並び用のスタイル */
.genesis-override-selects-vertical {
  flex-direction: column !important;
  gap: 0.5rem !important;
}

