﻿:root {
  --page: #f6f4ee;
  --paper-2: #edf3ef;
  --ink: #151512;
  --muted: #746f65;
  --green: #0f6b58;
  --green-deep: #10251f;
  --green-soft: #dceee6;
  --amber: #d38a22;
  --line: rgba(255, 255, 255, 0.72);
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 48px rgba(42, 40, 32, 0.1), 0 2px 8px rgba(42, 40, 32, 0.05);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink);
  font-family: "Avenir Next", "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(15, 107, 88, 0.28);
  outline-offset: 3px;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 18px;
  isolation: isolate;
  background:
    radial-gradient(circle at 8% 6%, rgba(15, 107, 88, 0.18), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(211, 138, 34, 0.18), transparent 26%),
    linear-gradient(135deg, #fbfaf6 0%, #eef6f0 52%, #f7efe2 100%);
}

.orb {
  position: fixed;
  z-index: -1;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.62;
  animation: drift 12s var(--ease) infinite alternate;
}

.orb-a {
  top: 80px;
  left: -90px;
  background: radial-gradient(circle, rgba(15, 107, 88, 0.3), transparent 68%);
}

.orb-b {
  right: -120px;
  top: 120px;
  background: radial-gradient(circle, rgba(211, 138, 34, 0.28), transparent 70%);
  animation-delay: -4s;
}

.orb-c {
  left: 42%;
  bottom: -170px;
  background: radial-gradient(circle, rgba(101, 164, 132, 0.24), transparent 70%);
  animation-delay: -8s;
}

.glass-panel {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1480px;
  margin: 0 auto 12px;
  padding: 10px;
  border-radius: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 28px rgba(15, 107, 88, 0.18);
}

.brand-mark img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.brand strong,
.brand em {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.nav-pills {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.nav-pill,
.key-button,
.ghost-action,
.primary-action,
.icon-button {
  border: 0;
}

.nav-pill {
  min-width: 72px;
  padding: 9px 15px;
  border-radius: 999px;
  color: #5f5a55;
  background: transparent;
  transition: 0.25s var(--ease);
}

.nav-pill.active,
.nav-pill:hover {
  color: #111;
  background: #fff;
  box-shadow: 0 8px 18px rgba(42, 40, 32, 0.1);
}

.key-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.72);
}

.key-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fb923c;
  box-shadow: 0 0 0 5px rgba(251, 146, 60, 0.16);
}

.key-dot.connected {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.16);
}

.workspace {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

.announcement-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 24px;
  color: #171717;
  text-align: left;
}

.announcement-bar span,
.announcement-bar em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.announcement-bar strong {
  overflow: hidden;
  padding: 0 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  min-height: 218px;
  overflow: hidden;
  padding: 14px;
  border-radius: 30px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 76% 30%, rgba(15, 107, 88, 0.14), transparent 34%),
    radial-gradient(circle at 92% 16%, rgba(211, 138, 34, 0.14), transparent 28%);
}

.slide-frame {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  width: 100%;
  height: clamp(218px, 20vw, 286px);
  min-height: 218px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  opacity: 1;
}

.hero-loading {
  display: block;
}

.hero-skeleton {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: 620px;
}

.hero-skeleton span,
.hero-skeleton strong,
.hero-skeleton p,
.hero-skeleton em {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.35));
  background-size: 220% 100%;
  animation: skeletonShine 1.4s ease-in-out infinite;
}

.hero-skeleton span {
  width: 180px;
  height: 16px;
}

.hero-skeleton strong {
  width: min(560px, 82vw);
  height: 46px;
}

.hero-skeleton p {
  width: min(520px, 76vw);
  height: 24px;
}

.hero-skeleton em {
  width: 210px;
  height: 42px;
}

@keyframes skeletonShine {
  from {
    background-position: 120% 0;
  }

  to {
    background-position: -120% 0;
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.eyebrow,
.section-heading span,
.canvas-header span {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 12px 0 18px;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-desc {
  max-width: 560px;
  margin: 0;
  color: #5f5a55;
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions,
.key-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.ghost-action {
  min-height: 44px;
  padding: 0 19px;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.primary-action {
  color: #fff;
  background: linear-gradient(135deg, var(--green-deep), var(--green));
  box-shadow: 0 14px 30px rgba(15, 107, 88, 0.24);
}

.ghost-action {
  color: #222;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.ghost-action.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.primary-action:hover,
.ghost-action:hover,
.key-button:hover,
.generate-button:hover {
  transform: translateY(-2px);
}

.hero-preview {
  position: relative;
  min-height: 310px;
}

.phone-card {
  position: absolute;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(22px) saturate(160%);
}

.phone-card span,
.phone-card p {
  color: var(--muted);
}

.phone-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 24px;
  letter-spacing: -0.05em;
}

.phone-card p {
  margin: 0;
  font-size: 13px;
}

.float-one {
  top: 20px;
  left: 34px;
  width: 220px;
  animation: float 5s var(--ease) infinite alternate;
}

.float-two {
  right: 34px;
  top: 72px;
  width: 280px;
  animation: float 6s var(--ease) infinite alternate-reverse;
}

.float-three {
  bottom: 14px;
  left: 120px;
  width: 160px;
  text-align: center;
  animation: float 4.5s var(--ease) infinite alternate;
}

.metric-card b {
  display: block;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.08em;
}

.fake-image {
  height: 170px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9), transparent 12%),
    linear-gradient(135deg, #111827, #1d4ed8 48%, #fb923c);
}

.studio-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.composer,
.canvas-panel {
  border-radius: var(--radius-xl);
}

.composer {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 18px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 0% 0%, rgba(15, 107, 88, 0.1), transparent 36%);
}

.section-heading strong,
.canvas-header strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: -0.06em;
}

textarea {
  width: 100%;
  min-height: 188px;
  margin-top: 14px;
  padding: 15px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  outline: none;
  color: #171717;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  transition: 0.25s var(--ease);
}

#promptInput {
  min-height: 202px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(15, 107, 88, 0.045) 30px 31px);
}

.starter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.starter-strip button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: #0f6b58;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(15, 107, 88, 0.12);
  font-size: 12px;
  font-weight: 850;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.starter-strip button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
}

textarea:focus,
select:focus,
input:focus {
  border-color: rgba(15, 107, 88, 0.42);
  box-shadow: 0 0 0 5px rgba(15, 107, 88, 0.09);
}

.prompt-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.prompt-tools button {
  border: 0;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #55504b;
  background: rgba(255, 255, 255, 0.72);
  transition: 0.2s var(--ease);
}

.prompt-tools button:hover {
  color: #111;
  background: #fff;
}

.soft-tool {
  color: #111 !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.66)),
    radial-gradient(circle at 15% 15%, rgba(15, 107, 88, 0.14), transparent 44%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.prompt-tools .soft-tool {
  color: var(--green) !important;
}

.image-assist-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid rgba(15, 107, 88, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at 12% 18%, rgba(15, 107, 88, 0.13), transparent 42%),
    radial-gradient(circle at 92% 90%, rgba(211, 138, 34, 0.13), transparent 44%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 12px 28px rgba(42, 40, 32, 0.07);
}

.image-assist-card span {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.image-assist-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.image-assist-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.image-assist-card button {
  min-height: 42px;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--green), #1f8b73);
  box-shadow: 0 12px 26px rgba(15, 107, 88, 0.18);
}

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

.preview-item {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.preview-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.preview-item span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  overflow: hidden;
  padding: 6px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.68);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(12px);
}

.preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: rgba(255, 255, 255, 0.86);
}

.multi-preview {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.managed-preview-item {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.72);
  padding: 0;
}

.managed-preview-item.active {
  box-shadow: 0 0 0 3px rgba(15, 107, 88, 0.22), inset 0 0 0 1px rgba(15, 107, 88, 0.5);
}

.managed-preview-item i {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: rgba(255, 255, 255, 0.9);
  font-style: normal;
  font-weight: 900;
}

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

.composer .control-grid label {
  border-radius: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.composer .control-grid label span {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.composer .control-grid select {
  margin-top: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

label span {
  display: block;
  margin: 0 0 8px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  outline: none;
  color: #171717;
  background: rgba(255, 255, 255, 0.78);
  padding: 0 14px;
}

.generate-button {
  position: relative;
  width: 100%;
  min-height: 54px;
  overflow: hidden;
  margin-top: 18px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green) 58%, var(--amber) 100%);
  box-shadow: 0 18px 36px rgba(15, 107, 88, 0.24);
}

.generate-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.button-shine {
  position: absolute;
  inset: -80% auto -80% -30%;
  width: 28%;
  transform: rotate(18deg);
  background: rgba(255, 255, 255, 0.32);
  filter: blur(8px);
  animation: shine 2.8s ease-in-out infinite;
}

.status-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.status-light {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.status-card p {
  margin: 0;
  color: #5f5a55;
  font-size: 13px;
  line-height: 1.55;
}

.canvas-panel {
  min-height: 620px;
  padding: 18px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at 100% 0%, rgba(211, 138, 34, 0.1), transparent 34%);
}

.canvas-view {
  animation: popIn 0.34s var(--ease) both;
}

.view-hidden {
  display: none !important;
}

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

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

.canvas-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.empty-state {
  display: grid;
  min-height: 500px;
  place-items: center;
  align-content: center;
  text-align: center;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 24%, rgba(220, 238, 230, 0.72), transparent 28%),
    rgba(255, 255, 255, 0.26);
}

.empty-icon {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 18px 40px rgba(15, 23, 42, 0.12);
}

.empty-icon span {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 24%, #fff, transparent 16%),
    linear-gradient(135deg, var(--green-deep), var(--green) 55%, var(--amber));
}

.empty-state h2 {
  margin: 24px 0 8px;
  font-size: 30px;
  letter-spacing: -0.06em;
}

.empty-state p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.template-view {
  min-height: 580px;
}

.template-header {
  align-items: flex-start;
}

.template-intro {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.template-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.template-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.template-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.template-search span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.template-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.template-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.template-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.template-category {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #4b5563;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.22s var(--ease), background 0.22s var(--ease), color 0.22s var(--ease);
}

.template-category:hover {
  transform: translateY(-1px);
  color: #111827;
  background: rgba(255, 255, 255, 0.86);
}

.template-category.active {
  color: #fff;
  background: linear-gradient(135deg, var(--green-deep), var(--green));
  box-shadow: 0 12px 24px rgba(15, 107, 88, 0.18);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.template-card {
  display: grid;
  gap: 10px;
  min-height: 218px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  color: inherit;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.46)),
    radial-gradient(circle at 12% 12%, rgba(15, 107, 88, 0.12), transparent 32%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease), border-color 0.24s var(--ease);
}

.template-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.template-thumb {
  display: grid;
  min-height: 104px;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.08em;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.76), transparent 15%),
    linear-gradient(135deg, var(--green-deep), var(--green) 58%, var(--amber));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 12px 28px rgba(15, 23, 42, 0.12);
}

.template-thumb.has-image {
  background: #f8fafc;
}

.template-thumb.has-image img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  transition: transform 0.32s var(--ease);
}

.template-card:hover .template-thumb.has-image img {
  transform: scale(1.04);
}

.template-body,
.template-meta,
.template-desc {
  display: block;
}

.template-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.template-meta em,
.template-meta small,
.template-image-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.template-meta em {
  color: var(--green);
  letter-spacing: 0.04em;
}

.template-meta small {
  padding: 0 9px;
  color: #111827;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.template-image-badge {
  padding: 0 9px;
  color: #7c2d12;
  background: rgba(255, 237, 213, 0.82);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.28);
}

.template-field-badge {
  padding: 0 9px;
  color: #075985;
  background: rgba(224, 242, 254, 0.84);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.24);
}

.template-recommended-badge {
  padding: 0 9px;
  color: #166534;
  background: rgba(220, 252, 231, 0.84);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.22);
}

.template-experimental-badge {
  padding: 0 9px;
  color: #7c2d12;
  background: rgba(255, 237, 213, 0.84);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.24);
}

.template-disabled-badge {
  padding: 0 9px;
  color: #525252;
  background: rgba(229, 229, 229, 0.88);
  box-shadow: inset 0 0 0 1px rgba(163, 163, 163, 0.22);
}

.template-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  letter-spacing: -0.05em;
}

.template-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.template-tags i {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #64748b;
  background: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.template-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.52);
  text-align: center;
}

.template-empty strong {
  font-size: 22px;
}

.template-empty p {
  margin: 8px 0 0;
  color: var(--muted);
}

.tone-warm .template-thumb {
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 15%), linear-gradient(135deg, #7c2d12, #fb923c 58%, #fde68a);
}

.tone-mint .template-thumb {
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 15%), linear-gradient(135deg, #064e3b, #14b8a6 58%, #bfdbfe);
}

.tone-rose .template-thumb,
.tone-pink .template-thumb {
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 15%), linear-gradient(135deg, #831843, #fb7185 58%, #fef3c7);
}

.tone-violet .template-thumb {
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 15%), linear-gradient(135deg, #312e81, #8b5cf6 58%, #f0abfc);
}

.tone-sunset .template-thumb {
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 15%), linear-gradient(135deg, #111827, #ef4444 48%, #facc15);
}

.tone-ink .template-thumb,
.tone-mono .template-thumb {
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 15%), linear-gradient(135deg, #020617, #475569 58%, #e5e7eb);
}

.tone-blue .template-thumb {
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 15%), linear-gradient(135deg, #0f172a, #2563eb 58%, #93c5fd);
}

.tone-clean .template-thumb,
.tone-cream .template-thumb,
.tone-stone .template-thumb {
  color: #1f2937;
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.88), transparent 15%), linear-gradient(135deg, #f8fafc, #e7e5e4 58%, #cbd5e1);
}

.tone-candy .template-thumb {
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 15%), linear-gradient(135deg, #0f766e, #38bdf8 50%, #f9a8d4);
}

.tone-dark .template-thumb,
.tone-film .template-thumb {
  background: radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.58), transparent 15%), linear-gradient(135deg, #030712, #1d4ed8 50%, #f97316);
}

.image-result {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 42px rgba(42, 40, 32, 0.12);
  animation: popIn 0.48s var(--ease) both;
}

.image-result img {
  display: block;
  width: 100%;
  min-height: 240px;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}

.image-result:hover img {
  transform: scale(1.025);
  filter: saturate(1.04);
}

.compare-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 37, 31, 0.68);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 900;
}

.compare-toggle.active {
  color: #17251f;
  background: linear-gradient(135deg, #f8e7bd, #fff);
}

.compare-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 22px;
  color: #17251f;
  background: rgba(220, 238, 230, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.compare-bar span {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
}

.image-meta {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 37, 31, 0.76);
  backdrop-filter: blur(14px);
}

.download-link {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #111827;
  text-decoration: none;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.image-meta span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skeleton {
  min-height: 280px;
  border-radius: 26px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent),
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.28));
  background-size: 180% 100%, 100% 100%;
  animation: loading 1.25s ease-in-out infinite;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.history-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, auto) minmax(120px, auto);
  gap: 10px;
  margin-top: 16px;
}

.history-filter-row input,
.history-filter-row select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  padding: 0 14px;
  outline: none;
}

.history-filter-row input:focus,
.history-filter-row select:focus {
  border-color: rgba(15, 107, 88, 0.38);
  box-shadow: 0 0 0 4px rgba(15, 107, 88, 0.1);
}

.history-empty {
  padding: 28px;
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.history-item {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.history-thumb {
  display: grid;
  min-height: 160px;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 37, 31, 0.08), rgba(15, 107, 88, 0.08));
  cursor: zoom-in;
}

.history-thumb.expired {
  color: rgba(15, 23, 42, 0.52);
  font-size: 13px;
  font-weight: 800;
}

.history-thumb img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.history-body {
  padding: 14px;
}

.history-body strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.history-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.history-actions button {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: #171717;
  background: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

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

.favorite-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-height: min(62vh, 560px);
  overflow: auto;
}

.favorite-item {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 28px rgba(42, 40, 32, 0.08);
}

.favorite-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green-deep);
}

.favorite-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.key-dialog,
.feature-dialog {
  width: min(92vw, 560px);
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(11, 18, 15, 0.72);
  backdrop-filter: blur(18px);
}

.lightbox-dialog::backdrop,
.feature-dialog::backdrop,
.key-dialog::backdrop {
  background: rgba(16, 24, 20, 0.36);
  backdrop-filter: blur(10px);
}

.lightbox-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: clamp(18px, 3vw, 36px) clamp(72px, 6vw, 108px) clamp(18px, 3vw, 36px);
  color: #fff;
}

.lightbox-panel figure {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.lightbox-panel img {
  display: block;
  width: auto;
  height: auto;
  margin: 0 auto;
  max-width: min(100%, 1280px);
  max-height: calc(100dvh - 176px);
  border-radius: 26px;
  object-fit: contain;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.lightbox-panel img.is-error {
  min-width: min(86vw, 520px);
  min-height: 220px;
  border: 1px dashed rgba(255, 255, 255, 0.34);
}

.lightbox-panel figcaption {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.lightbox-panel figcaption strong,
.lightbox-panel figcaption span {
  display: block;
}

.lightbox-panel figcaption strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-panel figcaption span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 64px;
  min-height: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 38px;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  gap: 12px;
  padding-top: 12px;
}

.compare-dialog {
  width: min(96vw, 1120px);
}

.compare-panel {
  width: min(96vw, 1120px);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.compare-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 16px 34px rgba(42, 40, 32, 0.1);
}

.compare-card img {
  display: block;
  width: 100%;
  height: min(42vh, 360px);
  object-fit: contain;
  background: rgba(16, 37, 31, 0.08);
  cursor: zoom-in;
}

.compare-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compare-card button {
  margin: 0 14px 14px;
}

#inpaintDialog {
  width: min(94vw, 900px);
}

.history-dialog {
  width: min(94vw, 980px);
}

.key-dialog::backdrop,
.feature-dialog::backdrop {
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(8px);
}

.key-panel,
.modal-panel {
  padding: 24px;
  border-radius: 32px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: 0.22s var(--ease);
}

.auth-tabs button.active {
  color: #111827;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.auth-dialog .key-panel {
  background:
    radial-gradient(circle at 14% 8%, rgba(37, 99, 235, 0.12), transparent 34%),
    radial-gradient(circle at 86% 16%, rgba(249, 115, 22, 0.1), transparent 30%),
    rgba(255, 255, 255, 0.72);
}

.auth-switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
}

.link-action {
  border: 0;
  padding: 0;
  color: #2563eb;
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.link-action:hover {
  color: #111827;
}

.auth-pane {
  animation: popIn 0.22s var(--ease) both;
}

.guest-key-state {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  color: #2563eb;
  background: rgba(219, 234, 254, 0.62);
}

.modal-panel {
  animation: popIn 0.28s var(--ease) both;
}

.result-dialog {
  width: min(92vw, 640px);
}

.result-dialog textarea {
  width: 100%;
  min-height: 220px;
  margin-top: 16px;
  resize: vertical;
  border: 1px solid rgba(15, 107, 88, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  line-height: 1.7;
}

.tool-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tool-result-actions .ghost-action {
  flex: 1 1 150px;
}

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

.modal-head span {
  display: block;
  margin-bottom: 4px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.modal-head strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.modal-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

#announcementContent {
  white-space: pre-wrap;
}

#announcementContent a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: #0f6b58;
  background: rgba(220, 238, 230, 0.88);
  font-weight: 900;
  text-decoration: none;
}

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

.drop-zone {
  display: grid;
  width: 100%;
  min-height: 178px;
  place-items: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  color: #171717;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.13), transparent 42%),
    radial-gradient(circle at 86% 82%, rgba(249, 115, 22, 0.13), transparent 40%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 42px rgba(15, 23, 42, 0.08);
  text-align: center;
  transition: 0.25s var(--ease);
}

.drop-zone:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at 18% 12%, rgba(15, 107, 88, 0.18), transparent 42%),
    radial-gradient(circle at 86% 82%, rgba(211, 138, 34, 0.18), transparent 40%);
}

.drop-zone.drag-active {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(15, 107, 88, 0.45);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(220, 238, 230, 0.72)),
    radial-gradient(circle at 18% 12%, rgba(15, 107, 88, 0.24), transparent 42%),
    radial-gradient(circle at 86% 82%, rgba(211, 138, 34, 0.22), transparent 40%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 22px 48px rgba(15, 107, 88, 0.16);
}

.drop-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green-deep), var(--green) 56%, var(--amber));
  box-shadow: 0 12px 26px rgba(15, 107, 88, 0.22);
}

.drop-zone strong,
.drop-zone em {
  display: block;
}

.drop-zone strong {
  margin-top: 14px;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.drop-zone em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.modal-preview {
  margin-top: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.modal-label {
  display: block;
  margin-top: 8px;
}

.template-form-fields {
  display: grid;
  gap: 12px;
}

.template-field {
  display: grid;
  gap: 8px;
}

.template-field span {
  color: #171717;
  font-size: 13px;
  font-weight: 900;
}

.template-field input,
.template-field textarea {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font: inherit;
}

.template-field input {
  min-height: 48px;
  padding: 0 16px;
}

.template-field textarea {
  min-height: 96px;
  padding: 14px 16px;
  resize: vertical;
}

.template-field em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.template-form-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 16px;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.admin-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  overflow-x: clip;
}

.admin-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-xl);
}

.admin-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
}

.admin-profile-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  background: linear-gradient(135deg, #10251f, #0f6b58 58%, #d38a22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 14px 28px rgba(15, 107, 88, 0.18);
}

.admin-profile-card strong,
.admin-profile-card em,
.admin-sidebar-note span,
.admin-sidebar-note strong,
.admin-sidebar-note p {
  display: block;
}

.admin-profile-card strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.admin-profile-card em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-sidebar-note {
  padding: 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 14% 10%, rgba(20, 184, 166, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.54);
}

.admin-sidebar-note span {
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-sidebar-note strong {
  margin-top: 8px;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.admin-sidebar-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.admin-content-shell {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 18px;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.76fr);
  gap: 22px;
  padding: 34px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 107, 88, 0.15), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(211, 138, 34, 0.13), transparent 28%),
    rgba(255, 255, 255, 0.64);
}

.admin-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.admin-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.admin-stat-grid,
.admin-grid {
  display: grid;
  gap: 14px;
}

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

.admin-stat-grid article,
.admin-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.admin-stat-grid article {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.12), transparent 44%);
}

.admin-stat-grid span,
.admin-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-stat-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  letter-spacing: -0.06em;
}

.admin-stat-grid em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

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

.admin-config-page {
  display: none;
}

.admin-config-page.active {
  display: grid;
  gap: 14px;
  animation: popIn 0.22s var(--ease) both;
}

.admin-config-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 8% 10%, rgba(15, 107, 88, 0.14), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(211, 138, 34, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.62);
}

.admin-config-intro span,
.admin-config-card .canvas-header span {
  color: #0f766e;
}

.admin-config-intro span {
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-config-intro strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.admin-config-intro p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.admin-config-guide {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.admin-config-guide b {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 13px;
  color: #0f766e;
  background: rgba(220, 238, 230, 0.76);
  font-size: 12px;
}

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

.admin-config-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.09), transparent 38%);
}

.admin-config-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.96), transparent);
}

.image-channel-card {
  background:
    radial-gradient(circle at 86% 12%, rgba(211, 138, 34, 0.14), transparent 35%),
    rgba(255, 255, 255, 0.58);
}

.account-points-card {
  background:
    radial-gradient(circle at 12% 14%, rgba(15, 107, 88, 0.12), transparent 35%),
    rgba(255, 255, 255, 0.58);
}

.password-card {
  background:
    radial-gradient(circle at 90% 8%, rgba(15, 23, 42, 0.08), transparent 32%),
    rgba(255, 255, 255, 0.58);
}

.announcement-config-card {
  background:
    radial-gradient(circle at 12% 10%, rgba(211, 138, 34, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.58);
}

.admin-status-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #0f766e;
  background: rgba(220, 238, 230, 0.78);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.admin-action-row.align-end {
  justify-content: flex-end;
}

.subtle-help {
  color: rgba(115, 112, 108, 0.82);
  font-size: 12px;
}

.admin-page-tabs {
  display: grid;
  gap: 8px;
}

.admin-page-tabs button {
  display: grid;
  min-height: 58px;
  justify-items: start;
  border: 0;
  border-radius: 20px;
  padding: 10px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  font-weight: 850;
  text-align: left;
  transition: 0.25s var(--ease);
}

.admin-page-tabs button span {
  color: rgba(15, 107, 88, 0.78);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-page-tabs button.active,
.admin-page-tabs button:hover {
  color: #fff;
  background: linear-gradient(135deg, #10251f, #0f6b58);
  box-shadow: 0 16px 30px rgba(15, 107, 88, 0.18);
}

.admin-page-tabs button.active span,
.admin-page-tabs button:hover span {
  color: rgba(255, 255, 255, 0.74);
}

.admin-page {
  display: none;
}

.admin-page.active {
  display: grid;
  gap: 14px;
  animation: popIn 0.22s var(--ease) both;
}

.admin-overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.overview-lead-card {
  background:
    radial-gradient(circle at 8% 10%, rgba(15, 107, 88, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.58);
}

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

.admin-overview-card {
  display: grid;
  align-content: space-between;
  min-height: 220px;
  padding: 22px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 12%, rgba(211, 138, 34, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.admin-overview-card span {
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-overview-card strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.admin-overview-card p {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.admin-diagnostics-page {
  align-items: start;
  min-width: 0;
}

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

.diagnostics-card {
  display: flex;
  min-width: 0;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 12%, rgba(15, 107, 88, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.diagnostics-card span {
  color: rgba(84, 82, 72, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.diagnostics-card strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  word-break: break-word;
}

.diagnostics-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.diagnostics-card.status-ok {
  border-color: rgba(15, 107, 88, 0.2);
}

.diagnostics-card.status-warn {
  border-color: rgba(211, 138, 34, 0.28);
  background:
    radial-gradient(circle at 88% 12%, rgba(211, 138, 34, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.62);
}

.diagnostics-card.status-error {
  border-color: rgba(185, 28, 28, 0.24);
  background:
    radial-gradient(circle at 88% 12%, rgba(248, 113, 113, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.62);
}

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

.diagnostics-detail-item {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.54);
}

.diagnostics-detail-item span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #0f6b58;
  background: rgba(220, 238, 230, 0.9);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.diagnostics-detail-item.status-warn span {
  color: #9a5f10;
  background: rgba(250, 232, 196, 0.94);
}

.diagnostics-detail-item.status-error span {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.95);
}

.diagnostics-detail-item strong {
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.diagnostics-detail-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.admin-card {
  padding: 24px;
  border-radius: 30px;
}

.api-key-card {
  background:
    radial-gradient(circle at 14% 10%, rgba(15, 107, 88, 0.14), transparent 36%),
    rgba(255, 255, 255, 0.58);
}

.smtp-card {
  background:
    radial-gradient(circle at 88% 10%, rgba(20, 184, 166, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.58);
}

.api-key-card .canvas-header small,
.smtp-card .canvas-header small {
  color: #0f766e;
  background: rgba(220, 238, 230, 0.78);
}

.admin-key-actions {
  margin-top: 14px;
}

.danger-soft {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.68);
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-ops-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 10%, rgba(15, 107, 88, 0.14), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(211, 138, 34, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.62);
}

.admin-ops-hero span,
.admin-ops-card .canvas-header span {
  color: #0f766e;
}

.admin-ops-hero > div:first-child > span {
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-ops-hero strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.075em;
}

.admin-ops-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.admin-ops-guide {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.admin-ops-guide b {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 13px;
  color: #6f4518;
  background: rgba(250, 226, 184, 0.76);
  font-size: 12px;
}

.admin-ops-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.08), transparent 38%);
}

.admin-card-result-card {
  background:
    radial-gradient(circle at 12% 10%, rgba(211, 138, 34, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.58);
}

.admin-slides-hero {
  background:
    radial-gradient(circle at 8% 10%, rgba(15, 107, 88, 0.14), transparent 34%),
    radial-gradient(circle at 92% 14%, rgba(15, 23, 42, 0.08), transparent 30%),
    rgba(255, 255, 255, 0.62);
}

.admin-slide-workbench {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.08), transparent 38%);
}

.admin-slide-workbench .canvas-header span {
  color: #0f766e;
}

.admin-home-style-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 8% 0%, rgba(54, 215, 255, 0.12), transparent 34%),
    radial-gradient(circle at 96% 18%, rgba(247, 196, 91, 0.16), transparent 34%);
}

.admin-home-style-card .canvas-header span {
  color: #1d4ed8;
}

.admin-home-style-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.admin-home-style-option {
  position: relative;
  display: grid;
  min-height: 126px;
  cursor: pointer;
}

.admin-home-style-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-home-style-option span {
  display: grid;
  align-content: start;
  gap: 8px;
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76), 0 12px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.admin-home-style-option span::before {
  content: "";
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f6b58, #d38a22);
}

.admin-home-style-option strong,
.admin-home-style-option em {
  display: block;
  font-style: normal;
}

.admin-home-style-option strong {
  color: #17221e;
  font-size: 16px;
  font-weight: 950;
}

.admin-home-style-option em {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.admin-home-style-option input:focus-visible + span,
.admin-home-style-option input:checked + span {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(238, 249, 246, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(54, 215, 255, 0.16), transparent 36%);
  box-shadow: inset 0 0 0 2px rgba(15, 107, 88, 0.48), 0 18px 42px rgba(15, 107, 88, 0.12);
}

.admin-home-style-option input:checked + span {
  transform: translateY(-2px);
}

.admin-slide-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.admin-slide-code-card {
  display: grid;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.08), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 14px 30px rgba(15, 23, 42, 0.05);
}

.admin-slide-code-card.html-card {
  grid-row: span 2;
}

.admin-code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(248, 244, 235, 0.58);
}

.admin-code-card-head em,
.admin-code-card-head b {
  font-style: normal;
  font-weight: 950;
}

.admin-code-card-head em {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  background: linear-gradient(135deg, #173d34, #0f766e);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.admin-code-card-head b {
  color: #17221e;
  font-size: 13px;
}

.admin-slide-code-card.css-card .admin-code-card-head em {
  background: linear-gradient(135deg, #7c5a2b, #d38a22);
}

.admin-slide-code-card.js-card .admin-code-card-head em {
  background: linear-gradient(135deg, #17221e, #475569);
}

.admin-slide-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(248, 244, 235, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.74);
}

.admin-slide-footer strong,
.admin-slide-footer p {
  display: block;
}

.admin-slide-footer strong {
  color: #17221e;
  font-size: 16px;
}

.admin-slide-footer p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-card-generate-grid {
  grid-template-columns: minmax(90px, 0.7fr) minmax(110px, 0.8fr) minmax(160px, 1fr) auto;
}

.admin-field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-field input,
.admin-field textarea,
.admin-field select,
.admin-inline input,
.admin-inline select,
.admin-template-edit textarea {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.84), 0 8px 18px rgba(15, 23, 42, 0.03);
  font: inherit;
  transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.admin-field input,
.admin-field select,
.admin-inline input,
.admin-inline select {
  min-height: 48px;
  padding: 0 14px;
}

.admin-field textarea,
.admin-template-edit textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus,
.admin-inline input:focus,
.admin-inline select:focus {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(15, 107, 88, 0.28), 0 0 0 4px rgba(15, 107, 88, 0.09);
}

.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-list-item {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.admin-list-item strong,
.admin-list-item p {
  display: block;
}

.admin-list-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-user-list,
.point-card-list,
.generated-card-list {
  gap: 12px;
}

.admin-user-card,
.admin-point-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.08), transparent 34%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 14px 32px rgba(15, 23, 42, 0.06);
}

.admin-user-card.is-disabled {
  opacity: 0.72;
  filter: grayscale(0.34);
}

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

.admin-user-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #173d34, #0f766e 60%, #d38a22);
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(15, 107, 88, 0.18);
}

.admin-user-identity {
  min-width: 0;
}

.admin-user-identity strong,
.admin-user-identity p {
  display: block;
}

.admin-user-identity strong {
  overflow: hidden;
  color: #17221e;
  font-size: 18px;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-identity p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.admin-state-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #0f766e;
  background: rgba(220, 238, 230, 0.8);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-state-chip.state-admin {
  color: #7c2d12;
  background: rgba(255, 237, 213, 0.86);
}

.admin-state-chip.state-disabled,
.admin-state-chip.state-unverified,
.admin-state-chip.state-disabled {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.82);
}

.admin-state-chip.state-used {
  color: #075985;
  background: rgba(224, 242, 254, 0.84);
}

.admin-state-chip.state-unused,
.admin-state-chip.state-active,
.admin-state-chip.state-verified {
  color: #166534;
  background: rgba(220, 252, 231, 0.78);
}

.admin-user-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(248, 244, 235, 0.72);
}

.admin-user-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-user-info strong {
  color: #6f4518;
  font-size: 13px;
}

.admin-user-controls {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(120px, 0.8fr) minmax(130px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.admin-control-field {
  display: grid;
  gap: 6px;
}

.admin-control-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-control-field input,
.admin-control-field select {
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.84);
  font: inherit;
}

.admin-point-card {
  display: grid;
  gap: 12px;
}

.admin-point-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.admin-point-card-top strong {
  color: #17221e;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.admin-point-card code {
  display: block;
  overflow: hidden;
  padding: 12px;
  border-radius: 18px;
  color: #173d34;
  background: rgba(248, 244, 235, 0.78);
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-point-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.admin-point-card-meta span {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
}

.admin-point-card-meta em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-point-card-meta b {
  overflow: hidden;
  color: #17221e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-point-card .admin-inline {
  margin-top: 0;
}

.admin-point-card.is-compact {
  padding: 14px;
}

.dashboard-shell {
  display: grid;
  gap: 18px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1fr);
  gap: 22px;
  padding: 30px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 10% 8%, rgba(15, 107, 88, 0.16), transparent 34%),
    radial-gradient(circle at 94% 10%, rgba(211, 138, 34, 0.13), transparent 30%),
    rgba(255, 255, 255, 0.64);
}

.dashboard-profile-card {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
}

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

.dashboard-profile-copy h1 {
  overflow: hidden;
  margin: 8px 0 8px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.08em;
  text-overflow: ellipsis;
}

.dashboard-profile-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.dashboard-stat-grid,
.dashboard-grid {
  display: grid;
  gap: 14px;
}

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

.dashboard-stat-grid article,
.dashboard-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-stat-grid article {
  display: grid;
  align-content: space-between;
  min-height: 140px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.12), transparent 44%);
}

.dashboard-stat-grid span {
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-stat-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: -0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-stat-grid em {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

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

.dashboard-card {
  padding: 24px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.08), transparent 38%);
}

.dashboard-card .canvas-header span {
  color: #0f766e;
}

.dashboard-wide {
  grid-column: 1 / -1;
}

.redeem-card {
  background:
    radial-gradient(circle at 12% 10%, rgba(211, 138, 34, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.58);
}

.invite-card {
  background:
    radial-gradient(circle at 88% 10%, rgba(15, 107, 88, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.58);
}

.dashboard-reward-list {
  gap: 10px;
}

.dashboard-reward-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.dashboard-reward-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  font-size: 22px;
  font-weight: 900;
}

.dashboard-reward-card strong,
.dashboard-reward-card p {
  display: block;
}

.dashboard-reward-card strong {
  color: #17221e;
  font-size: 15px;
}

.dashboard-reward-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-history-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.dashboard-history-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.08), transparent 36%);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.dashboard-history-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.dashboard-history-card.is-expired {
  opacity: 0.78;
}

.dashboard-history-thumb {
  display: grid;
  height: 230px;
  place-items: center;
  overflow: hidden;
  color: rgba(15, 23, 42, 0.52);
  background:
    radial-gradient(circle at 28% 18%, rgba(15, 107, 88, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(211, 138, 34, 0.12));
  font-size: 13px;
  font-weight: 800;
}

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

.dashboard-history-thumb.expired {
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
}

.dashboard-history-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.dashboard-artwork-title span,
.dashboard-artwork-title strong {
  display: block;
}

.dashboard-artwork-title span {
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-artwork-title strong {
  overflow: hidden;
  margin-top: 4px;
  color: #17221e;
  font-size: 18px;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card-meta strong,
.history-card-meta span {
  display: block;
}

.history-card-meta strong {
  font-size: 15px;
}

.history-card-meta span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.dashboard-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  color: #0f766e;
  background: rgba(220, 238, 230, 0.78);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-chip.chip-points {
  color: #7c2d12;
  background: rgba(255, 237, 213, 0.84);
}

.dashboard-chip.chip-expired {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.82);
}

.dashboard-history-body p,
.history-card-actions span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.dashboard-history-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

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

.history-card-actions span {
  margin-right: auto;
}

.history-card-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.dashboard-empty-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 12%, rgba(15, 107, 88, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #173d34, #0f766e 58%, #d38a22);
  font-weight: 950;
  box-shadow: 0 16px 30px rgba(15, 107, 88, 0.18);
}

.dashboard-empty-card strong,
.dashboard-empty-card p {
  display: block;
}

.dashboard-empty-card strong {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.dashboard-empty-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-code-textarea {
  min-height: 220px;
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 0;
  color: #dbeafe;
  background:
    radial-gradient(circle at 0% 0%, rgba(20, 184, 166, 0.12), transparent 34%),
    #111827;
  box-shadow: none;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  padding: 16px;
  resize: vertical;
  white-space: pre;
  tab-size: 2;
}

.admin-slide-code-card.html-card .admin-code-textarea {
  min-height: 530px;
}

.admin-slide-code-card.css-card .admin-code-textarea,
.admin-slide-code-card.js-card .admin-code-textarea {
  min-height: 220px;
}

.admin-code-textarea::placeholder {
  color: rgba(219, 234, 254, 0.48);
}

.admin-code-textarea:focus {
  background:
    radial-gradient(circle at 0% 0%, rgba(20, 184, 166, 0.16), transparent 34%),
    #0f172a;
}

.admin-list-actions,
.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-form-actions {
  align-items: center;
}

.announcement-admin-item p {
  word-break: break-word;
}

.admin-inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.admin-template-edit {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.admin-template-manager {
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.admin-template-manager .template-header {
  margin-bottom: 18px;
}

.admin-template-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 26px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 9% 10%, rgba(15, 107, 88, 0.15), transparent 34%),
    radial-gradient(circle at 91% 12%, rgba(211, 138, 34, 0.13), transparent 30%),
    rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.admin-template-hero-text span,
.admin-template-filter-row > span {
  display: block;
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-template-hero-text strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.075em;
}

.admin-template-hero-text p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.admin-template-guide {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.admin-template-guide b {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 13px;
  color: #6f4518;
  background: rgba(250, 226, 184, 0.76);
  font-size: 12px;
}

.admin-template-toolbar,
.admin-template-filter-row,
.admin-template-gallery-shell {
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.admin-template-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 28px;
}

.admin-template-search-shell {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at 0% 0%, rgba(15, 107, 88, 0.09), transparent 36%);
}

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

.admin-template-count-chip {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  color: #0f766e;
  background: rgba(220, 238, 230, 0.78);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-template-filter-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 28px;
}

.admin-template-filter-row .template-categories {
  margin: 0;
  padding-bottom: 2px;
}

.admin-template-gallery-shell {
  padding: 16px;
  border-radius: 32px;
}

.admin-template-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.admin-template-card {
  position: relative;
  min-height: 390px;
  padding: 13px;
  border-color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 16% 12%, rgba(15, 107, 88, 0.1), transparent 36%);
}

.admin-template-card::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(15, 107, 88, 0.9), rgba(20, 184, 166, 0.76));
  color: rgba(255, 255, 255, 0.94);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  content: "›";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.admin-template-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.admin-template-card.is-disabled {
  filter: grayscale(0.36);
  opacity: 0.76;
}

.admin-template-card.is-disabled::before {
  position: absolute;
  inset: 12px;
  z-index: 1;
  pointer-events: none;
  border-radius: 24px;
  background: linear-gradient(180deg, transparent 42%, rgba(255, 255, 255, 0.44));
  content: "";
}

.admin-template-card .template-thumb {
  min-height: 174px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.72), transparent 15%),
    linear-gradient(135deg, #173d34, #0f766e 56%, #d38a22);
}

.admin-template-card .template-thumb.has-image img {
  height: 188px;
}

.admin-template-card .template-body {
  padding: 3px 2px 2px;
}

.admin-template-card .template-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px;
}

.admin-template-card .template-meta em {
  color: #0f766e;
  max-width: 100%;
}

.admin-template-card .template-meta small {
  min-height: 22px;
  padding: 0 8px;
}

.admin-template-card strong {
  padding-right: 38px;
  color: #17221e;
  font-size: 20px;
  line-height: 1.2;
}

.admin-template-card .template-desc {
  min-height: 62px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.admin-template-card .template-tags {
  padding-right: 38px;
}

.admin-template-card .template-tags i {
  background: rgba(248, 244, 235, 0.86);
  color: #7c5a2b;
}

.admin-template-gallery-shell .template-empty {
  margin: 0;
}

.admin-template-dialog {
  width: min(96vw, 1240px);
}

.admin-template-panel {
  max-height: min(88vh, 980px);
  overflow: auto;
  background:
    radial-gradient(circle at 10% 2%, rgba(15, 107, 88, 0.1), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(211, 138, 34, 0.1), transparent 28%),
    rgba(255, 255, 255, 0.78);
}

.admin-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.68fr);
  gap: 18px;
  align-items: start;
}

.admin-editor-main,
.admin-editor-side,
.admin-image-card,
.admin-toggle-list,
.admin-fields-editor {
  display: grid;
  gap: 12px;
}

.admin-image-card,
.admin-toggle-list,
.admin-fields-editor {
  padding: 16px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.08), transparent 36%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

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

.admin-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
  font: inherit;
}

.admin-long-textarea {
  min-height: 240px;
}

.admin-template-editor-note,
.admin-prompt-field em {
  color: var(--muted);
  line-height: 1.65;
}

.admin-template-editor-note {
  padding: 14px 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(220, 238, 230, 0.78), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at 100% 0%, rgba(211, 138, 34, 0.12), transparent 34%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.74);
}

.admin-template-editor-note span {
  display: block;
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.admin-template-editor-note p,
.admin-prompt-field em {
  margin: 4px 0 0;
  font-size: 13px;
}

.admin-template-editor-note code,
.admin-fields-editor code,
.admin-prompt-field code {
  border-radius: 9px;
  padding: 2px 6px;
  color: #0f5f55;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 850;
}

.admin-image-preview {
  display: grid;
  min-height: 190px;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 28px;
  font-weight: 900;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.76), transparent 15%),
    linear-gradient(135deg, #173d34, #0f766e 58%, #d38a22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 14px 34px rgba(15, 23, 42, 0.13);
}

.admin-image-preview.has-image {
  background: #f8fafc;
}

.admin-image-preview img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.admin-image-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-drop-zone {
  min-height: 150px;
}

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

.admin-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px 8px 13px;
  border-radius: 999px;
  color: #171717;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  user-select: none;
}

.admin-toggle input {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 21px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: rgba(148, 163, 184, 0.38);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
  transition: 0.2s ease;
}

.admin-toggle input::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
  content: "";
  transition: 0.2s ease;
}

.admin-toggle input:checked {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.admin-toggle input:checked::before {
  transform: translateX(15px);
}

.admin-mini-check input {
  accent-color: #0f766e;
}

.admin-field-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-field-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 0.7fr) minmax(160px, 1.08fr) 96px auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.admin-field-row input,
.admin-field-row select {
  width: 100%;
  min-height: 38px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 13px;
}

.admin-field-row input,
.admin-field-row select {
  padding: 0 10px;
}

.template-submission-review-list {
  gap: 12px;
}

.template-submission-review-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.08), transparent 36%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.74);
}

.template-submission-review-card.status-pending {
  border-color: rgba(211, 138, 34, 0.2);
}

.template-submission-review-card.status-approved {
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.84), rgba(255, 255, 255, 0.56)),
    radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.12), transparent 36%);
}

.template-submission-review-card.status-rejected {
  background:
    linear-gradient(135deg, rgba(254, 242, 242, 0.84), rgba(255, 255, 255, 0.56)),
    radial-gradient(circle at 100% 0%, rgba(185, 28, 28, 0.1), transparent 36%);
}

.template-submission-review-card > .admin-image-preview {
  min-height: 118px;
  border-radius: 22px;
  font-size: 18px;
}

.template-submission-review-card > .admin-image-preview img {
  height: 118px;
}

.template-submission-review-body {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.template-submission-review-body strong {
  overflow: hidden;
  color: #17221e;
  font-size: 18px;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-submission-review-body p,
.template-submission-review-body small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.template-submission-review-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-mini-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-fields-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.admin-editor-main .admin-fields-editor {
  margin-top: 2px;
}

.mask-editor {
  margin-top: 14px;
}

.mask-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
}

.mask-toolbar span {
  margin-right: auto;
  padding-left: 8px;
  color: #171717;
  font-size: 13px;
  font-weight: 800;
}

.mask-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mask-toolbar input {
  width: 116px;
  height: auto;
  padding: 0;
  accent-color: var(--green);
}

.brush-presets {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
}

.brush-presets button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.brush-presets button.active,
.brush-presets button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--green-deep), var(--green));
}

.mask-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.5) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.5) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.5) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.5) 75%),
    rgba(255, 255, 255, 0.44);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 18px 42px rgba(15, 23, 42, 0.1);
  touch-action: none;
}

.mask-stage img,
.mask-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mask-stage canvas {
  cursor: crosshair;
}

.mask-help {
  margin: 10px 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.key-help {
  color: var(--muted);
  line-height: 1.7;
}

.key-input-label {
  display: block;
  margin-top: 18px;
}

.auth-code-row,
.redeem-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.auth-code-row .ghost-action,
.redeem-row .primary-action {
  min-height: 48px;
  margin-bottom: 0;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 28px;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(135deg, #173d34, #0f766e 58%, #d38a22);
  box-shadow: 0 18px 36px rgba(15, 107, 88, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.card-help {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.redeem-row {
  margin-top: 16px;
}

.template-form-error.success {
  color: #166534;
  background: rgba(220, 252, 231, 0.76);
}

.template-submission-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.template-submission-form input,
.template-submission-form textarea {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
  font: inherit;
}

.template-submission-form input {
  min-height: 46px;
  padding: 0 14px;
}

.template-submission-form textarea {
  min-height: 92px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.65;
}

.submission-upload-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.submission-preview,
.dashboard-submission-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 160px;
  border-radius: 24px;
  color: rgba(15, 23, 42, 0.54);
  background:
    radial-gradient(circle at 18% 18%, rgba(15, 107, 88, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(211, 138, 34, 0.12));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.submission-preview img,
.dashboard-submission-thumb img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
}

.submission-list,
.template-submission-review-list {
  margin-top: 16px;
}

.dashboard-submission-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 100% 0%, rgba(15, 107, 88, 0.08), transparent 36%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.dashboard-submission-card.status-approved {
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.82), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.12), transparent 36%);
}

.dashboard-submission-card.status-rejected {
  background:
    linear-gradient(135deg, rgba(254, 242, 242, 0.82), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 100% 0%, rgba(185, 28, 28, 0.1), transparent 36%);
}

.dashboard-submission-body {
  display: grid;
  min-width: 0;
  gap: 8px;
  align-content: center;
}

.submission-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.submission-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.dashboard-submission-body small {
  color: rgba(84, 82, 72, 0.78);
  font-size: 12px;
  line-height: 1.55;
}

.compact-inline {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.compact-inline .primary-action,
.compact-inline .ghost-action {
  min-height: 44px;
}

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

.ghost-action.danger {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.78);
}

.history-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 10px;
  text-decoration: none;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #444;
  background: rgba(255, 255, 255, 0.72);
  font-size: 26px;
  line-height: 1;
}

.toast {
  position: fixed;
  z-index: 50;
  top: 88px;
  left: 50%;
  max-width: min(92vw, 520px);
  transform: translateX(-50%);
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  color: #171717;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: toastIn 0.25s var(--ease) both;
}

@keyframes drift {
  to {
    transform: translate3d(40px, -24px, 0) scale(1.08);
  }
}

@keyframes float {
  to {
    transform: translate3d(0, -18px, 0) rotate(1deg);
  }
}

@keyframes shine {
  0%,
  42% {
    left: -38%;
  }
  100% {
    left: 120%;
  }
}

@keyframes loading {
  to {
    background-position: -180% 0, 0 0;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-pills {
    order: 3;
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: 10px;
  }

  .hero-card,
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    top: auto;
    overflow: hidden;
  }

  .admin-page-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .admin-page-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-page-tabs button {
    flex: 0 0 auto;
    min-width: 148px;
  }

  .admin-sidebar-note {
    display: none;
  }

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

  .admin-config-intro {
    grid-template-columns: 1fr;
  }

  .admin-config-guide {
    justify-content: flex-start;
    max-width: none;
  }

  .admin-config-grid {
    grid-template-columns: 1fr;
  }

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

  .diagnostics-list {
    grid-template-columns: 1fr;
  }

  .composer {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .page-shell {
    padding: 10px;
    overflow-x: hidden;
  }

  .orb {
    display: none;
  }

  .glass-panel {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .topbar {
    top: 10px;
    border-radius: 24px;
  }

  .brand em {
    display: none;
  }

  .key-button {
    padding-inline: 12px;
  }

  .nav-pill {
    min-width: 0;
    flex: 1;
    padding-inline: 10px;
  }

  .hero-card {
    min-height: auto;
    padding: 10px;
    border-radius: 24px;
  }

  .slide-frame {
    height: clamp(236px, 68vw, 312px);
    min-height: 236px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 12vw, 44px);
    letter-spacing: -0.06em;
  }

  .hero-preview {
    display: none;
  }

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

  .template-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .template-count {
    white-space: normal;
  }

  .template-categories {
    flex-wrap: nowrap;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    overflow-x: auto;
    padding: 0 2px 8px;
    scrollbar-width: none;
  }

  .template-categories::-webkit-scrollbar {
    display: none;
  }

  .template-category {
    flex: 0 0 auto;
  }

  .canvas-header,
  .template-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .canvas-actions {
    justify-content: flex-start;
  }

  .canvas-panel {
    min-height: 440px;
    width: 100%;
    padding: 12px;
    overflow: hidden;
    border-radius: 24px;
  }

  .template-view {
    min-height: auto;
  }

  .template-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .template-card {
    min-height: auto;
    gap: 10px;
    padding: 12px;
    border-radius: 22px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  }

  .template-thumb {
    height: 150px;
    border-radius: 20px;
    font-size: 26px;
  }

  .template-card strong {
    font-size: 17px;
  }

  .template-desc {
    -webkit-line-clamp: 2;
  }

  .template-tags {
    gap: 6px;
  }

  .template-tags i {
    max-width: 100%;
  }

  .key-dialog,
  .feature-dialog {
    width: min(94vw, 560px);
    max-height: 94vh;
  }

  .key-panel,
  .modal-panel {
    max-height: 92vh;
    overflow: auto;
    padding: 20px;
    border-radius: 28px;
  }

  .auth-switch-row,
  .key-actions,
  .modal-actions {
    align-items: stretch;
  }

  .key-actions .primary-action,
  .key-actions .ghost-action,
  .modal-actions .primary-action,
  .modal-actions .ghost-action {
    flex: 1 1 auto;
  }

  .admin-hero,
  .admin-grid,
  .diagnostics-grid,
  .diagnostics-list,
  .dashboard-hero,
  .dashboard-grid,
  .admin-overview-grid,
  .admin-config-intro,
  .admin-config-grid,
  .admin-home-style-options,
  .admin-ops-hero,
  .admin-slide-editor-grid,
  .admin-slide-footer,
  .admin-card-generate-grid,
  .admin-user-controls,
  .admin-template-hero,
  .admin-template-toolbar,
  .admin-editor-grid,
  .admin-two-col,
  .admin-inline,
  .auth-code-row,
  .redeem-row,
  .announcement-bar {
    grid-template-columns: 1fr;
  }

  .diagnostics-card {
    min-height: auto;
  }

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

  .admin-sidebar {
    padding: 10px;
    border-radius: 28px;
  }

  .admin-profile-card {
    margin-bottom: 4px;
  }

  .admin-page-tabs {
    margin: 0 -2px;
    padding: 0 2px 4px;
  }

  .admin-page-tabs button {
    min-width: 132px;
    min-height: 54px;
    border-radius: 18px;
    padding: 9px 12px;
  }

  .admin-hero {
    padding: 24px;
    border-radius: 28px;
  }

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

  .admin-overview-card {
    min-height: auto;
    padding: 18px;
    border-radius: 24px;
  }

  .admin-config-intro,
  .admin-config-card,
  .dashboard-card,
  .admin-ops-hero,
  .admin-ops-card,
  .admin-slide-workbench,
  .admin-template-hero,
  .admin-template-toolbar,
  .admin-template-filter-row,
  .admin-template-gallery-shell {
    padding: 18px;
    border-radius: 24px;
  }

  .admin-template-guide,
  .admin-template-toolbar-actions,
  .admin-ops-guide {
    justify-content: flex-start;
  }

  .admin-user-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-user-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .admin-user-controls .ghost-action {
    width: 100%;
    justify-content: center;
  }

  .admin-point-card-meta {
    grid-template-columns: 1fr;
  }

  .dashboard-profile-card {
    align-items: flex-start;
  }

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

  .dashboard-hero {
    padding: 22px;
    border-radius: 30px;
  }

  .dashboard-profile-copy h1 {
    font-size: clamp(32px, 10vw, 46px);
  }

  .profile-avatar {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    font-size: 28px;
  }

  .dashboard-profile-actions,
  .history-card-actions {
    align-items: stretch;
  }

  .dashboard-profile-actions .ghost-action,
  .history-card-actions .ghost-action,
  .history-card-actions .primary-action {
    justify-content: center;
  }

  .admin-slide-code-card.html-card {
    grid-row: auto;
  }

  .admin-slide-code-card.html-card .admin-code-textarea,
  .admin-slide-code-card.css-card .admin-code-textarea,
  .admin-slide-code-card.js-card .admin-code-textarea {
    min-height: 260px;
  }

  .admin-slide-footer .admin-form-actions {
    margin-top: 0;
  }

  .admin-template-search-shell {
    min-width: 0;
  }

  .admin-template-filter-row .template-categories {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .admin-template-filter-row .template-category {
    flex: 0 0 auto;
  }

  .admin-template-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-template-card {
    min-height: auto;
  }

  .admin-template-card .template-thumb,
  .admin-template-card .template-thumb.has-image img {
    height: 160px;
    min-height: 160px;
  }

  .admin-template-card .template-desc {
    min-height: auto;
  }

  .submission-upload-row,
  .dashboard-submission-card,
  .template-submission-review-card {
    grid-template-columns: 1fr;
  }

  .template-submission-review-card > .admin-image-preview,
  .template-submission-review-card > .admin-image-preview img,
  .dashboard-submission-thumb,
  .dashboard-submission-thumb img {
    min-height: 170px;
    height: 170px;
  }

  .admin-action-row,
  .admin-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-action-row .primary-action,
  .admin-action-row .ghost-action,
  .admin-form-actions .primary-action,
  .admin-form-actions .ghost-action {
    width: 100%;
    justify-content: center;
  }

  .admin-template-panel {
    max-height: 92vh;
  }

  .dashboard-history-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-history-thumb {
    height: 170px;
  }

  .dashboard-empty-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 22px rgba(15, 107, 88, 0.14);
  }

  .nav-pills {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin-top: 0;
    overflow: hidden;
  }

  .nav-pill {
    width: 100%;
    min-height: 40px;
    padding-inline: 6px;
    font-size: 13px;
  }

  .key-button {
    justify-content: center;
    justify-self: stretch;
    width: 100%;
    min-height: 44px;
  }

  .announcement-bar {
    gap: 8px;
    padding: 12px;
    border-radius: 20px;
  }

  .announcement-bar strong {
    padding: 0;
    white-space: normal;
  }

  .studio-grid {
    gap: 12px;
    margin-top: 12px;
  }

  .composer {
    padding: 14px;
    border-radius: 24px;
  }

  .composer textarea {
    min-height: 142px;
    margin-top: 12px;
    padding: 13px;
    border-radius: 20px;
    font-size: 14px;
  }

  .prompt-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .prompt-tools button {
    min-height: 40px;
    padding-inline: 8px;
  }

  .generate-button {
    min-height: 54px;
    margin-top: 14px;
    border-radius: 20px;
  }

  .status-card {
    border-radius: 18px;
  }

  .canvas-panel {
    min-height: 420px;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
  }

  .image-result {
    border-radius: 24px;
  }

  .image-result img {
    min-height: 220px;
    max-height: 420px;
  }

  .image-meta {
    position: static;
    border-radius: 0;
    background: rgba(17, 24, 39, 0.88);
  }

  .image-meta span {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .download-link {
    align-self: center;
  }

  .template-intro {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 20px;
  }

  .template-search {
    border-radius: 20px;
  }

  .template-search span {
    display: none;
  }

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

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

  .template-thumb,
  .template-thumb.has-image img {
    width: 100%;
    height: 100%;
    min-height: 118px;
  }

  .template-body {
    min-width: 0;
  }

  .template-meta {
    gap: 6px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .template-tags {
    max-height: 28px;
    overflow: hidden;
  }

  .history-dialog {
    width: min(96vw, 560px);
  }

  .history-filter-row {
    grid-template-columns: 1fr;
  }

  .history-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .history-thumb,
  .history-thumb img {
    min-height: 150px;
    height: 170px;
  }

  .history-actions {
    align-items: stretch;
  }

  .history-actions button {
    flex: 1 1 auto;
    min-height: 40px;
    border-radius: 999px;
  }

  .compare-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .compare-dialog,
  .compare-panel {
    width: 96vw;
  }

  .compare-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .compare-card {
    flex: 0 0 82vw;
    scroll-snap-align: center;
  }

  .lightbox-panel {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 100vh;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    background: rgba(11, 18, 15, 0.94);
    backdrop-filter: none;
  }

  .lightbox-panel figure {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }

  .lightbox-panel img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(68dvh, calc(100vh - 178px));
    border-radius: 20px;
    object-fit: contain;
  }

  .lightbox-panel figcaption {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 10px 12px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 92px;
    width: 42px;
    height: 46px;
    font-size: 30px;
  }

  .lightbox-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #inpaintDialog {
    width: 96vw;
  }

  #inpaintDialog .modal-panel {
    max-height: 92vh;
    overflow: auto;
  }

  .mask-toolbar {
    position: sticky;
    top: 0;
    z-index: 3;
    align-items: stretch;
    border-radius: 22px;
  }

  .mask-toolbar span {
    flex: 1 0 100%;
    margin-right: 0;
  }

  .mask-toolbar label {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .mask-toolbar input {
    width: min(58vw, 220px);
  }

  .brush-presets {
    flex: 1 1 auto;
    justify-content: center;
  }

  .brush-presets button,
  .mask-toolbar .ghost-action {
    min-height: 38px;
  }
}

@media (max-width: 430px) {
  .template-card {
    grid-template-columns: 1fr;
  }

  .template-card .template-desc,
  .template-card .template-tags,
  .template-card .template-meta small:nth-child(n + 3) {
    display: none;
  }

  .template-thumb,
  .template-thumb.has-image img {
    height: 142px;
  }

  .dashboard-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 8px;
    background:
      radial-gradient(circle at 12% 0%, rgba(15, 107, 88, 0.14), transparent 30%),
      linear-gradient(180deg, #fbf8ef 0%, #edf5ed 58%, #f7efe2 100%);
  }

  .topbar {
    grid-template-areas:
      "brand auth"
      "nav nav";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(15, 107, 88, 0.12);
    border-radius: 22px;
    background: rgba(255, 253, 246, 0.94);
    box-shadow: 0 10px 24px rgba(32, 45, 35, 0.08);
  }

  .brand {
    grid-area: brand;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .nav-pills {
    grid-area: nav;
    display: flex;
    gap: 6px;
    width: 100%;
    padding: 4px;
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(15, 107, 88, 0.07);
    scrollbar-width: none;
  }

  .nav-pills::-webkit-scrollbar {
    display: none;
  }

  .nav-pill {
    flex: 1 0 auto;
    width: auto;
    min-width: 68px;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 13px;
    font-size: 13px;
  }

  .key-button {
    grid-area: auth;
    justify-self: end;
    width: auto;
    min-height: 36px;
    max-width: 138px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 12px;
  }

  #authButtonText {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace {
    gap: 10px;
    margin-top: 10px;
  }

  .announcement-bar {
    padding: 10px 12px;
    border-radius: 18px;
  }

  #heroSlide {
    display: none;
  }

  .studio-grid {
    gap: 10px;
    margin-top: 0;
  }

  .composer,
  .canvas-panel,
  .dashboard-card,
  .dashboard-stat-grid article {
    border: 1px solid rgba(15, 107, 88, 0.1);
    background: rgba(255, 253, 246, 0.9);
    box-shadow: 0 10px 24px rgba(32, 45, 35, 0.07);
  }

  .composer {
    padding: 12px;
    border-radius: 22px;
  }

  .section-heading strong,
  .canvas-header strong {
    letter-spacing: -0.04em;
  }

  .composer textarea {
    min-height: 118px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.86);
  }

  .starter-strip {
    margin-top: 8px;
    padding-bottom: 2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .starter-strip::-webkit-scrollbar {
    display: none;
  }

  .starter-strip button {
    flex: 0 0 auto;
  }

  .image-assist-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 10px 0 8px;
    padding: 10px 12px;
    border-radius: 20px;
    background:
      linear-gradient(135deg, rgba(15, 107, 88, 0.1), rgba(211, 138, 34, 0.1)),
      rgba(255, 255, 255, 0.74);
  }

  .image-assist-card span {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .image-assist-card strong {
    font-size: 13px;
  }

  .image-assist-card p {
    display: none;
  }

  .image-assist-card button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
    box-shadow: none;
  }

  .control-grid {
    gap: 8px;
  }

  .generate-button {
    min-height: 52px;
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(15, 107, 88, 0.2);
  }

  .canvas-panel {
    min-height: 360px;
    border-radius: 22px;
  }

  .empty-state {
    padding: 22px 14px;
  }

  .template-grid {
    gap: 10px;
  }

  .template-card {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 10px;
    min-height: 122px;
    padding: 10px;
    border-radius: 20px;
  }

  .template-thumb,
  .template-thumb.has-image img {
    height: 100%;
    min-height: 102px;
    border-radius: 16px;
  }

  .template-card strong {
    font-size: 15px;
  }

  .template-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
  }

  .template-tags {
    max-height: 24px;
  }

  .template-card .template-meta small:nth-child(n + 3) {
    display: none;
  }

  .dashboard-shell {
    gap: 10px;
  }

  .dashboard-hero {
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(15, 107, 88, 0.12);
    border-radius: 24px;
    background:
      radial-gradient(circle at 100% 0%, rgba(211, 138, 34, 0.14), transparent 36%),
      rgba(255, 253, 246, 0.92);
  }

  .dashboard-profile-card {
    gap: 12px;
    align-items: center;
  }

  .dashboard-profile-copy h1 {
    margin: 4px 0;
    font-size: clamp(26px, 9vw, 38px);
  }

  .dashboard-profile-copy p {
    font-size: 13px;
    line-height: 1.55;
  }

  .profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 24px;
  }

  .dashboard-profile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: 12px;
  }

  .dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-stat-grid article {
    min-height: 104px;
    padding: 12px;
    border-radius: 18px;
  }

  .dashboard-stat-grid strong {
    font-size: 22px;
  }

  .dashboard-stat-grid em {
    font-size: 11px;
  }

  .dashboard-grid {
    gap: 10px;
  }

  .dashboard-card {
    padding: 14px;
    border-radius: 22px;
  }

  .dashboard-history-grid {
    gap: 10px;
  }

  .dashboard-history-card {
    border-radius: 22px;
    background: rgba(255, 253, 246, 0.92);
  }

  .dashboard-history-thumb {
    height: 150px;
  }
}

@media (max-width: 380px) {
  .template-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .template-thumb,
  .template-thumb.has-image img {
    min-height: 96px;
  }

  .dashboard-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) and (pointer: coarse) {
  .nav-pill:hover,
  .template-card:hover,
  .drop-zone:hover,
  .image-result:hover img,
  button:hover {
    transform: none;
  }
}

body.is-mobile-saving-power .orb,
body.is-mobile-saving-power .hero-orbit,
body.is-mobile-saving-power .hero-loading,
body.is-mobile-saving-power .template-card::after {
  animation: none !important;
  display: none !important;
}

body.is-mobile-saving-power .glass-panel,
body.is-mobile-saving-power .modal-panel,
body.is-mobile-saving-power .toast,
body.is-mobile-saving-power .lightbox-dialog,
body.is-mobile-saving-power .lightbox-dialog::backdrop,
body.is-mobile-saving-power .lightbox-panel figcaption {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.is-mobile-saving-power .template-card,
body.is-mobile-saving-power .image-result,
body.is-mobile-saving-power .glass-panel,
body.is-mobile-saving-power .modal-panel,
body.is-mobile-saving-power .dashboard-history-card {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

body.is-mobile-saving-power .template-card,
body.is-mobile-saving-power .image-result img,
body.is-mobile-saving-power button,
body.is-mobile-saving-power .ghost-action,
body.is-mobile-saving-power .primary-action {
  transition: none !important;
  transform: none !important;
}

body.is-mobile-saving-power .template-grid,
body.is-mobile-saving-power .history-list,
body.is-mobile-saving-power .gallery-grid {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

@media (max-width: 640px) {
  .image-assist-card {
    grid-template-columns: 1fr;
  }

  .image-assist-card button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .diagnostics-detail-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .diagnostics-detail-item p {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .glass-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
