:root {
  --ink: #17201d;
  --muted: #6c7672;
  --paper: #f6f5ef;
  --card: #fffef9;
  --line: #deded4;
  --green: #176b50;
  --green-dark: #0f4e3a;
  --mint: #dff0e7;
  --yellow: #f1c75b;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0, rgba(242, 199, 91, 0.14), transparent 32rem),
    var(--paper);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 6px;
}

.app-shell {
  width: min(1320px, calc(100% - 32px));
  min-height: 680px;
  margin: 22px auto 64px;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 254, 249, 0.9);
  box-shadow: 0 24px 80px rgba(33, 54, 46, 0.08);
}

.tool-sidebar {
  padding: 12px;
  display: grid;
  grid-template-rows: repeat(5, 78px);
  align-content: start;
  gap: 8px;
  border-right: 1px solid var(--line);
  background: #f0f2ec;
}

.tool-nav-card {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d9ddd5;
  border-radius: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tool-nav-card:hover,
.tool-nav-card.active {
  border-color: var(--green);
  background: var(--card);
  transform: translateX(2px);
}

.tool-nav-card.active {
  box-shadow: inset 4px 0 0 var(--green);
}

.sidebar-ad {
  min-height: 180px;
  margin-top: 4px;
  padding-top: 12px;
  overflow: hidden;
  border-top: 1px solid #d9ddd5;
}

.sidebar-ad .adsbygoogle {
  width: 100%;
  min-height: 168px;
}

.tool-nav-card > span:last-child {
  display: block;
}

.tool-nav-card strong,
.tool-nav-card small {
  display: block;
}

.tool-nav-card strong {
  font-size: 14px;
}

.tool-nav-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.mini-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  display: block;
  background: var(--mint);
  transform: scale(0.74);
  transform-origin: left top;
}

.tool-main {
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
}

.app-shell .tool-hero {
  padding: 48px 44px 30px;
  text-align: left;
}

.app-shell .tool-hero .hero-copy {
  margin-left: 0;
  margin-right: 0;
}

.app-shell .workspace {
  width: calc(100% - 48px);
  margin: 0 24px 56px;
  border-radius: 20px;
  box-shadow: 0 14px 44px rgba(33, 54, 46, 0.06);
}

.app-shell .seo-content {
  width: calc(100% - 88px);
}

.home-main .hub-hero {
  padding-top: 110px;
}

.home-main .trust-section {
  margin-top: 70px;
}

.main-nav a {
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--green);
  background: rgba(23, 107, 80, 0.08);
}

.brand {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  transform: rotate(-4deg);
}

.brand-mark::before,
.brand-mark span {
  content: "";
  position: absolute;
  border-radius: 3px;
  background: var(--green);
}

.brand-mark::before {
  width: 8px;
  height: 8px;
  right: 4px;
  top: 4px;
}

.brand-mark span {
  width: 17px;
  height: 9px;
  left: 4px;
  bottom: 4px;
  clip-path: polygon(0 100%, 45% 15%, 66% 54%, 79% 34%, 100% 100%);
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4f5d57;
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.blog-link {
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.blog-link:hover,
.blog-link.active {
  color: var(--green);
  background: rgba(23, 107, 80, 0.09);
}

.blog-main {
  width: min(1120px, calc(100% - 40px));
  margin: 34px auto 90px;
}

.blog-hero {
  max-width: 760px;
  padding: 58px 0 54px;
}

.blog-hero h1,
.article-header h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 68px);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.blog-hero p:last-child,
.article-lead {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.blog-category {
  margin: 0 0 58px;
}

.blog-category-heading {
  margin-bottom: 19px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.blog-category-heading h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.blog-category-heading a {
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

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

.article-card {
  min-height: 228px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--card);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.article-card:hover {
  border-color: #a9c9bb;
  transform: translateY(-3px);
}

.article-card small,
.article-category-label {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-card h3 {
  margin: 18px 0 10px;
  font-size: 20px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.article-card span {
  margin-top: auto;
  padding-top: 20px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.article-main {
  width: min(820px, calc(100% - 40px));
  margin: 42px auto 90px;
}

.article-back {
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.article-header {
  padding: 54px 0 36px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  max-width: 790px;
  margin-top: 18px;
  font-size: clamp(39px, 6vw, 62px);
}

.article-lead {
  max-width: 710px;
  margin: 22px 0 0;
}

.article-body {
  padding-top: 34px;
}

.article-body h2 {
  margin: 42px 0 12px;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.article-body p,
.article-body li {
  color: #55615c;
  font-size: 16px;
  line-height: 1.8;
}

.article-body ul {
  padding-left: 22px;
}

.article-ad {
  width: 100%;
  min-height: 120px;
  margin: 38px 0 8px;
  overflow: hidden;
}

.article-ad .adsbygoogle {
  width: 100%;
  min-height: 120px;
}

.article-cta {
  margin-top: 52px;
  padding: 27px;
  border: 1px solid #b8d6c9;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #edf7f2;
}

.article-cta h2 {
  margin: 5px 0 0;
  font-size: 23px;
}

.tool-cta-button {
  min-width: max-content;
  padding: 13px 17px;
  border-radius: 10px;
  color: white;
  background: var(--green);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #44a47f;
  box-shadow: 0 0 0 4px rgba(68, 164, 127, 0.12);
}

.banner-ad {
  width: min(1180px, calc(100% - 40px));
  height: 90px !important;
  min-height: 90px;
  max-height: 90px;
  margin: 8px auto 18px;
  overflow: hidden;
}

.banner-ad .adsbygoogle {
  width: 100%;
  height: 90px !important;
  min-height: 90px;
  max-height: 90px;
}

.hero {
  padding: 58px 20px 38px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.06;
}

.hero h1 span {
  position: relative;
  color: var(--green);
}

.hero h1 span::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -4px;
  right: -7px;
  bottom: 5px;
  height: 10px;
  border-radius: 50%;
  background: rgba(241, 199, 91, 0.54);
  transform: rotate(-1deg);
}

.hero-copy {
  max-width: 530px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.hub-hero {
  padding-top: 92px;
  padding-bottom: 58px;
}

.tool-hero {
  padding-top: 64px;
  padding-bottom: 34px;
}

.tool-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.tool-hero h1 span {
  display: inline;
}

.tool-grid {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tool-card {
  position: relative;
  min-height: 285px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: var(--card);
  text-decoration: none;
  box-shadow: 0 12px 40px rgba(33, 54, 46, 0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tool-card:hover {
  border-color: #a9c9bb;
  box-shadow: 0 18px 48px rgba(33, 54, 46, 0.11);
  transform: translateY(-4px);
}

.card-number {
  position: absolute;
  top: 25px;
  right: 28px;
  color: #bdc2be;
  font-size: 12px;
  font-weight: 700;
}

.card-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 40px;
  border-radius: 13px;
  background: var(--mint);
  position: relative;
}

.card-icon::before,
.card-icon::after {
  content: "";
  position: absolute;
}

.compress-icon::before {
  inset: 12px;
  border: 2px solid var(--green);
  border-radius: 4px;
}

.compress-icon::after {
  width: 14px;
  height: 14px;
  left: 16px;
  top: 16px;
  border-top: 2px solid var(--green);
  border-left: 2px solid var(--green);
  transform: rotate(45deg);
}

.crop-icon::before {
  width: 20px;
  height: 20px;
  left: 11px;
  top: 11px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
}

.crop-icon::after {
  width: 20px;
  height: 20px;
  right: 11px;
  bottom: 11px;
  border-right: 2px solid var(--green);
  border-top: 2px solid var(--green);
}

.resize-icon::before {
  width: 20px;
  height: 14px;
  left: 13px;
  top: 16px;
  border: 2px solid var(--green);
}

.resize-icon::after {
  left: 8px;
  right: 8px;
  top: 22px;
  border-top: 2px solid var(--green);
}

.convert-icon::before {
  content: "A";
  left: 10px;
  top: 8px;
  color: var(--green);
  font-weight: 800;
}

.convert-icon::after {
  content: "B";
  right: 10px;
  bottom: 8px;
  color: var(--green);
  font-weight: 800;
}

.batch-icon::before {
  width: 15px;
  height: 12px;
  left: 9px;
  top: 9px;
  border: 2px solid var(--green);
  border-radius: 2px;
  box-shadow: 5px 5px 0 -1px var(--mint), 5px 5px 0 1px var(--green);
}

.batch-icon::after {
  width: 8px;
  left: 15px;
  bottom: 8px;
  border-bottom: 2px solid var(--green);
}

.tool-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.tool-card p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.card-link {
  position: absolute;
  left: 30px;
  bottom: 26px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.card-link b {
  margin-left: 6px;
}

.trust-section,
.seo-content {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto 80px;
}

.trust-section {
  padding: 60px 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.trust-section h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.04em;
}

.trust-section > p:last-child {
  max-width: 600px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.75;
}

.seo-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 70px;
  padding-top: 30px;
}

.seo-content section {
  min-width: 0;
}

.seo-content h2 {
  margin: 0 0 14px;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.seo-content p,
.seo-content li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.seo-content ol {
  margin: 0;
  padding-left: 20px;
}

.faq {
  grid-column: 1 / -1;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.faq details p {
  margin: 10px 0 0;
}

.site-footer {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 36px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  color: #929994;
  font-size: 11px;
}

.site-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

.related-projects {
  flex: 1 1 100%;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.related-projects span {
  color: #69736e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.related-projects a {
  color: #6f7974;
  font-size: 11px;
  font-weight: 650;
}

.related-projects a:hover {
  color: var(--green);
}

.cross-project-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: min(248px, calc(100vw - 28px));
  padding: 14px 44px 14px 16px;
  border: 1px solid #a9c9bb;
  border-radius: 15px;
  background: rgba(255, 254, 249, .96);
  box-shadow: 0 16px 42px rgba(20, 49, 39, .18);
  color: var(--ink);
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.cross-project-dock::after {
  content: "↗";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
}

.cross-project-dock small,
.cross-project-dock strong,
.cross-project-dock span {
  display: block;
}

.cross-project-dock small {
  margin-bottom: 4px;
  color: var(--green);
  font: 800 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .11em;
}

.cross-project-dock strong {
  font-size: 14px;
}

.cross-project-dock span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.cross-project-dock:hover {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: 0 19px 48px rgba(20, 49, 39, .23);
}

.batch-workspace {
  width: calc(100% - 48px);
  margin: 0 24px 56px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 14px 44px rgba(33, 54, 46, 0.06);
}

.batch-drop-zone {
  min-height: 210px;
}

.batch-controls {
  padding: 20px 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  align-items: end;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.batch-controls label > span:first-child {
  min-height: 18px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.batch-controls select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  outline: none;
}

.batch-controls select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 80, 0.1);
}

.batch-quality-control {
  padding-bottom: 8px;
}

.secondary-button {
  height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button:disabled {
  color: #a2a9a5;
  cursor: not-allowed;
}

.batch-empty {
  padding: 42px 20px;
  color: #969d99;
  font-size: 13px;
  text-align: center;
}

.batch-list {
  max-height: 360px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.batch-item {
  min-height: 62px;
  padding: 11px 4px;
  border-bottom: 1px solid #ebece6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.batch-item-details {
  min-width: 0;
}

.batch-item-details strong,
.batch-item-details span {
  display: block;
}

.batch-item-details strong {
  max-width: 430px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-item-details span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.batch-item-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.batch-item-status {
  min-width: 62px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.batch-item.processing .batch-item-status {
  color: #9b6c00;
}

.batch-item.done .batch-item-status {
  color: var(--green);
}

.batch-item.error .batch-item-status {
  color: #a63b32;
}

.batch-item-actions button {
  padding: 5px;
  border: 0;
  color: #9a5049;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.batch-item-actions button:disabled {
  opacity: 0.35;
}

.batch-footer {
  padding-top: 18px;
  display: grid;
  grid-template-columns: 1fr minmax(250px, 340px);
  align-items: center;
  gap: 20px;
}

.batch-footer > div span,
.batch-footer > div strong {
  display: block;
}

.batch-footer > div span {
  color: var(--muted);
  font-size: 10px;
}

.batch-footer > div strong {
  margin-top: 4px;
  font-size: 13px;
}

.batch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.batch-compress-button {
  box-shadow: none;
}

.batch-download-button {
  height: 49px;
  padding: 0 14px;
  border-color: #9bc7b5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.batch-download-button:not(:disabled):hover {
  border-color: var(--green);
  background: #edf7f2;
}

.batch-progress {
  height: 4px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5e8e3;
}

.batch-progress span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.workspace {
  width: min(1080px, calc(100% - 40px));
  min-height: 350px;
  margin: 0 auto 50px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 254, 249, 0.92);
  box-shadow: 0 24px 80px rgba(33, 54, 46, 0.08);
  overflow: hidden;
}

.upload-view {
  padding: 30px;
}

.drop-zone {
  width: 100%;
  min-height: 270px;
  padding: 36px 20px;
  border: 1.5px dashed #b9c6bf;
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(-45deg, transparent 0 9px, rgba(23, 107, 80, 0.035) 9px 18px);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--green);
  background-color: var(--mint);
  transform: translateY(-2px);
}

.upload-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 15px;
  border-radius: 50%;
  background: var(--mint);
  position: relative;
}

.upload-icon::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 15px;
  width: 20px;
  height: 16px;
  border: 2px solid var(--green);
  border-radius: 3px;
}

.upload-icon::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--green);
  border-left: 2px solid var(--green);
  transform: rotate(45deg);
}

.drop-zone strong {
  margin-bottom: 6px;
  font-size: 18px;
}

.drop-zone > span:not(.upload-icon) {
  color: var(--muted);
  font-size: 14px;
}

.drop-zone small {
  margin-top: 18px;
  color: #969d99;
  font-size: 12px;
}

.quick-features {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: #66716c;
  font-size: 13px;
}

.quick-features span::before {
  content: "✓";
  margin-right: 7px;
  color: var(--green);
  font-weight: 700;
}

.editor-view {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  min-height: 610px;
}

.editor-view[hidden] {
  display: none;
}

.preview-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
  background: #edeee9;
}

.file-bar,
.panel-heading {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.file-bar div {
  min-width: 0;
}

.file-bar strong {
  max-width: 390px;
  display: block;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-bar span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  padding: 2px;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 470px;
  overflow: hidden;
  border-radius: 12px;
  background-color: #d6d9d4;
  background-image:
    linear-gradient(45deg, #cbd0ca 25%, transparent 25%),
    linear-gradient(-45deg, #cbd0ca 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cbd0ca 75%),
    linear-gradient(-45deg, transparent 75%, #cbd0ca 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  touch-action: none;
}

#preview-canvas {
  position: absolute;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 10px 28px rgba(29, 39, 35, 0.18);
}

.crop-box {
  position: absolute;
  border: 2px solid white;
  box-shadow:
    0 0 0 1px rgba(12, 79, 57, 0.75),
    0 0 0 2000px rgba(10, 18, 15, 0.52);
  cursor: move;
  pointer-events: none;
}

.crop-box::before,
.crop-box::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.45);
}

.crop-box::before {
  top: 33.33%;
  bottom: 33.33%;
  left: -1px;
  right: -1px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
}

.crop-box::after {
  left: 33.33%;
  right: 33.33%;
  top: -1px;
  bottom: -1px;
  border-left: 1px solid rgba(255, 255, 255, 0.55);
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
}

.corner {
  position: absolute;
  width: 15px;
  height: 15px;
  border-color: white;
}

.tl { left: -3px; top: -3px; border-left: 3px solid; border-top: 3px solid; }
.tr { right: -3px; top: -3px; border-right: 3px solid; border-top: 3px solid; }
.bl { left: -3px; bottom: -3px; border-left: 3px solid; border-bottom: 3px solid; }
.br { right: -3px; bottom: -3px; border-right: 3px solid; border-bottom: 3px solid; }

.crop-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  margin: 0;
  padding: 7px 12px;
  border-radius: 99px;
  color: white;
  background: rgba(18, 30, 26, 0.72);
  font-size: 11px;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
}

.control-panel {
  padding: 26px 28px;
  background: var(--card);
}

.panel-heading {
  align-items: center;
  min-height: auto;
  margin-bottom: 5px;
}

.panel-heading p {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

fieldset {
  margin: 0;
  padding: 22px 0;
  border: 0;
  border-bottom: 1px solid #e8e8df;
}

legend,
.legend-row {
  width: 100%;
  margin-bottom: 11px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}

.legend-row {
  display: flex;
  justify-content: space-between;
}

.legend-row legend {
  width: auto;
  margin: 0;
}

.legend-row output {
  color: var(--green);
}

.ratio-options,
.format-options {
  display: grid;
  gap: 7px;
}

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

.chip {
  min-height: 35px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 12px;
  cursor: pointer;
}

.chip.active,
.format-button.active {
  border-color: var(--green);
  color: var(--green);
  background: #edf7f2;
  box-shadow: inset 0 0 0 1px var(--green);
}

.size-row {
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  align-items: end;
  gap: 7px;
}

.size-row label > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.number-input {
  height: 41px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.number-input:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 80, 0.1);
}

.number-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.number-input em {
  color: #9aa09d;
  font-size: 11px;
  font-style: normal;
}

.lock-button {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #8b948f;
  background: white;
  cursor: pointer;
}

.lock-button.active {
  border-color: #9bc7b5;
  color: var(--green);
  background: var(--mint);
}

.format-options {
  grid-template-columns: repeat(3, 1fr);
}

.format-button {
  padding: 10px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.format-button strong,
.format-button small {
  display: block;
}

.format-button strong {
  font-size: 12px;
}

.format-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.range {
  width: 100%;
  height: 4px;
  margin: 4px 0 0;
  accent-color: var(--green);
}

.range-labels {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  color: #9aa09d;
  font-size: 9px;
}

.result-estimate {
  padding: 18px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.result-estimate strong {
  color: var(--ink);
  font-size: 12px;
}

.download-button {
  width: 100%;
  min-height: 49px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: var(--green);
  box-shadow: 0 10px 20px rgba(23, 107, 80, 0.2);
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.download-button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.download-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.status-message {
  min-height: 18px;
  margin: 8px 0 -10px;
  color: var(--green);
  font-size: 11px;
  text-align: center;
}

footer {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 36px;
  display: flex;
  justify-content: space-between;
  color: #929994;
  font-size: 11px;
}

footer p {
  margin: 0;
}

.gif-hub,
.gif-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 86px;
}

.gif-hub-hero {
  max-width: 840px;
  margin: 0 auto;
  padding-top: 34px;
}

.gif-tool-grid {
  margin: 20px 0 76px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gif-tool-card {
  position: relative;
  min-height: 330px;
  padding: 29px;
  border: 1px solid var(--line);
  border-radius: 21px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--card);
  text-decoration: none;
  box-shadow: 0 14px 44px rgba(33, 54, 46, 0.05);
  transition: border-color 160ms ease, transform 160ms ease;
}

.gif-tool-card:hover {
  border-color: #9fc9b7;
  transform: translateY(-4px);
}

.gif-card-number {
  position: absolute;
  top: 28px;
  right: 28px;
  color: #b8bfbb;
  font-size: 11px;
  font-weight: 800;
}

.gif-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--mint);
  font-weight: 800;
}

.gif-tool-card h2 {
  margin: 0 0 11px;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.gif-tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.gif-tool-card strong {
  margin-top: auto;
  padding-top: 24px;
  color: var(--green);
  font-size: 12px;
}

.gif-privacy-note {
  max-width: 780px;
  margin: 0 auto;
  padding: 58px 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.gif-privacy-note h2 {
  margin: 0 0 14px;
  font-size: 36px;
  letter-spacing: -0.04em;
}

.gif-privacy-note > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.gif-tool-hero {
  max-width: 830px;
  margin: 0 auto;
}

.gif-workspace {
  margin: 0 auto 62px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 254, 249, 0.94);
  box-shadow: 0 20px 70px rgba(33, 54, 46, 0.08);
}

.gif-drop-zone {
  min-height: 285px;
}

.gif-editor {
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.75fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.gif-editor[hidden],
.images-gif-editor[hidden] {
  display: none;
}

.gif-preview-panel,
.frame-editor-panel {
  min-width: 0;
  padding: 22px;
  background: #edeee9;
}

.gif-media-stage {
  height: 475px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #d7dad5;
}

.gif-media-stage video,
.gif-media-stage img {
  max-width: 100%;
  max-height: 100%;
}

.gif-controls {
  min-width: 0;
  padding: 25px;
  background: var(--card);
}

.gif-controls > h2 {
  margin: 0 0 21px;
  font-size: 19px;
}

.gif-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}

.gif-control-grid label > span:first-child {
  min-height: 17px;
  margin-bottom: 7px;
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.gif-control-grid select,
.frame-delay input,
.inline-control input {
  width: 100%;
  height: 41px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  outline: none;
}

.gif-control-grid select:focus,
.frame-delay input:focus,
.inline-control input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 80, 0.1);
}

.gif-estimate {
  min-height: 42px;
  margin: 22px 0 13px;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--muted);
  background: #f2f3ee;
  font-size: 11px;
  line-height: 1.55;
}

.gif-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gif-action-row .secondary-button {
  height: auto;
  min-height: 49px;
}

.gif-compare {
  height: 475px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gif-compare figure {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  overflow: hidden;
  background: #d7dad5;
}

.gif-compare img {
  max-width: 100%;
  max-height: 405px;
}

.gif-compare figcaption {
  padding-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

#gif-result-empty {
  color: var(--muted);
  font-size: 12px;
}

.images-gif-editor {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(370px, 0.75fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.frame-editor-panel .file-bar > div:last-child {
  flex: 0 0 auto;
  display: flex;
  gap: 11px;
}

.danger-text {
  color: #a14e46;
}

.frame-list {
  max-height: 555px;
  margin: 10px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.frame-row {
  min-height: 76px;
  padding: 9px 4px;
  border-bottom: 1px solid #daddd7;
  display: grid;
  grid-template-columns: 58px minmax(100px, 1fr) 120px auto;
  align-items: center;
  gap: 11px;
}

.frame-row > img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: white;
}

.frame-details {
  min-width: 0;
}

.frame-details strong,
.frame-details span {
  display: block;
}

.frame-details strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame-details span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.frame-delay {
  position: relative;
}

.frame-delay span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.frame-delay input {
  height: 34px;
  padding-right: 28px;
  font-size: 11px;
}

.frame-delay em {
  position: absolute;
  right: 8px;
  bottom: 10px;
  color: #9aa09d;
  font-size: 8px;
  font-style: normal;
}

.frame-actions {
  display: flex;
  gap: 4px;
}

.frame-actions button {
  width: 29px;
  height: 29px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--green);
  background: white;
  cursor: pointer;
}

.frame-actions button:last-child {
  color: #a14e46;
}

.frame-actions button:disabled {
  opacity: 0.35;
}

.inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.inline-control .secondary-button {
  height: 41px;
}

.images-result-stage {
  min-height: 160px;
  margin: 19px 0 12px;
  padding: 12px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: #edeee9;
  font-size: 11px;
}

.images-result-stage img {
  max-width: 100%;
  max-height: 220px;
}

@media (max-width: 760px) {
  .cross-project-dock {
    right: 10px;
    bottom: 10px;
    width: min(214px, calc(100vw - 20px));
    padding: 11px 38px 11px 13px;
  }

  .cross-project-dock::after {
    right: 11px;
    width: 23px;
    height: 23px;
  }

  .cross-project-dock small {
    display: none;
  }

  .site-header {
    width: min(100% - 28px, 1180px);
    height: 64px;
  }

  .privacy-pill {
    font-size: 11px;
  }

  .banner-ad {
    width: calc(100% - 28px);
    height: 90px !important;
    min-height: 90px;
    max-height: 90px;
    margin-top: 4px;
  }

  .banner-ad .adsbygoogle {
    height: 90px !important;
    min-height: 90px;
    max-height: 90px;
  }

  .header-actions {
    gap: 10px;
  }

  .privacy-pill {
    display: none;
  }

  .blog-link {
    padding-inline: 9px;
    font-size: 12px;
  }

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

  .blog-main,
  .article-main {
    width: calc(100% - 28px);
    margin-top: 15px;
  }

  .blog-hero {
    padding: 38px 0 42px;
  }

  .article-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .article-ad,
  .article-ad .adsbygoogle {
    min-height: 100px;
  }

  .tool-cta-button {
    text-align: center;
  }

  .hero {
    padding: 36px 18px 28px;
  }

  .hero h1 {
    font-size: clamp(39px, 12vw, 58px);
  }

  .tool-hero h1 {
    font-size: 38px;
  }

  .hero-copy {
    font-size: 14px;
  }

  .workspace {
    width: calc(100% - 24px);
    border-radius: 18px;
  }

  .app-shell {
    width: calc(100% - 20px);
    margin-top: 10px;
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .tool-sidebar {
    padding: 10px;
    grid-template-columns: repeat(5, minmax(135px, 1fr));
    grid-template-rows: 92px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-ad {
    display: none !important;
  }

  .tool-nav-card {
    padding: 12px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .tool-nav-card:hover,
  .tool-nav-card.active {
    transform: translateY(-1px);
  }

  .mini-icon {
    flex: 0 0 38px;
  }

  .app-shell .tool-hero {
    padding: 38px 22px 26px;
  }

  .app-shell .workspace {
    width: calc(100% - 20px);
    margin: 0 10px 44px;
  }

  .app-shell .seo-content {
    width: calc(100% - 32px);
  }

  .batch-workspace {
    width: calc(100% - 20px);
    margin: 0 10px 44px;
    padding: 14px;
  }

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

  .batch-quality-control {
    padding-bottom: 5px;
  }

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

  .batch-actions {
    width: 100%;
  }

  .home-main .hub-hero {
    padding-top: 54px;
  }

  .tool-grid {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
  }

  .gif-hub,
  .gif-page {
    width: calc(100% - 20px);
    margin-bottom: 60px;
  }

  .gif-hub-hero {
    padding-top: 28px;
  }

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

  .gif-tool-card {
    min-height: 280px;
  }

  .gif-workspace {
    padding: 10px;
    border-radius: 18px;
  }

  .gif-editor,
  .images-gif-editor {
    grid-template-columns: 1fr;
  }

  .gif-preview-panel,
  .frame-editor-panel {
    padding: 14px;
  }

  .gif-media-stage,
  .gif-compare {
    height: 360px;
  }

  .gif-controls {
    padding: 22px 16px;
  }

  .frame-row {
    grid-template-columns: 50px minmax(80px, 1fr) 105px;
  }

  .frame-row > img {
    width: 50px;
    height: 50px;
  }

  .frame-actions {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }

  .tool-card {
    min-height: 250px;
  }

  .seo-content {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .faq {
    grid-column: auto;
  }

  .upload-view {
    padding: 15px;
  }

  .drop-zone {
    min-height: 260px;
  }

  .quick-features {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 10px 22px;
  }

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

  .preview-column {
    min-height: 430px;
    padding: 15px;
  }

  .canvas-wrap {
    min-height: 355px;
  }

  .control-panel {
    padding: 24px 20px 26px;
  }

  footer {
    width: calc(100% - 28px);
  }

  .related-projects {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
}

@media (max-width: 430px) {
  .brand {
    font-size: 14px;
  }

  .site-header {
    width: calc(100% - 20px);
  }

  .header-actions {
    gap: 2px;
  }

  .blog-link {
    padding-inline: 6px;
    font-size: 10px;
  }

  .privacy-pill {
    max-width: 106px;
    text-align: right;
  }

  .privacy-pill {
    display: none;
  }

  .hero h1 {
    font-size: 40px;
  }

  .format-button small {
    display: none;
  }

  .gif-control-grid,
  .gif-action-row,
  .gif-compare {
    grid-template-columns: 1fr;
  }

  .gif-compare {
    height: auto;
  }

  .gif-compare figure {
    min-height: 280px;
  }

  .frame-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .frame-delay {
    grid-column: 2;
  }

  .frame-actions {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
