:root{
  --bg:#ffffff;
  --bg-soft:#f9fafb;
  --border:#e5e7eb;
  --text:#111827;
  --muted:#6b7280;
  --muted2:#9ca3af;
}

*{ box-sizing:border-box; }
html,body{
  margin:0; padding:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}
a{ color:#374151; }

.nw-header{
  padding: 16px 12px 8px;
  text-align:center;
}
.tool-title{ margin: 6px 0 6px; font-size: 18px; }
.tool-sub{
  margin: 0 auto 8px;
  max-width: 42em;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.usage-link{ margin: 0 0 6px; font-size: 14px; }
.usage-link a{ text-decoration: underline; }

.nw-main{
  max-width: 600px; /* smartphone-oriented tool */
  margin: 0 auto;
  padding: 0 12px 24px;
}

/* ad slots */
.ad-slot{
  margin: 12px 0 16px;
  padding: 8px;
  border: 1px dashed #d4d4d4;
  font-size: 11px;
  color: var(--muted2);
  text-align: center;
  min-height: 60px;
}
.ad-top{ margin-top:4px; }
.ad-bottom{ margin-bottom:8px; }

.panel{
  border:1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  margin: 10px 0;
}

.form-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.field .label{ display:block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select{
  width: 100%;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}

.actions{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.actions button{
  flex: 1 1 180px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
.actions button:disabled{
  opacity: .5;
  cursor: not-allowed;
}
.actions button.primary{
  border-color:#111827;
  background:#111827;
  color:#fff;
}

.hint{
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.result-head{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.result-title{ margin:0; font-size: 16px; }
.result-meta{ font-size: 12px; color: var(--muted); }

/* Progress */
.progress{ margin: 10px 0 6px; }
.progress-bar{
  width: 100%;
  height: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}
.progress-fill{
  height: 100%;
  background: #111827;
  width: 0%;
  transition: width .2s ease;
}
.progress-text{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Checklist */
.final-list{
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.task{
  display:flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed #f0f0f0;
}
.task:last-child{ border-bottom:none; }
.task input{
  margin-top: 2px;
  width: 18px;
  height: 18px;
}
.task .ttext{
  font-size: 14px;
  line-height: 1.45;
}
.task .tmeta{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Pro */
.pro-area{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.pro-head{ margin-bottom: 10px; }
.pro-title{ font-size: 14px; font-weight: 700; }
.pro-sub{ font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

.pro-actions{
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.pro-btn{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #111827;
  background: #111827;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.pro-btn:active{ transform: translateY(1px); }

.pro-note{
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.disclaimer{
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* donate */
.nw-donate{
  text-align:center;
  margin: 16px 0 8px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--muted);
}
.nw-donate-text{ margin: 4px 0; font-size: 12px; }
.nw-donate-links{
  display:flex;
  justify-content:center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.nw-donate-links a{
  display:inline-block;
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background:#fff;
  font-size: 13px;
  color: var(--text);
  text-decoration:none;
  transition: all .2s ease;
}
.nw-donate-links a:hover{
  background: var(--bg-soft);
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nw-footer{
  margin-top: 24px;
  padding: 16px 8px 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  text-align:center;
  line-height: 1.6;
}
.nw-footer-line{ margin: 2px 0; }
.nw-footer a{ color: var(--muted); text-decoration: underline; }

/* responsive */
@media (min-width: 481px){
  .form-grid{ grid-template-columns: 1fr 1fr; }
  .actions button{ flex: 1 1 30%; }
}
