* {
box-sizing:border-box;
}

body {
margin:0;
background:#f3f4f6;
color:#222;
font-family:-apple-system,
BlinkMacSystemFont,
"Helvetica Neue",Arial,sans-serif;
}

main {
max-width:640px;
margin:auto;
padding:20px 16px 50px;
}

h1 {
font-size:26px;
margin:5px 0 10px;
}

.desc {
font-size:14px;
line-height:1.8;
color:#666;
}

.panel {
background:#fff;
border-radius:16px;
padding:18px;
margin-top:18px;
box-shadow:0 2px 10px #0000000a;
}

input[type=file] {
display:none;
}

button,.upload {
display:block;
width:100%;
padding:14px;
border:0;
border-radius:10px;
font-size:16px;
font-weight:bold;
cursor:pointer;
text-align:center;
}

button:disabled {
opacity:.4;
}

.upload {
background:#222;
color:#fff;
}

.primary {
background:#2078ec;
color:white;
margin-top:15px;
}

.secondary {
background:#e9edf3;
margin-top:10px;
}

.preview {
margin-top:16px;
border-radius:10px;
overflow:hidden;
background:#e9edf1;
}

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

.preview.crop canvas {
cursor:grab;
}

.row {
margin-top:20px;
}

.label {
display:flex;
justify-content:space-between;
gap:10px;
font-size:14px;
font-weight:bold;
margin-bottom:9px;
}

.help {
font-size:12px;
color:#777;
line-height:1.7;
margin-top:9px;
}

.mode-group {
display:grid;
grid-template-columns:1fr 1fr;
gap:10px;
}

.mode-btn {
background:#fff;
border:1px solid #ccc;
font-size:14px;
}

.mode-btn.active {
background:#2078ec;
color:white;
border-color:#2078ec;
}

input[type=range] {
display:block;
width:100%;
min-height:32px;
accent-color:#2078ec;
}

select,input[type=color] {
width:100%;
padding:10px;
border:1px solid #ccc;
border-radius:9px;
background:white;
font-size:16px;
}

.zoom-buttons {
display:grid;
grid-template-columns:65px 1fr 65px;
gap:10px;
align-items:center;
margin-top:10px;
}

.zoom-buttons button {
background:#e7edf8;
color:#1764c2;
font-size:24px;
padding:12px;
}

.zoom-buttons output {
text-align:center;
font-weight:bold;
}

.inline2 {
display:grid;
grid-template-columns:1fr 1fr;
gap:12px;
}

.hidden {
display:none !important;
}

.reset {
background:#f1f3f5;
font-size:14px;
margin-top:12px;
}

.status {
text-align:center;
font-size:13px;
min-height:20px;
margin-top:14px;
}

.notice {
background:#f8fafc;
border:1px solid #e5e7eb;
border-radius:10px;
padding:12px;
font-size:12px;
color:#666;
line-height:1.8;
margin-top:15px;
}

.ad-label {
text-align:center;
font-size:12px;
color:#888;
margin-bottom:10px;
}

.ad-box {
min-height:110px;
border:1px dashed #ccc;
border-radius:10px;
display:flex;
align-items:center;
justify-content:center;
text-align:center;
padding:15px;
color:#888;
font-size:13px;
}

footer {
text-align:center;
font-size:12px;
color:#999;
margin-top:30px;
}

@media(max-width:420px) {
.inline2 {
grid-template-columns:1fr;
}
}

/* Google広告エリア */
.ad-area {
  width: 100%;
  margin: 40px auto 30px;
  text-align: center;
  overflow: hidden;
}