
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@700;800;900&display=swap');
:root{
  --bg:#ffffff;
  --stripe1:#E8CA7E;
  --stripe2:#C4AC94;
  --paper:#ffffff;
  --ink:#3b2a20;
  --brown:#5a3a2a;
  --orange:#FFB10A;
  --orange2:#FFB10A;
  --line: rgba(90,58,42,.18);
  --shadow: 0 18px 40px rgba(59,42,32,.12);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

.splash{
  position: fixed;
  inset: 0;
  background: #333;
  display: grid;
  place-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 1s ease, background-color 1s ease;
}
.splash-logo{
  width: min(720px, 82vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.35));
}
.splash.fade{
  opacity: 0;
  background: #fff;
}
body{
  margin:0;
  font-family: "M PLUS Rounded 1c", system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color:var(--ink);
  background: linear-gradient(180deg, rgba(253, 228, 187, 1), rgba(239,149,255,1.00)) fixed;
}

#name{
  font-family: "M PLUS Rounded 1c", system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

.topbar{
  padding: 10px 20px;
  max-width: 1280px;
  margin: 0 auto;
}
.logo_header img{
  width: 40%;
}
.topbar .sub{
  padding: 0px 10px;
  margin: 8px 0 0;
  color: rgba(59,42,32,.75);
  font-size: 16px;
  text-shadow: 
    #fff 2px 0px,  #fff -2px 0px,
    #fff 0px -2px, #fff 0px 2px,
    #fff 2px 2px , #fff -2px 2px,
    #fff 2px -2px, #fff -2px -2px,
    #fff 1px 2px,  #fff -1px 2px,
    #fff 1px -2px, #fff -1px -2px,
    #fff 2px 1px,  #fff -2px 1px,
    #fff 2px -1px, #fff -2px -1px;
}

.app{
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  padding: 10px 10px 26px;
}

.stage{
  background: rgba(255,128,0,.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 5px;
  position: sticky;
  top: 12px;
  align-self: start;
  z-index: 5;
}

.canvas-wrap{
  position: relative;
  width: 100%;
  aspect-ratio: 2048 / 1194;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(90,58,42,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.70));
}

.canvas-wrap{ cursor: default; }
.canvas-pick{
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: .06em;
  color: rgba(59,42,32,.33);
  text-shadow: 0 2px 0 rgba(255,255,255,.75);
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
  transition: opacity .18s ease;
  border-radius: 10px;
}
.canvas-wrap.has-image .canvas-pick{ opacity: 0; pointer-events: none; }

#canvas{
  width: 100%;
  height: 100%;
  display:block;
  touch-action: none;
}

#nameOverlay{
  position:absolute;
  z-index: 5;
  background: transparent;
  border: none;
  outline: none;
  color: transparent;
  caret-color: transparent;
  opacity: 0.01;
  font-size: 16px;
  line-height: 1;
}


.hint{
  position:absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 700;
  color: rgba(59,42,32,.58);
  letter-spacing: .04em;
  pointer-events:none;
  text-shadow: 0 2px 0 rgba(255,255,255,.65);
}

.note{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.pill{
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px dashed rgba(90,58,42,.26);
  background: rgba(255,255,255,.75);
}

.panel{
  display:flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.card{
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.card h2{
  margin: 0 0 12px;
  padding: 2px 0 8px 18px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .04em;
  color: #3b2a20;
  position: relative;
}
.card h2::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f28b2b;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-55%);
  box-shadow: 0 1px 0 rgba(0,0,0,.10);
}

.row{
  display:grid;
  grid-template-columns: 56px 1fr 56px;
  align-items:center;
  gap: 10px;
  margin-top: 8px;
}
.row input[type="range"]{
  width: 100%;
}
.val{
  text-align:right;
  font-variant-numeric: tabular-nums;
  color: rgba(59,42,32,.82);
}

.stack{ display:flex; flex-direction:column; gap: 6px; }
.lbl{ font-size: 12px; color: rgba(59,42,32,.78); }

input[type="text"], input[type="file"]{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(90,58,42,.28);
  background: rgba(255,255,255,.92);
  outline: none;
}
input[type="text"]:focus{
  border-color: rgba(255,138,42,.70);
  box-shadow: 0 0 0 4px rgba(255,138,42,.18);
}

.mini{
  display:flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn{
  appearance:none;
  border: 1px solid rgba(90,58,42,.28);
  background: rgba(255,255,255,.90);
  color: var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  cursor:pointer;
  transition: transform .06s ease, box-shadow .18s ease, background .18s ease;
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  user-select:none;
}
.btn:hover{ box-shadow: 0 10px 24px rgba(59,42,32,.10); }
.btn:active{ transform: translateY(1px); }

.btn.primary{
  border-color: rgba(255,138,42,.45);
  background: linear-gradient(180deg, var(--orange), var(--orange2));
  color: #2b1c14;
  width: 100%;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 0;
  text-shadow: #fff 0px 3px 0px;
}
.btn.ghost{
  background: rgba(255,255,255,0.30);
  width: 100%;
}

#reset{
  background: rgba(255,255,255,.98);
}

.btn:disabled, .btn.disabled{
  opacity: .55;
  cursor:not-allowed;
  pointer-events:none;
}

.help{
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(59,42,32,.70);
  line-height: 1.45;
}

.foot{
  opacity:.75;
  text-align:center;
  padding: 0 0 30px;
}


.foot-links{
  margin: 10px 0 6px;
  display:flex;
  gap: 10px;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  font-size: 12px;
}
.foot-links a{
  color: rgba(59,42,32,.85);
  text-decoration: none;
  border-bottom: 1px dashed rgba(59,42,32,.35);
  padding-bottom: 2px;
}
.foot-links a:hover{
  opacity: .85;
}
.foot-links .sep{
  opacity:.6;
}


.download-main{
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 20px 30px;
}
.preview-card{
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
.preview-card img{
  width:100%;
  height:auto;
  display:block;
  border-radius: 12px;
  border: 1px solid rgba(90,58,42,.18);
  background: #fff;
}
.download-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 980px){
  .app{ grid-template-columns: 1fr; }
  .panel{ order: 2; }
  
.logo_header img{
  width: 90%;
}
.stage{
  padding: 2px;
}

.topbar{
  padding: 5px 5px;
}

.topbar .sub{
  font-size: 3.5vw;
  padding: 0px 5px;
}
.canvas-pick{
  font-size: 2.5vw;
}

}

