.tn-photo-page {
  --photo-paper: #faf6ee;
  --photo-wash: #f0e8d7;
  --photo-ink: #241a0e;
  --photo-muted: #645139;
  --photo-line: #b8a888;
  --photo-soft: #ddd4be;
  --photo-button: #ede6d4;
  --photo-button-text: #241a0e;
  --photo-action-line: #b8a888;
  --photo-hover: #dfd4bb;
  --photo-primary: #382311;
  --photo-primary-hover: #633511;
  --photo-primary-text: #f7ead1;
  --photo-focus: #963d0b;
  --photo-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif;
  --photo-mono: "Courier New", Courier, monospace;
  color: var(--photo-ink);
  -webkit-text-fill-color: var(--photo-ink);
}
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-d="dark"], [data-scheme="auto"][data-l="dark"]) .tn-photo-page,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-photo-page {
  --photo-paper: #241d12;
  --photo-wash: #322a1a;
  --photo-ink: #f7ead1;
  --photo-muted: #c3b492;
  --photo-line: #826744;
  --photo-soft: #574a37;
  --photo-button: #2f2115;
  --photo-button-text: #f7ead1;
  --photo-action-line: #826744;
  --photo-hover: #3a2a1b;
  --photo-primary: #6a3b1f;
  --photo-primary-hover: #824826;
  --photo-primary-text: #f7ead1;
  --photo-focus: #e8823f;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-photo-page {
    --photo-paper: #241d12;
    --photo-wash: #322a1a;
    --photo-ink: #f7ead1;
    --photo-muted: #c3b492;
    --photo-line: #826744;
    --photo-soft: #574a37;
    --photo-button: #2f2115;
    --photo-button-text: #f7ead1;
    --photo-action-line: #826744;
    --photo-hover: #3a2a1b;
    --photo-primary: #6a3b1f;
    --photo-primary-hover: #824826;
    --photo-primary-text: #f7ead1;
    --photo-focus: #e8823f;
    color-scheme: dark;
  }
}
.tn-photo-page [hidden] { display: none !important; }
.tn-photo-page .tn-photo-tool {
  width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--photo-ink);
  -webkit-text-fill-color: var(--photo-ink);
  font-family: var(--photo-sans);
  font-size: 14px;
  line-height: 1.6;
}
.tn-photo-tool,
.tn-photo-tool *,
.tn-photo-tool *::before,
.tn-photo-tool *::after { box-sizing: border-box; }
.tn-photo-tool :is(p, label, ol, li, details, summary) { margin: 0; padding: 0; }
.tn-photo-tool :is(code, pre, kbd, samp) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  -webkit-text-fill-color: inherit;
}
.tn-photo-tool .tn-photo-workspace {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--photo-line);
  background: var(--photo-paper);
}
.tn-photo-tool :is(.tn-photo-settings, .tn-photo-results) {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
}
.tn-photo-tool .tn-photo-settings { border-right: 1px solid var(--photo-line); }
.tn-photo-tool .tn-photo-drop {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 112px;
  padding: 10px;
  border: 1px dashed var(--photo-line);
  background: var(--photo-wash);
  text-align: center;
}
.tn-photo-tool .tn-photo-drop > p:first-child { font-size: 13px; font-weight: 700; }
.tn-photo-tool .tn-photo-drop.is-dragover { border-color: var(--photo-focus); box-shadow: inset 0 0 0 1px var(--photo-focus); }
.tn-photo-tool .tn-photo-field {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.tn-photo-tool label {
  display: block;
  min-width: 0;
  color: var(--photo-ink);
  -webkit-text-fill-color: var(--photo-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.tn-photo-tool :is(input[type="number"], select, input[type="color"]) {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid var(--photo-line);
  border-radius: 0;
  background-color: var(--photo-paper);
  color: var(--photo-ink);
  -webkit-text-fill-color: var(--photo-ink);
  font-family: var(--photo-sans);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: normal;
  letter-spacing: normal;
  box-shadow: none;
  outline: none;
}
.tn-photo-tool select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 25px;
  background-color: var(--photo-wash);
  background-image: linear-gradient(45deg, transparent 50%, var(--photo-ink) 50%), linear-gradient(135deg, var(--photo-ink) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  font-size: 13px;
  cursor: pointer;
}
.tn-photo-tool select option { background: var(--photo-paper); color: var(--photo-ink); }
.tn-photo-tool input[type="color"] { padding: 4px; cursor: pointer; }
.tn-photo-tool input[type="range"] {
  display: block;
  width: 100%;
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 0;
  accent-color: var(--photo-focus);
  background: transparent;
  cursor: pointer;
}
.tn-photo-tool input::placeholder {
  color: var(--photo-muted);
  -webkit-text-fill-color: var(--photo-muted);
  font-family: var(--photo-sans);
  font-weight: 400;
  opacity: .35;
}
.tn-photo-tool .tn-photo-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  min-width: 0;
}
.tn-photo-tool .tn-photo-wide { grid-column: 1 / -1; }
.tn-photo-tool .tn-photo-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin-top: 24px;
  cursor: pointer;
}
.tn-photo-tool .tn-photo-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--photo-line);
  border-radius: 0;
  background: var(--photo-paper);
  color: var(--photo-ink);
  -webkit-text-fill-color: var(--photo-ink);
  box-shadow: none;
  cursor: pointer;
}
.tn-photo-tool .tn-photo-check input:checked::after {
  content: "";
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.tn-photo-tool .tn-photo-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.tn-photo-tool .tn-photo-extra {
  min-width: 0;
  border: 0;
  border-top: 1px solid var(--photo-soft);
  border-bottom: 1px solid var(--photo-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.tn-photo-tool .tn-photo-extra > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  color: var(--photo-ink);
  -webkit-text-fill-color: var(--photo-ink);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.tn-photo-tool .tn-photo-extra > summary::-webkit-details-marker { display: none; }
.tn-photo-tool .tn-photo-extra > summary::marker { content: ""; }
.tn-photo-tool .tn-photo-extra > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: -4px 4px 0 0;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
.tn-photo-tool .tn-photo-extra[open] > summary::after { margin-top: 4px; transform: rotate(225deg); }
.tn-photo-tool .tn-photo-extra > .tn-photo-options { padding: 5px 0 12px; }
.tn-photo-tool :is(.tn-photo-modes, .tn-photo-actions) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.tn-photo-tool .tn-photo-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tn-photo-page .tn-photo-tool button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--photo-action-line);
  border-radius: 0;
  background: var(--photo-button);
  color: var(--photo-button-text);
  -webkit-text-fill-color: var(--photo-button-text);
  font-family: var(--photo-mono);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: normal;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
  outline: none;
  cursor: pointer;
}
.tn-photo-page .tn-photo-tool button:is(:hover, :focus-visible):not(:disabled) { background: var(--photo-hover); }
.tn-photo-page .tn-photo-tool :is(#tnPhotoDownload, button[aria-pressed="true"]) {
  background: var(--photo-primary);
  color: var(--photo-primary-text);
  -webkit-text-fill-color: var(--photo-primary-text);
}
.tn-photo-page .tn-photo-tool :is(#tnPhotoDownload, button[aria-pressed="true"]):is(:hover, :focus-visible):not(:disabled) { background: var(--photo-primary-hover); }
.tn-photo-tool #tnPhotoDownload { width: 100%; }
.tn-photo-page .tn-photo-tool button:disabled { opacity: .55; cursor: not-allowed; }
.tn-photo-tool :is(button, input, select, summary, .tn-photo-drop):focus-visible { outline: 2px solid var(--photo-focus); outline-offset: 2px; }
.tn-photo-tool [aria-invalid="true"] { border-color: var(--photo-focus); box-shadow: inset 0 -1px 0 var(--photo-focus); }
.tn-photo-tool :is(.tn-photo-hint, .tn-photo-details) {
  color: var(--photo-muted);
  -webkit-text-fill-color: var(--photo-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.tn-photo-tool :is(.tn-photo-summary, #tnPhotoQualityValue) {
  color: var(--photo-ink);
  -webkit-text-fill-color: var(--photo-ink);
  font-family: var(--photo-sans);
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
}
.tn-photo-tool .tn-photo-summary {
  display: block;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--photo-soft);
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.tn-photo-tool #tnPhotoQualityValue { font-size: 13px; }
.tn-photo-tool .tn-photo-preview {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 200px;
  padding: 12px;
  border: 1px solid var(--photo-soft);
  background-color: var(--photo-paper);
  background-image: conic-gradient(var(--photo-wash) 25%, transparent 0 50%, var(--photo-wash) 0 75%, transparent 0);
  background-size: 20px 20px;
}
.tn-photo-tool #tnPhotoCanvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 520px;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: contain;
}
.tn-photo-tool #tnPhotoEmpty { max-width: 280px; padding: 12px; background: var(--photo-paper); text-align: center; }
.tn-photo-tool #tnPhotoError {
  color: var(--photo-focus);
  -webkit-text-fill-color: var(--photo-focus);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.tn-photo-tool :is(#tnPhotoError, #tnPhotoStatus):empty { display: none; }
.tn-photo-tool #tnPhotoQueue {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tn-photo-tool #tnPhotoQueue .tn-photo-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--photo-soft);
  border-radius: 0;
  background: var(--photo-paper);
  list-style: none;
}
.tn-photo-tool #tnPhotoQueue .tn-photo-item::before { content: none; }
.tn-photo-tool .tn-photo-item > img {
  display: block;
  width: 56px;
  height: 56px;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}
.tn-photo-tool .tn-photo-fileinfo { display: grid; gap: 4px; min-width: 0; }
.tn-photo-tool .tn-photo-filename {
  min-width: 0;
  color: var(--photo-ink);
  -webkit-text-fill-color: var(--photo-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.tn-photo-tool .tn-photo-details {
  font-family: var(--photo-sans);
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
}
.tn-photo-tool .tn-photo-item-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 5px;
  min-width: 0;
}
.tn-photo-page .tn-photo-tool .tn-photo-item-actions button { padding: 0 4px; }
.tn-photo-tool :is(.tn-photo-note, noscript p) {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--photo-line);
  color: var(--photo-muted);
  -webkit-text-fill-color: var(--photo-muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.tn-photo-page .tn-photo-ad {
  width: 100%;
  max-width: 900px;
  min-height: 90px;
  height: auto;
  max-height: none;
  margin: 24px auto;
  border: 0;
  background: transparent;
  overflow: visible;
}
.tn-photo-page .tn-photo-ad--top { margin-top: 0; }
@media (max-width: 960px) {
  .tn-photo-tool #tnPhotoQueue { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .tn-photo-tool .tn-photo-workspace { grid-template-columns: minmax(0, 1fr); }
  .tn-photo-tool .tn-photo-settings { border-right: 0; border-bottom: 1px solid var(--photo-line); }
  .tn-photo-tool .tn-photo-drop { grid-template-columns: minmax(0, 1fr) auto; justify-items: start; align-items: center; min-height: 104px; text-align: left; }
  .tn-photo-tool #tnPhotoFileHint { grid-column: 1 / -1; }
  .tn-photo-tool #tnPhotoCanvas { max-height: 420px; }
  .tn-photo-tool .tn-photo-preview { min-height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .tn-photo-tool,
  .tn-photo-tool *,
  .tn-photo-tool *::before,
  .tn-photo-tool *::after { animation: none; transition: none; scroll-behavior: auto; }
}
