@charset "utf-8";
.modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  background:rgba(0,0,0,.6);
  z-index:999;
  opacity:0;
  transition:opacity .6s cubic-bezier(0.25,1,0.5,1);
}
.modal-overlay.show{
	display:block; opacity:1;
}

.modal{
  background:#fff;
  border-radius:10px;
  max-width:640px;
  margin:10px auto;
  padding:12px 14px 20px;
  position:relative;
  line-height: 1.1; 
  box-shadow:0 8px 20px rgba(0,0,0,.2);
  transform:translateY(20px);
  opacity:0;
  transition: opacity .6s cubic-bezier(0.25,1,0.5,1),
              transform .6s cubic-bezier(0.25,1,0.5,1);
  will-change:opacity, transform;
}
.modal.show{ transform:translateY(0); opacity:1; }

.modal h4{
	font-size:18px; text-align:center; margin:0 0 16px;
}
.modal label, .modal select, .reserve-button, .close-btn{
	font-size:14px;
}

select{
  display:block;
  width:100%;
  margin-bottom:10px;
  padding:8px 10px;
  border:1px solid #ccc;
  border-radius:6px;
  background:#fff;
  box-sizing:border-box;
}

#total{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:.75rem;
  font-size:16px;
  background:#f9f9f9;
  padding:6px 10px;
  border-left:6px solid #d60000;
  border-radius:6px;
  text-align:center;
  margin:17px auto 15px;
  max-width:520px;
  min-height:30px;
  color:#000;
}
#total .badge{
	color:#d60000; font-weight:700; white-space:nowrap;
}
#total .amount{
  color:#000;
  font-weight:800;
  font-size:20px;
  line-height:1;
  transition: color .3s ease
}

.total-done#total .amount{
	color:#d60000;
}

.button-wrapper{
  text-align:center;
  margin-bottom:6px;
  opacity:0;
  transition:opacity .3s ease;
}
.button-wrapper.show{ opacity:1; }

.reserve-button{
  display:inline-block;
  padding:12px 30px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  background:#d60000;
  border-radius:6px;
  box-shadow:0 4px 0 #a00000;
  text-decoration:none;
  transition: background-color 0.3s ease;
}
.reserve-button:hover{
  background:#b80000;
  text-decoration: none;
}

.modal .reserve-button{
  color: #fff !important;
  text-decoration: none;
}
.modal .reserve-button:visited,
.modal .reserve-button:hover,
.modal .reserve-button:active,
.modal .reserve-button:focus{
  color: #fff !important;
  text-decoration: none;
}

.close-btn{
  position: absolute;
  top: 8px;
  right: 8px;

  --size: 28px;
  --stroke: 2px;
  --line-len: calc(var(--size) * 0.57);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;

  background: #fff;
  border: 1px solid #ccc;
  color: #333;

  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  -webkit-tap-highlight-color: transparent;

  transition: background .2s ease, border-color .2s ease;
}

.close-btn::before,
.close-btn::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--line-len);
  height: var(--stroke);
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
  /* サブピクセル丸め対策（iOSでも滲みにくく） */
  -webkit-transform: translate(-50%, -50%) rotate(45deg);
}

.close-btn::after{
  transform: translate(-50%, -50%) rotate(-45deg);
  -webkit-transform: translate(-50%, -50%) rotate(-45deg);
}

.close-btn:hover,
.close-btn:focus-visible{
  background: #d60000;
  border-color: #b80000;
  color: #fff;
  outline: none;
}

.close-btn:focus-visible{
  box-shadow: 0 0 0 3px rgba(214,0,0,.25), 0 2px 4px rgba(0,0,0,.2);
}

.close-btn:active{
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce){
  .close-btn{
    transition: none;
  }
}

#total .badge.is-blink {
  animation: badgeBlink 2.2s ease-in-out infinite;
  will-change: opacity;
}

@keyframes badgeBlink {
  0%, 12%   { opacity: 1; }
  50%       { opacity: .25; }
  88%, 100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #total .badge.is-blink { animation: none !important; }
}
@media (max-width:600px){ #total{
	max-width:100%;
} }