.wangxiang-page {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  padding:
    max(54px, calc(env(safe-area-inset-top) + 40px))
    max(22px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
  color: #f4eadb;
  background:
    linear-gradient(180deg, rgba(13, 14, 14, .50), rgba(32, 27, 31, .58)),
    var(--screen-wallpaper, var(--screen-default-wallpaper));
  background-position: center;
  background-size: cover;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(18px) scale(.985);
  transition: none;
}

.wangxiang-page.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.wangxiang-page.open .wangxiang-tabs,
.wangxiang-page.open .wangxiang-content {
  animation: wangxiang-rise .34s cubic-bezier(.2, .84, .26, 1) both;
}

.wangxiang-page.open .wangxiang-content {
  animation-delay: .04s;
}

.wangxiang-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.wangxiang-back,
.wangxiang-add {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #f4eadb;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .36);
  cursor: pointer;
}

.wangxiang-back span {
  display: block;
  width: 12px;
  height: 12px;
  border-left: 1.25px solid currentColor;
  border-bottom: 1.25px solid currentColor;
  transform: rotate(45deg) translate(2px, -2px);
}

.wangxiang-add span {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 31px;
  font-weight: 250;
  line-height: 1;
}

.wangxiang-add:disabled {
  opacity: .34;
  cursor: default;
}

.wangxiang-add[hidden] {
  display: none;
}

.wangxiang-title {
  justify-self: center;
  display: grid;
  place-items: center;
  min-width: 0;
}

.wangxiang-title span {
  overflow: hidden;
  color: #f4eadb;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-shadow:
    0 1px 12px rgba(0, 0, 0, .42),
    0 -1px 0 rgba(255, 255, 255, .10);
}

.wangxiang-tabs {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-height: 46px;
  padding: 5px;
  border: 1px solid rgba(244, 234, 219, .18);
  border-radius: 8px;
  background: rgba(22, 24, 24, .23);
  box-shadow:
    5px 7px 18px rgba(0, 0, 0, .16),
    inset 1px 1px 0 rgba(255, 255, 255, .14),
    inset -1px -1px 0 rgba(0, 0, 0, .24);
  backdrop-filter: blur(12px);
}

.wangxiang-tabs button {
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  color: rgba(244, 234, 219, .66);
  border-radius: 6px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .12s ease;
}

.wangxiang-tabs button:active {
  transform: translateY(1px);
}

.wangxiang-tabs button:focus-visible,
.wangxiang-back:focus-visible,
.wangxiang-add:focus-visible {
  outline: 1px solid rgba(244, 234, 219, .62);
  outline-offset: 3px;
}

.wangxiang-tabs button[aria-selected="true"] {
  color: #fff5e7;
  background: rgba(244, 234, 219, .11);
  box-shadow:
    3px 4px 12px rgba(0, 0, 0, .16),
    inset 1px 1px 0 rgba(255, 255, 255, .18),
    inset -1px -1px 0 rgba(0, 0, 0, .22);
}

.wangxiang-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 1px 10px;
  scrollbar-width: none;
}

.wangxiang-content::-webkit-scrollbar,
.wangxiang-preset-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.wangxiang-view {
  display: none;
}

.wangxiang-view.active {
  display: grid;
  gap: 12px;
}

.wangxiang-preset-list,
.wangxiang-history-list {
  display: grid;
  gap: 10px;
}

.wangxiang-history-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wangxiang-history-list .wangxiang-empty {
  grid-column: 1 / -1;
}

.wangxiang-history-more {
  grid-column: 1 / -1;
  min-height: 40px;
  border: 1px solid rgba(244, 234, 219, .22);
  border-radius: 6px;
  background: rgba(24, 25, 25, .32);
  color: rgba(248, 241, 230, .82);
  font: inherit;
}

.wangxiang-empty,
.wangxiang-preset-item,
.wangxiang-history-item {
  border: 1px solid rgba(244, 234, 219, .16);
  border-radius: 8px;
  background: rgba(24, 25, 25, .25);
  box-shadow:
    5px 7px 20px rgba(0, 0, 0, .16),
    inset 1px 1px 0 rgba(255, 255, 255, .13),
    inset -1px -1px 0 rgba(0, 0, 0, .26);
  backdrop-filter: blur(10px);
}

.wangxiang-empty {
  display: grid;
  place-items: center;
  min-height: 152px;
  padding: 20px;
  color: rgba(244, 234, 219, .70);
  text-align: center;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  line-height: 1.4;
}

.wangxiang-generation-form {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.wangxiang-combo {
  position: relative;
  min-width: 0;
}

.wangxiang-field .wangxiang-combo input {
  padding-right: 32px;
}

.wangxiang-combo::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 1.35px solid rgba(244, 234, 219, .62);
  border-bottom: 1.35px solid rgba(244, 234, 219, .62);
  pointer-events: none;
  transform: rotate(45deg);
  transition: transform .16s ease, border-color .16s ease;
}

.wangxiang-combo:has(input[aria-expanded="true"])::after {
  transform: translateY(3px) rotate(225deg);
}

.wangxiang-combo-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: min(220px, 38dvh);
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(244, 234, 219, .16);
  border-radius: 8px;
  background: rgba(22, 23, 23, .98);
  box-shadow:
    8px 12px 24px rgba(0, 0, 0, .24),
    inset 1px 1px 0 rgba(255, 255, 255, .10);
}

.wangxiang-combo-menu[hidden] {
  display: none;
}

.wangxiang-combo-option {
  min-width: 0;
  min-height: 34px;
  padding: 8px 9px;
  color: rgba(255, 245, 231, .84);
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font: inherit;
  line-height: 1.25;
  cursor: pointer;
}

.wangxiang-combo-option:hover,
.wangxiang-combo-option:focus-visible,
.wangxiang-combo-option[aria-selected="true"] {
  color: #fff5e7;
  background: rgba(244, 234, 219, .10);
  outline: none;
}

.wangxiang-combo-option[aria-disabled="true"] {
  color: rgba(244, 234, 219, .40);
  cursor: default;
}

.wangxiang-image-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(220px, 38dvh, 340px);
  box-sizing: border-box;
  min-height: 0;
  margin: 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(244, 234, 219, .16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(244, 234, 219, .06), rgba(255, 255, 255, .025)),
    rgba(24, 25, 25, .25);
  box-shadow:
    5px 7px 20px rgba(0, 0, 0, .16),
    inset 1px 1px 0 rgba(255, 255, 255, .13),
    inset -1px -1px 0 rgba(0, 0, 0, .26);
  backdrop-filter: blur(10px);
}

.wangxiang-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.wangxiang-image-preview figcaption {
  color: rgba(244, 234, 219, .64);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  line-height: 1.3;
}

.wangxiang-save-image,
.wangxiang-generate-image {
  min-width: 0;
  min-height: 38px;
  padding: 0 13px;
  color: #fff5e7;
  border: 1px solid rgba(244, 234, 219, .15);
  border-radius: 8px;
  background: rgba(244, 234, 219, .07);
  box-shadow:
    4px 5px 13px rgba(0, 0, 0, .13),
    inset 1px 1px 0 rgba(255, 255, 255, .10),
    inset -1px -1px 0 rgba(0, 0, 0, .20);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.wangxiang-save-image {
  width: 100%;
}

.wangxiang-generate-image {
  background: rgba(255, 245, 231, .16);
}

.wangxiang-save-image:disabled,
.wangxiang-generate-image:disabled {
  opacity: .46;
  cursor: default;
}

.wangxiang-save-image:not(:disabled):active,
.wangxiang-generate-image:not(:disabled):active {
  transform: translateY(1px);
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, .24),
    inset -2px -2px 5px rgba(255, 255, 255, .08);
}

.wangxiang-save-image:focus-visible,
.wangxiang-generate-image:focus-visible {
  outline: 1px solid rgba(244, 234, 219, .62);
  outline-offset: 2px;
}

.wangxiang-preset-item {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.wangxiang-preset-item:focus-visible {
  outline: 1px solid rgba(244, 234, 219, .62);
  outline-offset: 3px;
}

.wangxiang-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: pan-y;
}

.wangxiang-history-item:focus-visible {
  outline: 1px solid rgba(244, 234, 219, .62);
  outline-offset: 3px;
}

.wangxiang-history-item img {
  grid-area: 1 / 1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, .055);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .08),
    inset -1px -1px 0 rgba(0, 0, 0, .18);
}

.wangxiang-history-copy {
  display: none;
}

.wangxiang-preset-item h3,
.wangxiang-preset-item p {
  margin: 0;
}

.wangxiang-preset-item h3 {
  color: #fff5e7;
  overflow-wrap: anywhere;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.wangxiang-preset-item p {
  color: rgba(244, 234, 219, .68);
  overflow-wrap: anywhere;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 11.5px;
  line-height: 1.35;
}

.wangxiang-preset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.wangxiang-preset-meta span {
  max-width: 100%;
  padding: 4px 8px;
  color: rgba(255, 245, 231, .82);
  border: 1px solid rgba(244, 234, 219, .13);
  border-radius: 999px;
  background: rgba(244, 234, 219, .07);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .10),
    inset -1px -1px 0 rgba(0, 0, 0, .18);
  overflow-wrap: anywhere;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 10.5px;
  line-height: 1.2;
}

.wangxiang-preset-dialog {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding:
    max(14px, env(safe-area-inset-top))
    14px
    max(14px, env(safe-area-inset-bottom));
  background: rgba(14, 14, 14, .42);
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.wangxiang-preset-dialog.open {
  opacity: 1;
  pointer-events: auto;
}

.wangxiang-preset-card {
  display: grid;
  gap: 12px;
  width: min(100%, 414px);
  max-height: min(690px, calc(100% - 12px));
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #f4eadb;
  border: 1px solid rgba(244, 234, 219, .18);
  border-radius: 8px;
  background: rgba(30, 31, 31, .96);
  box-shadow:
    8px 12px 30px rgba(0, 0, 0, .28),
    inset 1px 1px 0 rgba(255, 255, 255, .12),
    inset -1px -1px 0 rgba(0, 0, 0, .30);
  transform: translateY(14px) scale(.985);
  transition: none;
  scrollbar-width: none;
}

.wangxiang-preset-dialog.open .wangxiang-preset-card {
  transform: translateY(0) scale(1);
}

.wangxiang-preset-card header h2,
.wangxiang-preset-card header p {
  margin: 0;
}

.wangxiang-preset-card header h2 {
  color: #fff5e7;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.wangxiang-preset-card header p {
  margin-top: 6px;
  color: rgba(244, 234, 219, .58);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 11px;
  line-height: 1.35;
}

.wangxiang-field,
.wangxiang-switch-row {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #f4eadb;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 12px;
  line-height: 1.3;
}

.wangxiang-field > span,
.wangxiang-field > label {
  color: rgba(244, 234, 219, .72);
  font-weight: 600;
}

.wangxiang-field input,
.wangxiang-field textarea,
.wangxiang-field select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  color: #fff5e7;
  border: 1px solid rgba(244, 234, 219, .16);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, .055);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .08),
    inset -1px -1px 0 rgba(0, 0, 0, .18);
  font: inherit;
}

.wangxiang-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 30px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(244, 234, 219, .76) 50%),
    linear-gradient(135deg, rgba(244, 234, 219, .76) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 17px,
    calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.wangxiang-field select option {
  color: #111;
  background: #f6f0e7;
}

.wangxiang-field textarea {
  min-height: 88px;
  padding: 10px;
  line-height: 1.45;
  resize: vertical;
}

.wangxiang-field input:focus,
.wangxiang-field textarea:focus,
.wangxiang-field select:focus-visible {
  border-color: rgba(255, 245, 231, .46);
  background-color: rgba(255, 255, 255, .085);
}

.wangxiang-field input::placeholder,
.wangxiang-field textarea::placeholder {
  color: rgba(244, 234, 219, .35);
}

.wangxiang-model-field {
  position: relative;
}

.wangxiang-model-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.wangxiang-model-control input {
  min-width: 0;
}

.wangxiang-fetch-models {
  min-width: 72px;
  min-height: 38px;
  padding: 0 10px;
  color: #fff5e7;
  border: 1px solid rgba(244, 234, 219, .15);
  border-radius: 8px;
  background: rgba(244, 234, 219, .08);
  box-shadow:
    4px 5px 13px rgba(0, 0, 0, .13),
    inset 1px 1px 0 rgba(255, 255, 255, .10),
    inset -1px -1px 0 rgba(0, 0, 0, .20);
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.wangxiang-fetch-models:disabled {
  opacity: .52;
  cursor: default;
}

.wangxiang-fetch-models:not(:disabled):active {
  transform: translateY(1px);
}

.wangxiang-model-menu {
  position: absolute;
  z-index: 3;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 188px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(244, 234, 219, .16);
  border-radius: 8px;
  background: rgba(22, 23, 23, .98);
  box-shadow:
    8px 12px 24px rgba(0, 0, 0, .24),
    inset 1px 1px 0 rgba(255, 255, 255, .10);
}

.wangxiang-model-menu[hidden] {
  display: none;
}

.wangxiang-model-option {
  min-width: 0;
  padding: 8px 9px;
  color: rgba(255, 245, 231, .84);
  border: 0;
  border-radius: 6px;
  background: transparent;
  overflow-wrap: anywhere;
  text-align: left;
  font: inherit;
  line-height: 1.25;
  cursor: pointer;
}

.wangxiang-model-option:hover,
.wangxiang-model-option:focus-visible,
.wangxiang-model-option[aria-selected="true"] {
  color: #fff5e7;
  background: rgba(244, 234, 219, .10);
}

.wangxiang-config-fields {
  display: grid;
  gap: 12px;
}

.wangxiang-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wangxiang-switch-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(244, 234, 219, .13);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .07),
    inset -1px -1px 0 rgba(0, 0, 0, .18);
}

.wangxiang-switch-row strong,
.wangxiang-switch-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wangxiang-switch-row strong {
  color: #fff5e7;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.wangxiang-switch-row small {
  margin-top: 4px;
  color: rgba(244, 234, 219, .52);
  font-size: 10.5px;
  line-height: 1.35;
}

.wangxiang-switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wangxiang-switch-row i {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(244, 234, 219, .16);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .08),
    inset -1px -1px 0 rgba(0, 0, 0, .20);
  transition: background .18s ease, box-shadow .18s ease;
}

.wangxiang-switch-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 245, 231, .74);
  box-shadow: 1px 1px 4px rgba(0, 0, 0, .20);
  transition: transform .18s ease, background .18s ease;
}

.wangxiang-switch-row input:checked + i {
  background: rgba(244, 234, 219, .28);
}

.wangxiang-switch-row input:checked + i::after {
  background: #fff5e7;
  transform: translateX(18px);
}

.wangxiang-status {
  min-height: 17px;
  margin: -2px 0 0;
  color: rgba(244, 234, 219, .62);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 11.5px;
  line-height: 1.35;
}

.wangxiang-status[data-tone="error"] {
  color: #fecaca;
}

.wangxiang-status[data-tone="success"] {
  color: #bbf7d0;
}

.wangxiang-preset-actions {
  position: sticky;
  bottom: -16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 9px;
  margin: 0 -16px -16px;
  padding: 12px 16px 16px;
  background: rgba(30, 31, 31, .96);
}

.wangxiang-preset-actions button {
  min-height: 38px;
  min-width: 66px;
  padding-inline: 12px;
  color: #fff5e7;
  border: 1px solid rgba(244, 234, 219, .15);
  border-radius: 8px;
  background: rgba(244, 234, 219, .07);
  box-shadow:
    4px 5px 13px rgba(0, 0, 0, .13),
    inset 1px 1px 0 rgba(255, 255, 255, .10),
    inset -1px -1px 0 rgba(0, 0, 0, .20);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}

.wangxiang-preset-actions button[type="submit"] {
  background: rgba(255, 245, 231, .16);
}

.wangxiang-preset-actions .wangxiang-danger-button {
  color: #fecaca;
}

.wangxiang-preset-actions button:active {
  transform: translateY(1px);
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, .24),
    inset -2px -2px 5px rgba(255, 255, 255, .08);
}

.wangxiang-preset-actions button:focus-visible {
  outline: 1px solid rgba(244, 234, 219, .62);
  outline-offset: 2px;
}

.wangxiang-action-dialog {
  position: absolute;
  inset: 0;
  z-index: 21;
  display: grid;
  place-items: center;
  padding:
    max(14px, env(safe-area-inset-top))
    14px
    max(14px, env(safe-area-inset-bottom));
  background: rgba(14, 14, 14, .46);
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

.wangxiang-action-dialog.open {
  visibility: visible;
  pointer-events: auto;
}

.wangxiang-action-card {
  display: grid;
  gap: 12px;
  width: min(100%, 360px);
  max-height: min(620px, calc(100% - 12px));
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #f4eadb;
  border: 1px solid rgba(244, 234, 219, .18);
  border-radius: 8px;
  background: rgba(30, 31, 31, .96);
  box-shadow:
    8px 12px 30px rgba(0, 0, 0, .30),
    inset 1px 1px 0 rgba(255, 255, 255, .12),
    inset -1px -1px 0 rgba(0, 0, 0, .30);
  transform: translateY(14px) scale(.985);
  transition: none;
  scrollbar-width: none;
}

.wangxiang-action-dialog.open .wangxiang-action-card {
  transform: translateY(0) scale(1);
}

.wangxiang-action-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.wangxiang-action-card header h2,
.wangxiang-action-card header p {
  margin: 0;
}

.wangxiang-action-card header h2 {
  color: #fff5e7;
  overflow-wrap: anywhere;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.wangxiang-action-card header p {
  margin-top: 6px;
  color: rgba(244, 234, 219, .58);
  overflow-wrap: anywhere;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 11px;
  line-height: 1.35;
}

.wangxiang-action-preview {
  display: grid;
  place-items: center;
  height: min(430px, 58dvh);
  min-height: 220px;
  box-sizing: border-box;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(244, 234, 219, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .07),
    inset -1px -1px 0 rgba(0, 0, 0, .18);
}

.wangxiang-action-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.wangxiang-action-actions {
  position: static;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  background: transparent;
}

.wangxiang-action-actions .wangxiang-action-primary {
  background: rgba(255, 245, 231, .16);
}

@keyframes wangxiang-rise {
  from {
    transform: translateY(10px);
  }

  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wangxiang-page,
  .wangxiang-preset-card,
  .wangxiang-action-card,
  .wangxiang-tabs,
  .wangxiang-content {
    animation: none;
    transition: none;
  }
}

@media (max-width: 390px) {
  .wangxiang-image-preview {
    height: 214px;
  }

  .wangxiang-action-preview {
    height: min(360px, 50dvh);
    min-height: 190px;
  }

  .wangxiang-model-control {
    grid-template-columns: 1fr;
  }

  .wangxiang-field-grid {
    grid-template-columns: 1fr;
  }

  .wangxiang-preset-actions {
    grid-template-columns: 1fr 1fr;
  }

  .wangxiang-action-actions {
    grid-template-columns: 1fr;
  }

  .wangxiang-preset-actions span {
    display: none;
  }
}

html.night-mode .wangxiang-page {
  color: #f4eadb;
}
