@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200");
  :root{--accent:#2563eb}
  body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;margin:0px;background:#FFA300;color:#111}
  h1{font-size:1.0rem;margin:0 0 10px}
  .wrap{max-width:980px;margin:0 auto}
  .canvas-wrap{background:#FFA300;padding:10px;border-radius:12px;display:flex;flex-direction:column;align-items:center;gap:8px}
  canvas{background:#000;border-radius:8px;touch-action:none;display:block;outline: 4px #fff solid;}
  .controls{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
  button, a.button{background:var(--accent);color:#fff;border:0;padding:8px 12px;border-radius:8px;cursor:pointer;text-decoration:none;display:inline-block}
  button.secondary{background:#fff;color:var(--accent);border:1px solid #ddd}

body{
  -webkit-user-select: none; /* Safari/Chrome */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE/Edge */
  user-select: none;         /* 標準 */
}
img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}


.modal-LINE {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
}
.modal-LINE-content {
  background: #222;
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 300px;
  margin: 20% auto;
  text-align: center;
}
.modal-LINE-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: space-around;
}
.modal-LINE-buttons button {
  background: #444;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.modal-LINE-buttons button:hover {
  background: #666;
}


.modal {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: #FFA300;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9990;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.modal.fade-out {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  text-align: center;
  color: #fff;
  animation: fadeInUp 1s ease forwards;
}

.modal-logo {
  max-width: 300px;
  margin-bottom: 32px;
  transform: scale(0);
  animation: logoPop 0s ease forwards 0.2s, mochimochi 2.5s infinite;
}
@keyframes mochimochi {
  0% {
    transform: scale(1, 1);
  }
  5% {
    transform: scale(0.98, 1.1);
  }
  15% {
    transform: scale(1.02, 0.9);
  }
  40% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(1, 1);
  }
}
.modal-text {
  margin-top: 42px;
  font-size: 14px;
  color: #fff;
  opacity: 0;
  animation: fadeIn 3s ease forwards 0.3s, fuwa 1s ease-in-out infinite alternate-reverse;
}
@keyframes fuwa {
  0% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(25%);
  }
}
.modal-text span{
	font-size: 20px;
	font-weight: bold;
}

.modal button {
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  opacity:0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeInButton 2s ease forwards 0.3s;
}

.modal button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.modal-footer {
  position: absolute;
  bottom: 0;
  width: 80%;
  border-top: 1px solid rgba(255,255,255,0.4);
  padding-top: 10px;
  text-align: center;
  opacity: 0;
  animation: fadeIn 4s ease forwards 0.3s;
}

.modal-footer .recommendation {
  font-size: 12px;
  color: #fff;
  opacity: 0.8;
}

.modal-img {
}

.modal-img .tale {
  position: absolute;
  bottom: -5px;
  right: 0;
}
.modal-img .tale img {
  width: 28vw;
  max-width: 150px;
}
@keyframes logoPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
  0% { opacity:0; transform: translateY(20px);}
  100% { opacity:1; transform: translateY(0);}
}

@keyframes fadeIn {
  0% { opacity:0; }
  100% { opacity:1; }
}

@keyframes fadeInButton {
  0% { opacity:0; }
  100% { opacity:1; }
}

#cameraWrapper{
  position:relative;
  width:720px;
  max-width:100%;
  margin: 0 auto;
}

#flashOverlay {
  position: absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  z-index: 500; /* canvasより前 */
}

.overlay {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.8);
  z-index: 998;
  pointer-events: all;
  cursor: pointer;
}

.tooltip {
  position: absolute;
  margin-top: 50px;
  margin-right: 0px;
  max-width: 250px;
  background: #fff;
  color: #000;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.4;
  z-index: 8888;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tap-cursor {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  max-width: 300px;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 10px;
  left: -15px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent #fff transparent transparent;
}

.gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 35px;
  margin-top: 12px;
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;

  scrollbar-width: thin; 
}
.gallery::-webkit-scrollbar {
  height: 6px;
}
.gallery::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.gallery img {
  height: 64px;
  border-radius: 6px;
  border: 4px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.gallery img.active{border-color:#FFA300}
.hint{font-size:0.85rem;color:#555;margin-top:8px;text-align:center}
@media(max-width:760px){canvas{width:100%;height:auto}}


#scrollLeft, #scrollRight {
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width:32px;
  height:32px;
  cursor:pointer;
  font-size:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: background 0.2s;
}
#scrollLeft:hover, #scrollRight:hover {
  background: rgba(0,0,0,0.7);
}

.controls,button,.button{
	font-size: 14px!important;
}

#overlayControls {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
}

#btnCapture{
	background: #f00;
}
#btnStart{
	display: none;
}
#btnRetake{
	opacity: 0.6;
}
#downshare{
	display: block;
	width: 100%;
	margin: 0 auto;
	text-align: center;
}
#btnSwitch{
	font-family: 'Material Symbols Outlined';
	font-size: 20px;
	padding: 0 10px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-label {
  flex: 0 0 40px;
  font-size: 0.9rem;
  color: #fff;
}

.slider-row input[type="range"] {
  flex: 1;
  accent-color: green;
  zoom:1.5;
}
.footer {
  background-size: auto auto;
  background-color: rgba(124, 81, 3, 0.5);
  background-image: repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(255, 163, 0, 1) 10px, rgba(255, 163, 0, 1) 20px );
  color: #fff;
  text-align: center;
  margin: 20px 0 0;
  padding: 30px 0;
  font-size: 12px;
  position: relative;
}
.footer p {
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}