.fu-qiehuan {
  --fu-qiehuan-color: #1677c8;
  position: relative;
  z-index: 9998;
}

.fu-qiehuan-entry {
  position: fixed;
  z-index: 9998;
  display: inline-flex;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--fu-qiehuan-color);
  border-radius: 20px;
  color: #fff;
  background: var(--fu-qiehuan-color);
  box-shadow: 0 5px 14px rgba(28, 43, 56, .22);
  font: 600 14px/1 sans-serif;
  letter-spacing: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.fu-qiehuan-position-corner .fu-qiehuan-entry {
  right: 18px;
  bottom: 18px;
}

.fu-qiehuan-position-edge .fu-qiehuan-entry {
  top: 50%;
  right: 0;
  width: 42px;
  min-height: 78px;
  padding: 10px 7px;
  border-radius: 7px 0 0 7px;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
}

.fu-qiehuan-entry-icon {
  display: none;
}

.fu-qiehuan-shape-icon .fu-qiehuan-entry {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  writing-mode: horizontal-tb;
}

.fu-qiehuan-position-edge.fu-qiehuan-shape-icon .fu-qiehuan-entry {
  border-radius: 21px 0 0 21px;
}

.fu-qiehuan-shape-icon .fu-qiehuan-entry-icon {
  display: inline;
}

.fu-qiehuan-shape-icon .fu-qiehuan-entry-text {
  display: none;
}

.fu-qiehuan-overlay {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(15, 23, 31, .58);
  align-items: center;
  justify-content: center;
}

.fu-qiehuan-overlay[hidden] {
  display: none;
}

.fu-qiehuan-dialog {
  box-sizing: border-box;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid #8996a3;
  border-radius: 8px;
  color: #252a30;
  background: #fff;
  box-shadow: 0 18px 48px rgba(22, 31, 40, .32);
}

.fu-qiehuan-dialog-head,
.fu-qiehuan-dialog-foot {
  display: flex;
  box-sizing: border-box;
  min-height: 52px;
  padding: 10px 16px;
  align-items: center;
}

.fu-qiehuan-dialog-head {
  border-bottom: 1px solid #e1e5e9;
  justify-content: space-between;
}

.fu-qiehuan-dialog-head h2 {
  margin: 0;
  padding: 0;
  color: #252a30;
  font: 600 18px/1.4 sans-serif;
  letter-spacing: 0;
}

.fu-qiehuan-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  color: #64717c;
  background: transparent;
  font: 400 28px/1 sans-serif;
  cursor: pointer;
}

.fu-qiehuan-grid {
  display: grid;
  box-sizing: border-box;
  gap: 12px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding: 16px;
  background: #e9eef2;
}

.fu-qiehuan-layout-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fu-qiehuan-layout-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fu-qiehuan-card {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.fu-qiehuan-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.fu-qiehuan-card-body {
  position: relative;
  display: block;
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
  padding: 7px;
  border: 1px solid #8796a3;
  border-radius: 6px;
  background: #d9e1e7;
  box-shadow: 0 5px 15px rgba(32, 48, 62, .12);
}

.fu-qiehuan-card img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #8f9da8;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #fff;
}

.fu-qiehuan-card strong {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  padding: 9px 10px;
  border: 1px solid #bac5ce;
  border-radius: 3px;
  color: #252a30;
  background: #fff;
  font: 600 14px/1.4 sans-serif;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fu-qiehuan-card i {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: var(--fu-qiehuan-color);
  font: 600 16px/28px sans-serif;
  text-align: center;
}

.fu-qiehuan-card input:focus + .fu-qiehuan-card-body,
.fu-qiehuan-card input:checked + .fu-qiehuan-card-body {
  border-color: var(--fu-qiehuan-color);
  box-shadow: 0 0 0 3px rgba(22, 119, 200, .22);
}

.fu-qiehuan-card input:checked + .fu-qiehuan-card-body i {
  display: block;
}

.fu-qiehuan-layout-list .fu-qiehuan-card-body {
  display: grid;
  min-height: 112px;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.fu-qiehuan-layout-list .fu-qiehuan-card img {
  height: 94px;
  aspect-ratio: auto;
}

.fu-qiehuan-layout-list .fu-qiehuan-card strong {
  margin-top: 0;
}

.fu-qiehuan-dialog-foot {
  border-top: 1px solid #e1e5e9;
  background: #f6f7f8;
  gap: 8px;
  justify-content: flex-end;
}

.fu-qiehuan-button {
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid #c9d0d7;
  border-radius: 4px;
  color: #252a30;
  background: #fff;
  font: 400 14px/1.2 sans-serif;
  cursor: pointer;
}

.fu-qiehuan-button-primary {
  border-color: var(--fu-qiehuan-color);
  color: #fff;
  background: var(--fu-qiehuan-color);
}

body.fu-qiehuan-open {
  overflow: hidden;
}
