* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: #111318;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.phone-shell {
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.app-bar {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.close-app {
  position: relative;
  width: 42px;
  height: 42px;
  margin-top: 18px;
}

.close-app::before,
.close-app::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 20px;
  width: 25px;
  height: 2px;
  border-radius: 999px;
  background: #111318;
}

.close-app::before {
  transform: rotate(45deg);
}

.close-app::after {
  transform: rotate(-45deg);
}

.page {
  width: 100%;
  min-height: 100vh;
}

.hidden {
  display: none;
}

.page-list {
  padding-bottom: 104px;
}

.hint {
  margin: 0;
  padding: 18px 16px 11px;
  color: #85888f;
  background: #f3f3f4;
  font-size: 17px;
  line-height: 1.35;
}

.list {
  background: #fff;
}

.reason {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 66px;
  padding: 0 22px 0 16px;
  color: #17191f;
  border-bottom: 1px solid #eeeeef;
  text-align: left;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
}

.reason span:first-child {
  min-width: 0;
  padding-right: 18px;
}

.reason:active {
  background: #f7f7f8;
}

.chevron {
  width: 13px;
  height: 13px;
  border-top: 2px solid #b6b8bd;
  border-right: 2px solid #b6b8bd;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.notice-link {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: #5f6f8f;
  font-size: 17px;
  line-height: 1;
  padding: 12px 18px;
}

.page-form {
  background: #f0f1f2;
  padding-bottom: 132px;
}

.form-section,
.content-section {
  display: block;
  margin: 0;
  background: #fff;
  border-bottom: 1px solid #e8e9eb;
}

.form-section + .form-section,
.content-section {
  margin-top: 8px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 82px;
  padding: 16px;
  border-bottom: 1px solid #eeeeef;
}

.form-section .info-row:last-child {
  border-bottom: 0;
}

.info-row > span:first-child {
  flex: 1;
  min-width: 0;
}

.info-row strong,
.upload-head span:first-child,
.content-title {
  display: block;
  color: #15171c;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.info-row em {
  display: block;
  margin-top: 6px;
  color: #9a9da4;
  font-size: 15px;
  font-style: normal;
  line-height: 1.35;
}

.info-row input {
  flex: 0 0 42%;
  min-width: 128px;
  border: 0;
  outline: 0;
  color: #15171c;
  text-align: right;
  background: transparent;
  font-size: 16px;
}

input::placeholder,
textarea::placeholder {
  color: #b9bbc1;
}

.selectable-row {
  position: relative;
  padding-right: 38px;
}

.selectable-row::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid #b5b7bd;
  border-right: 2px solid #b5b7bd;
  transform: translateY(-50%) rotate(45deg);
}

.row-extra {
  color: #a7aab0;
  font-size: 18px;
  white-space: nowrap;
}

.upload-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px 14px;
}

.upload-head span:last-child {
  color: #a1a4aa;
  font-size: 17px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 92px);
  gap: 10px;
  padding: 0 16px 22px;
  min-height: 114px;
}

.upload-tile,
.preview {
  width: 92px;
  height: 92px;
  background: #eeeeef;
}

.upload-tile {
  display: grid;
  place-items: center;
}

.upload-tile input {
  display: none;
}

.plus {
  position: relative;
  width: 38px;
  height: 38px;
}

.plus::before,
.plus::after {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 38px;
  height: 2px;
  background: #999da4;
}

.plus::after {
  transform: rotate(90deg);
}

.preview {
  display: block;
  object-fit: cover;
}

.content-section {
  min-height: 170px;
  padding: 18px 16px 38px;
  position: relative;
}

textarea {
  display: block;
  width: 100%;
  height: 98px;
  margin-top: 16px;
  padding: 0;
  resize: none;
  border: 0;
  outline: 0;
  color: #15171c;
  background: transparent;
  font-size: 17px;
  line-height: 1.55;
}

.char-count {
  position: absolute;
  right: 16px;
  bottom: 16px;
  color: #a4a7ad;
  font-size: 16px;
}

.submit-wrap {
  position: fixed;
  left: 50%;
  bottom: max(40px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(430px, 100vw);
  padding: 0 52px;
  pointer-events: none;
}

.submit {
  width: 100%;
  height: 52px;
  border-radius: 4px;
  background: #07c160;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  pointer-events: auto;
}

.submit:disabled {
  opacity: 0.65;
  cursor: default;
}

.page-success {
  position: relative;
  background: #fff;
  min-height: 100vh;
padding: 94px 34px 130px;
  text-align: center;
}

.success-panel {
  margin: 0 auto;
}

.success-icon {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 46px;
  border-radius: 50%;
  background: #07c160;
}

.success-icon::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 17px;
  width: 24px;
  height: 14px;
  border-left: 5px solid #fff;
  border-bottom: 5px solid #fff;
  transform: rotate(-45deg);
}

.success-panel h1 {
  margin: 0 0 26px;
  color: #111318;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.25;
}

.success-panel p {
  margin: 0 auto;
  max-width: 342px;
  color: #25272d;
  font-size: 18px;
  line-height: 1.7;
}

.success-close {
  position: fixed;
  left: 50%;
  bottom: max(62px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(260px, calc(100vw - 104px));
  height: 52px;
  border-radius: 4px;
  background: #07c160;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.notice-dialog {
  width: min(330px, calc(100vw - 48px));
  padding: 0;
  border: 0;
  border-radius: 8px;
}

.notice-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.notice-dialog article {
  padding: 24px 22px 18px;
}

.notice-dialog h1 {
  margin: 0 0 14px;
  font-size: 18px;
  text-align: center;
}

.notice-dialog p {
  margin: 0 0 10px;
  color: #666b73;
  font-size: 14px;
  line-height: 1.7;
}

.notice-dialog button {
  width: 100%;
  height: 42px;
  margin-top: 8px;
  border-radius: 4px;
  background: #07c160;
  color: #fff;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 116px;
  transform: translateX(-50%);
  max-width: min(320px, calc(100vw - 40px));
  padding: 10px 16px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.show {
  opacity: 1;
}

@media (min-width: 640px) {
  body {
    background: #f5f6f7;
  }

  .phone-shell {
    box-shadow: 0 0 0 1px #e9eaec;
  }
}

@media (max-width: 360px) {
  .reason {
    font-size: 17px;
  }

  .info-row strong,
  .upload-head span:first-child,
  .content-title {
    font-size: 17px;
  }

  .row-extra {
    font-size: 16px;
  }
}

/* ===== 最终修复：顶部、表单、成功页 ===== */

/* 整体背景保持白色，避免提交成功页底部露灰 */
html,
body,
.phone-shell,
.page-success {
  background: #fff !important;
}

/* 去掉顶部灰色空白 */
.app-bar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* 页面高度 */
.page {
  min-height: 100vh !important;
}

/* 表单页保留微信风格分组灰底 */
.page-form {
  background: #f0f1f2 !important;
  padding-bottom: 132px;
}

/* 隐藏“聊天证据(必选)”这一行 */
.page-form .form-section:first-of-type .selectable-row {
  display: none !important;
}
/* 成功页：白底撑满，并给关闭按钮预留空间 */
.page-success {
  position: relative !important;
  min-height: 100vh !important;
  padding: 94px 34px 180px !important;
  text-align: center !important;
  overflow: visible !important;
}

/* 成功页关闭按钮 */
.success-close {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  left: 50% !important;
  bottom: 70px !important;
  transform: translateX(-50%) !important;
  width: min(300px, calc(100vw - 104px)) !important;
  height: 56px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #07c160 !important;
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 99999 !important;
}
