:root {
  --primary: #68b88e;
  --primary-hover: #5aa87d;
  --primary-light: rgba(104, 184, 142, 0.1);
  --accent: #b86892;
  --accent-hover: #a95781;
  --accent-soft: #fff3f7;
  --accent-dark: #7a3d58;
  --dark: #1a1a1a;
  --text: #333;
  --muted: #667085;
  --line: #e5e5e5;
  --panel: #fff;
  --shadow: 0 18px 46px rgba(21, 30, 25, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  scrollbar-color: transparent #08090a;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #08090a;
}

::-webkit-scrollbar-thumb {
  background: transparent;
  border: 1px solid #08090a;
  border-radius: 999px;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid #08090a;
  background-clip: padding-box;
}

body:has(.koozee-home) {
  background: #08090a;
}

body {
  color: var(--text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app {
  min-height: 100vh;
  background: #fff;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  height: 60px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #f0f0f0;
  backdrop-filter: blur(12px);
}

.brand,
.desktop-nav,
.header-actions,
.desktop-nav a,
.nav-dropdown > button,
.solid-button,
.text-button,
.hero-badge,
.composer-header,
.composer-upload,
.composer-footer,
.composer-tools,
.select-tool > button,
.generate-button,
.case-flow,
.mobile-nav,
.footer-links,
.footer-records {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-logo-img {
  display: block;
  width: auto;
  height: 24px;
  object-fit: contain;
}

.brand .brand-logo-img,
.canvas-brand .brand-logo-img {
  padding: 4px 7px;
  background: #08090a;
  border-radius: 8px;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.brand-icon svg {
  width: 28px;
  height: 28px;
  fill: #863bff;
  stroke: none;
}

.desktop-nav {
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.desktop-nav a,
.nav-dropdown > button {
  position: relative;
  height: 38px;
  padding: 0 11px;
  color: #333;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown:hover > button {
  color: #1a1a1a;
  background: #f4fbf7;
}

.desktop-nav em {
  margin-left: 3px;
  color: var(--accent-dark);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.nav-dropdown {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 10;
  display: grid;
  gap: 6px;
  width: 248px;
  padding: 8px;
  visibility: hidden;
  opacity: 0;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e7ece9;
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(21, 30, 25, 0.13);
  transform: translate(-50%, -4px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}

.nav-menu.narrow {
  width: 218px;
}

.nav-dropdown:hover .nav-menu {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

.nav-menu a {
  display: grid;
  height: auto;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 9px;
}

.nav-menu strong {
  color: #1a1a1a;
  font-size: 14px;
}

.nav-menu span {
  color: #777;
  font-size: 12px;
  line-height: 1.45;
}

.header-actions {
  gap: 10px;
  justify-content: flex-end;
}

.header-actions .text-button[data-open-login],
.header-actions .solid-button[data-open-register] {
  height: 40px;
  min-width: 70px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 820;
  letter-spacing: 0;
  transition: color 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.header-actions .text-button[data-open-login] {
  color: #24362d;
  background: transparent;
  border: 1px solid transparent;
}

.header-actions .text-button[data-open-login]:hover {
  color: #10281c;
  background: #f4fbf7;
  border-color: #e2efe8;
}

.header-actions .solid-button[data-open-register] {
  min-width: 78px;
  color: #10281c;
  background: linear-gradient(180deg, #7ac79e 0%, var(--primary) 100%);
  border: 1px solid rgba(92, 171, 130, 0.72);
  box-shadow: 0 10px 24px rgba(104, 184, 142, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.header-actions .solid-button[data-open-register]:hover {
  background: linear-gradient(180deg, #82cfa7 0%, var(--primary-hover) 100%);
  border-color: rgba(90, 168, 125, 0.82);
  box-shadow: 0 12px 28px rgba(104, 184, 142, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.header-actions .text-button[data-open-login]:focus-visible,
.header-actions .solid-button[data-open-register]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(104, 184, 142, 0.14);
}

.header-user-menu {
  position: relative;
  order: 2;
}

.header-user-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 196px;
  height: 48px;
  padding: 5px 13px 5px 6px;
  color: #17392b;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86) 0%, rgba(244, 252, 248, 0.72) 52%, rgba(255, 246, 250, 0.58) 100%);
  border: 1px solid rgba(205, 226, 216, 0.92);
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  box-shadow:
    0 18px 42px rgba(18, 38, 28, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(130, 184, 157, 0.1);
  backdrop-filter: blur(18px) saturate(1.18);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.header-user-card::before {
  position: absolute;
  inset: 1px;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), transparent 36%, rgba(184, 104, 146, 0.08));
  opacity: 0.7;
}

.header-user-card:hover,
.header-user-menu.open .header-user-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 253, 249, 0.84) 52%, rgba(255, 244, 249, 0.66) 100%);
  border-color: rgba(177, 213, 196, 0.98);
  box-shadow:
    0 22px 52px rgba(18, 38, 28, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(130, 184, 157, 0.16);
  transform: translateY(-1px);
}

.header-avatar {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.18), transparent 36%),
    #0c1712;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(10, 23, 17, 0.18);
  font-size: 15px;
  font-weight: 900;
}

.header-avatar::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--primary);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(104, 184, 142, 0.12);
}

.header-user-copy {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
}

.header-user-card > svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: rgba(24, 54, 39, 0.72);
  transition: transform 0.18s;
}

.header-user-menu.open .header-user-card > svg {
  transform: rotate(180deg);
}

.header-user-card strong,
.header-user-card small {
  overflow: hidden;
  max-width: 126px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-card strong {
  color: #13231b;
  font-size: 14px;
  font-weight: 880;
  line-height: 1.1;
}

.header-user-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 85;
  display: grid;
  gap: 8px;
  width: 276px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dfe9e4;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(11, 24, 17, 0.16);
  backdrop-filter: blur(18px);
}

.header-user-panel::before {
  position: absolute;
  top: -6px;
  right: 40px;
  width: 12px;
  height: 12px;
  content: "";
  background: #fff;
  border-top: 1px solid #dfe9e4;
  border-left: 1px solid #dfe9e4;
  transform: rotate(45deg);
}

.header-user-panel[hidden] {
  display: none;
}

.header-user-panel-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid #eef4f1;
}

.header-user-panel-head .header-avatar {
  width: 42px;
  height: 42px;
}

.header-user-panel-head span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.header-user-panel-head strong,
.header-user-panel-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-panel-head strong {
  color: #10281c;
  font-size: 15px;
  font-weight: 900;
}

.header-user-panel-head small {
  color: #66766e;
  font-size: 12px;
  font-weight: 680;
}

.header-user-menu-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  color: #20382e;
  border: 1px solid transparent;
  border-radius: 16px;
  text-align: left;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

.header-user-menu-item:hover {
  background: #f4fbf7;
  border-color: #e1eee7;
  transform: translateY(-1px);
}

.header-user-menu-item > span:first-child {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #2f7d52;
  background: #eef8f3;
  border-radius: 14px;
}

.header-user-menu-item svg {
  width: 18px;
  height: 18px;
}

.header-user-menu-item strong {
  display: block;
  color: #111814;
  font-size: 14px;
  font-weight: 880;
  line-height: 1.2;
}

.header-user-menu-item small {
  display: block;
  margin-top: 3px;
  color: #64756c;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.header-user-menu-item.danger > span:first-child {
  color: #b42318;
  background: #fff4f2;
}

.header-user-menu-item.danger:hover {
  background: #fff8f6;
  border-color: #ffdcd5;
}

.header-user-card small {
  color: rgba(84, 105, 94, 0.9);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.1;
}

.member-menu {
  position: relative;
  order: 1;
}

.member-entry-button {
  display: grid;
  grid-template-columns: 34px minmax(0, auto) 16px;
  align-items: center;
  gap: 10px;
  height: 46px;
  min-width: 170px;
  padding: 5px 14px 5px 6px;
  color: #10281c;
  background: linear-gradient(180deg, #78c79f 0%, var(--primary) 100%);
  border: 1px solid rgba(90, 168, 125, 0.72);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(104, 184, 142, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.member-entry-button:hover,
.member-menu.open .member-entry-button {
  background: linear-gradient(180deg, #82cfa7 0%, var(--primary-hover) 100%);
  border-color: rgba(90, 168, 125, 0.86);
  box-shadow: 0 14px 34px rgba(104, 184, 142, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.member-entry-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #103322;
  background: rgba(255, 255, 255, 0.32);
  border-radius: 50%;
}

.member-entry-icon svg {
  width: 17px;
  height: 17px;
}

.member-entry-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  text-align: left;
}

.member-entry-copy strong,
.member-entry-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-entry-copy strong {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}

.member-entry-copy small {
  color: rgba(16, 40, 28, 0.68);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.member-entry-button > svg {
  width: 15px;
  height: 15px;
  transition: transform 0.18s;
}

.member-menu.open .member-entry-button > svg {
  transform: rotate(180deg);
}

.member-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  display: grid;
  gap: 8px;
  width: 286px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dfe9e4;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(11, 24, 17, 0.16);
  backdrop-filter: blur(18px);
}

.member-menu-panel::before {
  position: absolute;
  top: -6px;
  right: 36px;
  width: 12px;
  height: 12px;
  content: "";
  background: #fff;
  border-top: 1px solid #dfe9e4;
  border-left: 1px solid #dfe9e4;
  transform: rotate(45deg);
}

.member-menu-panel[hidden] {
  display: none;
}

.member-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
}

.member-menu-head strong {
  color: #10281c;
  font-size: 15px;
  font-weight: 900;
}

.member-menu-head span {
  color: #6a7b72;
  font-size: 12px;
  font-weight: 720;
}

.member-menu-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  color: #20382e;
  border: 1px solid transparent;
  border-radius: 16px;
  text-align: left;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

.member-menu-item:hover {
  background: #f4fbf7;
  border-color: #e1eee7;
  transform: translateY(-1px);
}

.member-menu-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #2f7d52;
  background: #eef8f3;
  border-radius: 14px;
}

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

.member-menu-item strong {
  display: block;
  color: #111814;
  font-size: 14px;
  font-weight: 880;
  line-height: 1.2;
}

.member-menu-item small {
  display: block;
  margin-top: 3px;
  color: #64756c;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.text-button,
.solid-button {
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
}

.text-button {
  color: #333;
  background: #fff;
}

.solid-button {
  color: #10281c;
  background: var(--primary);
  border: 1px solid var(--primary);
}

.solid-button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

body.modal-open {
  overflow: hidden;
  padding-right: var(--modal-scrollbar-compensation, 0px);
}

body.modal-open .site-header {
  padding-right: calc(28px + var(--modal-scrollbar-compensation, 0px));
}

.wallet-recharge-modal,
.membership-plans-modal,
.admin-wechat-modal,
.admin-credit-modal,
.admin-clear-data-modal,
.app-dialog-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 18, 15, 0.42);
  backdrop-filter: blur(1px);
}

.wallet-recharge-modal[hidden],
.membership-plans-modal[hidden],
.admin-wechat-modal[hidden],
.credit-records-modal[hidden],
.admin-credit-modal[hidden],
.admin-clear-data-modal[hidden],
.app-dialog-modal[hidden] {
  display: none;
}

.wallet-recharge-dialog,
.admin-credit-dialog,
.admin-clear-data-dialog {
  position: relative;
  width: min(500px, 100%);
  padding: 32px;
  color: #171d1a;
  background:
    linear-gradient(180deg, rgba(247, 252, 249, 0.86), rgba(255, 255, 255, 0.98) 34%),
    #fff;
  border: 1px solid rgba(219, 233, 226, 0.92);
  border-radius: 30px;
  box-shadow: 0 36px 96px rgba(12, 18, 15, 0.3);
}

.admin-clear-data-dialog {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.admin-clear-kicker {
  color: #c2412d;
  font-size: 13px;
  font-weight: 950;
}

.admin-clear-data-dialog h2 {
  margin-top: 8px;
  color: #111814;
  font-size: 30px;
  font-weight: 950;
}

.admin-clear-data-dialog p {
  margin-top: 10px;
  color: #64756c;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.65;
}

.admin-clear-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.admin-clear-options label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  background: #f8fbf9;
  border: 1px solid #dfe9e4;
  border-radius: 16px;
}

.admin-clear-options input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #d44b35;
}

.admin-clear-options strong {
  display: block;
  color: #111814;
  font-size: 15px;
  font-weight: 950;
}

.admin-clear-options small {
  display: block;
  margin-top: 4px;
  color: #64756c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.admin-clear-options .admin-clear-critical {
  background: #fff1ec;
  border-color: rgba(212, 75, 53, 0.28);
}

.admin-clear-confirm {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  color: #c2412d;
  font-size: 13px;
  font-weight: 950;
}

.admin-clear-confirm input {
  height: 48px;
  padding: 0 14px;
  color: #111814;
  background: #fff;
  border: 1px solid #e5c5bd;
  border-radius: 14px;
  outline: 0;
  font-size: 16px;
  font-weight: 900;
}

.admin-clear-confirm input:focus {
  border-color: #d44b35;
  box-shadow: 0 0 0 4px rgba(212, 75, 53, 0.12);
}

.admin-clear-submit {
  width: 100%;
  height: 54px;
  margin-top: 16px;
  color: #fff;
  background: #d44b35;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 950;
  box-shadow: 0 16px 32px rgba(212, 75, 53, 0.22);
}

.app-dialog {
  position: relative;
  width: min(438px, 100%);
  padding: 30px;
  color: #111814;
  background:
    linear-gradient(180deg, rgba(244, 251, 247, 0.78), rgba(255, 255, 255, 0.98) 42%),
    #fff;
  border: 1px solid rgba(104, 184, 142, 0.22);
  border-radius: 22px;
  box-shadow: 0 34px 92px rgba(12, 18, 15, 0.3);
}

.app-dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #7d8a83;
  background: transparent;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.app-dialog-close:hover {
  color: #10281c;
  background: #eef8f2;
}

.app-dialog-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: #0b7448;
  background: #eaf8f0;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 950;
}

.app-dialog-modal[data-tone="danger"] .app-dialog-icon {
  color: #c2412d;
  background: #fff1ec;
}

.app-dialog-modal[data-tone="success"] .app-dialog-icon {
  color: #0b7448;
  background: #eaf8f0;
}

.app-dialog h2 {
  padding-right: 36px;
  color: #111814;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.2;
}

.app-dialog p {
  margin-top: 12px;
  color: #5f6f66;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
}

.app-dialog-field {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.app-dialog-field[hidden],
.app-dialog-error[hidden],
.app-dialog-secondary[hidden] {
  display: none;
}

.app-dialog-field span {
  color: #2f7d52;
  font-size: 13px;
  font-weight: 950;
}

.app-dialog-field input {
  height: 48px;
  padding: 0 14px;
  color: #111814;
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 14px;
  outline: 0;
  font-size: 16px;
  font-weight: 850;
}

.app-dialog-field input:focus {
  border-color: #68b88e;
  box-shadow: 0 0 0 4px rgba(104, 184, 142, 0.12);
}

.app-dialog-error {
  margin-top: 10px;
  color: #c2412d;
  font-size: 13px;
  font-weight: 900;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}

.app-dialog-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 950;
}

.app-dialog-secondary {
  color: #20382e;
  background: #fff;
  border: 1px solid #dfe9e4;
}

.app-dialog-secondary:hover {
  background: #f4fbf7;
  border-color: rgba(104, 184, 142, 0.38);
}

.app-dialog-primary {
  color: #10281c;
  background: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 12px 26px rgba(104, 184, 142, 0.22);
}

.app-dialog-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.app-dialog-modal[data-tone="danger"] .app-dialog-primary {
  color: #fff;
  background: #d44b35;
  border-color: #d44b35;
  box-shadow: 0 12px 26px rgba(212, 75, 53, 0.2);
}

.wallet-close-button {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #9aa29d;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
}

.wallet-close-button:hover {
  color: #20382e;
  background: #f4fbf7;
}

.wallet-recharge-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-right: 42px;
}

.wallet-recharge-head span {
  display: block;
  margin-bottom: 6px;
  color: #2f8c5c;
  font-size: 13px;
  font-weight: 950;
}

.wallet-recharge-dialog h2,
.admin-credit-dialog h2 {
  color: #111814;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.15;
}

.wallet-balance-line,
.admin-credit-target {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  height: 34px;
  margin-top: 2px;
  padding: 0 12px;
  color: #6c7c73;
  background: rgba(244, 251, 247, 0.92);
  border: 1px solid #e0eee6;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.wallet-balance-line strong {
  color: #10281c;
  font-weight: 950;
}

.admin-credit-target span {
  color: #20382e;
}

.wallet-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.wallet-preset-grid button {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 7px;
  height: 82px;
  padding: 0 16px;
  color: #111814;
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 950;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s, background 0.18s;
}

.wallet-preset-grid button strong {
  color: #111814;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.wallet-preset-grid button small {
  color: #7d8a83;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.wallet-preset-grid button.active {
  color: #0b7448;
  background: #f2fbf6;
  border-color: #68b88e;
  box-shadow: 0 14px 32px rgba(104, 184, 142, 0.14), inset 0 0 0 1px rgba(104, 184, 142, 0.18);
  transform: translateY(-1px);
}

.wallet-preset-grid button.active strong,
.wallet-preset-grid button.active small {
  color: #0b7448;
}

.admin-credit-preset-grid button {
  justify-items: center;
  height: 50px;
  padding: 0;
  font-size: 20px;
}

.admin-credit-dialog {
  width: min(454px, 100%);
  padding: 28px;
  background: #fff;
  border-radius: 18px;
}

.admin-credit-dialog h2 {
  font-size: 24px;
}

.wallet-amount-field {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.wallet-amount-field > span {
  color: #5c6761;
  font-size: 14px;
  font-weight: 900;
}

.wallet-amount-field div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 10px 0 18px;
  background: #fbfdfc;
  border: 1px solid #dfe5e2;
  border-radius: 18px;
}

.wallet-amount-field b {
  display: inline-grid;
  place-items: center;
  height: 34px;
  padding: 0 13px;
  color: #2f7d52;
  background: #eef8f3;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.wallet-amount-field input {
  width: 100%;
  min-width: 0;
  color: #111814;
  border: 0;
  outline: 0;
  font-size: 22px;
  font-weight: 950;
}

.wallet-amount-field input::-webkit-outer-spin-button,
.wallet-amount-field input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.wallet-amount-field input[type="number"] {
  appearance: textfield;
}

.wallet-arrival-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 20px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 10%, rgba(104, 184, 142, 0.18), transparent 34%),
    linear-gradient(135deg, #0c1712, #14271d);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 20px 48px rgba(12, 23, 18, 0.18);
}

.wallet-arrival-box div {
  display: grid;
  gap: 8px;
}

.wallet-arrival-box div:first-child {
  padding-right: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.wallet-arrival-box span,
.wallet-arrival-box small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 820;
}

.wallet-arrival-box strong {
  color: #fff;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.05;
}

.wallet-arrival-box b {
  color: #86d9ac;
  font-size: 34px;
  font-weight: 950;
  line-height: 1.05;
}

.wallet-arrival-box p {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 16px;
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 850;
}

.wallet-arrival-box p em {
  color: #86d9ac;
  font-style: normal;
  font-weight: 950;
}

.wallet-arrival-box em {
  font-style: normal;
}

.wallet-pay-button {
  width: 100%;
  height: 58px;
  margin-top: 22px;
  color: #10281c;
  background: linear-gradient(180deg, #7dcca3 0%, var(--primary) 100%);
  border-radius: 999px;
  font-size: 17px;
  font-weight: 950;
  box-shadow: 0 18px 38px rgba(104, 184, 142, 0.28);
}

.wallet-help-text {
  margin-top: 16px;
  color: #9aa29d;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.wallet-message {
  margin-top: 12px;
  color: #c01048;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.admin-wechat-modal {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(4px);
}

.admin-wechat-dialog {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  padding: 24px;
  overflow: auto;
  color: rgba(247, 248, 249, 0.94);
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 211, 217, 0.05), transparent 28%),
    #151616;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58);
}

.admin-wechat-dialog .wallet-close-button {
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: 0;
  font-size: 28px;
  font-weight: 300;
}

.admin-wechat-dialog .wallet-close-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.admin-wechat-head {
  padding-right: 48px;
}

.admin-wechat-head span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  color: #0b2725;
  background: #44dfcf;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.admin-wechat-head h2 {
  margin-top: 12px;
  color: #f7f8f9;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
}

.admin-wechat-head p {
  margin-top: 7px;
  color: rgba(229, 232, 235, 0.58);
  font-size: 13px;
  font-weight: 430;
  line-height: 1.55;
}

.admin-wechat-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.admin-wechat-order small,
.admin-wechat-order span {
  display: block;
  color: rgba(230, 232, 235, 0.52);
  font-size: 11px;
  font-weight: 440;
}

.admin-wechat-order strong {
  display: block;
  margin: 4px 0 3px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 18px;
  font-weight: 620;
}

.admin-wechat-order b {
  flex: 0 0 auto;
  color: #f6f7f8;
  font-size: 28px;
  font-weight: 680;
}

.admin-wechat-code {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 7px 10px;
  color: rgba(231, 233, 236, 0.54);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 430;
}

.admin-wechat-code strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 620;
}

.admin-wechat-body {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  margin-top: 16px;
}

.admin-wechat-qr-card {
  position: relative;
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.admin-wechat-qr-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
}

.admin-wechat-qr-card > p {
  margin: 9px 0 1px;
  color: rgba(238, 240, 242, 0.68);
  font-size: 11px;
  font-weight: 470;
  text-align: center;
}

.admin-wechat-qr-fallback {
  display: grid;
  min-height: 156px;
  place-items: center;
  padding: 14px;
  color: rgba(238, 240, 242, 0.58);
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}

.admin-wechat-qr-fallback[hidden] {
  display: none;
}

.admin-wechat-qr-fallback strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 620;
}

.admin-wechat-qr-fallback span {
  max-width: 130px;
  font-size: 11px;
  font-weight: 430;
  line-height: 1.55;
}

.admin-wechat-steps {
  min-width: 0;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 14px;
}

.admin-wechat-steps h3 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 620;
}

.admin-wechat-steps ol {
  display: grid;
  gap: 12px;
  margin-top: 13px;
  padding: 0;
  list-style: none;
  counter-reset: admin-step;
}

.admin-wechat-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 9px;
  row-gap: 1px;
  align-items: center;
  color: rgba(230, 232, 235, 0.54);
  font-size: 11px;
  font-weight: 420;
  line-height: 1.45;
  counter-increment: admin-step;
}

.admin-wechat-steps li::before {
  display: grid;
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #0b2523;
  background: #48ddcf;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 720;
  content: counter(admin-step);
}

.admin-wechat-steps strong,
.admin-wechat-steps span {
  display: block;
  grid-column: 2;
  min-width: 0;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: break-word;
}

.admin-wechat-steps strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 560;
}

.admin-wechat-note {
  margin-top: 14px;
  padding: 11px 13px;
  color: rgba(226, 240, 237, 0.7);
  background: rgba(48, 226, 201, 0.07);
  border: 1px solid rgba(61, 225, 204, 0.14);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 460;
  line-height: 1.5;
  text-align: center;
}

.credit-records-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 18, 15, 0.42);
  backdrop-filter: blur(1px);
}

.credit-records-dialog {
  position: relative;
  width: min(454px, 100%);
  max-height: min(86vh, 720px);
  padding: 28px;
  overflow: hidden;
  color: #171d1a;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 86px rgba(12, 18, 15, 0.28);
}

.credit-records-head {
  padding: 0;
}

.credit-records-head h2 {
  color: #111814;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
}

.credit-records-head p {
  margin-top: 8px;
  color: #8a948f;
  font-size: 14px;
  font-weight: 800;
}

.credit-records-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid #e4ebe7;
  border-radius: 14px;
}

.credit-records-filter label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.credit-records-filter label span {
  color: #5c6761;
  font-size: 13px;
  font-weight: 900;
}

.credit-records-filter input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 10px;
  color: #202631;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  outline: 0;
  font-size: 14px;
  font-weight: 850;
}

.credit-records-filter button {
  height: 44px;
  color: #111814;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 950;
}

.credit-records-filter button[data-reset-credit-records] {
  color: #657080;
  background: #fff;
  border-color: #dfe3e8;
}

.credit-records-count {
  margin-top: 14px;
  color: #96a0b0;
  font-size: 13px;
  font-weight: 800;
}

.credit-records-list {
  display: grid;
  max-height: min(360px, 38vh);
  gap: 10px;
  margin-top: 12px;
  overflow: auto;
}

.credit-record-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  background: #fbfbfc;
  border: 1px solid #eceeef;
  border-radius: 14px;
}

.credit-record-sign {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 950;
}

.credit-record-item.negative .credit-record-sign {
  color: #d85a08;
  background: #fff1e5;
}

.credit-record-item.positive .credit-record-sign {
  color: #2e8a59;
  background: #eaf8f1;
}

.credit-record-item strong {
  display: block;
  color: #202631;
  font-size: 15px;
  font-weight: 950;
}

.credit-record-item p {
  margin-top: 5px;
  color: #99a2b2;
  font-size: 13px;
  font-weight: 800;
}

.credit-record-item time {
  margin-left: 8px;
}

.credit-record-item b {
  color: #2e8a59;
  font-size: 20px;
  font-weight: 950;
}

.credit-record-item.negative b {
  color: #d85a08;
}

.credit-record-empty {
  display: grid;
  place-items: center;
  min-height: 110px;
  color: #8b968f;
  background: #fbfbfc;
  border: 1px solid #eceeef;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 850;
}

.wallet-message[data-tone="success"] {
  color: #16774c;
}

.page-home {
  min-height: 100vh;
  padding-top: 60px;
  color: #13231b;
  background: #f5faf7;
}

.course-boot .page-home,
.course-boot .home-footer {
  display: none;
}

.course-boot .course-page[hidden] {
  display: block;
}

.hero-section {
  position: relative;
  min-height: calc(100vh - 60px);
  padding: 106px 24px 110px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(105, 185, 143, 0.98) 0%, rgba(78, 155, 109, 0.98) 100%);
}

.hero-surface {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-surface-dots {
  opacity: 0.18;
  background-image: radial-gradient(rgba(255, 255, 255, 0.7) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.72) 18%, transparent 46%);
}

.hero-surface-lines::before,
.hero-surface-lines::after {
  content: "";
  position: absolute;
  right: -9%;
  top: 20%;
  width: 48%;
  height: 38%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  transform: rotate(-14deg);
}

.hero-surface-lines::after {
  right: -6%;
  top: 24%;
  width: 42%;
  height: 30%;
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: min(1060px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-copy {
  width: min(860px, 100%);
}

.hero-badge {
  gap: 6px;
  width: fit-content;
  margin: 0 auto 24px;
  padding: 7px 17px;
  color: #4c3900;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  color: #fff;
  font-size: 54px;
  font-weight: 850;
  line-height: 1.18;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.hero-copy p {
  max-width: 680px;
  margin: 20px auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.7;
}

.home-composer {
  width: min(1020px, 100%);
  padding: 18px;
  text-align: left;
  background: rgba(248, 253, 250, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 24px;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.13), 0 24px 70px rgba(33, 87, 55, 0.22);
  backdrop-filter: blur(16px);
}

.composer-header {
  justify-content: space-between;
  gap: 16px;
  padding: 2px 4px 14px;
}

.composer-kicker {
  display: block;
  color: #2f7d52;
  font-size: 13px;
  font-weight: 900;
}

.composer-header strong {
  color: #13231b;
  font-size: 18px;
  font-weight: 900;
}

.composer-upload {
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  color: #17392b;
  background: #e9f8f0;
  border: 1px solid rgba(104, 184, 142, 0.24);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.home-composer textarea {
  display: block;
  width: 100%;
  min-height: 128px;
  padding: 18px 20px;
  resize: vertical;
  color: #13231b;
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 18px;
  outline: none;
  font-size: 16px;
  line-height: 1.7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.home-composer textarea::placeholder {
  color: #8a9a91;
}

.reference-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.reference-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid #dfe8e2;
  border-radius: 12px;
}

.reference-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-thumb button {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}

.composer-footer {
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.composer-tools {
  flex-wrap: wrap;
  gap: 8px;
}

.icon-tool,
.select-tool > button {
  height: 42px;
  color: #20382e;
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(21, 30, 25, 0.05);
}

.icon-tool {
  display: inline-grid;
  place-items: center;
  width: 42px;
}

.select-tool {
  position: relative;
}

.select-tool > button {
  gap: 7px;
  padding: 0 12px;
}

.select-tool > button svg:last-child {
  width: 15px;
  height: 15px;
}

.select-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: none;
  min-width: 138px;
  padding: 7px;
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(21, 30, 25, 0.15);
}

.select-tool.open .select-menu {
  display: grid;
}

.select-menu button {
  height: 34px;
  padding: 0 10px;
  color: #20382e;
  text-align: left;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.select-menu button:hover,
.select-menu button.active {
  color: #0b7448;
  background: #eaf8f0;
}

.generate-button {
  flex: none;
  gap: 9px;
  height: 44px;
  padding: 0 18px;
  color: #0f2418;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(104, 184, 142, 0.32);
}

.generate-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.composer-error {
  margin-top: 12px;
  color: #c01048;
  font-size: 13px;
  font-weight: 800;
}

.composer-error[data-tone="success"] {
  color: #16774c;
}

.composer-error[data-tone="status"] {
  color: #9a9ca3;
  font-weight: 600;
}

.generation-results {
  margin-top: 18px;
}

.reverse-prompt-section {
  padding: 88px 24px 104px;
  background:
    radial-gradient(circle at 88% 12%, rgba(184, 104, 146, 0.1), transparent 28%),
    linear-gradient(180deg, #f5faf7 0%, #ffffff 100%);
}

.reverse-prompt-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 28px;
  width: min(1180px, 100%);
  margin: 0 auto;
  align-items: stretch;
}

.reverse-prompt-copy,
.reverse-prompt-tool {
  border: 1px solid rgba(104, 184, 142, 0.2);
  border-radius: 28px;
  box-shadow: 0 22px 58px rgba(21, 30, 25, 0.08);
}

.reverse-prompt-copy {
  display: flex;
  min-height: 440px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 4vw, 56px);
  background:
    radial-gradient(circle at 18% 18%, rgba(104, 184, 142, 0.13), transparent 34%),
    #fff;
}

.section-eyebrow {
  width: fit-content;
  margin-bottom: 18px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 900;
}

.reverse-prompt-copy h2 {
  max-width: 560px;
  color: #0f1d17;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 950;
  line-height: 1.08;
}

.reverse-prompt-copy p {
  max-width: 560px;
  margin-top: 22px;
  color: #62736a;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.8;
}

.reverse-prompt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.reverse-prompt-tags span {
  padding: 9px 14px;
  color: #174231;
  background: #edf8f2;
  border: 1px solid rgba(104, 184, 142, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.reverse-prompt-tool {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.reverse-upload {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 28px;
  text-align: center;
  background: #f7fcf9;
  border: 1.5px dashed rgba(104, 184, 142, 0.42);
  border-radius: 24px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.reverse-upload:hover,
.reverse-upload.dragging {
  background: #eef9f3;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.reverse-upload-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  color: #0f7b4b;
  background: #e0f5ea;
  border-radius: 18px;
}

.reverse-upload strong {
  color: #10231a;
  font-size: 22px;
  font-weight: 950;
}

.reverse-upload small {
  margin-top: 6px;
  color: #74837b;
  font-size: 14px;
  font-weight: 700;
}

.reverse-preview {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #f7fcf9;
  border: 1px solid #dfeee6;
  border-radius: 20px;
}

.reverse-preview img {
  width: 112px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
}

.reverse-preview button {
  width: fit-content;
  padding: 10px 14px;
  color: #153c2a;
  background: #fff;
  border: 1px solid #d7e7df;
  border-radius: 999px;
  font-weight: 900;
}

.reverse-submit {
  height: 58px;
  color: #0d2418;
  background: var(--primary);
  border-radius: 18px;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 16px 38px rgba(104, 184, 142, 0.28);
}

.reverse-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.reverse-message {
  padding: 13px 15px;
  color: #c03d20;
  background: #fff3ed;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 850;
}

.reverse-message[data-tone="success"] {
  color: #127349;
  background: #eaf8f0;
}

.reverse-result {
  display: grid;
  gap: 12px;
}

.reverse-result-card {
  padding: 16px;
  background: #fff;
  border: 1px solid #e0ebe5;
  border-radius: 18px;
}

.reverse-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.reverse-result-head strong {
  color: #12231b;
  font-size: 15px;
  font-weight: 950;
}

.reverse-result-head button {
  flex: none;
  height: 32px;
  padding: 0 12px;
  color: #175238;
  background: #edf8f2;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.reverse-result-card p {
  color: #53655d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
  white-space: pre-wrap;
}

.generation-result-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(21, 30, 25, 0.1);
}

.generation-result-panel.generation-failed {
  border-color: rgba(192, 16, 72, 0.18);
  background: #fffafb;
}

.generation-result-panel.generation-failed .generation-status-pill {
  color: #c01048;
  background: #fff0f4;
}

.generation-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 2px 0;
}

.generation-result-head h3 {
  margin-top: 8px;
  color: #111814;
  font-size: 18px;
  font-weight: 950;
}

.generation-result-head p {
  margin-top: 4px;
  color: #64756c;
  font-size: 13px;
  font-weight: 820;
}

.generation-status-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  color: #0b7448;
  background: #eaf8f0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.generation-soft-button,
.generation-card-actions button,
.generation-card-actions a,
.image-preview-actions a,
.image-preview-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  color: #17392b;
  background: #f4fbf7;
  border: 1px solid #dfe8e2;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 950;
}

.generation-soft-button {
  gap: 7px;
  height: 38px;
  background: #fff;
}

.generation-soft-button:hover,
.generation-card-actions button:hover,
.generation-card-actions a:hover,
.image-preview-actions a:hover,
.image-preview-actions button:hover {
  color: #0f2418;
  background: var(--primary);
  border-color: var(--primary);
}

.generation-card-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.image-preview-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.generation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 168px));
  gap: 12px;
  align-items: start;
  justify-content: start;
}

.generation-card {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 10px;
  min-width: 0;
  width: 100%;
  max-width: 168px;
  padding: 8px;
  color: #17392b;
  background: #f8fbf9;
  border: 1px solid #edf2ef;
  border-radius: 16px;
}

.generation-card img {
  width: 100%;
  height: 168px;
  aspect-ratio: auto;
  object-fit: cover;
  cursor: zoom-in;
  border-radius: 10px;
  background: #edf7f1;
}

.generation-grid.ratio-16-9 .generation-card img {
  height: 95px;
}

.generation-grid.ratio-16-9 {
  grid-template-columns: repeat(auto-fill, minmax(150px, 180px));
}

.generation-grid.ratio-16-9 .generation-card {
  max-width: 180px;
}

.generation-grid.ratio-16-9 .generation-skeleton div {
  aspect-ratio: 16 / 9;
}

.generation-grid.ratio-9-16 .generation-card img {
  height: 299px;
}

.generation-grid.ratio-9-16 {
  grid-template-columns: repeat(auto-fill, minmax(112px, 142px));
}

.generation-grid.ratio-9-16 .generation-card {
  max-width: 142px;
}

.generation-grid.ratio-9-16 .generation-skeleton div {
  aspect-ratio: 9 / 16;
}

.generation-grid.ratio-4-3 .generation-card img {
  height: 126px;
}

.generation-grid.ratio-4-3 {
  grid-template-columns: repeat(auto-fill, minmax(146px, 178px));
}

.generation-grid.ratio-4-3 .generation-card {
  max-width: 178px;
}

.generation-grid.ratio-4-3 .generation-skeleton div {
  aspect-ratio: 4 / 3;
}

.generation-grid.ratio-3-4 .generation-card img {
  height: 224px;
}

.generation-grid.ratio-3-4 {
  grid-template-columns: repeat(auto-fill, minmax(120px, 150px));
}

.generation-grid.ratio-3-4 .generation-card {
  max-width: 150px;
}

.generation-grid.ratio-3-4 .generation-skeleton div {
  aspect-ratio: 3 / 4;
}

.generation-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.generation-card-meta strong {
  overflow: hidden;
  color: #111814;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generation-card-meta span {
  flex: none;
  color: #64756c;
  font-size: 12px;
  font-weight: 850;
}

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

.album-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(21, 30, 25, 0.1);
}

.album-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 2px 0;
}

.album-head h3 {
  margin-top: 8px;
  color: #111814;
  font-size: 18px;
  font-weight: 950;
}

.album-head p {
  margin-top: 4px;
  color: #64756c;
  font-size: 13px;
  font-weight: 820;
}

.album-grid {
  display: grid;
  width: 100%;
  max-width: 906px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  justify-content: start;
}

.album-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  background: #f8fbf9;
  border: 1px solid #edf2ef;
  border-radius: 16px;
}

.album-thumb-frame {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
  background: #f7faf8;
  border: 0;
  border-radius: 10px;
}

.album-thumb-frame::before {
  position: absolute;
  inset: -14px;
  background-image: inherit;
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(16px);
  opacity: 0.22;
  transform: scale(1.08);
}

.album-thumb-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
}

.album-card[data-ratio="9-16"] .album-thumb-frame {
  aspect-ratio: 9 / 16;
}

.album-card[data-ratio="3-4"] .album-thumb-frame {
  aspect-ratio: 3 / 4;
}

.album-card[data-ratio="16-9"] .album-thumb-frame {
  aspect-ratio: 16 / 9;
}

.album-card[data-ratio="4-3"] .album-thumb-frame {
  aspect-ratio: 4 / 3;
}

.album-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.album-card-meta strong {
  overflow: hidden;
  color: #111814;
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card-meta span {
  flex: none;
  color: #64756c;
  font-size: 11px;
  font-weight: 850;
}

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

.album-card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 6px;
  color: #17392b;
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 950;
}

.album-card-actions button:hover {
  color: #0f2418;
  background: var(--primary);
  border-color: var(--primary);
}

.album-card-actions .album-delete-button {
  color: #b94222;
  background: #fff7f3;
  border-color: #f2d8cd;
}

.album-card-actions .album-delete-button:hover {
  color: #fff;
  background: #d85b35;
  border-color: #d85b35;
}

.album-card-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.album-empty {
  grid-column: 1 / -1;
  padding: 22px;
  color: #64756c;
  background: #f8fbf9;
  border: 1px dashed #dfe8e2;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.album-progress {
  display: grid;
  gap: 8px;
  padding: 0 2px 2px;
}

.album-progress-track {
  overflow: hidden;
  height: 10px;
  background: #edf7f1;
  border: 1px solid #dcebe3;
  border-radius: 999px;
}

.album-progress-track span {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, #65bd8e, #9ee5b9, #65bd8e);
  border-radius: inherit;
  animation: albumProgress 1.45s ease-in-out infinite;
}

.album-progress small {
  color: #64756c;
  font-size: 12px;
  font-weight: 820;
}

.generation-skeleton {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #f8fbf9;
  border: 1px solid #edf2ef;
  border-radius: 16px;
}

.album-grid.ratio-16-9 .generation-skeleton {
  width: 220px;
}

.album-grid.ratio-4-3 .generation-skeleton {
  width: 190px;
}

.album-grid.ratio-3-4 .generation-skeleton,
.album-grid.ratio-9-16 .generation-skeleton {
  width: 150px;
}

.generation-skeleton div,
.generation-skeleton span,
.generation-skeleton small {
  display: block;
  overflow: hidden;
  background: linear-gradient(90deg, #edf7f1, #fff, #edf7f1);
  background-size: 220% 100%;
  border-radius: 11px;
  animation: generationPulse 1.2s ease-in-out infinite;
}

.generation-skeleton div {
  aspect-ratio: 1 / 1;
}

.generation-skeleton span {
  width: 62%;
  height: 16px;
}

.generation-skeleton small {
  width: 86%;
  height: 34px;
}

@keyframes generationPulse {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 220% 50%;
  }
}

@keyframes albumProgress {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(250%);
  }
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 18, 15, 0.7);
  backdrop-filter: blur(5px);
}

.image-preview-modal[hidden] {
  display: none;
}

.image-preview-dialog {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 86px rgba(12, 18, 15, 0.38);
}

.image-preview-dialog img {
  width: 100%;
  max-height: calc(100vh - 148px);
  object-fit: contain;
  background: #f4fbf7;
  border-radius: 12px;
}

.image-preview-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: rgba(16, 24, 20, 0.72);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.image-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.image-preview-actions .image-preview-download-button {
  min-width: 148px;
  height: 46px;
  padding: 0 24px;
  color: #10281c;
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 13px;
  box-shadow: 0 14px 32px rgba(104, 184, 142, 0.3);
  font-size: 15px;
}

.image-preview-actions .image-preview-download-button:hover {
  color: #10281c;
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 16px 36px rgba(104, 184, 142, 0.38);
}

.canvas-route {
  padding-bottom: 0;
  overflow: hidden;
  background: #f4f8f5;
}

.canvas-page {
  height: 100vh;
  color: #12231a;
  background: #f4f8f5;
}

.canvas-topbar {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  height: 58px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e1e9e4;
  backdrop-filter: blur(12px);
}

.canvas-brand,
.canvas-back-home,
.canvas-project-pill,
.canvas-bottom-dock,
.canvas-zoom-dock,
.canvas-composer,
.canvas-result-grid a {
  display: flex;
  align-items: center;
}

.canvas-brand {
  gap: 10px;
  font-size: 18px;
  font-weight: 950;
}

.canvas-brand .brand-logo-img {
  height: 23px;
}

.canvas-project-pill {
  justify-self: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  color: #17392b;
  background: #eff8f3;
  border: 1px solid #d8e8df;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
}

.canvas-back-home {
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  color: #17392b;
  background: #fff;
  border: 1px solid #dfe8e2;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.canvas-shell {
  position: relative;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  height: calc(100vh - 58px);
  overflow: hidden;
}

.canvas-sidebar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid #dfe8e2;
}

.canvas-helper {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  background: #f0faf5;
  border: 1px solid #d8e8df;
  border-radius: 16px;
}

.canvas-helper img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.canvas-helper strong,
.canvas-message span,
.canvas-node span,
.canvas-result-state {
  display: block;
  color: #163629;
  font-weight: 950;
}

.canvas-helper p,
.canvas-message p,
.canvas-node p {
  margin-top: 5px;
  color: #64756c;
  font-size: 13px;
  line-height: 1.65;
}

.canvas-chat {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.canvas-message {
  max-width: 92%;
  padding: 13px 14px;
  border-radius: 16px;
  font-size: 14px;
}

.canvas-message.user {
  align-self: flex-end;
  color: #10281c;
  background: #daf2e6;
}

.canvas-message.assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #dfe8e2;
}

.canvas-composer {
  gap: 10px;
  padding: 10px;
  background: #f7fbf8;
  border: 1px solid #dfe8e2;
  border-radius: 16px;
}

.canvas-composer textarea {
  min-width: 0;
  flex: 1;
  height: 42px;
  resize: none;
  color: #13231b;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
  line-height: 1.5;
}

.canvas-composer button {
  flex: none;
  height: 38px;
  padding: 0 13px;
  color: #0f2418;
  background: var(--primary);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 950;
}

.canvas-composer button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.canvas-board {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #eef5f0;
}

.canvas-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.58;
  background-image:
    linear-gradient(rgba(77, 113, 93, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 113, 93, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
}

.canvas-empty {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 1;
  width: min(360px, 70%);
  color: #76877e;
  text-align: center;
  transform: translate(-50%, -50%);
}

.canvas-empty strong {
  display: block;
  color: #53665c;
  font-size: 26px;
  font-weight: 950;
}

.canvas-empty p {
  margin-top: 8px;
  font-size: 14px;
}

.canvas-node,
.canvas-result-node {
  position: absolute;
  z-index: 2;
  width: 240px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dce8e1;
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(21, 30, 25, 0.12);
}

.prompt-node {
  top: 94px;
  left: 70px;
}

.canvas-reference-nodes .reference-node {
  top: 285px;
  left: 190px;
}

.reference-node img {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-top: 10px;
  object-fit: cover;
  border-radius: 10px;
}

.canvas-result-node {
  top: 170px;
  right: 86px;
  width: 310px;
  min-height: 186px;
}

.canvas-result-state {
  margin-top: 9px;
  color: #2f7d52;
  font-size: 14px;
}

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

.canvas-result-grid a {
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: #17392b;
  font-size: 12px;
  font-weight: 850;
}

.canvas-result-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: #edf7f1;
}

.canvas-bottom-dock,
.canvas-zoom-dock {
  position: absolute;
  z-index: 5;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dfe8e2;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(21, 30, 25, 0.12);
  backdrop-filter: blur(12px);
}

.canvas-bottom-dock {
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
}

.canvas-bottom-dock button,
.canvas-zoom-dock button {
  height: 34px;
  padding: 0 12px;
  color: #20382e;
  background: #f4fbf7;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
}

.canvas-zoom-dock {
  right: 18px;
  bottom: 18px;
}

.canvas-zoom-dock strong {
  min-width: 42px;
  color: #20382e;
  text-align: center;
  font-size: 13px;
}

.membership-route,
.admin-route {
  min-height: 100vh;
  background: #f7fbf8;
}

.simple-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e1e9e4;
  backdrop-filter: blur(12px);
}

.membership-route .simple-topbar {
  background: #151715;
  border-bottom: 0;
  box-shadow: 0 10px 28px rgba(16, 24, 20, 0.18);
}

.membership-route .simple-topbar .canvas-brand {
  color: #fff;
}

.membership-route .simple-topbar .canvas-back-home {
  color: #10281c;
  background: var(--primary);
  border-color: var(--primary);
}

.membership-page {
  min-height: 100vh;
  color: #12231a;
}

.membership-hero {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0 56px;
  text-align: center;
}

.membership-hero span,
.admin-header span {
  color: #2f7d52;
  font-size: 13px;
  font-weight: 950;
}

.membership-hero h1,
.admin-header h1 {
  margin-top: 8px;
  color: #111814;
  font-size: 42px;
  font-weight: 950;
  line-height: 1.2;
}

.membership-hero p {
  display: none;
  margin-top: 12px;
  color: #64756c;
  font-weight: 700;
}

.member-layout {
  display: grid;
  gap: 22px;
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 80px;
}

.member-login-panel,
.member-balance-card,
.member-section,
.member-record-panel,
.admin-panel,
.admin-login-panel,
.admin-stats div {
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(104, 184, 142, 0.08);
}

.member-login-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.member-login-panel[hidden],
.member-overview[hidden],
.member-records[hidden] {
  display: none;
}

.member-login-panel h2,
.member-section-head h2 {
  color: #111814;
  font-size: 22px;
  font-weight: 950;
}

.member-login-panel p,
.member-section-head p {
  color: #64756c;
  font-size: 14px;
  font-weight: 750;
}

.member-login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  gap: 10px;
}

.member-login-form input {
  height: 42px;
  min-width: 0;
  padding: 0 13px;
  color: #13231b;
  background: #f8fcfa;
  border: 1px solid #dfe8e2;
  border-radius: 12px;
  outline: 0;
}

.member-login-form button,
.member-balance-card button {
  height: 42px;
  padding: 0 16px;
  color: #0f2418;
  background: var(--primary);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 950;
}

.member-login-form button:nth-of-type(2) {
  background: #eaf8f0;
}

.member-login-form button:disabled,
.member-balance-card button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.member-message {
  color: #c01048;
  font-size: 13px;
  font-weight: 850;
}

.member-message[data-tone="success"] {
  color: #16774c;
}

.member-overview {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 16px;
}

.member-balance-card {
  display: grid;
  gap: 8px;
  min-height: 168px;
  padding: 22px;
}

.member-balance-card.primary {
  color: #fff;
  background: #101814;
  border-color: #101814;
}

.member-balance-card span,
.member-section-head span {
  color: #2f7d52;
  font-size: 13px;
  font-weight: 950;
}

.member-balance-card.primary span,
.member-balance-card.primary p {
  color: rgba(255, 255, 255, 0.68);
}

.member-balance-card strong {
  color: #111814;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.member-balance-card.primary strong {
  color: #fff;
}

.member-balance-card p {
  color: #64756c;
  font-size: 13px;
  font-weight: 750;
}

.member-balance-card button {
  align-self: end;
  width: fit-content;
}

.member-section,
.member-record-panel {
  padding: 22px;
}

.pricing-section {
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.member-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.member-section-head.small {
  margin-bottom: 12px;
}

.member-section-head.small h2 {
  font-size: 18px;
}

.recharge-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  color: #20382e;
  background: #f4fbf7;
  border: 1px solid #dfe9e4;
  border-radius: 14px;
}

.recharge-note div {
  display: grid;
  gap: 4px;
}

.recharge-note strong {
  color: #111814;
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.recharge-note span {
  color: #64756c;
  font-size: 14px;
  font-weight: 800;
}

.recharge-note button {
  flex: none;
  height: 40px;
  padding: 0 16px;
  color: #0f2418;
  background: var(--primary);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 950;
}

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

.membership-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 24px;
  min-height: 610px;
  padding: 44px 36px 32px;
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(45, 92, 66, 0.06);
}

.membership-card.current,
.membership-card.popular {
  border-color: #68b88e;
  box-shadow: 0 16px 38px rgba(104, 184, 142, 0.16);
}

.current-ribbon {
  position: absolute;
  top: 14px;
  right: 16px;
  display: grid;
  place-items: center;
  height: 28px;
  padding: 0 12px;
  color: #17392b;
  background: #edf8f2;
  border: 1px solid #cfebdc;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.popular-ribbon {
  position: absolute;
  top: -18px;
  left: 50%;
  display: grid;
  place-items: center;
  height: 36px;
  padding: 0 24px;
  color: #17392b;
  background: var(--primary);
  border-radius: 999px;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.plan-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.plan-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #2f8c5c;
  background: #f0faf5;
  border-radius: 12px;
}

.membership-card.popular .plan-icon {
  color: #10281c;
  background: var(--primary);
}

.plan-icon svg {
  width: 28px;
  height: 28px;
}

.membership-card h2 {
  color: #111814;
  font-size: 26px;
  font-weight: 950;
  line-height: 1.15;
}

.membership-card em,
.membership-card small {
  display: block;
  margin-top: 6px;
  color: #ff7a1a;
  font-size: 14px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.35;
}

.membership-card em {
  color: #2f8c5c;
}

.membership-card strong {
  color: #111814;
  font-size: 54px;
  font-weight: 950;
  line-height: 1;
}

.membership-card .plan-credit {
  color: #2f8c5c;
  font-size: 20px;
  font-weight: 950;
}

.membership-card ul {
  display: grid;
  align-content: start;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.membership-card li {
  position: relative;
  padding-left: 32px;
  color: #26343d;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.45;
}

.membership-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #58b683;
  font-weight: 950;
}

.membership-card.popular li:last-child,
.membership-card:nth-child(4) li:last-child {
  color: #2f8c5c;
  font-weight: 950;
}

.membership-card button,
.admin-header button,
.admin-login-panel button,
.admin-table button {
  height: 56px;
  padding: 0 14px;
  color: #2f8c5c;
  background: #fff;
  border: 1px solid rgba(104, 184, 142, 0.5);
  border-radius: 12px;
  font-size: 20px;
  font-weight: 950;
}

.membership-card button:hover {
  color: #10281c;
  background: var(--primary);
}

.admin-header button,
.admin-login-panel button,
.admin-table button {
  height: 38px;
  color: #0f2418;
  background: var(--primary);
  border: 0;
  font-size: 13px;
}

.membership-card button:disabled,
.admin-login-panel button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.membership-plans-dialog {
  position: relative;
  display: grid;
  gap: 20px;
  width: min(1120px, calc(100vw - 48px));
  max-height: min(82vh, 780px);
  padding: 30px;
  overflow: auto;
  color: #12231a;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 253, 250, 0.98) 58%, rgba(255, 247, 251, 0.96) 100%);
  border: 1px solid rgba(215, 231, 223, 0.95);
  border-radius: 30px;
  box-shadow: 0 34px 90px rgba(10, 18, 14, 0.22);
}

.membership-plans-head {
  display: grid;
  gap: 6px;
  padding: 0 48px 2px 2px;
}

.membership-plans-head span {
  color: #2f8c5c;
  font-size: 13px;
  font-weight: 950;
}

.membership-plans-head h2 {
  color: #111814;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.15;
}

.membership-plans-head p {
  color: #64756c;
  font-size: 14px;
  font-weight: 720;
}

.membership-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.membership-card.compact {
  gap: 14px;
  min-height: 440px;
  padding: 24px 20px 20px;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(45, 92, 66, 0.08);
}

.membership-card.compact .popular-ribbon {
  top: -14px;
  height: 28px;
  padding: 0 14px;
  font-size: 12px;
}

.membership-card.compact .current-ribbon {
  top: 12px;
  right: 12px;
}

.membership-card.compact .plan-head {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
}

.membership-card.compact .plan-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.membership-card.compact .plan-icon svg {
  width: 22px;
  height: 22px;
}

.membership-card.compact h2 {
  font-size: 20px;
}

.membership-card.compact em,
.membership-card.compact small {
  margin-top: 4px;
  font-size: 12px;
}

.membership-card.compact > strong {
  font-size: 42px;
}

.membership-card.compact .plan-credit {
  font-size: 16px;
}

.membership-card.compact ul {
  gap: 10px;
}

.membership-card.compact li {
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.38;
}

.membership-card.compact button {
  height: 42px;
  border-radius: 14px;
  font-size: 15px;
}

.member-records,
.admin-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.record-list,
.admin-activity-list {
  display: grid;
  gap: 8px;
}

.record-row,
.admin-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  background: #f8fbf9;
  border: 1px solid #edf2ef;
  border-radius: 12px;
}

.record-row div,
.admin-activity-row div {
  min-width: 0;
}

.record-row strong,
.admin-activity-row strong {
  display: block;
  overflow: hidden;
  color: #20382e;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-row span,
.admin-activity-row span {
  display: block;
  overflow: hidden;
  color: #64756c;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-row b,
.admin-activity-row b {
  color: #111814;
  font-size: 14px;
}

.record-row b.positive,
.admin-activity-row b.positive {
  color: #16774c;
}

.record-row b.negative,
.admin-activity-row b.negative {
  color: #c01048;
}

.record-row em,
.admin-activity-row em {
  padding: 4px 8px;
  color: #0b7448;
  background: #eaf8f0;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.record-empty {
  padding: 14px;
  color: #64756c;
  background: #f8fbf9;
  border: 1px solid #edf2ef;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.empty-panel {
  grid-column: 1 / -1;
  padding: 24px;
  color: #64756c;
  font-weight: 800;
}

.admin-page {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  color: #12231a;
}

.admin-sidebar {
  padding: 22px;
  background: #fff;
  border-right: 1px solid #e1e9e4;
}

.admin-sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.admin-sidebar nav a {
  padding: 10px 12px;
  color: #20382e;
  background: #f4fbf7;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 850;
}

.admin-main {
  min-width: 0;
  padding: 28px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-login-panel {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  padding: 24px;
}

.admin-login-panel[hidden],
#adminContent[hidden] {
  display: none;
}

.admin-login-panel h2,
.admin-panel h2 {
  color: #111814;
  font-size: 22px;
  font-weight: 950;
}

.admin-login-panel input {
  height: 44px;
  padding: 0 14px;
  color: #13231b;
  background: #f7fbf8;
  border: 1px solid #dfe8e2;
  border-radius: 12px;
  outline: 0;
}

.admin-login-panel p {
  min-height: 18px;
  color: #c01048;
  font-size: 13px;
  font-weight: 800;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-stats div {
  padding: 18px;
}

.admin-stats span {
  color: #64756c;
  font-size: 13px;
  font-weight: 800;
}

.admin-stats strong {
  display: block;
  margin-top: 8px;
  color: #111814;
  font-size: 28px;
  font-weight: 950;
}

.admin-panel {
  overflow: hidden;
}

.admin-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid #edf2ef;
}

.admin-panel-head span {
  color: #64756c;
  font-size: 13px;
  font-weight: 800;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #edf2ef;
  white-space: nowrap;
}

.admin-table th {
  color: #64756c;
  background: #f8fbf9;
  font-size: 12px;
  font-weight: 950;
}

.admin-table td {
  color: #20382e;
  font-size: 14px;
  font-weight: 750;
}

.admin-table td:last-child {
  display: flex;
  gap: 8px;
}

.admin-route {
  background:
    radial-gradient(circle at 24% 0%, rgba(104, 184, 142, 0.12), transparent 34%),
    #f5faf7;
}

.admin-page {
  grid-template-columns: 268px minmax(0, 1fr);
}

.admin-page:not(.admin-authenticated) {
  display: block;
}

.admin-page:not(.admin-authenticated) .admin-sidebar,
.admin-page:not(.admin-authenticated) .admin-header {
  display: none;
}

.admin-page:not(.admin-authenticated) .admin-main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 18px;
  color: #dfeee7;
  background: #101814;
  border-right: 0;
}

.admin-brand {
  color: #fff;
}

.admin-sidebar .brand-icon {
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

.admin-sidebar-label {
  margin: 26px 8px 8px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.admin-sidebar nav {
  gap: 10px;
  margin-top: 0;
}

.admin-sidebar nav a {
  display: grid;
  gap: 2px;
  padding: 13px 14px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
}

.admin-sidebar nav a.active,
.admin-sidebar nav a:hover {
  color: #fff;
  background: rgba(104, 184, 142, 0.16);
  border-color: rgba(104, 184, 142, 0.2);
}

.admin-sidebar nav a span {
  font-size: 14px;
  font-weight: 950;
}

.admin-sidebar nav a small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-weight: 750;
}

.admin-sidebar-note {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding: 16px;
  background: rgba(104, 184, 142, 0.12);
  border: 1px solid rgba(104, 184, 142, 0.18);
  border-radius: 16px;
}

.admin-sidebar-note strong {
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.admin-sidebar-note p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.admin-main {
  padding: 32px;
}

.admin-header {
  align-items: flex-start;
  margin-bottom: 24px;
}

.admin-header h1 {
  margin-top: 6px;
  font-size: 34px;
}

.admin-header p {
  margin-top: 8px;
  color: #64756c;
  font-size: 14px;
  font-weight: 750;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-header button,
.admin-ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  color: #10281c;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 950;
}

.admin-ghost-button {
  color: #20382e;
  background: #fff;
  border-color: #dfe9e4;
}

.admin-command-center {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(104, 184, 142, 0.2), transparent 48%),
    #101814;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(16, 24, 20, 0.18);
}

.admin-command-center span {
  color: #68b88e;
  font-size: 13px;
  font-weight: 950;
}

.admin-command-center h2 {
  margin-top: 8px;
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.2;
}

.admin-command-center p {
  max-width: 720px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 750;
}

.admin-stats {
  gap: 16px;
}

.admin-stats div {
  position: relative;
  min-height: 126px;
  padding: 20px;
  overflow: hidden;
}

.admin-stats div::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 86px;
  height: 86px;
  background: rgba(104, 184, 142, 0.14);
  border-radius: 50%;
}

.admin-stats span {
  color: #2f7d52;
  font-weight: 950;
}

.admin-stats strong {
  font-size: 34px;
}

.admin-stats small {
  display: block;
  margin-top: 8px;
  color: #64756c;
  font-size: 12px;
  font-weight: 800;
}

.admin-system-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0 20px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 96% 0%, rgba(104, 184, 142, 0.16), transparent 32%),
    #fff;
  border: 1px solid #dfe9e4;
}

.admin-system-panel span {
  color: #2f7d52;
  font-size: 13px;
  font-weight: 950;
}

.admin-system-panel h2 {
  margin-top: 6px;
  color: #101814;
  font-size: 24px;
  font-weight: 950;
}

.admin-system-panel p {
  margin-top: 8px;
  color: #64756c;
  font-size: 14px;
  font-weight: 780;
}

.admin-system-panel button {
  min-width: 128px;
  height: 48px;
  padding: 0 22px;
  color: #102118;
  background: #68b88e;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
}

.admin-system-panel button.danger {
  color: #fff;
  background: #d95f45;
}

.admin-system-panel button.primary {
  color: #102118;
  background: #68b88e;
}

.admin-danger-panel {
  border-color: rgba(212, 75, 53, 0.18);
  background:
    radial-gradient(circle at 96% 0%, rgba(212, 75, 53, 0.1), transparent 32%),
    #fff;
}

.admin-danger-panel span {
  color: #c2412d;
}

.admin-danger-panel button {
  color: #fff;
  background: #d44b35;
}

.admin-panel {
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(45, 92, 66, 0.07);
}

.admin-panel-head {
  align-items: center;
}

.admin-panel-head h2 {
  font-size: 20px;
}

.admin-table-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-table-tools input,
.admin-table-tools select {
  height: 38px;
  min-width: 160px;
  padding: 0 12px;
  color: #20382e;
  background: #f8fbf9;
  border: 1px solid #dfe9e4;
  border-radius: 12px;
  outline: 0;
  font-size: 13px;
  font-weight: 850;
}

.admin-table th {
  background: #f4fbf7;
}

.admin-table td {
  height: 72px;
  vertical-align: middle;
}

.admin-id-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  color: #64756c;
  background: #f4fbf7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.admin-user-cell {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.admin-user-cell > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: #101814;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 950;
}

.admin-user-cell strong,
.admin-user-cell small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-cell strong {
  color: #111814;
  font-size: 14px;
  font-weight: 950;
}

.admin-user-cell small {
  color: #64756c;
  font-size: 12px;
  font-weight: 750;
}

.admin-risk-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  height: 22px;
  margin-top: 6px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.admin-risk-chip.watch {
  color: #8b5a00;
  background: #fff6dd;
  border: 1px solid #f5d48a;
}

.admin-risk-chip.blocked {
  color: #b42318;
  background: #fff1ec;
  border: 1px solid #ffc9bd;
}

.admin-credit-value {
  color: #111814;
  font-size: 15px;
  font-weight: 950;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.admin-status-pill.member {
  color: #0b7448;
  background: #eaf8f0;
}

.admin-status-pill.admin {
  color: #10281c;
  background: var(--primary);
}

.admin-status-pill.normal {
  color: #64756c;
  background: #f2f5f3;
}

.admin-status-pill.danger {
  color: #c2412d;
  background: #fff1ec;
}

.admin-users-table th:last-child,
.admin-users-table td:last-child {
  min-width: 340px;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
  min-width: 240px;
}

.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3) {
  min-width: 96px;
}

.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4),
.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5) {
  min-width: 82px;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-table button {
  height: 34px;
  padding: 0 12px;
  color: #0f2418;
  background: #eaf8f0;
  border: 1px solid rgba(104, 184, 142, 0.42);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 950;
}

.admin-table button.primary {
  background: var(--primary);
  border-color: var(--primary);
}

.admin-table button.danger {
  color: #c2412d;
  background: #fff7f3;
  border-color: #ffd3c6;
}

.admin-table button.danger:hover {
  color: #fff;
  background: #d44b35;
  border-color: #d44b35;
}

.admin-activity-row b.neutral {
  color: #64756c;
}

.admin-table button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.admin-activity-grid {
  margin-top: 18px;
}

.admin-activity-grid > .admin-panel:only-child {
  grid-column: 1 / -1;
}

.admin-activity-row {
  min-height: 62px;
  background: #fff;
}

.admin-section-panel[hidden] {
  display: none;
}

.admin-product-agent-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background:
    radial-gradient(circle at 92% 10%, rgba(43, 209, 232, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(104, 184, 142, 0.2), transparent 52%),
    #101814;
}

.admin-agent-privacy {
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
}

.admin-agent-privacy strong {
  color: #dffaf4;
  font-size: 13px;
  font-weight: 950;
}

.admin-agent-privacy span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 750;
}

.admin-product-agent-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.admin-product-agent-stats > div {
  min-height: 126px;
  padding: 20px;
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(45, 92, 66, 0.07);
}

.admin-product-agent-stats > .admin-agent-load-error {
  grid-column: 1 / -1;
}

.admin-product-agent-stats span {
  color: #2f7d52;
  font-size: 13px;
  font-weight: 950;
}

.admin-product-agent-stats strong {
  display: block;
  margin-top: 8px;
  color: #111814;
  font-size: 34px;
  font-weight: 950;
}

.admin-product-agent-stats small {
  display: block;
  margin-top: 8px;
  color: #64756c;
  font-size: 11px;
  font-weight: 780;
}

.admin-product-agent-rules,
.admin-product-agent-products,
.admin-product-agent-activity {
  margin-bottom: 18px;
}

.admin-agent-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.admin-agent-rule {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 15px;
  background: #f7fbf8;
  border: 1px solid #e1ece6;
  border-radius: 14px;
}

.admin-agent-rule > i {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  background: #39b978;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(57, 185, 120, 0.12);
}

.admin-agent-rule strong {
  color: #14271d;
  font-size: 13px;
  font-weight: 950;
}

.admin-agent-rule p {
  margin-top: 5px;
  color: #64756c;
  font-size: 11px;
  font-weight: 730;
  line-height: 1.6;
}

.admin-agent-rule > span {
  color: #238556;
  font-size: 10px;
  font-weight: 950;
}

.admin-product-agent-table th:nth-child(1),
.admin-product-agent-table td:nth-child(1),
.admin-product-agent-table th:nth-child(2),
.admin-product-agent-table td:nth-child(2) {
  min-width: 180px;
}

.admin-product-agent-table th:nth-child(3),
.admin-product-agent-table td:nth-child(3),
.admin-product-agent-table th:nth-child(4),
.admin-product-agent-table td:nth-child(4),
.admin-product-agent-table th:nth-child(5),
.admin-product-agent-table td:nth-child(5) {
  min-width: 150px;
}

.admin-product-agent-table th:nth-child(6),
.admin-product-agent-table td:nth-child(6) {
  min-width: 128px;
}

.admin-product-agent-table td:last-child {
  display: table-cell;
  min-width: 138px;
}

.admin-agent-user-cell,
.admin-agent-product-cell {
  display: grid;
  gap: 4px;
}

.admin-agent-user-cell strong,
.admin-agent-product-cell strong {
  max-width: 210px;
  overflow: hidden;
  color: #16261e;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-agent-user-cell small,
.admin-agent-product-cell small,
.admin-product-agent-table td > small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: #718078;
  font-size: 10px;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-agent-number {
  display: block;
  color: #1e6d49;
  font-size: 18px;
  font-weight: 950;
}

.admin-agent-number.warn {
  color: #bd5c2d;
}

.admin-agent-status {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.admin-agent-status.review {
  color: #aa3b2d;
  background: #fff0eb;
}

.admin-agent-status.pending {
  color: #8b5a00;
  background: #fff6dd;
}

.admin-agent-status.learning {
  color: #23618b;
  background: #eaf5fb;
}

.admin-agent-status.base {
  color: #68756e;
  background: #f0f4f2;
}

.admin-agent-status.ready {
  color: #0b7448;
  background: #eaf8f0;
}

.admin-product-agent-table time {
  color: #64756c;
  font-size: 11px;
  font-weight: 780;
}

.admin-agent-activity-list {
  display: grid;
}

.admin-agent-activity-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 20px;
  border-bottom: 1px solid #edf2ef;
}

.admin-agent-activity-row:last-child {
  border-bottom: 0;
}

.admin-agent-activity-mark {
  width: 8px;
  height: 8px;
  background: #68b88e;
  border-radius: 50%;
}

.admin-agent-activity-mark.corrected,
.admin-agent-activity-mark.removed {
  background: #e08a55;
}

.admin-agent-activity-mark.dismissed {
  background: #9aa49f;
}

.admin-agent-activity-row strong {
  color: #17271f;
  font-size: 12px;
  font-weight: 950;
}

.admin-agent-activity-row p {
  margin-top: 4px;
  color: #718078;
  font-size: 10px;
  font-weight: 750;
}

.admin-agent-activity-row time {
  color: #87928c;
  font-size: 10px;
  font-weight: 750;
}

.admin-interface-hero {
  background:
    linear-gradient(135deg, rgba(124, 60, 255, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(104, 184, 142, 0.22), transparent 56%),
    #101814;
}

.admin-credit-hero {
  background:
    linear-gradient(135deg, rgba(104, 184, 142, 0.22), transparent 48%),
    linear-gradient(135deg, rgba(16, 24, 20, 0.92), rgba(16, 24, 20, 0.98)),
    #101814;
}

.admin-credit-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.admin-credit-overview div {
  min-height: 128px;
  padding: 20px;
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(45, 92, 66, 0.07);
}

.admin-credit-overview span {
  color: #2f7d52;
  font-size: 13px;
  font-weight: 950;
}

.admin-credit-overview strong {
  display: block;
  margin-top: 10px;
  color: #111814;
  font-size: 32px;
  font-weight: 950;
}

.admin-credit-overview strong.positive {
  color: #16774c;
}

.admin-credit-overview strong.negative {
  color: #c01048;
}

.admin-credit-overview small {
  display: block;
  margin-top: 10px;
  color: #64756c;
  font-size: 12px;
  font-weight: 800;
}

.admin-credit-tools input[type="date"] {
  min-width: 138px;
}

.admin-filter-reset {
  height: 38px;
  padding: 0 14px;
  color: #20382e;
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 950;
}

.admin-credit-ledger-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.admin-credit-ledger-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #edf2ef;
  border-radius: 16px;
}

.admin-credit-ledger-row:hover {
  border-color: rgba(104, 184, 142, 0.42);
  box-shadow: 0 14px 34px rgba(45, 92, 66, 0.08);
}

.admin-credit-ledger-sign {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #64756c;
  background: #f2f5f3;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 950;
}

.admin-credit-ledger-row.consume .admin-credit-ledger-sign {
  color: #c01048;
  background: #fff1f4;
}

.admin-credit-ledger-row.income .admin-credit-ledger-sign,
.admin-credit-ledger-row.manual .admin-credit-ledger-sign,
.admin-credit-ledger-row.refund .admin-credit-ledger-sign {
  color: #16774c;
  background: #eaf8f0;
}

.admin-credit-ledger-main {
  min-width: 0;
}

.admin-credit-ledger-main strong {
  display: block;
  overflow: hidden;
  color: #14281e;
  font-size: 15px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-credit-ledger-main span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #64756c;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-credit-ledger-main small {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  color: #2f7d52;
  background: #eef8f2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.admin-credit-ledger-row em {
  padding: 6px 10px;
  color: #64756c;
  background: #f2f5f3;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.admin-credit-ledger-row.consume em {
  color: #c01048;
  background: #fff1f4;
}

.admin-credit-ledger-row.income em,
.admin-credit-ledger-row.manual em,
.admin-credit-ledger-row.refund em {
  color: #16774c;
  background: #eaf8f0;
}

.admin-credit-ledger-row time {
  color: #64756c;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.admin-credit-ledger-row b {
  min-width: 86px;
  color: #64756c;
  font-size: 18px;
  font-weight: 950;
  text-align: right;
}

.admin-credit-ledger-row.consume b {
  color: #c01048;
}

.admin-credit-ledger-row.income b,
.admin-credit-ledger-row.manual b,
.admin-credit-ledger-row.refund b {
  color: #16774c;
}

.admin-interface-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.admin-interface-card {
  min-height: 150px;
  padding: 22px;
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(45, 92, 66, 0.07);
}

.admin-interface-card.primary {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(104, 184, 142, 0.2), transparent 52%),
    #101814;
  border-color: transparent;
}

.admin-interface-card span {
  color: #2f7d52;
  font-size: 13px;
  font-weight: 950;
}

.admin-interface-card.primary span {
  color: #68b88e;
}

.admin-interface-card strong {
  display: block;
  margin-top: 14px;
  color: #111814;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.1;
}

.admin-interface-card.primary strong {
  color: #fff;
}

.admin-interface-card p {
  margin-top: 12px;
  color: #64756c;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.6;
}

.admin-interface-card.primary p {
  color: rgba(255, 255, 255, 0.66);
}

.admin-interface-table code {
  display: inline-block;
  max-width: 300px;
  overflow: hidden;
  color: #20382e;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-cost-panel {
  margin-top: 18px;
}

.admin-cost-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.admin-cost-grid div {
  min-height: 116px;
  padding: 18px;
  background: #f8fbf9;
  border: 1px solid #edf2ef;
  border-radius: 14px;
}

.admin-cost-grid span,
.admin-cost-grid small {
  display: block;
  color: #64756c;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.admin-cost-grid strong {
  display: block;
  margin: 12px 0 8px;
  color: #111814;
  font-size: 22px;
  font-weight: 950;
}

.admin-login-panel {
  width: min(440px, 100%);
  margin: 80px auto 0;
  padding: 28px;
}

.admin-login-panel > span {
  color: #2f7d52;
  font-size: 13px;
  font-weight: 950;
}

.admin-login-tip {
  min-height: 0;
  color: #64756c !important;
  font-size: 13px !important;
  line-height: 1.55;
}

.home-section-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.case-waterfall-section,
.more-tools-section,
.home-final-section {
  padding: 92px 0;
}

.case-waterfall-section {
  background: #f5faf7;
}

.more-tools-section {
  background: #fff;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.center-heading {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading span {
  display: inline-block;
  margin-bottom: 10px;
  color: #2f7d52;
  font-size: 13px;
  font-weight: 950;
}

.section-heading h2 {
  color: #111814;
  font-size: 34px;
  font-weight: 950;
  line-height: 1.2;
}

.section-heading p {
  margin-top: 12px;
  color: #64756c;
  font-size: 15px;
  line-height: 1.8;
}

.case-waterfall-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
}

.case-card,
.tool-card {
  position: relative;
  overflow: hidden;
  color: inherit;
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(104, 184, 142, 0.08);
  transition: transform 0.18s, box-shadow 0.18s;
}

.case-card:hover,
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(104, 184, 142, 0.16);
}

.case-card-featured {
  grid-row: span 2;
}

.case-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #edf7f1;
}

.case-card-featured .case-image {
  aspect-ratio: 4 / 5;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pair-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}

.pair-image div {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.pair-image span,
.slider-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(17, 24, 20, 0.66);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pair-image div + div span,
.slider-label.right {
  right: 10px;
  left: auto;
}

.slider-image i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.case-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 5px 10px;
  color: #102016;
  background: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.case-body {
  padding: 22px;
}

.case-body h3,
.tool-card h3 {
  color: #111814;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.25;
}

.case-body p,
.tool-card p {
  margin-top: 9px;
  color: #64756c;
  font-size: 14px;
  line-height: 1.7;
}

.case-flow {
  gap: 8px;
  margin-top: 16px;
  color: #718278;
  font-size: 13px;
  font-weight: 800;
}

.case-flow strong {
  color: #2f7d52;
}

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

.tool-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 156px;
  padding: 18px;
}

.tool-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 16px;
}

.tool-card > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #2f7d52;
  background: #f0fbf5;
  border-radius: 999px;
  font-weight: 900;
}

.canvas-flow-section {
  padding: 96px 0;
  color: #fff;
  background: #102018;
}

.canvas-flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 44px;
}

.canvas-ui-preview {
  overflow: hidden;
  background: #f4fbf7;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.canvas-shot-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 14px;
  color: #17392b;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #e3eee8;
}

.canvas-shot-brand {
  font-size: 20px;
  font-weight: 950;
}

.canvas-shot-brand i {
  margin-left: 6px;
  padding: 2px 5px;
  color: #10a464;
  background: #ecfdf4;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
}

.canvas-shot-project {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.canvas-shot-top button {
  width: 34px;
  height: 34px;
  background: #e8f8ef;
  border-radius: 8px;
  font-size: 20px;
}

.canvas-shot-body {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 420px;
}

.canvas-shot-sidebar {
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid #e3eee8;
}

.canvas-shot-sidebar-title {
  color: #17392b;
  font-weight: 950;
}

.canvas-shot-helper {
  margin-top: 20px;
  padding: 14px;
  color: #17392b;
  background: #fff;
  border: 1px solid #e3eee8;
  border-radius: 16px;
  text-align: center;
}

.canvas-shot-helper img {
  width: 74px;
  height: 74px;
  margin: 0 auto 8px;
  object-fit: contain;
}

.canvas-shot-helper p {
  margin-top: 6px;
  color: #718278;
  font-size: 12px;
  line-height: 1.55;
}

.canvas-shot-input {
  margin-top: 14px;
  padding: 12px;
  color: #72877e;
  background: #f8fcfa;
  border: 1px solid #e3eee8;
  border-radius: 12px;
  font-size: 12px;
}

.canvas-shot-board {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: radial-gradient(circle at 48% 42%, rgba(104, 184, 142, 0.24), transparent 28%), #eef7f2;
}

.canvas-shot-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(47, 125, 82, 0.45);
}

.canvas-shot-links path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-dasharray: 9 9;
}

.canvas-asset {
  position: absolute;
  z-index: 2;
  width: 138px;
  height: 104px;
  object-fit: cover;
  border: 5px solid #fff;
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(18, 66, 42, 0.18);
}

.asset-1 { top: 44px; left: 46px; }
.asset-2 { top: 104px; left: 300px; }
.asset-3 { right: 42px; top: 176px; }
.asset-4 { left: 76px; bottom: 46px; }
.asset-5 { right: 166px; bottom: 58px; }

.canvas-flow-copy .section-heading,
.canvas-flow-copy {
  color: #fff;
}

.canvas-flow-copy h2 {
  color: #fff;
}

.canvas-flow-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.canvas-step-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.canvas-step-list div {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.canvas-step-list strong {
  color: #8bd2aa;
}

.canvas-step-list p {
  margin-top: 4px;
  font-size: 13px;
}

.primary-home-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  color: #102016;
  background: var(--primary);
  border-radius: 999px;
  font-weight: 950;
}

.home-final-section {
  background:
    linear-gradient(180deg, rgba(237, 248, 242, 0.95), rgba(255, 255, 255, 0.98)),
    url("./images/features-bg.png") center/cover no-repeat;
}

.final-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 34px;
}

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

.final-action-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 22px;
  color: #13231b;
  background: #fff;
  border: 1px solid #dfe9e4;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(104, 184, 142, 0.1);
}

.final-action-card.dark {
  color: #fff;
  background: #111814;
}

.final-action-card strong {
  align-self: end;
  font-size: 18px;
  font-weight: 950;
}

.final-action-card span {
  color: #718278;
  font-size: 13px;
  font-weight: 800;
}

.final-action-card.dark span {
  color: rgba(255, 255, 255, 0.66);
}

.home-footer {
  background: #101814;
  color: rgba(255, 255, 255, 0.72);
}

.course-page[hidden] {
  display: none;
}

.course-page {
  position: relative;
  min-height: calc(100vh - 76px);
  padding: 38px max(28px, calc((100vw - 1180px) / 2)) 58px;
  background:
    radial-gradient(circle at 16% 8%, rgba(184, 104, 146, 0.16), transparent 32%),
    radial-gradient(circle at 76% 10%, rgba(104, 184, 142, 0.18), transparent 30%),
    linear-gradient(180deg, #f8fcfa 0%, #edf7f1 100%);
}

.course-route .home-footer {
  display: none;
}

.course-route .site-header {
  display: none;
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.course-hero-copy,
.course-poster,
.course-signup-card,
.course-points article {
  border: 1px solid rgba(206, 226, 216, 0.92);
  box-shadow: 0 26px 80px rgba(18, 54, 36, 0.1);
}

.course-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 390px;
  padding: clamp(34px, 5vw, 62px);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 34px;
}

.course-eyebrow,
.course-signup-card > div > span,
.course-points article span {
  color: #8f476f;
  font-size: 14px;
  font-weight: 900;
}

.course-hero h1 {
  margin-top: 14px;
  color: #101814;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 950;
  line-height: 1.04;
}

.course-hero-copy p {
  width: min(760px, 100%);
  margin-top: 22px;
  color: #5f7068;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 750;
  line-height: 1.62;
}

.course-hero-cards {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 34px;
}

.course-meta {
  display: grid;
  gap: 8px;
  padding: 18px 22px;
  background: #102118;
  border-radius: 24px;
}

.course-meta strong {
  color: #fff;
  font-size: 20px;
  font-weight: 950;
}

.course-meta span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  font-weight: 760;
}

.course-benefit-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 112px;
  padding: 20px 22px;
  overflow: hidden;
  color: #46220a;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.74), transparent 26%),
    linear-gradient(135deg, #fff3d7 0%, #ffc45c 56%, #ff943d 100%);
  border: 1px solid rgba(255, 150, 54, 0.46);
  border-radius: 24px;
  box-shadow: 0 22px 46px rgba(255, 147, 48, 0.24);
}

.course-benefit-card::after {
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  content: "";
}

.course-benefit-card span {
  color: #9b3f05;
  font-size: 13px;
  font-weight: 950;
}

.course-benefit-card strong {
  position: relative;
  z-index: 1;
  color: #1d1208;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.18;
}

.course-benefit-card small {
  position: relative;
  z-index: 1;
  color: rgba(70, 34, 10, 0.68);
  font-size: 14px;
  font-weight: 820;
}

.course-poster {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(15, 26, 21, 0.88), rgba(15, 26, 21, 0.62)),
    radial-gradient(circle at 30% 20%, rgba(184, 104, 146, 0.45), transparent 38%),
    radial-gradient(circle at 78% 78%, rgba(104, 184, 142, 0.52), transparent 42%),
    #101814;
  border-radius: 34px;
}

.course-poster-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
}

.teacher-card {
  display: grid;
  grid-template-columns: minmax(130px, 155px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  width: min(100%, 520px);
  max-height: none;
  padding: 22px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.teacher-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  align-self: center;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}

.teacher-profile {
  min-width: 0;
}

.teacher-profile > span {
  color: #9fe0b9;
  font-size: 13px;
  font-weight: 900;
}

.teacher-profile strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 36px;
  font-weight: 950;
  line-height: 1.05;
}

.teacher-profile p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.62;
}

.teacher-profile ul {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.teacher-profile li {
  position: relative;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.45;
}

.teacher-profile li::before {
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 7px;
  height: 7px;
  background: #9fe0b9;
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.course-content {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 0.7fr);
  gap: 28px;
  margin-top: 28px;
}

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

.course-points article {
  min-height: 156px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 26px;
}

.course-points article strong {
  display: block;
  margin-top: 20px;
  color: #101814;
  font-size: 24px;
  font-weight: 950;
}

.course-points article p {
  margin-top: 10px;
  color: #687970;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.55;
}

.course-signup-card {
  display: grid;
  gap: 18px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 30px;
}

.course-meeting-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  color: #20382e;
  background: #f4faf7;
  border: 1px solid #dbece3;
  border-radius: 20px;
}

.course-meeting-card[hidden] {
  display: none;
}

.course-meeting-card span {
  color: #718178;
  font-size: 13px;
  font-weight: 850;
}

.course-meeting-card strong {
  font-size: 17px;
  font-weight: 920;
}

.course-meeting-card a {
  width: fit-content;
  color: #08783f;
  font-size: 14px;
  font-weight: 900;
}

.course-reward-panel {
  display: grid;
  gap: 12px;
}

.course-reward-panel[hidden],
.course-reward-panel button[hidden],
.course-reward-panel label[hidden] {
  display: none;
}

.course-reward-panel button {
  margin-top: 0;
}

.course-reward-panel button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.course-signup-card h2 {
  margin-top: 8px;
  color: #101814;
  font-size: 30px;
  font-weight: 950;
}

.course-signup-card > div > p {
  margin-top: 8px;
  color: #718178;
  font-size: 14px;
  font-weight: 740;
  line-height: 1.55;
}

.course-signup-card label {
  display: grid;
  gap: 9px;
  color: #20382e;
  font-size: 14px;
  font-weight: 900;
}

.course-signup-card input,
.course-signup-card textarea {
  width: 100%;
  color: #102118;
  background: #f8fbf9;
  border: 1px solid #dce9e2;
  border-radius: 18px;
  outline: 0;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.course-signup-card input {
  height: 54px;
  padding: 0 18px;
  font-size: 17px;
  font-weight: 850;
}

.course-signup-card textarea {
  min-height: 100px;
  padding: 16px 18px;
  resize: vertical;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.5;
}

.course-qr-card {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
  background: #f4faf7;
  border: 1px solid #dbece3;
  border-radius: 24px;
}

.course-qr-image {
  display: block;
  width: 178px;
  height: 178px;
  padding: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #d6e7de;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(18, 54, 36, 0.1);
}

.course-qr-card p {
  color: #5f7068;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.55;
}

.course-signup-notice {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 12px;
  color: #c7351d;
  background: #fff1ec;
  border: 1px solid rgba(214, 77, 43, 0.2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}

.course-signup-card input:focus,
.course-signup-card textarea:focus {
  background: #fff;
  border-color: #68b88e;
  box-shadow: 0 0 0 4px rgba(104, 184, 142, 0.15);
}

.course-signup-card button {
  height: 72px;
  margin-top: 8px;
  color: #102118;
  background: linear-gradient(135deg, #78c99e, #5fb584);
  border-radius: 999px;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 22px 44px rgba(104, 184, 142, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.course-signup-card button:hover {
  filter: brightness(1.02);
  box-shadow: 0 26px 52px rgba(104, 184, 142, 0.38);
  transform: translateY(-1px);
}

.course-signup-card button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.course-signup-message {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 850;
}

.course-signup-message[data-tone="success"] {
  color: #08783f;
  background: #eaf8f0;
}

.course-signup-message[data-tone="danger"] {
  color: #bd3c24;
  background: #fff1ec;
}

.course-success-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 24, 18, 0.54);
  backdrop-filter: blur(10px);
}

.course-success-modal[hidden] {
  display: none;
}

.course-success-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(430px, 100%);
  padding: 38px 34px 32px;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(206, 226, 216, 0.96);
  border-radius: 30px;
  box-shadow: 0 34px 90px rgba(12, 24, 18, 0.28);
}

.course-success-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  color: #738279;
  background: #f3f7f5;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 520;
  line-height: 1;
}

.course-success-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  color: #08783f;
  background: #e8f8ef;
  border-radius: 24px;
  font-size: 40px;
  font-weight: 950;
}

.course-success-dialog h2 {
  margin-top: 20px;
  color: #101814;
  font-size: 34px;
  font-weight: 950;
}

.course-success-dialog p {
  margin-top: 10px;
  color: #687970;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.6;
}

.course-success-dialog > button:last-child {
  width: 100%;
  height: 56px;
  margin-top: 24px;
  color: #102118;
  background: linear-gradient(135deg, #78c99e, #5fb584);
  border-radius: 999px;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 18px 36px rgba(104, 184, 142, 0.28);
}

.footer-content {
  display: grid;
  gap: 18px;
  width: min(1416px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 38px;
}

.footer-brand .brand-logo-img {
  height: 26px;
  max-width: 144px;
}

.footer-brand p,
.footer-copyright,
.footer-records {
  margin-top: 4px;
  font-size: 13px;
}

.footer-links,
.footer-records {
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  font-weight: 700;
}

.footer-brand p,
.footer-links a,
.footer-copyright,
.footer-records a,
.footer-records span {
  color: rgba(255, 255, 255, 0.58);
}

.mobile-nav {
  display: none;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 28%, rgba(184, 104, 146, 0.13), transparent 30%),
    radial-gradient(circle at 48% 42%, rgba(104, 184, 142, 0.16), transparent 36%),
    rgba(8, 18, 14, 0.62);
  backdrop-filter: blur(10px);
}

.login-modal[hidden] {
  display: none;
}

.login-dialog {
  position: relative;
  overflow: hidden;
  width: min(520px, 100%);
  padding: 38px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(219, 234, 226, 0.95);
  border-radius: 36px;
  box-shadow: 0 34px 88px rgba(5, 16, 11, 0.24);
  animation: authDialogIn 0.18s ease-out;
}

.login-dialog::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, rgba(184, 104, 146, 0.72), rgba(104, 184, 142, 0.72));
}

.close-button {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #75827b;
  background: #f7faf8;
  border: 1px solid #e3ece7;
  border-radius: 50%;
  transition: color 0.18s, background 0.18s, transform 0.18s;
}

.close-button:hover {
  color: #10281c;
  background: #eef8f3;
  transform: translateY(-1px);
}

.close-button svg {
  width: 22px;
  height: 22px;
}

.login-hero {
  display: block;
  padding-right: 54px;
}

.login-hero span {
  color: #748179;
  font-size: 14px;
  font-weight: 780;
}

.login-dialog h2 {
  margin-top: 3px;
  color: #1a1a1a;
  font-size: 36px;
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: 0;
}

.login-hero p {
  margin-top: 8px;
  color: #64756c;
  font-size: 15px;
  font-weight: 560;
  line-height: 1.55;
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 30px 0 24px;
  padding: 6px;
  background: #f3f8f5;
  border: 1px solid #e0eee6;
  border-radius: 999px;
}

.login-tabs button {
  height: 50px;
  color: #64756c;
  border-radius: 999px;
  outline: none;
  font-size: 16px;
  font-weight: 780;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}

.login-tabs button.active {
  color: #10281c;
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 67, 49, 0.08);
}

.login-tabs button:focus-visible {
  box-shadow: 0 0 0 3px rgba(104, 184, 142, 0.18);
}

.login-fields {
  display: grid;
  gap: 20px;
}

.login-field {
  display: grid;
  gap: 10px;
  color: #23362b;
  font-size: 14px;
  font-weight: 760;
}

.login-input-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0;
  background: #f8fcfa;
  border: 1px solid #dcebe4;
  border-radius: 999px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.login-input-shell:focus-within {
  background: #fff;
  border-color: rgba(104, 184, 142, 0.68);
  box-shadow: 0 0 0 5px rgba(104, 184, 142, 0.11);
}

.login-input-shell input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 62px;
  min-width: 0;
  padding: 0 24px;
  color: #111814;
  background: transparent;
  border: 0;
  border-radius: inherit;
  outline: none;
  appearance: none;
  background-clip: padding-box;
  font-size: 16px;
  font-weight: 600;
}

.login-input-shell input::placeholder {
  color: #99a59f;
  font-weight: 750;
}

.login-input-shell input:-webkit-autofill,
.login-input-shell input:-webkit-autofill:hover,
.login-input-shell input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111814;
  caret-color: #111814;
  border-radius: 999px;
  box-shadow: 0 0 0 1000px #f8fcfa inset;
  transition: background-color 9999s ease-in-out 0s;
}

#loginPassword {
  padding-right: 70px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #708078;
  background: transparent;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: color 0.18s, background 0.18s;
}

.password-toggle:hover {
  color: #123b2a;
  background: #e2f3ea;
  box-shadow: none;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.login-message {
  margin-top: 14px;
  padding: 10px 12px;
  color: #b42318;
  background: #fff4f2;
  border: 1px solid #ffd8d2;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 850;
}

.solid-button.full {
  width: 100%;
}

.login-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 62px;
  margin-top: 24px;
  color: #10281c;
  background: #68b88e;
  border: 1px solid #68b88e;
  border-radius: 999px;
  box-shadow: 0 16px 32px rgba(104, 184, 142, 0.22);
  font-size: 17px;
  font-weight: 850;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.login-primary:hover {
  background: #5cab82;
  border-color: #5cab82;
  box-shadow: 0 20px 38px rgba(104, 184, 142, 0.31);
  transform: translateY(-1px);
}

.login-primary:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.wechat-login-block {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.wechat-login-block > span {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: #8b9992;
  font-size: 12px;
  font-weight: 850;
}

.wechat-login-block > span::before,
.wechat-login-block > span::after {
  height: 1px;
  content: "";
  background: #e1ece7;
}

.wechat-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  color: #113924;
  background: #f7fcf9;
  border: 1px solid #dcebe4;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  transition: color 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.wechat-login-button:hover {
  color: #082417;
  background: #effaf4;
  border-color: rgba(104, 184, 142, 0.62);
  box-shadow: 0 14px 30px rgba(40, 108, 70, 0.12);
  transform: translateY(-1px);
}

.wechat-login-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.wechat-login-button svg {
  width: 22px;
  height: 22px;
  color: #0f8f4d;
  fill: currentColor;
}

.wechat-qr-panel {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  width: 300px;
  margin: 0 auto;
}

.wechat-qr-panel[hidden] {
  display: none;
}

.wechat-qr-frame {
  width: 280px;
  height: 341px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ececef;
  border-radius: 14px;
}

.wechat-qr-frame iframe {
  width: 320px;
  height: 390px;
  border: 0;
  transform: scale(0.875);
  transform-origin: left top;
}

.wechat-qr-panel p {
  margin: 0;
  color: #626a66;
  font-size: 14px;
}

.wechat-qr-panel button {
  color: #16884f;
  font-size: 13px;
  font-weight: 700;
}

.login-modal.wechat-qr-active .wechat-login-block,
.login-content-panel.wechat-qr-active .wechat-login-block,
.login-content-panel:has(#wechatQrPanel:not([hidden])) .wechat-login-block {
  display: none;
}

.login-content-panel.wechat-qr-active {
  align-items: center;
  justify-content: center;
  padding: 56px 72px;
}

.login-content-panel.wechat-qr-active .login-hero,
.login-content-panel.wechat-qr-active .login-methods,
.login-content-panel.wechat-qr-active .login-email-panel,
.login-content-panel.wechat-qr-active .login-agreement {
  display: none;
}

.login-content-panel.wechat-qr-active .wechat-qr-panel {
  display: grid;
}

.wechat-qr-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: min(320px, 100%);
  color: #a1a4a8;
  font-size: 11px;
}

.wechat-qr-or::before,
.wechat-qr-or::after {
  height: 1px;
  content: "";
  background: #e7e8eb;
}

.wechat-qr-panel .wechat-qr-email {
  width: min(320px, 100%);
  height: 52px;
  color: #22252a;
  background: #fff;
  border: 1px solid #dedfe2;
  border-radius: 999px;
  font-size: 15px;
}

.login-switch {
  margin-top: 22px;
  color: #718278;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.login-switch button {
  color: var(--accent-dark);
  font-weight: 900;
  padding: 2px 4px;
}

.login-switch button:hover {
  color: var(--accent-hover);
}

@keyframes authDialogIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1180px) {
  .desktop-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

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

  .case-waterfall-grid,
  .tool-card-grid,
  .final-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-card-featured {
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .desktop-nav {
    display: none;
  }

  .header-actions {
    display: flex;
  }

  .header-actions .text-button[data-open-login],
  .header-actions .solid-button[data-open-register] {
    height: 38px;
    min-width: 58px;
    padding: 0 13px;
    font-size: 13px;
  }

  .header-actions .solid-button[data-open-register] {
    min-width: 64px;
  }

  .membership-grid,
  .member-overview,
  .member-records,
  .admin-stats,
  .admin-product-agent-stats,
  .admin-credit-overview,
  .admin-activity-grid,
  .admin-interface-grid,
  .admin-cost-grid {
    grid-template-columns: 1fr;
  }

  .membership-card {
    min-height: auto;
  }

  .membership-plans-dialog {
    width: min(720px, calc(100vw - 32px));
    padding: 24px;
    border-radius: 26px;
  }

  .admin-wechat-dialog {
    width: min(620px, calc(100vw - 32px));
    padding: 24px;
    border-radius: 28px;
  }

  .admin-wechat-body {
    grid-template-columns: 190px minmax(0, 1fr);
  }

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

  .member-login-form {
    grid-template-columns: 1fr;
  }

  .credit-records-modal {
    align-items: center;
    padding: 16px;
    overflow: auto;
  }

  .credit-records-dialog {
    max-height: calc(100vh - 32px);
  }

  .credit-records-filter {
    grid-template-columns: 1fr;
  }

  .admin-page {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #e1e9e4;
  }

  .admin-product-agent-hero {
    grid-template-columns: 1fr;
  }

  .admin-agent-privacy {
    min-width: 0;
  }

  .admin-agent-rule-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
  }

  .admin-credit-ledger-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .admin-credit-ledger-row time {
    grid-column: 2 / 3;
  }

  .admin-credit-ledger-row b {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .canvas-route {
    overflow: auto;
  }

  .canvas-page {
    height: auto;
    min-height: 100vh;
  }

  .canvas-topbar {
    grid-template-columns: auto auto;
  }

  .canvas-project-pill {
    display: none;
  }

  .canvas-shell {
    display: flex;
    height: auto;
    min-height: calc(100vh - 58px);
    flex-direction: column;
  }

  .canvas-sidebar {
    border-right: 0;
    border-bottom: 1px solid #dfe8e2;
  }

  .canvas-board {
    min-height: 560px;
  }

  .prompt-node {
    top: 52px;
    left: 22px;
    width: min(230px, calc(100% - 44px));
  }

  .canvas-reference-nodes .reference-node {
    top: 220px;
    left: 48px;
  }

  .canvas-result-node {
    top: 330px;
    right: 22px;
    left: 22px;
    width: auto;
  }

  .canvas-bottom-dock {
    right: 18px;
    left: 18px;
    justify-content: center;
    transform: none;
  }

  .canvas-zoom-dock {
    display: none;
  }

  .site-header {
    grid-template-columns: auto auto;
  }

  .desktop-nav {
    display: none;
  }

  .hero-section {
    min-height: calc(100vh - 60px);
    padding: 74px 18px 54px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .composer-footer {
    display: grid;
  }

  .composer-tools {
    display: grid;
    grid-template-columns: 42px 1fr 1fr;
  }

  .model-select-tool {
    grid-column: span 2;
  }

  .generate-button {
    justify-content: center;
    width: 100%;
  }

  .generation-result-head,
  .image-preview-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .generation-soft-button,
  .image-preview-actions a,
  .image-preview-actions button {
    width: 100%;
  }

  .generation-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 180px));
    justify-content: center;
  }

  .generation-card {
    max-width: 180px;
  }

  .generation-card img {
    max-height: 280px;
  }

  .generation-card-actions {
    grid-template-columns: 1fr;
  }

  .album-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .album-card {
    width: auto;
  }

  .album-card-actions {
    grid-template-columns: 1fr;
  }

  .case-waterfall-grid,
  .tool-card-grid,
  .canvas-flow-layout,
  .final-layout,
  .final-actions {
    grid-template-columns: 1fr;
  }

  .tool-card {
    grid-template-columns: 104px minmax(0, 1fr) auto;
  }

  .tool-card img {
    width: 104px;
    height: 104px;
  }

  .canvas-shot-body {
    grid-template-columns: 1fr;
  }

  .canvas-shot-sidebar {
    display: none;
  }

}

@media (max-width: 560px) {
  .simple-topbar,
  .admin-main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .membership-hero,
  .member-layout {
    width: calc(100% - 32px);
  }

  .member-section,
  .member-record-panel,
  .member-login-panel {
    padding: 18px;
  }

  .pricing-section {
    padding: 0;
  }

  .membership-card {
    padding: 30px 24px 24px;
  }

  .membership-plans-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 20px;
    border-radius: 24px;
  }

  .admin-wechat-modal {
    padding: 12px;
  }

  .admin-wechat-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 20px;
    border-radius: 26px;
  }

  .admin-wechat-head h2 {
    font-size: 30px;
  }

  .admin-wechat-order {
    flex-direction: column;
    gap: 8px;
  }

  .admin-wechat-order b {
    align-self: flex-start;
    font-size: 30px;
  }

  .admin-wechat-body {
    grid-template-columns: 1fr;
  }

  .admin-wechat-qr-card {
    width: min(240px, 100%);
    min-height: 0;
    margin: 0 auto;
  }

  .membership-modal-grid {
    grid-template-columns: 1fr;
  }

  .membership-card.compact {
    min-height: auto;
  }

  .membership-card strong {
    font-size: 42px;
  }

  .membership-card li {
    font-size: 16px;
  }

  .member-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-row,
  .admin-activity-row,
  .admin-credit-ledger-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .admin-credit-ledger-row time,
  .admin-credit-ledger-row b {
    grid-column: auto;
    grid-row: auto;
  }

  .admin-credit-ledger-row b {
    text-align: left;
  }

  .member-menu-panel {
    right: auto;
    left: 50%;
    width: min(286px, calc(100vw - 32px));
    transform: translateX(-50%);
  }

  .member-menu-panel::before {
    right: 50%;
    transform: translateX(50%) rotate(45deg);
  }

  .header-user-panel {
    right: auto;
    left: 50%;
    width: min(276px, calc(100vw - 32px));
    transform: translateX(-50%);
  }

  .header-user-panel::before {
    right: 50%;
    transform: translateX(50%) rotate(45deg);
  }

  .recharge-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .membership-hero h1,
  .admin-header h1 {
    font-size: 30px;
  }

  .admin-sidebar nav {
    grid-template-columns: 1fr;
  }

  .admin-system-panel {
    display: grid;
    align-items: start;
  }

  .admin-system-panel button {
    width: 100%;
  }

  .admin-clear-data-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 24px;
    border-radius: 24px;
  }

  .admin-clear-options {
    grid-template-columns: 1fr;
  }

  .canvas-topbar {
    height: 56px;
    padding: 0 14px;
  }

  .canvas-brand {
    font-size: 16px;
  }

  .canvas-back-home {
    padding: 0 10px;
  }

  .canvas-helper {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .canvas-helper img {
    width: 48px;
    height: 48px;
  }

  .canvas-composer {
    display: grid;
  }

  .canvas-composer textarea,
  .canvas-composer button {
    width: 100%;
  }

  .canvas-bottom-dock {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .site-header {
    height: 56px;
    padding: 0 16px;
  }

  body.modal-open .site-header {
    padding-right: calc(16px + var(--modal-scrollbar-compensation, 0px));
  }

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

  .hero-section {
    min-height: calc(100vh - 56px);
  }

  .brand {
    font-size: 17px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-badge {
    margin-bottom: 18px;
  }

  .home-composer {
    padding: 14px;
    border-radius: 18px;
  }

  .login-modal {
    align-items: flex-end;
    padding: 12px;
  }

  .login-dialog {
    width: 100%;
    padding: 24px;
    border-radius: 30px;
  }

  .login-hero {
    padding-right: 46px;
  }

  .login-dialog h2 {
    font-size: 30px;
  }

  .login-tabs {
    margin: 24px 0 20px;
  }

  .login-tabs button {
    height: 48px;
  }

  .login-input-shell {
    min-height: 60px;
    border-radius: 999px;
  }

  .login-input-shell input {
    height: 58px;
    font-size: 16px;
  }

  .login-primary {
    height: 58px;
    border-radius: 999px;
  }

  .login-hero p {
    font-size: 13px;
  }

  .composer-header {
    align-items: flex-start;
  }

  .composer-upload span {
    display: none;
  }

  .home-composer textarea {
    min-height: 132px;
    font-size: 15px;
  }

  .home-section-inner {
    width: calc(100% - 36px);
  }

  .case-waterfall-section,
  .more-tools-section,
  .canvas-flow-section,
  .home-final-section {
    padding: 58px 0;
  }

  .section-heading h2 {
    font-size: 28px;
  }
}

/* Homepage album uses a capped 4-column grid: 216px cards plus 14px gaps. */
.home-composer .generation-results .album-panel,
.home-composer .generation-results .generation-result-panel {
  overflow: hidden;
}

.home-composer .generation-results .album-grid,
.home-composer .generation-results .generation-grid,
.generation-results .album-grid,
.generation-results .generation-grid {
  display: grid !important;
  width: 100% !important;
  max-width: 906px !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: start !important;
  justify-content: start !important;
}

.home-composer .generation-results .album-card,
.home-composer .generation-results .generation-card,
.home-composer .generation-results .generation-skeleton,
.generation-results .album-card,
.generation-results .generation-card,
.generation-results .generation-skeleton {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

.home-composer .generation-results .album-thumb-frame,
.home-composer .generation-results .generation-skeleton div,
.generation-results .album-thumb-frame,
.generation-results .generation-skeleton div {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 1 / 1 !important;
}

.home-composer .generation-results .album-thumb-frame img,
.generation-results .album-thumb-frame img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}

.home-composer .generation-results .generation-card img,
.generation-results .generation-card img {
  width: 100% !important;
  height: 160px !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
}

.home-composer .generation-results .album-card[data-ratio="9-16"] .album-thumb-frame,
.generation-results .album-card[data-ratio="9-16"] .album-thumb-frame {
  aspect-ratio: 9 / 16 !important;
}

.home-composer .generation-results .album-card[data-ratio="3-4"] .album-thumb-frame,
.generation-results .album-card[data-ratio="3-4"] .album-thumb-frame {
  aspect-ratio: 3 / 4 !important;
}

.home-composer .generation-results .album-card[data-ratio="16-9"] .album-thumb-frame,
.generation-results .album-card[data-ratio="16-9"] .album-thumb-frame {
  aspect-ratio: 16 / 9 !important;
}

.home-composer .generation-results .album-card[data-ratio="4-3"] .album-thumb-frame,
.generation-results .album-card[data-ratio="4-3"] .album-thumb-frame {
  aspect-ratio: 4 / 3 !important;
}

body:has(.page-home:not([hidden])) .site-header {
  display: none;
}

.page-home {
  min-height: 100vh;
  padding-top: 0;
  color: #f6f8f7;
  background: #07090b;
}

.app-home {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 10%, rgba(104, 184, 142, 0.08), transparent 30%),
    linear-gradient(180deg, #07090b 0%, #0a0c0f 100%);
}

.app-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  width: 66px;
  padding: 18px 0 22px;
  flex-direction: column;
  align-items: center;
  color: rgba(255, 255, 255, 0.66);
  background: rgba(7, 9, 11, 0.94);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.app-rail-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 38px;
  color: #07100c;
  background: #fff;
  border-radius: 13px;
  font-size: 18px;
  font-weight: 950;
}

.app-rail nav,
.app-rail-bottom {
  display: grid;
  gap: 18px;
}

.app-rail nav {
  flex: 1;
  align-content: start;
}

.app-rail a {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.app-rail a:hover,
.app-rail a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.app-rail a:hover {
  transform: translateY(-1px);
}

.app-rail a i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: #ff4f5e;
  border-radius: 50%;
}

.app-home-main {
  min-height: 100vh;
  padding-left: 66px;
}

.app-home-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 28px;
  background: rgba(7, 9, 11, 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.app-brand-dark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 0;
}

.app-brand-dark em {
  padding: 3px 8px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

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

.app-invite-pill,
.app-charge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.app-invite-pill {
  color: #ffe3bf;
  background: rgba(255, 255, 255, 0.09);
}

.app-charge-pill {
  color: #12100d;
  background: #ffd1a5;
}

.app-home-content {
  width: min(1540px, calc(100% - 84px));
  margin: 0 auto;
  padding: 82px 0 96px;
}

.app-hero-board h1 {
  color: #fff;
  text-align: center;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 950;
  line-height: 1.12;
}

.app-feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 86px;
}

.app-feature-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  color: #fff;
  background: #1a1d20;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}

.app-feature-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(7, 9, 11, 0.58) 42%, rgba(51, 183, 196, 0.32));
}

.app-feature-card img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.app-feature-card > span {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 3px 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.44);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.app-feature-card > div {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
}

.app-feature-card h2 {
  margin-bottom: 10px;
  color: #fff;
  font-size: 23px;
  font-weight: 950;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.app-feature-card a,
.app-feature-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.app-tool-section {
  margin-top: 90px;
}

.app-tool-section h2 {
  margin-bottom: 26px;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

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

.app-tool-tile {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 82px;
  padding: 0 26px;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
  background: #181a1e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  font-size: 17px;
  font-weight: 850;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.app-tool-tile:hover,
.app-tool-tile.active {
  background: linear-gradient(100deg, #1c3d41, #202428);
  border-color: rgba(109, 214, 204, 0.28);
  transform: translateY(-1px);
}

.app-tool-tile svg {
  color: #fff;
}

.app-tool-tile small {
  color: #35d7d0;
  font-size: 13px;
  font-weight: 900;
}

.app-studio-panel {
  width: 100%;
  margin-top: 92px;
  padding: 24px;
  color: #e9f1ed;
  background: #101316;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.studio-panel-head {
  margin-bottom: 22px;
}

.studio-panel-head span {
  color: #76c99d;
  font-size: 14px;
  font-weight: 900;
}

.studio-panel-head h2 {
  margin-top: 4px;
  color: #fff;
  font-size: 32px;
  font-weight: 950;
}

.studio-panel-head p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 15px;
  font-weight: 700;
}

.app-studio-panel .composer-header strong {
  color: #fff;
}

.app-studio-panel .composer-upload,
.app-studio-panel .icon-tool,
.app-studio-panel .select-tool > button {
  color: #f3f8f5;
  background: #1a1d20;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.app-studio-panel textarea {
  color: #f5f8f6;
  background: #080a0c;
  border-color: rgba(255, 255, 255, 0.1);
}

.app-studio-panel textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.app-studio-panel .select-menu {
  background: #181b1f;
  border-color: rgba(255, 255, 255, 0.1);
}

.app-studio-panel .select-menu button {
  color: rgba(255, 255, 255, 0.88);
}

.app-studio-panel .select-menu button:hover,
.app-studio-panel .select-menu button.active {
  color: #71d69e;
  background: rgba(104, 184, 142, 0.12);
}

@media (max-width: 1180px) {
  .app-feature-row,
  .app-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .app-rail {
    display: none;
  }

  .app-home-main {
    padding-left: 0;
  }

  .app-home-topbar {
    height: auto;
    min-height: 62px;
    padding: 12px 16px;
  }

  .app-brand-dark {
    font-size: 21px;
  }

  .app-invite-pill {
    display: none;
  }

  .app-home-content {
    width: calc(100% - 28px);
    padding: 52px 0 68px;
  }

  .app-hero-board h1 {
    text-align: left;
    font-size: 34px;
  }

  .app-feature-row {
    display: flex;
    gap: 14px;
    margin-top: 34px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .app-feature-card {
    flex: 0 0 82%;
    min-height: 190px;
    scroll-snap-align: start;
  }

  .app-feature-card img {
    min-height: 190px;
  }

  .app-tool-section {
    margin-top: 48px;
  }

  .app-tool-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .app-tool-tile {
    min-height: 68px;
    padding: 0 18px;
  }

  .app-studio-panel {
    margin-top: 50px;
    padding: 16px;
    border-radius: 18px;
  }

  .studio-panel-head h2 {
    font-size: 26px;
  }
}

.admin-course-note {
  max-width: 340px;
  white-space: normal !important;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .course-page {
    padding: 32px 18px 48px;
  }

  .course-hero,
  .course-content {
    grid-template-columns: 1fr;
  }

  .course-hero-copy,
  .course-poster {
    min-height: auto;
  }

  .course-poster-frame {
    min-height: 0;
  }

  .teacher-card {
    grid-template-columns: 145px minmax(0, 1fr);
    width: min(100%, 500px);
  }

  .teacher-photo {
    max-height: 210px;
  }
}

@media (max-width: 680px) {
  .course-page {
    padding: 22px 14px 38px;
  }

  .course-hero-copy,
  .course-poster,
  .course-signup-card {
    padding: 24px;
    border-radius: 26px;
  }

  .course-poster {
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    padding: 16px;
  }

  .course-poster-frame {
    height: auto;
    min-height: 0;
    padding: 12px;
    border-radius: 22px;
  }

  .course-hero h1 {
    font-size: 40px;
    line-height: 1.08;
  }

  .course-hero-copy p {
    font-size: 17px;
    line-height: 1.58;
  }

  .course-hero-cards {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }

  .course-meta {
    width: 100%;
    padding: 16px 18px;
    border-radius: 20px;
  }

  .course-meta strong {
    font-size: 18px;
  }

  .course-benefit-card {
    min-height: 102px;
    padding: 18px;
    border-radius: 20px;
  }

  .course-benefit-card strong {
    font-size: 20px;
  }

  .course-points {
    grid-template-columns: 1fr;
  }

  .teacher-card {
    grid-template-columns: clamp(94px, 28vw, 118px) minmax(0, 1fr);
    justify-items: stretch;
    align-items: center;
    gap: 14px;
    padding: 14px;
    width: 100%;
    margin: 0 auto;
    border-radius: 22px;
  }

  .teacher-photo {
    width: 100%;
    height: auto;
    max-height: none;
    justify-self: center;
    border-radius: 18px;
  }

  .teacher-profile {
    width: 100%;
  }

  .teacher-profile > span {
    font-size: 12px;
  }

  .teacher-profile strong {
    font-size: 28px;
  }

  .teacher-profile p {
    display: -webkit-box;
    margin-top: 10px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  .teacher-profile ul {
    gap: 6px;
    margin-top: 10px;
  }

  .teacher-profile li {
    padding-left: 14px;
    font-size: 12px;
    line-height: 1.35;
  }

  .teacher-profile li::before {
    width: 6px;
    height: 6px;
  }

  .course-qr-card {
    grid-template-columns: 1fr;
  }

  .course-qr-image {
    width: 180px;
    height: 180px;
    justify-self: center;
  }

  .course-signup-card button {
    height: 66px;
    font-size: 20px;
  }
}

/* Course page: embedded in the main WanYou visual system. */
.course-route {
  color: #17181a;
  background: #f6f7f8;
}

.course-route .site-header,
body.course-route:has(.koozee-home) .site-header {
  display: grid !important;
}

.course-route .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: #e9eaec;
}

.course-route .desktop-nav a.active {
  color: #fff;
  background: #17181a;
}

.course-page {
  min-height: 100vh;
  padding: 92px max(24px, calc((100vw - 1180px) / 2)) 70px;
  color: #17181a;
  background: #f6f7f8;
}

.course-context-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: #94979d;
  font-size: 13px;
  font-weight: 700;
}

.course-context-bar a {
  color: #686b71;
}

.course-context-bar strong {
  color: #2b2d31;
}

.course-context-bar em {
  margin-left: auto;
  padding: 6px 10px;
  color: #4d5056;
  background: #fff;
  border: 1px solid #e2e4e7;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
}

.course-hero {
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.72fr);
  gap: 18px;
}

.course-hero-copy,
.course-poster,
.course-signup-card,
.course-points article {
  border-color: #e2e4e7;
  box-shadow: none;
}

.course-hero-copy {
  min-height: 438px;
  padding: clamp(38px, 5vw, 64px);
  background: #fff;
  border-radius: 20px;
}

.course-eyebrow,
.course-signup-card > div > span,
.course-points article span {
  color: #777b82;
}

.course-hero h1 {
  max-width: 760px;
  margin-top: 18px;
  color: #111214;
  font-size: clamp(42px, 5.6vw, 70px);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.course-hero-copy > p {
  max-width: 680px;
  margin-top: 24px;
  color: #666a71;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 550;
  line-height: 1.65;
}

.course-hero-cards {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  gap: 10px;
  margin-top: 32px;
}

.course-meta,
.course-benefit-card {
  min-height: 104px;
  padding: 18px 20px;
  border-radius: 14px;
  box-shadow: none;
}

.course-meta {
  background: #17181a;
}

.course-meta strong {
  font-size: 18px;
}

.course-benefit-card {
  color: #17181a;
  background: #f2f3f4;
  border-color: #e2e4e7;
}

.course-benefit-card::after {
  display: none;
}

.course-benefit-card span,
.course-benefit-card small {
  color: #6d7076;
}

.course-benefit-card strong {
  color: #17181a;
  font-size: 21px;
}

.course-poster {
  aspect-ratio: auto;
  padding: 12px;
  color: #fff;
  background: #17181a;
  border-radius: 20px;
}

.course-poster-frame {
  padding: 0;
  border: 0;
  border-radius: 14px;
}

.teacher-card {
  grid-template-columns: 1fr;
  align-content: end;
  gap: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #232529;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
  backdrop-filter: none;
}

.teacher-photo {
  width: 100%;
  height: 252px;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 20%;
  background: #2b2d31;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.teacher-profile {
  padding: 24px 24px 26px;
}

.teacher-profile > span {
  color: #aeb1b7;
}

.teacher-profile strong {
  margin-top: 5px;
  font-size: 34px;
}

.teacher-profile p {
  margin-top: 12px;
  color: #b5b8be;
  font-weight: 550;
}

.teacher-profile ul {
  display: none;
}

.course-content {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.72fr);
  gap: 18px;
  margin-top: 18px;
}

.course-points {
  gap: 10px;
}

.course-points article {
  min-height: 148px;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
}

.course-points article strong {
  margin-top: 18px;
  color: #17181a;
  font-size: 21px;
}

.course-points article p {
  color: #74777d;
  font-weight: 550;
}

.course-signup-card {
  gap: 16px;
  padding: 28px;
  background: #fff;
  border-radius: 18px;
}

.course-signup-card h2 {
  color: #17181a;
  font-size: 28px;
}

.course-signup-card > div > p {
  color: #74777d;
  font-weight: 550;
}

.course-signup-card label {
  color: #34373c;
}

.course-signup-card input,
.course-signup-card textarea {
  color: #17181a;
  background: #f7f8f9;
  border-color: #e1e3e6;
  border-radius: 12px;
}

.course-signup-card input:focus,
.course-signup-card textarea:focus {
  background: #fff;
  border-color: #8f939a;
  box-shadow: 0 0 0 3px rgba(24, 25, 27, 0.08);
}

.course-signup-card button,
.course-success-dialog > button:last-child {
  color: #fff;
  background: #17181a;
  border-radius: 12px;
  box-shadow: none;
}

.course-signup-card button:hover,
.course-success-dialog > button:last-child:hover {
  background: #2b2d31;
  box-shadow: none;
  filter: none;
}

.course-meeting-card {
  color: #2b2d31;
  background: #f6f7f8;
  border-color: #e2e4e7;
  border-radius: 12px;
}

.course-meeting-card a {
  color: #17181a;
  text-decoration: underline;
}

.course-success-dialog {
  border-color: #e2e4e7;
  border-radius: 18px;
}

.course-success-icon {
  color: #fff;
  background: #17181a;
  border-radius: 50%;
}

@media (max-width: 980px) {
  .course-page {
    padding-top: 82px;
  }

  .course-hero,
  .course-content {
    grid-template-columns: 1fr;
  }

  .course-poster {
    padding: 10px;
  }

  .teacher-card {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .teacher-photo {
    height: 100%;
    min-height: 230px;
  }
}

@media (max-width: 680px) {
  .course-route .site-header {
    display: flex !important;
    justify-content: space-between;
    padding: 0 16px;
  }

  .course-route .desktop-nav {
    display: none;
  }

  .course-page {
    padding: 78px 14px 34px;
  }

  .course-context-bar {
    margin-bottom: 12px;
  }

  .course-hero-copy,
  .course-signup-card {
    padding: 24px;
    border-radius: 16px;
  }

  .course-hero h1 {
    font-size: 39px;
  }

  .course-hero-cards {
    grid-template-columns: 1fr;
  }

  .teacher-card {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .teacher-photo {
    min-height: 210px;
  }

  .teacher-profile {
    padding: 18px;
  }
}

@media (max-width: 700px) {
  .reverse-prompt-section {
    padding: 56px 16px 70px;
  }

  .reverse-prompt-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .reverse-prompt-copy {
    min-height: auto;
    padding: 28px 22px;
    border-radius: 24px;
  }

  .reverse-prompt-copy h2 {
    font-size: 34px;
  }

  .reverse-prompt-copy p {
    font-size: 15px;
  }

  .reverse-prompt-tool {
    padding: 18px;
    border-radius: 24px;
  }

  .reverse-upload {
    min-height: 190px;
    padding: 22px;
  }

  .reverse-preview {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .reverse-preview img {
    width: 88px;
    height: 70px;
  }

  .home-composer .generation-results .album-grid,
  .home-composer .generation-results .generation-grid,
  .generation-results .album-grid,
  .generation-results .generation-grid {
    max-width: 446px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .home-composer .generation-results .album-thumb-frame,
  .home-composer .generation-results .generation-skeleton div,
  .generation-results .album-thumb-frame,
  .generation-results .generation-skeleton div {
    height: auto !important;
  }

  .home-composer .generation-results .generation-card img,
  .generation-results .generation-card img {
    height: 132px !important;
  }

}

@media (min-width: 701px) and (max-width: 980px) {
  .reverse-prompt-section {
    padding: 72px 22px 88px;
  }

  .reverse-prompt-shell {
    grid-template-columns: 1fr;
  }

  .home-composer .generation-results .album-grid,
  .home-composer .generation-results .generation-grid,
  .generation-results .album-grid,
  .generation-results .generation-grid {
    max-width: 676px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Koozee-style dark workbench home */
body:has(.page-home:not([hidden])) .site-header,
body:has(.page-home:not([hidden])) .home-footer {
  display: none;
}

.page-home {
  min-height: 100vh;
  padding-top: 0;
  color: #f7f7f7;
  background: #08090a;
}

.koozee-home {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #f6f6f6;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, #090a0b 0%, #090a0b 52%, #08090a 100%);
  background-size: 78px 78px, auto;
}

.koozee-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: grid;
  grid-template-rows: 80px 1fr auto;
  width: 164px;
  padding: 22px 0 28px;
  background: #08090a;
}

.koozee-brand {
  display: flex;
  align-items: center;
  height: 42px;
  padding-left: 20px;
}

.koozee-brand .brand-logo-img {
  height: 26px;
  max-width: 142px;
}

.koozee-rail,
.koozee-rail-bottom {
  display: grid;
  justify-items: start;
  padding-left: 28px;
}

.koozee-rail {
  align-content: start;
  gap: 24px;
  padding-top: 30px;
}

.koozee-rail-bottom {
  gap: 26px;
}

.koozee-rail a,
.koozee-rail-bottom a {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #85878b;
  border-radius: 8px;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.koozee-rail a:hover,
.koozee-rail a.active,
.koozee-rail-bottom a:hover {
  color: #fff;
  transform: translateY(-1px);
}

.koozee-rail a.active {
  background: transparent;
}

.koozee-rail svg,
.koozee-rail-bottom svg,
.koozee-chat svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.25;
}

.koozee-rail a.new span {
  position: absolute;
  top: -14px;
  right: -18px;
  display: grid;
  place-items: center;
  height: 18px;
  padding: 0 6px;
  color: #062219;
  background: #b8fff1;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.koozee-rail-bottom i {
  position: absolute;
  top: 2px;
  right: 3px;
  width: 7px;
  height: 7px;
  background: #ff4b55;
  border-radius: 50%;
}

.koozee-main {
  min-height: 100vh;
  padding-left: 164px;
}

.koozee-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 164px;
  z-index: 35;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 72px;
  padding: 0 24px 0 0;
  background: linear-gradient(180deg, rgba(8, 9, 10, 0.96), rgba(8, 9, 10, 0.78));
  backdrop-filter: blur(12px);
}

.koozee-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.koozee-account button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  color: #f9e3cd;
  border: 0;
  font-weight: 950;
  white-space: nowrap;
}

.koozee-invite {
  gap: 8px;
  padding: 0 20px;
  background: #1c1d20;
  border-radius: 999px;
  font-size: 16px;
}

.koozee-credit {
  gap: 8px;
  min-width: 92px;
  padding: 0 14px;
  background: #31231e;
  border-radius: 999px 0 0 999px;
  font-size: 17px;
}

.koozee-credit span {
  width: 18px;
  height: 18px;
  background:
    radial-gradient(circle at 38% 34%, #fff4dd 0 22%, transparent 23%),
    linear-gradient(135deg, #f6b277, #c96b43);
  border-radius: 50%;
}

.koozee-recharge {
  margin-left: -10px;
  padding: 0 18px;
  color: #37251d !important;
  background: linear-gradient(180deg, #ffe3c8, #ffd0ad);
  border-radius: 999px;
  font-size: 16px;
}

.koozee-avatar {
  width: 44px;
  padding: 0;
  color: #fff !important;
  background: radial-gradient(circle at 35% 28%, #5bb6ff, #16425d 58%, #10202b);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  font-size: 15px;
  overflow: hidden;
}

.koozee-content {
  width: min(1720px, calc(100vw - 282px));
  margin: 0 auto;
  padding: 172px 0 52px;
}

.koozee-hero h1 {
  color: #fff;
  text-align: center;
  font-size: clamp(34px, 3.15vw, 58px);
  font-weight: 950;
  line-height: 1.14;
  letter-spacing: 0;
}

.koozee-hero-empty {
  min-height: 545px;
}

.koozee-feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 86px;
}

.koozee-feature-card {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  background: #18191c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.koozee-feature-card::after {
  position: absolute;
  inset: 48% 0 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(180deg, transparent 0%, rgba(11, 12, 14, 0.5) 42%, rgba(10, 97, 104, 0.7) 100%),
    linear-gradient(90deg, rgba(11, 12, 14, 0.34), transparent 54%);
  filter: blur(0.2px);
}

.koozee-feature-card img {
  width: 100%;
  height: 100%;
  min-height: 310px;
  object-fit: cover;
  opacity: 0.92;
}

.koozee-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  height: 26px;
  padding: 0 9px;
  color: #fff;
  background: rgba(16, 17, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.koozee-card-copy {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 2;
}

.koozee-card-copy h2 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 25px;
  font-weight: 950;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.koozee-card-copy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-width: 98px;
  padding: 0 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 950;
  backdrop-filter: blur(10px);
}

.koozee-gemini-card {
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 196, 174, 0.7), transparent 34%),
    radial-gradient(circle at 18% 78%, rgba(155, 235, 255, 0.84), transparent 42%),
    linear-gradient(135deg, #fafafa 0%, #f2f1f7 52%, #c8f4fb 100%);
}

.koozee-gemini-card::after {
  background: linear-gradient(180deg, transparent 42%, rgba(92, 122, 125, 0.24) 70%, rgba(20, 129, 136, 0.72));
}

.koozee-gemini-logo {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #282a2f;
  font-size: 36px;
  font-weight: 850;
}

.koozee-gemini-logo b {
  color: #8569ff;
  font-size: 38px;
}

.koozee-gemini-card .koozee-card-copy h2 {
  color: #fff;
}

.koozee-tools {
  margin-top: 118px;
}

.koozee-tools h2 {
  margin-bottom: 24px;
  color: #fff;
  font-size: 26px;
  font-weight: 950;
}

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

.koozee-tool {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  min-height: 86px;
  padding: 0 28px;
  color: #f2f2f3;
  background: #1a1b1e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 14px 30px rgba(0, 0, 0, 0.2);
  font-size: 18px;
  font-weight: 850;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.koozee-tool:hover {
  background: #202125;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.koozee-tool svg {
  width: 26px;
  height: 26px;
  color: #f2f2f3;
  stroke-width: 2;
}

.koozee-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  background: #202124;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}

.home-runtime {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1280px) {
  .koozee-sidebar {
    width: 92px;
  }

  .koozee-brand .brand-logo-img {
    display: none;
  }

  .koozee-brand::before {
    content: "万";
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #08090a;
    background: #fff;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 950;
  }

  .koozee-main {
    padding-left: 92px;
  }

  .koozee-topbar {
    left: 92px;
  }

  .koozee-content {
    width: min(1120px, calc(100vw - 138px));
  }

  .koozee-feature-row,
  .koozee-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Replace text-simulated brand names with the unified image mark. */
.koozee-vip-title {
  align-items: center;
  gap: 6px;
}

.koozee-vip-title img {
  display: block;
  width: auto;
  height: 20px;
  border-radius: 3px;
}

.koozee-vip-title em {
  color: rgba(255, 255, 255, 0.94);
  font-size: 18px;
  font-weight: 650;
  line-height: 20px;
}

.recharge-showcase-copy .recharge-showcase-brand-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 25px;
  font-weight: 780;
  line-height: 31px;
}

.recharge-showcase-brand-line img {
  display: block;
  width: auto;
  height: 31px;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .koozee-sidebar {
    display: none;
  }

  .koozee-main {
    padding-left: 0;
  }

  .koozee-topbar {
    left: 0;
    height: 64px;
    padding: 0 12px;
  }

  .koozee-invite {
    display: none !important;
  }

  .koozee-content {
    width: calc(100vw - 28px);
    padding-top: 112px;
  }

  .koozee-hero h1 {
    text-align: left;
    font-size: 38px;
  }

  .koozee-hero-empty {
    min-height: 360px;
  }

  .koozee-feature-row {
    display: flex;
    gap: 14px;
    margin-top: 42px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .koozee-feature-card {
    flex: 0 0 84%;
    min-height: 214px;
    scroll-snap-align: start;
  }

  .koozee-feature-card img {
    min-height: 214px;
  }

  .koozee-tools {
    margin-top: 58px;
  }

  .koozee-tool-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .koozee-tool {
    min-height: 72px;
  }
}

/* Keep the ratio control stable while the preview frame follows the selection. */
body:has(.prompt-workspace) .settings-current-ratio-icon {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: currentColor;
}

body:has(.prompt-workspace) .settings-current-ratio-icon svg {
  display: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:has(.prompt-workspace) .settings-current-ratio-icon i {
  display: block;
  width: 15px;
  height: 15px;
  box-sizing: border-box;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}

body:has(.prompt-workspace) .settings-current-ratio-icon[data-current-ratio-icon="auto"] svg {
  display: block;
}

body:has(.prompt-workspace) .settings-current-ratio-icon[data-current-ratio-icon="auto"] i {
  display: none;
}

body:has(.prompt-workspace) .settings-current-ratio-icon[data-current-ratio-icon="3-2"] i { width: 18px; height: 12px; }
body:has(.prompt-workspace) .settings-current-ratio-icon[data-current-ratio-icon="2-3"] i { width: 12px; height: 18px; }
body:has(.prompt-workspace) .settings-current-ratio-icon[data-current-ratio-icon="4-3"] i { width: 18px; height: 14px; }
body:has(.prompt-workspace) .settings-current-ratio-icon[data-current-ratio-icon="3-4"] i { width: 14px; height: 18px; }
body:has(.prompt-workspace) .settings-current-ratio-icon[data-current-ratio-icon="16-9"] i { width: 20px; height: 11px; }
body:has(.prompt-workspace) .settings-current-ratio-icon[data-current-ratio-icon="9-16"] i { width: 11px; height: 20px; }

/* Light premium home refresh */
body:has(.page-home:not([hidden])) .site-header {
  display: none;
}

.page-home {
  min-height: 100vh;
  padding-top: 0;
  color: #17211c;
  background: #f7f8f4;
}

.app-home {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(28, 42, 36, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(28, 42, 36, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fbfbf7 0%, #f4f7f3 48%, #eef5f7 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

.app-home::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, rgba(104, 184, 142, 0.16), transparent 32%),
    linear-gradient(245deg, rgba(104, 121, 184, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 42%);
}

.app-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  width: 72px;
  padding: 18px 0 22px;
  flex-direction: column;
  align-items: center;
  color: #66756d;
  background: rgba(255, 255, 255, 0.88);
  border-right: 1px solid rgba(37, 54, 45, 0.1);
  box-shadow: 10px 0 30px rgba(35, 48, 42, 0.05);
  backdrop-filter: blur(18px);
}

.app-rail-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 38px;
  color: #fff;
  background: linear-gradient(135deg, #10281c, #4b6fff 54%, #ff7d55);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(16, 40, 28, 0.14);
}

.app-rail nav,
.app-rail-bottom {
  display: grid;
  gap: 16px;
}

.app-rail nav {
  flex: 1;
  align-content: start;
}

.app-rail a {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.app-rail a:hover,
.app-rail a.active {
  color: #10281c;
  background: #eef8f2;
  border-color: rgba(104, 184, 142, 0.26);
}

.app-rail a:hover {
  transform: translateY(-1px);
}

.app-rail a i {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: #ff6b55;
  border: 2px solid #fff;
  border-radius: 50%;
}

.app-home-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-left: 72px;
}

.app-home-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 34px;
  background: rgba(251, 251, 247, 0.82);
  border-bottom: 1px solid rgba(37, 54, 45, 0.08);
  backdrop-filter: blur(18px);
}

.app-brand-dark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #101713;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
}

.app-brand-dark em {
  padding: 4px 8px;
  color: #365447;
  background: #e9f3ed;
  border: 1px solid rgba(104, 184, 142, 0.18);
  border-radius: 6px;
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.app-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-invite-pill,
.app-charge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.app-invite-pill {
  color: #304238;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(37, 54, 45, 0.12);
}

.app-charge-pill {
  color: #fff;
  background: #111814;
  border: 1px solid #111814;
  box-shadow: 0 12px 26px rgba(17, 24, 20, 0.16);
}

.app-home-content {
  width: min(1440px, calc(100% - 88px));
  margin: 0 auto;
  padding: 76px 0 96px;
}

.app-hero-board {
  display: grid;
  gap: 42px;
}

.app-hero-board h1 {
  max-width: 880px;
  color: #111814;
  text-align: left;
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 950;
  line-height: 1.02;
}

.app-feature-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1.25fr;
  gap: 18px;
  margin-top: 0;
}

.app-feature-card {
  position: relative;
  min-height: 264px;
  overflow: hidden;
  color: #fff;
  background: #e9efe9;
  border: 1px solid rgba(31, 46, 39, 0.1);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(31, 46, 39, 0.12);
  isolation: isolate;
}

.app-feature-card::after {
  position: absolute;
  inset: 34% 0 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(10, 18, 14, 0.18) 24%, rgba(10, 18, 14, 0.78));
}

.app-feature-card img {
  width: 100%;
  height: 100%;
  min-height: 264px;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.app-feature-card:hover img {
  filter: saturate(1.06);
  transform: scale(1.025);
}

.app-feature-card > span {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 4px 9px;
  color: #10281c;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.app-feature-card > div {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
}

.app-feature-card h2 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.app-feature-card a,
.app-feature-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  color: #101713;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.app-tool-section {
  margin-top: 70px;
}

.app-tool-section h2 {
  margin-bottom: 18px;
  color: #111814;
  font-size: 22px;
  font-weight: 950;
}

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

.app-tool-tile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 82px;
  padding: 0 20px;
  color: #17211c;
  text-align: left;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(37, 54, 45, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(37, 54, 45, 0.06);
  font-size: 16px;
  font-weight: 880;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.app-tool-tile:hover,
.app-tool-tile.active {
  background: #fff;
  border-color: rgba(104, 184, 142, 0.36);
  box-shadow: 0 18px 42px rgba(37, 54, 45, 0.1);
  transform: translateY(-1px);
}

.app-tool-tile svg {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 7px;
  color: #0d7e50;
  background: #e9f7ef;
  border-radius: 8px;
}

.app-tool-tile:nth-child(3n + 2) svg {
  color: #4b5fd8;
  background: #edf0ff;
}

.app-tool-tile:nth-child(3n) svg {
  color: #c85b3e;
  background: #fff0ea;
}

.app-tool-tile small {
  color: #0b7448;
  font-size: 13px;
  font-weight: 900;
}

.app-studio-panel {
  width: 100%;
  margin-top: 70px;
  padding: 26px;
  color: #18231d;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(37, 54, 45, 0.11);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(37, 54, 45, 0.12);
  backdrop-filter: blur(18px);
}

.studio-panel-head {
  margin-bottom: 22px;
}

.studio-panel-head span {
  color: #4b5fd8;
  font-size: 13px;
  font-weight: 950;
}

.studio-panel-head h2 {
  margin-top: 4px;
  color: #111814;
  font-size: 34px;
  font-weight: 950;
}

.studio-panel-head p {
  margin-top: 4px;
  color: #66756d;
  font-size: 15px;
  font-weight: 760;
}

.app-studio-panel .composer-header strong {
  color: #111814;
}

.app-studio-panel .composer-upload,
.app-studio-panel .icon-tool,
.app-studio-panel .select-tool > button {
  color: #23382e;
  background: #f7faf7;
  border-color: rgba(37, 54, 45, 0.12);
  border-radius: 8px;
  box-shadow: none;
}

.app-studio-panel .composer-upload:hover,
.app-studio-panel .icon-tool:hover,
.app-studio-panel .select-tool > button:hover {
  background: #eef8f2;
  border-color: rgba(104, 184, 142, 0.28);
}

.app-studio-panel textarea {
  color: #111814;
  background: #fbfcfa;
  border-color: rgba(37, 54, 45, 0.13);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.app-studio-panel textarea:focus {
  border-color: rgba(104, 184, 142, 0.58);
  box-shadow: 0 0 0 4px rgba(104, 184, 142, 0.12);
}

.app-studio-panel textarea::placeholder {
  color: #8a9890;
}

.app-studio-panel .select-menu {
  background: #fff;
  border-color: rgba(37, 54, 45, 0.12);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(37, 54, 45, 0.14);
}

.app-studio-panel .select-menu button {
  color: #24362d;
}

.app-studio-panel .select-menu button:hover,
.app-studio-panel .select-menu button.active {
  color: #0b7448;
  background: #eaf8f0;
}

.generate-button {
  color: #fff;
  background: linear-gradient(135deg, #10281c 0%, #0b7448 52%, #4b6fff 100%);
  border-color: transparent;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(11, 116, 72, 0.24);
}

.generate-button:hover {
  box-shadow: 0 18px 40px rgba(11, 116, 72, 0.3);
  transform: translateY(-1px);
}

@media (max-width: 1180px) {
  .app-feature-row,
  .app-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .app-rail {
    display: none;
  }

  .app-home-main {
    padding-left: 0;
  }

  .app-home-topbar {
    height: auto;
    min-height: 62px;
    padding: 12px 16px;
  }

  .app-brand-dark {
    font-size: 21px;
  }

  .app-invite-pill {
    display: none;
  }

  .app-home-content {
    width: calc(100% - 28px);
    padding: 48px 0 68px;
  }

  .app-hero-board {
    gap: 28px;
  }

  .app-hero-board h1 {
    font-size: 38px;
  }

  .app-feature-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .app-feature-card {
    flex: 0 0 82%;
    min-height: 196px;
    scroll-snap-align: start;
  }

  .app-feature-card img {
    min-height: 196px;
  }

  .app-tool-section,
  .app-studio-panel {
    margin-top: 46px;
  }

  .app-tool-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .app-tool-tile {
    min-height: 68px;
    padding: 0 16px;
  }

  .app-studio-panel {
    padding: 16px;
  }

  .studio-panel-head h2 {
    font-size: 27px;
  }
}

/* Final priority lock for the Koozee-style homepage. */
body:has(.koozee-home) .site-header,
body:has(.koozee-home) .home-footer {
  display: none;
}

/* Keep the workbench background clean and uninterrupted. */
body:has(.koozee-home) .koozee-home {
  background: #08090a;
}

body:has(.koozee-home) .page-home {
  padding-top: 0;
  color: #f7f7f7;
  background: #08090a;
}

body:has(.koozee-home) .koozee-home {
  color: #f6f6f6;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.035), transparent 32%),
    radial-gradient(circle at 50% 54%, rgba(104, 184, 142, 0.06), transparent 34%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, #08090a 0%, #070809 62%, #060708 100%);
  background-size: auto, auto, 78px 78px, auto;
}

body:has(.koozee-home) .koozee-sidebar {
  background: linear-gradient(90deg, rgba(5, 6, 7, 0.96), rgba(8, 9, 10, 0.82));
}

body:has(.koozee-home) .koozee-brand {
  gap: 7px;
  padding-left: 18px;
  font-size: 22px;
  white-space: nowrap;
}

body:has(.koozee-home) .koozee-brand .brand-logo-img {
  height: 26px;
  max-width: 142px;
}

body:has(.koozee-home) .koozee-rail,
body:has(.koozee-home) .koozee-rail-bottom {
  padding-left: 24px;
}

body:has(.koozee-home) .koozee-rail a,
body:has(.koozee-home) .koozee-rail-bottom a {
  color: rgba(255, 255, 255, 0.52);
}

body:has(.koozee-home) .koozee-rail a:hover,
body:has(.koozee-home) .koozee-rail a.active,
body:has(.koozee-home) .koozee-rail-bottom a:hover {
  color: rgba(255, 255, 255, 0.95);
}

body:has(.koozee-home) .koozee-rail svg,
body:has(.koozee-home) .koozee-rail-bottom svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.05;
}

body:has(.koozee-home) .koozee-topbar {
  height: 70px;
  background: linear-gradient(180deg, rgba(8, 9, 10, 0.98), rgba(8, 9, 10, 0.68));
}

body:has(.koozee-home) .koozee-account {
  gap: 8px;
}

body:has(.koozee-home) .koozee-account button {
  height: 40px;
  font-weight: 900;
}

body:has(.koozee-home) .koozee-invite {
  padding: 0 18px;
  background: rgba(28, 29, 32, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 15px;
}

body:has(.koozee-home) .koozee-credit {
  min-width: 84px;
  background: #31221d;
  font-size: 16px;
}

body:has(.koozee-home) .koozee-recharge {
  font-size: 15px;
}

body:has(.koozee-home) .koozee-avatar {
  width: 42px;
  height: 42px;
}

body:has(.koozee-home) .koozee-content {
  width: min(1500px, calc(100vw - 290px));
  padding-top: 154px;
}

body:has(.koozee-home) .koozee-composer-zone {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body:has(.koozee-home) .koozee-composer-zone h1 {
  margin: 0 0 74px;
  font-size: clamp(36px, 3.05vw, 56px);
  font-weight: 920;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.36);
}

body:has(.koozee-home) .koozee-composer-panel {
  width: min(1120px, 100%);
  margin: 0;
  padding: 18px 20px 20px;
  color: #13231b;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 249, 245, 0.9)),
    #f2faf6;
  border: 1px solid rgba(188, 226, 205, 0.72);
  border-radius: 20px;
  box-shadow:
    0 28px 78px rgba(0, 0, 0, 0.34),
    0 18px 56px rgba(104, 184, 142, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

body:has(.koozee-home) .koozee-composer-panel .studio-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

body:has(.koozee-home) .koozee-composer-panel .studio-panel-head span {
  color: #111a15;
  font-size: 18px;
  font-weight: 950;
}

body:has(.koozee-home) .koozee-composer-panel .composer-upload {
  gap: 9px;
  height: 38px;
  padding: 0 16px;
  color: #183827;
  background: rgba(248, 254, 251, 0.78);
  border: 1px solid rgba(95, 184, 135, 0.22);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 950;
}

body:has(.koozee-home) .koozee-composer-panel .composer-upload svg {
  width: 20px;
  height: 20px;
}

body:has(.koozee-home) .koozee-composer-panel textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  padding: 17px 20px;
  color: #10261c;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(34, 52, 42, 0.1);
  border-radius: 15px;
  outline: 0;
  resize: vertical;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 26px rgba(31, 78, 53, 0.045);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.65;
}

body:has(.koozee-home) .koozee-composer-panel textarea::placeholder {
  color: #94a49b;
}

body:has(.koozee-home) .koozee-composer-panel .reference-strip {
  margin-top: 16px;
}

body:has(.koozee-home) .koozee-composer-panel .composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

body:has(.koozee-home) .koozee-composer-panel .composer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body:has(.koozee-home) .koozee-composer-panel .icon-tool,
body:has(.koozee-home) .koozee-composer-panel .select-tool > button {
  height: 40px;
  color: #183827;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(40, 70, 52, 0.095);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(35, 76, 54, 0.075);
  font-size: 14px;
  font-weight: 950;
}

body:has(.koozee-home) .koozee-composer-panel .icon-tool {
  display: inline-grid;
  place-items: center;
  width: 44px;
}

body:has(.koozee-home) .koozee-composer-panel .select-tool > button {
  gap: 8px;
  padding: 0 14px;
}

body:has(.koozee-home) .koozee-composer-panel .icon-tool svg,
body:has(.koozee-home) .koozee-composer-panel .select-tool > button svg {
  width: 19px;
  height: 19px;
}

body:has(.koozee-home) .koozee-composer-panel .select-menu {
  background: #fff;
  border-color: rgba(40, 70, 52, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(24, 56, 39, 0.18);
}

body:has(.koozee-home) .koozee-composer-panel .generate-button {
  flex: 0 0 auto;
  gap: 10px;
  height: 46px;
  min-width: 198px;
  padding: 0 20px;
  color: #0b1f15;
  background: linear-gradient(180deg, #71c694, #61b784);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(70, 162, 108, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-size: 16px;
  font-weight: 950;
}

body:has(.koozee-home) .koozee-composer-panel .generate-button svg {
  width: 22px;
  height: 22px;
}

body:has(.koozee-home) .koozee-composer-panel .composer-error {
  margin-top: 14px;
  color: #bd2445;
  font-size: 15px;
  font-weight: 900;
}

body:has(.koozee-home) .koozee-composer-panel .composer-error[data-tone="status"] {
  color: #9a9ca3;
  font-weight: 600;
}

body:has(.koozee-home) .koozee-composer-panel .generation-results {
  margin-top: 24px;
}

body:has(.koozee-home) .koozee-composer-panel .generation-results:not([hidden]) + .composer-static-album {
  display: none;
}

body:has(.koozee-home) .koozee-composer-panel .composer-static-album,
body:has(.koozee-home) .koozee-composer-panel .generation-results .album-panel {
  margin-top: 18px;
  padding: 16px;
  color: #10261c;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(44, 79, 59, 0.11);
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(31, 78, 53, 0.055);
}

body:has(.koozee-home) .koozee-composer-panel .album-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

body:has(.koozee-home) .koozee-composer-panel .album-head h3 {
  color: #10261c;
  font-size: 18px;
  font-weight: 950;
}

body:has(.koozee-home) .koozee-composer-panel .generation-soft-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 14px;
  color: #183827;
  background: #fff;
  border: 1px solid rgba(44, 79, 59, 0.13);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
}

body:has(.koozee-home) .koozee-composer-panel .generation-soft-button svg {
  width: 20px;
  height: 20px;
}

body:has(.koozee-home) .koozee-composer-panel .album-empty {
  display: grid;
  place-items: center;
  min-height: 58px;
  color: #708277;
  background: rgba(251, 254, 252, 0.92);
  border: 2px dashed rgba(99, 151, 123, 0.18);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 860;
}

body:has(.koozee-home) .koozee-tools {
  margin-top: 64px;
}

body:has(.koozee-home) .koozee-tools h2 {
  margin-bottom: 22px;
  font-size: 23px;
  font-weight: 920;
}

body:has(.koozee-home) .koozee-tool-grid {
  gap: 16px;
}

body:has(.koozee-home) .koozee-tool {
  min-height: 72px;
  padding: 0 24px;
  color: rgba(255, 255, 255, 0.88);
  background: #17191b;
  border-color: rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 28px rgba(0, 0, 0, 0.18);
  font-size: 16px;
  font-weight: 820;
}

body:has(.koozee-home) .koozee-tool:hover {
  background: #1d1f22;
  border-color: rgba(255, 255, 255, 0.12);
}

body:has(.koozee-home) .koozee-tool svg {
  width: 23px;
  height: 23px;
  color: rgba(255, 255, 255, 0.9);
}

body:has(.koozee-home) .koozee-chat {
  width: 54px;
  height: 54px;
  background: #202124;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.34);
}

@media (max-width: 1280px) {
  body:has(.koozee-home) .koozee-composer-panel .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  body:has(.koozee-home) .koozee-composer-panel .generate-button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  body:has(.koozee-home) .koozee-content {
    padding-top: 104px;
  }

  body:has(.koozee-home) .koozee-composer-zone h1 {
    margin-bottom: 34px;
  }

  body:has(.koozee-home) .koozee-composer-panel {
    padding: 18px;
    border-width: 5px;
    border-radius: 24px;
  }

  body:has(.koozee-home) .koozee-composer-panel .studio-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body:has(.koozee-home) .koozee-composer-panel .studio-panel-head span {
    font-size: 23px;
  }

  body:has(.koozee-home) .koozee-composer-panel textarea {
    min-height: 170px;
    padding: 22px;
    font-size: 17px;
  }

  body:has(.koozee-home) .koozee-composer-panel .icon-tool,
  body:has(.koozee-home) .koozee-composer-panel .select-tool > button {
    height: 52px;
    font-size: 16px;
  }

  body:has(.koozee-home) .koozee-composer-panel .generate-button {
    min-width: 0;
    height: 60px;
    font-size: 19px;
  }
}

/* GPT Image-style prompt workspace */
body:has(.prompt-workspace) .koozee-content {
  width: min(1510px, calc(100vw - 260px));
  padding-top: 130px;
}

body:has(.prompt-workspace) .koozee-composer-zone h1 {
  margin-bottom: 48px;
}

body:has(.prompt-workspace) .koozee-composer-panel {
  width: 100%;
  padding: 0;
  color: #f4f5f6;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.prompt-workspace {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(320px, 420px);
  gap: 26px;
  align-items: start;
  width: 100%;
}

.prompt-editor {
  min-width: 0;
}

.prompt-model-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  height: 88px;
  overflow: hidden;
  background: #202124;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 34px 34px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.prompt-model-tabs button {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font-size: 17px;
  font-weight: 780;
}

.prompt-model-tabs button span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 31px;
  line-height: 1;
}

.prompt-model-tabs button strong {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 780;
}

.prompt-model-tabs button.active {
  color: #fff;
  background:
    radial-gradient(circle at 50% -20%, rgba(118, 250, 255, 0.48), transparent 62%),
    linear-gradient(180deg, rgba(55, 175, 190, 0.66), rgba(35, 40, 43, 0.12) 72%);
}

.prompt-model-tabs button.active::after {
  position: absolute;
  right: 28px;
  bottom: 0;
  left: 28px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(122, 238, 255, 0.75), transparent);
}

.prompt-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
  min-height: clamp(520px, 58vh, 720px);
  padding: 40px 34px 30px;
  background: #18191c;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-top: 0;
  border-radius: 0 0 34px 34px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 28px 76px rgba(0, 0, 0, 0.32);
}

.prompt-upload-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 88px;
}

body:has(.prompt-workspace) .reference-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
}

body:has(.prompt-workspace) .reference-strip[hidden] {
  display: none;
}

body:has(.prompt-workspace) .reference-thumb {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
}

body:has(.prompt-workspace) .reference-thumb::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  height: 30px;
  content: "图片";
  color: #fff;
  background: rgba(0, 0, 0, 0.36);
  font-size: 14px;
  font-weight: 900;
}

body:has(.prompt-workspace) .reference-thumb button {
  z-index: 2;
}

.prompt-add-image {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  color: rgba(255, 255, 255, 0.78);
  background: #2a2b2f;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 14px;
}

.prompt-add-image svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.7;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea {
  min-height: 260px;
  padding: 42px 0 24px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  resize: none;
  font-size: clamp(22px, 1.55vw, 29px);
  font-weight: 900;
  line-height: 1.5;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea::placeholder {
  color: #fff;
  opacity: 1;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea:focus {
  box-shadow: none;
}

body:has(.prompt-workspace) .composer-footer {
  align-self: end;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
}

body:has(.prompt-workspace) .composer-tools {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  background: rgba(25, 26, 29, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
}

body:has(.prompt-workspace) .koozee-composer-panel .icon-tool {
  display: none;
}

body:has(.prompt-workspace) .model-select-tool,
body:has(.prompt-workspace) .count-select-tool {
  display: none;
}

body:has(.prompt-workspace) .koozee-composer-panel .select-tool > button {
  height: 52px;
  padding: 0 20px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 17px;
  font-weight: 780;
}

body:has(.prompt-workspace) .koozee-composer-panel .select-tool + .select-tool > button {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

body:has(.prompt-workspace) .koozee-composer-panel .select-tool > button svg {
  width: 21px;
  height: 21px;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
  height: 56px;
  min-width: 158px;
  padding: 0 26px;
  color: #07120f;
  background: linear-gradient(135deg, #71ecff 0%, #4df0d2 52%, #83f3c1 100%);
  border: 0;
  border-radius: 12px;
  box-shadow:
    0 18px 38px rgba(70, 238, 217, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  font-size: 22px;
  font-weight: 950;
}

body:has(.prompt-workspace) .koozee-composer-panel .composer-error {
  align-self: start;
  margin: 0;
  color: #ff8ca0;
  font-size: 14px;
}


body:has(.prompt-workspace) .koozee-composer-panel .composer-error[data-tone="status"] {
  color: #9a9ca3;
  font-weight: 500;
}

.prompt-preview-panel,
body:has(.prompt-workspace) .generation-results {
  width: 100%;
}

body:has(.prompt-workspace) .generation-results .album-panel,
body:has(.prompt-workspace) .generation-results .generation-result-panel {
  margin: 0;
  padding: 16px;
  color: #f6f7f8;
  background: #18191c;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 16px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
}

body:has(.prompt-workspace) .generation-results .album-head h3,
body:has(.prompt-workspace) .generation-results .album-head p {
  color: #fff;
}

@media (max-width: 1180px) {
  .prompt-workspace {
    grid-template-columns: 1fr;
  }

  .prompt-preview-panel {
    display: none;
  }
}

@media (max-width: 720px) {
  body:has(.prompt-workspace) .koozee-content {
    padding-top: 96px;
  }

  .prompt-model-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: auto;
    border-radius: 22px 22px 0 0;
  }

  .prompt-model-tabs button {
    min-height: 72px;
  }

  .prompt-card {
    min-height: 520px;
    padding: 22px 18px;
    border-radius: 0 0 22px 22px;
  }

  body:has(.prompt-workspace) .koozee-composer-panel textarea {
    min-height: 220px;
    font-size: 22px;
  }

  body:has(.prompt-workspace) .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  body:has(.prompt-workspace) .composer-tools {
    width: fit-content;
  }

  body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
    width: 100%;
  }
}

/* Final proportional pass: match the large GPT Image editor proportions. */
body:has(.prompt-workspace) .koozee-content {
  width: min(1840px, calc(100vw - 235px));
  padding-top: 132px;
}

body:has(.prompt-workspace) .koozee-composer-zone h1 {
  margin-bottom: 58px;
}

.prompt-workspace {
  grid-template-columns: 1fr;
  gap: 0;
}

.prompt-editor {
  width: 100%;
}

.prompt-preview-panel {
  display: none;
  margin-top: 24px;
}

.prompt-preview-panel:has(.generation-results:not([hidden])) {
  display: block;
}

.prompt-model-tabs {
  height: 154px;
  background: #202124;
  border-color: rgba(255, 255, 255, 0.04);
  border-radius: 56px 56px 0 0;
}

.prompt-model-tabs button {
  gap: 20px;
  color: rgba(255, 255, 255, 0.72);
}

.prompt-model-tabs button span {
  font-size: 48px;
  opacity: 0.86;
}

.prompt-model-tabs button strong {
  font-size: clamp(24px, 1.5vw, 34px);
  font-weight: 850;
}

.prompt-model-tabs button.active {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(94, 220, 231, 0.62), transparent 58%),
    linear-gradient(180deg, rgba(64, 163, 177, 0.72) 0%, rgba(32, 33, 36, 0.08) 74%);
}

.prompt-model-tabs button.active::after {
  right: 34px;
  left: 34px;
  background: linear-gradient(90deg, transparent, rgba(70, 220, 232, 0.64), transparent);
}

.prompt-card {
  min-height: clamp(720px, 67vh, 940px);
  padding: 76px 64px 54px;
  background: #18191c;
  border-color: rgba(255, 255, 255, 0.045);
  border-radius: 0 0 56px 56px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 36px 90px rgba(0, 0, 0, 0.34);
}

.prompt-card::after {
  position: absolute;
  right: 64px;
  bottom: 0;
  width: 420px;
  height: 120px;
  pointer-events: none;
  content: "";
  background: radial-gradient(ellipse at 75% 100%, rgba(73, 242, 218, 0.22), transparent 66%);
  opacity: 0.8;
}

.prompt-upload-row {
  gap: 22px;
  min-height: 158px;
}

body:has(.prompt-workspace) .reference-strip {
  gap: 22px;
}

body:has(.prompt-workspace) .reference-thumb,
.prompt-add-image {
  width: 154px;
  height: 154px;
  border-radius: 22px;
}

body:has(.prompt-workspace) .reference-thumb::after {
  height: 42px;
  font-size: 22px;
}

.prompt-add-image {
  background: #2a2b2f;
  border-color: rgba(255, 255, 255, 0.045);
}

.prompt-add-image svg {
  width: 58px;
  height: 58px;
  stroke-width: 1.55;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea {
  min-height: 360px;
  padding: 70px 0 32px;
  font-size: clamp(33px, 2.15vw, 44px);
  font-weight: 950;
  line-height: 1.36;
}

body:has(.prompt-workspace) .composer-footer {
  position: relative;
  z-index: 1;
  align-items: flex-end;
}

body:has(.prompt-workspace) .composer-tools {
  border-radius: 18px;
}

body:has(.prompt-workspace) .koozee-composer-panel .select-tool > button {
  height: 92px;
  padding: 0 38px;
  font-size: 30px;
  font-weight: 850;
}

body:has(.prompt-workspace) .koozee-composer-panel .select-tool > button svg {
  width: 31px;
  height: 31px;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
  height: 96px;
  min-width: 300px;
  padding: 0 46px;
  border-radius: 18px;
  box-shadow:
    0 24px 48px rgba(70, 238, 217, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  font-size: 37px;
  font-weight: 950;
}

@media (max-width: 1280px) {
  body:has(.prompt-workspace) .koozee-content {
    width: min(1120px, calc(100vw - 138px));
  }

  .prompt-model-tabs {
    height: 120px;
    border-radius: 38px 38px 0 0;
  }

  .prompt-model-tabs button strong {
    font-size: 22px;
  }

  .prompt-card {
    min-height: 680px;
    padding: 48px 42px 40px;
    border-radius: 0 0 38px 38px;
  }

  body:has(.prompt-workspace) .reference-thumb,
  .prompt-add-image {
    width: 112px;
    height: 112px;
  }

  body:has(.prompt-workspace) .koozee-composer-panel textarea {
    font-size: 30px;
  }

  body:has(.prompt-workspace) .koozee-composer-panel .select-tool > button {
    height: 64px;
    font-size: 20px;
  }

  body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
    height: 68px;
    min-width: 210px;
    font-size: 24px;
  }
}

/* Size correction: keep the GPT editor premium, not gigantic. */
body:has(.prompt-workspace) .koozee-content {
  width: min(1040px, calc(100vw - 360px));
  padding-top: 132px;
}

body:has(.prompt-workspace) .koozee-composer-zone h1 {
  margin-bottom: 46px;
  color: #f8f8f8;
  font-size: clamp(30px, 2.45vw, 44px);
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 42px rgba(0, 0, 0, 0.42);
  -webkit-text-stroke: 0.18px rgba(255, 255, 255, 0.2);
}

.prompt-model-tabs {
  height: 72px;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(36, 37, 40, 0.96), rgba(30, 31, 34, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.prompt-model-tabs button {
  gap: 5px;
  color: rgba(255, 255, 255, 0.68);
  text-shadow: none;
}

.prompt-model-tabs button span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 23px;
  opacity: 0.82;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.04));
}

.prompt-model-tabs button strong {
  font-size: clamp(13px, 0.84vw, 16px);
  font-weight: 720;
  letter-spacing: 0;
}

.prompt-model-tabs button.active {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(70, 196, 209, 0.58) 0%, rgba(47, 145, 157, 0.34) 42%, rgba(32, 33, 36, 0) 78%);
}

.prompt-model-tabs button.active span {
  color: #fff;
  opacity: 0.96;
  filter: drop-shadow(0 3px 10px rgba(126, 238, 246, 0.24));
}

.prompt-model-tabs button.active strong {
  color: #fff;
  font-weight: 760;
}

.prompt-model-tabs button.active::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 56%;
  height: 34px;
  pointer-events: none;
  content: "";
  background: radial-gradient(ellipse at 50% 0%, rgba(118, 244, 252, 0.2), rgba(74, 198, 210, 0.08) 48%, transparent 78%);
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.prompt-model-tabs button.active::after {
  position: absolute;
  right: 35%;
  bottom: 0;
  left: 35%;
  height: 1px;
  content: "";
  background: rgba(64, 197, 209, 0.34);
}

.prompt-model-tabs {
  justify-items: stretch;
}

.prompt-model-tabs button {
  justify-items: center;
}

.model-icon {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0 !important;
  line-height: 1;
  opacity: 0.86;
}

.model-icon::before,
.model-icon::after {
  position: absolute;
  content: "";
}

.model-icon.banana::before {
  inset: 5px 3px 6px 4px;
  background: currentColor;
  border-radius: 60% 18% 62% 24%;
  clip-path: polygon(3% 58%, 32% 22%, 50% 2%, 64% 38%, 95% 44%, 68% 60%, 77% 95%, 46% 76%, 14% 86%, 24% 64%);
}

.model-icon.gpt {
  display: grid;
  place-items: center;
}

.model-icon.gpt::before {
  width: 23px;
  height: 23px;
  border: 2.5px solid currentColor;
  border-radius: 50%;
}

.model-icon.gpt::after {
  width: 10px;
  height: 10px;
  border: 2.5px solid currentColor;
  border-radius: 50%;
}

.model-icon.kling::before {
  inset: 5px 2px 5px 4px;
  border: 7px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(24deg);
}

.model-icon.kling::after {
  right: 4px;
  bottom: 6px;
  width: 13px;
  height: 13px;
  background: currentColor;
  border-radius: 50%;
}

.model-icon.gemini::before {
  inset: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
}

.prompt-model-tabs button.active .model-icon {
  color: #fff;
  filter: drop-shadow(0 3px 10px rgba(126, 238, 246, 0.24));
}

.prompt-card {
  min-height: 360px;
  padding: 26px 28px 24px;
  border-radius: 0 0 22px 22px;
}

.prompt-card::after {
  right: 36px;
  width: 260px;
  height: 86px;
}

.prompt-upload-row {
  gap: 12px;
  min-height: 72px;
}

body:has(.prompt-workspace) .reference-strip {
  gap: 14px;
}

body:has(.prompt-workspace) .reference-thumb,
.prompt-add-image {
  width: 64px;
  height: 64px;
  border-radius: 11px;
}

.prompt-add-image svg {
  width: 27px;
  height: 27px;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea {
  min-height: 150px;
  padding: 30px 0 18px;
  font-size: clamp(18px, 1.08vw, 23px);
  line-height: 1.46;
}

body:has(.prompt-workspace) .composer-tools {
  border-radius: 12px;
  overflow: visible;
  position: relative;
  z-index: 8;
}

body:has(.prompt-workspace) .koozee-composer-panel .select-tool > button {
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

body:has(.prompt-workspace) .koozee-composer-panel .select-menu {
  bottom: calc(100% + 9px);
  z-index: 40;
  min-width: 118px;
  padding: 6px;
  background: #202124;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

body:has(.prompt-workspace) .koozee-composer-panel .select-menu button {
  height: 32px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

body:has(.prompt-workspace) .koozee-composer-panel .select-menu button:hover,
body:has(.prompt-workspace) .koozee-composer-panel .select-menu button.active {
  color: #ffffff;
  background: rgba(69, 216, 205, 0.16);
}

/* Model strip: match the compact KOOZEE reference proportions. */
.prompt-model-tabs {
  height: 80px;
  background: linear-gradient(180deg, #212225 0%, #202124 58%, #1f2022 100%);
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(0, 0, 0, 0.42);
  border-radius: 27px 27px 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 14px 30px rgba(0, 0, 0, 0.12);
}

.prompt-model-tabs button {
  position: relative;
  z-index: 0;
  gap: 3px;
  padding: 4px 8px 4px;
  color: rgba(255, 255, 255, 0.68);
  font-family: Inter, "SF Pro Display", "PingFang SC", sans-serif;
  font-weight: 500;
}

.prompt-model-tabs button strong {
  position: relative;
  z-index: 1;
  overflow: visible;
  max-width: none;
  font-size: clamp(13px, 0.82vw, 15px);
  font-weight: 500;
  white-space: nowrap;
}

.prompt-model-tabs button.active {
  overflow: hidden;
  border-radius: 32px 32px 0 0;
  background: linear-gradient(
    180deg,
    rgba(61, 177, 190, 0.86) 0%,
    rgba(46, 132, 143, 0.62) 32%,
    rgba(38, 78, 83, 0.28) 62%,
    rgba(32, 33, 36, 0) 100%
  );
}

.prompt-model-tabs button.active::before {
  display: none;
}

.prompt-model-tabs button.active::after {
  right: 25%;
  bottom: 0;
  left: 25%;
  height: 1px;
  background: #38b6c3;
  box-shadow: 0 0 5px rgba(56, 182, 195, 0.2);
}

.prompt-model-tabs button:not(.active)::before,
.prompt-model-tabs button:not(.active)::after {
  display: none;
}

.model-icon,
.model-icon::before,
.model-icon::after {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0 !important;
  line-height: 1;
  opacity: 1;
  filter: none;
}

.model-icon::before,
.model-icon::after {
  position: static;
  content: none;
}

.model-icon path {
  fill: currentColor;
}

.model-icon.gpt path + path {
  fill: none;
}

.model-icon.gpt {
  color: rgba(255, 255, 255, 0.92);
}

.prompt-model-tabs button.active .model-icon {
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(120, 235, 242, 0.24));
}

/* One shared highlight glides between the five model cells. */
.prompt-model-tabs {
  position: relative;
  isolation: isolate;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  --model-index: 0;
}

.prompt-model-tabs::before {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: calc(var(--model-index) * 20%);
  width: 20%;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse 78% 58% at 50% -10%, rgba(114, 225, 231, 0.22), transparent 72%),
    linear-gradient(
      180deg,
      #3b9ca8 0%,
      #317985 24%,
      #28545c 45%,
      #223b41 64%,
      rgba(32, 33, 36, 0.45) 82%,
      rgba(32, 33, 36, 0) 100%
    );
  border-radius: 27px 27px 0 0;
  transition: left 480ms cubic-bezier(0.22, 0.8, 0.22, 1);
}

.prompt-model-tabs::after {
  position: absolute;
  z-index: 2;
  right: auto;
  bottom: 0;
  left: calc(var(--model-index) * 20% + 5%);
  width: 10%;
  height: 1px;
  pointer-events: none;
  content: "";
  background: #38b6c3;
  box-shadow: 0 0 5px rgba(56, 182, 195, 0.2);
  transition: left 480ms cubic-bezier(0.22, 0.8, 0.22, 1);
}

.prompt-model-tabs button,
.prompt-model-tabs button.active {
  background: transparent;
  border-radius: 0;
  transition: color 260ms ease;
}

.prompt-model-tabs button::before,
.prompt-model-tabs button::after,
.prompt-model-tabs button.active::before,
.prompt-model-tabs button.active::after {
  display: none;
}

.prompt-model-tabs button.active {
  color: #fff;
}

body:has(.prompt-workspace) .koozee-composer-panel .select-tool > button svg {
  width: 17px;
  height: 17px;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
  height: 48px;
  min-width: 142px;
  padding: 0 22px;
  border-radius: 11px;
  font-size: 18px;
}

/* Compact editor proportions from the red-box reference. */
body:has(.prompt-workspace) .koozee-content {
  position: relative;
  width: min(840px, calc(100vw - 500px));
}

.prompt-card {
  min-height: 276px;
  padding: 18px 24px 18px;
}

.prompt-upload-row {
  min-height: 56px;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea {
  min-height: 104px;
  padding: 18px 0 12px;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea::placeholder {
  color: rgba(198, 199, 204, 0.62);
  font-weight: 650;
  opacity: 1;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea:placeholder-shown {
  color: rgba(198, 199, 204, 0.62);
  font-weight: 650;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea:not(:placeholder-shown) {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 820;
}

.prompt-card::after {
  display: none !important;
  background: none !important;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

/* Final clean backdrop: remove both the grid and the topbar band. */
body:has(.koozee-home) .koozee-home,
body:has(.koozee-home) .page-home {
  background: #08090a !important;
  background-image: none !important;
}

body:has(.koozee-home) .koozee-topbar {
  background: #08090a !important;
  background-image: none !important;
  backdrop-filter: none;
}

/* Single, quiet account entry for the new workspace. */
body:has(.koozee-home) .koozee-login-entry {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  height: 100%;
}

body:has(.koozee-home) .koozee-login-button {
  position: relative;
  width: 76px;
  min-width: 76px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  overflow: hidden;
  color: #101112;
  background: #ffffff;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  font-family: Inter, "SF Pro Display", "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: none;
}

body:has(.koozee-home) .koozee-login-button::before {
  display: none;
}

body:has(.koozee-home) .koozee-login-button:hover {
  color: #101112;
  background: #ffffff;
  box-shadow: none;
}

body:has(.koozee-home) .koozee-login-button:active {
  box-shadow: none;
  transform: none;
}

body:has(.koozee-home) .koozee-login-button:focus-visible {
  outline: 2px solid #46dfec;
  outline-offset: 3px;
}

body:has(.koozee-home) .koozee-login-tip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  display: grid;
  gap: 6px;
  width: 304px;
  padding: 14px 16px 15px;
  color: #ecffff;
  pointer-events: none;
  visibility: hidden;
  background: linear-gradient(145deg, #20292d, #182025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

body:has(.koozee-home) .koozee-login-tip::before {
  position: absolute;
  top: -9px;
  right: 22px;
  width: 18px;
  height: 18px;
  content: "";
  background: #20292d;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  transform: rotate(45deg);
}

body:has(.koozee-home) .koozee-login-tip strong,
body:has(.koozee-home) .koozee-login-tip span {
  position: relative;
  z-index: 1;
  letter-spacing: 0;
}

body:has(.koozee-home) .koozee-login-tip strong {
  color: #2ae4ef;
  font-size: 16px;
  font-weight: 700;
}

body:has(.koozee-home) .koozee-login-tip span {
  color: #73f4eb;
  font-size: 14px;
  font-weight: 480;
}

body:has(.koozee-home) .koozee-login-entry:hover .koozee-login-tip,
body:has(.koozee-home) .koozee-login-entry:focus-within .koozee-login-tip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

body:has(.koozee-home) .koozee-session-strip {
  gap: 7px;
}

body:has(.koozee-home) .course-header-entry {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 15px;
  margin-right: 7px;
  color: rgba(242, 246, 248, 0.82);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

body:has(.koozee-home) .course-header-entry::after {
  position: absolute;
  top: -5px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 14px;
  padding: 0 5px;
  color: #fff;
  background: linear-gradient(180deg, #ff5c67 0%, #e52d3c 100%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 3px 8px rgba(211, 32, 49, 0.34);
  content: "HOT";
  font-family: Inter, "SF Pro Display", sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

body:has(.koozee-home) .course-header-entry:hover {
  color: #f7fbfc;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

body:has(.koozee-home) .koozee-session-strip > button {
  height: 32px;
  color: #f0dac8;
  font-size: 13px;
  font-weight: 740;
  letter-spacing: 0;
}

body:has(.koozee-home) .koozee-session-strip .koozee-invite {
  display: none;
  gap: 6px;
  padding: 0 12px;
  background: rgba(28, 29, 32, 0.88);
  border-radius: 999px;
}

body:has(.koozee-home) .koozee-session-strip .koozee-credit {
  gap: 5px;
  min-width: 64px;
  padding: 0 10px;
  background: rgba(49, 35, 30, 0.88);
  border-radius: 999px 0 0 999px;
}

body:has(.koozee-home) .koozee-session-strip .koozee-credit b {
  font-size: 13px;
  font-weight: 700;
}

body:has(.koozee-home) .koozee-session-strip .koozee-credit span {
  width: 14px;
  height: 14px;
}

body:has(.koozee-home) .koozee-session-strip .koozee-recharge {
  margin-left: -9px;
  padding: 0 12px;
  color: #40271b !important;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 740;
}

/* Align the editor with the left edge marked in the reference. */
body:has(.prompt-workspace) .home-composer {
  position: relative;
  left: -270px;
}

body:has(.prompt-workspace) .koozee-composer-zone h1 {
  position: relative;
  left: -270px;
}

/* Place the featured tool wall in the right-side reference area. */
body:has(.koozee-home) .koozee-tools {
  position: absolute;
  top: 232px;
  right: -300px;
  width: 520px;
  margin-top: 0;
}

body:has(.koozee-home) .koozee-tools h2 {
  display: none;
}

body:has(.koozee-home) .koozee-tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

body:has(.koozee-home) .koozee-tool {
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 74px;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.86);
  background: #181a1d;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-size: 15px;
  font-weight: 660;
}

body:has(.koozee-home) .koozee-tool svg {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.84);
}

/* KOOZEE-like combined ratio / quality picker. */
body:has(.prompt-workspace) .settings-select-tool {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  overflow: visible;
  background: rgba(24, 25, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.022),
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    0 8px 20px rgba(0, 0, 0, 0.12);
}

body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool > button {
  height: 38px;
  padding: 0 14px;
  color: #ffffff;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 15px;
  font-weight: 780;
}

body:has(.prompt-workspace) .settings-ratio-trigger {
  gap: 7px;
}

body:has(.prompt-workspace) .settings-ratio-trigger svg:first-child {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

body:has(.prompt-workspace) .settings-ratio-trigger svg:last-child {
  display: none;
}

body:has(.prompt-workspace) .settings-quality-trigger {
  border-left: 1px solid rgba(255, 255, 255, 0.055) !important;
}

body:has(.prompt-workspace) .koozee-composer-panel .prompt-settings-menu {
  left: 0;
  bottom: calc(100% + 9px);
  z-index: 80;
  width: 438px;
  padding: 14px;
  color: rgba(255, 255, 255, 0.84);
  background: #292a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 58px rgba(0, 0, 0, 0.42);
}

body:has(.prompt-workspace) .settings-menu-section {
  display: grid;
  gap: 10px;
}

body:has(.prompt-workspace) .settings-menu-section + .settings-menu-section {
  margin-top: 17px;
}

body:has(.prompt-workspace) .settings-menu-section > strong {
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 760;
}

body:has(.prompt-workspace) .quality-segment {
  display: grid;
  grid-template-columns: repeat(var(--quality-option-count, 2), minmax(0, 1fr));
  gap: 6px;
  padding: 3px;
  background: rgba(33, 34, 37, 0.82);
  border-radius: 10px;
}

body:has(.prompt-workspace) .koozee-composer-panel .quality-segment button {
  height: 36px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 780;
}

body:has(.prompt-workspace) .koozee-composer-panel .quality-segment button.active,
body:has(.prompt-workspace) .koozee-composer-panel .quality-segment button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

body:has(.prompt-workspace) .ratio-option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 2px;
}

body:has(.prompt-workspace) .koozee-composer-panel .ratio-option-grid button {
  display: grid;
  justify-items: center;
  height: 75px;
  padding: 9px 6px 8px;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  background: transparent;
  border-radius: 8px;
  font-weight: 700;
}

body:has(.prompt-workspace) .koozee-composer-panel .ratio-option-grid button.active,
body:has(.prompt-workspace) .koozee-composer-panel .ratio-option-grid button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

body:has(.prompt-workspace) .ratio-option-grid i {
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 4px;
  border: 2px solid currentColor;
  opacity: 0.88;
}

body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="auto"] {
  border-style: dashed;
  border-radius: 3px;
}

body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="3-2"],
body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="4-3"] {
  width: 25px;
  height: 15px;
}

body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="2-3"],
body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="3-4"] {
  width: 15px;
  height: 25px;
}

body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="16-9"] {
  width: 27px;
  height: 12px;
}

body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="9-16"] {
  width: 12px;
  height: 27px;
}

body:has(.prompt-workspace) .ratio-option-grid span {
  font-size: 14px;
  line-height: 1.1;
}

body:has(.prompt-workspace) .ratio-option-grid small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
}

/* Refined reference match: quieter contrast, centered spacing, no resolution line. */
body:has(.prompt-workspace) .koozee-composer-panel .prompt-settings-menu {
  width: 438px;
  padding: 14px;
  background: #292a2d;
  border-color: rgba(255, 255, 255, 0.085);
  border-radius: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 0 0 1px rgba(0, 0, 0, 0.1),
    0 20px 54px rgba(0, 0, 0, 0.42);
}

body:has(.prompt-workspace) .settings-menu-section {
  gap: 11px;
}

body:has(.prompt-workspace) .settings-menu-section + .settings-menu-section {
  margin-top: 17px;
}

body:has(.prompt-workspace) .settings-menu-section > strong {
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 720;
}

body:has(.prompt-workspace) .quality-segment {
  gap: 6px;
  padding: 3px;
  background: #303134;
  border-radius: 10px;
}

body:has(.prompt-workspace) .koozee-composer-panel .quality-segment button {
  height: 36px;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 760;
}

body:has(.prompt-workspace) .koozee-composer-panel .quality-segment button.active {
  color: #ffffff;
  background: #46474b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body:has(.prompt-workspace) .koozee-composer-panel .quality-segment button:hover {
  color: #ffffff;
  background: #414246;
}

body:has(.prompt-workspace) .ratio-option-grid {
  gap: 8px 10px;
  padding: 3px;
  background: #303134;
  border-radius: 10px;
}

body:has(.prompt-workspace) .koozee-composer-panel .ratio-option-grid button {
  align-content: center;
  gap: 6px;
  height: 63px;
  padding: 8px 5px;
  color: rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  font-weight: 700;
}

body:has(.prompt-workspace) .koozee-composer-panel .ratio-option-grid button.active {
  color: #ffffff;
  background: #46474b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body:has(.prompt-workspace) .koozee-composer-panel .ratio-option-grid button:hover {
  color: #ffffff;
  background: #414246;
}

body:has(.prompt-workspace) .ratio-option-grid i {
  margin: 0;
  border-width: 2px;
  opacity: 0.82;
}

body:has(.prompt-workspace) .ratio-option-grid span {
  font-size: 14px;
  line-height: 1;
}

body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool > button {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 620;
}

body:has(.prompt-workspace) .settings-select-tool [data-setting-label] {
  font-family: Inter, "SF Pro Display", "PingFang SC", sans-serif;
  font-weight: 620;
  letter-spacing: 0;
}

/* Bottom controls: keep the generate button compact and top-aligned with settings. */
body:has(.prompt-workspace) .composer-footer {
  align-items: flex-start;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
  height: 42px;
  min-width: 132px;
  padding: 0 20px;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 760;
  line-height: 1;
}

/* Red-frame pass: shrink the whole image tool proportionally, not just the shell. */
body:has(.prompt-workspace) .koozee-content {
  width: min(820px, calc(100vw - 520px));
}

.prompt-model-tabs {
  height: 70px;
  border-radius: 22px 22px 0 0;
}

.prompt-model-tabs::before {
  border-radius: 22px 22px 0 0;
}

.prompt-model-tabs button {
  gap: 2px;
  padding: 3px 8px;
}

.model-icon,
.model-icon::before,
.model-icon::after {
  width: 24px;
  height: 24px;
}

.prompt-model-tabs button strong {
  font-size: 13px;
}

.prompt-card {
  grid-template-rows: auto minmax(178px, 1fr) auto;
  min-height: 318px;
  padding: 16px 22px 16px;
  border-radius: 0 0 22px 22px;
}

.prompt-upload-row {
  min-height: 52px;
}

body:has(.prompt-workspace) .reference-thumb,
.prompt-add-image {
  width: 56px;
  height: 56px;
  border-radius: 10px;
}

.prompt-add-image svg {
  width: 24px;
  height: 24px;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea {
  min-height: 96px;
  padding: 16px 0 10px;
  font-size: clamp(16px, 0.98vw, 20px);
}

body:has(.prompt-workspace) .settings-select-tool {
  height: 36px;
  border-radius: 11px;
}

body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool > button {
  height: 34px;
  padding: 0 12px;
  font-size: 14px;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
  height: 38px;
  min-width: 122px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 15px;
}

/* Result board lives directly under the composer; hidden only while empty. */
body:has(.koozee-home) .prompt-preview-panel {
  display: none;
}

body:has(.koozee-home) .prompt-preview-panel:has(.generation-results:not([hidden])) {
  display: block;
}

/* Reference upload thumbnails: small bottom label and loading spinner. */
body:has(.prompt-workspace) .reference-thumb,
body:has(.prompt-workspace) .prompt-add-image {
  width: 58px;
  height: 58px;
  border-radius: 11px;
}

body:has(.prompt-workspace) .reference-thumb {
  overflow: hidden;
  background: #27282c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

body:has(.prompt-workspace) .reference-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body:has(.prompt-workspace) .reference-thumb::after {
  right: 0;
  bottom: 0;
  left: auto;
  width: 40px;
  height: 22px;
  content: attr(data-label);
  color: rgba(255, 255, 255, 0.96);
  background: rgba(56, 56, 59, 0.78);
  border-radius: 8px 0 10px 0;
  font-size: 12px;
  font-weight: 760;
  line-height: 22px;
  letter-spacing: 0;
}

body:has(.prompt-workspace) .reference-thumb::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  width: 22px;
  height: 22px;
  margin: auto;
  content: "";
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  animation: referenceThumbSpin 0.82s linear infinite;
}

body:has(.prompt-workspace) .reference-thumb.is-loading::before {
  display: block;
}

body:has(.prompt-workspace) .reference-thumb.is-loading img {
  opacity: 0.72;
}

body:has(.prompt-workspace) .reference-thumb button {
  top: 4px;
  right: 4px;
  z-index: 3;
  width: 18px;
  height: 18px;
  background: rgba(36, 36, 38, 0.72);
  font-size: 14px;
  font-weight: 520;
}

body:has(.prompt-workspace) .prompt-add-image {
  color: rgba(255, 255, 255, 0.78);
  background: #2a2b2f;
  border: 1px solid rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

body:has(.prompt-workspace) .prompt-add-image svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.45;
}

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

/* Keep uploaded thumbnail and add-image box perfectly aligned. */
body:has(.prompt-workspace) .prompt-upload-row {
  align-items: flex-start;
  gap: 12px;
}

body:has(.koozee-home) .koozee-composer-panel .reference-strip,
body:has(.prompt-workspace) .reference-strip {
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 0 !important;
  line-height: 0;
}

body:has(.prompt-workspace) .reference-thumb,
body:has(.prompt-workspace) .prompt-add-image {
  box-sizing: border-box;
  flex: 0 0 58px;
  width: 58px !important;
  height: 58px !important;
  min-width: 58px;
  min-height: 58px;
  margin: 0;
  transform: none;
}

/* Compact settings popover to match the scaled-down composer. */
body:has(.prompt-workspace) .koozee-composer-panel .prompt-settings-menu {
  bottom: calc(100% + 7px);
  width: 312px;
  min-width: 312px;
  padding: 10px;
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(0, 0, 0, 0.1),
    0 16px 38px rgba(0, 0, 0, 0.36);
}

body:has(.prompt-workspace) .settings-menu-section {
  gap: 8px;
}

body:has(.prompt-workspace) .settings-menu-section + .settings-menu-section {
  margin-top: 11px;
}

body:has(.prompt-workspace) .settings-menu-section > strong {
  font-size: 12px;
  font-weight: 690;
}

body:has(.prompt-workspace) .quality-segment {
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
}

body:has(.prompt-workspace) .koozee-composer-panel .quality-segment button {
  height: 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

body:has(.prompt-workspace) .ratio-option-grid {
  gap: 5px;
  padding: 3px;
  border-radius: 8px;
}

body:has(.prompt-workspace) .koozee-composer-panel .ratio-option-grid button {
  gap: 4px;
  height: 46px;
  padding: 5px 3px;
  border-radius: 7px;
  font-weight: 650;
}

body:has(.prompt-workspace) .ratio-option-grid i {
  width: 13px;
  height: 13px;
  border-width: 1.6px;
}

body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="3-2"],
body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="4-3"] {
  width: 18px;
  height: 11px;
}

body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="2-3"],
body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="3-4"] {
  width: 11px;
  height: 18px;
}

body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="16-9"] {
  width: 20px;
  height: 9px;
}

body:has(.prompt-workspace) .ratio-option-grid i[data-ratio-icon="9-16"] {
  width: 9px;
  height: 20px;
}

body:has(.prompt-workspace) .ratio-option-grid span {
  font-size: 12px;
}

/* Move the whole hero workspace as one block to match the left-shifted reference frame. */
body:has(.koozee-home) .koozee-content {
  transform: translateX(-86px);
}

/* Softer prompt placeholder after the editor was scaled down. */
body:has(.prompt-workspace) .koozee-composer-panel textarea {
  font-size: clamp(15px, 0.9vw, 18px);
}

body:has(.prompt-workspace) .koozee-composer-panel textarea::placeholder,
body:has(.prompt-workspace) .koozee-composer-panel textarea:placeholder-shown {
  color: rgba(186, 188, 194, 0.56);
  font-weight: 560;
}

/* Featured tool buttons: closer to the reference card material. */
body:has(.koozee-home) .koozee-tool-grid {
  gap: 12px 14px;
}

body:has(.koozee-home) .koozee-tool {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 68px;
  padding: 0 18px;
  color: rgba(238, 239, 241, 0.88);
  background: linear-gradient(180deg, #181a1d 0%, #16181b 100%);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.026),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
  font-size: 14px;
  font-weight: 610;
  letter-spacing: 0;
}

body:has(.koozee-home) .koozee-tool svg {
  width: 19px;
  height: 19px;
  color: rgba(244, 245, 247, 0.82);
  stroke-width: 2.15;
}

body:has(.koozee-home) .koozee-tool:hover {
  color: rgba(255, 255, 255, 0.94);
  background: linear-gradient(180deg, #1b1d20 0%, #17191c 100%);
  border-color: rgba(255, 255, 255, 0.065);
  transform: translateY(-1px);
}

/* Four-model tab states: grey normal, white hover, cyan only for the selected glide. */
body:has(.prompt-workspace) .prompt-model-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:has(.prompt-workspace) .prompt-model-tabs::before {
  left: calc(var(--model-index) * 25%);
  width: 25%;
}

body:has(.prompt-workspace) .prompt-model-tabs::after {
  left: calc(var(--model-index) * 25% + 6.25%);
  width: 12.5%;
}

body:has(.prompt-workspace) .prompt-model-tabs button {
  color: rgba(221, 222, 226, 0.66);
}

body:has(.prompt-workspace) .prompt-model-tabs button strong {
  color: currentColor;
  font-weight: 500;
}

body:has(.prompt-workspace) .prompt-model-tabs button .model-icon {
  color: currentColor;
  opacity: 0.88;
  filter: none;
}

body:has(.prompt-workspace) .prompt-model-tabs button:hover:not(.active) {
  color: rgba(255, 255, 255, 0.96);
}

body:has(.prompt-workspace) .prompt-model-tabs button:hover:not(.active) .model-icon {
  opacity: 1;
}

body:has(.prompt-workspace) .prompt-model-tabs button.active {
  color: #ffffff;
}

body:has(.prompt-workspace) .prompt-model-tabs button.active strong {
  font-weight: 650;
}

body:has(.prompt-workspace) .prompt-model-tabs button.active .model-icon {
  color: #ffffff;
  opacity: 1;
  filter: drop-shadow(0 1px 3px rgba(120, 235, 242, 0.2));
}

body:has(.prompt-workspace) .model-icon.gpt .openai-knot,
body:has(.prompt-workspace) .model-icon.gpt .openai-knot path {
  fill: none !important;
  stroke: currentColor;
}

body:has(.prompt-workspace) .model-icon.gpt path {
  fill: currentColor !important;
  stroke: none !important;
}

/* Final GPT tab proportion pass: reference uses a larger icon with lighter text. */
body:has(.prompt-workspace) .prompt-model-tabs button {
  gap: 0;
  padding-top: 3px;
  padding-bottom: 7px;
  transition: color 140ms ease-out !important;
}

body:has(.prompt-workspace) .prompt-model-tabs button strong {
  color: currentColor;
  font-size: 13px;
  font-weight: 430;
  line-height: 0.95;
  margin-top: -4px;
  transition: none !important;
}

body:has(.prompt-workspace) .prompt-model-tabs button.active strong {
  font-weight: 510;
}

body:has(.prompt-workspace) .model-icon.gpt {
  color: currentColor;
  width: 40px;
  height: 40px;
  transform: translateY(2px);
  transition: none !important;
}

body:has(.prompt-workspace) .model-icon.gpt g {
  transform-box: fill-box;
  transform-origin: center;
}

body:has(.prompt-workspace) .prompt-model-tabs button:not(.active) .model-icon.gpt {
  color: currentColor;
  opacity: 1;
  filter: none;
}

body:has(.prompt-workspace) .prompt-model-tabs button:hover:not(.active) .model-icon.gpt {
  color: currentColor;
  opacity: 1;
  filter: none;
}

body:has(.prompt-workspace) .prompt-model-tabs button.active .model-icon.gpt {
  color: currentColor;
  filter: drop-shadow(0 1px 3px rgba(120, 235, 242, 0.2));
}

/* Nano Banana uses the uploaded icon as one source: mask for grey/white, color art when active. */
body:has(.prompt-workspace) .model-icon.banana {
  width: 30px;
  height: 30px;
  background-color: currentColor;
  background-image: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color: currentColor;
  opacity: 1;
  transform: translateY(-1px);
  filter: none;
  transition: none !important;
  -webkit-mask: url("./images/nano-banana-pro-icon-tight.png") center / contain no-repeat;
  mask: url("./images/nano-banana-pro-icon-tight.png") center / contain no-repeat;
}

body:has(.prompt-workspace) .prompt-model-tabs button:has(.model-icon.banana) strong {
  margin-top: 3px;
}

body:has(.prompt-workspace) .model-icon.banana::before,
body:has(.prompt-workspace) .model-icon.banana::after {
  display: none !important;
  content: none !important;
}

body:has(.prompt-workspace) .prompt-model-tabs button:not(.active) .model-icon.banana,
body:has(.prompt-workspace) .prompt-model-tabs button:hover:not(.active) .model-icon.banana {
  background-color: currentColor;
  filter: none;
}

body:has(.prompt-workspace) .prompt-model-tabs button.active .model-icon.banana {
  background-color: transparent;
  background-image: url("./images/nano-banana-pro-icon-tight.png");
  filter: drop-shadow(0 1px 5px rgba(255, 216, 74, 0.22));
  -webkit-mask: none;
  mask: none;
}

body:has(.prompt-workspace) .model-icon.gemini {
  width: 30px;
  height: 30px;
  background: url("./images/gemini-icon-idle.png") center / contain no-repeat;
  opacity: 1;
  transform: translateY(-1px);
  filter: none;
  transition: none !important;
}

body:has(.prompt-workspace) .prompt-model-tabs button:has(.model-icon.gemini) strong {
  margin-top: 3px;
}

body:has(.prompt-workspace) .model-icon.gemini::before {
  display: none !important;
  content: none !important;
}

body:has(.prompt-workspace) .prompt-model-tabs button.active .model-icon.gemini {
  background-image: url("./images/gemini-icon-active.png");
  filter: drop-shadow(0 1px 5px rgba(90, 148, 255, 0.24));
}

/* Prompt text: softer typed-input weight, closer to the KOOZEE reference. */
body:has(.prompt-workspace) .koozee-composer-panel textarea {
  color: rgba(244, 245, 248, 0.9);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(15px, 0.86vw, 17px);
  font-weight: 460;
  line-height: 1.42;
  letter-spacing: 0;
  caret-color: #ffffff;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea:not(:placeholder-shown) {
  color: rgba(244, 245, 248, 0.92);
  font-weight: 470;
  text-shadow: none;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea::placeholder,
body:has(.prompt-workspace) .koozee-composer-panel textarea:placeholder-shown {
  color: rgba(190, 193, 200, 0.48);
  font-weight: 440;
  opacity: 1;
  text-shadow: none;
}

/* Generating state: grey, quiet, and genuinely disabled like the reference. */
.generate-button .generate-button-busy {
  display: none;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button.is-generating,
body:has(.prompt-workspace) .koozee-composer-panel .generate-button:disabled.is-generating {
  pointer-events: none;
  cursor: not-allowed;
  color: rgba(179, 180, 186, 0.68);
  background: linear-gradient(180deg, #2b2c31 0%, #27282d 100%);
  border: 1px solid rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  opacity: 1;
  transform: none;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button.is-generating #generateButtonText {
  display: none;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button.is-generating .generate-button-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: currentColor;
  font-size: 15px;
  font-weight: 760;
  line-height: 1;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button.is-generating .generate-button-busy::before {
  content: "生成";
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button[data-mode="prompt"].is-generating .generate-button-busy::before {
  content: "正在回复";
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button.is-generating .generate-button-busy i {
  width: 10px;
  height: 13px;
  border-radius: 55% 45% 55% 45%;
  background: currentColor;
  opacity: 0.72;
  transform: rotate(-26deg);
}

/* Generated images: direct black-stage thumbnails under the editor, no old album cards. */
body:has(.koozee-home) .prompt-preview-panel {
  width: 100%;
  margin-top: 26px;
}

body:has(.koozee-home) .generation-results:not([hidden]) {
  display: block !important;
}

body:has(.prompt-workspace) .generation-results .result-board {
  min-height: 168px;
  padding: 18px;
  color: #f6f7f8;
  background: linear-gradient(180deg, rgba(22, 24, 27, 0.96), rgba(15, 17, 19, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 16px 36px rgba(0, 0, 0, 0.14);
}

body:has(.prompt-workspace) .generation-results .result-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-bottom: 16px;
  padding: 0 2px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

body:has(.prompt-workspace) .generation-results .result-board-heading,
body:has(.prompt-workspace) .generation-results .result-board-state {
  display: flex;
  align-items: center;
}

body:has(.prompt-workspace) .generation-results .result-board-heading {
  gap: 10px;
}

body:has(.prompt-workspace) .generation-results .result-board-heading strong {
  color: rgba(248, 249, 250, 0.94);
  font-size: 15px;
  font-weight: 620;
  line-height: 1;
}

body:has(.prompt-workspace) .generation-results .result-board-heading span {
  color: rgba(181, 184, 190, 0.62);
  font-size: 12px;
  font-weight: 480;
}

body:has(.prompt-workspace) .generation-results .result-board-state {
  gap: 7px;
  color: rgba(181, 184, 190, 0.55);
  font-size: 12px;
  font-weight: 480;
}

body:has(.prompt-workspace) .generation-results .result-board-state i {
  width: 6px;
  height: 6px;
  background: #38d7df;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(56, 215, 223, 0.1);
  animation: resultStatePulse 1.35s ease-in-out infinite;
}

body:has(.prompt-workspace) .generation-results .result-progress {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  color: rgba(245, 246, 248, 0.76);
  font-size: 13px;
  font-weight: 560;
}

body:has(.prompt-workspace) .generation-results .result-progress small {
  color: rgba(178, 181, 188, 0.52);
  font-size: 12px;
  font-weight: 430;
}

body:has(.prompt-workspace) .generation-results .result-board-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: flex-start;
  gap: 11px;
  width: 100%;
}

body:has(.prompt-workspace) .generation-results .result-masonry-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 11px;
}

body:has(.prompt-workspace) .generation-results .result-image-card {
  display: block;
  min-width: 0;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
}

body:has(.prompt-workspace) .generation-results .result-image-tile {
  position: relative;
  display: block;
  overflow: hidden;
  width: 168px;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 7px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

body:has(.prompt-workspace) .generation-results .result-image-tile:hover,
body:has(.prompt-workspace) .generation-results .result-image-tile:focus-within {
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

body:has(.prompt-workspace) .generation-results .result-image-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: inherit;
}

body:has(.prompt-workspace) .generation-results .result-action-bar {
  position: absolute;
  right: auto;
  bottom: 10px;
  left: 50%;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  width: 116px;
  max-width: calc(100% - 12px);
  height: 32px;
  padding: 0 4px;
  box-sizing: border-box;
  pointer-events: none;
  background: rgba(29, 31, 34, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translate(-50%, 5px) scale(0.985);
  transition:
    opacity 170ms ease,
    transform 170ms cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(13px) saturate(135%) brightness(0.86);
  -webkit-backdrop-filter: blur(13px) saturate(135%) brightness(0.86);
}

body:has(.prompt-workspace) .generation-results .result-image-tile:hover .result-action-bar,
body:has(.prompt-workspace) .generation-results .result-image-tile:focus-within .result-action-bar {
  pointer-events: auto;
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

body:has(.prompt-workspace) .generation-results .result-action-bar button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  padding: 0;
  color: rgba(255, 255, 255, 0.96);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  transition:
    color 120ms ease,
    background 120ms ease,
    transform 120ms ease;
}

body:has(.prompt-workspace) .generation-results .result-action-bar button::after {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  z-index: 3;
  padding: 5px 8px;
  color: rgba(255, 255, 255, 0.94);
  content: attr(data-tooltip);
  white-space: nowrap;
  pointer-events: none;
  background: rgba(28, 30, 34, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 80ms ease, transform 80ms ease;
}

body:has(.prompt-workspace) .generation-results .result-action-bar button:hover::after,
body:has(.prompt-workspace) .generation-results .result-action-bar button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

body:has(.prompt-workspace) .generation-results .result-action-bar button:hover {
  color: #ffffff;
  background: rgba(161, 163, 170, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: none;
}

body:has(.prompt-workspace) .generation-results .result-action-bar button:disabled,
body:has(.prompt-workspace) .generation-results .result-action-bar button.is-busy {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

body:has(.prompt-workspace) .generation-results .result-action-bar svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:has(.prompt-workspace) .generation-results .result-image-card[data-ratio="16-9"] .result-image-tile {
  width: 238px;
  aspect-ratio: 16 / 9;
}

body:has(.prompt-workspace) .generation-results .result-image-card[data-ratio="4-3"] .result-image-tile {
  width: 210px;
  aspect-ratio: 4 / 3;
}

body:has(.prompt-workspace) .generation-results .result-image-card[data-ratio="3-2"] .result-image-tile {
  width: 226px;
  aspect-ratio: 3 / 2;
}

body:has(.prompt-workspace) .generation-results .result-image-card[data-ratio="3-4"] .result-image-tile {
  width: 136px;
  aspect-ratio: 3 / 4;
}

body:has(.prompt-workspace) .generation-results .result-image-card[data-ratio="2-3"] .result-image-tile {
  width: 136px;
  aspect-ratio: 2 / 3;
}

body:has(.prompt-workspace) .generation-results .result-image-card[data-ratio="9-16"] .result-image-tile {
  width: 136px;
  aspect-ratio: 9 / 16;
}

/* Keep every generated thumbnail on one column width; only the height follows its ratio. */
body:has(.prompt-workspace) .generation-results .result-image-card[data-ratio] .result-image-tile {
  width: 100%;
}

body:has(.prompt-workspace) .generation-results .result-skeleton {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #151619;
  border-radius: 7px;
}

body:has(.prompt-workspace) .generation-results .result-skeleton div {
  width: 100%;
  height: 100%;
  background: linear-gradient(100deg, #191a1d 0%, #24262a 44%, #191a1d 88%);
  background-size: 220% 100%;
  animation: resultShimmer 1.2s ease-in-out infinite;
}

body:has(.prompt-workspace) .generation-results .result-loading-card {
  position: relative;
}

body:has(.prompt-workspace) .generation-results .result-loading-tile {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #17191c;
}

body:has(.prompt-workspace) .generation-results .result-loading-tile img {
  position: relative;
  z-index: -2;
  filter: blur(8px) brightness(0.62) saturate(0.78);
  transform: scale(1.08);
}

body:has(.prompt-workspace) .generation-results .result-loading-tile::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(9, 12, 17, 0.36);
}

body:has(.prompt-workspace) .generation-results .result-loading-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 62%;
  height: 6px;
  overflow: hidden;
  background: rgba(243, 245, 248, 0.34);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

body:has(.prompt-workspace) .generation-results .result-loading-progress span {
  display: block;
  width: 8%;
  height: 100%;
  background: #f6f7f8;
  border-radius: inherit;
  transition: width 0.18s linear;
}

@keyframes resultShimmer {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

@keyframes resultStatePulse {
  0%, 100% { opacity: 0.48; }
  50% { opacity: 1; }
}

@media (max-width: 1100px) {
  body:has(.prompt-workspace) .generation-results .result-board-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body:has(.prompt-workspace) .generation-results .result-board-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  body:has(.prompt-workspace) .generation-results .result-masonry-column {
    gap: 10px;
  }
}

@media (max-width: 520px) {
  body:has(.prompt-workspace) .generation-results .result-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Full-size preview follows the homepage's dark glass language. */
body:has(.koozee-home) .image-preview-modal {
  padding: 20px;
  background: rgba(5, 7, 9, 0.82);
  backdrop-filter: blur(14px) saturate(105%);
  -webkit-backdrop-filter: blur(14px) saturate(105%);
}

body:has(.koozee-home) .image-preview-dialog {
  width: min(1040px, 100%);
  max-height: calc(100vh - 40px);
  gap: 12px;
  padding: 12px;
  background: rgba(22, 24, 27, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow:
    0 28px 84px rgba(0, 0, 0, 0.58),
    0 2px 16px rgba(0, 0, 0, 0.3);
}

body:has(.koozee-home) .image-preview-dialog img {
  max-height: calc(100vh - 126px);
  background: #0d0f11;
  border-radius: 12px;
}

body:has(.koozee-home) .image-preview-close {
  top: 22px;
  right: 22px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: rgba(247, 248, 249, 0.9);
  background: rgba(24, 27, 30, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body:has(.koozee-home) .image-preview-close:hover {
  color: #ffffff;
  background: rgba(52, 56, 60, 0.96);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
  transform: scale(1.04);
}

body:has(.koozee-home) .image-preview-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

body:has(.koozee-home) .image-preview-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(19, 22, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-50%);
}

body:has(.koozee-home) .image-preview-nav:hover {
  color: #ffffff;
  background: rgba(30, 34, 37, 0.9);
}

body:has(.koozee-home) .image-preview-nav[hidden] {
  display: none;
}

body:has(.koozee-home) .image-preview-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:has(.koozee-home) .image-preview-prev {
  left: 22px;
}

body:has(.koozee-home) .image-preview-next {
  right: 22px;
}

body:has(.koozee-home) .image-preview-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(150px, 100%);
  min-height: 36px;
  margin: 0 0 0 auto;
  gap: 12px;
  align-items: stretch;
}

body:has(.koozee-home) .image-preview-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 36px;
  padding: 0 16px;
  color: rgba(247, 248, 249, 0.96);
  background: #252629;
  border: 0;
  border-radius: 11px;
  box-shadow: none;
  font-size: 15px;
  font-weight: 600;
}

body:has(.koozee-home) .image-preview-actions button:hover {
  color: #ffffff;
  background: #303236;
  box-shadow: none;
}

body:has(.koozee-home) .image-preview-actions .image-preview-download-button {
  font-size: 0;
}

body:has(.koozee-home) .image-preview-actions .image-preview-download-button::before {
  width: 19px;
  height: 19px;
  margin-right: 9px;
  content: "";
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v13M7 11l5 5 5-5M5 21h14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v13M7 11l5 5 5-5M5 21h14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

body:has(.koozee-home) .image-preview-actions .image-preview-download-button::after {
  content: "下载";
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
}

@media (max-width: 640px) {
  body:has(.koozee-home) .image-preview-modal {
    padding: 10px;
  }

  body:has(.koozee-home) .image-preview-dialog {
    padding: 8px;
    border-radius: 14px;
  }

  body:has(.koozee-home) .image-preview-dialog img {
    max-height: calc(100vh - 92px);
    border-radius: 9px;
  }

  body:has(.koozee-home) .image-preview-close {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
  }

  body:has(.koozee-home) .image-preview-nav {
    width: 40px;
    height: 40px;
  }

  body:has(.koozee-home) .image-preview-prev {
    left: 14px;
  }

  body:has(.koozee-home) .image-preview-next {
    right: 14px;
  }

  body:has(.koozee-home) .image-preview-actions {
    min-height: 42px;
  }

  body:has(.koozee-home) .image-preview-actions {
    width: 100%;
  }

  body:has(.koozee-home) .image-preview-actions button {
    height: 40px;
  }

  body:has(.koozee-home) .image-preview-actions .image-preview-download-button {
    width: 100%;
  }
}

/* Confirmation dialogs use the same dark, quiet hierarchy as the homepage. */
body:has(.koozee-home) .app-dialog-modal {
  z-index: 4300;
  padding: 20px;
  background: rgba(4, 6, 8, 0.78);
  backdrop-filter: blur(12px) saturate(105%);
  -webkit-backdrop-filter: blur(12px) saturate(105%);
}

body:has(.koozee-home) .app-dialog {
  width: min(430px, 100%);
  padding: 30px 30px 30px;
  color: #f6f7f8;
  text-align: center;
  background: #242528;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 17px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.56);
}

body:has(.koozee-home) .app-dialog-icon {
  display: none;
}

body:has(.koozee-home) .app-dialog-close {
  display: none;
}

body:has(.koozee-home) .app-dialog-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

body:has(.koozee-home) .app-dialog h2 {
  padding-right: 0;
  color: #f7f8f9;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
}

body:has(.koozee-home) .app-dialog p {
  margin-top: 12px;
  color: rgba(215, 218, 223, 0.7);
  font-size: 15px;
  font-weight: 460;
  line-height: 1.45;
}

body:has(.koozee-home) .app-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

body:has(.koozee-home) .app-dialog-actions:has(.app-dialog-secondary[hidden]) {
  grid-template-columns: minmax(0, 176px);
  justify-content: center;
}

body:has(.koozee-home) .app-dialog-actions button {
  min-width: 0;
  height: 43px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 650;
}

body:has(.koozee-home) .app-dialog-secondary {
  color: rgba(245, 246, 248, 0.92);
  background: #36373b;
}

body:has(.koozee-home) .app-dialog-secondary:hover {
  color: #ffffff;
  background: #3c3d42;
  border: 0;
}

body:has(.koozee-home) .app-dialog-primary {
  color: #071417;
  background: #25cee7;
  border: 0;
  box-shadow: none;
}

body:has(.koozee-home) .app-dialog-primary:hover {
  color: #071417;
  background: #39d8ed;
  border: 0;
  box-shadow: none;
}

@media (max-width: 520px) {
  body:has(.koozee-home) .app-dialog {
    width: min(360px, 100%);
    padding: 28px 20px 22px;
  }

  body:has(.koozee-home) .app-dialog-actions {
    gap: 10px;
  }
}

/* Settings trigger feedback: quiet hover, brighter open state. */
body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool > button {
  position: relative;
  z-index: 1;
  transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

body:has(.koozee-home) .koozee-rail a:focus,
body:has(.koozee-home) .koozee-rail-bottom a:focus,
body:has(.koozee-home) .koozee-rail a:focus-visible,
body:has(.koozee-home) .koozee-rail-bottom a:focus-visible {
  outline: none;
  box-shadow: none;
}

body:has(.koozee-home) .koozee-rail-bottom a.active,
body:has(.koozee-home) .koozee-rail-bottom a.active:focus,
body:has(.koozee-home) .koozee-rail-bottom a.active:focus-visible {
  background: transparent;
  outline: none;
  box-shadow: none;
}

body:has(.koozee-home) .koozee-language-picker {
  position: relative;
  width: 36px;
  height: 36px;
}

body:has(.koozee-home) .koozee-language-trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: rgba(255, 255, 255, 0.48);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

body:has(.koozee-home) .koozee-language-trigger:hover {
  color: #050607;
  background: #27cee6;
  box-shadow: 0 0 18px rgba(39, 206, 230, 0.12);
}

body:has(.koozee-home) .koozee-language-trigger:hover .koozee-bottom-icon--outline {
  filter: brightness(0);
}

body:has(.koozee-home) .koozee-language-trigger:focus,
body:has(.koozee-home) .koozee-language-trigger:focus-visible {
  outline: none;
}

body:has(.koozee-home) .koozee-language-picker.open .koozee-language-trigger {
  color: #ffffff;
  background: transparent;
  box-shadow: none;
}

body:has(.koozee-home) .koozee-language-picker.open .koozee-bottom-icon--outline {
  opacity: 0;
}

body:has(.koozee-home) .koozee-language-picker.open .koozee-bottom-icon--solid {
  opacity: 1;
}

body:has(.koozee-home) .koozee-language-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 18px);
  z-index: 90;
  width: 128px;
  padding: 5px 0;
  overflow: hidden;
  background: rgba(44, 46, 50, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  box-shadow: 8px 12px 24px rgba(0, 0, 0, 0.28);
}

body:has(.koozee-home) .koozee-language-menu[hidden] {
  display: none;
}

body:has(.koozee-home) .koozee-language-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
  padding: 0 13px;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  border: 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.14s ease, background-color 0.14s ease;
}

body:has(.koozee-home) .koozee-language-menu button:hover,
body:has(.koozee-home) .koozee-language-menu button:focus-visible {
  background: rgba(255, 255, 255, 0.045);
  outline: none;
}

body:has(.koozee-home) .koozee-language-menu button[aria-checked="true"] {
  color: #2bcce2;
}

body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool > button:hover,
body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool > button:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  outline: none;
}

body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool.open > button {
  color: #ffffff;
  background: #303134;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool.open > .settings-quality-trigger {
  border-left-color: rgba(255, 255, 255, 0.1) !important;
}

/* Provided sidebar icon set: outline, hover and selected states. */
body:has(.koozee-home) .koozee-rail {
  gap: 18px;
  padding-top: 26px;
  padding-left: 18px;
}

body:has(.koozee-home) .koozee-rail a {
  width: 42px;
  height: 42px;
  overflow: visible;
  border-radius: 11px;
  transform: none;
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

body:has(.koozee-home) .koozee-rail a:hover,
body:has(.koozee-home) .koozee-rail a.active {
  transform: none;
}

body:has(.koozee-home) .koozee-rail a:not(.active):hover {
  background: #2bd4ea;
  box-shadow: 0 0 18px rgba(43, 212, 234, 0.14);
}

.koozee-nav-icon {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  transition: opacity 0.12s ease, filter 0.12s ease;
}

.koozee-nav-icon--outline {
  opacity: 0.5;
  filter: brightness(0) invert(1);
}

.koozee-nav-icon--solid {
  opacity: 0;
}

body:has(.koozee-home) .koozee-rail a.active .koozee-nav-icon--outline {
  opacity: 0;
}

body:has(.koozee-home) .koozee-rail a.active .koozee-nav-icon--solid {
  opacity: 1;
}

body:has(.koozee-home) .koozee-rail a:not(.active):hover .koozee-nav-icon--outline {
  opacity: 1;
  filter: brightness(0);
}

body:has(.koozee-home) .koozee-rail a::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 60;
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 0 15px;
  color: #ffffff;
  background: linear-gradient(90deg, #292c31 0%, #292c31 74%, rgba(43, 212, 234, 0.22) 100%);
  border: 1px solid rgba(135, 145, 156, 0.46);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-4px, -50%);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
  pointer-events: none;
}

body:has(.koozee-home) .koozee-rail a:not(.active):hover::after {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

body:has(.koozee-home) .koozee-rail a.new span {
  top: -8px;
  right: -17px;
}

/* Treat Auto and quality as one control: one shared hover/open surface and clean outer corners. */
body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool > button:first-of-type {
  border-radius: 10px 0 0 10px;
}

body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool > button:last-of-type {
  border-radius: 0 10px 10px 0;
}

body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool:has(> button:hover) > button,
body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool.open > button {
  color: #ffffff;
  background: #303134;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool:has(> button:hover) > .settings-quality-trigger,
body:has(.prompt-workspace) .koozee-composer-panel .settings-select-tool.open > .settings-quality-trigger {
  border-left-color: rgba(255, 255, 255, 0.1) !important;
}

/* Reference-style compact home rail. Keep this after the legacy rail rules. */
body:has(.koozee-home) .koozee-sidebar {
  --koozee-rail-width: 164px;
  --koozee-icon-left: 15px;
  width: var(--koozee-rail-width);
  grid-template-rows: 70px minmax(0, 1fr) auto;
  padding: 22px 0 30px;
  background: linear-gradient(180deg, #0b0c0e 0%, #090a0b 54%, #08090a 100%);
}

body:has(.koozee-home) .koozee-brand {
  align-items: flex-start;
  height: 44px;
  padding-left: 22px;
}

body:has(.koozee-home) .koozee-brand .brand-logo-img {
  height: 25px;
  max-width: 150px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
}

body:has(.koozee-home) .koozee-rail,
body:has(.koozee-home) .koozee-rail-bottom {
  justify-items: start;
  padding-left: var(--koozee-icon-left);
}

body:has(.koozee-home) .koozee-rail {
  gap: 12px;
  padding-top: 23px;
}

body:has(.koozee-home) .koozee-rail-bottom {
  gap: 22px;
}

body:has(.koozee-home) .koozee-rail a,
body:has(.koozee-home) .koozee-rail-bottom a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.48);
  background: transparent;
  transform: none;
  transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

body:has(.koozee-home) .koozee-rail a:hover,
body:has(.koozee-home) .koozee-rail-bottom a:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

body:has(.koozee-home) .koozee-rail a:not(.active):hover {
  background: #27cee6;
  box-shadow: 0 0 18px rgba(39, 206, 230, 0.12);
}

body:has(.koozee-home) .koozee-rail a.active {
  color: #ffffff;
  background: transparent;
  box-shadow: none;
}

body:has(.koozee-home) .koozee-rail svg,
body:has(.koozee-home) .koozee-rail-bottom svg,
body:has(.koozee-home) .koozee-nav-icon,
body:has(.koozee-home) .koozee-bottom-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

body:has(.koozee-home) [data-open-notifications].notification-arrived .koozee-bottom-icon {
  transform-origin: 50% 12%;
  animation: notification-bell-ring 760ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

body:has(.koozee-home) [data-open-notifications].notification-arrived .koozee-notification-dot {
  animation: notification-dot-pop 540ms cubic-bezier(0.2, 0.9, 0.25, 1.35) both;
}

@keyframes notification-bell-ring {
  0%, 100% { transform: rotate(0deg); }
  18% { transform: rotate(13deg); }
  36% { transform: rotate(-11deg); }
  54% { transform: rotate(8deg); }
  72% { transform: rotate(-5deg); }
  88% { transform: rotate(2deg); }
}

@keyframes notification-dot-pop {
  0% { transform: scale(0.25); opacity: 0; }
  55% { transform: scale(1.45); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

body:has(.koozee-home) .koozee-rail-bottom svg {
  stroke-width: 2.05;
}

body:has(.koozee-home) .koozee-nav-icon--outline {
  opacity: 1;
  filter: none;
}

body:has(.koozee-home) .koozee-nav-icon--solid {
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.08));
}

body:has(.koozee-home) .koozee-bottom-icon {
  position: absolute;
  pointer-events: none;
  transition: opacity 0.12s ease, filter 0.12s ease;
}

body:has(.koozee-home) .koozee-bottom-icon--outline {
  opacity: 1;
  filter: none;
}

body:has(.koozee-home) .koozee-bottom-icon--solid {
  opacity: 0;
}

body:has(.koozee-home) .koozee-rail a.active .koozee-nav-icon--solid {
  opacity: 1;
}

body:has(.koozee-home) .koozee-rail-bottom a.active .koozee-bottom-icon--outline {
  opacity: 0;
}

body:has(.koozee-home) .koozee-rail-bottom a.active .koozee-bottom-icon--solid {
  opacity: 1;
}

body:has(.koozee-home) .koozee-rail a:not(.active):hover .koozee-nav-icon--outline {
  opacity: 1;
  filter: brightness(0);
}

body:has(.koozee-home) .koozee-rail-bottom a:not(.active):hover {
  color: #050607;
  background: #27cee6;
  box-shadow: 0 0 18px rgba(39, 206, 230, 0.12);
}

body:has(.koozee-home) .koozee-rail-bottom a:not(.active):hover .koozee-bottom-icon--outline {
  opacity: 1;
  filter: brightness(0);
}

body:has(.koozee-home) .koozee-rail a.new .koozee-new-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  z-index: 2;
  display: block;
  width: 27px;
  height: 20px;
  max-width: none;
  pointer-events: none;
}

body:has(.koozee-home) .koozee-rail-bottom i {
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 2px #090a0b;
}

body:has(.koozee-home) .koozee-rail a::after {
  left: calc(100% + 12px);
  min-height: 36px;
  padding: 0 13px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(25, 27, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  font-size: 14px;
  font-weight: 700;
}

.user-avatar {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.user-avatar-image.default-avatar::before,
.user-avatar-image.default-avatar::after {
  display: none;
}

.user-avatar-image {
  background: #0b0c0d;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.user-avatar-image img {
  transform: scale(1.06);
}

.default-avatar {
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.72), transparent 18%),
    radial-gradient(circle at 70% 68%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(145deg, #182024, #355d67 52%, #90d7ce);
}

.default-avatar::before,
.default-avatar::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  border-radius: inherit;
}

.default-avatar::before {
  background:
    conic-gradient(from 210deg at 52% 50%, rgba(255, 255, 255, 0.22), transparent 16%, rgba(0, 0, 0, 0.22) 36%, transparent 58%, rgba(255, 255, 255, 0.18) 82%, transparent),
    radial-gradient(ellipse at 28% 70%, rgba(255, 214, 168, 0.3), transparent 36%);
  mix-blend-mode: overlay;
}

.default-avatar::after {
  inset: 10%;
  background:
    linear-gradient(115deg, transparent 10%, rgba(255, 255, 255, 0.22) 38%, transparent 58%),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(255, 255, 255, 0.18) 54%, transparent 58%);
  opacity: 0.7;
  filter: blur(0.2px);
}

.default-avatar i {
  position: absolute;
  inset: 18%;
  border-radius: 42% 58% 48% 52%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.12), 0 8px 22px rgba(0, 0, 0, 0.18);
  transform: rotate(-18deg);
}

.default-avatar-1 { background-color: #17464f; background-image: radial-gradient(circle at 28% 25%, #e8fff9, transparent 17%), linear-gradient(145deg, #102025, #2f747b 55%, #8bf0d8); }
.default-avatar-2 { background-color: #312331; background-image: radial-gradient(circle at 34% 24%, #fff1dc, transparent 18%), linear-gradient(145deg, #20151d, #6d4860 52%, #d7b384); }
.default-avatar-3 { background-color: #202d44; background-image: radial-gradient(circle at 34% 24%, #edf6ff, transparent 18%), linear-gradient(145deg, #121927, #405a82 52%, #b6c7e8); }
.default-avatar-4 { background-color: #3a2b17; background-image: radial-gradient(circle at 30% 22%, #fff8cf, transparent 18%), linear-gradient(145deg, #19140e, #7a5c2e 54%, #e2c36f); }
.default-avatar-5 { background-color: #1f3a32; background-image: radial-gradient(circle at 30% 24%, #effff8, transparent 18%), linear-gradient(145deg, #101c18, #426d5c 54%, #b5e6d4); }
.default-avatar-6 { background-color: #2f273d; background-image: radial-gradient(circle at 36% 22%, #f8efff, transparent 17%), linear-gradient(145deg, #18131f, #62517e 54%, #c7b8ff); }
.default-avatar-7 { background-color: #3d2421; background-image: radial-gradient(circle at 32% 24%, #fff0e9, transparent 18%), linear-gradient(145deg, #1e1210, #7b443c 54%, #e2a18e); }
.default-avatar-8 { background-color: #1f303a; background-image: radial-gradient(circle at 30% 22%, #effbff, transparent 18%), linear-gradient(145deg, #11191d, #3c6573 56%, #a6dce9); }
.default-avatar-9 { background-color: #302f26; background-image: radial-gradient(circle at 34% 23%, #fffbe3, transparent 18%), linear-gradient(145deg, #171713, #6b6956 54%, #ddd8aa); }
.default-avatar-10 { background-color: #21342f; background-image: radial-gradient(circle at 33% 23%, #f2fff6, transparent 18%), linear-gradient(145deg, #111b18, #426b63 54%, #72e4c4); }
.default-avatar-11 { background-color: #2e2630; background-image: radial-gradient(circle at 32% 22%, #fff2f7, transparent 18%), linear-gradient(145deg, #171217, #6c5162 54%, #efc3d4); }
.default-avatar-12 { background-color: #202733; background-image: radial-gradient(circle at 32% 24%, #f2f7ff, transparent 18%), linear-gradient(145deg, #111721, #4b5870 54%, #d8dee8); }

body:has(.koozee-home) .koozee-user-trigger {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

body:has(.koozee-home) .koozee-user-trigger:focus {
  outline: none;
}

body:has(.koozee-home) .koozee-user-trigger:focus-visible .koozee-user-trigger-avatar {
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22), 0 0 0 2px rgba(106, 242, 217, 0.28);
}

body:has(.koozee-home) .koozee-user-trigger-avatar {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
}

body:has(.koozee-home) .koozee-user-panel {
  top: calc(100% + 7px);
  right: 0;
  gap: 8px;
  width: 238px;
  padding: 9px 10px;
  color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 36%),
    linear-gradient(145deg, rgba(43, 43, 47, 0.84), rgba(49, 47, 50, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(1.06);
}

body:has(.koozee-home) .koozee-user-panel::before {
  display: none;
}

.koozee-profile-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
}

.koozee-profile-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.koozee-profile-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.koozee-profile-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.koozee-profile-copy span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(235, 237, 241, 0.7);
  font-size: 12.5px;
  font-weight: 430;
}

.koozee-profile-copy button {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: rgba(235, 237, 241, 0.64);
  background: transparent;
  border: 0;
}

.koozee-profile-copy button svg,
.koozee-profile-arrow {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
}

.koozee-profile-arrow {
  color: rgba(235, 237, 241, 0.66);
}

.koozee-vip-card {
  display: grid;
  gap: 5px;
  padding: 11px 12px 12px;
  background: rgba(255, 255, 255, 0.055);
  border-radius: 8px;
}

.koozee-vip-title {
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  color: #ffffff;
  line-height: 1;
  letter-spacing: 0.01em;
}

.koozee-vip-card .koozee-vip-title span {
  color: #ffffff;
  font-family: Arial Black, Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.koozee-vip-title em {
  font-size: 16px;
  font-weight: 680;
  font-style: italic;
  letter-spacing: 0;
}

.koozee-vip-card > span {
  color: rgba(226, 229, 235, 0.66);
  font-size: 11.5px;
  font-weight: 430;
  line-height: 1.2;
}

.koozee-vip-card button {
  height: 30px;
  margin-top: 4px;
  color: #071411;
  background: linear-gradient(90deg, #65d9ff, #2cf0c0 58%, #78ffd8);
  border: 0;
  border-radius: 7px;
  box-shadow:
    inset 12px 0 22px rgba(50, 205, 255, 0.34),
    inset -14px 0 24px rgba(176, 255, 224, 0.42),
    0 7px 16px rgba(47, 229, 207, 0.12);
  font-size: 12.5px;
  font-weight: 660;
}

body:has(.koozee-home) .koozee-user-panel .koozee-profile-copy button {
  width: 14px;
  height: 14px;
}

body:has(.koozee-home) .koozee-user-panel .koozee-vip-card button {
  height: 30px;
  font-size: 12.5px;
  font-weight: 660;
}

body:has(.koozee-home) .koozee-user-panel .koozee-account-action {
  min-height: 38px;
  height: 38px;
  color: rgba(245, 246, 248, 0.84);
  font-size: 13.5px;
  font-weight: 500;
}

body:has(.koozee-home) .koozee-user-panel .koozee-account-action.danger {
  color: rgba(232, 234, 238, 0.82);
}

.koozee-account-row,
.koozee-account-action {
  width: 100%;
  min-height: 34px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 540;
}

.koozee-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.035);
}

.koozee-account-row strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 680;
}

.koozee-account-action {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-top: 0;
  font-size: 13.5px;
  font-weight: 500;
}

.koozee-account-action + .koozee-account-action {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
}

.koozee-account-action:hover,
.koozee-account-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

body:has(.koozee-home) .koozee-user-panel .koozee-account-action:hover {
  color: #041316;
  background: #25cee7;
  border-radius: 8px;
}

body:has(.koozee-home) .koozee-user-panel .koozee-account-action.danger:hover {
  color: #041316;
}

.koozee-account-action.danger {
  color: rgba(235, 237, 241, 0.76);
}

@media (max-width: 1280px) {
  body:has(.koozee-home) .koozee-sidebar {
    --koozee-rail-width: 92px;
    --koozee-icon-left: 3px;
  }

  body:has(.koozee-home) .koozee-brand {
    padding-left: 24px;
  }

  body:has(.koozee-home) .koozee-brand::before {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 20px;
  }
}

/* Koozee-style split login modal. */
.login-modal {
  padding: 28px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

.login-dialog {
  display: grid;
  grid-template-columns: minmax(0, 0.436fr) minmax(0, 0.564fr);
  width: min(1180px, calc(100vw - 56px));
  height: min(760px, calc(100vh - 56px));
  min-height: 0;
  max-height: min(760px, calc(100vh - 56px));
  padding: 0;
  background: #ffffff;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.34);
  transform: scale(0.8);
  transform-origin: center;
  animation: none;
}

.login-dialog::before {
  display: none;
}

.login-dialog .close-button {
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 32px;
  height: 32px;
  color: #ffffff;
  background: #bfc0c2;
  border: 0;
  box-shadow: none;
}

.login-dialog .close-button:hover {
  color: #ffffff;
  background: #aeb0b3;
  transform: none;
}

.login-dialog .close-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.1;
}

.login-visual-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto 16px;
  gap: 8px;
  min-width: 0;
  padding: 38px 38px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 10%, rgba(200, 181, 255, 0.84), transparent 28%),
    radial-gradient(circle at 14% 34%, rgba(135, 251, 215, 0.9), transparent 36%),
    linear-gradient(155deg, #c8f4ff 0%, #c9c7ff 36%, #8ff5d4 100%);
}

.login-visual-stage {
  position: relative;
  min-height: 0;
}

.login-visual-card {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.34)),
    radial-gradient(circle at 45% 36%, rgba(255, 255, 255, 0.56), transparent 28%),
    linear-gradient(180deg, rgba(245, 247, 241, 0.7), rgba(207, 213, 201, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 17px;
  box-shadow: 0 18px 52px rgba(40, 75, 65, 0.18);
}

.login-visual-card.has-runtime-image {
  background-position: center top;
  background-size: cover;
}

.login-visual-card.has-runtime-image::after {
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(9, 15, 13, 0.2));
}

.login-visual-card.has-runtime-image::before {
  display: none;
}

.login-visual-card::after {
  position: absolute;
  inset: 24px 32px 58px;
  content: "";
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.5), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(140, 210, 198, 0.08));
}

.login-visual-card::before {
  position: absolute;
  z-index: 1;
  inset: 24px 32px 58px;
  content: "";
  border: 1px dashed rgba(93, 111, 104, 0.22);
  border-radius: 16px;
}

.login-visual-tag {
  position: absolute;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 14px;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(70, 61, 54, 0.72), rgba(88, 226, 213, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  box-shadow: 0 9px 22px rgba(23, 86, 78, 0.18);
  font-size: 14px;
  font-weight: 690;
  white-space: nowrap;
}

.login-visual-tag.tag-primary {
  top: 52%;
}

.login-visual-tag.tag-secondary {
  top: calc(52% + 46px);
}

.login-visual-thumb {
  position: absolute;
  left: 24px;
  bottom: 32px;
  z-index: 2;
  display: grid;
  place-items: end center;
  width: 62px;
  height: 80px;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.58) 100%),
    rgba(255, 255, 255, 0.66);
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 9px;
  box-shadow: 0 10px 23px rgba(0, 0, 0, 0.16);
}

.login-visual-thumb.has-runtime-image {
  background-position: center;
  background-size: cover;
}

.login-visual-thumb span {
  padding-bottom: 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 760;
}

.login-sparkle {
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 20px;
}

.login-sparkle::before,
.login-sparkle::after {
  position: absolute;
  inset: 0;
  content: "";
  background: #ffffff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.login-sparkle.sparkle-one {
  top: -12px;
  right: 24px;
}

.login-sparkle.sparkle-two {
  top: 10px;
  right: 6px;
  width: 13px;
  height: 13px;
}

.login-visual-logo {
  justify-self: center;
  width: 84px;
  height: auto;
  filter: brightness(0);
}

.login-visual-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.login-visual-dots span,
.login-visual-dots button {
  width: 5px;
  height: 5px;
  min-width: 5px;
  padding: 0;
  background: rgba(255, 255, 255, 0.64);
  border: 0;
  border-radius: 50%;
}

.login-visual-dots span.active,
.login-visual-dots button.active {
  background: #111111;
}

.koozee-tool-runtime-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* Match the dynamic reverse-prompt card icon to the brighter inline workflow icons. */
body:has(.koozee-home) .koozee-tool-runtime-icon[src*="07-text-effects"] {
  filter: brightness(1.72);
}

.app-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 12000;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  color: #ffffff;
  background: rgba(24, 31, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  font-size: 13px;
}

.app-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.login-content-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 58px 72px;
}

.login-content-panel .login-hero {
  width: min(500px, 100%);
  padding: 0;
}

.login-dialog h2 {
  margin: 0;
  color: #202329;
  font-size: 32px;
  font-weight: 690;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-hero p[hidden] {
  display: none;
}

.login-hero p {
  margin-top: 9px;
  color: #8a8e94;
  font-size: 14px;
  font-weight: 430;
  line-height: 1.35;
}

.login-methods,
.login-email-panel {
  display: grid;
  gap: 8px;
  width: min(500px, 100%);
  margin-top: 32px;
}

.login-methods[hidden],
.login-email-panel[hidden] {
  display: none;
}

.login-method-button {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  width: 100%;
  height: 58px;
  color: #33363c;
  background: #ffffff;
  border: 1px solid #d9dadd;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.login-method-button:hover {
  background: #fbfbfc;
  border-color: #cfd1d5;
  transform: translateY(-1px);
}

.login-method-button strong {
  min-width: 0;
  font-size: inherit;
  font-weight: inherit;
  text-align: center;
  white-space: nowrap;
}

.login-provider-icon {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.google-icon {
  color: #4285f4;
  font-family: Arial, sans-serif;
}

.email-icon {
  color: #ffffff;
  background: #63c90d;
}

.email-icon svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
}

.wechat-icon {
  color: #ffffff;
  background: #11c873;
}

.wechat-icon svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.wechat-login-block {
  display: grid;
  gap: 12px;
  width: min(500px, 100%);
  margin-top: 22px;
}

.wechat-login-block[hidden] {
  display: none;
}

.wechat-login-block > span {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: #a1a4a8;
  font-size: 11px;
  font-weight: 620;
}

.wechat-login-block > span::before,
.wechat-login-block > span::after {
  height: 1px;
  background: #e7e8eb;
}

.wechat-login-button {
  margin: 0;
  color: #22252a;
  background: #ffffff;
  border: 1px solid #dedfe2;
  box-shadow: none;
}

.wechat-login-button:hover {
  color: #22252a;
  background: #fbfbfc;
  border-color: #cfd1d5;
  box-shadow: none;
}

.login-agreement {
  width: min(500px, 100%);
  margin-top: 18px;
  color: #81858a;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.5;
}

.login-agreement a {
  color: #2c3036;
  font-weight: 760;
}

/* Give the initial provider-choice view a little more visual presence. */
body:not(.login-email-expanded) .login-modal:not(.wechat-qr-active) .login-hero,
body:not(.login-email-expanded) .login-modal:not(.wechat-qr-active) .login-methods,
body:not(.login-email-expanded) .login-modal:not(.wechat-qr-active) .wechat-login-block,
body:not(.login-email-expanded) .login-modal:not(.wechat-qr-active) .login-agreement {
  width: min(540px, 100%);
}

body:not(.login-email-expanded) .login-modal:not(.wechat-qr-active) .login-dialog h2 {
  font-size: 35px;
}

body:not(.login-email-expanded) .login-modal:not(.wechat-qr-active) .login-methods {
  margin-top: 38px;
}

body:not(.login-email-expanded) .login-modal:not(.wechat-qr-active) .login-method-button {
  height: 64px;
  border-radius: 14px;
  font-size: 17px;
}

body:not(.login-email-expanded) .login-modal:not(.wechat-qr-active) .wechat-login-block {
  gap: 14px;
  margin-top: 25px;
}

body:not(.login-email-expanded) .login-modal:not(.wechat-qr-active) .login-agreement {
  margin-top: 22px;
  font-size: 14px;
}

.login-tabs {
  gap: 6px;
  margin: 0;
  padding: 5px;
  background: #f4f5f6;
  border: 1px solid #e5e6e8;
  border-radius: 12px;
}

.login-tabs button {
  height: 42px;
  border-radius: 9px;
  font-size: 15px;
}

.login-fields {
  gap: 9px;
}

.login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 9px;
}

.login-code-button {
  min-height: 46px;
  color: #2c5257;
  background: #e9f5f6;
  border: 1px solid #cfe6e8;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.login-code-button:hover {
  color: #173b40;
  background: #dff0f2;
  border-color: #bddcdf;
}

.login-code-button:disabled {
  cursor: not-allowed;
  color: #9ca8aa;
  background: #eff2f3;
  border-color: #e5e8e9;
}

.login-field {
  gap: 0;
  color: #34373d;
  font-size: 0;
}

.login-field[hidden],
.login-code-row[hidden],
.login-forgot[hidden] {
  display: none;
}

.login-input-shell {
  min-height: 46px;
  background: #f2f2f3;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  transition: background 0.16s ease;
}

.login-input-shell:focus-within {
  background: #f7f7f8;
  box-shadow: none;
}

.login-input-shell input {
  height: 46px;
  padding: 0 18px;
  color: #202329;
  font-size: 15px;
  font-weight: 420;
}

.login-input-shell input::placeholder {
  color: #bebfc3;
  font-weight: 400;
}

.login-input-shell input:-webkit-autofill,
.login-input-shell input:-webkit-autofill:hover,
.login-input-shell input:-webkit-autofill:focus {
  -webkit-text-fill-color: #202329;
  caret-color: #202329;
  border-radius: 12px;
  box-shadow: 0 0 0 1000px #f2f2f3 inset;
}

.login-input-shell #loginPassword {
  padding-right: 46px;
}

.login-input-shell .password-toggle {
  right: 7px;
  width: 32px;
  height: 32px;
  color: #8e9297;
}

.login-input-shell .password-toggle:hover {
  color: #2b2d30;
  background: transparent;
}

.login-input-shell .password-toggle svg {
  width: 16px;
  height: 16px;
}

.login-primary {
  height: 44px;
  margin-top: 0;
  color: #ffffff;
  background: #2d2e30;
  border-color: #2d2e30;
  border-radius: 11px;
  box-shadow: none;
  font-size: 15px;
  font-weight: 500;
}

.login-primary:hover {
  background: #252628;
  border-color: #252628;
  box-shadow: none;
}

.login-forgot {
  justify-self: end;
  margin-top: 10px;
  padding: 2px 0;
  color: #858a90;
  font-size: 13px;
  font-weight: 500;
}

.login-forgot:hover {
  color: #2c3035;
}

.login-switch {
  margin-top: 2px;
  color: #8f9499;
  font-size: 13px;
  font-weight: 430;
  line-height: 1.3;
  text-align: center;
}

.login-switch button {
  color: #25282d;
  font-weight: 690;
  padding: 2px 3px;
}

.login-switch button:hover {
  color: #111317;
}

.login-message {
  width: min(500px, 100%);
  margin-top: 14px;
  border-radius: 10px;
}

.login-message[data-tone="success"] {
  color: #17613f;
  background: #edf8f2;
  border-color: #ccebd9;
}

body.login-email-expanded .login-content-panel {
  align-items: center;
  justify-content: center;
  padding: 44px 64px;
}

body.login-email-expanded .login-content-panel .login-hero,
body.login-email-expanded .login-email-panel,
body.login-email-expanded .login-message {
  width: min(590px, 100%);
}

body.login-email-expanded .login-dialog h2 {
  font-size: 40px;
  letter-spacing: -0.02em;
}

body.login-email-expanded .login-email-panel {
  gap: 12px;
  margin-top: 38px;
}

body.login-email-expanded .login-fields {
  gap: 12px;
}

body.login-email-expanded .login-code-row {
  grid-template-columns: minmax(0, 1fr) 142px;
  gap: 12px;
}

body.login-email-expanded .login-input-shell {
  min-height: 56px;
  background: #f4f4f5;
  border: 1px solid #eeeeef;
  border-radius: 14px;
}

body.login-email-expanded .login-input-shell:focus-within {
  background: #ffffff;
  border-color: #cfdcda;
  box-shadow: 0 0 0 3px rgba(68, 155, 141, 0.09);
}

body.login-email-expanded .login-input-shell input {
  height: 56px;
  padding: 0 22px;
  font-size: 17px;
}

body.login-email-expanded .login-account-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
}

body.login-email-expanded .login-account-shell::after {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 8px;
  height: 8px;
  content: "";
  pointer-events: none;
  border-right: 1.5px solid #70747a;
  border-bottom: 1.5px solid #70747a;
  transform: translateY(-70%) rotate(45deg);
}

body.login-email-expanded .login-account-shell input {
  min-width: 0;
}

body.login-email-expanded .login-account-shell select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 34px;
  padding: 0 46px 0 20px;
  color: #4b4e53;
  background-color: transparent;
  border: 0;
  border-left: 1px solid #dfe0e2;
  outline: 0;
  cursor: pointer;
  font-size: 17px;
  font-weight: 420;
}

body.login-email-expanded .login-account-shell select:hover {
  color: #1f2226;
}

body.login-email-expanded .login-account-shell select:focus-visible {
  color: #1f2226;
}

body.login-email-expanded .login-code-button {
  position: relative;
  min-height: 56px;
  overflow: hidden;
  color: #ffffff;
  background: #2d2e30;
  border-color: #2d2e30;
  border-radius: 14px;
  box-shadow: none;
  font-size: 15px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

body.login-email-expanded .login-code-button::after {
  display: none;
}

body.login-email-expanded .login-code-button:hover:not(:disabled) {
  color: #ffffff;
  background: #242527;
  border-color: #242527;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

body.login-email-expanded .login-code-button:active:not(:disabled) {
  background: #1f2022;
  box-shadow: none;
  transform: translateY(1px) scale(0.99);
  transition-duration: 60ms;
}

body.login-email-expanded .login-code-button:focus-visible {
  outline: 3px solid rgba(45, 46, 48, 0.18);
  outline-offset: 3px;
}

body.login-email-expanded .login-code-button:disabled {
  color: rgba(255, 255, 255, 0.72);
  background: #77797d;
  border-color: #77797d;
  box-shadow: none;
  transform: none;
}

body.login-email-expanded .login-code-button.is-loading {
  color: #ffffff;
  background: #55575a;
  border-color: #55575a;
  animation: none;
}

body.login-email-expanded .login-primary {
  height: 54px;
  border-radius: 13px;
  font-size: 17px;
  font-weight: 650;
}

body.login-email-expanded .login-forgot,
body.login-email-expanded .login-switch {
  font-size: 15px;
}

body.login-email-expanded .login-methods {
  margin-top: 32px;
}

body.login-email-expanded .wechat-login-block {
  display: none;
}

body.login-email-expanded .login-agreement {
  display: none;
}

@media (max-width: 1120px) {
  .login-dialog {
    grid-template-columns: 1fr;
    width: min(620px, calc(100vw - 28px));
    min-height: 0;
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    transform: none;
  }

  .login-visual-panel {
    display: none;
  }

  .login-content-panel {
    padding: 76px 44px 42px;
  }
}

@media (max-width: 720px) {
  .login-modal {
    align-items: center;
    padding: 12px;
  }

  .login-dialog {
    width: 100%;
    border-radius: 24px;
  }

  .login-content-panel {
    padding: 72px 24px 34px;
  }

  .login-dialog h2 {
    font-size: 30px;
  }

  .login-method-button {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    font-size: 15px;
  }

  .login-agreement {
    font-size: 14px;
  }
}

/* Unified membership and credit recharge center. */
.wallet-recharge-modal {
  padding: 24px;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(2.5px);
}

.wallet-recharge-dialog.recharge-center-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 325px minmax(0, 1fr);
  width: min(920px, calc(100vw - 48px));
  height: min(580px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
  color: rgba(247, 248, 249, 0.92);
  background: #121313;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 13px;
  box-shadow: 0 32px 88px rgba(0, 0, 0, 0.54);
}

.recharge-showcase {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 78%, rgba(93, 238, 211, 0.78), transparent 35%),
    radial-gradient(circle at 95% 4%, rgba(177, 172, 255, 0.72), transparent 30%),
    linear-gradient(155deg, #bff3ff 0%, #b4d8ff 36%, #86f1d5 100%);
}

.recharge-showcase-grid {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.68) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.68) 1px, transparent 1px);
  background-size: 36px 36px;
}

.recharge-showcase::after {
  position: absolute;
  inset: auto 18px 22px;
  height: 210px;
  content: "";
  background: linear-gradient(180deg, rgba(215, 255, 250, 0.22), rgba(215, 255, 250, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 26px;
}

.recharge-showcase-copy {
  position: absolute;
  top: 42px;
  left: 28px;
  z-index: 3;
  display: grid;
  gap: 5px;
  color: #071d23;
  line-height: 1.18;
}

.recharge-showcase-copy span,
.recharge-showcase-copy strong {
  font-size: 25px;
  font-weight: 780;
  letter-spacing: 0;
}

.recharge-showcase-copy span b {
  font-size: 28px;
  font-weight: 850;
  font-style: italic;
}

.recharge-showcase-image {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 72%;
  overflow: hidden;
  clip-path: inset(0 0 0 0 round 0 0 0 0);
}

.recharge-showcase-image::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(180deg, rgba(156, 244, 230, 0.08), transparent 22%),
    linear-gradient(90deg, rgba(140, 246, 223, 0.3), transparent 28%);
  mix-blend-mode: screen;
}

.recharge-showcase-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% center;
  filter: saturate(0.78) contrast(0.98) brightness(1.04) sepia(0.04);
}

.recharge-showcase-product {
  position: absolute;
  right: 18px;
  bottom: 28px;
  z-index: 4;
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding: 9px 12px;
  color: #06362f;
  background: rgba(221, 255, 248, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 77, 67, 0.16);
  backdrop-filter: blur(8px);
}

.recharge-showcase-product span {
  font-size: 11px;
  font-weight: 560;
}

.recharge-showcase-product strong {
  font-size: 14px;
  font-weight: 760;
}

.recharge-center-content {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 20px 24px 0;
  flex-direction: column;
  background:
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.025), transparent 34%),
    #121313;
}

.recharge-center-content .wallet-close-button {
  top: 13px;
  right: 13px;
  z-index: 6;
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 300;
}

.recharge-center-content .wallet-close-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.recharge-account-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding-right: 44px;
}

.recharge-account-avatar {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.recharge-account-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recharge-account-head strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recharge-account-head strong small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 450;
}

.recharge-account-head span {
  color: rgba(227, 229, 232, 0.68);
  font-size: 13px;
  font-weight: 410;
}

.recharge-center-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 40px;
  margin-top: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 999px;
}

.recharge-center-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  color: rgba(238, 239, 241, 0.6);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 540;
}

.recharge-center-tabs button.active {
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.08);
}

.recharge-center-tabs button:focus,
.recharge-center-tabs button:focus-visible,
.membership-term-list button:focus,
.membership-term-list button:focus-visible,
.recharge-credit-options button:focus,
.recharge-credit-options button:focus-visible {
  outline: 0;
}

.recharge-center-tabs i {
  display: inline-grid;
  place-items: center;
  height: 22px;
  padding: 0 11px;
  color: #071d1a;
  background: #35ead0;
  border-radius: 999px;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 720;
}

.recharge-center-pane {
  min-height: 0;
  padding-top: 12px;
}

.recharge-center-pane[hidden] {
  display: none;
}

.membership-recharge-pane {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0;
}

.credits-recharge-pane {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.membership-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 26px;
  align-content: center;
  column-gap: 26px;
  row-gap: 9px;
  transform: translateY(8px);
}

.membership-benefits div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 26px;
  color: rgba(244, 245, 247, 0.88);
  font-size: 13px;
  font-weight: 460;
  line-height: 1;
}

.membership-benefits div > span {
  display: flex;
  align-items: center;
  height: 26px;
  line-height: 26px;
}

.membership-benefits i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #25d6e9;
  background: rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  font-style: normal;
}

.membership-benefits i svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.membership-term-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.membership-term-list button,
.recharge-credit-options button {
  position: relative;
  display: grid;
  grid-template-columns: 24px 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 84px;
  padding: 0 22px;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  transition: background 0.16s, border-color 0.16s;
}

.membership-term-list button:hover,
.recharge-credit-options button:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: transparent;
}

.membership-term-list button.active,
.recharge-credit-options button.active {
  background: rgba(255, 255, 255, 0.095);
  border-color: transparent;
  box-shadow: none;
}

.membership-term-list button > i,
.recharge-credit-options button > i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
}

.membership-term-list button.active > i,
.recharge-credit-options button.active > i {
  border: 5px solid #2bd5e7;
  background: #f4ffff;
}

.membership-term-list strong,
.recharge-credit-options strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 600;
}

.membership-term-list b,
.recharge-credit-options b {
  color: rgba(255, 255, 255, 0.94);
  font-size: 20px;
  font-weight: 690;
}

.membership-term-list em,
.recharge-credit-options em {
  justify-self: end;
  padding: 5px 9px;
  color: #082c31;
  background: #2bcde2;
  border-radius: 999px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 720;
}

.membership-billing-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 36px;
  color: rgba(238, 240, 243, 0.68);
  font-size: 12px;
  font-weight: 460;
}

.membership-billing-note span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #ff86b1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.recharge-primary-button,
.wallet-recharge-dialog .recharge-primary-button {
  width: 100%;
  height: 50px;
  margin-top: 10px;
  color: #061411;
  background: linear-gradient(90deg, #26cae7 0%, #28eac1 72%, #2af0bb 100%);
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  font-size: 15px;
  font-weight: 650;
}

.recharge-primary-button:hover {
  filter: brightness(1.045);
}

.membership-renewal-footer,
.recharge-help-footer {
  display: grid;
  place-content: center;
  text-align: center;
}

.membership-renewal-footer {
  flex: 1;
  min-height: 0;
  gap: 3px;
}

.recharge-help-footer {
  flex: 1;
  min-height: 0;
}

.recharge-renewal-note,
.wallet-recharge-dialog .wallet-help-text {
  margin: 0;
  color: rgba(232, 234, 237, 0.68);
  font-size: 13px;
  font-weight: 460;
  line-height: 1.45;
  text-align: center;
}

.recharge-manage-link {
  display: block;
  margin: 0 auto;
  padding: 1px 8px;
  color: rgba(239, 241, 243, 0.68);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 500;
}

.recharge-manage-link:hover {
  color: rgba(255, 255, 255, 0.86);
}

.credits-balance-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: rgba(231, 233, 236, 0.62);
  font-size: 12px;
}

.credits-balance-line strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.credits-balance-line span {
  margin-left: auto;
  color: rgba(231, 233, 236, 0.38);
  font-size: 10.5px;
}

.wallet-preset-grid.recharge-credit-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 8px;
  opacity: 1;
}

.wallet-preset-grid.recharge-credit-options button strong,
.wallet-preset-grid.recharge-credit-options button.active strong {
  color: rgba(255, 255, 255, 0.9);
}

.wallet-preset-grid.recharge-credit-options button b,
.wallet-preset-grid.recharge-credit-options button.active b {
  color: rgba(255, 255, 255, 0.94);
}

.recharge-credit-options button {
  grid-template-columns: 24px 118px minmax(0, 1fr) auto;
  height: 54px;
  margin: 0;
}

.recharge-custom-amount {
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.recharge-custom-amount > span {
  color: rgba(237, 239, 241, 0.65);
  font-size: 12px;
  font-weight: 520;
}

.recharge-custom-amount div {
  height: 42px;
  padding-left: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}

.recharge-custom-amount input {
  color: #ffffff;
  background: transparent;
  font-size: 16px;
  font-weight: 620;
}

.recharge-custom-amount b {
  height: 28px;
  color: #12baa7;
  background: rgba(39, 232, 192, 0.09);
  font-size: 11px;
}

.wallet-arrival-box.recharge-arrival-box {
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  box-shadow: none;
}

.recharge-arrival-box div {
  gap: 3px;
}

.recharge-arrival-box div:first-child {
  padding-right: 16px;
}

.recharge-arrival-box b,
.recharge-arrival-box strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 680;
}

.recharge-arrival-box p {
  grid-column: auto;
  padding-top: 0;
  border-top: 0;
  font-size: 10.5px;
  white-space: nowrap;
}

.wallet-message {
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 860px) {
  .wallet-recharge-dialog.recharge-center-dialog {
    grid-template-columns: 1fr;
    width: min(610px, calc(100vw - 32px));
    height: min(570px, calc(100vh - 32px));
    max-height: calc(100vh - 32px);
  }

  .recharge-showcase {
    display: none;
  }
}

@media (max-width: 620px) {
  .wallet-recharge-modal {
    padding: 12px;
  }

  .wallet-recharge-dialog.recharge-center-dialog {
    width: calc(100vw - 24px);
    height: auto;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    border-radius: 14px;
  }

  .recharge-center-content {
    min-height: 590px;
    padding: 18px 16px 16px;
  }

  .membership-benefits {
    grid-template-columns: 1fr;
    transform: none;
  }

  .membership-term-list button,
  .recharge-credit-options button {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    height: 62px;
    padding: 0 14px;
  }

  .membership-term-list button em,
  .recharge-credit-options button em {
    display: none;
  }

  .membership-term-list button b,
  .recharge-credit-options button b {
    justify-self: end;
  }

  .credits-balance-line span {
    display: none;
  }

  .recharge-custom-amount {
    grid-template-columns: 1fr;
  }
}

/* Featured tools: compact reference-style default and hover states. */
body:has(.koozee-home) .koozee-tool {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 68px;
  padding: 0 18px;
  color: rgba(246, 247, 248, 0.94);
  background: linear-gradient(180deg, #191b1e 0%, #17191c 100%);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.022),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  transform: none;
  transition: background 180ms ease, border-color 180ms ease;
}

body:has(.koozee-home) .koozee-tool:hover,
body:has(.koozee-home) .koozee-tool:focus,
body:has(.koozee-home) .koozee-tool:focus-visible {
  color: rgba(255, 255, 255, 0.98);
  background: linear-gradient(100deg, #31555e 0%, #2b4349 44%, #242629 100%);
  border-color: rgba(255, 255, 255, 0.085);
  outline: none;
  transform: none;
}

body:has(.koozee-home) .koozee-tool-copy {
  position: relative;
  display: flex;
  min-width: 0;
  height: 42px;
  flex-direction: column;
  justify-content: center;
}

body:has(.koozee-home) .koozee-tool-copy strong {
  overflow: hidden;
  font: inherit;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(0);
  transition: transform 180ms ease;
}

body:has(.koozee-home) .koozee-tool-copy small {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  color: #2fe4df;
  font-size: 13px;
  font-weight: 520;
  line-height: 18px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 160ms ease, transform 180ms ease;
}

body:has(.koozee-home) .koozee-tool-copy small b {
  margin-left: 7px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

body:has(.koozee-home) .koozee-tool:hover .koozee-tool-copy strong,
body:has(.koozee-home) .koozee-tool:focus .koozee-tool-copy strong,
body:has(.koozee-home) .koozee-tool:focus-visible .koozee-tool-copy strong {
  transform: translateY(-10px);
}

body:has(.koozee-home) .koozee-tool:hover .koozee-tool-copy small,
body:has(.koozee-home) .koozee-tool:focus .koozee-tool-copy small,
body:has(.koozee-home) .koozee-tool:focus-visible .koozee-tool-copy small {
  opacity: 1;
  transform: translateY(0);
}

/* Compact contact entry and customer service cards. */
.koozee-contact {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
}

body:has(.koozee-home) .koozee-contact .koozee-chat {
  position: relative;
  right: auto;
  bottom: auto;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: rgba(255, 255, 255, 0.94);
  background: #202124;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body:has(.koozee-home) .koozee-contact .koozee-chat:hover,
body:has(.koozee-home) .koozee-contact .koozee-chat:focus-visible {
  color: #ffffff;
  background: #292b2e;
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 0 4px rgba(47, 228, 223, 0.07), 0 20px 46px rgba(0, 0, 0, 0.42);
  outline: none;
  transform: translateY(-2px);
}

body:has(.koozee-home) .koozee-contact.open .koozee-chat {
  color: #35e5df;
  background: #292d2f;
  border-color: rgba(53, 229, 223, 0.34);
  box-shadow: 0 0 0 4px rgba(53, 229, 223, 0.09), 0 22px 48px rgba(0, 0, 0, 0.46);
  transform: translateY(-2px);
}

body:has(.koozee-home) .koozee-contact .koozee-chat svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.koozee-contact-label {
  position: absolute;
  top: 50%;
  right: 66px;
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  color: rgba(247, 248, 249, 0.88);
  background: rgba(36, 38, 41, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  font-size: 12px;
  font-weight: 520;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(5px, -50%);
  transition: opacity 150ms ease, transform 150ms ease;
}

.koozee-contact:hover .koozee-contact-label,
.koozee-contact:focus-within .koozee-contact-label {
  opacity: 1;
  transform: translate(0, -50%);
}

.koozee-contact.open .koozee-contact-label {
  opacity: 0;
}

.koozee-contact-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: 326px;
  padding: 16px;
  color: rgba(248, 249, 250, 0.94);
  background: rgba(35, 36, 39, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
  transform-origin: right bottom;
  animation: contact-panel-in 170ms ease-out;
}

.koozee-contact-panel[hidden] {
  display: none;
}

@keyframes contact-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.koozee-contact-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  margin-bottom: 12px;
}

.koozee-contact-panel > header > div {
  display: grid;
  gap: 3px;
}

.koozee-contact-panel > header strong {
  color: #ffffff;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.2;
}

.koozee-contact-panel > header span {
  color: rgba(230, 232, 235, 0.56);
  font-size: 11.5px;
  font-weight: 430;
}

.koozee-contact-panel > header button,
.koozee-contact-card > button {
  display: grid;
  place-items: center;
  padding: 0;
  color: rgba(241, 243, 245, 0.62);
  background: transparent;
  border: 0;
}

.koozee-contact-panel > header button {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.koozee-contact-panel > header button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.koozee-contact-panel > header button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.koozee-contact-list {
  display: grid;
  gap: 8px;
}

.koozee-contact-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 10px;
  transition: background 150ms ease, border-color 150ms ease;
}

.koozee-contact-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.075);
}

.koozee-contact-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #d8fffa;
  background: linear-gradient(145deg, #31555e 0%, #202c30 100%);
  border: 1px solid rgba(92, 235, 223, 0.18);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 650;
}

.koozee-contact-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.koozee-contact-card > div strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 14.5px;
  font-weight: 620;
  line-height: 1;
}

.koozee-contact-card > div span {
  overflow: hidden;
  color: rgba(235, 237, 239, 0.62);
  font-size: 12px;
  font-weight: 430;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.koozee-contact-card > button {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 8px;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.koozee-contact-card > button:hover,
.koozee-contact-card > button:focus-visible {
  color: #36e5df;
  background: rgba(54, 229, 223, 0.08);
  border-color: rgba(54, 229, 223, 0.2);
  outline: none;
}

.koozee-contact-card > button svg {
  position: absolute;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: opacity 140ms ease, transform 140ms ease;
}

.koozee-contact-card > button .check-icon {
  color: #36e5df;
  opacity: 0;
  transform: scale(0.7);
}

.koozee-contact-card > button.copied .copy-icon {
  opacity: 0;
  transform: scale(0.7);
}

.koozee-contact-card > button.copied .check-icon {
  opacity: 1;
  transform: scale(1);
}

.koozee-contact-status {
  min-height: 15px;
  margin: 9px 2px 0;
  color: #66e9df;
  font-size: 11px;
  font-weight: 450;
  line-height: 15px;
  text-align: center;
}

@media (max-width: 620px) {
  .koozee-contact {
    right: 16px;
    bottom: 16px;
  }

  .koozee-contact-panel {
    width: min(326px, calc(100vw - 32px));
  }
}

/* Unified 2026 brand mark sizing across every branded surface. */
.brand-logo-img {
  width: auto;
  height: 27px;
  padding: 0;
  object-fit: contain;
  background: transparent;
  border-radius: 3px;
}

.brand .brand-logo-img,
.canvas-brand .brand-logo-img {
  height: 27px;
  padding: 0;
  background: transparent;
  border-radius: 3px;
}

.footer-brand .brand-logo-img {
  width: auto;
  height: 29px;
  max-width: none;
}

.koozee-brand .brand-logo-img,
body:has(.koozee-home) .koozee-brand .brand-logo-img {
  display: block;
  width: 132px;
  height: auto;
  max-width: 132px;
  border-radius: 3px;
  filter: none;
}

.login-visual-logo {
  justify-self: center;
  width: 112px;
  height: auto;
  border-radius: 3px;
  filter: none;
  box-shadow: 0 8px 20px rgba(12, 25, 27, 0.12);
}

@media (max-width: 1280px) {
  .koozee-brand,
  body:has(.koozee-home) .koozee-brand {
    padding-left: 9px;
    transform: translateY(-13px);
  }

  .koozee-brand .brand-logo-img,
  body:has(.koozee-home) .koozee-brand .brand-logo-img {
    display: block;
    width: 82px;
    height: auto;
    max-width: 82px;
  }

  .koozee-brand::before,
  body:has(.koozee-home) .koozee-brand::before {
    display: none;
    content: none;
  }
}

/* Transparent brand mark: use contrast only, never an image backdrop. */
.brand-logo-img,
.brand .brand-logo-img,
.canvas-brand .brand-logo-img,
.footer-brand .brand-logo-img,
.koozee-brand .brand-logo-img,
body:has(.koozee-home) .koozee-brand .brand-logo-img,
.login-visual-logo,
.koozee-vip-title img,
.recharge-showcase-brand-line img {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Light surfaces present the same transparent artwork in dark ink. */
.brand .brand-logo-img,
.canvas-brand .brand-logo-img,
.login-visual-logo,
.recharge-showcase-brand-line img {
  filter: brightness(0);
}

/* Dark surfaces retain the source artwork's white ink. */
.admin-brand .brand-logo-img,
.koozee-brand .brand-logo-img,
body:has(.koozee-home) .koozee-brand .brand-logo-img,
.footer-brand .brand-logo-img,
.koozee-vip-title img {
  filter: none;
}

.koozee-vip-title img {
  height: 16px;
  transform: translateY(-2px);
}

.recharge-showcase-brand-line img {
  height: 28px;
}

.login-visual-logo {
  width: 112px;
  height: auto;
}

@media (max-width: 1280px) {
  .koozee-brand .brand-logo-img,
  body:has(.koozee-home) .koozee-brand .brand-logo-img {
    width: 82px;
    height: auto;
    max-width: 82px;
  }
}

/* Right-side notification center. */
body.notification-open {
  overflow: hidden;
}

.notification-center {
  position: fixed;
  inset: 0;
  z-index: 5200;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 240ms;
}

.notification-center.open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.notification-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(0, 0, 0, 0.64);
  border: 0;
  border-radius: 0;
  opacity: 0;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: opacity 220ms ease;
}

.notification-center.open .notification-backdrop {
  opacity: 1;
}

.notification-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: clamp(390px, 23vw, 460px);
  height: 100dvh;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(29, 30, 33, 0.97);
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: -28px 0 70px rgba(0, 0, 0, 0.42);
  transform: translate3d(100%, 0, 0);
  transition: transform 240ms cubic-bezier(0.22, 0.7, 0.2, 1);
  will-change: transform;
}

.notification-center.open .notification-drawer {
  transform: translate3d(0, 0, 0);
}

.notification-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 16px 12px 20px;
  background: rgba(29, 30, 33, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-header > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.notification-header h2 {
  margin: 0;
  color: #f3f4f5;
  font-size: 18px;
  font-weight: 650;
  line-height: 24px;
}

.notification-unread-count {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 450;
  line-height: 18px;
}

.notification-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notification-read-all,
.notification-close {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  border: 0;
}

.notification-read-all {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
}

.notification-read-all:hover,
.notification-read-all:focus-visible {
  color: #2ed7e8;
  background: rgba(46, 215, 232, 0.08);
  outline: none;
}

.notification-read-all:disabled {
  color: rgba(255, 255, 255, 0.22);
  background: transparent;
  cursor: default;
}

.notification-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
}

.notification-close:hover,
.notification-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.notification-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.notification-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px 18px 42px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  scrollbar-width: thin;
}

.notification-scroll:focus {
  outline: none;
}

.notification-scroll::-webkit-scrollbar {
  width: 6px;
}

.notification-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.notification-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.notification-date-group + .notification-date-group {
  margin-top: 26px;
}

.notification-date {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.notification-date span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
}

.notification-item {
  position: relative;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.notification-item + .notification-item {
  margin-top: 10px;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.085);
}

.notification-item.read {
  opacity: 0.7;
}

.notification-item--service {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  min-height: 100px;
  padding: 16px 16px 15px;
}

.notification-status-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-top: 1px;
  color: #35d8e7;
  background: rgba(53, 216, 231, 0.09);
  border-radius: 10px;
}

.notification-status-icon--member {
  color: #5ce7c4;
  background: rgba(92, 231, 196, 0.09);
}

.notification-status-icon--membership {
  color: #5ce7c4;
  background: rgba(92, 231, 196, 0.09);
}

.notification-status-icon--credits {
  color: #f1bb78;
  background: rgba(241, 187, 120, 0.09);
}

.notification-status-icon--task {
  color: #92a9ff;
  background: rgba(146, 169, 255, 0.09);
}

.notification-status-icon--record {
  color: #f0b677;
  background: rgba(240, 182, 119, 0.09);
}

.notification-status-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.notification-item-copy,
.notification-feature-copy {
  min-width: 0;
}

.notification-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.notification-item-heading h3 {
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
}

.notification-item-heading time {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.34);
  font-size: 10px;
  font-weight: 450;
  line-height: 20px;
}

.notification-item-copy p,
.notification-feature-copy p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-weight: 400;
  line-height: 19px;
}

.notification-unread-marker {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 6px;
  height: 6px;
  background: #31d6e7;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(49, 214, 231, 0.5);
}

.notification-item.read .notification-unread-marker {
  display: none;
}

.notification-text-action {
  min-height: 28px;
  margin-top: 7px;
  padding: 0;
  color: #35d8e7;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 550;
}

.notification-text-action:hover,
.notification-text-action:focus-visible {
  color: #73ecf6;
  outline: none;
}

.notification-item--feature {
  overflow: hidden;
  padding: 12px;
}

.notification-item--feature > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

.notification-feature-copy {
  padding: 13px 2px 2px;
}

.notification-primary-action {
  width: 100%;
  min-height: 42px;
  margin-top: 13px;
  color: #041416;
  background: #2ccfe4;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  transition: background-color 140ms ease, filter 140ms ease;
}

.notification-primary-action:hover,
.notification-primary-action:focus-visible {
  background: #43dbec;
  filter: brightness(1.04);
  outline: none;
}

.koozee-notification-dot[hidden] {
  display: none !important;
}

.notification-empty {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 32px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 13px;
  font-weight: 450;
  line-height: 1.7;
  text-align: center;
}

.admin-membership-duration-dialog {
  width: min(520px, 100%);
}

.admin-membership-duration-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.admin-membership-duration-options button {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 96px;
  padding: 14px;
  color: #27332d;
  background: #f7faf8;
  border: 1px solid #e0e8e3;
  border-radius: 14px;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.admin-membership-duration-options button:hover,
.admin-membership-duration-options button.active {
  color: #0b6542;
  background: #eefaf4;
  border-color: #68b88e;
  box-shadow: inset 0 0 0 1px rgba(104, 184, 142, 0.14);
}

.admin-membership-duration-options strong {
  font-size: 16px;
  font-weight: 850;
}

.admin-membership-duration-options small {
  color: #718078;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.admin-membership-duration-note {
  margin: 16px 0 0;
  color: #78867f;
  font-size: 13px;
  font-weight: 600;
}

.admin-membership-operation-fields {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 12px;
  margin-top: 18px;
}

.admin-membership-operation-fields label {
  display: grid;
  gap: 8px;
}

.admin-membership-operation-fields label > span {
  color: #65736c;
  font-size: 13px;
  font-weight: 750;
}

.admin-membership-operation-fields label > div,
.admin-membership-operation-fields label > input {
  height: 48px;
  color: #17211c;
  background: #f7faf8;
  border: 1px solid #e0e8e3;
  border-radius: 12px;
}

.admin-membership-operation-fields label > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 0 13px;
}

.admin-membership-operation-fields b {
  color: #718078;
  font-size: 14px;
}

.admin-membership-operation-fields input {
  width: 100%;
  min-width: 0;
  padding: 0 13px;
  border: 0;
  outline: 0;
  font-size: 14px;
  font-weight: 700;
}

.admin-membership-operation-fields label > div input {
  height: 100%;
  padding: 0;
  background: transparent;
}

.admin-membership-operation-fields label > input:focus,
.admin-membership-operation-fields label > div:focus-within {
  border-color: #68b88e;
  box-shadow: 0 0 0 3px rgba(104, 184, 142, 0.12);
}

.admin-member-state,
.admin-expiry-cell {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.admin-member-state small {
  color: #7b6a42;
  background: #fff7df;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 800;
}

.admin-expiry-cell strong {
  color: #26332d;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-expiry-cell small {
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.admin-expiry-cell small.active {
  color: #21875c;
}

.admin-expiry-cell small.warning {
  color: #b05a1d;
}

.admin-expiry-cell small.muted {
  color: #8a9690;
}

.admin-activity-row small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #829089;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .admin-membership-duration-options {
    grid-template-columns: 1fr;
  }

  .admin-membership-duration-options button {
    min-height: 74px;
  }

  .admin-membership-operation-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .notification-drawer {
    width: 100%;
  }

  .notification-header {
    min-height: 62px;
    padding: 10px 12px 10px 16px;
  }

  .notification-scroll {
    padding: 18px 14px 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notification-center,
  .notification-backdrop,
  .notification-drawer {
    transition-duration: 0.01ms;
  }

  body:has(.koozee-home) [data-open-notifications].notification-arrived .koozee-bottom-icon,
  body:has(.koozee-home) [data-open-notifications].notification-arrived .koozee-notification-dot {
    animation: none;
  }
}

/* Embedded workflow preview */
.workflow-inline {
  width: 100%;
  scroll-margin-top: 92px;
}

/* Dedicated workflow coming-soon page */
body.workflow-coming-open {
  background: #08090a;
}

body.workflow-coming-open .koozee-content > :not(#workflowNotice) {
  display: none !important;
}

body.workflow-coming-open .koozee-content > #workflowNotice {
  display: grid;
}

.workflow-coming-page[hidden] {
  display: none;
}

.workflow-coming-page {
  position: relative;
  display: grid;
  width: 100%;
  min-height: calc(100vh - 72px);
  padding: clamp(36px, 6vw, 80px) 28px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(39, 43, 48, .45), transparent 38%),
    #08090a;
}

.workflow-coming-card {
  display: grid;
  justify-items: center;
  width: min(680px, 100%);
  text-align: center;
}

.workflow-coming-page .workflow-bird-loader {
  width: min(22rem, 68vw);
  margin: 0 auto 34px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .36);
}

.workflow-coming-page .workflow-notice-copy > span {
  color: #37cfe8;
}

.workflow-coming-page .workflow-notice-copy h2 {
  margin: 12px 0 10px;
  color: #f7f7f8;
  font-size: clamp(28px, 4vw, 44px);
}

.workflow-coming-page .workflow-notice-copy p {
  color: #8c9098;
  font-size: 15px;
}

@media (max-width: 720px) {
  .workflow-coming-page {
    min-height: calc(100vh - 60px);
    padding: 28px 20px;
  }

  .workflow-coming-page .workflow-bird-loader {
    width: min(17rem, 72vw);
    margin-bottom: 26px;
  }
}

.workflow-inline-card {
  display: grid;
  grid-template-columns: minmax(220px, 288px) minmax(240px, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  width: 100%;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(18, 18, 24, .07);
  border-radius: 28px;
  background: linear-gradient(135deg, #fff 0%, #f7f7fa 100%);
  box-shadow: 0 18px 48px rgba(31, 31, 38, .08);
}

.workflow-inline .workflow-bird-loader {
  width: min(18rem, 100%);
  margin: 0;
}

.workflow-inline .workflow-notice-copy {
  text-align: left;
}

.workflow-inline .workflow-notice-copy > span {
  font-size: 12px;
}

.workflow-inline .workflow-notice-copy h2 {
  margin: 12px 0 12px;
  font-size: clamp(25px, 3vw, 38px);
}

.workflow-inline .workflow-notice-copy p {
  max-width: 560px;
  font-size: 15px;
}

.workflow-inline.is-highlighted .workflow-inline-card {
  animation: workflow-inline-highlight 700ms ease;
}

@keyframes workflow-inline-highlight {
  0%, 100% { box-shadow: 0 18px 48px rgba(31, 31, 38, .08); }
  45% { box-shadow: 0 20px 58px rgba(119, 117, 255, .24); }
}

@media (max-width: 720px) {
  .workflow-inline-card {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 28px 20px;
  }

  .workflow-inline .workflow-bird-loader {
    width: min(15rem, 70vw);
  }

  .workflow-inline .workflow-notice-copy {
    text-align: center;
  }
}

/* Product editor v47: compact asset editor, not a numbered admin form. */
.product-editor-dialog {
  width: min(620px, calc(100vw - 36px));
  max-height: min(720px, calc(100dvh - 36px));
  background:
    radial-gradient(circle at 88% -12%, rgba(50, 211, 232, 0.055), transparent 32%),
    #101214;
  border-radius: 18px;
}

.product-editor-header {
  min-height: 62px;
  padding: 10px 20px;
}

.product-editor-header h2 {
  font-size: 17px;
  font-weight: 650;
}

.product-editor-close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 17px;
}

.product-editor-scroll {
  display: grid;
  gap: 20px;
  padding: 20px 22px 24px;
}

.product-editor-step,
.product-editor-step:last-of-type {
  display: block;
  padding: 0;
  border: 0;
}

.product-step-heading {
  min-height: 0;
  margin: 0 0 10px;
}

.product-step-heading strong {
  color: rgba(244, 247, 248, 0.7);
  font-size: 11px;
  font-weight: 640;
  letter-spacing: 0.02em;
}

.product-step-body,
.product-editor-step-note .product-step-body {
  width: 100%;
}

.product-image-stage {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: start;
  column-gap: 16px;
  justify-items: stretch;
}

.product-main-upload {
  grid-column: 1;
  grid-row: 1;
  width: 120px;
  height: 120px;
  background: #181b1d;
  border-radius: 13px;
}

.product-main-upload:not(.has-image) {
  border-style: dashed;
}

.product-main-upload:not(.has-image) .product-upload-plus {
  width: 30px;
  height: 30px;
  color: rgba(142, 232, 242, 0.72);
  font-size: 23px;
}

.product-main-upload:not(.has-image) strong {
  color: rgba(235, 240, 242, 0.48);
  font-size: 10px;
}

.product-main-remove {
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 84px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(6, 8, 9, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  backdrop-filter: blur(9px);
  font-size: 16px;
  line-height: 1;
}

.product-main-remove:hover,
.product-main-remove:focus-visible {
  color: #ffffff;
  background: rgba(203, 70, 79, 0.72);
  border-color: rgba(255, 151, 158, 0.34);
  outline: none;
}

.product-main-label {
  display: none;
}

.product-main-label {
  top: auto;
  right: 8px;
  bottom: 8px;
  left: 8px;
  width: max-content;
  max-width: calc(100% - 16px);
  padding: 5px 7px;
  overflow: hidden;
  color: rgba(234, 249, 251, 0.9);
  background: rgba(6, 9, 10, 0.66);
  border-color: rgba(255, 255, 255, 0.12);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-angle-block {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.product-angle-heading {
  min-height: 22px;
  margin-bottom: 8px;
}

.product-angle-heading strong {
  color: rgba(241, 245, 247, 0.56);
  font-size: 10px;
}

.product-angle-heading span {
  font-size: 8px;
}

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

.product-angle-card,
.product-angle-add {
  border-radius: 11px;
}

.product-angle-card > div {
  inset: auto 3px 3px;
}

.product-angle-card button {
  min-height: 22px;
  border-radius: 6px;
  font-size: 8px;
}

.product-angle-add span {
  font-size: 21px;
}

.product-editor-field input {
  height: 44px;
  padding: 0 13px;
  font-size: 12px;
  background: #171a1c;
  border-radius: 10px;
}

.product-tag-editor {
  min-height: 112px;
  gap: 11px;
  padding: 12px;
  background: #171a1c;
  border-radius: 12px;
}

.product-tag-editor-list {
  gap: 6px;
}

.product-tag-editor-input {
  min-height: 30px;
}

.product-tag-editor-input > span {
  font-size: 15px;
}

.product-tag-editor-meta {
  justify-content: flex-end;
  margin-top: 6px;
}

.product-tag-editor-meta > span {
  display: none;
}

.product-editor-message {
  margin: -6px 0 0;
}

.product-editor-footer {
  min-height: 66px;
  padding: 12px 20px;
}

.product-editor-footer button {
  min-width: 82px;
  height: 40px;
  border-radius: 9px;
  font-size: 11px;
}

.product-editor-footer .primary {
  min-width: 132px;
}

@media (max-width: 640px) {
  .product-editor-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .product-editor-scroll {
    padding-right: 16px;
    padding-left: 16px;
  }

  .product-image-stage {
    grid-template-columns: 112px minmax(0, 1fr);
    column-gap: 12px;
  }

  .product-main-upload {
    width: 112px;
    height: 112px;
  }

  .product-main-remove {
    left: 76px;
  }

  .product-angle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .product-image-stage {
    display: block;
  }

  .product-angle-block {
    margin-top: 14px;
  }
}

/* Home workspace layout: one responsive frame for the title, editor and tools. */
body:has(.koozee-home) .koozee-content {
  position: relative;
  display: flex;
  width: min(1400px, calc(100vw - 368px));
  margin: 0 auto;
  padding: 116px 0 52px;
  flex-direction: column;
  align-items: center;
  transform: translateX(-82px);
}

body:has(.koozee-home) .koozee-composer-zone {
  display: contents;
}

body:has(.prompt-workspace) .koozee-composer-zone h1 {
  position: static;
  width: min(1120px, 100%);
  margin: 0 auto 30px;
  color: #f5f5f6;
  text-align: center;
  font-size: clamp(30px, 2.2vw, 40px);
  font-weight: 740;
  line-height: 1.2;
  letter-spacing: 0;
}

body:has(.prompt-workspace) .home-composer {
  position: static;
  left: auto;
  align-self: center;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  margin: 0 auto;
}

body:has(.prompt-workspace) .koozee-composer-panel {
  width: 100%;
  min-width: 0;
}

body:has(.prompt-workspace) .prompt-workspace,
body:has(.prompt-workspace) .prompt-editor {
  width: 100%;
  min-width: 0;
}

body:has(.prompt-workspace) .prompt-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body:has(.prompt-workspace) .prompt-model-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 72px;
  border-radius: 20px 20px 0 0;
}

body:has(.prompt-workspace) .prompt-model-tabs button {
  min-width: 0;
}

body:has(.prompt-workspace) .prompt-card {
  grid-template-rows: auto minmax(120px, 1fr) auto;
  min-height: 360px;
  padding: 16px 20px 18px;
  border-radius: 0 0 18px 18px;
}

body:has(.prompt-workspace) .koozee-composer-panel textarea {
  min-height: 92px;
}

body:has(.prompt-workspace) .koozee-composer-panel .composer-footer {
  align-items: center;
  flex-direction: row;
  gap: 14px;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 118px;
  height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  text-align: center;
}

body:has(.prompt-workspace) .koozee-composer-panel .generate-button #generateButtonText {
  display: block;
  line-height: 1;
  transform: translateY(-0.5px);
}

body:has(.koozee-home) .koozee-tools {
  position: static;
  top: auto;
  right: auto;
  align-self: center;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  margin: 40px auto 0;
}

body:has(.koozee-home) .koozee-tools-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 0 0 18px;
}

body:has(.koozee-home) .koozee-tools-heading span {
  color: rgba(89, 255, 222, 0.72);
  font-size: 12px;
  font-weight: 680;
  line-height: 1;
}

body:has(.koozee-home) .koozee-tools h2 {
  display: block;
  margin: 0;
  color: rgba(247, 248, 250, 0.88);
  font-size: 18px;
  font-weight: 620;
  line-height: 1.2;
}

body:has(.koozee-home) .koozee-tools-heading p {
  max-width: 560px;
  margin: 0;
  color: rgba(189, 194, 199, 0.58);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

body:has(.koozee-home) .koozee-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

body:has(.koozee-home) .koozee-tool {
  grid-template-columns: 28px minmax(0, 1fr);
  min-width: 0;
  min-height: 72px;
  padding: 0 16px;
}

body:has(.koozee-home) .koozee-tool-copy,
body:has(.koozee-home) .koozee-tool-copy strong {
  min-width: 0;
}

body:has(.koozee-home) .home-generation-stage {
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: 30px auto 0;
  scroll-margin-top: 92px;
}

body:has(.koozee-home) .home-generation-stage:has(.generation-results[hidden]) {
  display: none;
}

body:has(.koozee-home) .home-generation-stage .generation-results,
body:has(.koozee-home) .home-generation-stage .result-board {
  width: 100%;
}

body:has(.koozee-home) .home-generation-stage .result-board {
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(.koozee-home) .home-generation-stage .result-board-header {
  margin-bottom: 18px;
  padding: 0;
  border-bottom: 0;
}

body:has(.koozee-home) .home-generation-stage .result-board-grid {
  grid-template-columns: repeat(var(--result-columns, 4), minmax(0, 1fr));
  width: 100% !important;
  max-width: 1120px !important;
  margin: 0 auto;
}

body:has(.koozee-home) .home-generation-stage .result-board-grid[data-columns] {
  max-width: 1120px !important;
}

body:has(.koozee-home) .home-generation-stage .result-image-tile {
  width: 100%;
}

body:has(.koozee-home) .koozee-tool-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1440px) {
  body:has(.koozee-home) .koozee-content {
    width: min(1400px, calc(100vw - 368px));
    margin: 0 auto;
    padding-top: 108px;
  }

  body:has(.prompt-workspace) .koozee-composer-zone h1 {
    font-size: clamp(30px, 2.6vw, 38px);
  }

  body:has(.koozee-home) .koozee-tool {
    padding: 0 16px;
  }
}

@media (max-width: 1280px) and (min-width: 721px) {
  body:has(.koozee-home) .koozee-content {
    width: min(1120px, calc(100vw - 224px));
    transform: translateX(-46px);
  }
}

@media (max-width: 1080px) {
  body:has(.koozee-home) .koozee-content {
    width: min(1120px, calc(100vw - 224px));
    padding-top: 104px;
  }

  body:has(.koozee-home) .koozee-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:has(.koozee-home) .koozee-tool {
    min-height: 72px;
  }
}

@media (max-width: 720px) {
  body:has(.koozee-home) .koozee-content {
    width: calc(100% - 28px);
    padding: 94px 0 38px;
    transform: none;
  }

  body:has(.prompt-workspace) .koozee-composer-zone h1 {
    font-size: clamp(25px, 7vw, 32px);
    margin-bottom: 30px;
    text-align: center;
  }

  body:has(.prompt-workspace) .prompt-model-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 70px;
    border-radius: 18px 18px 0 0;
  }

  body:has(.prompt-workspace) .prompt-card {
    min-height: 330px;
    padding: 16px;
    border-radius: 0 0 18px 18px;
  }

  body:has(.prompt-workspace) .koozee-composer-panel .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  body:has(.prompt-workspace) .koozee-composer-panel .generate-button {
    width: 100%;
  }

  body:has(.koozee-home) .home-generation-stage {
    margin-top: 26px;
    scroll-margin-top: 72px;
  }

  body:has(.koozee-home) .koozee-tools {
    margin-top: 46px;
  }
}

@media (max-width: 560px) {
  body:has(.koozee-home) .koozee-tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Gemini prompt assistant: conversation above, compact composer anchored below. */
body:has(.prompt-workspace) .prompt-card.is-gemini {
  display: block;
  min-height: 430px;
  padding: 0;
  overflow: hidden;
}

body:has(.prompt-workspace) .prompt-card.is-gemini > .prompt-upload-row,
body:has(.prompt-workspace) .prompt-card.is-gemini > #homePrompt,
body:has(.prompt-workspace) .prompt-card.is-gemini > .composer-error,
body:has(.prompt-workspace) .prompt-card.is-gemini > .composer-footer {
  display: none !important;
}

body:has(.prompt-workspace) .gemini-chat[hidden] {
  display: none !important;
}

body:has(.prompt-workspace) .gemini-chat {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 430px;
  min-height: 0;
  background: #17181b;
}

body:has(.prompt-workspace) .gemini-chat-messages {
  min-height: 0;
  padding: 28px 34px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
  scrollbar-width: thin;
}

body:has(.prompt-workspace) .gemini-chat-empty {
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: rgba(235, 237, 241, 0.58);
}

body:has(.prompt-workspace) .gemini-chat-empty strong {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

body:has(.prompt-workspace) .gemini-empty-mark,
body:has(.prompt-workspace) .gemini-answer-mark {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

body:has(.prompt-workspace) .gemini-empty-mark::before,
body:has(.prompt-workspace) .gemini-answer-mark::before {
  position: absolute;
  inset: 1px;
  content: "";
  background: linear-gradient(135deg, #4b8cff 8%, #8a70ee 42%, #dc6dad 72%, #ff9167 100%);
  clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
}

body:has(.prompt-workspace) .gemini-message {
  width: fit-content;
  max-width: min(780px, 86%);
  margin: 0 0 24px;
  color: rgba(245, 246, 248, 0.92);
  letter-spacing: 0;
}

body:has(.prompt-workspace) .gemini-message-user {
  margin-left: auto;
  padding: 11px 16px;
  color: rgba(250, 250, 251, 0.94);
  background: #2a2b2f;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 16px 16px 4px 16px;
}

body:has(.prompt-workspace) .gemini-message-images {
  display: flex;
  max-width: 440px;
  margin: -3px -8px 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

body:has(.prompt-workspace) .gemini-message-images img {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: cover;
  object-position: center;
  background: #202125;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

body:has(.prompt-workspace) .gemini-message-assistant {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 920px;
  margin-right: auto;
}

body:has(.prompt-workspace) .gemini-message-assistant.is-error {
  color: #e7a5aa;
}

body:has(.prompt-workspace) .gemini-answer-body {
  min-width: 0;
}

body:has(.prompt-workspace) .gemini-message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 430;
  line-height: 1.75;
}

body:has(.prompt-workspace) .gemini-message-user .gemini-message-text {
  line-height: 1.55;
}

body:has(.prompt-workspace) .gemini-message-markdown {
  white-space: normal;
  font-size: 15.5px;
}

body:has(.prompt-workspace) .gemini-stream-cursor {
  display: inline-block;
  width: 7px;
  height: 1.08em;
  margin-left: 3px;
  vertical-align: -0.16em;
  background: rgba(245, 246, 248, 0.82);
  border-radius: 1px;
  animation: gemini-stream-cursor-pulse 760ms ease-in-out infinite alternate;
}

@keyframes gemini-stream-cursor-pulse {
  from { opacity: 0.28; }
  to { opacity: 0.92; }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.prompt-workspace) .gemini-stream-cursor {
    animation: none;
  }
}

body:has(.prompt-workspace) .gemini-message-markdown p,
body:has(.prompt-workspace) .gemini-message-markdown ul,
body:has(.prompt-workspace) .gemini-message-markdown ol {
  margin: 0 0 12px;
}

body:has(.prompt-workspace) .gemini-message-markdown p:last-child,
body:has(.prompt-workspace) .gemini-message-markdown ul:last-child,
body:has(.prompt-workspace) .gemini-message-markdown ol:last-child {
  margin-bottom: 0;
}

body:has(.prompt-workspace) .gemini-message-markdown h2,
body:has(.prompt-workspace) .gemini-message-markdown h3 {
  color: #f7f8fa;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

body:has(.prompt-workspace) .gemini-message-markdown h2 {
  margin: 24px 0 10px;
  font-size: 21px;
  font-weight: 760;
}

body:has(.prompt-workspace) .gemini-message-markdown h3 {
  margin: 18px 0 8px;
  font-size: 17.5px;
  font-weight: 710;
}

body:has(.prompt-workspace) .gemini-message-markdown h2:first-child,
body:has(.prompt-workspace) .gemini-message-markdown h3:first-child {
  margin-top: 0;
}

body:has(.prompt-workspace) .gemini-message-markdown ul,
body:has(.prompt-workspace) .gemini-message-markdown ol {
  padding-left: 1.5em;
}

body:has(.prompt-workspace) .gemini-message-markdown li {
  margin: 4px 0;
  padding-left: 0.15em;
}

body:has(.prompt-workspace) .gemini-message-markdown strong {
  color: #fff;
  font-weight: 760;
}

body:has(.prompt-workspace) .gemini-message-markdown code {
  padding: 0.12em 0.35em;
  color: #f1f2f4;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

body:has(.prompt-workspace) .gemini-message-markdown pre {
  max-width: 100%;
  margin: 8px 0 14px;
  padding: 14px 16px;
  overflow-x: auto;
  color: #eceef2;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body:has(.prompt-workspace) .gemini-message-markdown pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.75;
}

body:has(.prompt-workspace) .gemini-message-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
}

body:has(.prompt-workspace) .gemini-message-actions button {
  display: inline-flex;
  width: 30px;
  height: 30px;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: rgba(218, 220, 225, 0.56);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}

body:has(.prompt-workspace) .gemini-message-actions button:hover,
body:has(.prompt-workspace) .gemini-message-actions button.is-copied,
body:has(.prompt-workspace) .gemini-message-actions button.is-selected {
  color: #f5f6f8;
  background: rgba(255, 255, 255, 0.07);
}

body:has(.prompt-workspace) .gemini-message-actions svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body:has(.prompt-workspace) .gemini-message-actions .gemini-more-icon {
  fill: currentColor;
  stroke: none;
}

body:has(.prompt-workspace) .gemini-message-actions button.is-selected svg {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.45;
}

body:has(.prompt-workspace) .gemini-message-actions [aria-disabled="true"] {
  cursor: default;
}

body:has(.prompt-workspace) .gemini-chat-composer {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  gap: 10px;
  width: calc(100% - 40px);
  min-height: 66px;
  margin: 0 20px 18px;
  padding: 11px 12px;
  align-items: end;
  background: #242529;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body:has(.prompt-workspace) .gemini-reference-strip {
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  padding: 1px 1px 3px;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

body:has(.prompt-workspace) .gemini-reference-strip[hidden] {
  display: none !important;
}

body:has(.prompt-workspace) .gemini-reference-strip .reference-thumb {
  flex: 0 0 52px;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px;
  min-height: 52px;
  border-radius: 9px;
}

body:has(.prompt-workspace) .gemini-reference-strip .reference-thumb::after {
  display: none;
}

body:has(.prompt-workspace) .gemini-add-reference,
body:has(.prompt-workspace) .gemini-send {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}

body:has(.prompt-workspace) .gemini-add-reference {
  color: rgba(235, 237, 241, 0.72);
  background: transparent;
  border: 0;
}

body:has(.prompt-workspace) .gemini-add-reference:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

body:has(.prompt-workspace) .gemini-add-reference svg,
body:has(.prompt-workspace) .gemini-send svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body:has(.prompt-workspace) .gemini-reference-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  color: #071315;
  background: #45dce5;
  border: 2px solid #242529;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

body:has(.prompt-workspace) .gemini-reference-count[hidden] {
  display: none !important;
}

body:has(.prompt-workspace) .prompt-card.is-gemini #geminiPromptInput {
  width: 100%;
  min-height: 38px;
  max-height: 120px;
  padding: 8px 0 6px;
  resize: none;
  overflow-y: auto;
  color: rgba(247, 248, 250, 0.92);
  background: transparent;
  border: 0;
  outline: 0;
  box-shadow: none;
  font-size: 15px;
  font-weight: 430;
  line-height: 1.5;
}

body:has(.prompt-workspace) .prompt-card.is-gemini #geminiPromptInput::placeholder {
  color: rgba(194, 197, 203, 0.42);
  font-weight: 420;
}

body:has(.prompt-workspace) .gemini-send {
  width: 42px;
  height: 42px;
  color: #071315;
  background: linear-gradient(135deg, #53d8f2 0%, #67ecc4 100%);
  border: 0;
  box-shadow: 0 6px 18px rgba(72, 220, 216, 0.16);
  transition: filter 140ms ease, transform 140ms ease, opacity 140ms ease;
}

body:has(.prompt-workspace) .gemini-send:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

body:has(.prompt-workspace) .gemini-send:disabled {
  cursor: wait;
  opacity: 0.48;
}

body:has(.prompt-workspace) .gemini-typing {
  display: flex;
  height: 26px;
  align-items: center;
  gap: 5px;
}

body:has(.prompt-workspace) .gemini-typing i {
  width: 5px;
  height: 5px;
  background: rgba(228, 230, 234, 0.58);
  border-radius: 50%;
  animation: geminiTyping 1.05s ease-in-out infinite;
}

body:has(.prompt-workspace) .gemini-typing i:nth-child(2) {
  animation-delay: 120ms;
}

body:has(.prompt-workspace) .gemini-typing i:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes geminiTyping {
  0%, 70%, 100% { opacity: 0.35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 720px) {
  body:has(.prompt-workspace) .prompt-card.is-gemini,
  body:has(.prompt-workspace) .gemini-chat {
    min-height: 420px;
    height: 420px;
  }

  body:has(.prompt-workspace) .gemini-chat-messages {
    padding: 22px 18px 14px;
  }

  body:has(.prompt-workspace) .gemini-message {
    max-width: 92%;
  }

  body:has(.prompt-workspace) .gemini-message-assistant {
    max-width: 100%;
  }

  body:has(.prompt-workspace) .gemini-message-images {
    max-width: 300px;
  }

  body:has(.prompt-workspace) .gemini-message-images img {
    width: 82px;
    height: 82px;
  }

  body:has(.prompt-workspace) .gemini-chat-composer {
    width: calc(100% - 24px);
    margin: 0 12px 12px;
  }
}

/* Keep the home canvas and its navigation rail on one uninterrupted black surface. */
body:has(.koozee-home) .page-home,
body:has(.koozee-home) .koozee-home,
body:has(.koozee-home) .koozee-sidebar {
  background: #08090a;
  background-image: none;
}

body:has(.koozee-home) .koozee-sidebar {
  border-right: 0;
  box-shadow: none;
}

/* Product library: a quiet, reusable home for each product. */
body.product-library-open {
  overflow: hidden;
}

body.product-library-open .koozee-contact {
  display: none;
}

.product-library-page[hidden],
.product-editor-modal[hidden] {
  display: none !important;
}

.product-library-page {
  position: fixed;
  inset: 0 0 0 164px;
  z-index: 32;
  min-width: 0;
  overflow: auto;
  color: #f4f6f7;
  background: #08090a;
}

.product-library-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  min-height: 138px;
  padding: 42px clamp(34px, 4vw, 74px) 12px;
  background: #08090a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.product-library-eyebrow,
.product-detail-kicker {
  display: block;
  margin-bottom: 8px;
  color: #2bd1e8;
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.12em;
}

.product-library-header h1 {
  margin: 0;
  color: #f7f8f9;
  font-size: clamp(25px, 2vw, 34px);
  font-weight: 720;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

.product-library-header p {
  margin: 9px 0 0;
  color: rgba(235, 239, 242, 0.58);
  font-size: 14px;
}

.product-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-library-empty button,
.product-detail-actions button,
.product-library-error button {
  min-height: 44px;
  padding: 0 18px;
  color: rgba(244, 247, 249, 0.82);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  font-size: 14px;
  font-weight: 720;
}

.product-library-empty button,
.product-detail-actions .primary {
  color: #031417;
  background: #2bd1e8;
  border-color: #2bd1e8;
  box-shadow: 0 10px 30px rgba(43, 209, 232, 0.16);
}

.product-library-empty button:hover,
.product-detail-actions .primary:hover {
  background: #57dff0;
  border-color: #57dff0;
}

.product-detail-actions button:not(.primary):hover,
.product-library-error button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.095);
}

.product-library-content {
  width: min(1400px, calc(100% - 68px));
  margin: 0 auto;
  padding: 18px 0 64px;
}

.product-library-page.is-detail-view .product-library-header {
  display: none;
}

.product-library-page.is-detail-view .product-library-content {
  padding-top: 30px;
  transform: translateX(-82px);
}

.product-library-view {
  opacity: 1;
  transition: opacity 0.1s ease;
}

.product-library-view > * {
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.22, 0.72, 0.24, 1);
}

.product-library-view.is-leaving {
  opacity: 0.12;
}

.product-library-view.is-entering,
.product-library-view.is-entering-back {
  opacity: 0;
}

.product-library-view.is-entering > * {
  opacity: 0.7;
  transform: translateY(5px);
}

.product-library-view.is-entering-back > * {
  opacity: 0.7;
  transform: translateY(-3px);
}

.product-library-loading {
  padding: 40px;
  color: rgba(255, 255, 255, 0.56);
  text-align: center;
}

.product-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.product-list-heading > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.product-list-heading strong {
  color: #f6f7f8;
  font-size: 20px;
}

.product-list-heading span,
.product-list-heading p {
  color: rgba(230, 235, 238, 0.46);
  font-size: 13px;
}

.product-list-heading p {
  margin: 0;
}

.product-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 252px));
  align-items: stretch;
  gap: 18px;
}

.product-card {
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(155deg, #17191c 0%, #121416 100%);
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.product-card:hover {
  border-color: rgba(74, 219, 235, 0.38);
  box-shadow: 0 15px 32px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(43, 209, 232, 0.04);
  outline: none;
  transform: translateY(-1px);
}

.product-card:focus-visible {
  border-color: rgba(74, 219, 235, 0.34);
  outline: 2px solid rgba(43, 209, 232, 0.22);
  outline-offset: 2px;
}

.product-card:active {
  border-color: rgba(74, 219, 235, 0.26);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.2);
  transform: scale(0.996);
  transition-duration: 0.06s;
}

.product-card-cover {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1c1f22;
  line-height: 0;
}

.product-card-cover::after {
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(to top, rgba(5, 7, 8, 0.62), transparent);
  content: "";
  pointer-events: none;
}

.product-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: filter 0.2s ease;
}

.product-card:hover .product-card-cover img {
  filter: saturate(1.04);
}

.product-card-kind,
.product-card-stats {
  position: absolute;
  z-index: 1;
  padding: 4px 7px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(8, 10, 12, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  backdrop-filter: blur(10px);
  font-size: 10px;
  line-height: 1;
}

.product-card-kind {
  top: 10px;
  left: 10px;
  color: rgba(179, 244, 250, 0.9);
  letter-spacing: 0.08em;
}

.product-card-stats {
  right: 10px;
  bottom: 9px;
}

.product-card-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 94px;
  margin-top: -1px;
  padding: 12px 14px 13px;
  background: linear-gradient(155deg, #17191c 0%, #121416 100%);
}

.product-card-info {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.product-card-body strong {
  overflow: hidden;
  color: #f4f5f6;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-body span {
  color: rgba(232, 236, 239, 0.42);
  font-size: 10px;
}

.product-card-tags {
  display: flex;
  min-width: 0;
  min-height: 20px;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  overflow: hidden;
}

.product-card-tags .product-tag-chip {
  max-width: 78px;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 9px;
}

.product-card-tags .product-tag-chip b {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-tags em,
.product-card-tags i {
  color: rgba(230, 235, 238, 0.3);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.product-card-tags i {
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.035);
  border-radius: 4px;
}

.product-create-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 20px;
  color: rgba(236, 241, 243, 0.58);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.01));
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.product-create-card:hover,
.product-create-card:focus-visible {
  color: #a8f0f8;
  background: rgba(43, 209, 232, 0.035);
  border-color: rgba(43, 209, 232, 0.42);
  outline: none;
  transform: translateY(-1px);
}

.product-create-card:active {
  transform: scale(0.996);
  transition-duration: 0.06s;
}

@media (prefers-reduced-motion: reduce) {
  .product-library-view,
  .product-library-view > *,
  .product-card,
  .product-card-cover img,
  .product-create-card {
    transition: none !important;
  }
}

.product-create-card-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #041619;
  background: linear-gradient(135deg, #2bc9e5, #29e4ba);
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(43, 209, 232, 0.14);
  font-size: 22px;
}

.product-create-card-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  text-align: left;
}

.product-create-card-copy strong {
  color: rgba(247, 249, 250, 0.88);
  font-size: 13px;
}

.product-create-card-copy small {
  color: rgba(230, 235, 238, 0.38);
  font-size: 10px;
  white-space: nowrap;
}

.product-library-empty,
.product-library-error {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: min(600px, calc(100vh - 220px));
  padding: 32px 20px 76px;
  text-align: center;
}

.product-library-content:has(.product-library-empty) {
  display: grid;
  min-height: calc(100vh - 138px);
  padding-top: 0;
  padding-bottom: 0;
}

.product-library-content:has(.product-library-empty) .product-library-view {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  transform: translate(-82px, -18px);
}

.product-library-content:has(.product-library-empty) .product-library-empty {
  width: 100%;
  min-height: 0;
  padding: 0 20px;
}

.product-library-content:has(.product-library-empty) .product-library-empty h2 {
  margin-top: 0;
}

.product-library-empty h2,
.product-library-error strong {
  margin: 22px 0 0;
  color: #f5f6f7;
  font-size: 24px;
}

.product-library-empty p,
.product-library-error p {
  max-width: 460px;
  margin: 10px 0 24px;
  color: rgba(229, 234, 237, 0.52);
  line-height: 1.7;
}

.product-detail-view {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.product-detail-back {
  display: block;
  width: 100%;
  max-width: 886px;
  min-height: 30px;
  margin: 0 auto 14px;
  padding: 0;
  color: rgba(230, 236, 239, 0.58);
  background: transparent;
  border: 0;
  font-size: 12px;
  text-align: left;
}

.product-detail-back:hover {
  color: #ffffff;
}

.product-detail-shell {
  display: grid;
  width: 100%;
  max-width: 886px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 46px);
  align-items: start;
  margin: 0 auto;
}

.product-detail-main {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #141619;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.product-detail-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.product-detail-thumbnails button {
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: hidden;
  background: #17191c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  flex: 0 0 auto;
}

.product-detail-thumbnails button.active {
  border-color: #2bd1e8;
  box-shadow: 0 0 0 2px rgba(43, 209, 232, 0.11);
}

.product-detail-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-copy {
  display: flex;
  aspect-ratio: 1 / 1;
  flex-direction: column;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(43, 209, 232, 0.025), transparent 42%),
    #111315;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 17px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.product-detail-copy h2 {
  margin: 0;
  color: #f7f8f9;
  font-size: clamp(25px, 2.3vw, 34px);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.product-detail-meta {
  margin: 9px 0 0;
  color: rgba(229, 234, 237, 0.46);
  font-size: 13px;
}

.product-detail-note {
  margin: 34px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 14px;
}

.product-detail-note strong {
  color: rgba(245, 247, 248, 0.86);
  font-size: 13px;
}

.product-detail-note p {
  margin: 9px 0 0;
  color: rgba(229, 234, 237, 0.58);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.product-detail-tags {
  display: grid;
  gap: 11px;
  margin: 20px 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
}

.product-detail-tags-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-detail-tags-head strong {
  color: rgba(245, 247, 248, 0.86);
  font-size: 13px;
}

.product-detail-tags-head span,
.product-detail-tags > p {
  margin: 0;
  color: rgba(229, 234, 237, 0.38);
  font-size: 10px;
}

.product-tag-list,
.product-tag-editor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  gap: 5px;
  padding: 3px 9px;
  color: rgba(177, 235, 243, 0.92);
  background: rgba(49, 207, 230, 0.08);
  border: 1px solid rgba(49, 207, 230, 0.2);
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.35;
}

.product-tag-chip b {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-tag-chip button {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  min-height: 0;
  padding: 0;
  color: currentColor;
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  border-radius: 50%;
  font-size: 12px;
  opacity: 0.62;
}

.product-tag-chip button:hover,
.product-tag-chip button:focus-visible {
  opacity: 1;
  outline: none;
}

.product-tag-chip[data-product-tag-field="origin"] {
  color: rgba(248, 211, 148, 0.94);
  background: rgba(225, 170, 75, 0.09);
  border-color: rgba(236, 188, 103, 0.22);
}

.product-tag-chip[data-product-tag-field="material"],
.product-tag-chip[data-product-tag-field="specification"] {
  color: rgba(205, 181, 255, 0.94);
  background: rgba(139, 101, 220, 0.1);
  border-color: rgba(171, 132, 248, 0.22);
}

.product-tag-chip[data-product-tag-field="sellingPoint"] {
  color: rgba(152, 235, 190, 0.96);
  background: rgba(72, 197, 133, 0.09);
  border-color: rgba(91, 211, 150, 0.22);
}

.product-tag-chip[data-product-tag-field="audience"],
.product-tag-chip[data-product-tag-field="scenario"] {
  color: rgba(153, 195, 255, 0.96);
  background: rgba(72, 126, 219, 0.1);
  border-color: rgba(101, 154, 242, 0.22);
}

.product-tag-chip[data-product-tag-field="color"] {
  color: rgba(247, 174, 220, 0.95);
  background: rgba(213, 93, 167, 0.09);
  border-color: rgba(232, 126, 193, 0.22);
}

.product-tag-chip[data-product-tag-field="constraint"] {
  color: rgba(255, 164, 171, 0.96);
  background: rgba(231, 78, 92, 0.09);
  border-color: rgba(247, 105, 118, 0.22);
}

.product-tag-chip.duplicate {
  animation: product-tag-duplicate 0.85s ease;
}

@keyframes product-tag-duplicate {
  40% { transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(248, 211, 148, 0.12); }
}

.product-knowledge-card {
  margin: -14px 0 30px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(43, 209, 232, 0.045), transparent 46%),
    rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(89, 222, 239, 0.1);
  border-radius: 14px;
}

.product-knowledge-card.attention {
  animation: product-knowledge-attention 1.7s ease;
}

@keyframes product-knowledge-attention {
  0%, 100% {
    border-color: rgba(89, 222, 239, 0.1);
    box-shadow: none;
  }
  35% {
    border-color: rgba(248, 211, 148, 0.52);
    box-shadow: 0 0 0 4px rgba(248, 211, 148, 0.08), 0 18px 50px rgba(0, 0, 0, 0.28);
  }
}

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

.product-knowledge-head > div {
  display: grid;
  gap: 3px;
}

.product-knowledge-head span {
  color: #7ee8f4;
  font-size: 12px;
  font-weight: 740;
}

.product-knowledge-head strong {
  color: rgba(247, 249, 250, 0.88);
  font-size: 14px;
  font-weight: 680;
}

.product-knowledge-head > small {
  color: rgba(224, 231, 234, 0.34);
  font-size: 10px;
  white-space: nowrap;
}

.product-knowledge-empty {
  margin: 13px 0 0;
  color: rgba(228, 234, 237, 0.43);
  font-size: 12px;
  line-height: 1.65;
}

.product-knowledge-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.product-knowledge-fact {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 11px 30px 11px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 9px;
}

.product-knowledge-fact > span {
  color: rgba(126, 232, 244, 0.62);
  font-size: 9px;
  font-weight: 700;
}

.product-knowledge-fact > strong {
  overflow: hidden;
  color: rgba(246, 248, 249, 0.88);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.product-knowledge-fact > small {
  color: rgba(226, 232, 235, 0.3);
  font-size: 9px;
}

.product-knowledge-fact > button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 20px;
  height: 20px;
  padding: 0;
  color: rgba(231, 236, 239, 0.28);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 15px;
  line-height: 1;
}

.product-knowledge-fact > button:hover,
.product-knowledge-fact > button:focus-visible {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.product-knowledge-review {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.product-knowledge-review-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.product-knowledge-review-title strong {
  color: rgba(248, 211, 148, 0.86);
  font-size: 11px;
}

.product-knowledge-review-title span {
  color: rgba(228, 233, 236, 0.3);
  font-size: 9px;
}

.product-knowledge-suggestion {
  display: grid;
  gap: 10px;
  padding: 11px;
  background: rgba(255, 190, 81, 0.035);
  border: 1px solid rgba(255, 197, 100, 0.1);
  border-radius: 9px;
}

.product-knowledge-suggestion > div:first-child {
  display: grid;
  gap: 3px;
}

.product-knowledge-suggestion > div:first-child span {
  color: rgba(248, 211, 148, 0.65);
  font-size: 9px;
}

.product-knowledge-suggestion > div:first-child strong {
  color: rgba(248, 249, 250, 0.88);
  font-size: 12px;
}

.product-knowledge-suggestion > div:first-child small {
  overflow: hidden;
  color: rgba(228, 233, 236, 0.34);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-knowledge-suggestion > div:last-child {
  display: flex;
  gap: 7px;
}

.product-knowledge-suggestion button {
  min-height: 28px;
  padding: 0 9px;
  color: rgba(235, 239, 241, 0.55);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 680;
}

.product-knowledge-suggestion button.confirm {
  color: #071617;
  background: #7ee8f4;
  border-color: #7ee8f4;
}

.product-knowledge-suggestion button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.product-knowledge-more {
  margin: 0;
  color: rgba(228, 233, 236, 0.34);
  font-size: 9px;
  line-height: 1.5;
}

.product-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
}

.product-detail-actions button {
  min-height: 39px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
}

.product-detail-actions .danger {
  color: rgba(246, 151, 157, 0.8);
  background: transparent;
  border-color: rgba(243, 91, 101, 0.18);
}

.product-creation-tool-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
  padding: 8px;
  background: rgba(43, 209, 232, 0.025);
  border: 1px solid rgba(74, 219, 235, 0.11);
  border-radius: 13px;
}

.product-creation-tool-menu button {
  display: grid;
  min-width: 0;
  min-height: 64px;
  align-content: center;
  gap: 5px;
  padding: 12px;
  color: rgba(246, 248, 249, 0.86);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}

.product-creation-tool-menu button:hover,
.product-creation-tool-menu button:focus-visible {
  background: rgba(43, 209, 232, 0.09);
  border-color: rgba(74, 219, 235, 0.28);
  outline: none;
}

.product-creation-tool-menu strong {
  color: #eef9fa;
  font-size: 12px;
  font-weight: 720;
}

.product-creation-tool-menu span {
  overflow: hidden;
  color: rgba(230, 236, 239, 0.4);
  font-size: 9px;
  line-height: 1.5;
  text-overflow: ellipsis;
}

.product-creation-archive {
  max-width: 886px;
  margin: 42px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.product-creation-archive-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.product-creation-archive-head > div {
  display: grid;
  gap: 5px;
}

.product-creation-archive-head span {
  color: #68dfed;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.product-creation-archive-head h3 {
  margin: 0;
  color: #f4f6f7;
  font-size: clamp(19px, 1.8vw, 24px);
  letter-spacing: -0.02em;
}

.product-creation-archive-head p {
  margin: 0;
  color: rgba(230, 235, 238, 0.42);
  font-size: 12px;
}

.product-creation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 258px));
  gap: 14px;
}

.product-creation-card {
  min-width: 0;
  background: transparent;
}

.product-creation-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  background: #17191c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.product-creation-cover:hover,
.product-creation-cover:focus-visible {
  border-color: rgba(74, 219, 235, 0.32);
  box-shadow: 0 13px 28px rgba(0, 0, 0, 0.22);
  outline: none;
}

.product-creation-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.product-creation-cover:hover img {
  transform: scale(1.01);
}

.product-creation-cover span {
  position: absolute;
  top: 9px;
  left: 9px;
  max-width: calc(100% - 18px);
  padding: 5px 8px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(6, 8, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  backdrop-filter: blur(8px);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-creation-card-copy {
  display: grid;
  grid-template-areas:
    "prompt"
    "time";
  gap: 2px;
  padding: 9px 2px 0;
}

.product-creation-card-copy small {
  grid-area: time;
  color: rgba(228, 233, 236, 0.36);
  font-size: 9px;
}

.product-creation-card-copy strong {
  grid-area: prompt;
  overflow: hidden;
  color: rgba(245, 247, 248, 0.7);
  font-size: 11px;
  font-weight: 620;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-creation-card-copy button,
.product-creation-archive-empty button,
.product-creation-archive-state button {
  min-height: 31px;
  color: #85e7f3;
  background: rgba(43, 209, 232, 0.075);
  border: 1px solid rgba(43, 209, 232, 0.16);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 720;
}

.product-creation-card-copy button {
  grid-area: action;
  min-height: 26px;
  padding: 0;
  color: rgba(120, 226, 239, 0.72);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 10px;
  white-space: nowrap;
}

.product-creation-card-copy button:hover,
.product-creation-archive-empty button:hover,
.product-creation-archive-state button:hover {
  color: #061416;
  background: #58ddec;
  border-color: #58ddec;
}

.product-creation-card-copy button:hover,
.product-creation-card-copy button:focus-visible {
  color: #83eaf5;
  background: transparent;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-creation-archive-more {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.product-creation-archive-more button {
  min-height: 38px;
  padding: 0 18px;
  color: rgba(220, 242, 245, 0.7);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 680;
}

.product-creation-archive-more button:hover {
  color: #071618;
  background: #63dfea;
  border-color: #63dfea;
}

.product-creation-archive-more button:disabled {
  opacity: 0.48;
  cursor: wait;
}

.product-creation-archive-state,
.product-creation-archive-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 30px;
  color: rgba(231, 236, 239, 0.44);
  background: rgba(255, 255, 255, 0.018);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  text-align: center;
}

.product-creation-archive-state.is-error,
.product-creation-archive-empty {
  align-content: center;
  gap: 8px;
}

.product-creation-archive-state button,
.product-creation-archive-empty button {
  min-width: 118px;
  margin-top: 8px;
  padding: 0 14px;
}

.product-creation-archive-empty strong {
  color: rgba(247, 249, 250, 0.82);
  font-size: 15px;
}

.product-creation-archive-empty p {
  margin: 0;
  color: rgba(230, 235, 238, 0.42);
  font-size: 12px;
}

/* Product create/edit dialog. */
.product-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
}

.product-editor-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.76);
  border: 0;
  backdrop-filter: blur(9px);
}

.product-editor-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(600px, calc(100vw - 40px));
  max-height: min(760px, calc(100dvh - 40px));
  overflow: hidden;
  color: #f3f5f6;
  background: #1b1c20;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.56);
}

.product-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 12px;
  padding: 10px 16px;
}

.product-editor-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.product-editor-header h2 {
  margin: 0;
  color: #f6f6f7;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
}

.product-editor-title span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  color: rgba(241, 245, 246, 0.62);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 560;
}

.product-editor-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.045);
  border: 0;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
}

.product-editor-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.product-editor-scroll {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 18px 20px;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  scrollbar-width: thin;
}

.product-editor-step {
  position: relative;
}

.product-step-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  color: rgba(255, 255, 255, 0.76);
}

.product-step-heading > b {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.86);
  background: #2a2b2f;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 570;
}

.product-step-heading strong {
  font-size: 14px;
  font-weight: 620;
}

.product-step-heading small {
  margin-left: -4px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 11px;
  font-weight: 500;
}

.product-step-body {
  position: relative;
  margin-left: 14px;
  padding: 8px 0 12px 14px;
  border-left: 1px dashed rgba(255, 255, 255, 0.18);
}

.product-editor-step-note .product-step-body {
  padding-bottom: 2px;
  border-left-color: transparent;
}

.product-tag-editor {
  display: grid;
  gap: 10px;
  min-height: 92px;
  padding: 11px;
  background: #222327;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.product-tag-editor:focus-within {
  border-color: rgba(49, 212, 232, 0.62);
  box-shadow: 0 0 0 3px rgba(49, 212, 232, 0.05);
}

.product-tag-editor-empty {
  color: rgba(255, 255, 255, 0.27);
  font-size: 10px;
}

.product-tag-editor-input {
  display: flex;
  align-items: center;
  min-height: 30px;
  gap: 6px;
  margin-top: auto;
  color: rgba(116, 225, 239, 0.62);
}

.product-tag-editor-input > span {
  font-size: 17px;
  font-weight: 360;
}

.product-tag-editor-input input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0;
  color: rgba(246, 248, 249, 0.88);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 11px;
}

.product-tag-editor-input input::placeholder {
  color: rgba(255, 255, 255, 0.27);
}

.product-tag-editor-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: rgba(231, 236, 239, 0.32);
  font-size: 9px;
}

.product-tag-editor-meta small {
  font-size: 9px;
}

.product-image-stage {
  display: grid;
  justify-items: center;
}

.product-main-upload {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: 124px;
  height: 124px;
  min-height: 0;
  overflow: hidden;
  gap: 5px;
  padding: 0;
  color: rgba(255, 255, 255, 0.62);
  background: #242529;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 8px;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.product-main-upload:not(.has-image)::after {
  content: "1张即可";
  position: absolute;
  right: 7px;
  bottom: 6px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  line-height: 1;
}

.product-main-upload:hover,
.product-main-upload:focus-visible {
  color: #ffffff;
  background: #27292d;
  border-color: #31d4e8;
  outline: none;
}

.product-upload-plus {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}

.product-main-upload strong {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 560;
}

.product-main-upload small {
  display: none;
}

.product-main-upload.has-image {
  border-style: solid;
}

.product-main-upload.has-image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #222327;
}

.product-main-label {
  position: absolute;
  z-index: 1;
  padding: 5px 7px;
  border-radius: 5px;
  backdrop-filter: blur(10px);
}

.product-main-label {
  top: 7px;
  left: 7px;
  color: #041619;
  background: #2bd1e8;
  font-size: 9px;
  font-weight: 720;
}

.product-main-remove {
  margin-top: 6px;
  padding: 0;
  color: rgba(242, 154, 160, 0.7);
  background: transparent;
  border: 0;
  font-size: 10px;
}

.product-main-remove:hover {
  color: #ff9fa6;
}

.product-angle-block {
  width: 100%;
  margin-top: 14px;
}

.product-angle-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.product-angle-heading strong {
  color: rgba(244, 247, 248, 0.64);
  font-size: 12px;
  font-weight: 600;
}

.product-angle-heading span {
  color: rgba(231, 236, 239, 0.36);
  font-size: 10px;
}

.product-angle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}

.product-angle-card,
.product-angle-add {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #222327;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.product-angle-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-angle-card > div {
  position: absolute;
  inset: auto 4px 4px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.product-angle-card:hover > div,
.product-angle-card:focus-within > div {
  opacity: 1;
}

.product-angle-card button {
  min-width: 0;
  min-height: 24px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(5, 7, 9, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  font-size: 9px;
  flex: 1;
}

.product-angle-add {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: rgba(234, 238, 241, 0.48);
  border-style: dashed;
  font-size: 10px;
}

.product-angle-add:hover {
  color: #9cedf7;
  border-color: rgba(43, 209, 232, 0.45);
}

.product-angle-add span {
  font-size: 20px;
}

.product-editor-field {
  position: relative;
  display: block;
  width: 100%;
}

.product-editor-field input,
.product-editor-field textarea {
  box-sizing: border-box;
  width: 100%;
  color: #f4f6f7;
  background: #222327;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  outline: none;
  font-size: 13px;
}

.product-editor-field input {
  height: 40px;
  padding: 0 12px;
}

.product-editor-field textarea {
  min-height: 82px;
  padding: 11px 12px 25px;
  line-height: 1.65;
  resize: vertical;
}

.product-editor-field input:focus,
.product-editor-field textarea:focus {
  border-color: rgba(49, 212, 232, 0.72);
}

.product-editor-field input::placeholder,
.product-editor-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.product-note-count {
  position: absolute;
  right: 9px;
  bottom: 8px;
  color: rgba(231, 236, 239, 0.32);
  font-size: 10px;
}

.product-editor-message {
  margin: 4px 0 0 42px;
  padding: 8px 10px;
  color: #ffb0b6;
  background: rgba(255, 91, 104, 0.08);
  border: 1px solid rgba(255, 91, 104, 0.16);
  border-radius: 7px;
  font-size: 11px;
}

.product-editor-message[data-tone="success"] {
  color: #9ce5bd;
  background: rgba(73, 199, 132, 0.08);
  border-color: rgba(73, 199, 132, 0.16);
}

.product-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 11px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.product-editor-footer > span {
  color: rgba(255, 255, 255, 0.34);
  font-size: 10px;
}

.product-editor-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.product-editor-footer button {
  min-width: 78px;
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  color: rgba(245, 247, 248, 0.62);
  background: #2a2b2f;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 620;
}

.product-editor-footer button:hover {
  color: #ffffff;
  background: #303136;
}

.product-editor-footer .primary {
  min-width: 142px;
  color: #061214;
  background: linear-gradient(100deg, #2bc9e5, #29e4ba);
  box-shadow: 0 10px 22px rgba(38, 221, 190, 0.08);
}

.product-editor-footer .primary:hover {
  color: #061214;
  background: linear-gradient(100deg, #36d3ec, #35ebc3);
}

.product-editor-footer button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.tool-product-source {
  min-height: 28px;
  padding: 0 10px;
  color: rgba(157, 236, 246, 0.78);
  background: rgba(49, 206, 229, 0.07);
  border: 1px solid rgba(49, 206, 229, 0.15);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.tool-product-source:hover,
.tool-product-source:focus-visible {
  color: #baf5fb;
  background: rgba(49, 206, 229, 0.12);
  border-color: rgba(49, 206, 229, 0.35);
  outline: none;
}

.detail-product-upload-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-product-upload-head .tool-product-source {
  min-height: 24px;
  padding: 0 8px;
}

.tool-product-context {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 24px;
  align-items: center;
  width: min(100%, 280px);
  min-height: 42px;
  gap: 8px;
  margin-top: 8px;
  padding: 5px 6px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 7px;
}

.tool-product-context[hidden] {
  display: none;
}

.tool-product-context img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  background: #121316;
  border-radius: 5px;
}

.tool-product-context > span {
  display: grid;
  min-width: 0;
}

.tool-product-context strong,
.tool-product-context small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-product-context strong {
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 620;
}

.tool-product-context small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 9px;
}

.tool-product-context > button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: rgba(255, 255, 255, 0.38);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 16px;
}

.tool-product-context > button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.detail-product-context {
  width: 100%;
  margin: 0 0 10px;
}

.tool-product-picker[hidden] {
  display: none;
}

.tool-product-picker {
  position: fixed;
  inset: 0;
  z-index: 145;
  display: grid;
  place-items: center;
  padding: 20px;
}

.tool-product-picker-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(0, 0, 0, 0.76);
  border: 0;
  backdrop-filter: blur(9px);
}

.tool-product-picker-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(620px, calc(100vw - 40px));
  max-height: min(720px, calc(100dvh - 40px));
  overflow: hidden;
  color: #f3f5f6;
  background: #1b1c20;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.56);
}

.tool-product-picker-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.tool-product-picker-dialog > header > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.tool-product-picker-dialog > header h2 {
  margin: 0;
  color: #f6f6f7;
  font-size: 18px;
  font-weight: 650;
}

.tool-product-picker-dialog > header span {
  padding: 3px 7px;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 4px;
  font-size: 10px;
}

.tool-product-picker-dialog > header > button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.045);
  border: 0;
  border-radius: 6px;
  font-size: 20px;
}

.tool-product-picker-view {
  min-height: 280px;
  overflow-y: auto;
  padding: 16px;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  scrollbar-width: thin;
}

.tool-product-picker-loading,
.tool-product-picker-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 300px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.tool-product-picker-empty strong {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.tool-product-picker-empty p {
  max-width: 340px;
  margin: 7px 0 14px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  line-height: 1.7;
}

.tool-product-picker-empty button,
.tool-product-picker-product-head > button {
  min-height: 32px;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.64);
  background: #2a2b2f;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
}

.tool-product-picker-product-head > button {
  display: grid;
  place-items: center;
  width: 32px;
  padding: 0;
  border-radius: 7px;
  font-size: 15px;
}

.tool-product-picker-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}

.tool-product-picker-intro strong {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.tool-product-picker-intro span {
  color: rgba(255, 255, 255, 0.32);
  font-size: 10px;
}

.tool-product-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tool-product-picker-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  background: #222327;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 9px;
}

.tool-product-picker-card:hover {
  color: #ffffff;
  background: #25262a;
  border-color: rgba(49, 206, 229, 0.24);
}

.tool-product-picker-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #141518;
}

.tool-product-picker-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-product-picker-cover i {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 5px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.62);
  border-radius: 4px;
  font-size: 8px;
  font-style: normal;
}

.tool-product-picker-card > span:last-child {
  display: grid;
  min-width: 0;
  padding: 9px 10px 10px;
}

.tool-product-picker-card strong,
.tool-product-picker-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-product-picker-card strong {
  font-size: 12px;
  font-weight: 620;
}

.tool-product-picker-card small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 9px;
}

.tool-product-picker-product-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.tool-product-picker-product-head > div {
  display: grid;
}

.tool-product-picker-product-head strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.tool-product-picker-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tool-product-picker-images > button {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  background: #151619;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
}

.tool-product-picker-images > button:hover,
.tool-product-picker-images > button.active {
  border-color: rgba(49, 206, 229, 0.72);
  box-shadow: inset 0 0 0 1px rgba(49, 206, 229, 0.22);
}

.tool-product-picker-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-product-picker-images span {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 5px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(0, 0, 0, 0.62);
  border-radius: 4px;
  font-size: 8px;
}

.tool-product-picker-images i {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #061214;
  background: #31cee5;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  opacity: 0;
}

.tool-product-picker-images > button.active i {
  opacity: 1;
}

.tool-product-picker-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.tool-product-picker-dialog > footer[hidden] {
  display: none;
}

.tool-product-picker-dialog > footer > span {
  color: rgba(255, 255, 255, 0.36);
  font-size: 10px;
}

.tool-product-picker-dialog > footer button {
  min-width: 126px;
  height: 38px;
  padding: 0 14px;
  color: #061214;
  background: linear-gradient(100deg, #2bc9e5, #29e4ba);
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}

.tool-product-picker-dialog > footer button:disabled {
  color: rgba(255, 255, 255, 0.34);
  background: #303136;
  cursor: not-allowed;
}

@media (max-width: 1280px) {
  .product-library-page {
    left: 92px;
  }

  .product-library-page.is-detail-view .product-library-content {
    transform: translateX(-46px);
  }

  .product-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 246px));
  }

  .product-creation-grid {
    grid-template-columns: repeat(auto-fill, minmax(214px, 250px));
  }

  .product-library-content:has(.product-library-empty) .product-library-view {
    transform: translate(-46px, -87px);
  }
}

@media (max-width: 900px) {
  .product-library-header {
    align-items: flex-start;
    min-height: 0;
    padding: 40px 24px 12px;
    flex-direction: column;
  }

  .product-library-content {
    width: calc(100% - 40px);
    padding-top: 24px;
  }

  .product-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 238px));
  }

  .product-detail-shell {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-detail-view {
    max-width: 620px;
  }

  .product-detail-gallery {
    width: min(100%, 500px);
    margin: 0 auto;
  }

  .product-detail-copy {
    aspect-ratio: auto;
    padding: 20px;
  }

  .product-creation-grid {
    grid-template-columns: repeat(auto-fill, minmax(204px, 242px));
  }
}

@media (max-width: 720px) {
  .product-library-page {
    left: 0;
  }

  .product-library-page.is-detail-view .product-library-content {
    transform: none;
  }

  .product-knowledge-facts {
    grid-template-columns: 1fr;
  }

  .product-knowledge-review-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .product-library-header h1 {
    font-size: 25px;
  }

  .product-library-header p {
    font-size: 13px;
  }

  .product-library-content {
    width: calc(100% - 28px);
  }

  .product-library-content:has(.product-library-empty) {
    min-height: calc(100dvh - 150px);
  }

  .product-library-content:has(.product-library-empty) .product-library-view {
    transform: translateY(-93px);
  }

  .product-card-grid {
    grid-template-columns: 1fr;
  }

  .product-detail-view {
    max-width: 440px;
  }

  .product-detail-gallery {
    width: min(100%, 400px);
  }

  .product-detail-copy {
    padding: 17px;
    border-radius: 14px;
  }

  .product-creation-archive {
    margin-top: 38px;
    padding-top: 26px;
  }

  .product-creation-archive-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .product-creation-grid {
    grid-template-columns: 1fr;
  }

  .product-creation-tool-menu {
    grid-template-columns: 1fr;
  }

  .product-creation-tool-menu button {
    min-height: 58px;
  }

  .product-creation-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .product-creation-cover {
    height: 100%;
    min-height: 132px;
    aspect-ratio: auto;
  }

  .product-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .product-create-card {
    min-height: 118px;
    padding: 16px;
  }

  .product-card-cover {
    aspect-ratio: 1 / 1;
  }

  .product-card-body {
    min-height: 118px;
    align-items: center;
  }

  .product-editor-modal {
    padding: 0;
  }

  .product-editor-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .product-editor-header,
  .product-editor-footer,
  .product-editor-scroll {
    padding-right: 16px;
    padding-left: 16px;
  }

  .product-main-upload {
    width: 112px;
    height: 112px;
    min-height: 0;
  }

  .product-angle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-product-picker {
    padding: 0;
  }

  .tool-product-picker-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .tool-product-picker-dialog > header > div {
    display: grid;
    gap: 3px;
  }

  .tool-product-picker-dialog > header span {
    padding: 0;
    background: transparent;
  }

  .tool-product-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-product-picker-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Admin operations workspace. */
.admin-config-card {
  margin-top: 18px;
  padding: 22px;
}

.admin-form-grid {
  display: grid;
  gap: 16px;
}

.admin-form-grid.two,
.admin-editor-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-field.span-2 {
  grid-column: 1 / -1;
}

.admin-field > span {
  color: #607069;
  font-size: 12px;
  font-weight: 760;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  color: #17201c;
  background: #f7faf8;
  border: 1px solid #dfe8e3;
  border-radius: 7px;
  outline: 0;
  font: inherit;
}

.admin-field textarea {
  resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: #5fa985;
  box-shadow: 0 0 0 3px rgba(95, 169, 133, 0.12);
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  min-height: 42px;
  color: #32443b;
  font-size: 13px;
  font-weight: 720;
}

.admin-check input {
  width: 17px;
  height: 17px;
  accent-color: #3f956b;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.admin-form-actions button,
.admin-integration-card footer button,
.admin-panel-head > button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 7px;
}

.admin-secondary-button,
.admin-upload-field button,
.admin-asset-actions button,
.admin-record-row > button {
  color: #2c4538;
  background: #edf4f0;
  border: 1px solid #dbe8e1;
}

.admin-upload-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-editor-list {
  display: grid;
  gap: 12px;
}

.admin-editor-row {
  position: relative;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #f8faf9;
  border: 1px solid #e4ebe7;
  border-radius: 8px;
}

.admin-editor-fields {
  display: grid;
  gap: 12px;
}

.admin-editor-preview {
  display: grid;
  place-items: center;
  width: 128px;
  height: 96px;
  overflow: hidden;
  color: #7a8982;
  background: #eef3f0;
  border-radius: 6px;
  font-size: 12px;
}

.admin-editor-preview.icon {
  width: 72px;
  height: 72px;
}

.admin-editor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-row-delete {
  align-self: start;
  padding: 7px 10px;
  color: #a14646;
  background: transparent;
  border: 0;
  font-size: 12px;
}

.admin-integration-editor {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-integration-card {
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e1e9e4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(24, 52, 39, 0.045);
}

.admin-integration-card header,
.admin-integration-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-integration-card header {
  margin-bottom: 18px;
}

.admin-integration-card header h3 {
  margin-top: 4px;
  color: #17201c;
  font-size: 21px;
}

.admin-integration-card header > div > span,
.admin-integration-card footer > span {
  color: #6a7b72;
  font-size: 12px;
  font-weight: 730;
}

.admin-integration-card footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e7ede9;
}

.admin-integration-card footer > div {
  display: flex;
  gap: 8px;
}

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

.admin-asset-card {
  min-width: 0;
  overflow: hidden;
  background: #f8faf9;
  border: 1px solid #e1e8e4;
  border-radius: 8px;
}

.admin-asset-card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef2f0;
}

.admin-asset-card > div {
  padding: 10px 12px;
}

.admin-asset-card strong,
.admin-asset-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-asset-card strong {
  color: #1f2b25;
  font-size: 13px;
}

.admin-asset-card span {
  margin-top: 4px;
  color: #7b8982;
  font-size: 11px;
}

.admin-asset-actions {
  display: flex;
  gap: 8px;
  padding-top: 0 !important;
}

.admin-asset-actions button {
  flex: 1;
  min-height: 32px;
  border-radius: 6px;
  font-size: 12px;
}

.admin-record-list {
  display: grid;
}

.admin-record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid #e7ece9;
}

.admin-record-row:last-child {
  border-bottom: 0;
}

.admin-record-row strong,
.admin-record-row p,
.admin-record-row span {
  display: block;
}

.admin-record-row strong {
  color: #1c2822;
  font-size: 14px;
}

.admin-record-row p {
  margin: 5px 0;
  color: #53635b;
  font-size: 13px;
}

.admin-record-row span {
  color: #85918b;
  font-size: 11px;
}

.admin-asset-actions .danger,
.admin-record-row > .danger {
  color: #a54545;
  background: #fff4f4;
  border-color: #f2dada;
}

@media (max-width: 1050px) {
  .admin-asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-editor-row { grid-template-columns: 96px minmax(0, 1fr); }
  .admin-editor-preview { width: 96px; }
  .admin-row-delete { position: absolute; top: 8px; right: 8px; }
}

@media (max-width: 720px) {
  .admin-form-grid.two,
  .admin-editor-fields { grid-template-columns: 1fr; }
  .admin-field.span-2 { grid-column: auto; }
  .admin-editor-row { grid-template-columns: 1fr; }
  .admin-editor-preview,
  .admin-editor-preview.icon { width: 100%; height: 120px; }
  .admin-asset-grid { grid-template-columns: 1fr; }
}

/* Reverse prompt workflow */
body.reverse-workflow-open {
  overflow: hidden;
}

/* The workbench starts directly below the 70px topbar. While it is open,
   stop painting the homepage canvas so its animated model underline cannot
   leak through during scroll/compositor updates. */
body.reverse-workflow-open:has(.koozee-home) .koozee-topbar {
  z-index: 65;
  background: #08090a !important;
}

body.reverse-workflow-open:has(.koozee-home) .koozee-content > :not(.reverse-workflow) {
  visibility: hidden;
  pointer-events: none;
}

/* The workflow owns the canvas after the compact global icon rail, not after
   the full home-sidebar logo width. Keep both rails visible and adjacent. */
body.reverse-workflow-open:has(.koozee-home) .koozee-sidebar {
  --koozee-rail-width: 72px;
  width: 72px;
  z-index: 70;
  overflow: visible;
  background: #08090a;
}

body.reverse-workflow-open:has(.koozee-home) .koozee-rail,
body.reverse-workflow-open:has(.koozee-home) .koozee-rail-bottom {
  width: 72px;
  box-sizing: border-box;
}

body.reverse-workflow-open:has(.koozee-home) .koozee-brand {
  width: 164px;
}

/* Public course opens inside the existing home workbench. */
body.course-event-open {
  overflow: hidden;
}

body.course-event-open:has(.koozee-home) .koozee-sidebar {
  z-index: 180;
}

body.course-event-open:has(.koozee-home) .koozee-content,
body.course-event-open:has(.koozee-home) .koozee-topbar {
  visibility: hidden;
  pointer-events: none;
}

body.course-event-open .course-page {
  position: fixed;
  inset: 0 0 0 164px;
  z-index: 170;
  min-height: 0;
  padding: 34px max(24px, calc((100vw - 1320px) / 2)) 60px;
  overflow: auto;
  overscroll-behavior: contain;
  background: #f3f4f6;
}

/* Course is a native dark workbench module, not a light marketing page. */
body.course-event-open .course-page {
  color: #f3f5f7;
  background: #08090a;
}

body.course-event-open .course-context-bar {
  min-height: 70px;
  margin-bottom: 0;
  color: rgba(235, 239, 242, 0.42);
  background: rgba(8, 9, 10, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.055);
}

body.course-event-open .course-context-bar a {
  display: none;
}

body.course-event-open .course-context-bar > span {
  display: none;
}

body.course-event-open .course-context-bar strong {
  color: #f7f8f9;
  font-size: 16px;
  font-weight: 720;
}

body.course-event-open .course-context-bar strong::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  background: #2bd1e8;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(43, 209, 232, 0.5);
  content: "";
}

body.course-event-open .course-context-bar em {
  margin-left: 12px;
  padding: 5px 9px;
  color: rgba(235, 239, 242, 0.56);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.075);
}

body.course-event-open .course-embed-close {
  margin-left: auto;
  color: rgba(235, 239, 242, 0.68);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
}

body.course-event-open .course-embed-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

body.course-event-open .course-hero {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  width: min(1360px, 100%);
  margin: 0 auto;
  padding-top: clamp(36px, 5vw, 72px);
  align-items: stretch;
}

body.course-event-open .course-hero-copy,
body.course-event-open .course-poster,
body.course-event-open .course-signup-card,
body.course-event-open .course-points article {
  border-color: rgba(255, 255, 255, 0.075);
  box-shadow: none;
}

body.course-event-open .course-hero-copy {
  min-height: 0;
  padding: 12px clamp(10px, 2vw, 28px) 24px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body.course-event-open .course-eyebrow,
body.course-event-open .course-signup-card > div > span,
body.course-event-open .course-points article span {
  color: #2bd1e8;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
}

body.course-event-open .course-hero h1 {
  max-width: 800px;
  margin-top: 14px;
  color: #f7f8f9;
  font-size: clamp(38px, 4.4vw, 62px);
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

body.course-event-open .course-hero-copy > p {
  max-width: 680px;
  margin-top: 20px;
  color: rgba(235, 239, 242, 0.56);
  font-size: 17px;
  font-weight: 450;
  line-height: 1.7;
}

body.course-event-open .course-hero-cards {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.64fr);
  gap: 10px;
  max-width: 780px;
  margin-top: 30px;
}

body.course-event-open .course-meta,
body.course-event-open .course-benefit-card {
  min-height: 94px;
  padding: 17px 18px;
  background: #0f1113;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  box-shadow: none;
}

body.course-event-open .course-meta strong,
body.course-event-open .course-benefit-card strong {
  color: #f4f6f7;
  font-size: 18px;
  font-weight: 680;
}

body.course-event-open .course-meta span,
body.course-event-open .course-benefit-card span,
body.course-event-open .course-benefit-card small {
  color: rgba(235, 239, 242, 0.46);
  font-weight: 520;
}

body.course-event-open .course-benefit-card::after {
  display: none;
}

body.course-event-open .course-poster {
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body.course-event-open .course-poster-frame {
  padding: 0;
  border: 0;
}

body.course-event-open .teacher-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  height: auto;
  min-height: 218px;
  padding: 18px;
  background: #0f1113;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
}

body.course-event-open .course-poster {
  align-self: start;
}

body.course-event-open .teacher-photo {
  width: 112px;
  height: 146px;
  min-height: 0;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 10px;
}

body.course-event-open .teacher-profile {
  padding: 0;
}

body.course-event-open .teacher-profile > span {
  color: #2bd1e8;
}

body.course-event-open .teacher-profile strong {
  margin-top: 6px;
  color: #f7f8f9;
  font-size: 30px;
  font-weight: 680;
}

body.course-event-open .teacher-profile p {
  margin-top: 12px;
  color: rgba(235, 239, 242, 0.5);
  font-size: 13px;
  font-weight: 450;
}

body.course-event-open .course-content {
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 18px;
  width: min(1360px, 100%);
  margin: 26px auto 0;
}

body.course-event-open .course-points {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.course-event-open .course-points article {
  min-height: 132px;
  padding: 21px;
  background: #0c0e10;
  border-radius: 12px;
}

body.course-event-open .course-points article strong {
  margin-top: 14px;
  color: #f2f4f6;
  font-size: 18px;
  font-weight: 650;
}

body.course-event-open .course-points article p {
  margin-top: 8px;
  color: rgba(235, 239, 242, 0.44);
  font-size: 13px;
  font-weight: 450;
}

body.course-event-open .course-signup-card {
  gap: 14px;
  padding: 24px;
  background: #0f1113;
  border-radius: 14px;
}

body.course-event-open .course-signup-card h2 {
  color: #f7f8f9;
  font-size: 24px;
  font-weight: 650;
}

body.course-event-open .course-signup-card > div > p {
  color: rgba(235, 239, 242, 0.46);
  font-weight: 450;
}

body.course-event-open .course-signup-card label {
  color: rgba(244, 246, 247, 0.72);
  font-size: 13px;
}

body.course-event-open .course-signup-card input,
body.course-event-open .course-signup-card textarea {
  color: #f3f5f7;
  background: #090b0c;
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 10px;
}

body.course-event-open .course-signup-card input::placeholder,
body.course-event-open .course-signup-card textarea::placeholder {
  color: rgba(235, 239, 242, 0.28);
}

body.course-event-open .course-signup-card input:focus,
body.course-event-open .course-signup-card textarea:focus {
  background: #090b0c;
  border-color: rgba(43, 209, 232, 0.65);
  box-shadow: 0 0 0 3px rgba(43, 209, 232, 0.1);
}

body.course-event-open .course-signup-card button {
  height: 54px;
  color: #041316;
  background: #2bd1e8;
  border: 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 760;
  box-shadow: 0 12px 30px rgba(43, 209, 232, 0.14);
}

body.course-event-open .course-signup-card button:hover {
  background: #57dff0;
  box-shadow: 0 12px 30px rgba(43, 209, 232, 0.2);
}

body.course-event-open .course-meeting-card {
  color: #f3f5f7;
  background: #090b0c;
  border-color: rgba(255, 255, 255, 0.085);
}

body.course-event-open .course-meeting-card a {
  color: #2bd1e8;
}

body.course-event-open .course-context-bar {
  position: sticky;
  top: -34px;
  z-index: 5;
  min-height: 58px;
  margin: -34px calc(-1 * max(24px, calc((100vw - 1320px) / 2))) 22px;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  background: rgba(243, 244, 246, 0.94);
  border-bottom: 1px solid #e2e4e7;
  backdrop-filter: blur(14px);
}

.course-embed-close {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  color: #60636a;
  background: #fff;
  border: 1px solid #dedfe3;
  border-radius: 10px;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

body.course-event-open .course-embed-close {
  display: grid;
}

body.course-event-open .course-hero {
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.62fr);
}

body.course-event-open .course-hero-copy {
  min-height: 390px;
}

body.course-event-open .course-poster {
  min-height: 390px;
}

body.course-event-open .teacher-photo {
  height: 220px;
}

body.course-event-open .course-content {
  grid-template-columns: minmax(0, 1fr) minmax(370px, 0.66fr);
}

@media (max-width: 1280px) {
  body.course-event-open .course-page {
    left: 92px;
  }
}

@media (max-width: 980px) {
  body.course-event-open .course-hero,
  body.course-event-open .course-content {
    grid-template-columns: 1fr;
  }

  body.course-event-open .course-poster {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  body.course-event-open .course-page {
    inset: 0;
    z-index: 220;
    padding: 22px 14px 38px;
  }

  body.course-event-open .course-context-bar {
    top: -22px;
    margin: -22px -14px 14px;
    padding: 0 14px;
  }

  body.course-event-open .course-context-bar a,
  body.course-event-open .course-context-bar > span {
    display: none;
  }

  body.course-event-open .course-context-bar em {
    margin-left: auto;
  }
}

/* Final embedded-course layout overrides. */
body.course-event-open .course-context-bar {
  min-height: 70px;
  margin: -34px calc(-1 * max(24px, calc((100vw - 1320px) / 2))) 0;
  color: rgba(235, 239, 242, 0.42);
  background: rgba(8, 9, 10, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.055);
}

body.course-event-open .course-hero {
  grid-template-columns: minmax(0, 1fr) 340px;
}

body.course-event-open .course-hero-copy,
body.course-event-open .course-poster {
  min-height: 0;
}

body.course-event-open .teacher-photo {
  height: 146px;
}

body.course-event-open .course-content {
  grid-template-columns: minmax(0, 1fr) 410px;
}

@media (max-width: 980px) {
  body.course-event-open .course-hero,
  body.course-event-open .course-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body.course-event-open .course-context-bar {
    margin: -22px -14px 0;
  }
}

/* Simplified native course view: three clear information layers. */
body.course-event-open .course-page {
  padding-top: 0;
}

body.course-event-open .course-context-bar,
body.course-event-open .course-embed-close {
  display: none !important;
}

body.course-event-open .course-hero {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(36px, 5vw, 78px);
  padding-top: clamp(58px, 7vh, 84px);
}

body.course-event-open .course-hero-copy {
  padding: 0;
}

body.course-event-open .course-hero h1 {
  max-width: 680px;
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1.04;
}

body.course-event-open .course-hero-copy > p {
  max-width: 620px;
  margin-top: 18px;
  font-size: 16px;
}

body.course-event-open .course-hero-cards {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 760px;
  margin-top: 30px;
  padding: 17px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

body.course-event-open .course-meta,
body.course-event-open .course-benefit-card {
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body.course-event-open .course-meta {
  flex: 1 1 auto;
}

body.course-event-open .course-benefit-card {
  flex: 0 0 230px;
  margin-left: 28px;
  padding-left: 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.075);
}

body.course-event-open .course-meta strong,
body.course-event-open .course-benefit-card strong {
  font-size: 17px;
}

body.course-event-open .teacher-card {
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 15px;
  min-height: 0;
  padding: 15px;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.075);
}

body.course-event-open .teacher-photo {
  width: 94px;
  height: 122px;
}

body.course-event-open .teacher-profile strong {
  font-size: 26px;
}

body.course-event-open .teacher-profile p {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
}

body.course-event-open .course-content {
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: clamp(28px, 4vw, 64px);
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

body.course-event-open .course-points {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 34px;
}

body.course-event-open .course-points article {
  min-height: 0;
  padding: 20px 0 22px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 0;
}

body.course-event-open .course-points article strong {
  display: inline-block;
  margin: 0 0 0 14px;
  font-size: 17px;
}

body.course-event-open .course-points article p {
  margin: 9px 0 0 35px;
}

body.course-event-open .course-signup-card {
  align-self: start;
  padding: 0 0 0 30px;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0;
}

body.course-event-open .course-signup-card h2 {
  font-size: 23px;
}

body.course-event-open .course-signup-card textarea {
  min-height: 76px;
}

body.course-event-open .course-signup-card button {
  height: 50px;
}

body.course-event-open .course-meeting-card {
  padding: 15px;
}

@media (max-width: 980px) {
  body.course-event-open .course-hero,
  body.course-event-open .course-content {
    grid-template-columns: 1fr;
  }

  body.course-event-open .course-poster {
    width: min(440px, 100%);
  }

  body.course-event-open .course-signup-card {
    padding: 26px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  body.course-event-open .course-page {
    padding-top: 0;
  }

  body.course-event-open .course-hero {
    padding-top: 34px;
  }

  body.course-event-open .course-hero-cards {
    display: grid;
    gap: 16px;
  }

  body.course-event-open .course-benefit-card {
    margin-left: 0;
    padding: 16px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    border-left: 0;
  }

  body.course-event-open .course-points {
    grid-template-columns: 1fr;
  }
}

/* Focused two-column course composition. */
body.course-event-open .course-page {
  display: grid;
  align-items: center;
  padding: 54px clamp(32px, 6vw, 100px);
}

.course-focus-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: clamp(64px, 8vw, 132px);
  align-items: stretch;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.course-account-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 164px;
  z-index: 181;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 70px;
  padding: 0 24px 0 0;
  pointer-events: none;
}

.course-account-bar .koozee-login-entry {
  height: 100%;
  pointer-events: auto;
}

.course-account-bar .koozee-session-strip {
  padding: 0;
}

.course-account-bar .koozee-login-tip {
  right: 0;
  left: auto;
}

.course-focus-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.course-focus-eyebrow {
  color: #2bd1e8;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.course-focus-copy h1 {
  max-width: none;
  margin-top: 16px;
  color: #f7f8f9;
  font-size: clamp(40px, 3.7vw, 54px);
  font-weight: 670;
  letter-spacing: -0.04em;
  line-height: 1.08;
  white-space: nowrap;
}

.course-focus-intro {
  max-width: 600px;
  margin-top: 20px;
  color: rgba(235, 239, 242, 0.52);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.7;
}

.course-focus-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr);
  gap: 28px;
  margin-top: 36px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.course-focus-meta div {
  display: grid;
  gap: 7px;
}

.course-focus-meta span,
.course-teacher-inline span {
  color: rgba(235, 239, 242, 0.4);
  font-size: 12px;
  font-weight: 600;
}

.course-focus-meta strong {
  color: #f3f5f7;
  font-size: 17px;
  font-weight: 650;
}

.course-flow-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  color: rgba(235, 239, 242, 0.62);
  font-size: 13px;
  font-weight: 560;
}

.course-flow-line span {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.course-flow-line span:not(:last-child)::after {
  color: rgba(43, 209, 232, 0.5);
  content: "→";
}

.course-teacher-inline {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: auto;
  padding-top: 30px;
}

.course-teacher-inline img {
  width: 58px;
  height: 68px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 9px;
}

.course-teacher-inline div {
  min-width: 0;
}

.course-teacher-inline strong {
  display: inline-block;
  margin-left: 8px;
  color: #f3f5f7;
  font-size: 17px;
  font-weight: 650;
}

.course-teacher-inline p {
  margin-top: 7px;
  color: rgba(235, 239, 242, 0.42);
  font-size: 12px;
  line-height: 1.55;
}

body.course-event-open .course-focus-shell .course-signup-card {
  height: 100%;
  gap: 15px;
  padding: 30px;
  background: #0e1012;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
}

body.course-event-open .course-focus-shell .course-signup-card h2 {
  margin-top: 8px;
  font-size: 24px;
}

body.course-event-open .course-focus-shell .course-signup-card > div > p {
  max-width: 310px;
  margin-top: 9px;
  line-height: 1.6;
}

body.course-event-open .course-focus-shell .course-signup-card textarea {
  min-height: 76px;
}

body.course-event-open .course-focus-shell .course-signup-card button {
  margin-top: 2px;
}

body.course-event-open .course-focus-shell .course-signup-card > label[hidden],
body.course-event-open .course-focus-shell .course-signup-card > div[hidden] {
  display: none !important;
}

body.course-event-open .course-focus-shell .course-signup-card.is-complete {
  display: flex;
  align-items: stretch;
  min-height: 0;
  padding: 32px;
  background: #0e1012;
  border: 1px solid rgba(255, 255, 255, 0.075);
}

body.course-event-open .course-focus-shell .course-signup-card.is-complete .course-meeting-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

body.course-event-open .course-focus-shell .course-signup-card.is-complete .course-meeting-card > span {
  color: #2bd1e8;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
}

body.course-event-open .course-focus-shell .course-signup-card.is-complete .course-meeting-card h2 {
  margin: 16px 0 0;
  color: #f5f7f8;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

body.course-event-open .course-focus-shell .course-signup-card.is-complete .course-meeting-card > p {
  margin: 14px 0 0;
  color: rgba(235, 239, 242, 0.5);
  font-size: 13px;
  line-height: 1.7;
}

body.course-event-open .course-focus-shell .course-signup-card.is-complete .course-meeting-card a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 24px;
  padding: 0 20px;
  color: #071014;
  background: #31c9df;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.course-meeting-reward-note {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.course-meeting-reward-note strong {
  color: rgba(245, 247, 248, 0.88);
  font-size: 14px;
}

.course-meeting-reward-note p {
  margin: 0;
  color: rgba(235, 239, 242, 0.45);
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 980px) {
  body.course-event-open .course-page {
    align-items: start;
    padding: 38px 26px 54px;
  }

  .course-focus-shell {
    grid-template-columns: 1fr;
    gap: 42px;
    width: min(680px, 100%);
  }

  .course-focus-copy h1 {
    white-space: normal;
  }

  .course-account-bar {
    left: 92px;
  }
}

@media (max-width: 720px) {
  .course-account-bar {
    left: 0;
    height: 64px;
    padding: 0 12px;
  }
}

@media (max-width: 680px) {
  body.course-event-open .course-page {
    display: block;
    padding: 32px 20px 44px;
  }

  .course-focus-copy h1 {
    font-size: 40px;
  }

  .course-focus-meta {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .course-flow-line span::after {
    display: none;
  }

  body.course-event-open .course-focus-shell .course-signup-card {
    padding: 24px;
  }
}

.course-activation-modal[hidden] {
  display: none;
}

.course-activation-modal {
  position: fixed;
  inset: 0;
  z-index: 6200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.course-activation-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.68);
  border: 0;
  border-radius: 0;
  backdrop-filter: blur(6px);
}

.course-activation-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  width: min(520px, 100%);
  padding: 16px;
  color: #f3f5f7;
  background: #111315;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.course-activation-dialog input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  color: #f5f7f8;
  background: #0b0d0f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  outline: 0;
}

.course-activation-dialog > button {
  height: 52px;
  color: #041316;
  background: #2bd1e8;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 760;
}

.course-activation-dialog > button:hover:not(:disabled) {
  background: #57dff0;
}

.course-activation-dialog > button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.course-activation-dialog input:focus {
  background: #0d0f11;
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: none;
}

.course-activation-dialog input::placeholder {
  color: rgba(235, 239, 242, 0.28);
}

.course-activation-message {
  grid-column: 1 / -1;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 13px !important;
  font-weight: 650;
}

.course-activation-message[data-tone="danger"] {
  color: #ff9e8e;
  background: rgba(255, 91, 70, 0.1);
}

.course-activation-message[data-tone="success"] {
  color: #6ce5b0;
  background: rgba(53, 207, 139, 0.1);
}

@media (max-width: 520px) {
  .course-activation-dialog {
    grid-template-columns: 1fr;
  }
}

.reverse-workflow[hidden] {
  display: none !important;
}

.reverse-workflow {
  position: fixed;
  inset: 70px 0 10px 72px;
  z-index: 60;
  display: grid;
  grid-template-columns: 72px minmax(350px, 360px) 92px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: #f4f5f6;
  background: #101114;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 18px;
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.22),
    inset 1px 0 0 rgba(255, 255, 255, 0.014);
  font-family: Inter, "SF Pro Display", "PingFang SC", sans-serif;
  transition: grid-template-columns 180ms ease;
}

.reverse-workflow button,
.reverse-workflow textarea {
  font: inherit;
  letter-spacing: 0;
}

.reverse-workflow-nav {
  position: relative;
  z-index: 2;
  padding: 7px 5px 16px;
  overflow-y: auto;
  pointer-events: auto;
  background: #191a1e;
  border-right: 1px solid rgba(255, 255, 255, 0.035);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.18);
}

.reverse-workflow-nav > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.reverse-workflow-nav .reverse-tool-tab {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  gap: 4px;
  width: 100%;
  min-height: 72px;
  margin-bottom: 7px;
  padding: 5px 3px;
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.reverse-workflow-nav svg {
  box-sizing: content-box;
  width: 20px;
  height: 20px;
  padding: 9px 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  border-radius: 7px;
  transition: color 140ms ease, background-color 140ms ease, transform 100ms ease;
}

.reverse-workflow-nav .reverse-prompt-tool-icon,
.reverse-workflow-nav .detail-image-tool-icon {
  box-sizing: border-box;
  width: 40px;
  height: 36px;
  padding: 5px 6px;
  stroke-width: 1.65;
  border-radius: 10px;
}

.reverse-workflow-nav .reverse-prompt-tool-icon {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reverse-workflow-nav .reverse-prompt-tool-spark {
  fill: currentColor;
  stroke: none;
}

.reverse-workflow-nav .detail-image-tool-icon {
  stroke-width: 1.8;
  stroke-linecap: round;
}

.reverse-workflow-nav .detail-image-tool-spark {
  fill: currentColor;
  stroke: none;
}

.reverse-workflow-nav span {
  font-size: 11px;
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: -0.12px;
  text-align: center;
}

.reverse-workflow-nav .reverse-tool-tab:hover {
  color: #f7f7f8;
  background: transparent;
}

.reverse-workflow-nav .reverse-tool-tab:hover svg {
  color: #f7f7f8;
  background: #393a3f;
}

.reverse-workflow-nav .reverse-tool-tab:active svg {
  background: #414247;
  transform: scale(0.96);
}

.reverse-workflow-nav > input:checked + .reverse-tool-tab {
  color: #f7f7f8;
  background: transparent;
}

.reverse-workflow-nav > input:checked + .reverse-tool-tab svg {
  color: #061215;
  background: #31cee5;
}

.reverse-workflow-nav > input:checked + .reverse-tool-tab:hover svg {
  color: #061215;
  background: #31cee5;
}

.reverse-workflow:has(#reversePromptToolTab:checked) [data-reverse-panel="detail-image"],
.reverse-workflow:has(#detailImageToolTab:checked) [data-reverse-panel="reverse-prompt"] {
  display: none;
}

.detail-image-workbench {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #1b1c20;
  border-right: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 0 18px 18px 0;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.012);
}

.detail-image-header {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 9px 16px 7px;
}

.detail-image-header h2 {
  margin: 0;
  color: #f5f6f7;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
}

.detail-image-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.detail-model-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 8px 2px 6px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 560;
  white-space: nowrap;
}

.detail-model-badge svg {
  width: 15px;
  height: 15px;
  color: #31cee5;
  fill: currentColor;
  stroke: none;
}

.detail-image-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 6px 16px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.detail-image-step {
  position: relative;
}

.detail-image-step + .detail-image-step { margin-top: 10px; }

.detail-image-step:not(:last-child)::after {
  display: none;
}

.detail-image-step > header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  color: rgba(255, 255, 255, 0.76);
}

.detail-image-step > header b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.86);
  background: #2a2b2f;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 570;
}

.detail-image-step > header strong {
  color: rgba(255, 255, 255, 0.77);
  font-size: 14px;
  font-weight: 620;
}

.detail-image-step-body {
  position: relative;
  margin-left: 14px;
  padding: 10px 0 16px 14px;
  border-left: 1px dashed rgba(255, 255, 255, 0.18);
}

.detail-image-upload {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  background: #242529;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 10px;
  cursor: pointer;
}

.detail-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 104px);
  justify-content: center;
  gap: 14px;
}

.detail-product-upload-head,
.detail-optional-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 620;
}

.detail-product-upload-head small,
.detail-optional-upload-head small {
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  font-weight: 500;
}

.detail-product-slots {
  display: grid;
  grid-template-columns: repeat(3, 104px);
  justify-content: center;
  gap: 12px;
}

.detail-product-slot {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
}

.detail-product-slot > label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  background: #242529;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 9px;
  cursor: pointer;
}

.detail-product-slot > label > span {
  font-size: 26px;
  font-weight: 220;
  line-height: 1;
}

.detail-product-slot > label > strong {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.2;
}

.detail-product-slot > label:hover {
  color: #2bd4e8;
  background: #292a2e;
  border-color: rgba(49, 206, 229, 0.25);
}

.detail-product-slot > button {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: none;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.detail-product-slot.has-image > button { display: grid; }
.detail-product-slot.has-image:hover > button { background: rgba(0, 0, 0, 0.78); }

.detail-product-slot .detail-upload-cover { z-index: 1; }

.detail-product-slot.has-image > label > span,
.detail-product-slot.has-image > label > strong { opacity: 0; }

.detail-product-slot[data-detail-product-slot="0"].has-image::after {
  content: "主参考";
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 3px 5px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.62);
  border-radius: 4px;
  font-size: 9px;
  pointer-events: none;
}

.detail-optional-upload-head { margin-top: 14px; }

.detail-optional-upload-grid {
  grid-template-columns: repeat(2, 94px);
}

.detail-upload-grid.detail-optional-upload-grid .detail-image-upload {
  width: 94px;
  height: 94px;
}

.detail-upload-grid .detail-image-upload {
  width: 104px;
  height: 104px;
  margin: 0;
}

.detail-upload-grid .detail-image-upload-primary {
  grid-column: auto;
  height: 104px;
  color: rgba(255, 255, 255, 0.74);
  background: #242529;
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.detail-image-upload strong {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 25px;
  color: currentColor;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.detail-image-upload strong em {
  position: absolute;
  top: -58px;
  right: -1px;
  margin: 0;
  padding: 2px 4px;
  color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 4px;
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
}

.detail-upload-previews {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.detail-upload-previews[hidden] { display: none; }

.detail-upload-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  overflow: hidden;
  background: #141518;
  border-radius: inherit;
  pointer-events: none;
}

.detail-upload-cover.count-2,
.detail-upload-cover.count-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
}

.detail-upload-cover.count-3 img:first-child { grid-row: span 2; }

.detail-upload-cover img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.detail-image-upload.has-image > span,
.detail-image-upload.has-image > strong { opacity: 0; }

.detail-image-upload.has-image > small {
  z-index: 2;
  padding: 3px 5px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.62);
  border-radius: 4px;
}

.detail-image-upload.has-image:hover .detail-upload-cover { opacity: 0.82; }

.detail-upload-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #101113;
  border-radius: 7px;
}

.detail-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-upload-preview span {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 2px 4px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 3px;
  font-size: 8px;
}

.detail-image-upload:hover {
  color: #2bd4e8;
  background: #292a2e;
  border-color: rgba(49, 206, 229, 0.3);
}

.detail-image-upload > span {
  position: absolute;
  top: 22px;
  left: 50%;
  font-size: 30px;
  font-weight: 220;
  line-height: 1;
  transform: translateX(-50%);
}

.detail-image-upload small {
  position: absolute;
  right: 8px;
  bottom: 7px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
}

.detail-image-setting-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

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

.detail-field-grid label,
.detail-note-field {
  display: grid;
  gap: 8px;
}

.detail-field-grid .detail-field-wide { grid-column: auto; }

.detail-field-grid label > span,
.detail-choice-block > span,
.detail-note-field > span,
.detail-module-head > span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 620;
}

.detail-custom-select {
  position: relative;
  min-width: 0;
}

.detail-custom-select > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 40px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.9);
  background: #26272b;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.detail-custom-select > button i {
  width: 8px;
  height: 8px;
  margin: -4px 2px 0 12px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.58);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.58);
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.detail-custom-select.open > button {
  border-color: #31cee5;
  box-shadow: 0 0 0 2px rgba(49, 206, 229, 0.09);
}

.detail-custom-select.open > button i {
  margin-top: 4px;
  transform: rotate(225deg);
}

.detail-custom-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  padding: 6px;
  background: #2b2c30;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.detail-custom-select.open .detail-custom-menu { display: grid; }

.detail-custom-menu button {
  min-height: 36px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.detail-custom-menu button:hover,
.detail-custom-menu button.active {
  color: #2bd4e8;
  background: rgba(49, 206, 229, 0.08);
}

.detail-choice-block {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

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

.detail-choice-language {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin-top: 14px;
}

.detail-choice-language > span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 620;
}

.detail-choice-row,
.detail-ratio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-choice-row button,
.detail-ratio-row button,
.detail-module-grid button,
.detail-ratio-grid button {
  min-height: 46px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.68);
  background: #242529;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.detail-choice-row button.active,
.detail-ratio-row button.active,
.detail-module-grid button.active,
.detail-ratio-grid button.active {
  color: #24d8ef;
  background: #20282d;
  border-color: rgba(49, 206, 229, 0.08);
  font-weight: 620;
}

.detail-choice-row,
.detail-ratio-row {
  height: 40px;
  padding: 3px;
  gap: 3px;
  background: #111216;
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 8px;
}

.detail-choice-row button,
.detail-ratio-row button {
  min-height: 0;
  height: 100%;
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 560;
}

.detail-choice-row button:hover,
.detail-ratio-row button:hover {
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.035);
}

.detail-choice-row button.active,
.detail-ratio-row button.active {
  color: #17181b;
  background: #f1f2f3;
  border-color: transparent;
  font-weight: 620;
}

.detail-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.detail-module-head button {
  padding: 4px 8px;
  color: #31cee5;
  background: transparent;
  border: 0;
  font-size: 12px;
  cursor: pointer;
}

.detail-module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-top: 8px;
}

.detail-module-grid button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 38px;
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.64);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  text-align: left;
}

.detail-module-grid button::before {
  content: "";
  display: grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: #071315;
  background: #26272b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.detail-module-grid button:hover {
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.025);
}

.detail-module-grid button.active {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.025);
  border-color: transparent;
  font-weight: 580;
}

.detail-module-grid button.active::before {
  content: "✓";
  background: #31cee5;
  border-color: #31cee5;
}

.detail-note-field {
  position: relative;
}

.detail-note-input {
  position: relative;
  overflow: hidden;
  background: #101113;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.detail-note-input:focus-within {
  border-color: rgba(49, 206, 229, 0.34);
  box-shadow: 0 0 0 2px rgba(49, 206, 229, 0.055);
}

.detail-note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 0;
}

.detail-note-tags[hidden] {
  display: none;
}

.detail-note-tags .product-tag-chip {
  min-height: 24px;
  padding: 2px 7px;
  font-size: 10px;
}

.detail-note-input textarea {
  display: block;
  width: 100%;
  min-height: 118px;
  resize: vertical;
  padding: 12px 13px 28px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 12px;
  line-height: 1.6;
}

.detail-note-tags:not([hidden]) + textarea {
  min-height: 82px;
  padding-top: 8px;
}

.detail-note-input > small {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 10px;
}

.detail-note-input > small b { font-weight: 500; }

.detail-ratio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.detail-ratio-select-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.detail-ratio-select-pair.single-field {
  grid-template-columns: minmax(0, 1fr);
}

.detail-ratio-select-pair > label {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.detail-ratio-select-pair > label > span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 620;
}

.detail-ratio-select-pair > label[hidden] {
  display: none;
}

.detail-hero-ratio-field {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.detail-hero-ratio-field > span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 620;
}

.detail-ratio-select > button {
  justify-content: flex-start;
  padding: 3px 12px;
  background: #111216;
  border-color: rgba(255, 255, 255, 0.035);
}

.detail-ratio-select > button svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.detail-ratio-select > button span {
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 620;
}

.detail-ratio-select > button i { margin-left: auto; }

.detail-ratio-menu { min-width: 100%; }

.detail-ratio-menu-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}

.detail-ratio-menu-grid button { text-align: center; }

.detail-image-message {
  margin: 12px 0 0;
  padding: 9px 10px;
  color: #ffafb3;
  background: rgba(255, 91, 99, 0.08);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.5;
}

.detail-image-message[data-tone="status"] {
  color: #91e9f2;
  background: rgba(49, 212, 232, 0.08);
}

.detail-image-setting-row button,
.detail-image-ratio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.9);
  background: #26272b;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
}

.detail-image-setting-row i,
.detail-image-ratio i {
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.46);
  border-bottom: 2px solid rgba(255, 255, 255, 0.46);
  transform: rotate(45deg) translateY(-2px);
}

.detail-image-copy-box {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 132px;
  margin-top: 9px;
  padding: 14px 13px 42px;
  color: rgba(255, 255, 255, 0.34);
  background: #101113;
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 7px;
}

.detail-image-copy-box strong {
  font-size: 12px;
  font-weight: 600;
}

.detail-image-copy-box > span {
  font-size: 12px;
}

.detail-image-copy-box small {
  position: absolute;
  right: 10px;
  bottom: 9px;
  padding: 7px 10px;
  color: rgba(49, 206, 229, 0.68);
  background: #17191b;
  border-radius: 8px;
  font-size: 12px;
}

.detail-image-ratio {
  width: 100%;
  margin-top: 9px;
}

.detail-image-generate {
  width: 100%;
  height: 46px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.38);
  background: #313236;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
  transition: filter 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.detail-image-generate:not(:disabled) {
  color: #071416;
  background: linear-gradient(100deg, #35c9e3 0%, #2ce2bc 100%);
  cursor: pointer;
}

.detail-image-generate:not(:disabled):hover {
  filter: brightness(1.05);
}

.detail-image-generate:not(:disabled):active {
  transform: translateY(1px);
}

.detail-image-generate[aria-busy="true"] { opacity: 0.7; cursor: wait; }

.detail-image-history {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  padding: 20px 8px;
  color: rgba(255, 255, 255, 0.35);
  background: #18191d;
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 0 24px 24px 0;
}

.detail-image-history span {
  font-size: 11px;
}

.detail-image-history p {
  margin: 0;
  font-size: 10px;
}

#detailImageHistory {
  display: grid;
  gap: 7px;
  width: 100%;
  overflow-y: auto;
}

.detail-history-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  background: #101113;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.detail-history-card img { width: 100%; height: 100%; object-fit: cover; }
.detail-history-card.active { border-color: #31cee5; }

.detail-image-library {
  grid-column: 3;
  grid-row: 1;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 24px;
  overflow: auto;
  background: #090a0b;
}

.detail-image-library-empty {
  display: grid;
  justify-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}

.detail-image-library-empty svg {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.detail-image-library-empty strong {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.detail-image-library-empty span {
  font-size: 11px;
}

#detailImageLibrary { width: 100%; min-height: 100%; }

#detailImageLibrary:has(.detail-image-library-empty) {
  display: grid;
  place-items: center;
}

.detail-image-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 228px));
  grid-auto-rows: 6px;
  grid-auto-flow: row dense;
  gap: 10px;
  align-content: start;
  justify-content: start;
}

.detail-image-result-card {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  break-inside: avoid;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.detail-image-result-media {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 100%;
  background: #111214;
  border-radius: 6px;
}

.detail-image-result-card img { display: block; width: 100%; height: auto; border-radius: inherit; }

.detail-image-result-card img.detail-image-decode-pending {
  opacity: 0;
}

.detail-image-result-card img.detail-image-decode-ready {
  opacity: 1;
  transition: opacity 140ms ease-out;
}

.detail-image-module-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  background: rgba(25, 27, 31, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 999px;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.13);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  backdrop-filter: blur(8px) saturate(115%);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
}

.detail-image-result-card .result-action-bar {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  width: 116px;
  max-width: calc(100% - 12px);
  height: 32px;
  padding: 0 4px;
  box-sizing: border-box;
  pointer-events: none;
  background: rgba(29, 31, 34, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translate(-50%, 5px) scale(0.985);
  transition: opacity 170ms ease, transform 170ms cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(13px) saturate(135%) brightness(0.86);
  -webkit-backdrop-filter: blur(13px) saturate(135%) brightness(0.86);
}

.detail-image-result-media:hover .result-action-bar,
.detail-image-result-media:focus-within .result-action-bar {
  pointer-events: auto;
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.detail-image-result-card .result-action-bar button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  padding: 0;
  color: rgba(255, 255, 255, 0.96);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, transform 120ms ease;
}

.detail-image-result-card .result-action-bar button::after {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  z-index: 3;
  padding: 5px 8px;
  color: rgba(255, 255, 255, 0.94);
  content: attr(data-tooltip);
  white-space: nowrap;
  pointer-events: none;
  background: rgba(28, 30, 34, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 80ms ease, transform 80ms ease;
}

.detail-image-result-card .result-action-bar button:hover::after,
.detail-image-result-card .result-action-bar button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.detail-image-result-card .result-action-bar button:hover {
  color: #fff;
  background: rgba(161, 163, 170, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: none;
}

.detail-image-result-card .result-action-bar button:disabled,
.detail-image-result-card .result-action-bar button.is-busy {
  cursor: wait;
  opacity: 0.58;
}

.detail-image-result-card .result-action-bar svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: none) {
  .detail-image-result-card .result-action-bar {
    pointer-events: auto;
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.reverse-workbench {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #1b1c20;
  border-right: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 0 18px 18px 0;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.012);
}

.reverse-workbench-header,
.reverse-library > header,
.reverse-history > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reverse-workbench-header {
  min-height: 60px;
  padding: 9px 16px 7px;
  border-bottom: 0;
}

.reverse-workbench-header > div > span,
.reverse-library > header span {
  color: rgba(242, 239, 195, 0.92);
  font-size: 10px;
  font-weight: 560;
}

.reverse-library > header span {
  display: block;
}

.reverse-workbench-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.reverse-workbench-title > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 1px 6px 1px 4px;
  background: rgba(255, 255, 255, 0.055);
  border: 0;
  border-radius: 4px;
  white-space: nowrap;
}

.reverse-workbench-title > span img {
  display: block;
  width: 13px;
  height: 13px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(87, 137, 255, 0.18));
}

.reverse-workbench-title > span .reverse-agent-openai {
  display: block;
  width: 13px;
  height: 13px;
  fill: currentColor;
  filter: drop-shadow(0 1px 3px rgba(255, 255, 255, 0.12));
}

.reverse-workbench-header h2 {
  margin: 0;
  color: #f6f6f7;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
}

.reverse-library > header button,
.reverse-history > header button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.045);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.reverse-library > header button:hover,
.reverse-history > header button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.reverse-workbench-scroll {
  min-height: 0;
  overflow: auto;
  padding: 6px 16px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.reverse-step {
  position: relative;
}

.reverse-step + .reverse-step {
  margin-top: 8px;
}

.reverse-step-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  color: rgba(255, 255, 255, 0.76);
}

.reverse-step-heading b {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.86);
  background: #2a2b2f;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 570;
}

.reverse-step-heading strong {
  font-size: 14px;
  font-weight: 620;
}

.reverse-step-heading small {
  margin-left: -4px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 11px;
  font-weight: 500;
}

.reverse-step-body {
  position: relative;
  margin-left: 14px;
  padding: 8px 0 12px 12px;
  border-left: 1px dashed rgba(255, 255, 255, 0.18);
}

.reverse-step-settings .reverse-step-body {
  padding-bottom: 2px;
}

.reverse-step-detail {
  margin-top: 10px;
}

.reverse-step-detail .reverse-step-body {
  padding-top: 6px;
  padding-bottom: 2px;
  border-left-color: transparent;
}

.reverse-detail-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  height: 38px;
  padding: 3px;
  background: #111216;
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 7px;
}

.reverse-detail-segment button {
  border: 0;
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
}

.reverse-detail-segment button.active {
  color: #17181b;
  background: #f1f2f3;
}

.reverse-detail-segment button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 1px;
}

.reverse-upload-stage {
  display: grid;
  justify-items: center;
}

.reverse-workflow .reverse-upload {
  display: grid;
  place-items: center;
  position: relative;
  width: 96px;
  height: 96px;
  min-height: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.62);
  background: #242529;
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.reverse-workflow .reverse-upload::after {
  content: "0/1";
  position: absolute;
  right: 7px;
  bottom: 6px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  line-height: 1;
}

.reverse-upload-stage:has(.reverse-preview:not([hidden])) .reverse-upload {
  display: none;
}

.reverse-workflow .reverse-upload:hover,
.reverse-workflow .reverse-upload.is-dragging {
  color: #fff;
  background: #24262a;
  border-color: #31d4e8;
}

.reverse-upload-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border-radius: 0;
}

.reverse-upload-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.reverse-workflow .reverse-upload strong,
.reverse-workflow .reverse-upload small {
  display: none;
}

.reverse-workflow .reverse-upload strong {
  color: #f0f1f2;
  font-size: 15px;
  font-weight: 650;
}

.reverse-workflow .reverse-upload small {
  margin-top: 6px;
  font-size: 12px;
}

.reverse-workflow .reverse-preview {
  display: block;
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #222327;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.reverse-workflow .reverse-preview[hidden] {
  display: none !important;
}

.reverse-workflow .reverse-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

.reverse-preview > div {
  position: absolute;
  inset: auto 0 0;
  min-width: 0;
  padding: 16px 7px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.reverse-preview strong,
.reverse-preview span {
  display: none;
}

.reverse-preview strong {
  font-size: 14px;
  font-weight: 650;
}

.reverse-preview span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
}

.reverse-preview button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 10px;
  cursor: pointer;
}

.reverse-note-field {
  display: block;
  margin: 0;
}

.reverse-note-field > span,
.reverse-options > div > span {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 650;
}

.reverse-note-field small {
  color: rgba(255, 255, 255, 0.38);
  font-weight: 500;
}

.reverse-note-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 68px;
  resize: vertical;
  padding: 12px;
  color: #f4f4f5;
  background: #222327;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  outline: none;
  font-size: 13px;
  line-height: 1.65;
}

.reverse-note-field textarea:focus {
  border-color: rgba(49, 212, 232, 0.72);
}

.reverse-note-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.reverse-workflow .reverse-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 26px);
  height: 38px;
  min-height: 38px;
  margin: 12px 0 0 26px;
  color: #061214;
  background: linear-gradient(100deg, #2bc9e5, #29e4ba);
  border: 0;
  border-radius: 7px;
  box-shadow: 0 10px 22px rgba(38, 221, 190, 0.08);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.reverse-submit small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.66;
}

.reverse-workflow .reverse-submit:disabled:not(.is-busy) {
  color: rgba(255, 255, 255, 0.38);
  background: #303136;
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

.reverse-workflow .reverse-submit.is-busy {
  cursor: wait;
  opacity: 0.72;
}

.reverse-workflow .reverse-message {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #ffafb3;
  background: rgba(255, 91, 99, 0.08);
  border-radius: 6px;
  font-size: 12px;
}

.reverse-workflow .reverse-message[data-tone="status"] {
  color: #91e9f2;
  background: rgba(49, 212, 232, 0.08);
}

.reverse-workflow .reverse-result {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reverse-workflow .reverse-result[hidden] {
  display: none !important;
}

.reverse-result-card {
  padding: 15px;
  background: #222327;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
}

.reverse-result-head button {
  color: #75eaf2;
  background: rgba(49, 212, 232, 0.08);
  border: 1px solid rgba(49, 212, 232, 0.2);
  border-radius: 5px;
  cursor: pointer;
}

.reverse-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reverse-result-head strong {
  font-size: 13px;
  font-weight: 650;
}

.reverse-workflow .reverse-result-head strong {
  color: rgba(255, 255, 255, 0.9);
}

.reverse-result-head button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
}

.reverse-result-card p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.69);
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.reverse-history {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 10px 9px 12px;
  overflow: hidden;
  background: #18191d;
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 0 24px 24px 0;
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.018),
    10px 0 24px rgba(0, 0, 0, 0.08);
}

.reverse-history > header {
  min-height: 36px;
  padding: 0 0 8px;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.reverse-history > header .reverse-history-toggle {
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border-radius: 7px;
  transition:
    width 180ms ease,
    height 180ms ease,
    color 140ms ease,
    background-color 140ms ease,
    transform 180ms ease;
}

.reverse-history > header .reverse-history-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.reverse-history-toggle-expanded {
  display: block;
  font: 300 23px/1 Arial, sans-serif;
  letter-spacing: -4px;
  transform: translate(-2px, -1px);
}

.reverse-history-toggle-collapsed {
  display: none;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 620;
}

.reverse-history-toggle-collapsed b {
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

#reversePromptHistory {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  overflow-anchor: none;
  scrollbar-width: none;
}

#reversePromptHistory::-webkit-scrollbar {
  display: none;
}

#reversePromptHistory > p {
  margin: 12px 0;
  color: rgba(255, 255, 255, 0.27);
  font-size: 10px;
  text-align: center;
}

#reversePromptHistory .reverse-history-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

#reversePromptHistory .reverse-history-preview {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  background: #25262a;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}

#reversePromptHistory .reverse-history-preview:not(.is-active):hover {
  background: #292a2f;
  border-color: rgba(255, 255, 255, 0.16);
  filter: brightness(1.035);
}

#reversePromptHistory .reverse-history-preview.is-active {
  border-color: rgba(53, 212, 230, 0.88);
  box-shadow: 0 0 0 1px rgba(53, 212, 230, 0.14), 0 5px 16px rgba(20, 171, 193, 0.12);
}

#reversePromptHistory .reverse-history-delete {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  color: rgba(255, 255, 255, 0.84);
  font: 400 15px/1 Arial, sans-serif;
  background: rgba(8, 9, 10, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  opacity: 0.72;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: opacity 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

#reversePromptHistory .reverse-history-delete:hover,
#reversePromptHistory .reverse-history-delete:focus-visible {
  color: #fff;
  background: rgba(17, 18, 20, 0.92);
  border-color: rgba(255, 255, 255, 0.34);
  opacity: 1;
  outline: none;
}

#reversePromptHistory .reverse-history-delete:disabled {
  opacity: 0.32;
  cursor: wait;
}

#reversePromptHistory img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reverse-library {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 14px 14px 28px;
  background: #090a0b;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.reverse-library > header {
  display: none;
}

.reverse-library > header strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 650;
}

.reverse-library > header small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 500;
}

.reverse-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 228px));
  grid-auto-rows: 6px;
  grid-auto-flow: row dense;
  gap: 10px;
  align-content: start;
  justify-content: start;
}

.reverse-library-card {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  break-inside: avoid;
  background: #18191c;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 6px;
  cursor: pointer;
}

.reverse-library-card.is-loading {
  background: linear-gradient(100deg, #18191c 18%, #24262a 44%, #18191c 72%);
  background-size: 220% 100%;
  animation: reverseLibraryLoading 1.15s linear infinite;
}

@keyframes reverseLibraryLoading {
  to { background-position: -220% 0; }
}

.reverse-library-card img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 108px;
  object-fit: cover;
  opacity: 1;
  transition: opacity 180ms ease;
}

.reverse-library-card.is-loading img {
  opacity: 0;
}

.reverse-library-card span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  color: #061214;
  background: #43dce8;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.reverse-library-card:hover {
  border-color: rgba(255, 255, 255, 0.045);
}

.reverse-library-card:hover span {
  opacity: 1;
  transform: none;
}

.reverse-library-empty {
  margin: 80px 0;
  color: rgba(255, 255, 255, 0.36);
  font-size: 13px;
  text-align: center;
}

.reverse-workflow.history-collapsed {
  grid-template-columns: 72px minmax(350px, 360px) 0 minmax(0, 1fr);
}

.reverse-workflow.history-collapsed .reverse-history {
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.reverse-workflow.history-collapsed .reverse-history > header {
  position: absolute;
  top: 0;
  left: 12px;
  width: max-content;
  min-height: 0;
  padding: 0;
}

.reverse-workflow.history-collapsed .reverse-history > header .reverse-history-toggle {
  width: 92px;
  height: 40px;
  color: rgba(255, 255, 255, 0.94);
  background: #2b2c30;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.reverse-workflow.history-collapsed .reverse-history > header .reverse-history-toggle:hover {
  background: #34353a;
}

.reverse-workflow.history-collapsed .reverse-history-toggle-expanded {
  display: none;
}

.reverse-workflow.history-collapsed .reverse-history-toggle-collapsed {
  display: inline-flex;
}

.reverse-workflow.history-collapsed #reversePromptHistory {
  visibility: hidden;
  pointer-events: none;
}

/* Complex workflows can opt into a wider control surface without changing
   the compact reverse-prompt layout. Keep enough room for results on the right. */
.reverse-workflow:has(#detailImageToolTab:checked),
.reverse-workflow.history-collapsed:has(#detailImageToolTab:checked) {
  grid-template-columns: 72px minmax(480px, 540px) minmax(360px, 1fr);
}

@media (max-width: 1380px) {
  .reverse-workflow {
    grid-template-columns: 72px minmax(330px, 350px) 84px minmax(0, 1fr);
  }
  .reverse-workflow.history-collapsed {
    grid-template-columns: 72px minmax(330px, 350px) 0 minmax(0, 1fr);
  }
  .reverse-workflow:has(#detailImageToolTab:checked),
  .reverse-workflow.history-collapsed:has(#detailImageToolTab:checked) {
    grid-template-columns: 72px minmax(440px, 480px) minmax(300px, 1fr);
  }
  .reverse-workflow-nav span { font-size: 10px; }
  .reverse-library-grid { grid-template-columns: repeat(auto-fill, minmax(154px, 206px)); }
}

@media (max-width: 1060px) {
  .reverse-workflow {
    grid-template-columns: minmax(340px, 380px) 70px minmax(0, 1fr);
  }
  .reverse-workflow.history-collapsed {
    grid-template-columns: minmax(340px, 380px) 0 minmax(0, 1fr);
  }
  .reverse-workflow:has(#detailImageToolTab:checked),
  .reverse-workflow.history-collapsed:has(#detailImageToolTab:checked) {
    grid-template-columns: minmax(400px, 460px) minmax(280px, 1fr);
  }
  .reverse-workflow-nav { display: none; }
  .reverse-library-grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
  .detail-image-workbench { grid-column: 1; }
  .detail-image-library { grid-column: 2; }
}

@media (max-width: 760px) {
  .reverse-workflow {
    inset: 0;
    z-index: 80;
    display: block;
    overflow: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .reverse-workbench { min-height: 100vh; }
  .reverse-workbench,
  .detail-image-workbench { border-radius: 0; }
  .reverse-history { display: none; }
  .reverse-library { min-height: 70vh; padding: 0 14px 24px; }
  .reverse-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-image-history { display: none; }
  .detail-image-workbench,
  .detail-image-library { min-height: 70vh; }
  .reverse-options { grid-template-columns: 1fr; }
}

/* Product experience v46: one visual language across library, detail and picker. */
.product-library-page {
  --product-accent: #32d3e8;
  --product-accent-soft: rgba(50, 211, 232, 0.12);
  --product-panel: #111315;
  --product-panel-raised: #15181a;
  --product-line: rgba(255, 255, 255, 0.085);
  background:
    radial-gradient(circle at 62% -18%, rgba(39, 198, 219, 0.07), transparent 34%),
    #08090a;
}

.product-library-header {
  display: block;
  min-height: 0;
  padding: 46px 0 25px;
  background: rgba(8, 9, 10, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.055);
}

.product-library-header > div,
.product-library-content {
  width: min(1240px, calc(100% - 64px));
  margin-right: auto;
  margin-left: auto;
}

.product-library-eyebrow {
  margin-bottom: 9px;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.product-library-header h1 {
  max-width: 720px;
  font-size: clamp(26px, 2.2vw, 38px);
  font-weight: 680;
  letter-spacing: -0.035em;
}

.product-library-header p {
  margin-top: 10px;
  color: rgba(232, 237, 240, 0.43);
  font-size: 12px;
}

.product-library-content {
  padding: 25px 0 72px;
}

.product-library-page.is-detail-view .product-library-content {
  width: min(1240px, calc(100% - 64px));
  padding-top: 26px;
  transform: none;
}

.product-library-view {
  transition: opacity 0.14s ease;
}

.product-library-view > * {
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.22, 0.72, 0.24, 1);
}

.product-library-view.is-leaving {
  opacity: 0;
}

.product-library-view.is-entering > *,
.product-library-view.is-entering-back > * {
  opacity: 0;
  transform: translateY(4px) scale(0.998);
}

.product-list-heading {
  min-height: 34px;
  margin-bottom: 15px;
}

.product-list-heading > div {
  gap: 9px;
}

.product-list-heading strong {
  font-size: 17px;
  font-weight: 660;
  letter-spacing: -0.02em;
}

.product-list-heading span {
  padding: 3px 7px;
  color: rgba(226, 234, 237, 0.42);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 999px;
  font-size: 10px;
}

.product-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 252px));
  gap: 16px;
}

.product-card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  color: #f5f7f8;
  text-align: left;
  background: #121416;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  isolation: isolate;
  transform: translateZ(0);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.product-card:hover {
  border-color: rgba(83, 222, 239, 0.46);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(50, 211, 232, 0.05);
  transform: translateZ(0);
}

.product-card:active {
  border-color: rgba(83, 222, 239, 0.58);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  transform: translateZ(0);
}

.product-card:focus-visible {
  border-color: rgba(83, 222, 239, 0.62);
  outline: 2px solid rgba(50, 211, 232, 0.22);
  outline-offset: 3px;
}

.product-card-cover {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  background: #171a1c;
}

.product-card-cover::after {
  z-index: 1;
  height: 68%;
  background: linear-gradient(to top, rgba(5, 7, 8, 0.98) 0%, rgba(5, 7, 8, 0.75) 34%, transparent 100%);
}

.product-card-cover img {
  transform: scale(1.001);
  transition: transform 0.45s cubic-bezier(0.22, 0.72, 0.24, 1), filter 0.3s ease;
}

.product-card:hover .product-card-cover img {
  filter: saturate(1.04) contrast(1.015);
  transform: scale(1.026);
}

.product-card-stats {
  top: 12px;
  right: 12px;
  bottom: auto;
  padding: 6px 8px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(7, 9, 10, 0.62);
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 9px;
  line-height: 1;
}

.product-card-body {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: block;
  min-height: 0;
  margin: 0;
  padding: 66px 15px 15px;
  background: transparent;
}

.product-card-info {
  gap: 5px;
}

.product-card-body strong {
  color: #f7f8f9;
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.product-card-body span {
  color: rgba(232, 237, 240, 0.46);
  font-size: 9px;
}

.product-card-tags {
  min-height: 21px;
  gap: 5px;
  margin-top: 4px;
}

.product-card-tags .product-tag-chip {
  min-height: 20px;
  max-width: 86px;
  padding: 2px 7px;
  background: rgba(8, 11, 12, 0.55);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-size: 9px;
}

.product-card-tags em,
.product-card-tags i {
  color: rgba(236, 241, 243, 0.42);
}

.product-create-card {
  aspect-ratio: 4 / 5;
  min-height: 0;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 38%, rgba(50, 211, 232, 0.07), transparent 34%),
    rgba(255, 255, 255, 0.015);
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  flex-direction: column;
  transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.product-create-card:hover,
.product-create-card:focus-visible,
.product-create-card:active {
  color: #b6f3f8;
  background: rgba(50, 211, 232, 0.035);
  border-color: rgba(50, 211, 232, 0.42);
  transform: none;
}

.product-create-card-icon {
  width: 42px;
  height: 42px;
  color: #b8f4f9;
  background: rgba(50, 211, 232, 0.1);
  border: 1px solid rgba(50, 211, 232, 0.22);
  border-radius: 14px;
  box-shadow: none;
  font-size: 23px;
}

.product-create-card-copy {
  display: grid;
  gap: 5px;
  text-align: center;
}

.product-create-card-copy strong {
  color: rgba(244, 247, 248, 0.8);
  font-size: 13px;
}

.product-create-card-copy small {
  color: rgba(229, 235, 238, 0.34);
  font-size: 9px;
}

.product-library-content:has(.product-library-empty) .product-library-view {
  transform: none;
}

.product-detail-view {
  max-width: 1120px;
}

.product-detail-back {
  display: inline-flex;
  width: auto;
  max-width: none;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  margin: 18px 0 18px 40px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11px;
}

.product-detail-back:hover,
.product-detail-back:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.product-detail-back span:first-child {
  color: #6fdee9;
  font-size: 14px;
}

.product-detail-shell {
  max-width: 1040px;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: stretch;
  gap: 22px;
}

.product-detail-gallery {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.product-detail-main {
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.product-detail-main img {
  display: block;
  object-fit: cover;
}

.product-detail-thumbnails {
  gap: 7px;
  margin-top: 10px;
}

.product-detail-thumbnails button {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  transition: border-color 0.18s ease, opacity 0.18s ease;
}

.product-detail-thumbnails button:not(.active) {
  opacity: 0.62;
}

.product-detail-thumbnails button:hover,
.product-detail-thumbnails button.active {
  opacity: 1;
}

.product-detail-copy {
  aspect-ratio: auto;
  min-height: 100%;
  padding: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(50, 211, 232, 0.065), transparent 35%),
    #111315;
  border-color: rgba(255, 255, 255, 0.085);
  border-radius: 20px;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.2);
}

.product-detail-kicker {
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.product-detail-copy h2 {
  font-size: clamp(28px, 2.3vw, 38px);
  font-weight: 680;
  letter-spacing: -0.04em;
}

.product-detail-meta {
  margin-top: 11px;
  font-size: 11px;
}

.product-detail-tags {
  gap: 13px;
  margin: 24px 0;
  padding: 18px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0;
}

.product-detail-tags.attention,
.product-tag-editor.attention {
  animation: product-tags-attention 1.7s ease;
}

@keyframes product-tags-attention {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.075);
  }
  35% {
    border-color: rgba(77, 213, 230, 0.5);
    background: rgba(49, 207, 230, 0.035);
    box-shadow: 0 0 0 4px rgba(49, 207, 230, 0.06);
  }
}

.product-detail-tags-head strong {
  font-size: 12px;
}

.product-detail-actions {
  margin-top: auto;
}

.product-detail-actions button {
  min-height: 42px;
  border-radius: 10px;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.product-creation-archive {
  max-width: 1040px;
  margin-top: 46px;
  padding-top: 34px;
}

.product-creation-grid {
  grid-template-columns: repeat(auto-fill, minmax(214px, 246px));
  gap: 18px;
}

.product-creation-cover {
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.product-creation-cover:hover,
.product-creation-cover:focus-visible {
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.26);
}

.product-creation-cover:hover img {
  transform: scale(1.025);
}

/* Create and edit product without the old stepper/timeline feel. */
.product-editor-backdrop,
.tool-product-picker-backdrop {
  background: rgba(2, 3, 4, 0.78);
  backdrop-filter: blur(14px);
  animation: product-backdrop-in 0.18s ease both;
}

.product-editor-dialog,
.tool-product-picker-dialog {
  color: #f4f6f7;
  background:
    radial-gradient(circle at 86% -15%, rgba(50, 211, 232, 0.07), transparent 34%),
    #121416;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow: 0 38px 110px rgba(0, 0, 0, 0.68);
  animation: product-dialog-in 0.22s cubic-bezier(0.22, 0.72, 0.24, 1) both;
}

.product-editor-dialog {
  width: min(760px, calc(100vw - 40px));
  max-height: min(820px, calc(100dvh - 40px));
}

.product-editor-header,
.tool-product-picker-dialog > header {
  min-height: 70px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.product-editor-header h2,
.tool-product-picker-dialog > header h2 {
  font-size: 18px;
  font-weight: 660;
  letter-spacing: -0.02em;
}

.product-editor-close,
.tool-product-picker-dialog > header > button {
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.product-editor-scroll {
  display: block;
  padding: 0 24px 12px;
}

.product-editor-step {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.product-editor-step:last-of-type {
  border-bottom: 0;
}

.product-step-heading {
  min-height: 24px;
  align-items: center;
  align-self: start;
  gap: 8px;
}

.product-step-heading > b {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  color: #8de8f2;
  background: rgba(50, 211, 232, 0.09);
  border: 1px solid rgba(50, 211, 232, 0.16);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 720;
}

.product-step-heading strong {
  color: rgba(245, 248, 249, 0.78);
  font-size: 12px;
  font-weight: 640;
}

.product-step-body,
.product-editor-step-note .product-step-body {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.product-image-stage {
  justify-items: start;
}

.product-main-upload {
  width: 136px;
  height: 136px;
  background: #1a1d1f;
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 14px;
}

.product-main-upload:not(.has-image)::after {
  display: none;
}

.product-main-upload:hover,
.product-main-upload:focus-visible {
  background: #1d2123;
  border-color: rgba(50, 211, 232, 0.62);
  box-shadow: 0 0 0 3px rgba(50, 211, 232, 0.055);
}

.product-main-upload.has-image > img {
  border-radius: inherit;
}

.product-main-label {
  top: 9px;
  left: 9px;
  padding: 5px 8px;
  color: #baf4f8;
  background: rgba(5, 12, 13, 0.66);
  border: 1px solid rgba(94, 228, 241, 0.24);
  border-radius: 999px;
  font-size: 8px;
}

.product-angle-block {
  margin-top: 16px;
}

.product-angle-grid {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 9px;
}

.product-angle-card,
.product-angle-add {
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 12px;
}

.product-angle-add:hover,
.product-angle-add:focus-visible {
  color: #a5eef5;
  background: rgba(50, 211, 232, 0.035);
  border-color: rgba(50, 211, 232, 0.48);
  outline: none;
}

.product-editor-field input,
.product-editor-field textarea,
.product-tag-editor {
  background: #191c1e;
  border-color: rgba(255, 255, 255, 0.085);
  border-radius: 11px;
}

.product-editor-field input {
  height: 46px;
  padding: 0 14px;
}

.product-tag-editor {
  min-height: 104px;
  padding: 13px;
}

.product-editor-message {
  margin: 10px 0 0 154px;
  border-radius: 10px;
}

.product-editor-footer {
  min-height: 72px;
  justify-content: flex-end;
  padding: 14px 24px;
  border-top-color: rgba(255, 255, 255, 0.065);
}

.product-editor-footer > div {
  margin-left: 0;
}

.product-editor-footer button {
  height: 42px;
  border-radius: 10px;
}

.product-editor-footer .primary {
  min-width: 150px;
  background: linear-gradient(105deg, #36cce4, #32dfbd);
  box-shadow: 0 12px 28px rgba(42, 218, 194, 0.1);
}

/* Product picker: the same asset-card behavior in a focused selection flow. */
.tool-product-picker-dialog {
  width: min(760px, calc(100vw - 40px));
  max-height: min(780px, calc(100dvh - 40px));
}

.tool-product-picker-view {
  padding: 22px 24px 26px;
}

.tool-product-picker-intro {
  margin-bottom: 14px;
}

.tool-product-picker-intro strong {
  color: rgba(247, 249, 250, 0.82);
  font-size: 12px;
  font-weight: 640;
}

.tool-product-picker-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tool-product-picker-card {
  aspect-ratio: 4 / 5;
  background: #171a1c;
  border-color: rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-product-picker-card:hover,
.tool-product-picker-card:focus-visible {
  background: #171a1c;
  border-color: rgba(50, 211, 232, 0.48);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  outline: none;
}

.tool-product-picker-cover {
  height: 100%;
  aspect-ratio: auto;
}

.tool-product-picker-card > span.tool-product-picker-cover {
  display: block;
  padding: 0;
}

.tool-product-picker-cover::after {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(to top, rgba(5, 7, 8, 0.97), transparent);
  content: "";
}

.tool-product-picker-cover img {
  display: block;
  transition: transform 0.4s cubic-bezier(0.22, 0.72, 0.24, 1);
}

.tool-product-picker-card:hover img {
  transform: scale(1.025);
}

.tool-product-picker-cover i {
  z-index: 3;
  top: 9px;
  right: 9px;
  bottom: auto;
  padding: 5px 7px;
  background: rgba(7, 9, 10, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.tool-product-picker-card-copy {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: grid;
  min-width: 0;
  padding: 48px 12px 12px;
}

.tool-product-picker-card-copy strong,
.tool-product-picker-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-product-picker-card-copy strong {
  color: #f5f7f8;
  font-size: 12px;
  font-weight: 650;
}

.tool-product-picker-card-copy small {
  margin-top: 3px;
  color: rgba(235, 240, 242, 0.4);
  font-size: 8px;
}

.tool-product-picker-product-head {
  margin-bottom: 18px;
}

.tool-product-picker-product-head > button {
  width: 34px;
  min-height: 34px;
  color: #89e6ef;
  background: rgba(50, 211, 232, 0.07);
  border: 1px solid rgba(50, 211, 232, 0.13);
  border-radius: 9px;
}

.tool-product-picker-images {
  gap: 12px;
}

.tool-product-picker-images > button {
  border-radius: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.tool-product-picker-images > button:not(.active) {
  opacity: 0.76;
}

.tool-product-picker-images > button:hover,
.tool-product-picker-images > button.active {
  opacity: 1;
  border-color: rgba(50, 211, 232, 0.82);
  box-shadow: inset 0 0 0 1px rgba(50, 211, 232, 0.28), 0 12px 28px rgba(0, 0, 0, 0.2);
}

.tool-product-picker-dialog > footer {
  min-height: 72px;
  padding: 12px 24px;
  border-top-color: rgba(255, 255, 255, 0.065);
}

.tool-product-picker-dialog > footer button {
  min-width: 150px;
  height: 42px;
  border-radius: 10px;
}

@keyframes product-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes product-dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .product-library-header > div,
  .product-library-content,
  .product-library-page.is-detail-view .product-library-content {
    width: min(100% - 40px, 760px);
  }

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

  .product-detail-back {
    margin: 12px 0 16px;
  }

  .product-detail-shell {
    grid-template-columns: 1fr;
    max-width: 620px;
  }

  .product-detail-copy {
    min-height: 420px;
  }

  .product-editor-step {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 18px;
  }

  .tool-product-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .product-library-header {
    padding: 30px 0 19px;
  }

  .product-library-header > div,
  .product-library-content,
  .product-library-page.is-detail-view .product-library-content {
    width: calc(100% - 28px);
  }

  .product-library-header h1 {
    font-size: 25px;
  }

  .product-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .product-card {
    display: block;
    aspect-ratio: 4 / 5;
  }

  .product-card-cover {
    position: absolute;
    aspect-ratio: auto;
  }

  .product-card-body {
    min-height: 0;
    padding: 54px 12px 12px;
  }

  .product-card-body strong {
    font-size: 14px;
  }

  .product-card-tags .product-tag-chip:nth-child(n + 2) {
    display: none;
  }

  .product-create-card {
    aspect-ratio: 4 / 5;
    min-height: 0;
  }

  .product-detail-view,
  .product-detail-shell,
  .product-detail-gallery {
    width: 100%;
    max-width: none;
  }

  .product-detail-copy {
    min-height: 380px;
    padding: 22px;
  }

  .product-editor-dialog,
  .tool-product-picker-dialog {
    border-radius: 0;
    animation: none;
  }

  .product-editor-header,
  .tool-product-picker-dialog > header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .product-editor-scroll {
    padding: 0 16px 12px;
  }

  .product-editor-step {
    display: block;
    padding: 20px 0;
  }

  .product-step-heading {
    margin-bottom: 13px;
  }

  .product-main-upload {
    width: 124px;
    height: 124px;
  }

  .product-editor-message {
    margin-left: 0;
  }

  .product-editor-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .tool-product-picker-view {
    padding: 18px 16px 24px;
  }

  .tool-product-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-product-picker-dialog > footer {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-editor-backdrop,
  .tool-product-picker-backdrop,
  .product-editor-dialog,
  .tool-product-picker-dialog {
    animation: none !important;
  }
}

/* Product editor v49: one clean, bottom-aligned image rail. */
.product-editor-step.product-image-editor {
  grid-template-columns: 108px minmax(0, 1fr);
  column-gap: 24px;
  padding-top: 24px;
  padding-bottom: 26px;
}

.product-image-editor .product-step-heading {
  align-self: start;
  margin: 3px 0 0;
}

.product-image-editor .product-image-stage {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  width: 100%;
  min-width: 0;
}

.product-image-editor .product-main-upload {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
}

.product-image-editor .product-main-remove {
  top: 8px;
  left: 85px;
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.product-image-editor .product-angle-block {
  flex: 0 1 342px;
  width: min(342px, calc(100% - 142px));
  min-width: 0;
  margin: 0;
}

.product-image-editor .product-angle-heading {
  min-height: 20px;
  margin: 0 0 10px;
}

.product-image-editor .product-angle-heading strong {
  font-size: 10px;
  line-height: 20px;
}

.product-image-editor .product-angle-heading span {
  font-size: 8px;
  line-height: 20px;
}

.product-image-editor .product-angle-grid {
  grid-template-columns: repeat(4, 78px);
  grid-auto-rows: 78px;
  gap: 10px;
  justify-content: start;
}

.product-image-editor .product-angle-card,
.product-image-editor .product-angle-add {
  width: 78px;
  height: 78px;
  aspect-ratio: auto;
}

@media (max-width: 640px) {
  .product-editor-step.product-image-editor {
    grid-template-columns: 88px minmax(0, 1fr);
    column-gap: 14px;
  }

  .product-image-editor .product-image-stage {
    gap: 14px;
  }

  .product-image-editor .product-main-upload {
    flex-basis: 104px;
    width: 104px;
    height: 104px;
  }

  .product-image-editor .product-main-remove {
    left: 71px;
  }

  .product-image-editor .product-angle-block {
    flex-basis: 254px;
    width: min(254px, calc(100% - 118px));
  }

  .product-image-editor .product-angle-grid {
    grid-template-columns: repeat(3, 78px);
  }
}

@media (max-width: 430px) {
  .product-editor-step.product-image-editor {
    display: block;
  }

  .product-image-editor .product-step-heading {
    margin-bottom: 12px;
  }

  .product-image-editor .product-image-stage {
    align-items: flex-end;
  }
}

/* Product editor v50: one shared left edge for every editable field. */
.product-editor-step:not(.product-image-editor) {
  grid-template-columns: 108px minmax(0, 1fr);
  column-gap: 24px;
}

@media (max-width: 640px) {
  .product-editor-step:not(.product-image-editor) {
    grid-template-columns: 88px minmax(0, 1fr);
    column-gap: 14px;
  }
}

@media (max-width: 430px) {
  .product-editor-step:not(.product-image-editor) {
    display: block;
  }

  .product-editor-step:not(.product-image-editor) .product-step-heading {
    margin-bottom: 12px;
  }
}

/* Product card v51: neutral edge, no cyan selection ring. */
.product-card,
.product-card:hover,
.product-card:active {
  border-color: rgba(255, 255, 255, 0.09);
}

.product-card:hover {
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
}

.product-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.16);
  outline: 1px solid rgba(255, 255, 255, 0.18);
  outline-offset: 3px;
}

/* Product empty state v52: one quiet, unmistakable action. */
.product-library-content:has(.product-library-empty) .product-library-view {
  transform: translateY(-28px);
}

.product-library-empty {
  min-height: min(560px, calc(100dvh - 250px));
  padding: 0;
}

.product-library-empty .product-library-empty-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 136px;
  height: 46px;
  padding: 0 19px;
  color: #a9edf4;
  background: rgba(50, 211, 232, 0.075);
  border: 1px solid rgba(69, 219, 236, 0.26);
  border-radius: 12px;
  box-shadow: none;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.product-library-empty .product-library-empty-action span {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.product-library-empty .product-library-empty-action strong {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.product-library-empty .product-library-empty-action:hover,
.product-library-empty .product-library-empty-action:focus-visible {
  color: #d8fbff;
  background: rgba(50, 211, 232, 0.12);
  border-color: rgba(89, 229, 244, 0.45);
  outline: none;
  transform: translateY(-1px);
}

.product-library-empty .product-library-empty-action:active {
  transform: translateY(0);
}

/* Product empty state v53: make creation a header action, not a floating empty-state ornament. */
.product-library-header-create {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 116px;
  height: 42px;
  padding: 0 17px;
  color: #0b0d0e;
  background: #eef2f3;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  font-size: 12px;
  font-weight: 680;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.product-library-header-create span {
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.product-library-page:has(.product-library-empty) .product-library-header-create {
  display: inline-flex;
}

.product-library-header-create:hover,
.product-library-header-create:focus-visible {
  background: #ffffff;
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.28);
  outline: none;
  transform: translateY(-1px);
}

.product-library-header-create:active {
  transform: translateY(0);
}

.product-library-content:has(.product-library-empty) {
  display: block;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.product-library-content:has(.product-library-empty) .product-library-view {
  display: block;
  width: 100%;
  height: auto;
  transform: none;
}

.product-library-content:has(.product-library-empty) .product-library-empty {
  display: none;
}

@media (max-width: 900px) {
  .product-library-page:has(.product-library-empty) .product-library-header-create {
    align-self: flex-start;
  }
}

/* Product empty state v54: CTA belongs to the title block. */
.product-library-header-create {
  min-width: 104px;
  height: 38px;
  margin-top: 18px;
  padding: 0 15px;
  color: rgba(247, 249, 250, 0.86);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  box-shadow: none;
  font-size: 11px;
  font-weight: 650;
}

.product-library-header-create:hover,
.product-library-header-create:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

/* Product empty state v55: reference-matched create button. */
.product-library-header-create {
  gap: 11px;
  width: 134px;
  min-width: 134px;
  height: 44px;
  padding: 0 18px;
  color: #ffffff;
  background: #4b8ded;
  border: 0;
  border-radius: 9px;
  box-shadow: 0 8px 18px rgba(40, 104, 205, 0.3);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.product-library-header-create svg {
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-library-header-create:hover,
.product-library-header-create:focus-visible {
  color: #ffffff;
  background: #5697f1;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(40, 104, 205, 0.34);
}

.product-library-header-create:active {
  background: #4384e2;
  box-shadow: 0 5px 12px rgba(40, 104, 205, 0.26);
}

/* Product editor v56: compact single-column asset editor. */
.product-editor-dialog {
  width: min(650px, calc(100vw - 40px));
  max-height: min(740px, calc(100dvh - 40px));
  background:
    radial-gradient(circle at 86% -18%, rgba(75, 141, 237, 0.08), transparent 34%),
    #111315;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 36px 96px rgba(0, 0, 0, 0.68);
}

.product-editor-header {
  min-height: 60px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.012);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

.product-editor-header h2 {
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.product-editor-close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.product-editor-scroll {
  display: block;
  padding: 6px 24px 12px;
}

.product-editor-step,
.product-editor-step.product-image-editor,
.product-editor-step:not(.product-image-editor) {
  display: block;
  padding: 18px 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.product-editor-step:last-of-type {
  border-bottom: 0;
}

.product-editor-step .product-step-heading,
.product-image-editor .product-step-heading,
.product-editor-step:not(.product-image-editor) .product-step-heading {
  min-height: 0;
  margin: 0 0 11px;
}

.product-editor-step .product-step-heading strong {
  color: rgba(244, 247, 248, 0.72);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.product-image-editor .product-image-stage {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.product-image-editor .product-main-upload {
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  background: #181b1d;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
}

.product-image-editor .product-main-upload:not(.has-image) {
  border-style: dashed;
}

.product-main-remove[hidden] {
  display: none !important;
}

.product-image-editor .product-main-remove {
  top: 8px;
  left: 78px;
  width: 25px;
  height: 25px;
}

.product-image-editor .product-angle-block {
  flex: 0 1 342px;
  width: min(342px, calc(100% - 130px));
}

.product-editor-field input {
  height: 42px;
  padding: 0 13px;
  color: rgba(249, 250, 251, 0.9);
  background: #171a1c;
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  font-size: 12px;
}

.product-editor-field input:focus {
  border-color: rgba(75, 141, 237, 0.62);
  box-shadow: 0 0 0 3px rgba(75, 141, 237, 0.07);
}

.product-tag-editor {
  min-height: 82px;
  gap: 8px;
  padding: 11px 13px;
  background: #171a1c;
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 11px;
}

.product-tag-editor-list:empty {
  display: none;
}

.product-tag-editor-input {
  min-height: 32px;
  margin-top: auto;
}

.product-tag-editor:focus-within {
  border-color: rgba(75, 141, 237, 0.62);
  box-shadow: 0 0 0 3px rgba(75, 141, 237, 0.07);
}

.product-tag-editor-meta {
  margin-top: 5px;
}

.product-editor-footer {
  min-height: 64px;
  padding: 11px 22px;
  background: rgba(255, 255, 255, 0.01);
  border-top-color: rgba(255, 255, 255, 0.07);
}

.product-editor-footer button {
  height: 40px;
  border-radius: 9px;
  font-size: 11px;
}

.product-editor-footer .primary {
  min-width: 132px;
  box-shadow: 0 10px 22px rgba(42, 218, 194, 0.1);
}

.product-editor-message {
  margin: 8px 0 0;
}

@media (max-width: 720px) {
  .product-editor-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .product-editor-scroll {
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* Product editor v57: proportionally larger without changing the layout. */
@media (min-width: 721px) {
  .product-editor-dialog {
    width: min(690px, calc(100vw - 40px));
    max-height: min(780px, calc(100dvh - 40px));
  }

  .product-editor-header {
    min-height: 64px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .product-editor-header h2 {
    font-size: 19px;
  }

  .product-editor-close {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .product-editor-scroll {
    padding-right: 26px;
    padding-left: 26px;
  }

  .product-editor-step,
  .product-editor-step.product-image-editor,
  .product-editor-step:not(.product-image-editor) {
    padding-top: 20px;
    padding-bottom: 22px;
  }

  .product-editor-step .product-step-heading {
    margin-bottom: 12px;
  }

  .product-editor-step .product-step-heading strong {
    font-size: 12px;
  }

  .product-image-editor .product-main-upload {
    flex-basis: 120px;
    width: 120px;
    height: 120px;
  }

  .product-image-editor .product-main-remove {
    left: 85px;
    width: 26px;
    height: 26px;
  }

  .product-image-editor .product-angle-block {
    width: min(352px, calc(100% - 140px));
  }

  .product-editor-field input {
    height: 46px;
    padding-right: 15px;
    padding-left: 15px;
    font-size: 13px;
  }

  .product-tag-editor {
    min-height: 90px;
    padding: 13px 15px;
  }

  .product-tag-editor-input input {
    font-size: 12px;
  }

  .product-editor-footer {
    min-height: 68px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .product-editor-footer button {
    height: 42px;
    font-size: 12px;
  }

  .product-editor-footer .primary {
    min-width: 140px;
  }
}

/* Product create button v58: layered finish, quieter icon and type. */
.product-library-header-create {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  gap: 10px;
  width: 134px;
  min-width: 134px;
  height: 44px;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(180deg, #5a98f1 0%, #4a88e9 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.19),
    inset 0 -1px 0 rgba(27, 73, 145, 0.16),
    0 9px 22px rgba(30, 91, 184, 0.28),
    0 2px 5px rgba(0, 0, 0, 0.22);
  font-size: 12px;
  font-weight: 660;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 1px rgba(19, 61, 126, 0.24);
}

.product-library-header-create::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 52%);
  content: "";
  pointer-events: none;
}

.product-library-header-create svg {
  flex-basis: 18px;
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
  filter: drop-shadow(0 1px 1px rgba(20, 59, 119, 0.2));
}

.product-library-header-create:hover,
.product-library-header-create:focus-visible {
  color: #ffffff;
  background: linear-gradient(180deg, #64a0f4 0%, #5190ed 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(27, 73, 145, 0.14),
    0 11px 26px rgba(30, 91, 184, 0.32),
    0 2px 5px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.product-library-header-create:active {
  background: linear-gradient(180deg, #4784e1 0%, #417ddb 100%);
  box-shadow:
    inset 0 1px 2px rgba(23, 66, 134, 0.22),
    0 4px 10px rgba(30, 91, 184, 0.22);
  transform: translateY(0);
}

/* Product detail v60: visually center against the full viewport, including the rail. */
@media (min-width: 1281px) {
  .product-library-page.is-detail-view .product-library-content {
    transform: translateX(-82px);
  }
}

@media (min-width: 721px) and (max-width: 1280px) {
  .product-library-page.is-detail-view .product-library-content {
    transform: translateX(-46px);
  }
}

@media (max-width: 720px) {
  .product-library-page.is-detail-view .product-library-content {
    transform: none;
  }
}
/* Workflow coming-soon notice */
body.workflow-notice-open {
  overflow: hidden;
}

.workflow-notice {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.workflow-notice.is-open {
  opacity: 1;
  visibility: visible;
}

.workflow-notice-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(17, 17, 20, .68);
  backdrop-filter: blur(8px);
  cursor: default;
}

.workflow-notice-dialog {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  padding: 28px 28px 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  text-align: center;
  transform: translateY(12px) scale(.97);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.workflow-notice.is-open .workflow-notice-dialog {
  transform: translateY(0) scale(1);
}

.workflow-notice-close {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #707078;
  background: rgba(255, 255, 255, .78);
  cursor: pointer;
}

.workflow-notice-close:hover {
  color: #17171a;
  background: #fff;
}

.workflow-notice-close svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.workflow-bird-loader {
  position: relative;
  width: min(18rem, 72vw);
  aspect-ratio: 1;
  margin: 0 auto 22px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(to bottom, #6ccee7 60%, #fff);
}

.workflow-bird {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 17%;
  height: auto;
  stroke: none;
  stroke-width: 0;
  shape-rendering: crispEdges;
  image-rendering: pixelated;
  animation: workflow-bird-flap 500ms linear infinite;
}

.workflow-scene {
  position: absolute;
  left: 0;
  display: flex;
  width: max-content;
}

.workflow-scene-top {
  top: 0;
  animation: workflow-obstacle-flow 5s linear infinite;
}

.workflow-scene-bottom {
  bottom: 0;
  transform: rotateX(180deg);
  animation: workflow-obstacle-flow-bottom 5s linear infinite;
}

.workflow-obstacle-row {
  position: relative;
  display: flex;
  width: 32rem;
  height: 6rem;
}

.workflow-obstacle-row i {
  position: relative;
  width: 2rem;
  height: 6rem;
  margin-right: 6rem;
  border: 3px solid #111;
  background: linear-gradient(to right, #9de558 0 3px, #e7ff8d 3px 5px, #9de858 5px 10px, #74c029 10px 13px, #9de558 13px 15px, #74c029 22px 28px, #59811a 28px);
}

.workflow-obstacle-row i:nth-child(2) { transform: translateY(15%); }
.workflow-obstacle-row i:nth-child(3) { transform: translateY(18%); }
.workflow-obstacle-row i:nth-child(4) { transform: translateY(15%); }

.workflow-obstacle-row i::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 135%;
  height: 1.25rem;
  border: 3px solid #111;
  transform: translateX(-50%);
  background: inherit;
}

.workflow-notice-copy > span {
  color: #7775ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

.workflow-notice-copy h2 {
  margin: 8px 0 8px;
  color: #17171a;
  font-size: 23px;
  line-height: 1.3;
}

.workflow-notice-copy p {
  margin: 0;
  color: #777780;
  font-size: 14px;
  line-height: 1.7;
}

.workflow-notice-confirm {
  width: 100%;
  height: 46px;
  margin-top: 20px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #17171a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.workflow-notice-confirm:hover {
  background: #2d2d32;
  transform: translateY(-1px);
}

@keyframes workflow-bird-flap {
  from { transform: translate(-80%, -50%); }
  25% { transform: translate(-80%, -50%) rotate(-15deg); }
  50% { transform: translate(-80%, -12%) rotate(5deg); }
  to { transform: translate(-80%, -50%); }
}

@keyframes workflow-obstacle-flow {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes workflow-obstacle-flow-bottom {
  from { transform: translateX(0) rotateX(180deg); }
  to { transform: translateX(-50%) rotateX(180deg); }
}

@media (max-width: 520px) {
  .workflow-notice-dialog { padding: 24px 20px 20px; border-radius: 24px; }
  .workflow-bird-loader { width: min(15rem, 70vw); margin-bottom: 18px; }
  .workflow-notice-copy h2 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-bird,
  .workflow-scene {
    animation-play-state: paused;
  }
}

.private-release-viewer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.private-release-viewer.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.private-release-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 6, .76);
  backdrop-filter: blur(14px);
}

.private-release-viewer__panel {
  position: relative;
  width: min(620px, calc(100vw - 40px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  padding: 38px;
  border: 1px solid rgba(130, 153, 157, .22);
  border-radius: 26px;
  color: #f5f7f7;
  background:
    radial-gradient(circle at 86% 8%, rgba(49, 202, 214, .11), transparent 32%),
    linear-gradient(145deg, #151a1c 0%, #0d1113 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .035);
  transform: translateY(10px) scale(.985);
  transition: transform 180ms ease;
}

.private-release-viewer.is-visible .private-release-viewer__panel {
  transform: translateY(0) scale(1);
}

.private-release-viewer__close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0 0 3px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  color: #9ca7a9;
  background: rgba(255, 255, 255, .045);
  font: 300 25px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.private-release-viewer__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, .09);
}

.private-release-viewer__eyebrow {
  color: #3ad0dc;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .2em;
}

.private-release-viewer__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
}

.private-release-viewer__heading h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1;
  letter-spacing: -.04em;
}

.private-release-viewer__heading p {
  margin: 12px 0 0;
  color: #c8cfd0;
  font-size: 17px;
  font-weight: 600;
}

.private-release-viewer__date {
  flex: 0 0 auto;
  padding-bottom: 2px;
  color: #707b7e;
  font-size: 13px;
}

.private-release-viewer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.private-release-viewer__meta span {
  padding: 7px 10px;
  border: 1px solid rgba(107, 132, 136, .18);
  border-radius: 999px;
  color: #8b999b;
  background: rgba(255, 255, 255, .025);
  font-size: 12px;
}

.private-release-viewer__summary {
  margin: 28px 0 20px;
  color: #9aa5a7;
  font-size: 14px;
  line-height: 1.75;
}

.private-release-viewer__changes {
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.private-release-viewer__change {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.private-release-viewer__change > span {
  color: #3bcbd6;
  font: 650 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
}

.private-release-viewer__change p {
  margin: 0;
  color: #d0d6d7;
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 620px) {
  .private-release-viewer {
    padding: 18px;
  }

  .private-release-viewer__panel {
    width: 100%;
    padding: 30px 24px 24px;
    border-radius: 22px;
  }

  .private-release-viewer__heading {
    display: block;
  }

  .private-release-viewer__date {
    display: block;
    margin-top: 12px;
  }
}
