/* ====== CLEAN, PROFESSIONAL SURVEY THEME ====== */
:root{
  --bg: #f7f8fa;
  --panel: #ffffff;
  --text: #0f172a;           /* slate-900 */
  --muted: #475569;          /* slate-600 */
  --line: #e2e8f0;           /* slate-200 */
  --brand: #0ea5e9;          /* sky-500-ish */
  --brand-600: #0284c7;
  --focus: #22d3ee;          /* cyan-400-ish */
  --chip-bg: #f1f5f9;        /* slate-100 */
  --chip-on: #e0f2fe;        /* sky-100 */
  --radius: 14px;
  --shadow: 0 6px 20px rgba(2,8,23,.06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), #fff 60%);
}

form.processing {
  opacity: 0.5;
  pointer-events: none; /* disables clicks */
  transition: opacity 0.3s ease;
}

/* Optional: show a spinner overlay */
form.processing::after {
  content: "送信中…";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 16px;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Ensure form container can position the overlay correctly */
form {
  position: relative;
}

/* Wrap + header */
.survey-wrap{
  max-width: 980px;
  margin: 48px auto;
  padding: 0 20px 40px;
}

.survey-header{
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.brand { display:inline-flex; align-items:center; text-decoration:none; }
.brand__logo{
  width: 150px; height: auto; display:block;
  fill: var(--chip-bg);
}
.brand__logo text{ fill: var(--muted); }

/* Card */
.survey-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px clamp(20px, 3vw, 36px);
  box-shadow: var(--shadow);
}

.survey-title{
  margin: 0 0 6px 0;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: .2px;
}
.survey-intro{
  margin: 0 0 18px 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* Fieldsets */
fieldset{
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px clamp(14px, 2vw, 20px);
  margin: 18px 0;
}
legend{
  padding: 0 8px;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .3px;
}

/* Rows */
.form-row{
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px 18px;
  align-items: start;
  padding: 10px 0;
}
.label{
  margin-top: 10px;
  font-weight: 600;
  color: var(--text);
}
.req{ color: var(--brand-600); }

/* Inputs */
.input, select, textarea{
  width: 100%;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input--sm{ padding: 9px 10px; max-width: 280px; }
.input:focus, select:focus, textarea:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 28%, transparent);
}

/* Grid for many checkboxes */
.control-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 14px;
}

/* Chip-style radios */
.control-group{ display:flex; flex-wrap: wrap; gap: 10px; }
.chip{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip-bg);
  user-select: none;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.chip input{ appearance: none; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--muted); display: inline-block; position: relative; }
.chip input:checked{ border-color: var(--brand-600); background: var(--brand); }
.chip input:focus-visible{ outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 28%, transparent); border-color: var(--brand); }
.chip:hover{ border-color: var(--brand); background: var(--chip-on); }

/* Checkboxes list */
.check{ display:flex; align-items:center; gap: 10px; }
.check input{ width: 16px; height: 16px; }
.check span{ line-height: 1.25; }

/* Actions */
.actions{
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px;
}
.btn{
  appearance: none;
  border: 1px solid var(--brand-600);
  background: linear-gradient(180deg, var(--brand), var(--brand-600));
  color: #fff;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, filter .15s ease;
  box-shadow: 0 6px 14px rgba(2,132,199,.25);
}
.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }
.btn:focus-visible{ outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 35%, transparent); }

/* Thanks message */
.thanks{
  color: #0a7a3b;
  font-weight: 600;
}

/* Honeypot */
.honeypot{
  position: absolute;
  left: -5000px;
  width: 1px; height: 1px; overflow: hidden;
}

/* Responsive */
@media (max-width: 720px){
  .form-row{ grid-template-columns: 1fr; }
  .label{ margin-top: 0; }
  fieldset{ padding: 16px; }
  .survey-card{ padding: 20px 16px; }
}

#snackbar {
  visibility: hidden;
  min-width: 240px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 12px;
  position: fixed;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  z-index: 1000;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.4s, visibility 0.4s;
}
#snackbar.show {
  visibility: visible;
  opacity: 1;
}
