:root {
  --bg: #f4f2ed;
  --bg-2: #fffcf7;
  --ink: #161b18;
  --muted: #5d675f;
  --line: #ddd7cb;
  --brand: #1b7a5a;
  --brand-2: #146348;
  --accent: #c45c26;
  --ok: #1b7a5a;
  --err: #b42318;
  --card: #fffcf7;
  --shadow: 0 14px 40px rgba(22, 27, 24, 0.07);
  --radius: 16px;
  --font: "DM Sans", sans-serif;
  --display: "Syne", sans-serif;
  --hero-grad: radial-gradient(900px 420px at 12% -20%, #d5efe3 0%, transparent 55%),
               radial-gradient(700px 360px at 90% 0%, #f0d9c4 0%, transparent 45%),
               linear-gradient(180deg, #f7f4ee 0%, #f0ebe3 100%);
}

html[data-theme="dark"] {
  --bg: #0f1412;
  --bg-2: #171d1a;
  --ink: #e8efe9;
  --muted: #9aa89e;
  --line: #2a342f;
  --brand: #3ecf97;
  --brand-2: #2aa876;
  --accent: #e08a4f;
  --card: #171d1a;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --hero-grad: radial-gradient(900px 420px at 10% -20%, #163528 0%, transparent 55%),
               radial-gradient(700px 360px at 95% 0%, #3a2618 0%, transparent 45%),
               linear-gradient(180deg, #121814 0%, #0e1311 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}
body > main {
  flex: 1 0 auto;
}
body > .site-footer {
  flex-shrink: 0;
  margin-top: auto;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
img { max-width: 100%; display: block; }
.container { width: min(920px, calc(100% - 2rem)); margin-inline: auto; }
.container-wide { width: min(1100px, calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem;
  width: min(1100px, calc(100% - 2rem)); margin-inline: auto;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; color: inherit; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-family: var(--display); font-weight: 800;
}
.brand-text { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-text span { color: var(--brand); }
.brand-logo {
  height: var(--brand-logo-h, 34px);
  width: auto;
  max-width: min(220px, 46vw);
  object-fit: contain;
  display: block;
}
.brand-logo-dark { display: none; }
html[data-theme="dark"] .brand-logo-light { display: none; }
html[data-theme="dark"] .brand-logo-dark { display: block; }
html[data-theme="dark"] .brand-logo-dark.brand-logo-only { display: block; }
html[data-theme="light"] .brand-logo-dark.brand-logo-only { display: none; }
html[data-theme="light"] .brand-logo-light { display: block; }
.nav { display: flex; align-items: center; gap: .95rem; }
.nav a, .link-btn {
  color: var(--muted); font-weight: 500; background: none; border: 0; cursor: pointer; font: inherit;
}
.nav a:hover, .link-btn:hover { color: var(--ink); }
.nav a.btn,
.nav .btn {
  color: #fff !important;
  background: var(--brand);
  border: 0;
  padding: .45rem .9rem;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.nav a.btn:hover,
.nav .btn:hover {
  background: var(--brand-2);
  color: #fff !important;
  transform: translateY(-1px);
}
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .65rem; color: var(--ink); }
.theme-toggle {
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--ink); cursor: pointer;
}
.inline-form { display: inline; margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--brand); color: #fff !important; border: 0; border-radius: 11px;
  padding: .7rem 1.05rem; font-weight: 600; cursor: pointer; font: inherit;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--brand-2); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { padding: .42rem .75rem; border-radius: 9px; font-size: .88rem; }
.btn-ghost {
  background: transparent; color: var(--ink) !important; border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger { background: var(--err); }
.btn-danger:hover { background: #912018; }

.eyebrow {
  display: inline-block; margin: 0 0 .55rem;
  color: var(--brand); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; font-size: .78rem;
}
.hero-clean {
  background: var(--hero-grad);
  padding: 2.6rem 0 1.6rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
  animation: fadeUp .45s ease both;
}
.hero-clean h1 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.12; letter-spacing: -.03em; margin: 0 0 .55rem;
}
.hero-clean .lead {
  margin: 0 auto; color: var(--muted); max-width: 38ch; font-size: 1.02rem;
}

.upload-section { padding: 1.6rem 0 2.4rem; }
.uploader {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.uploader.dragover {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
  transform: translateY(-1px);
}
.uploader.dragover .mascot-scene { transform: scale(1.06); }
.uploader.dragover .mascot-arrow { animation: mascotBounce .45s ease infinite; }
.uploader.dragover .mascot-cta {
  background: var(--brand); color: #fff;
}
.uploader-main {
  text-align: center;
  padding: 2rem 1.2rem 1.5rem;
  cursor: pointer;
  position: relative;
  background:
    radial-gradient(520px 220px at 50% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 35%, var(--card)) 0%, var(--card) 100%);
}
.mascot {
  display: flex;
  justify-content: center;
  margin-bottom: .35rem;
}
.mascot-scene {
  position: relative;
  width: min(200px, 58vw);
  height: 150px;
  transition: transform .25s ease;
}
.mascot-svg {
  width: 100%;
  height: 100%;
  color: var(--ink);
  filter: drop-shadow(0 10px 18px rgba(27, 122, 90, 0.18));
  animation: mascotFloat 3.6s ease-in-out infinite;
}
.mascot-arrow { animation: mascotBounce 1.6s ease-in-out infinite; }
.mascot-photo {
  position: absolute;
  width: 42px;
  height: 52px;
  border-radius: 8px;
  border: 2px solid #fff;
  box-shadow: 0 8px 16px rgba(22, 27, 24, 0.12);
  z-index: 0;
}
.mascot-photo.p1 {
  left: 2%;
  top: 28%;
  background: linear-gradient(145deg, #d5efe3, #8fd4b5);
  transform: rotate(-14deg);
  animation: photoDrift 4.2s ease-in-out infinite;
}
.mascot-photo.p2 {
  right: 0;
  top: 18%;
  background: linear-gradient(145deg, #f0d9c4, #e08a4f);
  transform: rotate(12deg);
  animation: photoDrift 4.2s ease-in-out infinite reverse;
}
.mascot-sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  opacity: .55;
  animation: sparkle 2.4s ease-in-out infinite;
}
.mascot-sparkle.s1 { left: 18%; top: 8%; }
.mascot-sparkle.s2 { right: 16%; top: 12%; animation-delay: .4s; background: var(--accent); }
.mascot-sparkle.s3 { left: 48%; top: 2%; width: 6px; height: 6px; animation-delay: .8s; }
.mascot-badge {
  display: inline-block;
  margin: .15rem 0 .55rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.uploader-main h2 {
  margin: 0 0 .4rem;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  letter-spacing: -.02em;
}
.mascot-lead { margin: 0; color: var(--muted); font-size: 1.02rem; }
.uploader-main .hint { margin-top: .65rem; font-size: .9rem; }
.uploader-main kbd {
  display: inline-block; padding: .1rem .35rem; border: 1px solid var(--line);
  border-radius: 6px; background: var(--bg); font-size: .82rem;
}
.mascot-cta {
  display: inline-flex;
  margin-top: 1rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line));
  color: var(--brand);
  font-weight: 700;
  font-size: .9rem;
  transition: background .2s ease, color .2s ease;
}
.uploader-main:hover .mascot-cta {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
#fileInput { display: none; }

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes mascotBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(5px); opacity: .7; }
}
@keyframes photoDrift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}
@keyframes sparkle {
  0%, 100% { transform: scale(.7); opacity: .25; }
  50% { transform: scale(1.2); opacity: .8; }
}

html[data-theme="dark"] .mascot-photo {
  border-color: #2a342f;
}
html[data-theme="dark"] .mascot-svg {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.uploader-bar {
  display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; justify-content: space-between;
  padding: .9rem 1rem; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, var(--card));
}
.expiry-group { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.expiry-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.expiry-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.pill {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--muted);
  border-radius: 999px; padding: .35rem .7rem; font: inherit; font-size: .84rem; cursor: pointer;
}
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.uploader-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.storage-box {
  padding: 1rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 40%, var(--card));
}
.storage-label {
  display: block; font-weight: 700; margin-bottom: .45rem; font-size: .92rem;
}
.storage-select-wrap { position: relative; }
.storage-select {
  width: 100%; appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink);
  border-radius: 12px; padding: .85rem 2.6rem .85rem .95rem;
  font: inherit; font-weight: 600; cursor: pointer;
}
.storage-select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.storage-select-wrap::after {
  content: "▾"; position: absolute; right: .95rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; font-size: .9rem;
}

.preview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: .65rem; padding: 0 1rem 1rem;
}
.preview-grid:empty { display: none; }
.preview-item {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-2);
  position: relative; aspect-ratio: 1; animation: fadeUp .3s ease both;
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-item .rm {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border: 0; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; cursor: pointer;
}

.results-wrap { margin-top: 1.4rem; }
.results { display: grid; gap: 1rem; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between;
  margin: 0 0 1rem;
}
.toolbar h3 { margin: 0; font-family: var(--display); font-size: 1.15rem; }

.share-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
  padding: 1rem; display: grid; gap: 1rem; box-shadow: var(--shadow); animation: fadeUp .35s ease both;
}
.share-preview {
  display: grid; grid-template-columns: 112px 1fr; gap: .9rem; align-items: center;
}
.share-preview img {
  width: 112px; height: 112px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line);
}
.share-preview strong { display: block; margin-bottom: .2rem; }
.share-preview .muted { margin: 0 0 .55rem; }
.tab-row {
  display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .75rem;
  padding: .25rem; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
}
.tab {
  border: 0; background: transparent; color: var(--muted); border-radius: 9px;
  padding: .45rem .7rem; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 600;
}
.tab.active { background: var(--brand); color: #fff; }
.share-pane { display: none; }
.share-pane.active { display: grid; gap: .55rem; }
.share-pane label, .result-meta label {
  font-size: .78rem; color: var(--muted); display: block; margin-bottom: .15rem; font-weight: 600;
}
.copy-row { display: flex; gap: .5rem; align-items: start; }
.copy-row input, .copy-row textarea,
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 10px; padding: .65rem .75rem; font: inherit;
}
.copy-row textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86rem; resize: vertical; min-height: 74px;
}
.tip { margin: .2rem 0 0; font-size: .85rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .92rem; }

.home-blog { padding: 1rem 0 3rem; }
.home-tools {
  padding: 2rem 0 1.5rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 55%, transparent);
}
.home-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.home-tool-card {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: 1rem 1.05rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.home-tool-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: var(--shadow);
  color: inherit;
}
.home-tool-card .tool-icon {
  width: 40px; height: 40px; flex: 0 0 auto; margin: 0;
}
.home-tool-card .tool-icon svg { width: 20px; height: 20px; }
.home-tool-text { display: grid; gap: .2rem; min-width: 0; }
.home-tool-text strong {
  font-family: var(--display); font-size: 1rem; letter-spacing: -.02em;
}
.home-tool-text small {
  color: var(--muted); font-size: .84rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 900px) {
  .home-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .home-tools-grid { grid-template-columns: 1fr; }
}
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem;
}
.section-head h2 { margin: 0; font-family: var(--display); font-size: 1.45rem; }
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem;
}
.blog-card {
  display: block; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-2); color: inherit; overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.blog-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); color: inherit; }
.blog-card time { color: var(--muted); font-size: .8rem; }
.blog-card h3 { margin: .35rem 0 .4rem; font-family: var(--display); font-size: 1.02rem; line-height: 1.25; }
.blog-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.blog-card-body { padding: .9rem 1rem 1.05rem; }
.blog-cover { aspect-ratio: 16 / 10; background: var(--bg); overflow: hidden; }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-cover-fallback {
  width: 100%; height: 100%; min-height: 140px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.1rem;
}
.blog-cover-fallback.large { min-height: 280px; font-size: 1.6rem; }

.blog-hero {
  background: var(--hero-grad); border-bottom: 1px solid var(--line);
  padding: 2.4rem 0 1.8rem; text-align: center;
}
.blog-hero h1 { margin: 0 0 .45rem; font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.4rem); }
.blog-hero .lead { margin: 0 auto; color: var(--muted); max-width: 40ch; }
.blog-pro { padding: 1.6rem 0 3rem; }
.blog-featured {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.2rem; align-items: center;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg-2);
  margin-bottom: 1.2rem; color: inherit; box-shadow: var(--shadow);
}
.blog-featured:hover { color: inherit; }
.blog-featured-media { min-height: 280px; }
.blog-featured-media img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.blog-featured-body { padding: 1.2rem 1.3rem 1.3rem 0; }
.blog-featured-body h2 { margin: .35rem 0 .55rem; font-family: var(--display); font-size: 1.55rem; line-height: 1.2; }
.blog-featured-body p { color: var(--muted); margin: 0 0 .9rem; }
.text-link { color: var(--brand); font-weight: 700; }

.blog-article { padding-bottom: 3rem; }
.blog-article-cover {
  width: min(1100px, calc(100% - 2rem)); margin: 1.2rem auto 0; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); max-height: 420px;
}
.blog-article-cover img { width: 100%; height: 420px; object-fit: cover; }
.blog-article-hero { padding: 1.4rem 0 0; }
.blog-article-hero h1 { margin: 0 0 .4rem; font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; }
.container.narrow { width: min(760px, calc(100% - 2rem)); }
.blog-lede {
  font-size: 1.12rem; color: var(--muted); border-left: 3px solid var(--brand);
  padding-left: .9rem; margin: 1.2rem 0 1.4rem;
}
.blog-article-content .content { font-size: 1.05rem; line-height: 1.7; }
.blog-article-content .content p { margin: 0 0 1rem; }

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding: 2rem 0 0;
  color: var(--muted);
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  width: min(1100px, calc(100% - 2rem)); margin-inline: auto;
  padding-bottom: 0;
}
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-legal {
  width: min(1100px, calc(100% - 2rem)); margin: 1.2rem auto 0;
  padding-top: 1.1rem; border-top: 1px solid var(--line);
  font-size: .86rem; line-height: 1.65;
}
.footer-legal p { margin: 0 0 .7rem; }
.footer-legal p:last-child { margin-bottom: 0; }
.footer-legal strong { color: var(--ink); }
.footer-host {
  margin-top: 1.2rem;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(520px 120px at 50% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
    color-mix(in srgb, var(--bg-2) 88%, transparent);
  padding: .95rem 0;
}
.footer-host-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  text-align: center;
  flex-wrap: wrap;
}
.footer-host-mark {
  color: var(--brand);
  font-size: .7rem;
  opacity: .85;
}
.footer-host p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  letter-spacing: .01em;
}
.footer-host strong {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
}
.footer-host a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  transition: color .15s ease, border-color .15s ease;
}
.footer-host a:hover {
  color: var(--brand-2);
  border-bottom-color: var(--brand-2);
}

.ad-slot {
  min-height: 0; border: 1px dashed var(--line); border-radius: 14px;
  padding: .85rem; color: var(--muted); font-size: .85rem; margin: 1rem 0;
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
}
.ad-slot:empty { display: none; }
.ad-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 1rem; width: 100%;
}
.ad-item {
  display: flex; justify-content: center; align-items: center;
  max-width: 100%;
}
.ad-item img, .ad-item iframe, .ad-item ins {
  max-width: 100%; height: auto; display: block; margin-inline: auto;
  border-radius: 8px;
}
.ad-link { display: inline-flex; max-width: 100%; }
.ad-slot.ad-pair.ad-top .ad-row,
.ad-slot.ad-pair.ad-bottom .ad-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  max-width: 980px;
  margin-inline: auto;
}
.ad-slot.ad-pair.ad-top .ad-item,
.ad-slot.ad-pair.ad-bottom .ad-item {
  flex: 0 1 calc(50% - 0.5rem);
  max-width: min(480px, 100%);
  width: calc(50% - 0.5rem);
}
@media (max-width: 700px) {
  .ad-slot.ad-pair.ad-top .ad-item,
  .ad-slot.ad-pair.ad-bottom .ad-item {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
}

/* Sol / sağ: her zaman dikey (skyscraper) */
.ad-slot.ad-left,
.ad-slot.ad-right {
  margin: 0;
  width: 100%;
}
.ad-slot.ad-left .ad-row,
.ad-slot.ad-right .ad-row,
.ad-slot.ad-left.ad-pair .ad-row,
.ad-slot.ad-right.ad-pair .ad-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: .85rem;
  max-width: none;
  margin: 0;
}
.ad-slot.ad-left .ad-item,
.ad-slot.ad-right .ad-item,
.ad-slot.ad-left.ad-pair .ad-item,
.ad-slot.ad-right.ad-pair .ad-item {
  flex: 0 0 auto;
  width: 100%;
  max-width: 160px;
}
.ad-slot.ad-left .ad-item img,
.ad-slot.ad-right .ad-item img,
.ad-slot.ad-left .ad-item iframe,
.ad-slot.ad-right .ad-item iframe {
  width: 100%;
  max-width: 160px;
  height: auto;
}

.home-with-ads {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: start;
}
.home-with-ads.has-left.has-right {
  grid-template-columns: 160px minmax(0, 1fr) 160px;
}
.home-with-ads.has-left:not(.has-right) {
  grid-template-columns: 160px minmax(0, 1fr);
}
.home-with-ads.has-right:not(.has-left) {
  grid-template-columns: minmax(0, 1fr) 160px;
}
.home-main-col { min-width: 0; }
.ad-rail {
  position: sticky;
  top: 78px;
  width: 160px;
  justify-self: center;
}
.ad-rail .ad-slot {
  margin: 0;
  padding: .5rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (max-width: 1100px) {
  .home-with-ads.has-left.has-right,
  .home-with-ads.has-left:not(.has-right),
  .home-with-ads.has-right:not(.has-left) {
    grid-template-columns: 1fr;
  }
  .ad-rail {
    position: static;
    width: 100%;
    max-width: 160px;
    margin-inline: auto;
  }
  .home-main-col { order: 1; }
  .ad-rail-left { order: 2; }
  .ad-rail-right { order: 3; }
  .ad-slot.ad-left .ad-row,
  .ad-slot.ad-right .ad-row {
    flex-direction: column;
  }
}

.error-page {
  width: min(480px, calc(100% - 2rem));
  margin: 3rem auto;
  text-align: center;
  padding: 2rem 1.4rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.error-page h1 {
  font-family: var(--display);
  margin: 0 0 .6rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.error-page .btn { margin-top: 1rem; }
.password-box h1 {
  font-family: var(--display);
  font-size: 1.45rem;
  margin: 0 0 .4rem;
  text-align: center;
}
.password-box > .muted { text-align: center; }
.password-form { margin-top: 1rem; display: grid; gap: .75rem; }
.password-box-upload input.storage-select {
  width: 100%;
}
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}
.password-field input {
  width: 100%;
  padding-right: 4.6rem !important;
}
.password-toggle {
  position: absolute;
  right: .45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  padding: .35rem .6rem;
  border-radius: 8px;
  cursor: pointer;
}
.password-toggle:hover {
  background: color-mix(in srgb, var(--brand) 20%, transparent);
}
.turnstile-field {
  display: flex;
  justify-content: center;
  margin: .2rem 0 .85rem;
}
.auth-box, .panel-box, .page-box {
  width: min(480px, calc(100% - 2rem)); margin: 2.5rem auto; padding: 1.6rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.page-box { width: min(820px, calc(100% - 2rem)); }
.auth-box h1, .panel-box h1, .page-box h1 {
  font-family: var(--display); margin: 0 0 1rem; font-size: 1.7rem;
}
.muted { color: var(--muted); }
.grid-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem;
}
.img-card {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-2);
}
.img-card img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.img-card .body { padding: .7rem .8rem; font-size: .88rem; }
.blog-list { display: grid; gap: 1rem; padding: 2rem 0; }
.blog-item {
  padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2);
}
.blog-item h2 { margin: 0 0 .4rem; font-family: var(--display); font-size: 1.25rem; }
.blog-item h2 a { color: inherit; }

.toast {
  position: relative;
  z-index: 80;
  width: min(720px, calc(100% - 2rem));
  margin: .85rem auto 0;
  padding: .8rem 1.05rem;
  border-radius: 12px;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: fadeUp .35s ease;
}
.toast-ok {
  background: color-mix(in srgb, var(--ok) 14%, var(--bg-2));
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 32%, var(--line));
}
.toast-err {
  background: color-mix(in srgb, var(--err) 12%, var(--bg-2));
  color: var(--err);
  border: 1px solid color-mix(in srgb, var(--err) 32%, var(--line));
}
.toast-float {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  margin: 0;
  width: min(420px, calc(100% - 1.5rem));
  z-index: 90;
}

.cookie-bar {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50;
  max-width: 720px; margin: auto; display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; box-shadow: var(--shadow);
}
.cookie-bar[hidden] { display: none !important; }

.to-top {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60;
  width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--brand); color: #fff; cursor: pointer; font: inherit; font-size: 1.2rem;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--brand-2); }

.admin-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.pager { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.pager .pager-info { color: var(--muted); font-size: .88rem; margin-right: .35rem; }

.report-box {
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: .85rem;
}
.report-box summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}
.report-box summary::-webkit-details-marker { display: none; }
.report-box summary::before {
  content: '▸ ';
  color: var(--brand);
}
.report-box[open] summary::before { content: '▾ '; }
.report-form {
  margin-top: .85rem;
  display: grid;
  gap: .7rem;
  max-width: 420px;
}
.report-form .field label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .3rem;
}
.report-form select,
.report-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  padding: .6rem .75rem;
  font: inherit;
}
.report-status.ok { color: var(--ok); font-weight: 600; }
.report-status.err { color: var(--err); font-weight: 600; }


.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .7rem .55rem; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .85rem 1rem; overflow: auto;
  font-size: .88rem;
}

/* API docs */
.docs {
  width: min(1100px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.2rem;
  align-items: start;
}
.docs-nav {
  position: sticky; top: 84px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); padding: .9rem;
}
.docs-nav a {
  display: block; padding: .45rem .55rem; border-radius: 8px; color: var(--muted); font-size: .92rem;
}
.docs-nav a:hover { background: var(--bg); color: var(--ink); }
.docs-main { display: grid; gap: 1rem; }
.docs-hero, .docs-card {
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow);
}
.docs-hero h1 { margin: 0 0 .4rem; font-family: var(--display); font-size: 1.8rem; }
.docs-hero p { margin: 0; color: var(--muted); }
.docs-card h2 { margin: 0 0 .7rem; font-family: var(--display); font-size: 1.2rem; }
.docs-card h3 { margin: 1rem 0 .45rem; font-size: 1rem; }
.method {
  display: inline-flex; align-items: center; gap: .45rem; font-family: ui-monospace, monospace;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .75rem; margin-bottom: .8rem;
}
.method .verb {
  background: var(--brand); color: #fff; border-radius: 6px; padding: .15rem .45rem; font-size: .78rem; font-weight: 700;
}
.method .verb.get { background: #2563eb; }
.param-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; font-size: .9rem; }
.param-table th, .param-table td { border-bottom: 1px solid var(--line); text-align: left; padding: .5rem .35rem; }
.param-table code { font-size: .84rem; }
.docs-key {
  display: flex; gap: .5rem; align-items: center; margin-top: .9rem;
}
.docs-key input { flex: 1; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-body { padding: 1.1rem; }
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: relative; top: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
}
@media (max-width: 760px) {
  .site-header { position: sticky; }
  .header-inner { position: relative; min-height: 58px; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: color-mix(in srgb, var(--bg-2) 96%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: .75rem 1rem 1rem;
    box-shadow: var(--shadow);
    animation: fadeUp .22s ease;
  }
  .nav.open { display: flex; }
  .nav a, .nav .link-btn, .nav .btn {
    padding: .75rem .85rem; border-radius: 12px; width: 100%;
    justify-content: flex-start;
  }
  .nav a.btn, .nav .btn {
    color: #fff !important;
    background: var(--brand);
    justify-content: center;
    text-align: center;
  }
  .nav a:hover, .nav .link-btn:hover { background: var(--bg); color: var(--ink); }
  .nav a.btn:hover, .nav .btn:hover { background: var(--brand-2); color: #fff !important; }
  .nav .theme-toggle { align-self: flex-start; margin-top: .35rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 42px; }
  .share-preview { grid-template-columns: 1fr; }
  .share-preview img { width: 100%; height: 180px; }
  .blog-grid { grid-template-columns: 1fr; }
  .uploader-bar { align-items: stretch; flex-direction: column; gap: .75rem; }
  .uploader-actions { width: 100%; justify-content: stretch; }
  .uploader-actions .btn { flex: 1; min-height: 46px; }
  .dropzone { padding: 1.6rem 1rem; min-height: 180px; border-radius: 18px; }
  .hero h1, .page-hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .hero p, .page-hero p { font-size: 1rem; }
  .container, .container-wide, .header-inner { width: min(100% - 1.25rem, 1100px); }
  .footer-inner { grid-template-columns: 1fr; gap: 1.2rem; }
  .footer-legal { font-size: .82rem; line-height: 1.55; }
  .cookie-bar {
    left: .75rem; right: .75rem; bottom: .75rem; width: auto;
    flex-direction: column; align-items: stretch; gap: .75rem; text-align: left;
  }
  .toast-float {
    left: .75rem; right: .75rem; width: auto;
    transform: none;
    bottom: .85rem;
  }
  .field input, .field select, .field textarea, .auth-card input {
    font-size: 16px; /* iOS zoom prevention */
    min-height: 46px;
  }
  .code-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .result-card { border-radius: 14px; }
  .to-top { right: .85rem; bottom: .85rem; width: 44px; height: 44px; }
}
@media (max-width: 420px) {
  .brand-text { font-size: 1.05rem; }
  .preview-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .btn { min-height: 44px; }
}

/* —— Tools studio —— */
.tools-hero {
  background: var(--hero-grad);
  border-bottom: 1px solid var(--line);
  padding: 2.6rem 0 2rem;
  text-align: center;
  animation: fadeUp .45s ease both;
}
.tools-hero-sm { padding: 1.8rem 0 1.2rem; text-align: left; }
.tools-hero-sm .container { text-align: left; }
.tools-hero h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(1.7rem, 3.8vw, 2.6rem); margin: 0 0 .55rem;
}
.tools-hero .lead { margin: 0 auto; color: var(--muted); max-width: 42ch; }
.tools-hero-sm .lead { margin: 0; max-width: 48ch; }
.tools-hero .eyebrow a { color: inherit; }
.tools-catalog { padding: 2rem 0 3rem; }
.tools-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
}
.tool-card {
  display: flex; flex-direction: column; gap: .45rem;
  padding: 1.25rem 1.2rem 1.1rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  color: inherit; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  animation: fadeUp .5s ease both;
}
.tool-card:hover {
  transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: var(--shadow); color: inherit;
}
.tool-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  margin-bottom: .35rem;
}
.tool-icon svg { width: 22px; height: 22px; }
.tool-card h2 {
  font-family: var(--display); font-size: 1.15rem; margin: 0; letter-spacing: -.02em;
}
.tool-card p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.tool-cta { color: var(--brand); font-weight: 600; font-size: .9rem; margin-top: .4rem; }
.tools-note { text-align: center; margin: 1.6rem 0 0; font-size: .9rem; }

.tools-hero-pro {
  text-align: left;
  padding: 3rem 0 2.4rem;
  overflow: hidden;
}
.tools-hero-inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2rem;
  align-items: center;
}
.tools-hero-copy .lead {
  margin: 0 0 1.2rem;
  max-width: 38ch;
}
.tools-hero-actions {
  display: flex; flex-wrap: wrap; gap: .65rem;
}
.tools-hero-visual {
  position: relative; min-height: 220px;
  display: grid; place-items: center;
}
.tools-orb {
  position: absolute; border-radius: 50%; filter: blur(2px);
  animation: toolsFloat 6s ease-in-out infinite;
}
.tools-orb-a {
  width: 180px; height: 180px;
  background: color-mix(in srgb, var(--brand) 28%, transparent);
  top: 10%; left: 18%;
}
.tools-orb-b {
  width: 120px; height: 120px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  bottom: 8%; right: 16%;
  animation-delay: -2s;
}
.tools-mock {
  position: relative; z-index: 1;
  width: min(260px, 70%);
  aspect-ratio: 4/3;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: var(--shadow);
  display: grid; gap: .45rem; padding: .85rem;
  animation: fadeUp .6s ease both;
}
.tools-mock span {
  display: block; border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 12%, var(--bg));
}
.tools-mock span:nth-child(1) { height: 58%; }
.tools-mock span:nth-child(2) { height: 12%; width: 72%; }
.tools-mock span:nth-child(3) { height: 12%; width: 48%; }
@keyframes toolsFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.tools-section-head { margin-bottom: 1.1rem; }
.tool-card-pro {
  position: relative;
  min-height: 210px;
  padding-top: 1.4rem;
}
.tool-card-num {
  position: absolute; top: .85rem; right: 1rem;
  font-family: var(--display); font-weight: 800;
  font-size: .9rem; color: color-mix(in srgb, var(--brand) 35%, var(--muted));
}
.tools-trust {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-2) 80%, transparent);
}
.tools-trust strong {
  display: block;
  font-family: var(--display);
  margin-bottom: .25rem;
}
.tools-trust p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
@media (max-width: 900px) {
  .tools-hero-inner { grid-template-columns: 1fr; }
  .tools-hero-visual { min-height: 160px; order: -1; }
  .tools-trust { grid-template-columns: 1fr; }
}

.studio-section { padding: 1.2rem 0 2.8rem; }
.studio-layout {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1.1rem; align-items: start;
}
.studio-side {
  position: sticky; top: 76px;
  display: grid; gap: .85rem;
}
.studio-tools-nav {
  display: flex; flex-wrap: wrap; gap: .35rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: .55rem;
}
.studio-tools-nav a {
  color: var(--muted); font-size: .84rem; font-weight: 500;
  padding: .4rem .65rem; border-radius: 9px;
}
.studio-tools-nav a:hover { color: var(--ink); background: var(--bg); }
.studio-tools-nav a.active {
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand);
}
.studio-panel {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 1rem;
}
.studio-panel h3 {
  font-family: var(--display); margin: 0 0 .85rem; font-size: 1.05rem;
}
.studio-panel .field { margin-bottom: .75rem; }
.studio-panel .field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.studio-panel input[type="number"],
.studio-panel input[type="text"],
.studio-panel select,
.studio-panel input[type="range"] {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); padding: .55rem .7rem; font: inherit;
}
.studio-panel input[type="range"] { padding: .35rem 0; }
.btn-block { width: 100%; margin-top: .45rem; }
.btn-row { display: flex; gap: .45rem; margin-bottom: .75rem; }
.btn-row .btn { flex: 1; }
.check { display: flex; align-items: center; gap: .45rem; margin-bottom: .75rem; font-size: .92rem; }
.studio-actions { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.studio-meta { margin: .75rem 0 0; font-size: .84rem; }

.studio-main { min-width: 0; }
.studio-drop {
  min-height: 480px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); box-shadow: var(--shadow);
  display: grid; place-items: center; position: relative; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.studio-drop.dragover {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.studio-empty { text-align: center; padding: 2rem 1rem; }
.studio-empty h2 { font-family: var(--display); font-size: 1.25rem; margin: 0 0 .4rem; }
.studio-canvas-wrap {
  position: relative; display: inline-block; max-width: 100%;
  padding: 1rem; margin: 0 auto;
}
#stage { display: block; max-width: 100%; border-radius: 8px; }
.crop-overlay {
  position: absolute; left: 1rem; top: 1rem;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(15, 20, 18, 0.45);
  border-radius: 2px;
}
.crop-box {
  position: absolute; border: 2px solid #fff; box-sizing: border-box;
  pointer-events: auto; cursor: move;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.crop-handle {
  position: absolute; width: 12px; height: 12px; background: #fff;
  border: 1px solid var(--brand); border-radius: 2px; pointer-events: auto;
}
.crop-handle.n { top: -6px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.crop-handle.s { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.crop-handle.e { right: -6px; top: 50%; transform: translateY(-50%); cursor: e-resize; }
.crop-handle.w { left: -6px; top: 50%; transform: translateY(-50%); cursor: w-resize; }
.crop-handle.nw { left: -6px; top: -6px; cursor: nw-resize; }
.crop-handle.ne { right: -6px; top: -6px; cursor: ne-resize; }
.crop-handle.sw { left: -6px; bottom: -6px; cursor: sw-resize; }
.crop-handle.se { right: -6px; bottom: -6px; cursor: se-resize; }

@media (max-width: 960px) {
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-layout { grid-template-columns: 1fr; }
  .studio-side { position: static; }
  .studio-drop { min-height: 360px; }
}
@media (max-width: 560px) {
  .tools-grid { grid-template-columns: 1fr; }
}
