@font-face {
  font-family: RenameStudio;
  src: url("/fonts/studio-sans-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: RenamePagella;
  src: url("/fonts/studio-serif-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --rename-bg: #f0eee7;
  --rename-card: #e6e2da;
  --rename-ink: #362936;
  --rename-muted: #736b71;
  --rename-line: rgba(54, 41, 54, .21);
  --rename-signal: #e2ed77;
  --rename-soft-signal: rgba(226, 237, 119, .28);
  --rename-sans: RenameStudio, "Arial", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; height: 100%; background: var(--rename-bg); }

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--rename-bg);
  color: var(--rename-ink);
  font-family: var(--rename-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, select { color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--rename-signal);
  outline-offset: 5px;
}
::selection { color: var(--rename-ink); background: var(--rename-signal); }
[hidden] { display: none !important; }

.rename-page {
  height: 100vh;
  height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rename-header {
  min-height: 72px;
  padding: 13px max(3.8vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--rename-ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-block;
  flex: 0 0 auto;
  border: 1.5px solid var(--rename-ink);
  border-radius: 50%;
  position: relative;
}

.brand-mark::after {
  content: "";
  width: 10px;
  height: 10px;
  position: absolute;
  top: 3px;
  right: -3px;
  border-radius: 50%;
  background: var(--rename-signal);
}

.brand-name {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -.04em;
}

.brand-divider, .brand-product {
  color: var(--rename-muted);
  font-size: 20px;
  letter-spacing: -.055em;
}

.brand-divider { margin-left: 4px; }
.brand-product { margin-left: -4px; }
.brand-product { font-family: RenamePagella, Georgia, serif; font-style: italic; }

.header-note {
  margin: 0;
  color: var(--rename-muted);
  font-size: 13px;
  letter-spacing: .015em;
  text-align: right;
}

.rename-main {
  width: min(1320px, calc(100% - 72px));
  margin: 0 auto;
  padding: clamp(28px, 4.2vh, 52px) 0 clamp(32px, 4.6vh, 58px);
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  align-content: center;
  align-items: start;
  column-gap: clamp(30px, 3.8vw, 68px);
  row-gap: clamp(20px, 2.8vh, 30px);
}

.intro { min-width: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 20px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.eyebrow span:first-child {
  color: var(--rename-signal);
  letter-spacing: .05em;
}

.intro h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(38px, 3.15vw, 48px);
  line-height: .98;
  font-weight: 400;
  letter-spacing: -.025em;
}

.intro-copy {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--rename-muted);
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.4;
  letter-spacing: -.02em;
}

.workflow {
  display: flex;
  flex-wrap: wrap;
  font-family: "Courier New", monospace;
  gap: 8px 20px;
  padding: 0;
  margin: 32px 0 0;
  list-style: none;
  color: var(--rename-muted);
  font-size: 13px;
}

.workflow li { display: flex; align-items: center; gap: 10px; }
.workflow-step { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--rename-line); color: var(--rename-muted); flex-shrink: 0; }

.tool {
  min-width: 0;
  height: min(420px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--rename-line);
  border-radius: 0;
  background: var(--rename-card);
  box-shadow: none;
}

.dropzone {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 23px;
  border: 1px dashed var(--rename-muted);
  border-radius: 0;
  background: var(--rename-bg);
  text-align: center;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.dropzone-inner { animation: rename-enter .45s ease both; }

@keyframes rename-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool.is-dragging .dropzone {
  transform: translateY(-2px);
  border-color: var(--rename-signal);
  background: var(--rename-soft-signal);
}

.tool.has-files { align-self: stretch; }
.tool.has-files .dropzone { flex: 0 0 108px; min-height: 0; padding: 12px; }
.tool.has-files .dropzone-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; }
.tool.has-files .upload-icon, .tool.has-files .drop-copy { display: none; }
.tool.has-files .drop-title { grid-column: 1; text-align: left; font-size: 15px; }
.tool.has-files .button-dark { grid-column: 2; grid-row: 1; min-height: 34px; margin: 0; padding: 0 10px; font-size: 11px; white-space: nowrap; }

.dropzone-inner { width: min(100%, 460px); }

.upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border: 2px solid var(--rename-ink);
  border-radius: 50%;
}

.upload-icon svg { width: 23px; height: 23px; }

.drop-title {
  margin: 0;
  font-size: clamp(19px, 1.35vw, 24px);
  font-weight: 400;
  letter-spacing: -.025em;
}

.drop-copy {
  margin: 10px 0 0;
  color: var(--rename-muted);
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.5;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 400;
  transition: transform .16s ease, background-color .16s ease, color .16s ease, opacity .16s ease;
}

.button:hover:not(:disabled) { transform: translateY(-2px); }
.button-dark { margin-top: 20px; background: var(--rename-signal); color: var(--rename-ink); }
.button-dark:hover:not(:disabled) { background: #d5df6b; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-outline { border-color: var(--rename-line); background: transparent; }
.button-outline:hover:not(:disabled) { background: rgba(54, 41, 54, .04); }
.visually-hidden, .sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.statusbar {
  min-height: 31px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0 8px;
  color: var(--rename-muted);
  font: 11px/1.25 "Courier New", monospace;
}
.statusbar-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--rename-signal); }
.statusbar.is-busy .statusbar-dot { animation: rename-pulse 1.1s ease-in-out infinite; }
.statusbar.is-error .statusbar-dot { background: #a64e36; }
.statusbar.is-success .statusbar-dot { background: #75922c; }
.statusbar-text { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statusbar-track { width: 72px; height: 3px; flex: 0 0 auto; overflow: hidden; background: rgba(54, 41, 54, .13); }
.statusbar-fill { display: block; width: 0; height: 100%; background: var(--rename-signal); transition: width .16s ease; }
.statusbar.is-indeterminate .statusbar-fill { width: 42%; animation: rename-progress 1.2s ease-in-out infinite; }
.statusbar-count { margin-left: auto; white-space: nowrap; }

@keyframes rename-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes rename-progress { 0% { transform: translateX(-110%); } 100% { transform: translateX(270%); } }

.api-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 16px 5px 3px;
  color: var(--rename-muted);
  font-size: 13px;
  line-height: 1.45;
}

.api-note svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; }
.tool.has-files .api-note { display: none; }

.workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--rename-line);
}

.section-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.micro-label { margin: 0 0 5px; color: var(--rename-muted); font: 10px/1.4 "Courier New", monospace; letter-spacing: .08em; text-transform: uppercase; }
.workspace-title { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.local-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--rename-muted); font-size: 12px; white-space: nowrap; }
.local-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--rename-signal); }

.file-list { flex: 1 1 auto; min-height: 0; overflow: hidden; align-content: start; display: grid; gap: 5px; padding: 0 2px 0 0; margin: 10px 0 0; list-style: none; }
.file-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid var(--rename-line);
  border-radius: 0;
  background: var(--rename-bg);
}
.file-main { min-width: 0; display: flex; align-items: center; gap: 8px; }
.file-glyph { width: 21px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--rename-line); border-radius: 0; color: var(--rename-muted); font: 7px "Courier New", monospace; }
.file-details { min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.file-size { margin-top: 1px; color: var(--rename-muted); font-size: 9px; }
.file-status { min-width: 0; max-width: 230px; overflow: hidden; text-overflow: ellipsis; color: var(--rename-muted); font-size: 11px; white-space: nowrap; }
.file-status.is-error { color: #a64e36; }
.file-actions { display: flex; align-items: center; gap: 5px; }
.file-actions .button { min-height: 26px; margin: 0; padding: 0 7px; font-size: 11px; white-space: nowrap; }
.file-status:focus { outline: 2px solid var(--rename-signal); outline-offset: 2px; }
.email-button::before { content: "✉"; font-size: 12px; }
.download-button::before { content: "↓"; font-size: 13px; }
.error-detail-button { border: 0; padding: 0; background: transparent; color: var(--rename-muted); font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.error-detail-button:hover { color: var(--rename-ink); }
.error-detail { min-width: 0; display: flex; align-items: center; gap: 9px; }
.error-detail-copy { min-width: 0; flex: 1; }
.error-detail-title { margin: 0 0 3px; font-size: 12px; }
.error-detail-message { max-width: 100%; margin: 0; color: var(--rename-muted); font-size: 11px; line-height: 1.3; }
.error-back { flex: 0 0 auto; border: 1px solid var(--rename-line); padding: 5px 7px; background: transparent; color: inherit; font-size: 10px; }

.pagination { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; }
.page-button { width: 27px; height: 27px; padding: 0; border: 1px solid var(--rename-line); background: transparent; color: var(--rename-ink); line-height: 1; }
.page-button:hover:not(:disabled) { background: var(--rename-soft-signal); }
.page-button:disabled { cursor: not-allowed; opacity: .35; }
.page-label { min-width: 64px; color: var(--rename-muted); text-align: center; font: 10px "Courier New", monospace; }

.analysis-message {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid var(--rename-line);
  border-radius: 0;
  background: var(--rename-soft-signal);
}
.analysis-icon { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font: 12px Georgia, serif; }
.analysis-message strong { display: block; margin: 1px 0 3px; font-size: 13px; font-weight: 400; }
.analysis-message p { margin: 0; color: var(--rename-muted); font-size: 12px; line-height: 1.5; }

.review { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rename-line); }
.review-heading { margin-bottom: 13px; }
.field-label { display: block; margin: 11px 0 6px; font-size: 12px; font-weight: 400; }
.field-control {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--rename-line);
  border-radius: 0;
  background: var(--rename-bg);
  color: var(--rename-ink);
  font-size: 14px;
}
.field-control::placeholder { color: var(--rename-muted); opacity: .72; }
.metadata-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 11px; }
.field-label + .field-control { display: block; }
.metadata-fields .field-label { margin-top: 10px; }
.filename-control { display: flex; align-items: center; gap: 7px; }
.filename-input { min-width: 0; }
.file-extension { color: var(--rename-muted); font-size: 12px; white-space: nowrap; }
.field-hint { margin: 6px 0 0; color: var(--rename-muted); font-size: 11px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.review-actions .button { min-height: 42px; padding: 0 15px; font-size: 12px; }
.review-actions .button-dark { margin: 0; }
.download-note { margin: 12px 0 3px; color: var(--rename-muted); font-size: 11px; line-height: 1.5; }

.rename-footer {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px max(3.8vw, 24px);
  border-top: 1px solid var(--rename-line);
  color: var(--rename-muted);
  font-size: 11px;
  font-family: "Courier New", monospace;
}
.rename-footer nav { display: flex; gap: 9px; white-space: nowrap; }
.rename-footer a { color: inherit; text-decoration: none; }
.rename-footer a:hover { color: var(--rename-ink); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1120px) {
  .rename-header { min-height: 80px; }
  .rename-main { width: min(700px, calc(100% - 48px)); grid-template-columns: 1fr; align-content: start; gap: 18px; padding: 22px 0 24px; }
  .intro h1 { font-size: clamp(42px, 5.2vw, 58px); }
  .intro-copy { max-width: 620px; margin-top: 20px; font-size: clamp(17px, 1.8vw, 20px); }
  .workflow { margin-top: 22px; font-size: 15px; gap: 9px 19px; }
  .tool { height: min(460px, 100%); padding: 18px; border-radius: 0; }
  .dropzone { min-height: 0; border-radius: 0; }
  .upload-icon { width: 62px; height: 62px; margin-bottom: 18px; }
  .button, .field-control, .review-actions .button { min-height: 44px; }
  .tool.has-files .button-dark { min-height: 44px; }
  .api-note { font-size: 14px; }
  .rename-footer { min-height: 52px; font-size: 12px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .rename-header { min-height: 56px; padding: 8px 20px; }
  .brand { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; border-width: 1.5px; }
  .brand-mark::after { width: 11px; height: 11px; }
  .brand-name { font-size: 24px; }
  .brand-divider, .brand-product { font-size: 22px; }
  .brand-divider { margin-left: 3px; }
  .brand-product { margin-left: -5px; }
  .header-note { display: none; }
  .rename-main { width: calc(100% - 40px); grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: 12px 0 14px; }
  .eyebrow { gap: 8px; margin-bottom: 10px; font-size: 10px; }
  .intro h1 { font-size: clamp(34px, 10vw, 48px); letter-spacing: -.055em; }
  .intro-copy { max-width: 100%; margin-top: 10px; font-size: 14px; line-height: 1.32; }
  .workflow { flex-wrap: nowrap; gap: 6px; margin-top: 12px; font-size: 11px; }
  .workflow li { gap: 10px; }
  .workflow-step { width: 24px; height: 24px; }
  .tool { height: 100%; padding: 10px; border-radius: 0; }
  .dropzone { min-height: 0; padding: 22px 16px; border-radius: 0; }
  .tool.has-files .dropzone { flex-basis: 64px; min-height: 0; padding: 8px 10px; }
  .tool.has-files .dropzone-inner { gap: 8px; }
  .tool.has-files .drop-title { font-size: 14px; }
  .tool.has-files .button-dark { min-height: 30px; padding: 0 8px; }
  .upload-icon { width: 52px; height: 52px; margin-bottom: 12px; }
  .upload-icon svg { width: 25px; height: 25px; }
  .drop-title { font-size: 19px; }
  .drop-copy { margin-top: 8px; font-size: 13px; line-height: 1.35; }
  .button { min-height: 38px; padding: 0 15px; border-radius: 0; font-size: 13px; }
  .button-dark { margin-top: 12px; }
  .api-note { gap: 8px; margin: 6px 3px 1px; font-size: 10px; line-height: 1.25; }
  .api-note svg { width: 18px; height: 18px; }
  .statusbar { min-height: 25px; margin-top: 5px; padding: 0 4px; font-size: 10px; }
  .statusbar-track { width: 48px; }
  .workspace { margin-top: 6px; padding-top: 6px; }
  .section-heading { align-items: flex-start; }
  .workspace-title { font-size: 18px; }
  .micro-label { font-size: 10px; }
  .local-badge { gap: 6px; font-size: 11px; }
  .file-row { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 6px; padding: 4px 6px; }
  .file-main { grid-column: 1; }
  .file-status { grid-column: 1; grid-row: 2; margin-left: 27px; max-width: 180px; font-size: 9px; white-space: nowrap; }
  .file-actions { grid-column: 2; grid-row: 1 / span 2; }
  .file-actions .button { min-height: 27px; padding: 0 6px; font-size: 11px; }
  .analysis-message { grid-template-columns: 22px minmax(0, 1fr); gap: 9px; padding: 12px; }
  .analysis-message strong { font-size: 13px; }
  .analysis-message p { font-size: 12px; }
  .metadata-fields { grid-template-columns: 1fr; }
  .review-actions { display: grid; }
  .review-actions .button { width: 100%; min-height: 48px; }
  .field-control { min-height: 48px; }
  .pagination { margin-top: 5px; }
  .page-button { width: 25px; height: 25px; }
  .rename-footer { min-height: 38px; align-items: center; flex-direction: row; gap: 8px; padding: 8px 20px; font-size: 9px; }
  .rename-footer span:nth-child(2) { display: none; }
}

@media (max-width: 1120px) and (orientation: landscape) {
  .rename-header { min-height: 56px; padding: 8px 20px; }
  .rename-main { width: calc(100% - 40px); grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 20px; padding: 6px 0; }
  .intro h1 { font-size: clamp(30px, 4.4vw, 42px); }
  .intro-copy { margin-top: 8px; font-size: 12px; line-height: 1.25; }
  .workflow { margin-top: 12px; font-size: 11px; }
  .tool { height: 100%; padding: 12px; }
  .dropzone { padding: 10px; }
  .upload-icon { width: 38px; height: 38px; margin-bottom: 6px; }
  .upload-icon svg { width: 17px; height: 17px; }
  .drop-title { font-size: 16px; }
  .drop-copy { margin-top: 4px; font-size: 11px; line-height: 1.2; }
  .button-dark { margin-top: 6px; }
  .api-note { margin-top: 6px; font-size: 11px; line-height: 1.2; }
  .rename-footer { min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .dropzone-inner, .statusbar.is-busy .statusbar-dot, .statusbar.is-indeterminate .statusbar-fill { animation: none !important; }
}
