:root {
  color-scheme: light;
  --rose-900: oklch(0.34 0.07 350);
  --rose-700: oklch(0.5 0.1 350);
  --rose-500: oklch(0.66 0.12 350);
  --rose-200: oklch(0.9 0.04 355);
  --blue-100: oklch(0.95 0.03 230);
  --pearl: oklch(0.99 0.01 30);
  --panel: rgba(255, 255, 255, 0.68);
  --ink: oklch(0.28 0.035 335);
  --muted: oklch(0.56 0.045 345);
  --line: color-mix(in oklch, var(--rose-200), white 18%);
  --deep: oklch(0.25 0.06 345);
  --veil: rgba(255, 255, 255, 0.72);
  --shadow: 0 22px 60px rgba(88, 42, 72, 0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Geist", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

@font-face {
  font-family: "Geist";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Regular.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background:
    radial-gradient(circle at 20% 0%, oklch(0.96 0.035 355), transparent 36rem),
    radial-gradient(circle at 92% 18%, oklch(0.93 0.036 225), transparent 32rem),
    linear-gradient(135deg, oklch(0.97 0.018 18), oklch(0.98 0.016 245));
}

body {
  margin: 0;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--rose-500);
  outline-offset: 3px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.app-shell {
  position: relative;
  width: 100%;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 251, 0.94)),
    var(--pearl);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.58),
    0 32px 90px rgba(75, 37, 64, 0.12);
}

.view-page {
  display: none;
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top) + 22px) 18px calc(100px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.view-page::selection {
  background: color-mix(in oklch, var(--rose-500), white 62%);
  color: var(--rose-900);
}

.view-page.is-active {
  display: block;
}

.home-page {
  position: relative;
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top) + 14px) 14px calc(96px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 245, 250, 0.76) 66%, rgba(255, 255, 255, 0.95)),
    oklch(0.98 0.016 350);
}

.home-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  pointer-events: none;
}

.home-page::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 238, 248, 0.48) 58%, rgba(255, 255, 255, 0.08)),
    linear-gradient(180deg, transparent 0 58%, rgba(255, 255, 255, 0.44) 76%, rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at 84% 8%, rgba(255, 231, 243, 0.78), transparent 28rem),
    radial-gradient(circle at 6% 92%, rgba(233, 248, 255, 0.82), transparent 24rem);
  pointer-events: none;
}

.home-topbar,
.home-title-block,
.home-main-actions,
.home-workshop-card {
  position: relative;
  z-index: 1;
}

.home-topbar {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
}

.home-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-round-button,
.home-score-pill {
  display: inline-flex;
  height: 34px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.58);
  color: var(--rose-900);
  box-shadow: 0 10px 26px rgba(121, 65, 98, 0.08);
  backdrop-filter: blur(14px);
}

.home-round-button {
  width: 34px;
  justify-content: center;
  border-radius: 50%;
}

.home-round-button svg {
  width: 16px;
  height: 16px;
}

.home-score-pill {
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}

.home-score-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, #e889c6 56%, #92dff2);
  box-shadow: 0 0 14px rgba(223, 116, 181, 0.48);
}

.home-score-pill strong {
  font-size: 12px;
}

.home-title-block {
  margin-top: 42px;
}

.home-title-block h1 {
  margin: 0;
  color: color-mix(in oklch, var(--rose-900), white 8%);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: normal;
}

.title-gem {
  display: none;
  width: 28px;
  height: 16px;
  margin: 0 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(230, 137, 194, 0.52)),
    url("./assets/home-hero.png") center / 180px auto;
  box-shadow: 0 10px 24px rgba(153, 76, 121, 0.12);
}

.home-title-block p {
  margin: 9px 0 0;
  color: var(--rose-700);
  font-size: 18px;
  letter-spacing: 0.06em;
}

.home-title-block span {
  display: block;
  width: 13em;
  margin-top: 36px;
  color: color-mix(in oklch, var(--rose-900), white 18%);
  font-size: 13px;
  line-height: 1.8;
}

.home-main-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 104px;
}

.home-main-actions button {
  display: flex;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.54)),
    rgba(255, 255, 255, 0.62);
  color: var(--rose-900);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 16px 34px rgba(120, 62, 96, 0.08);
  backdrop-filter: blur(16px);
}

.home-main-actions svg {
  width: 18px;
  height: 18px;
  color: var(--rose-500);
}

.home-main-actions span {
  font-size: 12px;
  font-weight: 800;
}

.home-workshop-card {
  min-height: 204px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 64%, rgba(255, 255, 255, 0.7), transparent 7rem),
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.2), transparent 9rem),
    linear-gradient(135deg, rgba(74, 38, 66, 0.95), rgba(176, 98, 157, 0.78)),
    var(--rose-900);
  color: white;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 24px 48px rgba(93, 42, 76, 0.22);
}

.home-workshop-card > div {
  position: relative;
  z-index: 1;
  max-width: 250px;
  padding: 24px 16px;
}

.home-workshop-card p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.home-workshop-card h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.home-workshop-card div > span {
  display: block;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.home-workshop-card button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  margin-top: 19px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #e987bd);
  color: var(--rose-900);
  font-size: 12px;
  font-weight: 800;
}

.home-workshop-card button svg {
  width: 14px;
  height: 14px;
}

.home-orbit {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 15%, transparent 16%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(232, 131, 191, 0.6), rgba(190, 235, 244, 0.72));
  box-shadow:
    inset 0 -8px 18px rgba(124, 64, 104, 0.16),
    0 12px 22px rgba(255, 255, 255, 0.24);
}

.home-orbit.one {
  right: 22px;
  bottom: 18px;
  width: 42px;
  height: 42px;
}

.home-orbit.two {
  right: -8px;
  bottom: 70px;
  width: 36px;
  height: 36px;
}

.home-orbit.three {
  right: 52px;
  bottom: 82px;
  width: 28px;
  height: 28px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 4px 0 0;
}

.page-head > div {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--rose-500);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.page-head h1 {
  margin: 0;
  color: var(--rose-900);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0;
}

.page-head span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.icon-button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.58);
  color: var(--rose-900);
  box-shadow: 0 14px 34px rgba(105, 58, 88, 0.1);
  backdrop-filter: blur(16px);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.panel,
.checkout-panel,
.selected-panel,
.material-drawer {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.design-page {
  padding-top: calc(env(safe-area-inset-top) + 14px);
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 232, 244, 0.86), transparent 17rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 246, 250, 0.92));
}

.diy-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.diy-header > div {
  min-width: 0;
  text-align: center;
}

.diy-header h1 {
  margin: 0;
  color: var(--rose-900);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.diy-header .eyebrow {
  margin-bottom: 4px;
  font-size: 9px;
}

.diy-workspace {
  position: relative;
  min-height: 430px;
  margin: 2px -4px 0;
  padding: 16px 12px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 30px;
  background:
    radial-gradient(circle at 40% 45%, rgba(255, 255, 255, 0.92), transparent 34%),
    radial-gradient(circle at 90% 36%, rgba(232, 247, 255, 0.62), transparent 12rem),
    linear-gradient(180deg, rgba(255, 243, 249, 0.78), rgba(238, 249, 248, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    var(--shadow);
}

.bracelet-preview {
  position: relative;
  width: min(250px, calc(100vw - 128px));
  aspect-ratio: 1;
  min-height: 0;
  margin: 84px 92px 0 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 28%, transparent 29%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.14) 72%);
  border-radius: 50%;
}

.bracelet-ring {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.workspace-ring-guide {
  position: absolute;
  inset: 16px;
  border: 2px dashed color-mix(in oklch, var(--rose-500), white 10%);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 10px rgba(255, 255, 255, 0.22),
    0 20px 44px rgba(124, 74, 100, 0.1);
}

.circle-center-decoration {
  position: absolute;
  inset: 50%;
  z-index: 1;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.54);
  color: var(--rose-500);
  font-family: "Songti SC", "STSong", serif;
  font-size: 34px;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
}

.bead {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  margin: -15px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, white 0 12%, transparent 13%),
    var(--bead-bg, linear-gradient(135deg, #fff, #f3bdd6));
  box-shadow:
    inset 0 -7px 12px rgba(108, 67, 96, 0.12),
    0 7px 16px rgba(128, 75, 104, 0.12);
  transform: rotate(var(--angle)) translateX(var(--radius-x)) rotate(calc(var(--angle) * -1));
}

.preview-empty {
  position: absolute;
  right: 22px;
  bottom: 76px;
  left: 22px;
  z-index: 3;
  display: block;
  color: color-mix(in oklch, var(--muted), white 14%);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.preview-empty.is-hidden {
  display: none;
}

.diy-action-pills {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
}

.diy-action-pills button {
  min-height: 36px;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--rose-900);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(122, 69, 100, 0.08);
  backdrop-filter: blur(16px);
}

.diy-action-pills .primary {
  flex: 1.3;
  border-color: transparent;
  background: linear-gradient(135deg, var(--rose-900), var(--rose-500));
  color: white;
}

.design-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: -22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 28px rgba(120, 62, 96, 0.09);
  backdrop-filter: blur(18px);
}

.diy-info-column {
  position: absolute;
  top: 82px;
  right: 12px;
  display: grid;
  width: 82px;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.diy-info-column div {
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 8px 5px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 24px rgba(122, 69, 100, 0.08);
  backdrop-filter: blur(16px);
}

.diy-info-column span {
  color: var(--muted);
  font-size: 10px;
}

.diy-info-column strong {
  margin: 3px 0 0;
  font-size: 13px;
}

.diy-toolbox {
  position: absolute;
  right: 12px;
  bottom: 18px;
  left: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.diy-toolbox button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--rose-900);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(122, 69, 100, 0.08);
  backdrop-filter: blur(16px);
}

.diy-toolbox svg {
  width: 17px;
  height: 17px;
  color: var(--rose-500);
}

.design-page .diy-workspace.center-workspace {
  display: flex;
  min-height: 404px;
  align-items: center;
  justify-content: center;
  margin: 0 -18px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(248, 246, 247, 0.92), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 253, 0.88));
  box-shadow: none;
}

.preview-btn,
.complete-btn,
.save-btn {
  position: absolute;
  z-index: 30;
  display: flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 150ms var(--ease), opacity 150ms var(--ease);
}

.preview-btn {
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 8px 18px rgba(102, 126, 234, 0.26);
}

.complete-btn {
  top: 16px;
  right: 16px;
  background: #151217;
  color: white;
}

.save-btn {
  top: 56px;
  right: 16px;
  background: #f4f1f3;
  color: #44313c;
}

.preview-btn:active,
.complete-btn:active,
.save-btn:active {
  transform: scale(0.95);
}

.design-page .bracelet-preview.dashed-circle {
  width: min(236px, 55vw);
  height: min(236px, 55vw);
  margin: 0;
  border-radius: 50%;
  background: transparent;
}

.design-page .workspace-ring-guide {
  inset: 0;
  border: 2px dashed color-mix(in oklch, var(--rose-500), white 10%);
  box-shadow: none;
}

.design-page .circle-center-decoration {
  border: 0;
  background: transparent;
  color: color-mix(in oklch, var(--rose-500), white 6%);
  font-size: 36px;
  backdrop-filter: none;
}

.design-page .info-column {
  position: absolute;
  right: 16px;
  bottom: 12%;
  z-index: 5;
  display: flex;
  width: auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.design-page .info-column .info-item {
  display: flex;
  flex-direction: column;
  min-height: auto;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.design-page .info-label {
  color: #b7a9b1;
  font-size: 10px;
  line-height: 1;
}

.design-page .info-value {
  margin-top: 2px;
  color: #3a2933;
  font-size: 12px;
  font-weight: 700;
}

.design-page .diy-toolbox {
  right: auto;
  bottom: 16px;
  left: 16px;
  width: 148px;
  grid-template-columns: 1fr;
  gap: 8px;
}

.design-page .diy-toolbox button {
  min-height: 38px;
  justify-content: flex-start;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.component-selector-panel {
  margin-top: 0;
  border-radius: 28px 28px 0 0;
}

.design-summary div {
  min-height: 64px;
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.design-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.design-summary strong {
  display: block;
  margin-top: 7px;
  color: var(--rose-900);
  font-size: 16px;
}

.panel,
.checkout-panel,
.selected-panel,
.material-drawer {
  margin-top: 12px;
  padding: 16px 16px 18px;
}

.checkout-preview-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.checkout-preview-image {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 30px rgba(105, 58, 88, 0.14);
}

.checkout-preview-row h2 {
  margin: 4px 0 6px;
  color: var(--rose-900);
  font-size: 20px;
}

.checkout-preview-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.checkout-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.checkout-info-grid div {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.checkout-info-grid span,
.checkout-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.checkout-info-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--rose-900);
  font-size: 18px;
}

.checkout-address-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.46)),
    rgba(255, 246, 250, 0.52);
}

.checkout-address-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.checkout-address-toolbar button {
  min-height: 36px;
  border: 1px solid rgba(105, 58, 88, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--rose-900);
  font-size: 12px;
  font-weight: 800;
}

.checkout-address-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.address-choice {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(105, 58, 88, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--rose-900);
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.address-choice.is-active {
  border-color: rgba(105, 58, 88, 0.42);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(105, 58, 88, 0.1);
}

.address-choice span,
.address-choice small {
  display: block;
}

.address-choice span {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 900;
}

.address-choice em {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(105, 58, 88, 0.12);
  color: var(--rose-900);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.address-choice small,
.address-empty {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.address-empty {
  padding: 12px;
  border: 1px dashed rgba(105, 58, 88, 0.16);
  border-radius: 16px;
  text-align: center;
}

.checkout-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.checkout-section-title h3 {
  margin: 2px 0 0;
  color: var(--rose-900);
  font-size: 16px;
}

.checkout-section-title span {
  max-width: 42%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.checkout-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkout-field-wide {
  grid-column: 1 / -1;
}

.checkout-field {
  display: block;
  margin-top: 16px;
}

.checkout-address-grid .checkout-field {
  margin-top: 0;
}

.checkout-field input,
.checkout-field textarea {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(105, 58, 88, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--rose-900);
  font: inherit;
  resize: vertical;
  outline: none;
}

.region-trigger-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 0 13px;
  border: 1px solid rgba(105, 58, 88, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--rose-900);
  font: inherit;
  text-align: left;
}

.region-trigger-button .is-placeholder {
  color: rgba(105, 58, 88, 0.42);
}

.region-trigger-button small {
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
  border-color: rgba(105, 58, 88, 0.36);
  box-shadow: 0 0 0 4px rgba(105, 58, 88, 0.08);
}

.checkout-tip {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.checkout-submit-btn {
  width: 100%;
  margin-top: 16px;
}

.app-shell.is-checkout-page .bottom-nav {
  display: none;
}

.app-shell.is-ai-preview-page .bottom-nav {
  display: none;
}

.app-shell.is-checkout-page .view-page.is-active,
.app-shell.is-ai-preview-page .view-page.is-active {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.selected-panel {
  border-radius: 20px;
}

.material-drawer {
  position: relative;
  border-radius: 26px 26px 20px 20px;
}

.drawer-grip {
  width: 42px;
  height: 4px;
  margin: -5px auto 13px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--rose-200), var(--rose-900) 18%);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title-row h2 {
  margin: 0;
  color: var(--rose-900);
  font-size: 18px;
}

.panel-title-row button {
  padding: 0;
  background: transparent;
  color: var(--rose-500);
  font-size: 12px;
  font-weight: 800;
}

.selected-list,
.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.selected-list::-webkit-scrollbar,
.category-strip::-webkit-scrollbar {
  display: none;
}

.selected-chip,
.category-chip {
  flex: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  background: rgba(255, 247, 251, 0.82);
  color: var(--rose-900);
}

.selected-chip button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rose-900);
  color: white;
  font-size: 12px;
}

.category-strip {
  margin: 0 -16px 14px;
  padding: 0 16px 2px;
}

.category-chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
}

.category-chip.active {
  border-color: transparent;
  background: var(--rose-900);
  color: white;
}

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

.material-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.58);
  text-align: left;
  box-shadow: 0 12px 28px rgba(120, 62, 96, 0.08);
}

.material-card img,
.work-thumb,
.square-image {
  display: block;
  width: 100%;
  object-fit: cover;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.92), transparent 18%),
    linear-gradient(135deg, rgba(255, 226, 241, 0.94), rgba(229, 245, 255, 0.78));
}

.material-card img {
  aspect-ratio: 1 / 0.82;
}

.material-body {
  padding: 11px;
}

.material-body h3 {
  margin: 0;
  color: var(--rose-900);
  font-size: 14px;
  line-height: 1.35;
}

.material-body p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.material-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--rose-700);
  font-size: 12px;
  font-weight: 800;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--rose-900);
  font-size: 13px;
  font-weight: 800;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  padding: 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-900), var(--rose-500));
  color: white;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(190, 82, 140, 0.24);
}

.primary-button svg {
  width: 16px;
  height: 16px;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkout-tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
}

.segmented button {
  height: 36px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.segmented button.active {
  background: var(--rose-900);
  color: white;
}

.square-feed,
.list-stack,
.work-list {
  display: grid;
  gap: 12px;
}

.square-card,
.order-card,
.mine-work-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.square-image,
.work-thumb {
  aspect-ratio: 1.22 / 1;
  filter: saturate(0.95) contrast(1.05);
}

.square-body,
.order-card,
.mine-work-body {
  padding: 14px;
}

.square-topline,
.order-topline,
.mine-work-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.square-body h3,
.order-card h3,
.mine-work-body h3 {
  margin: 0;
  color: var(--rose-900);
  font-size: 16px;
  line-height: 1.4;
}

.square-body p,
.order-card p,
.mine-work-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mine-work-card {
  cursor: pointer;
}

.tag {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 247, 251, 0.86);
  color: var(--rose-700);
  font-size: 11px;
  font-weight: 800;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ghost-action,
.solid-action {
  min-height: 38px;
  min-width: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ghost-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--rose-700);
}

.solid-action {
  background: var(--rose-900);
  color: white;
}

.order-status {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 247, 251, 0.86);
  color: var(--rose-700);
  font-size: 11px;
  font-weight: 800;
}

.mine-work-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
}

.mine-work-card .work-thumb {
  height: 100%;
  min-height: 116px;
  aspect-ratio: auto;
}

.mine-profile-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.72), transparent 8rem),
    linear-gradient(135deg, rgba(255, 245, 250, 0.86), rgba(236, 248, 251, 0.76));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.mine-avatar {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.96) 0 14%, transparent 15%),
    linear-gradient(135deg, #fff, #e98dc0 58%, #9fe0eb);
  color: var(--rose-900);
  font-family: "Songti SC", "STSong", serif;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(128, 75, 104, 0.12);
}

.mine-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mine-profile-copy {
  min-width: 0;
}

.mine-profile-copy strong,
.mine-profile-copy span {
  display: block;
}

.mine-profile-copy strong {
  overflow: hidden;
  color: var(--rose-900);
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mine-profile-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mine-profile-card button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--rose-900);
  color: white;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.empty-state {
  padding: 24px 12px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  width: 100%;
  max-width: 430px;
  height: calc(74px + env(safe-area-inset-bottom));
  margin: 0;
  padding: 8px 18px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.64);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 248, 252, 0.88)),
    rgba(255, 249, 252, 0.82);
  box-shadow: 0 -18px 44px rgba(93, 42, 76, 0.12);
  backdrop-filter: blur(24px);
}

.nav-item {
  display: flex;
  height: 54px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 16px;
  background: transparent;
  color: color-mix(in oklch, var(--rose-900), white 28%);
  font-size: 11px;
  font-weight: 700;
}

.nav-item svg {
  width: 21px;
  height: 21px;
}

.nav-item.active {
  color: var(--rose-700);
  background: rgba(255, 255, 255, 0.42);
}

.motion-item {
  will-change: transform, opacity;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(120px + env(safe-area-inset-bottom));
  z-index: 120;
  max-width: min(320px, calc(100vw - 40px));
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(52, 32, 46, 0.9);
  color: white;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(255, 249, 252, 0.68);
  backdrop-filter: blur(12px);
}

.loading-mask div {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--rose-900);
  color: white;
  font-size: 14px;
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

/* diy-h5 DesignPage.vue structure port */
.design-page {
  min-height: 100svh;
  overflow-y: auto;
  background: linear-gradient(180deg, #f8f8f8 0%, #ffffff 220px);
  padding: 0;
  -webkit-overflow-scrolling: touch;
}

.design-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 6px;
}

.design-title {
  color: #111;
  font-size: 26px;
  font-weight: 700;
}

.design-subtitle {
  color: #8b8b8b;
  font-size: 12px;
  line-height: 1.6;
}

.entry-grid {
  padding: 10px 16px 0;
}

.entry-card {
  cursor: pointer;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}

.entry-card:active {
  transform: scale(0.97);
}

.entry-main {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, #111 0%, #2d2d2d 100%);
  box-shadow: 0 18px 34px rgba(17, 17, 17, 0.18);
}

.entry-icon-wrap {
  display: flex;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f5f5f5;
}

.entry-icon-wrap svg {
  width: 22px;
  height: 22px;
  color: #111;
  stroke-width: 1.5;
}

.entry-icon-black {
  background: rgba(255, 255, 255, 0.14);
}

.entry-icon-black svg {
  color: #fff;
}

.entry-text {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.entry-name {
  color: #111;
  font-size: 15px;
  font-weight: 600;
}

.entry-main .entry-name {
  color: #fff;
}

.entry-desc {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.entry-arrow {
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
}

.entry-row {
  display: flex;
  gap: 10px;
}

.entry-sub {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.entry-sub .entry-icon-wrap {
  background: #f7f7f7;
}

.entry-sub .entry-name {
  color: #333;
  font-size: 13px;
  font-weight: 500;
}

.design-section {
  margin: 22px 16px 0;
  padding: 18px 16px 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(17, 17, 17, 0.06);
}

.design-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.design-section .section-title {
  display: block;
  color: #111;
  font-size: 17px;
  font-weight: 700;
}

.design-section .section-caption {
  display: block;
  margin-top: 4px;
  color: #999;
  font-size: 12px;
}

.design-section .section-more {
  padding-top: 3px;
  color: #999;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.loading-state {
  padding: 40px 0;
  color: #999;
  font-size: 13px;
  text-align: center;
}

.design-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
}

.design-empty-state .empty-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
}

.design-empty-state .empty-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #ccc;
  stroke-width: 1.5;
}

.design-empty-state .empty-icon circle[fill],
.design-empty-state .empty-icon circle:nth-of-type(2),
.design-empty-state .empty-icon circle:nth-of-type(3) {
  fill: #ccc;
  stroke: none;
}

.design-empty-state .empty-text {
  margin-bottom: 4px;
  color: #999;
  font-size: 15px;
}

.design-empty-state .empty-hint {
  color: #ccc;
  font-size: 12px;
}

.design-works-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.design-work-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, 0.05);
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfcfc 0%, #f6f6f6 100%);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s;
}

.design-work-item:active {
  transform: scale(0.985);
}

.design-work-cover {
  display: flex;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #efefef 0%, #e4e4e4 100%);
}

.design-work-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.design-work-placeholder svg {
  width: 34px;
  height: 34px;
  color: #ddd;
  stroke-width: 1.2;
}

.design-work-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 6px;
}

.design-work-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.design-work-name {
  flex: 1;
  overflow: hidden;
  color: #111;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.design-work-time {
  flex: none;
  color: #bbb;
  font-size: 11px;
}

.design-work-meta {
  color: #666;
  font-size: 12px;
}

.design-work-desc {
  overflow: hidden;
  color: #9a9a9a;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.design-work-arrow {
  color: #c2c2c2;
  font-size: 20px;
  line-height: 1;
}

.design-bottom-space {
  height: calc(88px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  body {
    display: grid;
    min-height: 100svh;
    place-items: center;
    padding: 24px;
  }

  .app-shell {
    max-width: 430px;
    min-height: min(100svh - 48px, 932px);
    border-radius: 32px;
  }

  .view-page {
    min-height: min(100svh - 48px, 932px);
  }

  .bottom-nav {
    left: 50%;
    bottom: 24px;
    max-width: 430px;
    border-radius: 0 0 32px 32px;
    transform: translateX(-50%);
  }
}

@media (max-width: 360px) {
  .view-page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .checkout-address-grid {
    grid-template-columns: 1fr;
  }

  .checkout-section-title {
    display: block;
  }

  .checkout-section-title span {
    display: block;
    max-width: none;
    margin-top: 6px;
    text-align: left;
  }

  .material-grid {
    gap: 8px;
  }

  .mine-work-card {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .bracelet-preview {
    width: min(224px, calc(100vw - 122px));
    margin-right: 78px;
    min-height: 0;
  }

  .diy-info-column {
    width: 74px;
  }

  .design-page .bracelet-preview.dashed-circle {
    width: min(212px, 55vw);
    height: min(212px, 55vw);
    margin: 0;
  }

  .design-page .info-column {
    width: auto;
  }

  .diy-info-column div {
    min-height: 50px;
  }

  .mine-profile-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .mine-avatar {
    width: 54px;
    height: 54px;
  }

  .mine-profile-card button {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-button,
  .icon-button,
  .home-main-actions button,
  .home-workshop-card,
  .material-card,
  .square-card,
  .mine-profile-card,
  .order-card,
  .mine-work-card,
  .diy-toolbox button,
  .diy-action-pills button {
    transition: transform 180ms var(--ease), filter 180ms var(--ease), box-shadow 180ms var(--ease);
  }

  .primary-button:active,
  .icon-button:active,
  .nav-item:active,
  .home-main-actions button:active,
  .material-card:active,
  .square-card:active,
  .mine-profile-card:active,
  .diy-toolbox button:active,
  .diy-action-pills button:active {
    transform: scale(0.98);
  }

  .home-workshop-card:active,
  .order-card:active,
  .mine-work-card:active {
    transform: translateY(1px) scale(0.995);
  }
}

/* Fairy premium polish for home, square, mine */
:root {
  --fairy-rose: oklch(0.72 0.105 350);
  --fairy-rose-soft: oklch(0.92 0.038 350);
  --fairy-blue: oklch(0.9 0.045 225);
  --fairy-cream: oklch(0.985 0.015 25);
  --fairy-ink: oklch(0.3 0.048 336);
  --fairy-shadow: 0 24px 54px rgba(99, 54, 83, 0.13);
}

.app-shell {
  isolation: isolate;
  background:
    radial-gradient(circle at 80% 6%, rgba(255, 255, 255, 0.96), transparent 150px),
    linear-gradient(180deg, rgba(255, 250, 253, 0.86), rgba(248, 253, 255, 0.94)),
    var(--fairy-cream);
}

.app-shell::before {
  position: fixed;
  inset: 0;
  width: auto;
  z-index: -2;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 248, 253, 0.84)),
    url("./assets/starland-fairy-bg.jpg") center top / cover no-repeat;
  opacity: 0.48;
  pointer-events: none;
}

.app-shell::after {
  position: fixed;
  inset: 0;
  width: auto;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.92), transparent 118px),
    radial-gradient(circle at 88% 30%, rgba(232, 248, 255, 0.68), transparent 156px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 247, 252, 0.9) 70%, rgba(255, 255, 255, 0.96));
  pointer-events: none;
}

.view-page {
  position: relative;
  padding-bottom: calc(126px + env(safe-area-inset-bottom));
}

.view-page:not(.home-page) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 246, 251, 0.44)),
    transparent;
}

.page-mist {
  position: absolute;
  z-index: 0;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(18px);
}

.mist-left {
  top: 46px;
  left: -98px;
  background: rgba(255, 211, 235, 0.42);
}

.mist-right {
  top: 146px;
  right: -112px;
  background: rgba(216, 245, 255, 0.5);
}

.page-head,
.segmented,
.square-feed,
.mine-profile-card,
.mine-luck-panel,
.mine-service-grid,
.panel {
  position: relative;
  z-index: 1;
}

.home-page {
  overflow: hidden;
  padding: calc(env(safe-area-inset-top) + 14px) 18px calc(126px + env(safe-area-inset-bottom));
  background: #fff8fc;
}

.home-bg-image {
  object-position: center top;
  opacity: 0.88;
  filter: saturate(1.03) brightness(1.04);
}

.home-page::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.16) 34%, rgba(255, 247, 252, 0.76) 68%, rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.88), transparent 118px),
    radial-gradient(circle at 16% 82%, rgba(226, 247, 255, 0.72), transparent 130px);
}

.fairy-glow {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
}

.glow-a {
  top: 148px;
  right: 34px;
  width: 92px;
  height: 92px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(255, 211, 236, 0.18) 58%, transparent 70%);
  box-shadow: 0 0 36px rgba(255, 198, 231, 0.56);
}

.glow-b {
  top: 298px;
  left: 42px;
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88), rgba(206, 239, 251, 0.22) 62%, transparent 74%);
}

.home-title-block {
  margin-top: 78px;
  text-align: center;
}

.home-kicker {
  display: block;
  width: auto;
  margin: 0;
  color: color-mix(in oklch, var(--fairy-rose), var(--fairy-ink) 18%);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 28px;
  line-height: 1.05;
}

.home-title-block h1 {
  margin-top: 10px;
  color: color-mix(in oklch, var(--fairy-rose), var(--fairy-ink) 22%);
  font-size: 24px;
  line-height: 1.1;
  text-shadow: 0 8px 24px rgba(195, 99, 153, 0.12);
}

.home-title-block p {
  margin-top: 12px;
  color: color-mix(in oklch, var(--fairy-rose), white 4%);
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.home-title-block > span:last-child {
  width: auto;
  margin: 100px auto 0;
  color: color-mix(in oklch, var(--fairy-rose), var(--fairy-ink) 10%);
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-shadow: 0 8px 22px rgba(184, 96, 148, 0.14);
}

.home-topbar {
  z-index: 2;
}

.home-round-button,
.home-score-pill {
  border-color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 28px rgba(141, 82, 117, 0.08);
}

.home-main-actions {
  margin-top: 24px;
  gap: 9px;
}

.home-main-actions button {
  min-height: 68px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 253, 0.56)),
    rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 34px rgba(132, 77, 111, 0.1);
}

.home-main-actions svg {
  color: color-mix(in oklch, var(--fairy-rose), var(--fairy-ink) 8%);
}

.home-workshop-card {
  min-height: 184px;
  margin-top: 12px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 42%, rgba(255, 221, 241, 0.48), transparent 96px),
    linear-gradient(135deg, rgba(35, 28, 43, 0.96), rgba(114, 66, 107, 0.88) 48%, rgba(217, 141, 188, 0.82)),
    url("./assets/home-hero.png") right center / auto 100% no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 24px 52px rgba(83, 45, 72, 0.24);
}

.home-workshop-card > div {
  max-width: 274px;
  padding: 22px 20px;
}

.home-workshop-card h2 {
  max-width: 220px;
  font-size: 23px;
}

.page-head {
  margin-bottom: 18px;
  padding-top: 8px;
}

.eyebrow {
  color: color-mix(in oklch, var(--fairy-rose), var(--fairy-ink) 8%);
}

.page-head h1 {
  color: var(--fairy-ink);
  font-size: 36px;
}

.page-head span {
  color: color-mix(in oklch, var(--fairy-ink), white 36%);
}

.segmented {
  gap: 6px;
  padding: 6px;
  border-color: rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 16px 36px rgba(127, 74, 107, 0.08);
  backdrop-filter: blur(20px);
}

.segmented button {
  height: 38px;
  border-radius: 17px;
}

.segmented button.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 196, 224, 0.82));
  color: var(--fairy-ink);
  box-shadow: 0 12px 24px rgba(169, 87, 133, 0.12);
}

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

.square-card {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 248, 252, 0.68)),
    rgba(255, 255, 255, 0.48);
  box-shadow: 0 16px 34px rgba(117, 68, 98, 0.1);
}

.square-card:nth-child(3n + 1) {
  transform: translateY(8px);
}

.square-image {
  aspect-ratio: 1 / 0.9;
}

.square-body {
  padding: 11px;
}

.square-topline {
  display: block;
}

.square-body h3 {
  font-size: 13px;
  line-height: 1.35;
}

.square-body p {
  margin-top: 5px;
  font-size: 10px;
}

.square-body .order-status {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 7px;
  font-size: 10px;
}

.tag-row {
  gap: 5px;
}

.tag {
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.58);
  color: color-mix(in oklch, var(--fairy-rose), var(--fairy-ink) 16%);
  font-size: 10px;
}

.card-actions {
  grid-template-columns: 1fr;
  gap: 7px;
}

.ghost-action,
.solid-action {
  min-height: 34px;
  font-size: 12px;
}

.solid-action {
  background: linear-gradient(135deg, var(--fairy-ink), var(--fairy-rose));
  box-shadow: 0 12px 24px rgba(175, 90, 137, 0.18);
}

.mine-profile-card {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 154px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 28% 26%, rgba(255, 255, 255, 0.9), transparent 76px),
    radial-gradient(circle at 82% 24%, rgba(255, 215, 239, 0.42), transparent 96px),
    linear-gradient(135deg, rgba(255, 246, 251, 0.82), rgba(239, 250, 252, 0.72));
  box-shadow: var(--fairy-shadow);
}

.mine-profile-card::after {
  position: absolute;
  right: -18px;
  bottom: -20px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.9) 0 10%, transparent 11%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(233, 142, 196, 0.48), rgba(186, 235, 247, 0.58));
  content: "";
  opacity: 0.72;
}

.mine-avatar {
  width: 72px;
  height: 72px;
  font-size: 30px;
  box-shadow: 0 16px 34px rgba(174, 88, 136, 0.18);
}

.mine-profile-copy strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
  font-weight: 600;
}

.mine-profile-card button {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
  background: rgba(255, 255, 255, 0.68);
  color: var(--fairy-ink);
  box-shadow: 0 12px 24px rgba(132, 77, 111, 0.1);
}

.mine-profile-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mine-profile-actions button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.58);
  color: color-mix(in oklch, var(--fairy-rose), var(--fairy-ink) 18%);
  font-size: 11px;
}

.mine-profile-actions .mine-logout-button {
  border-color: rgba(124, 56, 91, 0.16);
  background: rgba(255, 255, 255, 0.68);
  color: #7c385b;
}

.mine-luck-panel {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: -28px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 16px 34px rgba(127, 74, 107, 0.08);
  backdrop-filter: blur(20px);
}

.mine-luck-panel div {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.36);
}

.mine-luck-panel span,
.mine-luck-panel small {
  display: block;
  color: color-mix(in oklch, var(--fairy-ink), white 36%);
  font-size: 11px;
}

.mine-luck-panel strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--fairy-ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 27px;
  font-weight: 600;
}

.mine-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--fairy-shadow);
  backdrop-filter: blur(20px);
}

.mine-service-grid button {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 6px;
  background: rgba(255, 255, 255, 0.32);
  color: var(--fairy-ink);
  font-size: 11px;
  font-weight: 800;
}

.mine-service-icon {
  width: 22px;
  height: 22px;
  background: currentColor;
  display: inline-block;
  flex: none;
  opacity: 0.82;
}

.mine-service-grid button span:last-child {
  line-height: 1.2;
}

.icon-design {
  clip-path: polygon(12% 78%, 18% 58%, 62% 14%, 78% 30%, 34% 74%, 12% 78%, 8% 90%, 22% 84%);
}

.icon-ai {
  clip-path: polygon(46% 0, 54% 0, 58% 34%, 90% 18%, 96% 28%, 66% 50%, 96% 72%, 90% 82%, 58% 66%, 54% 100%, 46% 100%, 42% 66%, 10% 82%, 4% 72%, 34% 50%, 4% 28%, 10% 18%, 42% 34%);
}

.icon-square {
  clip-path: polygon(50% 0, 62% 34%, 98% 34%, 69% 55%, 80% 92%, 50% 70%, 20% 92%, 31% 55%, 2% 34%, 38% 34%);
}

.icon-sync {
  clip-path: polygon(12% 18%, 62% 18%, 62% 6%, 94% 28%, 62% 50%, 62% 36%, 26% 36%, 26% 60%, 12% 60%, 12% 18%, 88% 82%, 38% 82%, 38% 94%, 6% 72%, 38% 50%, 38% 64%, 74% 64%, 74% 40%, 88% 40%);
}

.icon-profile {
  clip-path: polygon(50% 0, 66% 6%, 76% 20%, 74% 38%, 62% 52%, 50% 56%, 38% 52%, 26% 38%, 24% 20%, 34% 6%, 50% 0, 50% 62%, 70% 66%, 86% 78%, 98% 100%, 2% 100%, 14% 78%, 30% 66%);
}

.icon-address {
  clip-path: polygon(50% 0, 68% 6%, 84% 22%, 90% 42%, 86% 60%, 72% 78%, 50% 100%, 28% 78%, 14% 60%, 10% 42%, 16% 22%, 32% 6%, 50% 0, 50% 30%, 62% 38%, 62% 52%, 50% 60%, 38% 52%, 38% 38%);
}

.panel {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 253, 0.58)),
    rgba(255, 255, 255, 0.48);
  box-shadow: var(--fairy-shadow);
}

.panel-title-row h2 {
  color: var(--fairy-ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  font-weight: 600;
}

.order-card,
.mine-work-card {
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 249, 253, 0.64)),
    rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 28px rgba(117, 68, 98, 0.08);
}

.order-status {
  background: rgba(255, 255, 255, 0.62);
  color: color-mix(in oklch, var(--fairy-rose), var(--fairy-ink) 14%);
}

.empty-state {
  border-color: rgba(215, 151, 190, 0.28);
  background: rgba(255, 255, 255, 0.36);
}

.bottom-nav {
  right: 12px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 12px;
  width: auto;
  height: 58px;
  padding: 5px 10px;
  border: 1px solid rgba(124, 56, 91, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 -8px 26px rgba(117, 68, 98, 0.1);
}

.nav-item {
  position: relative;
  height: 46px;
  border-radius: 15px;
  color: rgba(47, 34, 48, 0.48);
  transition: background-color 120ms ease, color 120ms ease;
}

.nav-item.active {
  color: #7c385b;
  background: rgba(124, 56, 91, 0.1);
}

.nav-item.active::before {
  content: none;
}

.nav-item svg,
.nav-item span {
  position: relative;
  z-index: 1;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item span {
  font-size: 10px;
  font-weight: 700;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(69, 42, 62, 0.22);
  backdrop-filter: blur(18px);
}

.work-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(69, 42, 62, 0.24);
  backdrop-filter: blur(18px);
}

.profile-modal-card {
  width: min(360px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 8%, rgba(255, 224, 243, 0.7), transparent 8rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 249, 253, 0.76));
  box-shadow: 0 28px 72px rgba(80, 42, 68, 0.24);
  padding: 18px;
}

.address-modal-card {
  width: min(420px, 100%);
  max-height: min(86svh, 760px);
  overflow-y: auto;
}

.address-manager-layout {
  display: grid;
  gap: 16px;
}

.address-form-panel {
  padding-top: 4px;
  border-top: 1px solid rgba(105, 58, 88, 0.1);
}

.address-form-panel.is-hidden {
  display: none;
}

.address-manage-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: center;
}

.address-manage-item .ghost-action {
  min-height: 38px;
  padding: 0 8px;
}

.region-modal-card {
  width: min(420px, 100%);
  max-height: min(82svh, 680px);
}

.region-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.region-columns h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.region-list {
  display: grid;
  gap: 6px;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 2px;
}

.region-item {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(105, 58, 88, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--rose-900);
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
}

.region-item.active {
  border-color: rgba(105, 58, 88, 0.42);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(105, 58, 88, 0.1);
  font-weight: 900;
}

.work-detail-card {
  width: min(390px, 100%);
  max-height: min(86vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 4%, rgba(255, 224, 243, 0.72), transparent 9rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 253, 0.78));
  box-shadow: 0 28px 72px rgba(80, 42, 68, 0.25);
}

.profile-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.work-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 10px;
}

.profile-modal-head h2 {
  margin: 0;
  color: var(--fairy-ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
  font-weight: 600;
}

.work-detail-head h2 {
  margin: 0;
  color: var(--fairy-ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
  font-weight: 600;
}

.work-detail-content {
  max-height: calc(min(86vh, 760px) - 86px);
  overflow: auto;
  padding: 0 18px 18px;
}

.work-detail-image {
  width: 100%;
  aspect-ratio: 1.18 / 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.54);
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(102, 57, 84, 0.13);
}

.work-detail-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.work-detail-main h3 {
  margin: 0;
  color: var(--fairy-ink);
  font-size: 18px;
  line-height: 1.35;
}

.work-detail-main p,
.work-detail-hint {
  margin: 7px 0 0;
  color: color-mix(in oklch, var(--fairy-ink), white 38%);
  font-size: 12px;
  line-height: 1.5;
}

.work-detail-hint {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
}

.work-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.work-detail-stats div,
.work-detail-meta,
.work-materials {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
}

.work-detail-stats div {
  min-width: 0;
  padding: 11px 10px;
}

.work-detail-stats span,
.work-detail-meta span,
.work-materials-head span {
  display: block;
  color: color-mix(in oklch, var(--fairy-ink), white 42%);
  font-size: 11px;
  font-weight: 800;
}

.work-detail-stats strong,
.work-detail-meta strong,
.work-materials-head strong {
  display: block;
  margin-top: 5px;
  color: var(--fairy-ink);
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.work-detail-meta {
  margin-top: 10px;
  padding: 12px;
}

.work-materials {
  margin-top: 12px;
  padding: 12px;
}

.work-materials-head,
.work-material-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.work-material-row {
  min-height: 34px;
  border-top: 1px solid rgba(105, 58, 88, 0.08);
  color: color-mix(in oklch, var(--fairy-ink), white 24%);
  font-size: 13px;
}

.work-material-row:first-of-type {
  margin-top: 8px;
}

.work-material-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-material-row strong {
  color: var(--fairy-ink);
}

.work-material-empty {
  margin-top: 10px;
  color: color-mix(in oklch, var(--fairy-ink), white 44%);
  font-size: 12px;
}

.work-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.work-detail-actions button {
  min-height: 42px;
}

.danger-action {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(185, 68, 87, 0.22);
  border-radius: 999px;
  background: rgba(255, 244, 246, 0.7);
  color: #a9364f;
  font-size: 12px;
  font-weight: 900;
}

.ai-preview-card {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 8%, rgba(255, 224, 243, 0.58), transparent 8rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.ai-quota-grid div {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
}

.ai-quota-grid span,
.ai-work-row p,
.ai-status-box span,
.ai-preview-card .panel-title-row span {
  color: color-mix(in oklch, var(--fairy-ink), white 38%);
  font-size: 12px;
  line-height: 1.5;
}

.ai-quota-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--fairy-ink);
  font-size: 24px;
}

.ai-work-content,
.ai-result-box,
.ai-package-list {
  margin-top: 12px;
}

.ai-work-select-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ai-work-option {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--fairy-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.ai-work-option img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.5);
}

.ai-work-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-work-option.is-active {
  border-color: rgba(178, 78, 122, 0.62);
  background: rgba(255, 235, 246, 0.72);
  box-shadow: 0 10px 24px rgba(145, 74, 112, 0.14);
}

.ai-work-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.ai-work-row img {
  width: 92px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.5);
}

.ai-work-row h3 {
  margin: 0;
  color: var(--fairy-ink);
  font-size: 17px;
  line-height: 1.35;
}

.ai-work-row p {
  margin: 6px 0 0;
}

.ai-result-image {
  width: 100%;
  max-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.5);
}

.ai-status-box {
  display: grid;
  min-height: 190px;
  place-items: center;
  gap: 8px;
  text-align: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.46);
}

.ai-status-box strong {
  color: var(--fairy-ink);
}

.ai-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(105, 58, 88, 0.12);
  border-top-color: var(--rose-900);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.ai-package-list {
  display: grid;
  gap: 10px;
}

.ai-package-item {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--fairy-ink);
  font-weight: 800;
}

.ai-package-item strong {
  color: var(--rose-900);
}

/* Readability hardening for pale glass panels. */
.checkout-panel,
.checkout-panel *,
.square-card,
.square-card * {
  color: var(--fairy-ink, var(--ink));
}

.checkout-preview-row span,
.checkout-info-grid span,
.checkout-field span,
.checkout-section-title span,
.checkout-tip,
.square-body p {
  color: color-mix(in oklch, var(--fairy-ink, var(--ink)), white 34%);
}

.checkout-field input,
.checkout-field textarea {
  color: var(--fairy-ink, var(--ink));
  caret-color: var(--rose-700);
}

.checkout-field input::placeholder,
.checkout-field textarea::placeholder {
  color: color-mix(in oklch, var(--fairy-ink, var(--ink)), white 50%);
  opacity: 1;
}

.square-card {
  cursor: pointer;
}

.square-card .card-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.square-card .ghost-action {
  border-color: rgba(181, 111, 153, 0.2);
  background: rgba(255, 255, 255, 0.68);
  color: color-mix(in oklch, var(--fairy-rose, var(--rose-700)), var(--fairy-ink, var(--ink)) 18%);
}

.square-card .solid-action,
.checkout-submit-btn,
.work-detail-actions .primary-button {
  color: #fff;
}

.square-card .solid-action {
  border: 1px solid rgba(111, 45, 76, 0.16);
  background: linear-gradient(135deg, #7c385b, #b65c8d);
  color: #fff;
  box-shadow: 0 10px 20px rgba(126, 64, 94, 0.18);
}

.square-card .order-status,
.checkout-panel .order-status {
  color: color-mix(in oklch, var(--fairy-rose, var(--rose-700)), var(--fairy-ink, var(--ink)) 16%);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.profile-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  color: var(--fairy-ink);
  font-size: 24px;
  line-height: 1;
}

.profile-edit-avatar {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.46);
}

.profile-avatar-button {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.96) 0 14%, transparent 15%),
    linear-gradient(135deg, #fff, #e98dc0 58%, #9fe0eb);
  color: var(--fairy-ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 30px;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(128, 75, 104, 0.12);
}

.profile-avatar-button img,
#profileAvatarPreview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-edit-avatar strong,
.profile-edit-avatar span {
  display: block;
}

.profile-edit-avatar strong {
  color: var(--fairy-ink);
  font-size: 16px;
}

.profile-edit-avatar span {
  margin-top: 5px;
  color: color-mix(in oklch, var(--fairy-ink), white 38%);
  font-size: 12px;
  line-height: 1.5;
}

.profile-field {
  display: block;
  margin-top: 16px;
}

.profile-field span {
  display: block;
  color: color-mix(in oklch, var(--fairy-ink), white 28%);
  font-size: 12px;
  font-weight: 800;
}

.profile-field input {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid rgba(105, 58, 88, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--fairy-ink);
  font: inherit;
  outline: none;
}

.profile-field input:focus {
  border-color: rgba(195, 99, 153, 0.42);
  box-shadow: 0 0 0 4px rgba(195, 99, 153, 0.1);
}

.profile-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

/* Final mobile polish: stable square actions, cleaner mine service icons, no pop motion. */
.view-page[data-page="home"] *,
.view-page[data-page="square"] *,
.view-page[data-page="mine"] * {
  animation: none !important;
}

.view-page[data-page="home"] .square-card,
.view-page[data-page="square"] .square-card,
.view-page[data-page="mine"] .square-card,
.view-page[data-page="mine"] .order-card,
.view-page[data-page="mine"] .mine-work-card {
  transform: none !important;
  transition: none !important;
}

.square-card:nth-child(3n + 1) {
  transform: none !important;
}

.square-card .card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px;
  margin-top: 10px;
}

.square-card .ghost-action,
.square-card .solid-action {
  width: 100%;
  min-height: 31px;
  padding: 0 3px;
  border-radius: 12px;
  font-size: 10px;
  line-height: 1.1;
  white-space: normal;
  word-break: keep-all;
  text-align: center;
  box-shadow: none;
}

.mine-service-icon {
  width: 24px;
  height: 24px;
  opacity: 1;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  clip-path: none;
}

.icon-design {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E405E' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5h7l2 2h7v12H4Z'/%3E%3Cpath d='M8 15.5l3-3 2 2 4-5'/%3E%3Cpath d='M16 9.5h1v1'/%3E%3C/svg%3E");
}

.icon-ai {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E405E' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='14' rx='3'/%3E%3Cpath d='M9 9h6M9 12h6M9 15h3'/%3E%3Cpath d='M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3'/%3E%3C/svg%3E");
}

.icon-square {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E405E' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='7' height='7' rx='2'/%3E%3Crect x='13' y='4' width='7' height='7' rx='2'/%3E%3Crect x='4' y='13' width='7' height='7' rx='2'/%3E%3Crect x='13' y='13' width='7' height='7' rx='2'/%3E%3C/svg%3E");
}

.icon-sync {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E405E' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7h-9a5 5 0 0 0-4.6 3'/%3E%3Cpath d='M17 4l3 3-3 3'/%3E%3Cpath d='M4 17h9a5 5 0 0 0 4.6-3'/%3E%3Cpath d='M7 20l-3-3 3-3'/%3E%3C/svg%3E");
}

.icon-profile {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E405E' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 20a7 7 0 0 1 14 0'/%3E%3Cpath d='M18.5 5v4M16.5 7h4'/%3E%3C/svg%3E");
}

.icon-address {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E405E' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s6-5.5 6-11a6 6 0 1 0-12 0c0 5.5 6 11 6 11Z'/%3E%3Ccircle cx='12' cy='10' r='2.2'/%3E%3C/svg%3E");
}

@media (min-width: 900px) {
  .app-shell::before,
  .app-shell::after {
    left: 50%;
    right: auto;
    width: min(430px, calc(100vw - 48px));
    border-radius: 32px;
    transform: translateX(-50%);
  }

  .bottom-nav {
    right: auto;
    bottom: 36px;
    left: 50%;
    width: calc(430px - 24px);
    border-radius: 24px;
  }
}

@media (max-width: 360px) {
  .home-title-block {
    margin-top: 78px;
  }

  .home-title-block > span:last-child {
    margin-top: 190px;
    font-size: 13px;
  }

  .square-feed {
    gap: 8px;
  }

  .mine-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
