/* GIF compressor workspace. Shared partials own hero, meta, design note and article. */
.tn-gifc-page { width: min(1180px, calc(100vw - 32px)); margin: 0 auto; }
.tn-gifc-page .tn-gifc-ad { width: min(900px, 100%); margin: 24px auto 28px; }
.tn-gifc-page .tn-gifc-ad--top { margin: 54px auto 28px; }

.tn-gifc-tool {
  --gc-ink: #1a1208;
  --gc-muted: #5a4a30;
  --gc-line: #b8a888;
  --gc-soft: #ddd4be;
  --gc-paper: #faf6ee;
  --gc-wash: #f5efdf;
  --gc-control: #fffaf1;
  --gc-button: #ede6d4;
  --gc-button-hover: #dfd4bb;
  --gc-primary: #6a3b1f;
  --gc-primary-hover: #824826;
  --gc-primary-text: #f7ead1;
  --gc-accent: #c44a00;
  --gc-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  --gc-mono: "Courier New", Courier, monospace;
  display: block;
  min-width: 0;
  margin: 0 auto 18px;
  border-top: 2px solid var(--gc-ink);
  border-bottom: 1px solid var(--gc-line);
  background: var(--gc-paper);
  color: var(--gc-ink);
  -webkit-text-fill-color: var(--gc-ink);
  font-family: var(--gc-sans);
  color-scheme: light;
}
.tn-gifc-tool, .tn-gifc-tool * { box-sizing: border-box; }
.tn-gifc-tool [hidden] { display: none !important; }
.tn-gifc-tool :is(code, pre, kbd, samp) { padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; -webkit-text-fill-color: inherit; box-shadow: none; }
.tn-gifc-tool :is(ul, ol, li) { margin: 0; padding: 0; list-style: none; }

.tn-gifc-tool .tn-gifc-drop {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  min-height: 132px;
  margin: 14px;
  padding: 20px 24px;
  border: 1px dashed var(--gc-line);
  background: var(--gc-wash);
}
.tn-gifc-tool .tn-gifc-drop.is-dragging { border-color: var(--gc-accent); outline: 2px solid var(--gc-accent); outline-offset: 2px; }
.tn-gifc-tool .tn-gifc-drop-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  border: 1px solid var(--gc-ink);
  background: var(--gc-paper);
  font: 900 20px/1 var(--gc-mono);
  letter-spacing: -.06em;
}
.tn-gifc-tool .tn-gifc-drop-mark i { align-self: end; margin: 0 0 13px 2px; color: var(--gc-accent); -webkit-text-fill-color: var(--gc-accent); font: normal 800 20px/1 var(--gc-sans); }
.tn-gifc-tool .tn-gifc-drop-copy { flex: 1 1 auto; min-width: 0; }
.tn-gifc-tool .tn-gifc-drop-copy strong { display: block; color: var(--gc-ink); -webkit-text-fill-color: var(--gc-ink); font: 800 19px/1.35 var(--gc-sans); text-wrap: balance; }
.tn-gifc-tool .tn-gifc-drop-copy p { margin: 8px 0 0; color: var(--gc-muted); -webkit-text-fill-color: var(--gc-muted); font: 400 13px/1.5 var(--gc-sans); }

.tn-gifc-tool .tn-gifc-workspace { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-width: 0; border-top: 1px solid var(--gc-line); }
.tn-gifc-tool .tn-gifc-controls, .tn-gifc-tool .tn-gifc-comparison { display: grid; align-content: start; gap: 16px; min-width: 0; padding: 20px; }
.tn-gifc-tool .tn-gifc-controls { border-right: 1px solid var(--gc-line); background: var(--gc-wash); }
.tn-gifc-tool .tn-gifc-kicker { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 2px; padding: 0 0 9px; border-bottom: 1px solid var(--gc-line); color: var(--gc-ink); -webkit-text-fill-color: var(--gc-ink); font: 900 13px/1.3 var(--gc-mono); }
.tn-gifc-tool .tn-gifc-kicker span { color: var(--gc-muted); -webkit-text-fill-color: var(--gc-muted); font-weight: 700; }
.tn-gifc-tool .tn-gifc-compare-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; border-bottom: 1px solid var(--gc-line); }
.tn-gifc-tool .tn-gifc-compare-head .tn-gifc-kicker { flex: 1 1 auto; margin: 0; border: 0; }
.tn-gifc-tool .tn-gifc-compare-head .tn-gifc-button { flex: 0 0 auto; height: 40px; min-height: 40px; margin-bottom: 8px; }
.tn-gifc-tool .tn-gifc-field { display: grid; align-content: start; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.tn-gifc-tool .tn-gifc-field label { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; margin: 0; padding: 0; color: var(--gc-ink); -webkit-text-fill-color: var(--gc-ink); font: 800 13px/1.4 var(--gc-sans); }
.tn-gifc-tool .tn-gifc-field label small { color: var(--gc-muted); -webkit-text-fill-color: var(--gc-muted); font: 600 11px/1.4 var(--gc-sans); }
.tn-gifc-tool .tn-gifc-field :is(input, select) {
  display: block;
  width: 100%;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--gc-line);
  border-radius: 0;
  background-color: var(--gc-control);
  color: var(--gc-ink);
  -webkit-text-fill-color: var(--gc-ink);
  box-shadow: none;
  outline: none;
  font: 600 14px/1.3 var(--gc-sans);
  font-variant-numeric: lining-nums tabular-nums;
}
.tn-gifc-tool .tn-gifc-field select { appearance: none; padding-right: 27px; background-image: linear-gradient(45deg, transparent 50%, var(--gc-muted) 50%), linear-gradient(135deg, var(--gc-muted) 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.tn-gifc-tool .tn-gifc-field option { background: var(--gc-control); color: var(--gc-ink); -webkit-text-fill-color: var(--gc-ink); }
.tn-gifc-tool .tn-gifc-field input::placeholder { color: var(--gc-ink); -webkit-text-fill-color: var(--gc-ink); font-weight: 400; opacity: .35; }
.tn-gifc-tool .tn-gifc-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.tn-gifc-tool .tn-gifc-hint { min-width: 0; margin: 0; color: var(--gc-muted); -webkit-text-fill-color: var(--gc-muted); font: 400 12px/1.55 var(--gc-sans); overflow-wrap: anywhere; }

.tn-gifc-tool .tn-gifc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.tn-gifc-tool .tn-gifc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--gc-line);
  border-radius: 0;
  background: var(--gc-button);
  color: var(--gc-ink);
  -webkit-text-fill-color: var(--gc-ink);
  box-shadow: none;
  outline: none;
  font: 900 13px/1 var(--gc-mono);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}
.tn-gifc-tool .tn-gifc-button:hover:not(:disabled) { background: var(--gc-button-hover); }
.tn-gifc-tool .tn-gifc-button--primary { border-color: var(--gc-primary); background: var(--gc-primary); color: var(--gc-primary-text); -webkit-text-fill-color: var(--gc-primary-text); }
.tn-gifc-tool .tn-gifc-button--primary:hover:not(:disabled) { border-color: var(--gc-primary-hover); background: var(--gc-primary-hover); }
.tn-gifc-tool .tn-gifc-button:disabled { opacity: .55; cursor: not-allowed; }
.tn-gifc-tool :is(.tn-gifc-button, input, select):focus-visible { outline: 2px solid var(--gc-accent); outline-offset: 2px; }
.tn-gifc-tool #gifcCompress { flex: 1 1 130px; }
.tn-gifc-tool .tn-gifc-status { min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--gc-soft); background: var(--gc-paper); color: var(--gc-muted); -webkit-text-fill-color: var(--gc-muted); font: 500 12px/1.55 var(--gc-sans); overflow-wrap: anywhere; }

.tn-gifc-tool .tn-gifc-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.tn-gifc-tool .tn-gifc-preview { display: grid; grid-template-rows: auto minmax(180px, 1fr); min-width: 0; margin: 0; border: 1px solid var(--gc-line); background: var(--gc-control); }
.tn-gifc-tool .tn-gifc-preview figcaption { display: grid; align-content: start; gap: 3px; min-height: 58px; padding: 9px 10px; border-bottom: 1px solid var(--gc-soft); }
.tn-gifc-tool .tn-gifc-preview figcaption span { color: var(--gc-muted); -webkit-text-fill-color: var(--gc-muted); font: 900 11px/1.3 var(--gc-mono); }
.tn-gifc-tool .tn-gifc-preview figcaption strong { min-width: 0; color: var(--gc-ink); -webkit-text-fill-color: var(--gc-ink); font: 800 12px/1.4 var(--gc-sans); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.tn-gifc-tool .tn-gifc-image { display: grid; place-items: center; min-width: 0; min-height: 210px; padding: 12px; background-image: linear-gradient(45deg, var(--gc-wash) 25%, transparent 25%), linear-gradient(-45deg, var(--gc-wash) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--gc-wash) 75%), linear-gradient(-45deg, transparent 75%, var(--gc-wash) 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.tn-gifc-tool .tn-gifc-image img { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; margin: 0; border: 0; object-fit: contain; outline: 1px solid rgba(0,0,0,.1); outline-offset: 0; }
.tn-gifc-tool .tn-gifc-empty { max-width: 180px; color: var(--gc-muted); -webkit-text-fill-color: var(--gc-muted); font: 500 12px/1.5 var(--gc-sans); text-align: center; }
.tn-gifc-tool .tn-gifc-image img:not([hidden]) + .tn-gifc-empty { display: none; }
.tn-gifc-tool .tn-gifc-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--gc-soft); background: var(--gc-wash); }
.tn-gifc-tool .tn-gifc-savings { min-width: 0; margin: 0; color: var(--gc-ink); -webkit-text-fill-color: var(--gc-ink); font: 800 17px/1.35 var(--gc-sans); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.tn-gifc-tool .tn-gifc-result .tn-gifc-button { flex: 0 0 auto; }

body[data-scheme="dark"] .tn-gifc-tool,
body[data-scheme="inverse"] .tn-gifc-tool,
body[data-scheme="auto"]:is([data-d="dark"], [data-l="dark"], [data-l="inverse"]) .tn-gifc-tool,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-gifc-tool {
  --gc-ink: #f7ead1;
  --gc-muted: #c3b492;
  --gc-line: #826744;
  --gc-soft: #574a37;
  --gc-paper: #241d12;
  --gc-wash: #2a2116;
  --gc-control: #322a1a;
  --gc-button: #2f2115;
  --gc-button-hover: #3a2a1b;
  --gc-primary: #6a3b1f;
  --gc-primary-hover: #824826;
  --gc-primary-text: #f7ead1;
  --gc-accent: #e8823f;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"]:not([data-d="light"]) .tn-gifc-tool { --gc-ink: #f7ead1; --gc-muted: #c3b492; --gc-line: #826744; --gc-soft: #574a37; --gc-paper: #241d12; --gc-wash: #2a2116; --gc-control: #322a1a; --gc-button: #2f2115; --gc-button-hover: #3a2a1b; --gc-primary: #6a3b1f; --gc-primary-hover: #824826; --gc-primary-text: #f7ead1; --gc-accent: #e8823f; color-scheme: dark; }
}
.tn-gifc-tool .tn-gifc-image img { outline-color: rgba(0,0,0,.1); }
body[data-scheme="dark"] .tn-gifc-tool .tn-gifc-image img,
body[data-scheme="inverse"] .tn-gifc-tool .tn-gifc-image img,
body[data-scheme="auto"]:is([data-d="dark"], [data-l="dark"], [data-l="inverse"]) .tn-gifc-tool .tn-gifc-image img,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-gifc-tool .tn-gifc-image img { outline-color: rgba(255,255,255,.1); }

@media (max-width: 760px) {
  .tn-gifc-page { width: calc(100vw - 10px); max-width: 100%; }
  .tn-gifc-page .tn-gifc-ad--top { margin-top: 48px; }
  .tn-gifc-tool .tn-gifc-drop { flex-wrap: wrap; gap: 12px; margin: 8px; padding: 15px; }
  .tn-gifc-tool .tn-gifc-drop-mark { flex-basis: 54px; width: 54px; height: 54px; font-size: 16px; }
  .tn-gifc-tool .tn-gifc-drop-mark i { margin-bottom: 8px; font-size: 16px; }
  .tn-gifc-tool .tn-gifc-drop-copy strong { font-size: 16px; }
  .tn-gifc-tool #gifcBrowse { width: 100%; }
  .tn-gifc-tool .tn-gifc-workspace { grid-template-columns: minmax(0, 1fr); }
  .tn-gifc-tool .tn-gifc-controls { border-right: 0; border-bottom: 1px solid var(--gc-line); }
  .tn-gifc-tool .tn-gifc-controls, .tn-gifc-tool .tn-gifc-comparison { padding: 14px; }
  .tn-gifc-tool .tn-gifc-preview { grid-template-rows: auto minmax(130px, 1fr); }
  .tn-gifc-tool .tn-gifc-image { min-height: 150px; padding: 7px; }
  .tn-gifc-tool .tn-gifc-result { align-items: stretch; flex-direction: column; }
  .tn-gifc-tool .tn-gifc-result .tn-gifc-button { width: 100%; }
}
@media (max-width: 380px) {
  .tn-gifc-tool .tn-gifc-preview-grid { gap: 6px; }
  .tn-gifc-tool .tn-gifc-preview figcaption { padding: 8px 6px; }
  .tn-gifc-tool .tn-gifc-image { min-height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .tn-gifc-tool .tn-gifc-button { transition: none; }
}
