:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #252833;
  background: #e9edf3;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; }

button, input, textarea, select { font: inherit; }

.phone {
  display: flex;
  flex-direction: column;
  width: min(100%, 412px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: #f6f8fa;
  box-shadow: 0 0 42px #252e4b1a;
}

.screen {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar { display: none; }

.tab-stage { position: relative; min-height: 100%; }
.tab-backdrop { position: absolute; inset: 0; overflow: hidden; }

.art {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}

.art-image {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.hotspot {
  position: absolute;
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button.hotspot, a.hotspot { cursor: pointer; touch-action: manipulation; }
button.hotspot:active, a.hotspot:active { background: #51388512; }
.hotspot:focus-visible { outline: 2px solid #6945df; outline-offset: -3px; }
.preset[aria-pressed="true"] { background: #7445d51c; outline: 2px solid #7549cf; outline-offset: -2px; }

.art-field {
  padding: 0 7px;
  font-size: 16px;
  line-height: 1.35;
  resize: none;
}

textarea.art-field { padding-top: 8px; padding-bottom: 8px; }

.art-field:focus, .art-field.has-value {
  color: #29283a;
  background: #fff;
  outline: 2px solid #8d6be0;
  outline-offset: -2px;
}

.tabbar {
  flex: none;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
}

.page-steps {
  position: sticky;
  z-index: 2;
  bottom: 12px;
  display: flex;
  width: max-content;
  align-items: center;
  gap: 4px;
  margin: 12px auto;
  padding: 3px;
  border: 1px solid #e6e3f1;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 3px 16px #29204b16;
  color: #5d5078;
  font-size: 13px;
}

.page-steps button {
  min-width: 44px;
  min-height: 40px;
  border: 0;
  border-radius: 24px;
  color: #5d309e;
  background: #f4effc;
  cursor: pointer;
}

.page-steps button:disabled { opacity: .4; cursor: default; }

.faq-list { display: flow-root; background: #f3f5fa; }
.faq-row { margin: 0; }
.faq-row summary { cursor: pointer; list-style: none; }
.faq-row summary::-webkit-details-marker { display: none; }
.faq-row summary:focus-visible { outline: 2px solid #6945df; outline-offset: -3px; }
.faq-summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 3px 2.4%;
  padding: 0 4%;
  border: 1px solid #e1e7ef;
  border-radius: 11px;
  background: #fafbfd;
  color: #121316;
  font-size: 14px;
  font-weight: 700;
}

.faq-row[open] .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  margin: 0 2.4% 8px;
  padding: 14px 4%;
  border-radius: 11px;
  background: #fff;
  color: #333546;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.tool-sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 412px);
  max-width: 100%;
  max-height: min(88vh, 720px);
  max-height: min(88dvh, 720px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: #fff;
  color: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -12px 55px #261a4e2b;
}

.tool-sheet::backdrop { background: #201a37a6; }

.sheet-panel { padding: 17px 19px calc(22px + env(safe-area-inset-bottom, 0px)); }

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 20px; line-height: 1.35; }
.sheet-head form { margin: 0; }
.sheet-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #f5f1fb;
  color: #6648a6;
  font-size: 26px;
  cursor: pointer;
}

.sheet-content {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
}

.sheet-content p { margin: 0; }
.sheet-content .muted { color: #615b70; }
.sheet-status { margin: 10px 0 0; color: #6040a2; font-size: 14px; }
.sheet-status.is-error { color: #ac264b; }

.sheet-content label { display: grid; gap: 5px; font-weight: 600; }
.sheet-content textarea, .sheet-content input {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #e2d9f1;
  border-radius: 10px;
  background: #fbf9fe;
  color: #252833;
  font-size: 16px;
  font-weight: 400;
}

.sheet-content textarea { min-height: 146px; resize: vertical; }
.sheet-content input[type="file"] { font-size: 14px; }

.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sheet-button {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: #f0eafa;
  color: #57349d;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.sheet-button.primary { background: #6f48d2; color: #fff; }
.sheet-button:disabled { opacity: .45; cursor: default; }
.sheet-button:focus-visible, .sheet-close:focus-visible { outline: 2px solid #492891; outline-offset: 2px; }
.poster-preview { display: block; width: 100%; height: auto; max-height: 44vh; object-fit: contain; border-radius: 11px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
