:root {
  --primary: #9d5bff;
  --primary-dark: #7d3fe2;
  --primary-soft: #f3ecff;
  --danger: #ff4b3e;
  --line: #e8e8ee;
  --text: #222;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f6f8;
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  padding-top: 72px;
}

body.admin-mode {
  padding-top: 0;
}

body.account-mode {
  padding-top: 0;
}

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

button {
  cursor: pointer;
}

.qds-header {
  height: 76px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.qds-header .inner,
.qds-main {
  width: min(1700px, calc(100vw - 300px));
  margin: 0 auto;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  height: 72px;
  background: #fff;
  border-bottom: 1px solid #eceaf1;
}

.site-nav-inner {
  display: grid;
  grid-template-columns: 220px minmax(420px, 1fr) 232px;
  align-items: center;
  width: min(1908px, calc(100vw - 48px));
  height: 100%;
  margin: 0 auto;
  padding: 0 10px;
}

.brand-lockup {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1px;
  grid-template-areas:
    "name divider"
    "tagline divider";
  align-items: center;
  column-gap: 14px;
  row-gap: 2px;
  border: 0;
  background: transparent;
  white-space: nowrap;
  text-align: left;
}

.brand-lockup strong {
  grid-area: name;
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.brand-lockup i {
  grid-area: divider;
  width: 1px;
  height: 32px;
  background: #ddd;
}

.brand-lockup span {
  grid-area: tagline;
  color: #4b4657;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.site-nav nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 0;
  margin-left: 0;
}

.site-nav nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #2f2a38;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.site-nav nav button.active {
  border-bottom-color: transparent;
  background: #050505;
  color: #fff;
}

.site-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.site-nav-children {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 120;
  display: none;
  min-width: 132px;
  padding: 8px;
  border: 1px solid #ece8f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(47, 42, 56, 0.12);
  transform: translateX(-50%);
}

.site-nav-item:hover .site-nav-children,
.site-nav-item:focus-within .site-nav-children {
  display: grid;
  gap: 4px;
}

.site-nav .site-nav-children button {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  color: #2f2a38;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.site-nav .site-nav-children button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  white-space: nowrap;
}

.nav-actions button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.nav-actions .member-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 104px;
  gap: 6px;
  width: 104px;
  height: 34px;
  padding: 0;
  border-radius: 6px;
  background: #ffe2bf;
  color: #5a3519;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-actions .member-entry span {
  color: #6c3b12;
  font-size: 14px;
  line-height: 1;
}

.nav-actions .points-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 72px;
  gap: 8px;
  width: 72px;
  height: 34px;
  padding: 0;
  border-radius: 6px;
  background: #f5edff;
  color: var(--primary);
}

.nav-actions .points-entry span,
.nav-actions .points-entry b {
  font-size: 14px;
  line-height: 1;
}

.nav-actions .avatar-entry {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2ff;
}

.nav-actions .avatar-entry span,
.member-avatar {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 36%, #f5c8d4 0 18%, transparent 19%),
    radial-gradient(circle at 50% 65%, #6c8dd6 0 30%, transparent 31%),
    linear-gradient(135deg, #b7cdfd, #ead9ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.nav-actions .login,
.nav-actions .login-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 38px;
  background: var(--primary);
  color: #fff;
}

.nav-actions button.active:not(.login):not(.login-entry):not(.member-entry):not(.points-entry):not(.avatar-entry) {
  background: var(--primary-soft);
}

.nav-actions .member-entry.active {
  background: #ffd6a3;
}

.nav-actions .points-entry.active {
  background: var(--primary-soft);
}

.nav-actions .login.active {
  background: #050505;
  color: #fff;
}

.nav-actions .login-entry.active {
  background: var(--primary);
  color: #fff;
}

.account-popover {
  position: fixed;
  top: 78px;
  right: max(24px, calc((100vw - 1908px) / 2 + 36px));
  z-index: 220;
  width: min(370px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #ebe8f3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(47, 42, 56, 0.18);
}

.daily-login-popover {
  position: fixed;
  top: 76px;
  right: max(24px, calc((100vw - 1908px) / 2 + 36px));
  z-index: 1200;
  width: min(348px, calc(100vw - 32px));
  padding: 26px 26px 28px;
  border: 1px solid #f0edf6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(47, 42, 56, 0.16);
}

.daily-login-popover h3 {
  margin: 0 42px 22px 0;
  color: #050505;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.daily-login-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 42px;
  font-weight: 300;
  line-height: 24px;
  cursor: pointer;
}

.daily-login-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 96px;
  border-radius: 14px;
  background: rgba(157, 91, 255, 0.08);
}

.daily-login-card span {
  font-size: 26px;
  filter: drop-shadow(0 4px 8px rgba(157, 91, 255, 0.35));
}

.daily-login-card strong {
  color: #050505;
  font-size: 24px;
  font-weight: 700;
}

.account-popover header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 16px;
  background: #fff;
}

.account-popover header strong,
.account-popover header small,
.account-popover header em {
  display: block;
}

.account-popover header strong {
  color: #111;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.1;
}

.account-popover .member-avatar {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.account-popover header em {
  position: absolute;
  margin: 0 0 0 150px;
  padding: 3px 10px 4px 22px;
  border-radius: 12px;
  background: #dce3f2;
  color: #5f6b80;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
}

.account-popover header small {
  margin-top: 14px;
  color: #777;
  font-size: 18px;
  letter-spacing: 2px;
}

.account-vip-card {
  margin: 0 22px 20px;
  padding: 18px 10px 10px;
  border-radius: 16px;
  background: #d9e1f0;
}

.vip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 10px 14px;
}

.vip-top strong {
  display: block;
  color: #5c667f;
  font-size: 18px;
  line-height: 1.2;
}

.vip-top span {
  display: block;
  margin-top: 8px;
  color: #6c7487;
  font-size: 14px;
}

.vip-top button {
  flex: 0 0 auto;
  width: 86px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #5d657b;
  font-size: 14px;
  font-weight: 700;
}

.account-balance {
  padding: 18px 16px 14px;
  border-radius: 14px;
  background: #fff;
}

.account-balance h3 {
  margin: 0 0 18px;
  color: #111;
  font-size: 16px;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.balance-grid p {
  margin: 0;
}

.balance-grid span,
.balance-grid small {
  display: block;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.balance-grid b {
  display: block;
  margin: 8px 0;
  color: var(--primary);
  font-size: 22px;
  font-weight: 500;
}

.account-balance footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #f1f1f1;
}

.account-balance footer button {
  border: 0;
  background: transparent;
  color: #666;
  font-size: 14px;
}

.account-balance footer i {
  width: 1px;
  height: 16px;
  background: #b9b9b9;
}

.account-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 8px;
  padding: 0 22px 28px;
}

.account-menu-grid button {
  display: grid;
  justify-items: center;
  gap: 8px;
  height: auto;
  min-height: 58px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 14px;
  font-weight: 700;
}

.account-menu-grid svg,
.account-sidebar svg,
.wechat-login-button svg,
.wechat-login-button img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.account-menu-grid svg,
.account-sidebar svg,
.wechat-login-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu-grid button:hover {
  color: var(--primary);
}

.qds-header .inner {
  display: flex;
  align-items: center;
  gap: 80px;
  height: 100%;
}

.logo-mark {
  color: var(--primary);
  font-size: 28px;
  font-weight: 900;
}

.header-icon {
  margin-left: auto;
  color: var(--primary);
}

.qds-main {
  padding: 28px 0 120px;
}

.title-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 64px;
  margin-bottom: 22px;
}

.title-row h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  white-space: nowrap;
}

.qds-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  height: 44px;
}

.qds-step {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  background: #f1f2f7;
  color: #666;
}

.qds-step::after {
  content: "";
  position: absolute;
  right: -18px;
  z-index: 2;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 18px solid #f1f2f7;
}

.qds-step.active,
.qds-step.done {
  background: var(--primary);
  color: #fff;
}

.qds-step.active::after,
.qds-step.done::after {
  border-left-color: var(--primary);
}

.page-trademark {
  --qds-accent: var(--primary);
  --qds-accent-soft: var(--primary-soft);
}

.page-trademark .qds-main {
  width: min(1700px, calc(100vw - 300px));
  padding-top: 18px;
}

.page-trademark .title-row {
  grid-template-columns: 110px minmax(0, 1220px);
  gap: 58px;
  margin-bottom: 8px;
}

.page-trademark .title-row h1 {
  font-size: 26px;
  font-weight: 900;
}

.page-trademark .qds-steps {
  height: 36px;
}

.page-trademark .qds-step {
  background: #f4f5f8;
  color: #666;
  font-size: 13px;
}

.page-trademark .qds-step::after {
  top: 50%;
  right: -16px;
  transform: translateY(-50%);
  border-top-width: 18px;
  border-bottom-width: 18px;
  border-left-width: 16px;
  border-left-color: #f4f5f8;
}

.page-trademark .qds-step.active,
.page-trademark .qds-step.done {
  background: var(--qds-accent);
  color: #fff;
}

.page-trademark .qds-step.active::after,
.page-trademark .qds-step.done::after {
  border-left-color: var(--qds-accent);
}

.warm-tip,
.qds-card {
  background: #fff;
}

.warm-tip {
  margin-bottom: 0;
  padding: 16px 34px;
  border-left: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.75;
}

.warm-tip b {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--qds-accent, var(--primary-dark));
  font-size: 14px;
}

.warm-tip p {
  margin: 2px 0;
}

.qds-card {
  position: relative;
  min-height: 640px;
  padding: 34px;
}

.page-trademark .warm-tip {
  background: #f7f1ff;
}

.page-trademark .qds-card {
  --trademark-label-width: 110px;
  --trademark-field-width: 760px;
  padding: 34px;
  background: #fff;
}

.page-trademark .qds-card h2 {
  margin-bottom: 28px;
  font-size: 18px;
  font-weight: 900;
}

.page-trademark .form-row {
  grid-template-columns: var(--trademark-label-width) minmax(0, var(--trademark-field-width)) auto;
  gap: 18px;
  margin-bottom: 24px;
}

.page-trademark .form-row > label {
  font-size: 14px;
}

.page-trademark .form-row input,
.page-trademark .static-value {
  height: 42px;
  max-width: var(--trademark-field-width);
  border-color: #d8dde8;
  border-radius: 4px;
  font-size: 14px;
}

.page-trademark .tab-buttons {
  width: var(--trademark-field-width);
  grid-template-columns: repeat(3, 1fr);
}

.page-trademark .tab-buttons button {
  height: 42px;
  font-size: 14px;
}

.page-trademark .image-row {
  grid-template-columns: var(--trademark-label-width) 154px 150px minmax(0, 1fr);
  grid-template-rows: 74px auto;
  align-items: start;
  margin-bottom: 18px;
}

.page-trademark .mark-preview {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  width: 154px;
  height: 154px;
  padding: 12px;
}

.page-trademark .mark-upload-plus {
  align-self: center;
  justify-self: center;
  color: #d8d8d8;
  font-size: 54px;
  font-weight: 300;
  line-height: 1;
}

.page-trademark .mark-action-buttons {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: start;
  justify-self: start;
  margin-top: 32px;
}

.page-trademark .generate-btn,
.page-trademark .designer-contact-btn {
  width: 132px;
  height: 36px;
  font-size: 14px;
}

.page-trademark .designer-contact-btn {
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
}

.page-trademark .color-options {
  grid-column: 3 / 5;
  grid-row: 2;
  align-self: start;
  display: grid;
  gap: 4px;
  margin-top: 0;
  font-size: 13px;
  line-height: 1.65;
}

.page-trademark .mark-color-row {
  align-items: center;
  margin-top: 0;
}

.page-trademark .mark-color-options {
  display: flex;
  align-items: center;
  gap: 64px;
  min-height: 36px;
}

.page-trademark .mark-color-options button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #1f1f1f;
  font-size: 16px;
  cursor: pointer;
}

.page-trademark .mark-color-options button i {
  width: 16px;
  height: 16px;
  border: 1px solid #d8d8d8;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
}

.page-trademark .mark-color-options button.active i {
  border-color: var(--primary);
  background: var(--primary);
}

.page-trademark .mark-color-options span {
  color: #ff6b00;
  font-size: 14px;
}

.page-trademark .color-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999;
  white-space: normal;
}

.page-trademark .color-options p {
  position: relative;
  margin: 0;
  color: #aaa;
}

.page-trademark .color-options i {
  margin-right: 8px;
  color: #c7c7c7;
  font-style: normal;
}

.page-trademark .more-tip {
  position: relative;
  color: var(--qds-accent);
  cursor: default;
}

.page-trademark .more-tip em {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 8;
  display: none;
  width: 720px;
  padding: 14px 18px;
  border-radius: 4px;
  background: #2f3033;
  color: #fff;
  font-size: 13px;
  font-style: normal;
  line-height: 1.65;
  transform: translateX(-50%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.page-trademark .more-tip em::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  border: 9px solid transparent;
  border-top-color: #2f3033;
  transform: translateX(-50%);
}

.page-trademark .more-tip:hover em {
  display: block;
}

.page-trademark .recommend-row {
  padding: 10px 20px;
}

.page-trademark .recommend-row button {
  height: 36px;
  padding: 0 20px;
}

.page-trademark .class-list .active {
  background: var(--qds-accent-soft);
  color: var(--qds-accent);
}

.page-trademark .settlement button {
  border-color: var(--qds-accent);
  background: var(--qds-accent);
}

.page-trademark .settlement strong,
.page-trademark .settlement b {
  color: var(--qds-accent);
}

.subject-search button,
.settlement button,
.recommend-row button,
.generate-btn {
  border: 1px solid var(--qds-accent, var(--primary));
  background: var(--qds-accent, var(--primary));
  color: #fff;
}

.qds-card h2 {
  margin: 0 0 24px;
  font-size: 22px;
}

.qds-error {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.qds-error span {
  padding: 8px 12px;
  background: #fff3f0;
  color: var(--danger);
}

.form-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 720px) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.form-row > label {
  color: #222;
}

em {
  color: var(--danger);
  font-style: normal;
}

.form-row input,
.contact-row input,
.subject-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d9dde6;
  background: #fff;
  font-size: 15px;
}

.tab-buttons {
  display: grid;
  grid-template-columns: repeat(3, 140px);
}

.tab-buttons button,
.radio-row button {
  height: 36px;
  border: 1px solid #d9dde6;
  background: #fff;
  color: #555;
}

.tab-buttons .active,
.radio-row .active {
  border-color: var(--qds-accent, var(--primary));
  color: var(--qds-accent, var(--primary));
  background: var(--qds-accent-soft, var(--primary-soft));
}

.static-value {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d9dde6;
  color: #555;
}

.hint-tip {
  position: relative;
  color: var(--qds-accent, var(--primary));
  font-size: 13px;
}

.hint-tip span {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  display: none;
  width: 260px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  line-height: 1.4;
}

.hint-tip:hover span {
  display: block;
}

.image-row {
  grid-template-columns: 110px 170px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
}

.image-row > label:first-child {
  grid-row: 1 / 3;
}

.mark-preview {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border: 1px dashed #ccc;
  color: #999;
  cursor: pointer;
}

.mark-preview input {
  display: none;
}

.mark-preview strong {
  grid-row: 1;
  align-self: center;
  color: #222;
  font-size: 26px;
}

.mark-preview img {
  grid-row: 1;
  align-self: center;
  max-width: 100%;
  max-height: 100px;
}

.page-trademark .mark-preview.has-image {
  grid-template-rows: 1fr;
  padding: 0;
  overflow: hidden;
}

.page-trademark .mark-preview.has-image img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.mark-preview small {
  grid-row: 2;
  align-self: end;
  color: #222;
  font-size: 13px;
  text-align: center;
}

.mark-action-buttons {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  gap: 10px;
  align-self: center;
  justify-self: start;
  margin-top: 58px;
}

.generate-btn,
.designer-contact-btn {
  width: 120px;
  height: 36px;
}

.designer-contact-btn {
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
}

.color-options {
  grid-column: 3;
  grid-row: 2;
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  color: #999;
  font-size: 13px;
}

.color-options span {
  color: var(--qds-accent, var(--primary));
}

.class-section {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: start;
  margin-top: 24px;
}

.page-trademark .class-section {
  grid-template-columns: var(--trademark-label-width) minmax(0, 1fr);
  column-gap: 18px;
}

.page-trademark .class-section > h2 {
  grid-column: 1;
  grid-row: 1 / 3;
  margin: 0;
  color: #222;
  font-size: 14px;
  font-weight: 400;
  line-height: 46px;
  white-space: nowrap;
}

.recommend-row {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line);
  background: #fff;
  color: #555;
  font-size: 14px;
}

.recommend-row button {
  height: 28px;
  padding: 0 16px;
  border: 1px solid var(--qds-accent, var(--primary));
  border-radius: 0;
  background: #fff;
  color: var(--qds-accent, var(--primary));
  font-size: 14px;
}

.class-grid {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 170px;
  min-width: 0;
  height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
}

.class-picker,
.goods-list,
.selected-list {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
}

.class-picker {
  padding: 16px;
}

.class-search {
  position: relative;
  display: block;
  height: 42px;
}

.class-search input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 14px;
  border: 1px solid #dedbe5;
  border-radius: 4px;
  outline: 0;
  color: #555;
  font-size: 14px;
}

.class-search span {
  position: absolute;
  right: 12px;
  top: 8px;
  color: var(--qds-accent, var(--primary));
  font-size: 18px;
}

.class-list {
  height: 344px;
  margin-top: 12px;
  overflow: auto;
}

.class-list button {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: #f7f7f8;
  text-align: left;
  color: #555;
  font-size: 14px;
}

.class-list .active {
  background: #f2f2f2;
  color: var(--qds-accent, var(--primary));
}

.goods-list {
  overflow: auto;
  padding: 0;
}

.goods-list > header {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 40px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #f7f7f8;
  color: #222;
  font-size: 14px;
  font-weight: 400;
  line-height: 40px;
}

.goods-group {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  padding: 16px 20px 0;
  margin-bottom: 12px;
}

.goods-group h3 {
  flex: 0 0 100%;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 400;
}

.goods-group button {
  flex: 0 0 auto;
  margin: 0;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #e2e2e8;
  background: #fff;
  color: #555;
  font-size: 14px;
  white-space: nowrap;
}

.goods-group .selected {
  border-color: var(--qds-accent, var(--primary));
  background: var(--qds-accent-soft, var(--primary-soft));
  color: var(--qds-accent, var(--primary-dark));
}

.selected-list {
  padding: 0;
  border-right: 0;
  overflow: auto;
}

.selected-list header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f7f8;
  font-size: 14px;
  font-weight: 400;
}

.selected-list header b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
  white-space: nowrap;
}

.selected-list header span {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
}

.selected-list header button {
  border: 0;
  background: transparent;
  color: var(--qds-accent, var(--primary));
  font-size: 14px;
}

.selected-list > div {
  padding: 14px 16px 0;
}

.selected-list strong {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.selected-list p {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
  color: #555;
  font-size: 14px;
}

.selected-list p button {
  border: 0;
  background: transparent;
  color: #999;
}

.empty {
  padding: 16px;
  color: #999;
  font-size: 14px;
}

.applicant-layout {
  display: grid;
  gap: 14px;
}

.subject-panel,
.contact-panel {
  padding: 32px;
  background: #fff;
  border: 1px solid #f0f0f0;
}

.subject-panel h3 span {
  margin-left: 12px;
  color: #888;
  font-size: 14px;
}

.subject-search {
  display: flex;
  gap: 18px;
  margin: 24px 0 28px;
}

.subject-search input {
  width: 620px;
}

.subject-search button {
  width: 110px;
  height: 44px;
}

.subject-results {
  display: flex;
  gap: 20px;
  min-height: 170px;
}

.subject-card {
  position: relative;
  width: 330px;
  min-height: 150px;
  padding: 24px;
  border: 2px solid var(--primary);
  box-shadow: 0 10px 22px rgba(157, 91, 255, 0.12);
}

.card-select {
  display: grid;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.subject-card span {
  justify-self: start;
  padding: 3px 10px;
  background: #f0f0f0;
  color: #777;
}

.subject-card p {
  color: #888;
}

.subject-card div button {
  margin-right: 22px;
  border: 0;
  background: transparent;
  color: #555;
}

.subject-card i {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 46px;
  background: var(--primary);
  color: #fff;
  font-size: 34px;
  font-style: normal;
}

.empty-subject {
  display: grid;
  place-items: center;
  min-height: 360px;
  color: #1d2440;
  text-align: center;
  font-size: 24px;
}

.empty-subject div {
  width: 260px;
  height: 180px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #eef0f8);
}

.contact-panel {
  display: grid;
  gap: 22px;
  padding-bottom: 70px;
}

.contact-row {
  display: grid;
  grid-template-columns: 130px 520px;
  align-items: center;
  gap: 18px;
}

.modal-mask,
.ocr-mask,
.sample-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.46);
}

.trademark-commitment-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.42);
}

.trademark-commitment-modal {
  width: min(820px, calc(100vw - 40px));
  max-height: calc(100vh - 64px);
  padding: 24px 28px 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.trademark-commitment-modal h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.trademark-commitment-content {
  max-height: min(62vh, 620px);
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid #ece7f6;
  border-radius: 6px;
  background: #fff;
}

.trademark-commitment-content pre {
  margin: 0;
  color: #4d4858;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.trademark-commitment-modal button {
  display: block;
  width: 180px;
  height: 40px;
  margin: 20px auto 0;
  border: 0;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.applicant-modal {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 160px));
  height: 78vh;
  max-height: 720px;
  overflow: hidden;
  padding: 24px 28px 0;
  background: #fff;
  border-radius: 6px;
}

.modal-title,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.modal-title button,
.sample-preview button,
.ocr-title button {
  border: 0;
  background: transparent;
  color: #999;
  font-size: 24px;
}

.modal-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}

.modal-scroll h3 {
  margin: 0 0 24px;
  font-size: 16px;
}

.qds-modal-grid,
.material-grid,
.entrust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 62px;
  margin-bottom: 34px;
}

.modal-field,
.upload-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.modal-field label,
.upload-row > label,
.entrust-label {
  font-size: 14px;
}

.field-control {
  display: flex;
  overflow: visible;
}

.field-control input,
.modal-field select,
.address-cascade select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d9dde6;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
}

.field-control.has-suffix input {
  border-radius: 4px 0 0 4px;
}

.ocr-trigger {
  position: relative;
  flex: 0 0 82px;
  width: 82px;
  border: 1px solid var(--primary);
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: #fff;
  color: var(--primary);
  white-space: nowrap;
}

.ocr-trigger span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  display: none;
  width: max-content;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 3px;
  background: #333;
  color: #fff;
  font-size: 13px;
}

.ocr-trigger span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
}

.ocr-trigger:hover span {
  display: block;
}

.modal-segment,
.address-cascade {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.modal-segment {
  height: 44px;
  border: 1px solid #d9dde6;
  border-radius: 4px;
  overflow: hidden;
}

.modal-segment button {
  border: 0;
  background: #fff;
  color: #666;
  font-size: 14px;
  font-weight: 700;
}

.modal-segment .active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.modal-section-title {
  display: flex;
  gap: 22px;
  margin-bottom: 24px;
  color: #aaa;
  font-size: 14px;
}

.modal-section-title h3 {
  margin: 0;
  color: #222;
}

.upload-main,
.entrust-upload {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.upload-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  height: 206px;
  border: 1px solid #eee;
  background: #fafafa;
  color: #c9c9c9;
}

.entrust-upload .upload-box {
  width: 96px;
  height: 154px;
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.upload-box span {
  font-size: 40px;
}

.upload-box b {
  max-width: calc(100% - 16px);
  margin-top: -42px;
  font-size: 14px;
  font-weight: 400;
  overflow-wrap: anywhere;
  text-align: center;
}

.upload-row > p {
  grid-column: 2;
  margin: 8px 0 0;
  color: #aaa;
  font-size: 14px;
}

.upload-side,
.entrust-upload-meta {
  display: grid;
  align-content: start;
  gap: 10px;
}

.upload-side > button:not(.sample-thumb),
.entrust-upload-meta > button:first-child {
  height: 32px;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
}

.sample-thumb {
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  width: 86px;
  height: 126px;
  padding: 8px 6px 7px;
  border: 1px solid #eee;
  background: #fff;
  color: var(--danger);
  font-size: 12px;
  cursor: zoom-in;
}

.sample-thumb img {
  width: 62px;
  height: 86px;
  object-fit: contain;
}

.entrust-upload-meta {
  grid-template-columns: auto auto;
  color: #aaa;
  font-size: 13px;
}

.entrust-upload-meta .sample-thumb {
  grid-column: 1 / -1;
}

.download-link {
  display: inline-block;
  margin: 0 0 14px 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.upload-rules {
  margin-top: 14px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.65;
}

.extract-result,
.modal-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(157, 91, 255, 0.35);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.modal-actions {
  margin: 16px -28px 0;
  padding: 14px 28px 16px;
  border-top: 1px solid #eee;
  background: #fff;
  justify-content: flex-end;
  gap: 12px;
}

.modal-actions button,
.ocr-actions button {
  width: 120px;
  height: 42px;
  border: 1px solid #bbb;
  background: #fff;
}

.modal-actions button:last-child,
.ocr-actions button:last-child {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.sample-preview-mask {
  z-index: 90;
  background: rgba(0, 0, 0, 0.52);
}

.sample-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(960px, 100vw);
  height: 100vh;
  padding: 42px 28px;
  background: #fff;
}

.sample-preview button {
  position: absolute;
  right: 20px;
  top: 16px;
}

.sample-preview-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.sample-preview-art img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ocr-mask {
  z-index: 72;
}

.ocr-modal {
  display: flex;
  flex-direction: column;
  width: min(1030px, calc(100vw - 150px));
  height: min(660px, calc(100vh - 96px));
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
}

.ocr-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 28px 0;
  padding: 20px 24px;
  border: 1px solid #eee;
}

.ocr-title h3 {
  margin: 0;
  font-size: 18px;
}

.ocr-body {
  flex: 1;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 56px;
  padding: 32px 28px 24px;
}

.ocr-panel h4 {
  margin: 0 0 18px;
  font-size: 14px;
}

.ocr-upload {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  width: 320px;
  height: 420px;
  background: var(--primary-soft);
  color: var(--primary);
}

.ocr-upload input {
  display: none;
}

.ocr-upload span {
  display: grid;
  place-items: center;
  width: 156px;
  height: 156px;
  border: 3px solid var(--primary);
  background:
    linear-gradient(var(--primary-soft) 0 0) center / 98px 172px no-repeat,
    linear-gradient(var(--primary-soft) 0 0) center / 172px 98px no-repeat;
  font-size: 16px;
}

.ocr-upload b {
  color: var(--primary);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  text-align: center;
}

.ocr-confirm-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.ocr-confirm-row label,
.ocr-confirm-row input,
.ocr-confirm-row textarea {
  font-size: 14px;
}

.ocr-confirm-row input,
.ocr-confirm-row textarea {
  width: 100%;
  border: 1px solid #d9dde6;
  border-radius: 4px;
}

.ocr-confirm-row input {
  height: 44px;
  padding: 0 14px;
}

.ocr-confirm-row textarea {
  height: 66px;
  padding: 12px 14px;
  resize: none;
}

.ocr-actions {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  padding: 12px 24px;
  border-top: 1px solid #eee;
}

.confirm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.confirm-grid section,
.pay-page section,
.qr-box {
  padding: 24px;
  border: 1px solid var(--line);
  background: #fff;
}

.agree-row {
  display: block;
  margin-top: 22px;
}

.pay-page {
  display: grid;
  gap: 18px;
  max-width: 720px;
}

.confirm-order-page,
.payment-order-page {
  display: grid;
  gap: 18px;
  padding-bottom: 18px;
}

.order-section,
.payment-summary,
.pay-card,
.pay-aside {
  border: 1px solid var(--line);
  background: #fff;
}

.order-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.order-section h3,
.pay-card h3,
.pay-aside h3 {
  margin: 0;
  color: #222;
  font-size: 16px;
  font-weight: 700;
}

.order-section > header button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
}

.confirm-trademark {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 26px;
  padding: 22px 24px;
}

.confirm-mark-preview {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border: 1px dashed #cfcfd6;
  background: #fff;
}

.confirm-mark-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.confirm-mark-preview strong {
  font-size: 22px;
  font-weight: 700;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.order-detail-grid p,
.pay-aside p {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 42px;
  margin: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #555;
  font-size: 14px;
}

.order-detail-grid span,
.pay-aside p span {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #fafafa;
  color: #777;
}

.order-detail-grid b,
.pay-aside p b {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 14px;
  color: #333;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.applicant-confirm-grid {
  margin: 22px 24px;
}

.confirm-items-list {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
}

.confirm-items-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.confirm-items-list b {
  color: #222;
  font-weight: 700;
}

.confirm-items-list p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.confirm-items-list span {
  padding: 6px 12px;
  border: 1px solid #e3e0ea;
  color: #555;
  white-space: nowrap;
}

.muted {
  color: #999;
}

.fee-section > header span {
  color: #777;
  font-size: 14px;
}

.fee-table {
  margin: 18px 24px 0;
  border-top: 1px solid var(--line);
}

.fee-table p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  color: #444;
}

.fee-table span {
  display: grid;
  gap: 4px;
}

.fee-table em {
  color: #999;
  font-size: 12px;
  font-style: normal;
}

.fee-table b {
  color: #333;
  font-weight: 700;
}

.invoice-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 24px 0;
  color: #555;
  font-size: 14px;
}

.confirm-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 18px;
  padding: 12px 24px 22px;
}

.confirm-total span {
  color: #555;
}

.confirm-total strong {
  color: var(--primary);
  font-size: 28px;
}

.agree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 0 4px;
  color: #555;
  font-size: 14px;
}

.payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
  background: linear-gradient(90deg, var(--primary-soft), #fff);
}

.payment-summary h3 {
  margin: 10px 0 8px;
  font-size: 20px;
}

.payment-summary p {
  margin: 4px 0;
  color: #666;
}

.payment-summary > strong {
  color: var(--primary);
  font-size: 38px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.pay-card {
  padding: 24px;
}

.payment-main {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  margin-top: 22px;
}

.pay-tips {
  display: grid;
  gap: 8px;
  padding: 18px 22px;
  background: #fafafa;
  color: #666;
}

.pay-tips b {
  color: #222;
}

.pay-tips p {
  margin: 0;
}

.pay-aside {
  padding: 22px;
}

.pay-aside h3 {
  margin-bottom: 16px;
}

.pay-aside p {
  grid-template-columns: 92px minmax(0, 1fr);
}

.pay-fee-lines {
  margin-top: 14px;
}

.pay-aside-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pay-aside-total strong {
  color: var(--primary);
  font-size: 26px;
}

.home-page,
.generator-page {
  background:
    radial-gradient(circle at 10px 10px, #d5d2dc 0 2px, transparent 3px) 0 0 / 42px 42px,
    #f7f7fa;
  min-height: calc(100vh - 96px);
}

.home-page {
  padding: 56px 0 90px;
}

.home-hero,
.home-modules,
.home-gallery,
.generator-shell {
  width: min(1700px, calc(100vw - 300px));
  margin: 0 auto;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(520px, 1fr);
  align-items: center;
  gap: 72px;
  min-height: 620px;
  border: 1px solid #e3e0ea;
  background: rgba(255, 255, 255, 0.92);
}

.home-copy {
  padding-left: 78px;
}

.home-kicker {
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.home-copy h1 {
  margin: 22px 0 18px;
  color: #16131f;
  font-size: 72px;
  line-height: 1.08;
  letter-spacing: 0;
}

.home-copy p {
  max-width: 680px;
  margin: 0;
  color: #676170;
  font-size: 22px;
  line-height: 1.7;
}

.home-actions {
  display: flex;
  gap: 18px;
  margin-top: 38px;
}

.home-actions button {
  height: 56px;
  min-width: 168px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.home-actions button + button {
  background: #fff;
  color: var(--primary);
}

.home-showcase {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-left: 1px solid #e3e0ea;
  background:
    linear-gradient(135deg, rgba(157, 91, 255, 0.08), rgba(255, 255, 255, 0.85)),
    #fff;
}

.package-card {
  position: absolute;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid #ddd8e9;
  background: #fff;
  box-shadow: 0 26px 70px rgba(72, 52, 101, 0.14);
}

.package-main {
  left: 110px;
  top: 82px;
  width: 360px;
  height: 360px;
}

.package-main strong {
  color: var(--primary);
  font-size: 58px;
  font-weight: 900;
}

.package-main span {
  margin-top: 16px;
  color: #4d465b;
  font-size: 18px;
}

.package-side {
  right: 72px;
  bottom: 66px;
  width: 250px;
  height: 250px;
}

.package-side b {
  color: #16131f;
  font-size: 42px;
}

.package-side span {
  margin-top: 10px;
  color: #716a7f;
}

.spark {
  position: absolute;
  width: 78px;
  height: 78px;
  border: 15px solid var(--primary);
  transform: rotate(45deg);
}

.spark-a {
  right: 230px;
  top: 86px;
}

.spark-b {
  left: 60px;
  bottom: 72px;
  width: 42px;
  height: 42px;
  border-width: 9px;
  opacity: 0.6;
}

.home-modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.home-modules article,
.home-gallery {
  border: 1px solid #e3e0ea;
  background: #fff;
}

.home-modules article {
  padding: 30px;
}

.home-modules span {
  color: var(--primary);
  font-weight: 900;
}

.home-modules h2 {
  margin: 18px 0 10px;
  font-size: 24px;
}

.home-modules p,
.home-gallery p {
  margin: 0;
  color: #6c6674;
  line-height: 1.7;
}

.home-gallery {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  margin-top: 24px;
  padding: 38px;
}

.home-gallery h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-grid div {
  min-height: 150px;
  padding: 26px;
  background: var(--primary-soft);
}

.gallery-grid b {
  display: block;
  color: var(--primary);
  font-size: 24px;
}

.gallery-grid span {
  display: block;
  margin-top: 18px;
  color: #4e485a;
}

.home-page {
  min-height: calc(100vh - 72px);
  padding: 0 0 84px;
  background: #fff;
}

.home-promo {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 81;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  height: 52px;
  background:
    radial-gradient(circle at 26% 30%, rgba(255, 255, 255, 0.78) 0 22px, transparent 23px),
    radial-gradient(circle at 82% 28%, rgba(255, 255, 255, 0.7) 0 30px, transparent 31px),
    linear-gradient(90deg, #ff8d26, #ff3037);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.page-home {
  padding-top: 52px;
}

.page-home .site-nav {
  top: 52px;
}

.home-promo button {
  height: 34px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #fff46a;
  color: #111;
  font-size: 15px;
  font-weight: 900;
}

.home-top-tools,
.home-tool-row,
.home-inspiration {
  width: min(1960px, calc(100vw - 64px));
  margin: 0 auto;
}

.home-top-tools {
  display: grid;
  grid-template-columns: 0.96fr 0.96fr 1.95fr;
  gap: 12px;
  padding-top: 32px;
}

.home-feature-card,
.home-hero-service,
.tool-card,
.more-tools {
  position: relative;
  overflow: hidden;
  border: 1px solid #eef0f6;
  border-radius: 22px;
  background: #f3f6fd;
}

.home-feature-card {
  min-height: 330px;
  padding: 34px 28px;
}

.home-feature-card h1,
.home-hero-service h1 {
  margin: 0;
  color: #08080d;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 900;
}

.home-feature-card p,
.home-hero-service p {
  margin: 18px 0 0;
  color: #2c2d36;
  font-size: 17px;
}

.home-feature-card button {
  position: absolute;
  left: 28px;
  bottom: 28px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #050505;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.home-feature-card em {
  position: absolute;
  right: 128px;
  bottom: 50px;
  z-index: 2;
  padding: 9px 28px;
  border-radius: 999px;
  background: rgba(80, 80, 84, 0.42);
  color: #fff;
  font-style: normal;
}

.home-visual {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 214px;
  height: 214px;
  border-radius: 20px;
  object-fit: contain;
}

.packaging {
  background: linear-gradient(135deg, #e7eefb, #edf4ff);
}

.font-card {
  background: linear-gradient(135deg, #f7f4ff, #eceefe);
}

.pack-visual {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0.12)),
    linear-gradient(135deg, #f9fbf7, #cbdcb7);
  box-shadow: 0 24px 48px rgba(80, 96, 115, 0.18);
  transform: perspective(620px) rotateY(-18deg);
}

.pack-visual span {
  color: #3b4d36;
  font-size: 20px;
  text-align: center;
}

.font-visual {
  background: rgba(255, 255, 255, 0.72);
  color: #08080d;
  font-family: serif;
  font-size: 42px;
  line-height: 1.55;
  box-shadow: 0 18px 46px rgba(98, 87, 130, 0.12);
}

.home-hero-service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  min-height: 330px;
  padding: 44px 54px;
  background: linear-gradient(105deg, #f8fbff 0 52%, #eef5ff 100%);
}

.home-hero-service h1 {
  font-size: 54px;
}

.home-hero-service h1 span {
  color: #4d45ff;
  font-size: inherit;
  line-height: inherit;
}

.home-hero-service p {
  max-width: 560px;
  margin-top: 24px;
  line-height: 1.55;
}

.home-hero-service button {
  margin-top: 36px;
  height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: #050505;
  color: #fff;
  font-weight: 900;
}

.home-brush-card {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 70px rgba(78, 94, 166, 0.2);
}

.home-brush-card .style-icon {
  width: 78px;
  height: 78px;
  color: var(--primary);
}

.home-tool-row {
  margin-top: 28px;
}

.home-tool-row h2 {
  margin: 0 0 22px;
  font-size: 24px;
}

.home-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) 80px;
  gap: 18px;
}

.tool-card {
  min-height: 174px;
  padding: 24px;
  background: #f6f7fb;
}

.tool-card h3 {
  margin: 0;
  font-size: 21px;
}

.tool-card span {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 12px;
  border-radius: 8px;
  background: #e7eefb;
  color: #7890b2;
}

.tool-card button,
.more-tools button {
  position: absolute;
  left: 24px;
  bottom: 22px;
  width: 44px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  font-size: 24px;
  font-weight: 900;
}

.tool-art {
  position: absolute;
  right: 18px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 108px;
  height: 96px;
  border-radius: 16px;
  background: #fff;
  color: #4f4b5c;
  transform: rotate(7deg);
  overflow: hidden;
}

.tool-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tool-art b {
  max-width: 86px;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(80, 80, 84, 0.42);
  font-size: 12px;
  text-align: center;
}

.more-tools {
  display: grid;
  place-items: center;
  min-height: 174px;
  background: #f3f4fa;
  writing-mode: vertical-rl;
  letter-spacing: 4px;
}

.more-tools button {
  left: 18px;
  bottom: 20px;
}

.home-inspiration {
  margin-top: 82px;
  padding-bottom: 80px;
}

.home-inspiration h2 {
  margin: 0;
  text-align: center;
  font-size: 40px;
  font-weight: 500;
}

.home-inspiration label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 810px;
  height: 66px;
  margin: 38px auto 22px;
  padding: 0 26px;
  border: 1px solid #e2e2e8;
  border-radius: 999px;
  color: #aaa;
}

.home-inspiration input {
  flex: 1;
  border: 0;
  outline: 0;
  color: #444;
  font-size: 18px;
}

.home-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #777b8c;
}

.home-tags button {
  height: 34px;
  padding: 0 16px;
  border: 1px solid #e0e2ea;
  border-radius: 999px;
  background: #fff;
  color: #7a7e8e;
  font-size: 16px;
}

.home-inspiration nav {
  display: flex;
  align-items: center;
  gap: 42px;
  margin-top: 70px;
}

.home-inspiration nav button {
  border: 0;
  border-bottom: 4px solid transparent;
  background: transparent;
  color: #111;
  font-size: 18px;
  padding: 0 0 12px;
}

.home-inspiration nav button.active {
  border-bottom-color: #111;
}

.masonry-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.masonry-gallery article {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border-radius: 12px;
  background: #f0f1f4;
}

.masonry-gallery article:nth-child(2),
.masonry-gallery article:nth-child(5) {
  min-height: 455px;
}

.pack-shot {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: inherit;
  padding: 28px;
  color: #6a594a;
  text-align: center;
}

.pack-shot strong {
  font-size: 34px;
  font-weight: 800;
}

.pack-shot span {
  display: block;
  margin-top: 18px;
  color: rgba(0, 0, 0, 0.55);
}

.masonry-gallery small {
  position: absolute;
  left: 14px;
  bottom: 14px;
  color: rgba(0, 0, 0, 0.2);
  font-weight: 900;
}

.masonry-gallery .clean .pack-shot {
  background: linear-gradient(145deg, #f7f8f8, #d9dde0);
}

.masonry-gallery .pet .pack-shot {
  background: linear-gradient(145deg, #f6d890, #f9f1ce);
}

.masonry-gallery .bakery .pack-shot {
  background: linear-gradient(145deg, #baa28c, #f3e5cf);
}

.masonry-gallery .paper .pack-shot {
  background: linear-gradient(145deg, #eee7db, #cfc2ac);
}

.masonry-gallery .cherry .pack-shot {
  background: linear-gradient(145deg, #9b1928, #e7b36a);
  color: #ffe8b2;
}

.masonry-gallery .pink .pack-shot {
  background: linear-gradient(145deg, #f4b8c5, #fff0f3);
}

.float-service-wrap {
  position: fixed;
  right: 22px;
  bottom: 78px;
  z-index: 90;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.float-service {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  width: 48px;
  min-height: 106px;
  padding: 10px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 38px rgba(157, 91, 255, 0.32);
}

.float-service .headset-icon {
  display: block;
  max-width: none;
  width: 36px;
  height: 36px;
  margin-top: 0;
  line-height: 1;
}

.float-service .headset-icon svg {
  display: block;
  width: 36px;
  height: 36px;
}

.float-service span:not(.headset-icon) {
  max-width: 28px;
  font-size: 12px;
  line-height: 16px;
}

.float-help {
  width: 39px;
  height: 39px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 12px 30px rgba(21, 24, 32, 0.16);
  font-size: 18px;
  font-weight: 700;
}

.service-popover {
  position: absolute;
  right: 58px;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 78px);
  gap: 10px;
  padding: 11px;
  border: 1px solid #eceaf1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(22, 24, 35, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px);
  transition: opacity .18s ease, transform .18s ease;
}

.float-service-wrap:hover .service-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.service-qr-card {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.service-qr-card i {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 5px solid #fff;
  box-shadow: inset 0 0 0 1px #ddd;
}

.service-qr-card i img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-qr-card b {
  color: #222;
  font-size: 12px;
}

.service-qr-card small {
  color: #888;
  font-size: 11px;
}

.human-edit-mask {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 28, 0.48);
}

.human-edit-modal {
  width: min(560px, 92vw);
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(18, 15, 30, 0.28);
}

.human-edit-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.human-edit-modal h2 {
  margin: 0;
  font-size: 20px;
}

.human-edit-modal header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f5f3f9;
  color: #4a4653;
  font-size: 20px;
}

.human-edit-modal p {
  margin: 10px 0 18px;
  color: #777182;
  font-size: 14px;
}

.human-edit-qrs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 14px;
}

.human-edit-qrs .service-qr-card {
  padding: 14px 10px;
  border: 1px solid #ece8f4;
  border-radius: 14px;
  background: #fbfaff;
}

.human-edit-qrs .service-qr-card i {
  width: 104px;
  height: 104px;
}

.ai-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.98);
}

.ai-preview-modal {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  width: min(1180px, 96vw);
  height: min(760px, 92vh);
  overflow: hidden;
  border: 1px solid #ece9f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(18, 15, 30, 0.14);
}

.ai-preview-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  border-right: 1px solid #ece9f2;
  background: #fff;
}

.ai-preview-art img {
  display: block;
  max-width: 82%;
  max-height: 72%;
  object-fit: contain;
}

.ai-preview-colors {
  position: absolute;
  right: 32px;
  bottom: 28px;
  left: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #918b9b;
  font-size: 14px;
}

.ai-preview-colors button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ai-preview-side {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 22px;
  min-height: 0;
  padding: 32px 32px 28px;
}

.ai-preview-side h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.ai-preview-close,
.ai-preview-favorite {
  position: absolute;
  top: 24px;
  width: 38px;
  height: 38px;
  border: 1px solid #ece8f4;
  border-radius: 50%;
  background: #fff;
  color: #17151f;
  font-size: 24px;
}

.ai-preview-close {
  right: 24px;
  color: #8f889c;
}

.ai-preview-favorite {
  right: 72px;
  font-size: 22px;
}

.ai-preview-side dl {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  color: #66616f;
  font-size: 16px;
}

.ai-preview-side dt {
  color: #8d8698;
  font-weight: 700;
}

.ai-preview-side dd {
  margin: 0;
}

.ai-preview-side dd:first-of-type {
  color: #17151f;
  font-weight: 700;
}

.ai-preview-process {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
  border-radius: 18px;
  background: #f4f3f6;
}

.ai-preview-process b {
  grid-column: 1 / -1;
  color: #8f889c;
  font-size: 16px;
}

.ai-preview-process button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #17151f;
  font-size: 16px;
  font-weight: 700;
}

.ai-preview-process svg {
  width: 22px;
  height: 22px;
}

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

.ai-preview-downloads button {
  min-height: 48px;
  border: 1px solid #17151f;
  border-radius: 14px;
  background: #fff;
  color: #17151f;
  font-size: 16px;
  font-weight: 700;
}

.ai-preview-downloads button:last-child {
  border-color: #000;
  background: #000;
  color: #fff;
}

.generator-page {
  height: calc(100vh - 72px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.generator-shell {
  display: grid;
  grid-template-columns: 96px 416px 1fr;
  width: min(1908px, 100%);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #dedbe5;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #fff;
}

.generator-rail {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 14px;
  padding-top: 30px;
  border-right: 1px solid #e0dde7;
  background: #fff;
}

.generator-rail button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  width: 72px;
  min-height: 60px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #4d4858;
  font-size: 27px;
  font-weight: 400;
}

.coming-soon-tip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 30;
  transform: translateY(-50%);
  width: max-content;
  max-width: 170px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(28, 24, 36, 0.92);
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 18, 30, 0.18);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  pointer-events: none;
  white-space: nowrap;
}

.coming-soon-tip::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  background: rgba(28, 24, 36, 0.92);
}

.generator-rail button.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.generator-rail small {
  font-size: 16px;
  font-weight: 400;
}

.rail-spark span,
.rail-spark span::before,
.rail-spark span::after {
  display: block;
  width: 18px;
  height: 18px;
  background: var(--primary);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.rail-spark span {
  position: relative;
  width: 24px;
  height: 24px;
}

.rail-spark span::before,
.rail-spark span::after {
  content: "";
  position: absolute;
}

.rail-spark span::before {
  right: -12px;
  top: -14px;
  width: 14px;
  height: 14px;
}

.rail-spark span::after {
  right: -10px;
  bottom: -13px;
  width: 12px;
  height: 12px;
}

.rail-icon,
.style-icon {
  position: relative;
  display: block;
  color: currentColor;
}

.generator-rail .rail-icon {
  width: 28px;
  height: 28px;
}

.generator-rail .rail-icon::before,
.generator-rail .rail-icon::after,
.logo-style-grid .style-icon::before,
.logo-style-grid .style-icon::after {
  content: none !important;
}

.rail-icon svg,
.style-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.style-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.page-generator .logo-style-grid .style-icon img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  transform: none;
}

.rail-font::before,
.style-english::before {
  content: "A";
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 4px solid currentColor;
  border-radius: 3px;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.rail-logo::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 28%, 82% 100%, 18% 100%, 0 28%);
}

.rail-pack::before,
.rail-screen::before {
  content: "";
  display: block;
  width: 32px;
  height: 24px;
  border: 4px solid currentColor;
  border-radius: 2px;
}

.rail-poster::before {
  content: "";
  display: block;
  width: 32px;
  height: 28px;
  border: 4px solid currentColor;
  box-shadow: inset 12px 0 0 transparent, inset 15px 0 0 currentColor;
}

.rail-book::before {
  content: "";
  display: block;
  width: 32px;
  height: 26px;
  border: 4px solid currentColor;
  border-radius: 3px;
  box-shadow: inset 14px 0 0 -10px currentColor;
}

.rail-tools::before {
  content: "✖";
  display: block;
  transform: rotate(45deg);
  font-size: 34px;
  line-height: 1;
}

.generator-panel {
  min-height: 0;
  overflow-y: auto;
  padding: 34px 28px 34px;
  border-right: 1px solid #e0dde7;
  background: #fff;
}

.generator-panel h1 {
  margin: 0 0 28px;
  color: #16131f;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.logo-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 20px;
}

.logo-style-grid button {
  display: grid;
  grid-template-rows: 122px auto;
  place-items: center;
  gap: 8px;
  min-width: 0;
  height: 154px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4d4858;
}

.generator-data-loading,
.generator-data-empty,
.data-loading-state,
.inspiration-empty,
.operation-empty,
.member-data-state,
.home-data-state,
.service-empty {
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 18px;
  color: #8a8492;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}

.generator-data-loading,
.generator-data-empty {
  grid-column: 1 / -1;
  min-height: 92px;
  border: 1px dashed #e2deeb;
  border-radius: 8px;
  background: #faf9fc;
}

.generator-data-loading p,
.generator-data-empty p,
.data-loading-state p,
.inspiration-empty p,
.operation-empty p,
.member-data-state p,
.home-data-state p,
.service-empty p {
  margin: 0;
}

.data-loading-state {
  grid-column: 1 / -1;
  min-height: 240px;
  border-radius: 12px;
  background: transparent;
}

.inspiration-empty {
  grid-column: 1 / -1;
  min-height: 240px;
}

.history-filters:empty {
  display: none;
}

.logo-style-grid button.active {
  color: var(--primary);
}

.logo-style-grid i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-style: normal;
}

.logo-style-grid button::before {
  content: "";
  grid-row: 1;
  grid-column: 1;
  align-self: stretch;
  justify-self: stretch;
  border-radius: 12px;
  background: #ebedef;
}

.logo-style-grid button.active::before {
  border: 3px solid var(--primary);
  background: var(--primary-soft);
}

.logo-style-grid button > i {
  grid-row: 1;
  grid-column: 1;
  z-index: 1;
  overflow: hidden;
  border-radius: 12px;
}

.style-brush::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 5px;
  width: 11px;
  height: 42px;
  border-radius: 8px;
  background: currentColor;
  transform: rotate(45deg);
}

.style-brush::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 5px;
  width: 23px;
  height: 16px;
  border: 6px solid currentColor;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  transform: rotate(-28deg);
}

.style-english::before {
  width: 45px;
  height: 45px;
  border-width: 5px;
  font-size: 37px;
  font-weight: 400;
}

.style-chinese::before {
  content: "文A";
  font-size: 43px;
  font-weight: 400;
}

.style-letters::before {
  content: "ABC";
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -1px;
}

.style-transform::before {
  content: "Tt";
  font-size: 44px;
  font-weight: 400;
  letter-spacing: -2px;
}

.style-industry::before {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 8px;
  width: 42px;
  height: 32px;
  border: 5px solid currentColor;
  clip-path: polygon(0 38%, 32% 38%, 32% 15%, 52% 15%, 52% 0, 100% 22%, 100% 100%, 0 100%);
}

.style-cartoon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 44px;
  height: 44px;
  border: 5px solid currentColor;
  border-radius: 50%;
}

.style-cartoon::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 24px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 16px 0 0 currentColor, 8px 11px 0 -1px currentColor;
}

.logo-style-grid strong {
  grid-row: 2;
  grid-column: 1;
  min-height: 42px;
  color: #4d4858;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
}

.logo-style-grid button.active strong {
  color: var(--primary);
  font-weight: 400;
}

.generator-form {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.generator-form label {
  display: grid;
  gap: 12px;
  color: #16131f;
  font-size: 14px;
  font-weight: 400;
}

.generator-form input,
.generator-form textarea {
  width: 100%;
  border: 1px solid #dedbe5;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #5d5668;
  font-size: 14px;
}

.generator-form input {
  height: 40px;
}

.generator-form textarea {
  min-height: 112px;
  padding-top: 12px;
  resize: vertical;
}

.generator-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.generator-form button span {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.82;
  text-decoration: none;
  white-space: nowrap;
}

.generate-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.image-model-select {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #16131f;
  font-size: 14px;
  font-weight: 400;
}

.image-model-select select {
  width: 100%;
  height: 42px;
  border: 1px solid #dedbe5;
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: #16131f;
  font-size: 13px;
}

.image-model-select select:disabled {
  color: #918b9d;
  background: #f7f6fa;
}

.generator-form button:disabled,
.font-generate:disabled {
  cursor: wait;
  opacity: 0.72;
}

.font-panel {
  display: grid;
  align-content: start;
  gap: 26px;
}

.font-control {
  display: grid;
  gap: 12px;
  color: #16131f;
  font-size: 14px;
  font-weight: 400;
}

.font-control strong {
  color: #16131f;
  font-size: 14px;
  font-weight: 400;
}

.font-control-label {
  color: #16131f;
  font-size: 14px;
  font-weight: 400;
}

.font-control input {
  width: 100%;
  height: 40px;
  border: 1px solid #dedbe5;
  border-radius: 8px;
  padding: 0 12px;
  color: #5d5668;
  font-size: 14px;
}

.font-direction {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  height: 40px;
  border: 1px solid #dedbe5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.font-direction button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4d4858;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
}

.font-direction button + button {
  border-left: 1px solid #eceaf1;
}

.font-direction button.active {
  background: #fbf8ff;
  color: var(--primary);
}

.font-direction button span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #dedbe5;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
}

.font-direction button.active span {
  border-color: var(--primary);
  background: var(--primary);
}

.font-direction i {
  color: #77727f;
  font-style: normal;
}

.font-direction button.active i {
  color: var(--primary);
}

.font-effect-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 8px;
  background: #f4f4f5;
  padding: 3px;
}

.font-effect-tabs button {
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8c8894;
  font-size: 14px;
  font-weight: 400;
}

.font-effect-tabs button.active {
  background: #fff;
  color: #16131f;
  box-shadow: 0 1px 8px rgba(18, 15, 25, 0.06);
}

.font-style-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 10px;
  max-height: 395px;
  overflow: auto;
  padding-right: 4px;
}

.font-style-options button {
  display: grid;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #25212c;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
}

.font-style-options button.active .font-thumb {
  border-color: var(--primary);
  background: #fff;
  color: var(--primary);
}

.font-thumb {
  display: grid;
  place-items: center;
  height: 60px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f0f0f1;
  color: #111;
  overflow: hidden;
  font-size: 16px;
}

.font-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.font-preview img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.font-preview-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.page-generator .font-thumb img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.page-generator .font-preview-media img {
  width: 82%;
  height: 70%;
  max-width: 82%;
  max-height: 70%;
  object-fit: contain;
  object-position: center;
}

.font-style-options em {
  color: #16131f;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
}

.font-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

.font-generate-row {
  position: sticky;
  bottom: 18px;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.font-generate span {
  opacity: 0.8;
  text-decoration: none;
  white-space: nowrap;
}

.font-top-tabs {
  margin-bottom: 26px;
}

.font-filters {
  margin-bottom: 22px;
}

.font-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 16px;
}

.font-card-grid article {
  min-width: 0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.font-card-grid .font-empty {
  grid-column: 1 / -1;
  padding: 56px 16px;
  border-radius: 14px;
  background: #fff;
  color: #8a8492;
  text-align: center;
  font-size: 14px;
}

.font-preview {
  position: relative;
  display: grid;
  place-items: center;
  height: 215px;
  padding: 20px;
  overflow: hidden;
  background: #fff;
  color: #050505;
  text-align: center;
  font-size: 38px;
  line-height: 1.15;
}

.calligraphy {
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-weight: 700;
}

.modern {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  letter-spacing: 2px;
}

.art {
  font-family: "Songti SC", "STSong", serif;
  font-weight: 800;
  text-shadow: 1px 1px 0 rgba(157, 91, 255, 0.18);
}

.font-card-grid footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 16px;
  color: #16131f;
}

.font-card-grid footer strong {
  margin-right: auto;
  color: #16131f;
  font-size: 14px;
  font-weight: 600;
}

.font-card-grid footer span {
  padding: 3px 8px;
  border-radius: 5px;
  background: #f0f1f4;
  color: #8a8492;
  font-size: 14px;
}

.font-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 4px;
  color: #8a8492;
  font-size: 14px;
}

.font-pagination button {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #dedbe5;
  border-radius: 8px;
  background: #fff;
  color: #4d4858;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.font-pagination button.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.font-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.font-pagination .ellipsis {
  padding: 0 2px;
  color: #aaa3b4;
}

.font-history-empty,
.font-story-grid article {
  border-radius: 14px;
  background: #fff;
  padding: 28px;
  color: #4d4858;
}

.font-history-empty h2,
.font-story-grid h2 {
  margin: 0 0 10px;
  color: #16131f;
  font-size: 18px;
}

.font-history-empty p,
.font-story-grid p {
  margin: 0;
  color: #6f6878;
  font-size: 14px;
  line-height: 1.7;
}

.font-story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.font-story-card {
  overflow: hidden;
  padding: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.font-story-cover-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f4f5f7;
  cursor: pointer;
}

.font-story-cover-button img,
.font-story-cover-button span {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.font-story-cover-button img {
  object-fit: cover;
}

.font-story-cover-button span {
  display: grid;
  place-items: center;
  color: #16131f;
  font-size: 20px;
  font-weight: 600;
}

.font-story-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 14px 22px 18px;
}

.font-story-card footer strong {
  color: #16131f;
  font-size: 18px;
  font-weight: 600;
}

.font-story-card footer button,
.font-story-detail header button {
  border: 0;
  border-radius: 10px;
  background: #050505;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.font-story-card footer button {
  min-width: 108px;
  padding: 12px 18px;
}

.font-story-detail-mask {
  position: fixed;
  inset: 0;
  z-index: 3600;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.96);
}

.font-story-detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 44%) minmax(0, 1fr);
  gap: 36px;
  width: min(1360px, calc(100vw - 64px));
  max-height: calc(100vh - 64px);
  padding: 26px;
  border-radius: 18px;
  background: #fff;
  overflow: auto;
}

.font-story-detail-art {
  display: grid;
  min-height: 620px;
  border-radius: 12px;
  background: #f6f4ef;
  overflow: hidden;
}

.font-story-detail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.font-story-detail-art span {
  place-self: center;
  color: #16131f;
  font-size: 32px;
  font-weight: 600;
}

.font-story-detail-side {
  position: relative;
  padding: 8px 8px 20px;
}

.font-story-detail-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f3f3f5;
  color: #4d4858;
  font-size: 18px;
  cursor: pointer;
}

.font-story-detail header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-right: 48px;
}

.font-story-detail header h2 {
  margin: 0 0 42px;
  color: #050505;
  font-size: 34px;
  line-height: 1.2;
}

.font-story-detail header button {
  min-width: 138px;
  padding: 14px 24px;
  font-size: 16px;
}

.font-story-detail h3 {
  margin: 0 0 16px;
  color: #16131f;
  font-size: 20px;
  font-weight: 600;
}

.font-story-detail p {
  margin: 0 0 32px;
  color: #4d4858;
  font-size: 14px;
  line-height: 2;
}

.font-story-inspiration {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 18px;
}

.font-story-inspiration img {
  width: 100%;
  height: 260px;
  border-radius: 2px;
  object-fit: cover;
}

.font-story-arrows {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.font-story-arrows button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #d0d0d0;
  color: #fff;
  font-size: 24px;
}

.generator-history {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 48px 60px;
  background: #f6f7f9;
}

.history-tabs {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 -48px 18px;
  min-height: 64px;
  padding: 14px 48px 12px;
  background: #f6f7f9;
}

.history-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #8c8894;
  font-size: 14px;
  font-weight: 400;
  line-height: 26px;
}

.history-tabs button.active {
  color: #111;
  border-bottom-color: #111;
  font-weight: 600;
}

.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 46px;
}

.generation-history-view {
  color: #15131b;
}

.history-task-block {
  margin-bottom: 44px;
}

.history-task-block:last-child {
  margin-bottom: 0;
}

.history-date {
  margin: 0 0 16px;
  color: #2c2736;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
}

.generation-history-view p {
  max-width: 1180px;
  margin: 0 0 8px;
  color: #111;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
}

.history-record-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0 0 22px;
  white-space: nowrap;
}

.history-record-meta p {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(520px, 52vw);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-record-meta span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 4px;
  background: #f1f2f4;
  color: #7c7784;
  font-size: 12px;
  white-space: nowrap;
}

.history-delete-button {
  width: 22px;
  height: 22px;
  border: 1px solid #d5d1dc;
  border-radius: 6px;
  background: #fff;
  color: #7c7784;
  font-size: 16px;
  line-height: 1;
}

.history-delete-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.history-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 22px;
}

.history-tools span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 4px;
  background: #f1f2f4;
  color: #7c7784;
  font-size: 12px;
}

.history-tools button {
  width: 16px;
  height: 16px;
  border: 1px solid #bfc1c7;
  border-radius: 3px;
  background: transparent;
}

.history-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  max-width: 1280px;
}

.history-result-grid article {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f8f9fa, #fff);
  overflow: hidden;
}

.history-result-grid article img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.history-result-pending {
  gap: 14px;
  background: #f6f7f9;
}

.history-result-pending span {
  width: 42%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 3px solid #d8dbe1;
  border-top-color: #111;
  animation: historyPendingSpin 900ms linear infinite;
}

.history-result-pending em {
  color: #706b78;
  font-size: 13px;
  font-style: normal;
}

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

.inspiration-image::after,
.font-preview::after,
.history-result-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  background: rgba(46, 46, 46, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.history-favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #4d4858;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.history-favorite-button.active {
  color: var(--primary);
}

.history-favorite-button::before {
  content: attr(data-tooltip);
  position: absolute;
  right: -4px;
  bottom: calc(100% + 8px);
  min-width: 42px;
  padding: 8px 10px;
  border-radius: 4px;
  background: #25262b;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.history-favorite-button:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.history-result-grid span {
  color: #050505;
  font-family: "Songti SC", "STSong", serif;
  font-size: 46px;
  line-height: 1;
}

.history-result-grid em {
  margin-top: 8px;
  color: #111;
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 2px;
}

.history-filters button {
  height: 34px;
  padding: 0 18px;
  border: 1px solid #dedbe5;
  border-radius: 8px;
  background: #fff;
  color: #4d4858;
  font-size: 12px;
  font-weight: 400;
}

.history-filters button.active {
  border-color: var(--primary-soft);
  background: var(--primary-soft);
  color: var(--primary);
}

.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}

.inspiration-grid article {
  min-width: 0;
}

.inspiration-image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  border: 1px solid #dedbe5;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(228, 225, 232, 0.62)),
    #f4f5f6;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.inspiration-image span {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 32px;
  color: #4b4556;
  font-size: 48px;
  font-weight: 900;
}

.inspiration-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inspiration-image:hover {
  border-color: transparent;
  box-shadow: none;
}

.history-result-card:hover {
  box-shadow: none;
}

.inspiration-image:hover::after,
.font-preview:hover::after,
.history-result-card:hover::after {
  opacity: 1;
}

.inspiration-actions {
  position: absolute;
  z-index: 4;
  inset: 8px;
  display: grid;
  place-content: center;
  gap: 10px;
  border-radius: 12px;
  background: rgba(46, 46, 46, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.preview-view-button {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: 160px;
  height: 45px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #16131f;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  font-size: 18px;
  font-weight: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, color 160ms ease;
}

.preview-view-button.inline-preview {
  position: static;
  inset: auto;
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.inspiration-actions.bottom-actions {
  inset: auto 12px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 0;
  background: transparent;
}

.inspiration-actions.logo-reference-actions {
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  place-content: center;
  justify-items: center;
  gap: 12px;
  border-radius: 12px;
}

.inspiration-actions.single-action {
  grid-template-columns: max-content;
}

.inspiration-image:hover .inspiration-actions,
.inspiration-image:hover .preview-view-button {
  opacity: 1;
  pointer-events: auto;
}

.font-preview:hover .inspiration-actions,
.font-preview:hover .preview-view-button {
  opacity: 1;
  pointer-events: auto;
}

.history-result-card:hover .inspiration-actions,
.history-result-card:hover .preview-view-button {
  opacity: 1;
  pointer-events: auto;
}

.inspiration-actions button {
  width: 88px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #16131f;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  font-size: 12px;
  font-weight: 400;
}

.inspiration-actions.bottom-actions button {
  flex: 0 0 64px;
  width: 64px;
  max-width: 64px;
  height: 26px;
  padding: 0 4px;
  overflow: hidden;
  border-radius: 7px;
  font-size: 11px;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-generator .generator-history .inspiration-actions.bottom-actions button {
  flex-basis: 64px;
  width: 64px;
  max-width: 64px;
  height: 26px;
  padding: 0 4px;
  font-size: 11px;
  line-height: 26px;
}

.inspiration-actions.logo-reference-actions .preview-view-button {
  width: 160px;
  height: 45px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 400;
}

.inspiration-actions button:hover,
.preview-view-button:hover {
  color: var(--primary);
}

.inspiration-grid article:nth-child(2) .inspiration-image,
.inspiration-grid article:nth-child(5) .inspiration-image {
  background: linear-gradient(135deg, #80758e, #b6a6cf);
}

.inspiration-grid article:nth-child(3) .inspiration-image span {
  color: transparent;
  background: linear-gradient(135deg, #19c9ff 0 45%, #ff54b5 55% 100%);
  clip-path: polygon(50% 0, 100% 40%, 70% 100%, 50% 60%, 30% 100%, 0 40%);
}

.inspiration-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.inspiration-meta strong {
  color: #16131f;
  font-size: 20px;
  font-weight: 900;
}

.inspiration-meta em {
  padding: 5px 12px;
  border-radius: 7px;
  background: #eef0f3;
  color: #5d5668;
  font-size: 14px;
  font-style: normal;
}

.stitch-local-page {
  width: min(1400px, calc(100vw - 64px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 42px 0 80px;
}

.designer-page {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
}

.tool-sidebar,
.designer-workspace,
.login-card {
  border: 1px solid #e6e3ed;
  background: #fff;
}

.tool-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
}

.tool-sidebar button {
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4d4858;
  font-weight: 800;
}

.tool-sidebar .active {
  background: var(--primary-soft);
  color: var(--primary);
}

.designer-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 30px;
}

.upload-canvas {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 560px;
  border: 1px dashed #d8d3e3;
  background: #fafafe;
  text-align: center;
}

.upload-canvas span {
  color: var(--primary);
  font-size: 76px;
  line-height: 1;
}

.upload-canvas strong {
  margin-top: 12px;
  font-size: 28px;
}

.upload-canvas p,
.login-card p {
  color: #6c6674;
}

.designer-workspace aside,
.login-card {
  display: grid;
  align-content: start;
  gap: 20px;
}

.designer-workspace h1,
.login-card h1 {
  margin: 0;
  font-size: 34px;
}

.designer-workspace label,
.login-card label {
  display: grid;
  gap: 10px;
  font-weight: 900;
}

.designer-workspace textarea,
.login-card input {
  border: 1px solid #dedbe5;
  border-radius: 10px;
  padding: 14px 16px;
}

.designer-workspace textarea {
  min-height: 180px;
  resize: vertical;
}

.designer-workspace aside > button,
.login-submit {
  height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.ai-edit-page {
  position: relative;
  display: block;
  min-height: calc(100vh - 72px);
  background: linear-gradient(180deg, #fff 0, #f5faff 100%);
}

.ai-tool-nav {
  position: fixed;
  left: 34px;
  top: 50%;
  z-index: 30;
  display: grid;
  gap: 2px;
  width: 74px;
  transform: translateY(-50%);
  padding: 10px 7px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(28, 31, 40, 0.12);
}

.ai-tool-nav button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 64px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #35383f;
  font-size: 12px;
  padding: 5px 0;
}

.ai-tool-nav button.active {
  border-color: #d7d7dc;
  background: #f7f7f8;
}

.ai-tool-nav .quick-icon {
  margin-top: 0;
}

.ai-tool-nav .tool-svg {
  width: 24px;
  height: 24px;
  color: #333639;
}

.ai-tool-nav .tool-svg::before,
.ai-tool-nav .tool-svg::after {
  content: none !important;
}

.ai-tool-nav .tool-svg svg {
  display: block;
  width: 24px;
  height: 24px;
}

.ai-tool-nav button span {
  font-size: 12px;
  line-height: 16px;
}

.ai-edit-history {
  margin: 28px 0 0 32px;
  width: 104px;
  min-height: 760px;
  padding: 22px 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(21, 24, 32, 0.08);
  text-align: center;
}

.ai-edit-history button {
  width: 84px;
  height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 28px;
}

.ai-edit-history i {
  display: block;
  width: 32px;
  height: 5px;
  margin: 14px auto 28px;
  border-radius: 999px;
  background: #ddd;
}

.ai-edit-history span {
  color: #333;
  font-size: 16px;
}

.ai-edit-stage {
  width: 100%;
  min-width: 0;
}

.ai-edit-top {
  display: flex;
  align-items: center;
  height: 62px;
  padding: 0 36px;
  border-bottom: 1px solid #e7e7ea;
  color: #222;
}

.ai-edit-top .home-link {
  margin-right: 16px;
  color: #222;
  font-size: 24px;
}

.ai-edit-top > a:last-child {
  margin-left: auto;
  color: var(--primary);
  font-size: 14px;
}

.ai-edit-hero {
  display: grid;
  justify-items: center;
  padding: 46px 0 28px;
}

.ai-edit-hero h1 {
  margin: 0;
  color: #1f2026;
  font-size: 34px;
  line-height: 1.2;
}

.ai-edit-hero p {
  margin: 22px 0 74px;
  color: #444;
  font-size: 22px;
}

.ai-edit-hero p span {
  color: var(--primary);
  font-weight: 700;
}

.ai-edit-prompt {
  width: min(1080px, calc(100vw - 420px));
  min-height: 190px;
  padding: 28px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(24, 29, 38, 0.12);
}

.ai-edit-prompt textarea {
  display: block;
  width: 100%;
  min-height: 82px;
  border: 0;
  outline: 0;
  resize: vertical;
  color: #333;
  font-size: 18px;
  line-height: 1.7;
}

.ai-edit-prompt textarea::placeholder {
  color: #b6b6bb;
}

.prompt-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.prompt-actions button,
.upload-inline,
.model-select,
.source-actions button,
.source-actions label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border: 1px solid #e1e1e6;
  border-radius: 9px;
  background: #fff;
  color: #222;
  font-size: 16px;
  cursor: pointer;
}

.upload-inline input,
.source-actions input {
  display: none;
}

.prompt-icon {
  width: 22px;
  height: 22px;
  margin-right: 8px;
}

.model-select {
  position: relative;
  padding-right: 14px;
}

.model-select select {
  min-width: 128px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #222;
  appearance: none;
  cursor: pointer;
}

.model-select::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-right: 1.5px solid #333;
  border-bottom: 1.5px solid #333;
  transform: rotate(45deg) translateY(-2px);
}

.prompt-actions small {
  margin-left: auto;
  color: #aaa;
  font-size: 14px;
}

.send-edit {
  width: 46px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #d8d8dc !important;
  color: #fff !important;
}

.ai-source-panel {
  width: min(1540px, calc(100vw - 260px));
  min-height: 420px;
  margin: 28px auto 0;
  padding: 56px;
  border: 1px dashed #d7d7dc;
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.ai-source-panel h2,
.quick-edit-tools h2,
.edit-result-panel h2 {
  margin: 0 0 24px;
  color: #222;
  font-size: 26px;
}

.source-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.source-actions button,
.source-actions label {
  width: 220px;
  height: 60px;
  border: 1px solid #111;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 700;
}

.source-actions label {
  background: #050505;
  color: #fff;
}

.ai-source-panel p {
  margin: 32px 0 28px;
  color: #888;
}

.source-thumbs {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.source-thumb {
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  border: 2px solid transparent;
  border-radius: 9px;
  background: linear-gradient(135deg, #f3f4f8, #dfe7ff);
  color: #333;
}

.source-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(157, 91, 255, 0.12);
}

.source-thumb b {
  font-size: 22px;
}

.source-thumb span {
  color: #6b6576;
  font-size: 13px;
}

.quick-edit-tools,
.edit-result-panel {
  width: min(1540px, calc(100vw - 260px));
  margin: 0 auto;
}

.quick-edit-tools {
  padding: 72px 0 92px;
}

.template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.template-head h1 {
  margin: 0;
  color: #222;
  font-size: 28px;
  font-weight: 700;
}

.template-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid #111;
  border-radius: 7px;
  background: #fff;
  color: #111;
  font-size: 16px;
  cursor: pointer;
}

.template-upload input {
  display: none;
}

.template-upload img {
  width: 18px;
  height: 18px;
}

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

.template-card {
  display: grid;
  gap: 12px;
  padding: 0 0 18px;
  border: 1px solid #e6e7ee;
  border-radius: 18px;
  background: #fff;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(26, 30, 44, 0.06);
  cursor: pointer;
}

.template-card:hover {
  border-color: var(--primary);
  box-shadow: 0 16px 38px rgba(157, 91, 255, 0.16);
  transform: translateY(-2px);
}

.template-card img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
  background: #f5f6f9;
}

.template-card strong {
  padding: 0 22px;
  color: #222;
  font-size: 22px;
  font-weight: 700;
}

.template-card span {
  min-height: 44px;
  padding: 0 22px;
  color: #7a7f8f;
  font-size: 15px;
  line-height: 1.5;
}

.quick-icon {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  color: currentColor;
  border: 0;
  border-radius: 0;
}

.quick-icon::before,
.quick-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.image-clear::before,
.cutout::before {
  left: 4px;
  top: 7px;
  width: 25px;
  height: 21px;
  border: 3px solid currentColor;
  border-radius: 4px;
}

.image-clear::after {
  right: 0;
  top: 0;
  width: 12px;
  height: 12px;
  border-top: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.eraser::before {
  left: 6px;
  top: 7px;
  width: 24px;
  height: 14px;
  border: 3px solid currentColor;
  border-radius: 4px;
  transform: rotate(-45deg);
}

.eraser::after {
  left: 5px;
  bottom: 4px;
  width: 26px;
  border-bottom: 3px solid currentColor;
}

.cutout::after {
  inset: 2px;
  border: 3px dashed currentColor;
  border-radius: 6px;
}

.expand::before {
  inset: 6px;
  border: 0;
  box-shadow:
    -3px -3px 0 0 currentColor,
    3px -3px 0 0 currentColor,
    -3px 3px 0 0 currentColor,
    3px 3px 0 0 currentColor;
}

.expand::after {
  inset: 4px;
  border: 3px solid currentColor;
  border-color: currentColor transparent transparent currentColor;
  transform: rotate(45deg);
}

.magic::before {
  left: 10px;
  top: 9px;
  width: 22px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-45deg);
}

.magic::after {
  right: 1px;
  top: 1px;
  width: 12px;
  height: 12px;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  background: currentColor;
}

.vector::before {
  inset: 5px;
  border: 3px solid currentColor;
}

.vector::after {
  inset: 2px;
  background:
    radial-gradient(circle, currentColor 0 3px, transparent 4px) 0 0 / 28px 28px,
    radial-gradient(circle, currentColor 0 3px, transparent 4px) 28px 28px / 28px 28px;
}

.operation-topbar {
  display: grid;
  grid-template-columns: 180px 1fr 190px;
  align-items: center;
  height: 48px;
  border-bottom: 1px solid #dedede;
  background: #fff;
}

.operation-topbar button,
.operation-topbar label {
  border: 0;
  background: transparent;
  color: #111;
  font-size: 14px;
}

.operation-topbar > button {
  justify-self: start;
  margin-left: 36px;
}

.operation-topbar nav {
  display: flex;
  justify-content: center;
  gap: 42px;
}

.operation-topbar label input {
  display: none;
}

.operation-topbar > div {
  display: flex;
  justify-content: end;
  padding-right: 28px;
}

.operation-topbar > div button {
  width: 108px;
  height: 34px;
  border: 1px solid #111;
  border-radius: 5px;
}

.operation-topbar > div button {
  background: #050505;
  color: #fff;
}

.operation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 54px;
  height: calc(100vh - 48px - 74px - 26px);
  min-height: 0;
  padding: 20px 26px 0 94px;
}

.operation-canvas {
  display: grid;
  place-items: center;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.operation-image {
  display: block;
  max-width: min(760px, 72vw);
  max-height: calc(100vh - 48px - 74px - 104px);
  object-fit: contain;
}

.mock-image {
  position: relative;
  display: grid;
  place-items: center;
  width: min(620px, 58vw);
  height: min(620px, calc(100vh - 48px - 74px - 104px));
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0,0,0,.08), transparent 32%, transparent 68%, rgba(0,0,0,.55)),
    linear-gradient(180deg, #d7d0ca, #fff 40%, #f0e5d9);
}

.mock-image span {
  position: absolute;
  top: 28px;
  color: rgba(0, 0, 0, 0.38);
}

.mock-image strong {
  color: rgba(130, 82, 160, 0.82);
  font-family: Georgia, serif;
  font-size: 68px;
  font-weight: 400;
}

.cutout-mode .mock-image {
  background:
    linear-gradient(45deg, #eee 25%, transparent 25%) 0 0/40px 40px,
    linear-gradient(-45deg, #eee 25%, transparent 25%) 0 20px/40px 40px,
    #fff;
}

.expand-mode .mock-image {
  outline: 8px solid #c7c7ca;
  outline-offset: 22px;
}

.operation-record {
  height: min(470px, calc(100vh - 48px - 74px - 104px));
  min-height: 320px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(28, 31, 40, 0.1);
}

.operation-record header {
  display: grid;
  grid-template-columns: 1fr 1fr 46px;
  height: 52px;
}

.operation-record header > * {
  display: grid;
  place-items: center;
}

.operation-record b {
  background: #fff;
}

.operation-record span,
.operation-record i {
  background: #f5f5f6;
  color: #888;
  font-style: normal;
}

.operation-record div {
  display: grid;
  place-items: center;
  min-height: 0;
  height: calc(100% - 52px);
}

.operation-record em {
  width: 150px;
  height: 110px;
  border-radius: 50%;
  background: #f3f3f3;
}

.operation-record p {
  margin-top: -150px;
}

.operation-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  font-size: 14px;
}

.operation-controls button,
.operation-controls input {
  height: 40px;
  border: 1px solid #e0e0e5;
  border-radius: 6px;
  background: #fff;
  padding: 0 26px;
  font-size: 14px;
}

.operation-controls button.active {
  background: #fff;
  box-shadow: 0 0 0 5px #f1f1f5;
}

.operation-controls .primary {
  min-width: 180px;
  border-color: #050505;
  background: #050505;
  color: #fff;
}

.operation-controls em {
  color: #bbb;
  font-size: 13px;
  font-style: normal;
}

.edit-result-panel {
  padding-bottom: 80px;
}

.edit-before-after {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.edit-before-after div {
  display: grid;
  place-items: center;
  min-height: 220px;
  border-radius: 18px;
  background: #f0f2f7;
  color: #777;
}

.edit-before-after.has-result div:last-child {
  background: linear-gradient(135deg, var(--primary-soft), #f6f9ff);
  color: var(--primary);
}

.edit-result-panel p {
  color: #7b7f8f;
}

.login-page {
  display: grid;
  place-items: start center;
  min-height: calc(100vh - 72px);
  padding: 72px 24px;
  background:
    radial-gradient(circle at 16% 20%, rgba(157, 91, 255, 0.12), transparent 30%),
    radial-gradient(circle at 80% 12%, rgba(157, 91, 255, 0.10), transparent 28%),
    #f8f9fc;
}

.login-card {
  width: min(430px, calc(100vw - 48px));
  max-width: 100%;
  padding: 34px 36px 30px;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(36, 28, 48, 0.10);
}

.login-logo {
  display: grid;
  justify-items: start;
  gap: 4px;
  width: fit-content;
  margin-bottom: 12px;
  border: 0;
  background: transparent;
  text-align: left;
}

.login-logo strong {
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}

.login-logo span {
  color: #4b4657;
  font-size: 11px;
  line-height: 1;
}

.login-card p,
.login-card small {
  color: #8c8794;
  font-size: 13px;
}

.login-card label div {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 10px;
}

.login-card label div button {
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  font-weight: 400;
}

.login-card label {
  font-size: 14px;
  font-weight: 400;
}

.login-card input {
  height: 44px;
  border-radius: 8px;
  font-size: 14px;
}

.login-card h1 {
  font-size: 28px;
}

.login-submit {
  height: 46px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.account-center-page {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 22px 28px;
  width: min(1280px, calc(100vw - 80px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 24px 0 80px;
  color: #20242d;
}

.account-center-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
}

.account-center-top strong {
  font-size: 28px;
  line-height: 1.2;
}

.account-center-top button,
.profile-line button {
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
}

.account-center-top button {
  height: 36px;
  padding: 0 16px;
}

.account-sidebar,
.account-center-content {
  border: 1px solid #eeeaf5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(27, 30, 42, 0.06);
}

.account-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.account-sidebar button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3a3445;
  font-size: 14px;
  text-align: left;
}

.account-sidebar button.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.account-center-content {
  min-width: 0;
  padding: 28px 32px 34px;
}

.account-center-content h1 {
  margin: 0 0 26px;
  font-size: 24px;
}

.profile-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.profile-avatar-wrap .member-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.profile-avatar-wrap em {
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef0f7;
  color: #71798b;
  font-size: 12px;
  font-style: normal;
}

.profile-lines {
  display: grid;
  border-top: 1px solid #f0edf6;
}

.profile-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  border-bottom: 1px solid #f0edf6;
}

.profile-line div {
  display: flex;
  align-items: center;
  min-width: 0;
}

.profile-line strong {
  flex: 0 0 90px;
  font-size: 14px;
}

.profile-line span {
  min-width: 0;
  overflow: hidden;
  color: #5f6472;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-line button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.account-tabs,
.account-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.account-tabs button,
.account-subtabs button {
  height: 34px;
  padding: 0 18px;
  border: 1px solid #e2deeb;
  border-radius: 8px;
  background: #fff;
  color: #4d465a;
  font-size: 14px;
}

.account-tabs button.active,
.account-subtabs button.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.account-favorite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  color: #64606d;
  font-size: 14px;
}

.account-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: 12px;
  background: #fafafd;
  color: #888;
}

.account-empty span {
  width: 96px;
  height: 70px;
  border-radius: 50%;
  background: #eee;
}

.account-empty p {
  margin: -80px 0 0;
  font-size: 14px;
}

.account-favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}

.account-favorite-card {
  min-width: 0;
}

.favorite-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #eeeaf5;
  border-radius: 12px;
  background: #fafafd;
}

.favorite-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.favorite-thumb span {
  color: #8c8798;
  font-size: 14px;
}

.account-favorite-card footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: center;
  padding-top: 10px;
  font-size: 14px;
}

.account-favorite-card strong {
  min-width: 0;
  overflow: hidden;
  color: #20242d;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-favorite-card footer span,
.account-favorite-card footer em {
  border-radius: 6px;
  background: #f1eff7;
  color: #6d6678;
  font-size: 12px;
  font-style: normal;
}

.account-favorite-card footer span {
  padding: 3px 7px;
}

.account-favorite-card footer em {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 3px 7px;
}

.favorite-thumb:hover .inspiration-actions {
  opacity: 1;
  pointer-events: auto;
}

.account-table-head,
.points-row {
  display: grid;
  grid-template-columns: 1fr 1fr 100px minmax(180px, 1.4fr) minmax(160px, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid #f0edf6;
  color: #555b66;
  font-size: 14px;
}

.account-table-head,
.points-row.head {
  color: #1f2430;
  font-weight: 700;
}

.points-row .plus {
  color: var(--primary);
}

.points-row .minus {
  color: #f05656;
}

.invite-panel {
  display: grid;
  gap: 20px;
}

.invite-link-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #eeeaf5;
  border-radius: 12px;
  background: #faf8ff;
}

.invite-link-card strong {
  font-size: 16px;
}

.invite-link-card p {
  margin: 6px 0 0;
  color: #6d6678;
  font-size: 14px;
}

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

.invite-copy-row input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #ded8eb;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.invite-copy-row button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
}

.account-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  font-size: 14px;
}

.account-pagination button {
  min-width: 30px;
  height: 30px;
  border: 1px solid #e2deeb;
  border-radius: 6px;
  background: #fff;
}

.account-pagination button.active {
  border-color: var(--primary);
  color: var(--primary);
}

.wechat-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border: 1px solid #e2deeb;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 14px;
}

.verify-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}

.verify-modal {
  width: min(520px, calc(100vw - 48px));
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(17, 24, 39, 0.24);
}

.verify-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid #eef0f5;
}

.verify-modal h2 {
  margin: 0;
  color: #1f2430;
  font-size: 20px;
}

.verify-modal header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8c8d96;
  font-size: 22px;
}

.verify-modal-body {
  display: grid;
  gap: 16px;
  padding: 22px 24px;
  color: #343741;
  font-size: 14px;
}

.verify-modal-body label {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.verify-modal-body input,
.verify-modal-body select {
  height: 40px;
  border: 1px solid #ded9ea;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #343741;
  font: inherit;
}

.verify-modal-body p {
  margin: 0;
  color: #8b8c94;
  font-size: 13px;
}

.verify-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #eef0f5;
}

.verify-modal footer button {
  min-width: 104px;
  height: 40px;
  border: 1px solid #d7d2e3;
  border-radius: 8px;
  background: #fff;
  color: #343741;
  font-size: 14px;
}

.verify-modal footer button:last-child {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.nickname-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 340;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.38);
}

.nickname-modal {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(560px, calc(100vw - 48px));
  min-height: 360px;
  padding: 108px 64px 48px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(20, 16, 32, 0.18);
}

.nickname-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #102044;
  font-size: 26px;
  line-height: 1;
}

.nickname-modal h2 {
  margin: 0 0 48px;
  color: #34323a;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
}

.nickname-modal label {
  position: relative;
  width: min(420px, 100%);
}

.nickname-modal input {
  width: 100%;
  height: 52px;
  border: 2px solid #151515;
  border-radius: 10px;
  padding: 0 44px 0 16px;
  background: #fff;
  color: #323238;
  font: inherit;
  font-size: 18px;
  outline: 3px solid rgba(15, 20, 28, 0.12);
}

.nickname-modal label button {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: #c6c6c6;
  color: #fff;
  font-size: 16px;
  line-height: 20px;
}

.nickname-submit {
  width: min(420px, 100%);
  height: 52px;
  margin-top: 22px;
  border: 0;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-size: 18px;
  font-weight: 400;
}

.wechat-login-modal {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
}

.wechat-login-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(360px, calc(100vw - 40px));
  padding: 34px;
  border-radius: 18px;
  background: #fff;
}

.wechat-login-card > button:not(.modal-x) {
  height: 42px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.member-page {
  min-height: calc(100vh - 72px);
  background: #fff;
  color: #14213d;
}

.member-hero {
  background: #f8f9fb;
}

.member-hero-inner {
  display: grid;
  grid-template-columns: 360px minmax(220px, 1fr) repeat(3, 160px);
  align-items: center;
  gap: 34px;
  width: min(1250px, calc(100vw - 80px));
  min-height: 260px;
  margin: 0 auto;
}

.member-title h1 {
  margin: 0 0 14px;
  color: #111;
  font-size: 28px;
  line-height: 1.2;
}

.member-title p,
.member-profile span,
.member-stat span,
.member-stat em {
  color: #9a9a9a;
  font-size: 12px;
  font-weight: 400;
}

.member-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.member-profile .member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 10px;
}

.member-profile div {
  display: grid;
  gap: 6px;
}

.member-profile strong {
  color: #111;
  font-size: 14px;
}

.member-profile button {
  width: 78px;
  height: 28px;
  border: 1px solid #cfd4dd;
  border-radius: 14px;
  background: #fff;
  color: #606776;
  font-size: 12px;
}

.member-stat {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.member-stat b {
  color: #6646ff;
  font-size: 26px;
  font-weight: 500;
}

.member-stat em {
  font-style: normal;
  line-height: 1.5;
  text-align: center;
}

.member-shop {
  width: min(1280px, calc(100vw - 80px));
  margin: 42px auto 80px;
}

.member-tabs {
  display: grid;
  grid-template-columns: repeat(2, 160px);
  justify-content: center;
  width: 320px;
  height: 44px;
  margin: 0 auto 46px;
  padding: 4px;
  border-radius: 10px;
  background: #f5f5f5;
}

.member-tabs button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8c8c8c;
  font-size: 14px;
}

.member-tabs button.active {
  background: #fff;
  color: #111;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.member-plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.member-plan,
.points-plans article {
  position: relative;
  display: grid;
  align-content: start;
  gap: 20px;
  min-height: 520px;
  padding: 34px 34px 28px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(17, 24, 39, 0.08);
}

.member-plan h2,
.points-plans h2 {
  margin: 0;
  color: #15284a;
  font-size: 20px;
}

.member-plan p,
.points-plans p,
.member-note {
  margin: 0;
  color: #65708a;
  font-size: 14px;
  line-height: 1.7;
}

.plan-ribbon {
  position: absolute;
  top: -12px;
  right: -1px;
  padding: 6px 16px;
  border-radius: 14px 14px 0 14px;
  background: linear-gradient(90deg, #ff8a1d, #ff253a);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-height: 72px;
  color: #2a2d34;
}

.plan-price small,
.plan-price span {
  color: #222;
  font-size: 14px;
}

.plan-price strong {
  color: #2a2d34;
  font-size: 44px;
  font-weight: 900;
}

.member-plan > button,
.points-plans button {
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff8a1d, #ff253a);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.member-plan > button.dark {
  background: #111827;
}

.member-plan ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-plan li {
  position: relative;
  padding-left: 24px;
  color: #263553;
  font-size: 14px;
  line-height: 1.5;
}

.member-plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff0ed;
  color: #ff5b42;
  font-size: 10px;
}

.points-plans {
  display: grid;
  grid-template-columns: repeat(3, 300px);
  justify-content: center;
  gap: 18px;
}

.points-plans article {
  min-height: 320px;
}

.points-plans em {
  position: absolute;
  right: 0;
  top: 0;
  padding: 6px 16px;
  border-radius: 0 12px 0 12px;
  background: #faf6ff;
  color: var(--primary);
  font-size: 12px;
  font-style: normal;
}

.points-plans article > div {
  text-align: center;
}

.points-plans small {
  font-size: 14px;
}

.points-plans strong {
  color: #000;
  font-size: 42px;
  font-weight: 900;
}

.points-plans b {
  justify-self: center;
  padding: 8px 20px;
  border-radius: 999px;
  background: #f7f7f7;
  color: #111;
  font-size: 16px;
}

.points-plans span,
.member-note {
  color: #999;
  text-align: center;
}

.redeem-link {
  display: block;
  margin: 42px auto 0;
  border: 0;
  border-bottom: 1px solid #111;
  background: transparent;
  color: #111;
  font-size: 14px;
}

.member-note {
  max-width: 720px;
  margin: 90px auto 0;
}

.member-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
}

.member-modal-card {
  position: relative;
  width: 790px;
  max-width: calc(100vw - 80px);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.member-modal-close {
  position: absolute;
  right: -22px;
  top: 0;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  font-size: 24px;
}

.member-modal-card header {
  display: flex;
  justify-content: space-between;
  padding: 28px 36px 14px;
}

.member-modal-card header h2 {
  margin: 0;
  color: #13244a;
  font-size: 26px;
}

.member-modal-card header strong {
  color: #ff4d24;
  font-size: 20px;
  line-height: 1.2;
}

.member-duration {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 0 36px 24px;
}

.member-duration article {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 28px 18px 18px;
  border: 1px solid #eee;
  border-radius: 12px;
}

.member-duration article.active {
  border-color: #ff342f;
  background: #fff8f8;
}

.member-duration em {
  position: absolute;
  right: -8px;
  top: -12px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #ff7651;
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.member-duration h3 {
  margin: 0;
  font-size: 20px;
}

.member-duration strong {
  color: #14213d;
  font-size: 34px;
}

.member-duration p {
  margin: 0;
  color: #999;
  font-size: 12px;
}

.member-duration button {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #f1f1f1;
  color: #14213d;
  font-weight: 700;
}

.member-duration .active button {
  background: linear-gradient(90deg, #ff8a1d, #ff253a);
  color: #fff;
}

.member-pay-body {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 40px;
  padding: 0 36px 28px;
}

.member-order-detail {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #eceff5;
  border-radius: 12px;
  background: #fbfcff;
}

.member-order-detail h3 {
  margin: 0;
  font-size: 16px;
}

.member-order-detail p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  color: #71809d;
}

.member-order-detail p:last-of-type {
  padding-top: 12px;
  border-top: 1px solid #e6e9f0;
  color: #13244a;
}

.member-order-detail button {
  height: 46px;
  border: 1px solid #d9dee8;
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.member-order-detail button span {
  float: right;
  color: #999;
}

.member-pay-code {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.member-pay-code > div:first-child {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 220px;
  border-radius: 10px;
  background: #f3f3f3;
  overflow: hidden;
}

.member-pay-code button {
  height: 42px;
  border: 0;
  background: transparent;
}

.member-pay-code button.active {
  background: #fff;
}

.qr-pattern {
  width: 170px;
  height: 170px;
  border: 12px solid #fff;
  background:
    repeating-linear-gradient(90deg, #000 0 8px, #fff 8px 16px),
    repeating-linear-gradient(#000 0 8px, #fff 8px 16px);
  background-blend-mode: difference;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.member-modal-card footer {
  padding: 18px;
  background: #f8f8f8;
  color: #7d8798;
  text-align: center;
}

.points-rules-mask {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}

.points-rules-modal {
  width: min(720px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(20, 20, 30, 0.22);
}

.points-rules-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 26px;
  border-bottom: 1px solid #eef0f5;
}

.points-rules-modal h2 {
  margin: 0;
  color: #20222a;
  font-size: 20px;
  line-height: 1;
}

.points-rules-modal header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8c8f99;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.points-rules-modal header button:hover {
  background: #f5f1ff;
  color: var(--purple);
}

.points-rules-body {
  display: grid;
  gap: 28px;
  max-height: calc(100vh - 144px);
  overflow: auto;
  padding: 24px 30px 30px;
  color: #343741;
  font-size: 14px;
  line-height: 1.8;
}

.points-rules-body article {
  display: grid;
  gap: 14px;
}

.points-rules-body h3 {
  margin: 0;
  color: #20222a;
  font-size: 15px;
  line-height: 1.4;
}

.points-rules-body p {
  margin: 0;
  white-space: pre-wrap;
}

.pay-methods {
  display: flex;
  gap: 16px;
}

.pay-methods button {
  display: grid;
  gap: 5px;
  min-width: 176px;
  min-height: 62px;
  padding: 10px 16px;
  border: 1px solid #ddd;
  background: #fff;
  text-align: left;
}

.pay-methods button b {
  font-size: 15px;
}

.pay-methods button span {
  color: #888;
  font-size: 12px;
}

.pay-methods .active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.qr-box {
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
}

.qr-box i {
  width: 138px;
  height: 138px;
  background:
    linear-gradient(90deg, #111 18px, transparent 18px 32px, #111 32px 50px, transparent 50px) 0 0 / 64px 64px,
    linear-gradient(#111 18px, transparent 18px 32px, #111 32px 50px, transparent 50px) 0 0 / 64px 64px,
    #f7f7f7;
}

.qr-box span {
  margin-top: 8px;
  color: #555;
}

.settlement {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: #fff;
  box-shadow: 0 -5px 18px rgba(0, 0, 0, 0.08);
}

.settlement-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 36px;
  width: min(1700px, calc(100vw - 300px));
  height: 72px;
  margin: 0 auto;
}

.settlement strong {
  color: var(--primary);
  font-size: 24px;
}

.settlement button {
  width: 180px;
  height: 48px;
  font-size: 18px;
}

.prev-bottom {
  margin-right: auto;
  background: #fff !important;
  color: var(--primary) !important;
}

@media (max-width: 900px) {
  .qds-header .inner,
  .qds-main,
  .site-nav-inner,
  .home-hero,
  .home-modules,
  .home-gallery,
  .generator-shell,
  .settlement-inner {
    width: calc(100vw - 32px);
  }

  .site-nav {
    height: auto;
    min-height: 72px;
    overflow: visible;
  }

  .site-nav-inner {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    gap: 8px 14px;
    width: 100%;
    min-width: 0;
    padding: 10px 16px;
  }

  .brand-lockup strong {
    font-size: 24px;
  }

  .brand-lockup span {
    font-size: 11px;
  }

  .site-nav nav {
    flex: 1 1 auto;
    width: auto;
    gap: 8px;
    margin-left: 0;
    overflow: visible;
  }

  .site-nav nav button {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .nav-actions {
    flex: 0 0 auto;
    width: auto;
    margin-left: 0;
  }

  .nav-actions .member-entry {
    flex-basis: 104px;
  }

  .nav-actions .points-entry {
    flex-basis: 72px;
  }

  .nav-actions .avatar-entry {
    flex-basis: 34px;
  }

  .member-hero-inner,
  .member-shop {
    width: calc(100vw - 32px);
  }

  .member-hero-inner {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: auto;
    padding: 28px 0;
  }

  .member-plans,
  .points-plans {
    grid-template-columns: 1fr;
  }

  .member-tabs {
    width: min(320px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-modal-card {
    width: calc(100vw - 32px);
  }

  .member-duration,
  .member-pay-body {
    grid-template-columns: 1fr;
  }

  @media (max-width: 520px) {
    body {
      padding-top: 150px;
    }

    .site-nav-inner {
      display: grid;
      grid-template-columns: 1fr;
      justify-items: stretch;
      gap: 8px;
    }

    .brand-lockup {
      justify-self: start;
    }

    .site-nav nav {
      justify-content: space-between;
      gap: 4px;
      width: 100%;
    }

    .site-nav nav button {
      flex: 1 1 0;
      min-width: 0;
      padding: 0 6px;
      font-size: 12px;
    }

    .nav-actions {
      justify-self: end;
      gap: 6px;
    }

    .nav-actions .member-entry {
      width: 88px;
      font-size: 12px;
    }

    .nav-actions .points-entry {
      width: 58px;
    }

    .member-title h1 {
      font-size: 24px;
    }

    .member-profile {
      align-items: flex-start;
    }

    .member-plan,
    .points-plans article {
      min-height: auto;
      padding: 26px 24px;
    }
  }

  .qds-steps,
  .class-grid,
  .qds-modal-grid,
  .material-grid,
  .entrust-grid,
  .confirm-grid,
  .ocr-body,
  .home-hero,
  .home-modules,
  .home-gallery,
  .gallery-grid,
  .generator-shell,
  .logo-style-grid {
    grid-template-columns: 1fr;
  }

  .title-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 16px;
  }

  .qds-steps {
    width: 100%;
    height: auto;
    gap: 8px;
  }

  .qds-step {
    min-height: 40px;
  }

  .qds-step::after {
    display: none;
  }

  .home-page,
  .generator-page {
    min-height: calc(100vh - 134px);
  }

  .home-page {
    padding: 22px 0 70px;
  }

  .home-hero {
    gap: 0;
    min-height: 0;
  }

  .home-copy {
    padding: 32px 24px;
  }

  .home-copy h1 {
    font-size: 42px;
  }

  .home-copy p {
    font-size: 16px;
  }

  .home-actions {
    flex-wrap: wrap;
  }

  .home-showcase {
    min-height: 360px;
    border-left: 0;
    border-top: 1px solid #e3e0ea;
  }

  .package-main {
    left: 28px;
    top: 42px;
    width: 220px;
    height: 220px;
  }

  .package-main strong {
    font-size: 36px;
  }

  .package-side {
    right: 24px;
    bottom: 32px;
    width: 150px;
    height: 150px;
  }

  .package-side b {
    font-size: 28px;
  }

  .home-gallery {
    gap: 20px;
    padding: 24px;
  }

  .stitch-local-page {
    width: calc(100vw - 32px);
  }

  .designer-page,
  .designer-workspace {
    grid-template-columns: 1fr;
  }

  .designer-workspace aside {
    min-width: 0;
  }

  .login-card {
    width: 100%;
  }

  .form-row,
  .modal-field,
  .upload-row,
  .contact-row {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .tab-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .tab-buttons button {
    min-width: 0;
    padding: 0 6px;
    white-space: nowrap;
  }

  .applicant-modal,
  .ocr-modal {
    width: calc(100vw - 32px);
  }
}

@media (max-width: 1200px) {
  .home-top-tools {
    grid-template-columns: 1fr;
  }

  .home-hero-service {
    grid-template-columns: 1fr;
  }

  .home-tools,
  .masonry-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .more-tools {
    writing-mode: initial;
  }

  .ai-edit-page {
    grid-template-columns: 1fr;
  }

  .ai-edit-history {
    display: none;
  }

  .ai-edit-prompt,
  .ai-source-panel,
  .quick-edit-tools,
  .edit-result-panel {
    width: calc(100vw - 48px);
  }

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

@media (max-width: 900px) {
  .home-page {
    padding: 0 0 70px;
  }

  .home-top-tools,
  .home-tool-row,
  .home-inspiration {
    width: calc(100vw - 32px);
  }

  .home-promo {
    height: auto;
    min-height: 48px;
    padding: 8px 16px;
    font-size: 15px;
    text-align: center;
  }

  .home-feature-card,
  .home-hero-service {
    min-height: 280px;
    padding: 28px 22px;
  }

  .home-visual {
    width: 160px;
    height: 160px;
  }

  .home-feature-card em {
    right: 34px;
    bottom: 42px;
  }

  .home-hero-service h1 {
    font-size: 34px;
  }

  .home-brush-card {
    display: none;
  }

  .home-tools,
  .masonry-gallery {
    grid-template-columns: 1fr;
  }

  .home-inspiration label {
    width: 100%;
  }

  .home-tags,
  .home-inspiration nav {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
  }

  .ai-edit-hero p {
    margin-bottom: 32px;
    font-size: 18px;
    text-align: center;
  }

  .ai-source-panel {
    padding: 28px;
  }

  .source-actions,
  .source-thumbs,
  .prompt-actions {
    flex-wrap: wrap;
  }

  .template-grid,
  .edit-before-after {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 820px) {
  .operation-layout {
    height: calc(100vh - 48px - 64px - 20px);
    padding-top: 12px;
  }

  .operation-image {
    max-height: calc(100vh - 48px - 64px - 88px);
  }

  .mock-image {
    width: min(520px, 54vw);
    height: min(520px, calc(100vh - 48px - 64px - 88px));
  }

  .operation-record {
    height: min(390px, calc(100vh - 48px - 64px - 88px));
    min-height: 300px;
  }

  .operation-controls {
    min-height: 64px;
  }
}

.page-generator .generator-shell {
  grid-template-columns: 96px 320px minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
}

.page-generator .generator-rail {
  grid-auto-flow: row;
  align-content: start;
  justify-content: initial;
  justify-items: center;
  gap: 14px;
  overflow: visible;
  padding: 30px 0 0;
  border-right: 1px solid #e0dde7;
  border-bottom: 0;
}

.page-generator .generator-rail button {
  width: 72px;
  height: auto;
  min-height: 60px;
  font-size: 27px;
}

.page-generator .generator-panel {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 20px 26px;
}

.page-generator .generator-history {
  min-height: 0;
  overflow-y: auto;
  padding: 0 24px 60px 48px;
}

.page-generator .history-tabs {
  margin: 0 -24px 18px -48px;
  padding: 14px 24px 12px 48px;
}

.page-generator .history-result-grid {
  column-gap: 18px;
  row-gap: 18px;
  max-width: none;
}

.page-generator .history-result-grid article,
.page-generator .history-result-grid article img {
  border-radius: 12px;
}

@media (max-width: 900px) {
  .generator-page {
    height: auto;
    min-height: calc(100vh - 72px);
    overflow: visible;
    padding: 0 0 34px;
  }

  .generator-shell,
  .page-generator .generator-shell {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .generator-panel,
  .generator-history,
  .page-generator .generator-panel,
  .page-generator .generator-history {
    overflow: visible;
  }
}

.page-generator .logo-style-grid {
  grid-template-columns: repeat(3, 76px);
  justify-content: start;
  gap: 16px 22px;
  width: 272px;
  max-width: 100%;
}

.page-generator .logo-style-grid button {
  grid-template-rows: 76px auto;
  gap: 4px;
  width: 76px;
  height: 98px;
}

.page-generator .logo-style-grid button::before {
  content: none;
}

.page-generator .logo-style-grid button > i {
  width: 76px;
  height: 76px;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.page-generator .logo-style-grid button.active > i {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.page-generator {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.page :where(p, span, label, input, select, textarea, button, a, small, em, li) {
  font-size: 14px;
}

.page :where(input, select, textarea, button) {
  line-height: 1.4;
}

.brand-lockup strong {
  font-size: 24px;
}

.brand-lockup span {
  font-size: 11px;
}

.site-nav nav button,
.nav-actions button,
.ai-tool-nav button,
.operation-topbar button,
.operation-topbar label,
.operation-controls,
.operation-controls button,
.operation-controls input,
.template-upload,
.template-card span,
.ai-edit-prompt textarea,
.prompt-actions button,
.upload-inline,
.model-select,
.model-select select,
.source-actions button,
.source-actions label {
  font-size: 14px;
}

.page-generator .generator-rail button,
.page-generator .generator-rail small,
.page-generator .logo-style-grid strong,
.page-generator .generator-form label,
.page-generator .generator-form input,
.page-generator .generator-form textarea,
.page-generator .generator-form input::placeholder,
.page-generator .generator-form textarea::placeholder {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.page-generator .logo-style-grid strong {
  font-size: 12px;
}

.page-generator .generator-panel h1 {
  margin-bottom: 18px;
  font-size: 18px;
}

.page-generator .generator-panel:not(.font-panel) h1 {
  color: #16131f;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.page-generator .generator-form {
  gap: 14px;
  margin-top: 18px;
}

.page-generator .generator-form label,
.page-generator .image-model-select,
.page-generator .font-control {
  gap: 8px;
}

.page-generator .font-panel {
  gap: 16px;
}

.page-generator .font-effect-tabs button {
  height: 28px;
}

.page-generator .font-style-options {
  gap: 10px 8px;
  max-height: 285px;
}

.page-generator .font-style-options button {
  gap: 5px;
}

.page-generator .font-thumb {
  height: 54px;
}

.page-generator .history-filters button {
  height: 34px;
  font-size: 14px;
  font-weight: 400;
}

.page-generator .generator-history,
.page-generator .generator-history button,
.page-generator .generator-history p,
.page-generator .generator-history span,
.page-generator .generator-history small,
.page-generator .generator-history b,
.page-generator .generator-history strong,
.page-generator .generator-history em,
.page-generator .history-tabs button,
.page-generator .history-filters button,
.page-generator .inspiration-title,
.page-generator .card-tag,
.page-generator .history-meta {
  font-size: 14px;
}

.page-generator .generator-history .logo-reference-actions button,
.page-generator .generator-history .logo-reference-actions .preview-view-button {
  width: 160px;
  height: 45px;
  border-radius: 10px;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
}

.ai-edit-hero p span {
  font-size: inherit;
}

.home-hero-service h1 span {
  font-size: inherit;
}

.ai-tool-nav button,
.ai-tool-nav button span {
  font-size: 12px;
}

.ai-tool-nav .tool-svg,
.ai-tool-nav .tool-svg svg {
  width: 24px;
  height: 24px;
}

.account-popover {
  z-index: 220;
}

.login-page .login-card {
  width: min(430px, 100%);
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  .login-page {
    width: 100%;
    padding: 40px 16px 64px;
  }

  .login-page .login-card {
    justify-self: stretch;
    width: 100%;
    padding: 28px 22px 26px;
  }

  .account-center-page {
    grid-template-columns: 1fr;
    width: calc(100vw - 32px);
    padding: 16px 0 72px;
  }

  .account-sidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
  }

  .account-sidebar button {
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .account-center-content {
    padding: 22px 18px 26px;
  }

  .account-center-top strong {
    font-size: 24px;
  }

  .account-table-head,
  .points-row {
    grid-template-columns: 1fr 1fr;
  }

  .account-table-head span:nth-child(n+3),
  .points-row span:nth-child(n+3) {
    display: none;
  }

  .profile-line {
    align-items: flex-start;
  }

  .profile-line div {
    display: grid;
    gap: 4px;
  }

  .profile-line strong {
    flex-basis: auto;
  }

  .nickname-modal {
    width: calc(100vw - 32px);
    min-height: 320px;
    padding: 96px 24px 40px;
  }

  .nickname-close {
    top: 24px;
    right: 28px;
  }

  .nickname-modal h2 {
    margin-bottom: 36px;
    font-size: 24px;
  }

  .nickname-modal input,
  .nickname-submit {
    height: 48px;
    font-size: 16px;
  }

}

@media (max-width: 520px) {
  .account-popover {
    top: 96px;
    right: 12px;
    width: min(330px, calc(100vw - 24px));
  }

  .account-popover header {
    padding: 18px 18px 14px;
  }

  .account-vip-card {
    margin: 0 16px 16px;
  }

  .account-menu-grid {
    padding: 0 16px 22px;
  }
}

.admin-login-page,
.admin-dashboard {
  min-height: 100vh;
  background: #f6f5f9;
  color: #20202a;
  font-size: 14px;
}

.page-admin,
.page-admin-login {
  padding-top: 0;
}

.admin-login-page {
  display: grid;
  place-items: center;
  padding: 24px 20px;
}

.admin-login-card {
  width: min(430px, 100%);
  display: grid;
  gap: 18px;
  padding: 34px;
  background: #fff;
  border: 1px solid #ece8f5;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(31, 24, 50, 0.08);
}

.admin-brand {
  justify-self: start;
  display: grid;
  gap: 2px;
  border: 0;
  background: transparent;
  color: #9D5BFF;
  text-align: left;
  cursor: pointer;
}

.admin-brand strong {
  font-size: 28px;
  line-height: 1;
}

.admin-brand span,
.admin-login-card p,
.admin-login-card small,
.admin-login-card label,
.admin-content header p,
.admin-field-card span,
.admin-table td,
.admin-table th,
.admin-empty p {
  font-size: 14px;
}

.admin-login-card h1 {
  margin: 8px 0 0;
  font-size: 26px;
}

.admin-login-card p {
  margin: 0;
  color: #6f6a78;
}

.admin-login-card label {
  display: grid;
  gap: 8px;
  color: #33313b;
}

.admin-login-card input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #ded9e8;
  border-radius: 10px;
  outline: 0;
  font-size: 14px;
}

.admin-login-card input:focus {
  border-color: #9D5BFF;
  box-shadow: 0 0 0 3px rgba(157, 91, 255, 0.12);
}

.admin-login-submit {
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: #9D5BFF;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.admin-login-card small {
  color: #9a95a4;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
}

.admin-sidebar,
.admin-content {
  background: #fff;
  border: 1px solid #ece8f5;
  border-radius: 16px;
  box-shadow: 0 14px 42px rgba(31, 24, 50, 0.06);
}

.admin-sidebar {
  min-height: calc(100vh - 122px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-logo {
  display: grid;
  gap: 3px;
  padding: 8px 6px 14px;
  border: 0;
  border-bottom: 1px solid #f0edf6;
  background: transparent;
  color: #9D5BFF;
  text-align: left;
  cursor: pointer;
}

.admin-logo strong {
  font-size: 24px;
  line-height: 1;
}

.admin-logo span {
  font-size: 12px;
  color: #6f6a78;
}

.admin-sidebar nav {
  display: grid;
  gap: 8px;
}

.admin-nav-group {
  display: grid;
  gap: 6px;
}

.admin-nav-group.has-children {
  gap: 4px;
}

.admin-sidebar nav button,
.admin-logout,
.admin-content header button,
.admin-field-card button,
.admin-table button,
.admin-empty button {
  height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #302d38;
  font-size: 14px;
  cursor: pointer;
}

.admin-sidebar nav button {
  text-align: left;
  padding: 0 12px;
}

.admin-nav-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.admin-nav-parent .admin-nav-caret {
  color: #928b9e;
  font-size: 13px;
  transition: transform .18s ease, color .18s ease;
}

.admin-nav-group.expanded .admin-nav-caret {
  transform: rotate(90deg);
  color: #9D5BFF;
}

.admin-nav-group.active-parent .admin-nav-parent {
  color: #201b2c;
}

.admin-subnav {
  display: grid;
  gap: 6px;
  margin-left: 12px;
  padding-left: 10px;
  border-left: 1px solid #eee8ff;
}

.admin-subnav[hidden] {
  display: none;
}

.admin-subnav button {
  height: 34px;
  padding-left: 14px;
  font-size: 13px;
}

.admin-sidebar nav button.active {
  background: rgba(157, 91, 255, 0.12);
  color: #9D5BFF;
}

.admin-logout {
  margin-top: auto;
  border-color: #e5dfef;
}

.admin-content {
  padding: 28px;
  overflow: hidden;
}

.admin-content header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.admin-content header h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.admin-content header p {
  margin: 0;
  color: #837c8e;
}

.admin-feedback {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 99999;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: min(720px, calc(100vw - 48px));
  margin: 0;
  transform: translateX(-50%);
  pointer-events: none;
  animation: adminToastIn 180ms ease-out both;
}

.admin-feedback.leaving {
  animation: adminToastOut 420ms ease-in both;
}

.admin-feedback span {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  box-shadow: 0 14px 36px rgba(47, 37, 69, 0.18);
}

.admin-feedback.success span {
  color: #18824b;
  background: #edf9f2;
  border: 1px solid #cbeed9;
}

.admin-feedback.error span {
  color: #d93025;
  background: #fff3f0;
  border: 1px solid #ffd7d0;
}

.app-toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 10px 18px;
  border: 1px solid #cbeed9;
  border-radius: 8px;
  background: #edf9f2;
  color: #18824b;
  box-shadow: 0 14px 36px rgba(47, 37, 69, 0.18);
  font-size: 14px;
  line-height: 20px;
  transform: translateX(-50%);
  pointer-events: none;
  animation: adminToastIn 180ms ease-out both;
}

@keyframes adminToastIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes adminToastOut {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
}

.admin-content header button,
.admin-field-card button,
.admin-table button,
.admin-empty button {
  border-color: #9D5BFF;
  color: #9D5BFF;
  background: #fff;
  padding: 0 16px;
}

.admin-table button + button {
  margin-left: 8px;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.admin-inline-editor {
  width: 100%;
  max-width: none;
}

.admin-inline-editor .admin-editor-modal,
.admin-inline-editor {
  background: #fff;
  border: 1px solid #eeeaf5;
  border-radius: 16px;
}

.admin-inline-editor .admin-editor-body {
  max-height: none;
}

.admin-inline-editor .admin-editor-body {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  align-items: start;
}

.admin-inline-editor .admin-image-field,
.admin-inline-editor .admin-contacts-field,
.admin-inline-editor .admin-navigation-field {
  grid-column: 1 / -1;
}

.admin-field-card {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid #eeeaf5;
  border-radius: 12px;
  background: #fbfaff;
}

.admin-field-card span {
  color: #827b8d;
}

.admin-field-card strong {
  font-size: 16px;
  word-break: break-all;
}

.admin-field-card button {
  justify-self: start;
}

.admin-ai-config-sections {
  display: grid;
  gap: 18px;
}

.admin-config-section {
  display: grid;
  gap: 10px;
}

.admin-config-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
}

.admin-config-section h2 {
  margin: 0;
  font-size: 16px;
}

.admin-subsection-separated {
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid #e9e2f4;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-list-toolbar select,
.admin-list-toolbar input {
  height: 38px;
  border: 1px solid #ded9e8;
  border-radius: 9px;
  padding: 0 12px;
  outline: 0;
  background: #fff;
  color: #302d38;
  font-size: 14px;
}

.admin-list-toolbar input {
  width: min(280px, 100%);
}

.admin-list-toolbar select:focus,
.admin-list-toolbar input:focus {
  border-color: #9D5BFF;
  box-shadow: 0 0 0 3px rgba(157, 91, 255, 0.12);
}

.admin-list-toolbar span,
.admin-pagination span {
  color: #8a8495;
  font-size: 13px;
}

.admin-table {
  overflow-x: auto;
  border: 1px solid #eeeaf5;
  border-radius: 12px;
}

.admin-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0edf6;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #fbfaff;
  color: #514b5c;
  font-weight: 600;
}

.admin-point-value {
  min-width: 42px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #302d38;
  font-size: 14px;
}

.admin-point-value:hover {
  border-color: #d9c7ff;
  background: #f7f0ff;
  color: #8f45ff;
}

.admin-quick-toggle {
  min-width: 52px;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #f1eef8;
  color: #6d6479;
  font-size: 13px;
  line-height: 28px;
}

.admin-quick-toggle.enabled,
.admin-quick-toggle.default {
  background: #f0e7ff;
  color: #8f45ff;
}

.admin-quick-toggle.disabled {
  background: #f1f2f5;
  color: #8d919c;
}

.admin-quick-toggle.muted {
  background: #fff;
  border: 1px solid #e5def3;
  color: #6f39ff;
}

.admin-quick-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-image-thumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 180px;
  color: #6f39ff;
  text-decoration: none;
}

.admin-image-thumb img {
  width: 56px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid #eeeaf5;
  border-radius: 8px;
  background: #fbfaff;
}

.admin-image-thumb span,
.admin-image-empty {
  max-width: 100px;
  overflow: hidden;
  color: #8a8495;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-pagination button,
.admin-pagination strong {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ded9e8;
  border-radius: 8px;
  background: #fff;
  color: #302d38;
  font-size: 14px;
}

.admin-pagination button {
  cursor: pointer;
}

.admin-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-pagination strong {
  border-color: #9D5BFF;
  color: #9D5BFF;
}

.admin-point-detail-modal {
  width: min(920px, calc(100vw - 80px));
}

.admin-point-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 22px 4px;
}

.admin-point-detail-summary p {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px;
  border: 1px solid #eeeaf5;
  border-radius: 10px;
  background: #fbfaff;
}

.admin-point-detail-summary span {
  color: #827b8d;
  font-size: 12px;
}

.admin-point-detail-summary b {
  color: #302d38;
  font-size: 15px;
  word-break: break-all;
}

.admin-point-detail-table {
  margin: 14px 22px 0;
}

.admin-point-detail-table .plus {
  color: #8f45ff;
  font-weight: 700;
}

.admin-point-detail-table .minus {
  color: #e15a5a;
  font-weight: 700;
}

.admin-point-detail-pagination {
  padding: 14px 22px 20px;
}

.admin-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 360px;
  border: 1px dashed #ded8ea;
  border-radius: 14px;
  background: #fbfaff;
  text-align: center;
}

.admin-empty h2 {
  margin: 0;
  font-size: 22px;
}

.admin-empty p {
  margin: 0;
  color: #7c7588;
}

.admin-editor-mask {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(21, 18, 31, 0.42);
}

.admin-editor-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(19, 14, 35, 0.22);
  overflow: hidden;
}

.admin-editor-modal header,
.admin-editor-modal footer,
.admin-inline-editor header,
.admin-inline-editor footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #f0edf6;
}

.admin-editor-modal footer,
.admin-inline-editor footer {
  justify-content: flex-end;
  border-top: 1px solid #f0edf6;
  border-bottom: 0;
}

.admin-editor-modal h2,
.admin-inline-editor h2 {
  margin: 0;
  font-size: 20px;
}

.admin-editor-modal header button,
.admin-inline-editor header button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.admin-editor-body {
  display: grid;
  gap: 14px;
  padding: 22px;
  overflow: auto;
}

.admin-editor-field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #302d38;
}

.admin-editor-field input,
.admin-editor-field select,
.admin-editor-field textarea {
  width: 100%;
  border: 1px solid #ded9e8;
  border-radius: 10px;
  padding: 0 12px;
  outline: 0;
  font-size: 14px;
  color: #302d38;
  background: #fff;
}

.admin-editor-field input,
.admin-editor-field select {
  height: 42px;
}

.admin-editor-field textarea {
  min-height: 130px;
  padding-top: 10px;
  resize: vertical;
}

.admin-image-upload {
  display: grid;
  gap: 10px;
}

.admin-image-preview {
  width: 96px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #d8d1e8;
  border-radius: 10px;
  background: #fbfaff;
  color: #9a93a8;
  font-size: 12px;
}

.admin-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-image-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  align-items: stretch;
  max-width: 100%;
}

.admin-image-controls input {
  border-right: 0;
  border-radius: 0;
}

.admin-image-actions {
  display: grid;
  grid-template-columns: repeat(2, 86px);
  gap: 6px;
}

.admin-contacts-field {
  display: grid;
  gap: 12px;
}

.admin-contacts-list {
  display: grid;
  gap: 12px;
}

.admin-navigation-field {
  display: grid;
  gap: 12px;
}

.admin-navigation-list {
  display: grid;
  gap: 12px;
}

.admin-navigation-row {
  display: grid;
  grid-template-columns: 120px 140px minmax(180px, 1fr) minmax(240px, 1.2fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid #ece8f4;
  border-radius: 12px;
  background: #fbfaff;
}

.admin-navigation-row label {
  display: grid;
  gap: 8px;
  color: #6a6378;
  font-size: 13px;
}

.admin-contact-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(280px, 1.8fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid #ece8f4;
  border-radius: 12px;
  background: #fbfaff;
}

.admin-contact-row label {
  display: grid;
  gap: 8px;
  color: #6a6378;
  font-size: 13px;
}

.admin-contact-row input {
  width: 100%;
}

.admin-contact-qr .admin-image-upload {
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
}

.admin-contact-qr .admin-image-preview {
  width: 72px;
  height: 72px;
}

.admin-add-contact,
.admin-remove-contact {
  height: 40px;
  border: 1px solid rgba(157, 91, 255, 0.5);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-size: 14px;
}

.admin-add-contact {
  width: 120px;
}

.admin-remove-contact {
  min-width: 64px;
}

.admin-upload-button,
.admin-select-button {
  min-width: 86px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.admin-contact-row label.admin-upload-button,
.admin-contact-row .admin-select-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 86px;
  min-width: 86px;
  height: 42px;
  padding: 0 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.admin-upload-button {
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(157, 91, 255, 0.18);
}

.admin-select-button {
  background: #26384b;
}

.admin-upload-button span,
.admin-select-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.admin-upload-button input {
  display: none;
}

.admin-media-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: rgba(21, 18, 31, 0.38);
}

.admin-media-modal {
  width: min(980px, calc(100vw - 48px));
  height: 600px;
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(33, 24, 52, 0.24);
}

.admin-media-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #eeeaf6;
}

.admin-media-modal header h2 {
  margin: 0;
  font-size: 18px;
}

.admin-media-modal header button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.admin-media-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.admin-media-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.admin-media-folders {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  border-right: 1px solid #eeeaf6;
  background: #fbfaff;
}

.admin-media-folders button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #40384e;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.admin-media-folders button.active {
  background: #f0e7ff;
  color: #9D5BFF;
}

.admin-media-folders span {
  color: #9a93a8;
  font-size: 12px;
}

.admin-media-folders p,
.admin-media-empty {
  margin: 0;
  padding: 18px;
  color: #9a93a8;
  font-size: 14px;
}

.admin-media-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 14px;
  align-content: start;
  padding: 18px;
}

.admin-media-grid button {
  min-width: 0;
  border: 1px solid #eeeaf6;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.admin-media-grid button:hover {
  border-color: #9D5BFF;
  box-shadow: 0 8px 18px rgba(157, 91, 255, 0.14);
}

.admin-media-grid img {
  width: 100%;
  height: 112px;
  display: block;
  object-fit: contain;
  background: #f7f7f8;
}

.admin-media-grid span {
  display: block;
  padding: 8px;
  overflow: hidden;
  color: #40384e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-media-pagination {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 18px;
  border-top: 1px solid #eeeaf6;
  background: #fff;
}

.admin-media-pagination span {
  margin-right: auto;
  color: #8a8495;
  font-size: 13px;
}

.admin-media-pagination button,
.admin-media-pagination strong {
  min-width: 68px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ded9e8;
  border-radius: 8px;
  background: #fff;
  color: #302d38;
  font-size: 13px;
}

.admin-media-pagination button {
  cursor: pointer;
}

.admin-media-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-editor-field input:focus,
.admin-editor-field select:focus,
.admin-editor-field textarea:focus {
  border-color: #9D5BFF;
  box-shadow: 0 0 0 3px rgba(157, 91, 255, 0.12);
}

.admin-order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.admin-order-tabs button {
  min-width: 118px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #e5dff0;
  border-radius: 10px;
  background: #fff;
  color: #40384e;
  font-size: 14px;
  cursor: pointer;
}

.admin-order-tabs button.active {
  border-color: #9D5BFF;
  background: #f2eaff;
  color: #9D5BFF;
}

.admin-order-tabs span {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(157, 91, 255, 0.12);
  font-size: 12px;
}

.admin-status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff7e6;
  color: #c47a00;
  font-size: 13px;
}

.admin-status-tag.paid {
  background: #ecfff5;
  color: #16804d;
}

.admin-status-tag.pending {
  background: #f2eaff;
  color: #9D5BFF;
}

.admin-status-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(157, 91, 255, 0.12);
  color: #9D5BFF;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.admin-status-label.active {
  background: rgba(157, 91, 255, 0.12);
  color: #9D5BFF;
}

.admin-status-label.pending {
  background: #fff6e8;
  color: #c47a00;
}

.admin-status-label.disabled {
  background: #f1f2f5;
  color: #8a8f99;
}

.admin-link-button {
  border: 0;
  background: transparent;
  color: #9D5BFF;
  font-size: 14px;
  cursor: pointer;
}

.admin-link-button:hover {
  text-decoration: underline;
}

.admin-detail-mask {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(25, 22, 31, 0.42);
}

.admin-detail-modal {
  width: min(980px, 92vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(32, 25, 45, 0.24);
}

.admin-detail-modal header {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #eeeaf6;
}

.admin-detail-modal h3 {
  margin: 0;
  color: #201c29;
  font-size: 18px;
}

.admin-detail-section {
  padding: 18px 24px;
  border-bottom: 1px solid #f0edf6;
}

.admin-detail-section h4 {
  margin: 0 0 14px;
  color: #201c29;
  font-size: 16px;
}

.admin-detail-section .admin-detail-grid {
  padding: 0;
}

.admin-detail-mark-image {
  width: 150px;
  height: 150px;
  margin-bottom: 14px;
  border: 1px dashed #d8d2e4;
  display: grid;
  place-items: center;
  background: #fff;
}

.admin-detail-mark-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.admin-detail-items-group {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #eeeaf6;
  border-radius: 12px;
  background: #fbfaff;
}

.admin-detail-items-group b {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: #302d38;
}

.admin-detail-items-group p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.admin-detail-items-group span {
  padding: 6px 10px;
  border: 1px solid rgba(157, 91, 255, 0.32);
  color: #9D5BFF;
  background: rgba(157, 91, 255, 0.07);
  font-size: 13px;
}

.admin-detail-modal header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f5f2fa;
  color: #645b72;
  font-size: 20px;
  cursor: pointer;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 24px 26px;
}

.admin-detail-grid p {
  margin: 0;
  padding: 14px;
  border: 1px solid #eeeaf6;
  border-radius: 12px;
  background: #fbfaff;
}

.admin-detail-grid span {
  display: block;
  margin-bottom: 8px;
  color: #8d849c;
  font-size: 13px;
}

.admin-detail-grid b {
  color: #302d38;
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

.admin-editor-modal footer button,
.admin-inline-editor footer button {
  min-width: 96px;
  height: 40px;
  border: 1px solid #ded9e8;
  border-radius: 10px;
  background: #fff;
  color: #302d38;
  font-size: 14px;
  cursor: pointer;
}

.admin-editor-modal footer button:last-child,
.admin-inline-editor footer button:last-child {
  border-color: #9D5BFF;
  background: #9D5BFF;
  color: #fff;
}

.copyright-page {
  min-height: calc(100vh - 72px);
  padding: 24px 48px 120px;
  background: #f7f7fb;
  color: #20202a;
}

.copyright-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto 12px;
}

.copyright-hero h1 {
  flex: 0 0 160px;
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

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

.copyright-steps span {
  display: grid;
  place-items: center;
  min-height: 44px;
  background: #f0f1f6;
  color: #666;
  font-size: 14px;
}

.copyright-steps span.active {
  background: var(--primary);
  color: #fff;
}

.copyright-card {
  max-width: 1280px;
  margin: 0 auto 16px;
  padding: 24px 28px;
  border: 1px solid #ece8f5;
  border-radius: 10px;
  background: #fff;
}

.copyright-notice {
  max-width: 1280px;
  margin: 0 auto 16px;
  background: #f7f1ff;
}

.copyright-error-summary {
  display: grid;
  gap: 8px;
  max-width: 1280px;
  margin: 0 auto 16px;
  padding: 14px 18px;
  border: 1px solid #ffc7c0;
  border-radius: 8px;
  background: #fff5f3;
  color: #c42d20;
  font-size: 14px;
}

.copyright-error-summary strong {
  font-size: 14px;
}

.copyright-error-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.copyright-error-summary span {
  line-height: 1.5;
}

.copyright-card h2 {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.4;
}

.copyright-work-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.copyright-preview {
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border: 1px dashed #d7d1e8;
  background: #fafafa;
  color: #999;
  font-size: 14px;
}

.copyright-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

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

.copyright-form-grid label,
.copyright-remark {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #20202a;
}

.copyright-form-grid input,
.copyright-form-grid select,
.copyright-remark textarea {
  width: 100%;
  border: 1px solid #d8d4e3;
  border-radius: 6px;
  background: #fff;
  color: #20202a;
  font-size: 14px;
}

.copyright-form-grid label.has-error input,
.copyright-form-grid label.has-error select,
.copyright-upload-row.has-error .upload-box,
.copyright-material-empty.has-error {
  border-color: #ff6b5f;
  box-shadow: 0 0 0 3px rgba(255, 107, 95, 0.12);
}

.copyright-field-error {
  color: #d93025;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.copyright-form-grid input,
.copyright-form-grid select {
  height: 42px;
  padding: 0 12px;
}

.copyright-owner-field {
  grid-column: 1 / -1;
  max-width: 420px;
}

.copyright-remark {
  margin-top: 16px;
}

.copyright-remark textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.copyright-help {
  margin-top: 18px;
  color: #666;
  font-size: 13px;
  line-height: 1.8;
}

.copyright-material-title {
  margin: 20px 0 14px;
}

.copyright-material-grid {
  margin-top: 0;
}

.copyright-material-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  border: 1px dashed #d7d1e8;
  border-radius: 8px;
  color: #999;
  font-size: 14px;
}

.copyright-upload-row {
  align-items: flex-start;
}

.copyright-submit-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 0;
  background: rgba(247, 247, 251, 0.94);
}

.copyright-submit-bar button {
  min-width: 140px;
  height: 44px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.copyright-submit-bar button:last-child {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 900px) {
  .admin-dashboard {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .admin-sidebar {
    min-height: auto;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-card-grid {
    grid-template-columns: 1fr;
  }

  .admin-inline-editor .admin-editor-body {
    grid-template-columns: 1fr;
  }
}
