:root {
  --label: #35372e;
  --muted: #6b6d66;
  --border: #d5d7d1;
  --border-focus: #fc9d2f;
  --select-bg: #f4f4f4;
  --placeholder: #9a9b96;
  --btn: #fc9d2f;
  --btn-hover: #f08a18;
  --overlay: rgba(40, 42, 36, 0.45);
}
/* 左侧中部浮动入口 */
.sample-float-tab {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 900;
  transform: translateY(-50%);
  border: 0;
  padding: 18px 10px;
  background: var(--btn);
  color: #fff;
  font: inherit;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  cursor: pointer;
  border-radius: 10px 0 0 10px;
  box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.14);
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  transition: background .15s ease, box-shadow .15s ease;
}
.sample-float-tab:hover {
  background: var(--btn-hover);
  box-shadow: 3px 6px 18px rgba(0, 0, 0, 0.18);
}

.sample-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--overlay);
  overflow-y: auto;
}
.sample-modal[hidden] { display: none; }
#successModal { z-index: 1100; }

.sample-dialog {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: auto;
  background: #fff;
  border-radius: 10px;
  padding: 36px 40px 32px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  box-sizing: border-box;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--label);
  -webkit-font-smoothing: antialiased;
}
.sample-float-tab,
.sample-dialog *,
.sample-dialog *::before,
.sample-dialog *::after {
  box-sizing: border-box;
}

.sample-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8a8c84;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .15s ease, background .15s ease;
}
.sample-close:hover {
  color: var(--label);
  background: #f3f3f0;
}

.sample-header {
  text-align: center;
  margin: 0 0 28px;
  padding: 0 24px;
}
.sample-header h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  color: #2f312a;
}
.sample-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.form-field.span-2,
.form-actions {
  grid-column: 1 / -1;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--label);
}
.form-field input,
.form-field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--label);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.form-field input::placeholder {
  color: var(--placeholder);
}
.form-field input:focus,
.form-field select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(252, 157, 47, 0.18);
}

.select-wrap {
  position: relative;
}
.select-wrap select {
  background: var(--select-bg);
  padding-right: 36px;
  color: var(--placeholder);
  cursor: pointer;
}
.select-wrap select.has-value {
  color: var(--label);
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.btn-submit {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 6px;
  background: var(--btn);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
}
.btn-submit:hover { background: var(--btn-hover); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit:disabled {
  opacity: 0.75;
  cursor: default;
}

.success-dialog {
  max-width: 420px;
  padding: 40px 36px 32px;
  text-align: center;
}
.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #eef8e6;
  color: #3d7a22;
  font-size: 28px;
  font-weight: 700;
  line-height: 56px;
}
.success-dialog h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: #2f312a;
}
.success-dialog p {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.success-dialog .btn-submit {
  max-width: 180px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .sample-dialog {
    padding: 28px 18px 22px;
    border-radius: 8px;
  }
  .sample-header {
    margin-bottom: 22px;
    padding: 0 12px;
  }
  .sample-header h1 {
    font-size: 22px;
  }
  .sample-header p {
    font-size: 13px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
