/* id の定義 */


#init,
.param-container,
.init-btn-area {
  max-width: 320px;   /* ← 他と同じ幅に揃える（好きな幅でOK） */
  margin: 0 auto;     /* ← 画面中央に配置 */
  text-align: left;
}

#stampDialog {
	position: static;
    background-color: #CCCCCC;
}

/* ダイアログの外側（枠） */
.ui-dialog {
width: clamp(160px, 40vw, 280px) !important;

  border-radius: 14px;
}



/* スタンプリストが横に広がらないように */
#stampList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

p {
	line-height: 100%
}


/* class の定義 */


.header-container {
  display: flex;
  align-items: center;   /* ← これで縦中央 */
  justify-content: center;
  gap: 12px;
  padding: 20px 0 5px 0;
  background-color: #CCCCCC;
  font-size: 30px;
  font-weight: bold;
}


.header-logo {
  width: 60px;
  height: 60px;
}

/* タイトル（init / main 共通） */
#titleTextInit,
#titleTextMain {
  display: inline-block;
}

#header-spacer {
  height: 120px; /* 必要な余白に調整 */
  background-color: inherit;
}


.link-container{
  -webkit-box-shadow: 2px 2px 8px -2px rgba(0,0,0,.05);
  position: relative;
  padding: 2px;
  background-color: #999999; /* 中間グレー */
  box-shadow: 2px 2px 8px -2px rgba(0,0,0,.05);
  text-align: center;
}

.footer-container{
  position: relative;
  background-color: #999999; 
}

.contents-container{
  -webkit-box-shadow: 2px 2px 8px -2px rgba(0,0,0,.05);
  position: relative;
  padding: 2px;
  background-color: #CCCCCC; /* 明るいグレー */


  box-shadow: 2px 2px 8px -2px rgba(0,0,0,.05);
}


.param{
  background-color: #CCCCCC; /* 明るいグレー */
	font-size:0.8em;
    max-width: 600px;
    margin: 0 auto;
    display: inline-block; /* 横に並べて中央へ集める */
    text-align: left;      /* 中身は左寄せのまま */
}

.param-container {
  text-align: center
}


.prologue {
  font-size: 0.8rem;
  text-align: center
}


.ndaytbl{
	width: 90vw; 
	max-width: 650px;
    border-collapse: collapse;
    font-size: 10px;
    margin-left: auto;
    margin-right: auto;
}

.ndaytbl td{
    border:1px solid #777;
    height: clamp(0px, calc(90vw / 7), 100px);
    max-width: 100px;
    text-align: left;
    vertical-align: top;
}

.daynum{
    color: #FFFFFF;
    background-color:#666666;
    display: inline-block;
    width: 35px; 
    text-align: center
}


.stamp{
    height: clamp(0px, calc(40vw / 7), 400px);
    width: 100%;              /* ← これが最重要 */
    margin: 4px 0;
    display: flex;
    justify-content: center;  /* 横中央 */
    align-items: center;      /* 縦中央 */
	aspect-ratio: 1 / 1;   /* ← 正方形になる */
}

.stamp-space {
    height: 8px;
}

.day .stamp img {
    width: 90%;
    height: 90%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.day {
    background-color:#FFFFFF;
}

body {
  position: relative;
  padding-bottom: 100px;
  background-color: #CCCCCC;
  font-size: 1rem;
  color: #666666;
  letter-spacing: 1px;
  overscroll-behavior-y: none;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 400;
  margin: 0;
  padding: 0px 0px
  padding-bottom: 120px;
}

label {
    display: inline-block;
    width: 100px;
    vertical-align: top;
  text-align:  left;  
}

a.widelink { display: block; }

.icon-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    width: clamp(24px, 6vw, 48px); /* 最小24px、画面に応じて拡大、最大48px */
    height: auto;
    color: #666666;
}

.material-symbols-outlined {
    font-size: 26px;
    color: #666666;
    vertical-align: middle;
    margin: 0;
    padding: 0;
}

#copyUrlBtn .material-symbols-outlined {
    padding-right: 0 !important;
    margin-right: 0 !important;
}


.footer-container {
    font-size: 0.8rem;
    color: #666666;
    text-align: center;
}

.stamp-option {
    width: 32px !important;
    height: 32px !important;
    cursor: pointer;
    border-radius: 6px;
    border: 4px solid transparent;
    transition: 0.15s;
    border-color: #666666;
}

#main {
    text-align: center;
}

#main-header {
  display: flex;
  justify-content:  flex-start;
  align-items: center;
  gap: 4px; /* ボタン同士の間隔 */
  padding: 5px 5px;
  width: 90vw;   /* カレンダーと同じ幅にする */
  margin: 0 auto;
  max-width: 650px; 
  background-color: #CCCCCC;
}

.flex-spacer {
    flex: 1;
}

#main-container {
	display: block; 
	width: 90vw;   /* カレンダーと同じ幅にする */
	margin: 0 auto;
	text-align: center;
	max-width: 650px; 
}

#main-container br {
    display: block;
    margin: 0;
}


.days-how {
  font-size: 1.2rem;
  display: block;
  font-weight: bold;
  width: 100%;             /* ← wrapper と同じ幅になる */
  text-align: center;
}

.memo {
  font-size: 0.6rem;
  display: block;
  font-weight: bold;
  width: 100%;             /* ← wrapper と同じ幅になる */
  text-align: center;
}

.modal {
  display: none;
  position: absolute; /* ← fixed をやめるのがポイント */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
}

.modal-content {
  position: absolute; /* ← これも absolute にする */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* 中央に固定 */
  background: #fff;
  padding: 20px;
  width: 80%;
  max-width: 300px;
  border-radius: 10px;
  text-align: center;
}


#alertOk {
  margin-top: 15px;
  padding: 8px 20px;
}


.alert-btn {
  min-width: 120px;
  padding: 10px 12px;
  text-align: center;

}

#customAlert {
  position: fixed;        /* ← 画面に固定 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4); /* ← 背景の半透明 */
  display: none;
  z-index: 9999;          /* ← 最前面に表示 */
}

#customAlert .modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* ← 完全中央 */
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 300px;
  text-align: center;
}

#deleteDialog {
  position: fixed;        /* ← 画面に固定 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4); /* ← 背景の半透明 */
  display: none;
  z-index: 9999;          /* ← 最前面に表示 */
}

#deleteDialog .modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* ← 完全中央 */
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 300px;
  text-align: center;
}

#copyDialog {
  position: fixed;        /* ← 画面に固定 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4); /* ← 背景の半透明 */
  display: none;
  z-index: 9999;          /* ← 最前面に表示 */
}

#copyDialog .modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* ← 完全中央 */
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 300px;
  text-align: center;
}

.link-container a:link,
.link-container a:visited {
  color: #666666; /* 好きな色に変更 */
  text-decoration: none;
  font-size: 0.8rem;
}

.link-container a:hover {
  color: #333333; /* ホバー時の色 */
}

.link-container a:active {
  color: #000000; /* クリック時の色 */
}


.howto-img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px auto;
}

.footer-spacer {
  height: 120px; 
  background-color: #999999; /* 中間グレー */
}

.url-text {
    margin-left: 4px;
    font-size: 12px;
    color: #666;
    background: #f3f3f3;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #ddd;
    user-select: all;

    max-width: 120px;       /* ← ここで幅を調整 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.url-text:hover {
    white-space: normal;
    word-break: break-all;
    max-width: none;
}

.url-text:active {
    white-space: normal;
    word-break: break-all;
    max-width: none;
}


