:root {
  --night: #07111f;
  --night-2: #0b1728;
  --ink: #101827;
  --muted: #657589;
  --line: #dce8f0;
  --paper: #eef9fb;
  --panel: #ffffff;
  --cyan: #24d6c8;
  --blue: #2f7df6;
  --brand-primary: linear-gradient(135deg, #28e0d4 0%, #20c6c4 42%, #2f7df6 100%);
  --brand-primary-shadow: 0 18px 42px rgba(36, 214, 200, .28);
  --amber: #ffb31a;
  --violet: #7c5cff;
  --shadow: 0 28px 80px rgba(7, 17, 31, .14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 94px;
  color: var(--ink);
  font-family: Manrope, Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(36, 214, 200, .18), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(47, 125, 246, .16), transparent 34rem),
    linear-gradient(180deg, #effbfc 0%, #f8fbff 46%, #edf7fb 100%);
}

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

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

button {
  cursor: pointer;
}

.page-shell,
.site-header,
.tool-header,
.tool-page {
  width: min(1380px, calc(100% - 44px));
  margin-inline: auto;
}

.site-header,
.tool-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 10;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 22px;
  transform: translateX(-50%);
  border: 1px solid rgba(18, 20, 23, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(31, 45, 61, .08);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  gap: 28px;
  font-weight: 850;
}

.h5-logo-mark {
  width: 205px;
  height: 52px;
  flex: 0 0 205px;
  display: inline-grid;
  place-items: center;
  overflow: visible;
}

.brand .h5-logo-mark > .brand-logo-image {
  width: 205px !important;
  height: 52px !important;
  max-width: 205px !important;
  max-height: 52px !important;
  object-fit: contain;
  display: block;
  position: static !important;
}

.brand-logo-image {
  filter: none;
}

.brand-tool,
.tool-status {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d2a3a;
  font-size: 18px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.brand-tool {
  color: #253141;
  font-size: 18px;
  font-weight: 780;
}

.brand-tool::before,
.tool-header .brand-tool::before,
.site-header .brand-tool::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

.tool-status {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
}

.site-nav a {
  color: #27364a;
  font-size: 14px;
  font-weight: 820;
}

.button {
  border: 1px solid rgba(16, 23, 38, .12);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 780;
  letter-spacing: -.02em;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.dark {
  color: #04111d;
  border-color: rgba(32, 198, 196, .9);
  background: var(--brand-primary);
  box-shadow: var(--brand-primary-shadow), inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.button.light {
  color: #142033;
  background: #fff;
  border: 1px solid rgba(148, 166, 190, .32);
}

.button.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.language-switcher {
  position: relative;
  z-index: 20;
  margin-left: auto;
}

.language-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(16, 23, 38, .1);
  border-radius: 12px;
  color: #253141;
  background: #fff;
  cursor: pointer;
  font-weight: 750;
}

.language-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 132px;
  padding: 8px;
  border: 1px solid rgba(16, 23, 38, .1);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}

.language-switcher.open .language-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.language-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
}

.language-menu button.active,
.language-menu button:hover {
  background: #eef7ff;
}

.hero {
  position: relative;
  min-height: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 0 42px;
  text-align: center;
}

.hero-copy {
  width: 100%;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 860;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 980px;
  margin: 0 auto 22px;
  color: #07111f;
  font-size: clamp(46px, 6vw, 88px);
  line-height: 1.12;
  letter-spacing: -.05em;
}

.hero-copy p {
  max-width: 780px;
  margin: 0 auto;
  color: #56677b;
  font-size: 19px;
  line-height: 1.75;
}

.hero-actions,
.tool-actions,
.charset-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.metrics {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px auto 30px;
}

.metrics div,
.workflow-grid article,
.case-card,
.seo-grid article,
.panel {
  border: 1px solid rgba(124, 148, 173, .22);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow);
}

.metrics div {
  padding: 16px;
  border-radius: 18px;
  text-align: center;
}

.metrics strong {
  display: block;
  color: #07111f;
  font-size: 28px;
  font-weight: 950;
}

.metrics span {
  display: block;
  margin-top: 4px;
  color: #667587;
  font-size: 13px;
  line-height: 1.45;
}

.hero-uploader,
.mini-workbench {
  border: 1px solid rgba(16, 23, 38, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 20px 60px rgba(31, 45, 61, .08);
}

.hero-uploader {
  width: min(780px, 100%);
  min-height: 240px;
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 28px;
  margin: 0 auto;
  overflow: hidden;
  text-align: center;
  border: 2px dashed rgba(36, 214, 200, .42);
  background:
    radial-gradient(circle at 50% 0%, rgba(36, 214, 200, .2), transparent 42%),
    linear-gradient(135deg, rgba(244, 253, 255, .92), rgba(249, 255, 246, .88));
}

.font-tile-grid {
  display: grid;
  grid-template-columns: repeat(8, 42px);
  gap: 8px;
}

.font-tile-grid i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #07111f;
  font-style: normal;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, rgba(36, 214, 200, .96), rgba(47, 125, 246, .88));
  box-shadow: 0 12px 24px rgba(25, 126, 184, .18);
}

.hero-uploader strong {
  display: block;
  font-size: 22px;
  letter-spacing: -.04em;
}

.hero-uploader small {
  color: #637386;
  font-size: 15px;
  line-height: 1.7;
}

.mini-workbench {
  width: min(1120px, 100%);
  margin-top: 18px;
  padding: 16px;
  text-align: left;
  border-radius: 28px;
}

.mini-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.tab,
.chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 14px;
  border-radius: 10px;
  background: #f1f7fb;
  color: #344256;
  font-size: 13px;
  font-weight: 760;
}

.tab.active,
.chip.selected {
  color: #fff;
  background: #0f172a;
}

.route {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.ad-slot {
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(70, 106, 132, .28);
  border-radius: 18px;
  color: #789;
  background: rgba(255, 255, 255, .64);
  font-size: 13px;
  font-weight: 760;
}

.ad-slot.large {
  min-height: 96px;
}

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

.queue-card,
.atlas-card,
.settings-card {
  min-height: 300px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.card-title,
.preview-foot,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-title span,
.settings-card b,
.panel-head h2 {
  color: #111827;
  font-weight: 950;
}

.card-title small,
.preview-foot span,
.panel-head span {
  color: #69798d;
  font-size: 13px;
  font-weight: 760;
}

.glyph-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  color: #25344a;
  background: #f3f8fb;
  font-weight: 840;
  overflow: hidden;
}

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

.glyph-row.active {
  outline: 2px solid rgba(36, 214, 200, .42);
  background: #edfffd;
}

.glyph-row em {
  color: #2f7df6;
  font-style: normal;
}

.atlas-card {
  display: grid;
  gap: 14px;
}

.atlas-grid {
  min-height: 220px;
  border-radius: 18px;
  background:
    linear-gradient(rgba(36, 214, 200, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 214, 200, .12) 1px, transparent 1px),
    #07111f;
  background-size: 22px 22px;
  position: relative;
  overflow: hidden;
}

.atlas-grid::before {
  content: "0 1 2 3 A B C 字 % +";
  position: absolute;
  inset: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fbff;
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 950;
  letter-spacing: .08em;
  text-shadow: 0 0 0 #07111f, 3px 3px 0 #07111f;
}

.settings-card {
  display: flex;
  flex-direction: column;
  align-content: stretch;
  gap: 10px;
}

.settings-card b {
  margin-top: 4px;
}

.section {
  padding: 72px 0;
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  color: #07111f;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -.06em;
}

.section-head p {
  margin: 18px 0 0;
  color: #607085;
  font-size: 18px;
  line-height: 1.75;
}

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

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

.workflow-grid article,
.case-card,
.seo-grid article {
  border-radius: 28px;
  padding: 26px;
}

.workflow-grid span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #03121d;
  background: var(--brand-primary);
  font-weight: 950;
}

.workflow-grid h3,
.case-card h3,
.seo-grid h3 {
  margin: 18px 0 0;
  color: #111827;
  font-size: 22px;
  letter-spacing: -.04em;
}

.workflow-grid p,
.case-card p,
.seo-grid p {
  color: #617184;
  line-height: 1.75;
}

.case-image {
  min-height: 120px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #f8fbff;
  background:
    linear-gradient(rgba(36, 214, 200, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 214, 200, .08) 1px, transparent 1px),
    linear-gradient(135deg, #07111f, #13223a);
  background-size: 20px 20px, 20px 20px, auto;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 950;
  letter-spacing: -.04em;
  text-shadow: 3px 3px 0 #07111f;
}

.case-card strong {
  color: #138f96;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 36px 0 48px;
  color: #69798d;
  font-weight: 760;
}

body[data-tool-page="true"] {
  background:
    radial-gradient(circle at 12% 0%, rgba(36, 214, 200, .16), transparent 24rem),
    linear-gradient(180deg, #effbfc 0%, #f8fbff 100%);
}

.tool-page {
  padding: 24px 0 52px;
}

.tool-ad {
  margin-bottom: 18px;
}

.drop-zone {
  position: relative;
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px dashed rgba(32, 198, 196, .42);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 24%, rgba(36, 214, 200, .16), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(239, 250, 252, .88));
  box-shadow: var(--shadow);
  text-align: left;
  overflow: hidden;
}

.drop-zone::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -36px;
  width: 190px;
  height: 120px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(36, 214, 200, .2), rgba(47, 125, 246, .18));
  filter: blur(4px);
}

.font-start-icon {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #07111f;
  background: var(--brand-primary);
  box-shadow: var(--brand-primary-shadow);
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -.08em;
}

.font-start div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.font-start strong {
  color: #111827;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 950;
  letter-spacing: -.055em;
}

.font-start small {
  max-width: 760px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.65;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(460px, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
}

.panel {
  border-radius: 28px;
  padding: 20px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head.compact {
  margin: 0 0 10px;
}

.panel-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.04em;
}

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

.preset-grid button {
  border: 1px solid rgba(125, 147, 169, .24);
  border-radius: 15px;
  padding: 12px 10px;
  color: #223047;
  background: #f3f8fb;
  font-weight: 880;
}

.preset-grid button.active {
  color: #03121d;
  background: var(--brand-primary);
  border-color: rgba(32, 198, 196, .8);
  box-shadow: 0 12px 24px rgba(32, 198, 196, .18);
}

.preset-grid button.active::before {
  content: "✓";
  margin-right: 6px;
}

label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: #263548;
  font-size: 14px;
  font-weight: 880;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(125, 147, 169, .32);
  border-radius: 16px;
  padding: 12px 14px;
  color: #111827;
  background: #f8fbff;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 214px;
  line-height: 1.55;
  font-family: "Cascadia Mono", Consolas, monospace;
}

input[type="range"] {
  padding: 0;
  accent-color: #24d6c8;
}

input[type="color"] {
  height: 46px;
  padding: 6px;
}

input[type="file"] {
  padding: 10px;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  border-radius: 16px;
  background: #f3f8fb;
}

.settings-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  color: #5e6f82;
  background: transparent;
  font-size: 13px;
  font-weight: 880;
}

.settings-tabs button.active {
  color: #03121d;
  background: var(--brand-primary);
  box-shadow: 0 12px 24px rgba(32, 198, 196, .18);
}

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}

.font-file-meta {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #64748b;
  background: #f4f9fb;
  font-size: 12px;
  line-height: 1.45;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.glyph-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 150px;
  overflow: auto;
  margin-top: 16px;
  padding: 12px;
  border-radius: 18px;
  background: #f4f9fb;
}

.glyph-cloud span {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #07111f;
  background: #fff;
  border: 1px solid rgba(125, 147, 169, .22);
  font-weight: 900;
}

.canvas-wrap {
  position: relative;
  min-height: 480px;
  display: grid;
  place-items: center;
  overflow: auto;
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.06) 75%),
    #07111f;
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
}

canvas {
  max-width: 100%;
  height: auto;
  image-rendering: auto;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .24);
}

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

.result-grid div {
  padding: 14px;
  border-radius: 18px;
  background: #f4f9fb;
}

.result-grid span {
  display: block;
  color: #68788b;
  font-size: 12px;
  font-weight: 820;
}

.result-grid strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}

.code-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 22px;
  background: #07111f;
  color: #dff8ff;
}

pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  color: #dff8ff;
  font-size: 12px;
  line-height: 1.65;
}

.note-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 20px;
  color: #324258;
  background: linear-gradient(135deg, rgba(36, 214, 200, .13), rgba(47, 125, 246, .1));
}

.note-box p {
  margin: 8px 0 0;
  color: #5c6d80;
  line-height: 1.65;
}

.reveal {
  animation: reveal .56s ease both;
}

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

@media (max-width: 1080px) {
  .site-nav {
    display: none;
  }

  .hero,
  .tool-layout,
  .mini-grid,
  .workflow-grid,
  .case-grid,
  .seo-grid {
    grid-template-columns: 1fr;
  }

  .tool-status {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    padding-top: 78px;
  }

  .site-header,
  .tool-header {
    min-height: 68px;
    padding: 0 16px;
  }

  .h5-logo-mark,
  .brand-logo-image {
    width: 156px;
    height: auto;
  }

  .brand-tool {
    display: none;
  }

  .button.small {
    display: none;
  }

  .page-shell,
  .tool-page {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding-top: 28px;
  }

  .metrics,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    text-align: left;
  }

  .font-start-icon {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 18px;
    font-size: 24px;
  }

  .font-tile-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .font-tile-grid i {
    width: auto;
    height: 54px;
  }
}
