@font-face {
  font-family: 'Zen Antique';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    url('../fonts/zen-antique/zen-antique-regular.woff2') format('woff2'),
}
body {
  font-family: "Yu Gothic", "游ゴシック体", "YuGothic", "メイリオ", sans-serif;
  color: #555555;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  background-image: url(../img/background.webp) ;
  background-repeat: repeat;
  background-color: #f0ebe5;
}
a:hover{
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
button:hover{
  opacity: 0.7;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
}
.spOnly{
  display: none;
}
main h1{
  margin-bottom: 40px;
  text-align: center;
}
.inner{
  width: 500px;
  margin: 0 auto;
}
#top{
  text-align: center;
}
#top .terms{
  margin-top: 10px;
}

/* 入力フォーム */
#app{
  margin: 30px auto;
}
#inputs {
  margin: 0 auto;
}
#inputs h2{
  font-family: "Zen Antique", serif;
  font-size: 32px;
}
.form-group {
  width: 300px;
  margin: 25px auto;
  position: relative;
}
.form-group label {
  display: block;
  margin-bottom: 10px;
  text-align: center;
}
#inputs .name, #inputs .kind , #inputs .upload{
  margin-top: 70px;
}
.form-group input[type="text"],
.form-group input[type="file"],
.form-group button {
  width: 100%;
  padding: 13px 10px;
  font-size: 0.9em;
  box-sizing: border-box;
  border-radius: 8px;
  border: 2px solid #007048;
  margin-top: 6px;
  min-height: 51px;
}
.form-group select {
  background-color: #fff;
    width: 300px;
    font-size: 0.9em;
    box-sizing: border-box;
    border-radius: 8px;
    border: 2px solid #007048;
    min-height: 51px　!important;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    padding: 13px 40px 13px 10px;
    background-image: url(../img/arrow.png);
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1.6em;
}

input[type="text"]:focus,
input[type="file"]:focus,
select:focus {
  outline: none;
  border: 2px solid #007048;
}

/* 追加ボタン */
#inputs .form-group .add-btn {
  background-color: #007048;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 15px 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
  width: 100%;
  margin: 10px auto;
  display: block;
  max-width: 300px;
}

/* 削除ボタン */
#inputs .form-group .remove-btn {
  background-color: #c03e00;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 8px 16px;
  font-size: 0.9em;
  cursor: pointer;
  width: 100px;
  margin: 0 auto;
  display: block;
  min-height: 38px !important;
}

/*　写真選択ボタン */
.upload-button img:hover {
  opacity: 0.7;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.upload-button input[type="file"] {
  display: none;
}
#inputs button.capture-btn {
  border: none;
  margin: 90px auto 20px;
  display: block;
  width: 300px;
  padding: 0;
  clip-path: inset(0 round 35px);
  border-radius: 35px;
}

#inputs button.capture-btn:disabled {
  cursor: default;
  opacity: 1;
}


/* プレビュー領域 */
#capture-wrapper {
  font-family: "Zen Antique", serif;
  position: relative;
  margin-bottom: -700px;
  transform-origin: top left;
  transform: scale(0.462962962962963);
}

#capture {
  position: relative;
  width: 1080px;
  height: 1350px;
  background: #fff url("../img/template.jpg?v=20260601") no-repeat center/cover;
  border: 2px solid #d4af37;
  box-sizing: border-box;
  overflow: hidden;
}

/* バッジ */
.badge {
  position: absolute;
  top: 575px;
  right: 85px;
  width: 240px;
  height: auto;
  z-index: 10;
}

.title-fixed {
    position: absolute;
    top: 810px;
    right: 159px;
    width: 90px;
    height: auto;
    z-index: 9;
}
/* 写真 */
.photo {
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  height: 583px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  border-radius: 10px;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 川柳（縦書き） */
.senryu {
  font-family: "Zen Antique", serif;
  position: absolute;
  top: 750px;
  right: 370px;
  writing-mode: vertical-rl;
  font-size: 55px;
  line-height: 2;
  letter-spacing: 0.1em;
  z-index: 2;
  color: #1e2e53;
}

/* フッター：署名 */
.footer {
  position: absolute;
  bottom: 155px;
  left: 16%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items:flex-end;
  z-index: 2;
  gap: 3px;
  flex-direction: row-reverse;
}
.footer .petname {
  font-family: "Zen Antique", serif;
  font-size: 36px;
  writing-mode: vertical-rl;
  text-align: center;
  line-height: 1.2;
  color: #1e2e53;
}

footer {
  background-color: #fff;
}
footer .inner{
  width: 1080px;
  margin: 0 auto;
  padding-top: 15px;
}
footer p{
  text-align: center;
}
footer .siteLogo img{
  height: 55px;
}
footer .copy {
  display: block;
  padding: 15px 0;
  font-size: 10px;
  text-align: center;
  color: #595750;
}

/* モーダル表示 */
body.modal-open,
html.modal-open {
  overflow: hidden;
  height: 100%;
}
  .modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modalWrapper {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 92dvh;
  background: #fff;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 15px 10px;
  top: 10px;
}

.modalContent {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
.modalClose {
  position: absolute;
  top: -2.3rem;
  right: -2.3rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}
.modalClose img{
  width: 3em;
  height: 3em;
}
.modalInner {
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.modal-image {
  width: 90%;
  height: auto;
  margin: 0 auto 20px;
}
.recapture {
  display: block;
  margin-bottom: 30px;
  text-align: center;
}
.recapture-button {
  display: block;
  width:300px;
  height: auto;
  margin:0 auto 10px;
  cursor: pointer;
  background: none;
  border: none;
}
.recapture-text {
  font-size:14px;
  color: red;
}
.hashtag{
  text-align: center;
  margin: 20px auto;
}
.hashtag span{
  color: #007048;
  font-weight: bold;
}
.copyMiniBtn {
  font-size: 14px;
  padding: 6px 10px;
  border: none;
  background: #c03e00;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  border-radius: 999px;
}

.copyMiniBtn:hover {
  opacity: 0.8;
}
.snsFlex{
  display: flex;
  gap: 20px;
  justify-content:center;
  margin: 20px auto;
}
.snsFlex .logo{
  width: 60px;
}
.btnList{
  text-align: center;
}
.btnList li + li{
  margin-top: 20px;
}
.btnList button {
  background: none;
  border: none;
  width: 100%;
  max-width: 300px;
}
/* 応募終了文言 */
.noticeClosed{
  margin: 30px auto;
  color: #d9000f;
  font-weight: bold;
  text-align: center;
}

@media screen and (max-width: 768px) {
  body{
    background-size: 100%;
  }
  .pcOnly{
    display: none;
  }
  .spOnly{
    display: block;
  }
  a:hover{
    opacity: unset !important;
  }
  button:hover{
    opacity: unset !important;
  }
  a:active{
    opacity: 0.7;
    transition: opacity 0.3s ease;
  }
  button:active{
    opacity: 0.7;
    transition: opacity 0.3s ease;
  }

  .inner {
    width: 90%;
    max-width: 550px;
    font-size: 14px;
    margin: 0 auto;
  }
  #inputs h2 {
    font-size: 25px;
}
  .form-group {
    width: 90%;
    margin: 20px auto;
    position: relative;
  }
  .form-group select {
    width: 100%;
  }
  #inputs button.capture-btn {
    width: 90%;
    margin: 70px auto 40px;
  }
  .upload-button img:hover {
    opacity: none;
  }
  
    footer .inner {
    width: 100%;
    margin: 0 auto;
    padding-top: 15px;
  }
  #capture-wrapper {
  margin-bottom: clamp(
    -860px,                            /* max（幅375以下） */
    calc(-1269.09px + 1.0909 * 100vw), /* リニア補完式 */
    -800px                             /* min（幅430以上） */
  );
    transform: scale(0.3) translate(-7vw);
  }
  .modal-image{
    margin-bottom: 10px;
  }
  .recapture {
    margin-bottom: 0;
  }
  .recapture-button {
    width: 70%;
    margin-bottom: 5px;
  }
  .recapture-text{
    font-size: 10px;
  }

  .shareImageBtn {
    width: 300px;
    background: none;
    border: none;
  }

  .shareImageBtn:hover {
    opacity: 0.9;
  }

  .shareHelp {
    width: 70%;
    margin: 6px auto;
  }
  .snsFlexShare {
    margin: 5px 0 0;
  }

  .snsFlexShare .shareOnly {
    width: auto;
  }
  .copyMiniBtn {
    font-size: 12px;
  }
  .footer{
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
}
@media screen and (max-width: 400px) {
  .modal-image {
    width: 80%;
  }
}