:root {
  color-scheme: light;
  --bg: #f7f2e9;
  --bg-deep: #f6e7d6;
  --card: #ffffff;
  --ink: #2b2520;
  --muted: #6f6259;
  --accent: #d96c45;
  --accent-strong: #b24a26;
  --stroke: rgba(43, 37, 32, 0.12);
  --shadow: 0 24px 60px rgba(43, 37, 32, 0.16);
  --max-shell: 1180px;
}

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

body {
  font-family: "Space Grotesk", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(217, 108, 69, 0.25), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(178, 74, 38, 0.2), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(243, 200, 161, 0.5), transparent 50%);
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  padding: 24px 8vw 0;
  width: min(var(--max-shell), 100%);
  margin: 0 auto;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.lang-switch {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 999px;
  background: var(--bg-deep);
  border: 1px solid rgba(217, 108, 69, 0.18);
  box-shadow: 0 12px 24px rgba(217, 108, 69, 0.12);
}

.lang-btn {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.65);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease,
    transform 120ms ease, box-shadow 120ms ease;
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: rgba(217, 108, 69, 0.4);
  box-shadow: 0 10px 20px rgba(217, 108, 69, 0.28);
  transform: translateY(-1px);
}

.lang-btn:hover {
  border-color: rgba(217, 108, 69, 0.35);
}

.back-link {
  text-decoration: none;
  color: var(--accent-strong);
  font-weight: 600;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-link > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(217, 108, 69, 0.14);
}

.back-link:hover {
  color: var(--accent);
}

.back-link:hover > span:first-child {
  background: rgba(217, 108, 69, 0.22);
}

.tool-hero {
  padding: 32px 8vw 16px;
  display: grid;
  gap: 12px;
  width: min(var(--max-shell), 100%);
  margin: 0 auto;
}

.tool-hero h1 {
  font-size: clamp(2.6rem, 4vw, 4rem);
  letter-spacing: -0.02em;
}

.tool-hero p {
  color: var(--muted);
  max-width: 760px;
  line-height: 1.6;
  font-size: 1.08rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--accent-strong);
  font-weight: 600;
}

.tool-main {
  padding: 0 8vw 64px;
  display: grid;
  gap: 24px;
  width: min(var(--max-shell), 100%);
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.card h2 {
  font-size: 1.3rem;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

label {
  font-size: 0.9rem;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
}

textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.5;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(43, 37, 32, 0.08);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease,
    border-color 120ms ease;
}

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

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(217, 108, 69, 0.3);
}

.btn--primary:hover {
  box-shadow: 0 14px 26px rgba(217, 108, 69, 0.35);
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--stroke);
}

.btn--ghost:hover {
  border-color: rgba(217, 108, 69, 0.35);
  background: rgba(255, 255, 255, 0.72);
}

.dropzone {
  border: 2px dashed rgba(217, 108, 69, 0.35);
  border-radius: 22px;
  padding: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 8px;
}

.dropzone.dragover {
  background: rgba(217, 108, 69, 0.08);
  border-color: var(--accent);
}

.file-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.file-item {
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
}

.file-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.file-name {
  font-weight: 600;
}

.file-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(43, 37, 32, 0.08);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 120ms ease;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.note {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(217, 108, 69, 0.12);
  color: var(--accent-strong);
  font-size: 0.9rem;
}


.support-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  background:
    linear-gradient(135deg, #24110a, #6d210f 52%, #ff7a18),
    radial-gradient(circle at 10% 0%, rgba(255, 232, 87, 0.45), transparent 34%);
  border: 2px solid rgba(255, 232, 87, 0.86);
  color: #fff9df;
  box-shadow: 0 20px 52px rgba(178, 74, 38, 0.34), 0 0 0 4px rgba(255, 232, 87, 0.18);
}

.support-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #ffe857;
  color: #2b170d;
  font-size: 1.7rem;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(43, 37, 32, 0.12);
}

.support-card__content {
  display: grid;
  gap: 6px;
}

.support-card__kicker {
  color: #ffe857;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-card__content h2 {
  color: #fff;
  font-size: 1.18rem;
}

.support-card__content p {
  color: rgba(255, 249, 223, 0.9);
  line-height: 1.55;
}

.support-card__note {
  font-size: 0.82rem;
}

.support-card__link {
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  background: #ffe857;
  color: #2b170d;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.support-card__link:hover {
  background: #fff3a2;
  color: #2b170d;
}

.content-block {
  display: grid;
  gap: 14px;
}

.content-block h3 {
  font-size: 1.05rem;
}

.content-block p,
.content-block li {
  color: var(--muted);
  line-height: 1.7;
}

.content-block ol,
.content-block ul {
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 8px;
}

.faq-item h3 {
  font-size: 1rem;
}

.status {
  font-size: 0.9rem;
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.6);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
}

.segmented button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(217, 108, 69, 0.28);
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .topbar__actions {
    margin-left: 0;
  }

  .topbar,
  .tool-hero,
  .tool-main {
    padding-left: 6vw;
    padding-right: 6vw;
  }

  .tool-hero h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .tool-hero p {
    font-size: 1rem;
  }

  .support-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .support-card__link {
    width: 100%;
  }

}

.support-hero {
  padding-bottom: 8px;
}

.support-eyebrow {
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.support-main {
  max-width: 980px;
}

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

.support-options__coffee {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: rgba(217, 108, 69, 0.12);
  box-shadow: inset 0 0 0 1px rgba(217, 108, 69, 0.18);
  font-size: 2rem;
  flex-shrink: 0;
}

.support-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
  gap: 18px;
}

.support-method {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.support-method--featured {
  border-color: rgba(217, 108, 69, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 237, 0.96));
}

.support-method__icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(217, 108, 69, 0.12);
  font-size: 1.35rem;
}

.support-method__body {
  display: grid;
  gap: 10px;
}

.support-method__label {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.support-method__body p {
  color: var(--muted);
  line-height: 1.6;
}

.support-method__button {
  width: fit-content;
  justify-self: start;
  align-self: start;
  text-decoration: none;
}

.qr-placeholder {
  min-height: 150px;
  border: 1px dashed rgba(178, 74, 38, 0.38);
  border-radius: 20px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px;
  background: rgba(246, 231, 214, 0.45);
  color: var(--muted);
  text-align: center;
}

.qr-placeholder span {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #fff;
  color: var(--accent-strong);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(217, 108, 69, 0.16);
}

.qr-placeholder strong {
  color: var(--ink);
}

.qr-placeholder small {
  color: var(--muted);
}

.support-method--china {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 255, 247, 0.96));
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.qr-card {
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.qr-card:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 108, 69, 0.32);
  box-shadow: 0 14px 26px rgba(43, 37, 32, 0.12);
}

.qr-card img {
  width: 100%;
  max-width: 220px;
  height: auto;
  justify-self: center;
  border-radius: 14px;
  border: 1px solid rgba(43, 37, 32, 0.1);
  background: #fff;
}

.qr-card strong {
  font-size: 0.98rem;
}

.qr-card small,
.support-method__hint {
  color: var(--muted);
}

.support-method__hint {
  font-size: 0.92rem;
}

.support-note-card ul {
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.support-note-card li {
  color: var(--muted);
  line-height: 1.6;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

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

.tool-card-link {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(217, 108, 69, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.tool-card-link:hover,
.tool-card-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(217, 108, 69, 0.34);
  box-shadow: 0 14px 26px rgba(43, 37, 32, 0.1);
}

.tool-card-link span {
  color: var(--accent-strong);
  font-weight: 800;
}

.tool-card-link small {
  color: var(--muted);
  line-height: 1.5;
}

.pill-link {
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}

.pill-link:hover,
.pill-link:focus-visible {
  background: var(--accent);
  color: #fff;
}

.floating-support {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: flex-start;
  filter: drop-shadow(0 18px 34px rgba(178, 74, 38, 0.42));
  animation: floating-support-bob 2.8s ease-in-out infinite;
}

.floating-support__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 11px 48px 11px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff066, #ff9f1c 56%, #ff4d00);
  color: #2b170d;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 5px rgba(255, 232, 87, 0.25), inset 0 -3px 0 rgba(43, 23, 13, 0.16);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-decoration: none;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.floating-support__link:hover,
.floating-support__link:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 0 6px rgba(255, 232, 87, 0.34), inset 0 -3px 0 rgba(43, 23, 13, 0.16);
  filter: saturate(1.08);
}

.floating-support__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2b170d;
  color: #fff6c7;
  font-size: 1.25rem;
  box-shadow: 0 8px 18px rgba(43, 23, 13, 0.28);
  animation: floating-support-wiggle 1.7s ease-in-out infinite;
}

.floating-support__text {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.floating-support__title {
  font-size: 1rem;
}

.floating-support__hint {
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.78;
}

.floating-support__close {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: #2b170d;
  color: #fff6c7;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(43, 23, 13, 0.3);
  transition: transform 140ms ease, background 140ms ease;
}

.floating-support__close:hover,
.floating-support__close:focus-visible {
  transform: scale(1.08);
  background: #4b2411;
}

.floating-support__shine {
  position: absolute;
  inset: -120% auto -120% -35%;
  width: 42%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.66), transparent);
  pointer-events: none;
  animation: floating-support-shine 2.4s ease-in-out infinite;
}

.floating-support--dismissed {
  animation: none;
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes floating-support-bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes floating-support-wiggle {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  20% {
    transform: rotate(-8deg) scale(1.04);
  }
  40% {
    transform: rotate(7deg) scale(1.04);
  }
  60% {
    transform: rotate(-4deg) scale(1.02);
  }
  80% {
    transform: rotate(3deg) scale(1.02);
  }
}

@keyframes floating-support-shine {
  0% {
    left: -45%;
  }
  48%, 100% {
    left: 115%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-support,
  .floating-support__icon,
  .floating-support__shine {
    animation: none;
  }
}

@media (max-width: 720px) {
  .floating-support {
    right: 12px;
    bottom: 12px;
  }

  .floating-support__link {
    min-height: 50px;
    padding: 9px 42px 9px 12px;
  }

  .floating-support__icon {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }

  .floating-support__title {
    font-size: 0.9rem;
  }

  .floating-support__hint {
    display: none;
  }
}
