:root {
  --ink: #253047;
  --muted: #6a7891;
  --paper: rgba(255, 255, 255, 0.78);
  --paper-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(87, 116, 155, 0.18);
  --blue: #4e9cff;
  --green: #50c878;
  --yellow: #ffd66b;
  --coral: #ff8c7a;
  --shadow: 0 24px 70px rgba(72, 97, 132, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter,
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  background:
    linear-gradient(135deg, rgba(191, 230, 255, 0.86), rgba(255, 247, 190, 0.8) 42%, rgba(219, 252, 226, 0.82)),
    linear-gradient(180deg, #f8fcff 0%, #fffdf6 100%);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(78, 156, 255, 0.28);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 700;
  border-radius: 999px;
}

.admin-only {
  display: none;
}

.is-admin .admin-only,
.admin-page .admin-only {
  display: inline-flex;
}

.nav-button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.nav-button:hover {
  color: var(--ink);
  background: #ffffff;
}

.nav-link.active,
.nav-link:hover {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(89, 114, 143, 0.12);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.intro-band,
.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 172px;
  padding: 12px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #337fbb;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.05;
}

.intro-art {
  width: min(280px, 30vw);
  min-width: 180px;
  filter: drop-shadow(0 24px 38px rgba(64, 92, 120, 0.16));
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  gap: 22px;
}

.panel {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.form-panel {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 4vw, 32px);
}

.upload-box {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 28px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(78, 156, 255, 0.14), rgba(80, 200, 120, 0.12)),
    rgba(255, 255, 255, 0.62);
  border: 2px dashed rgba(78, 156, 255, 0.44);
  border-radius: 20px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.upload-box:hover {
  transform: translateY(-2px);
  border-color: rgba(78, 156, 255, 0.82);
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-visual {
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 14px;
  place-items: center;
  color: #ffffff;
  font-size: 36px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--coral), var(--yellow));
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(255, 140, 122, 0.24);
}

.upload-title {
  display: block;
  font-size: 22px;
  font-weight: 800;
}

.upload-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.upload-box.has-file {
  border-color: rgba(80, 200, 120, 0.72);
}

.upload-box.has-file .upload-visual {
  background: linear-gradient(135deg, var(--green), #6ddbd6);
}

.upload-box.is-loading .upload-visual {
  animation: pulse 1s ease-in-out infinite;
}

.field {
  display: grid;
  gap: 10px;
}

.field label,
.field-label {
  color: var(--ink);
  font-weight: 800;
}

.field input[type="text"],
.field input[type="password"],
.field select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
}

.field select {
  appearance: none;
  padding-right: 46px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 24px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 18px) 50% / 7px 7px no-repeat,
    var(--paper-strong);
  cursor: pointer;
}

.field input[type="text"]:focus,
.field input[type="password"]:focus,
.field select:focus {
  border-color: rgba(78, 156, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(78, 156, 255, 0.14);
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.size-grid label,
.ratio-grid label {
  position: relative;
}

.size-grid input,
.ratio-grid input {
  position: absolute;
  opacity: 0;
}

.size-grid span,
.ratio-grid span {
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
}

.ratio-grid span {
  min-height: 48px;
  font-size: 16px;
}

.size-grid input:checked + span,
.ratio-grid input:checked + span {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), #6dc6ff);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(78, 156, 255, 0.28);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  font-weight: 900;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #2f8fff, #48c67e);
  box-shadow: 0 16px 34px rgba(47, 143, 255, 0.28);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
}

.status-line {
  min-height: 22px;
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status-line[data-tone="success"] {
  color: #22875a;
}

.status-line[data-tone="error"] {
  color: #c8413a;
}

.preview-panel {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: clamp(18px, 3vw, 26px);
}

.preview-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.32)),
    linear-gradient(160deg, rgba(255, 214, 107, 0.38), rgba(78, 156, 255, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
}

.preview-frame img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-frame img.show {
  display: block;
}

.empty-preview {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  color: rgba(37, 48, 71, 0.68);
  font-size: 24px;
  font-weight: 900;
  border: 1px dashed rgba(37, 48, 71, 0.18);
  border-radius: 18px;
}

.empty-preview.hide {
  display: none;
}

.preview-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.preview-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.batch-head h1 {
  max-width: 760px;
}

.batch-panel {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 30px);
}

.batch-step {
  display: grid;
  gap: 12px;
}

.batch-step > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-step h2 {
  margin: 0;
  font-size: 20px;
}

.step-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-radius: 10px;
}

.folder-drop,
.excel-picker {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 118px;
  place-items: center;
  padding: 22px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(78, 156, 255, 0.12), rgba(255, 214, 107, 0.16)),
    rgba(255, 255, 255, 0.68);
  border: 2px dashed rgba(78, 156, 255, 0.38);
  border-radius: 18px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.excel-picker {
  min-height: 96px;
  border-color: rgba(80, 200, 120, 0.4);
}

.folder-drop:hover,
.folder-drop.is-dragging,
.excel-picker:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(78, 156, 255, 0.76);
}

.folder-drop input,
.excel-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.folder-drop strong,
.excel-picker strong {
  font-size: 18px;
}

.folder-drop span,
.excel-picker span {
  color: var(--muted);
  font-size: 14px;
}

.batch-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.batch-summary div {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.batch-summary strong {
  font-size: 26px;
}

.batch-summary span {
  color: var(--muted);
  font-weight: 800;
}

.batch-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.batch-file-list span {
  max-width: 220px;
  overflow: hidden;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.batch-result {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.batch-result h2,
.batch-result p {
  margin: 0;
}

.batch-result p {
  color: var(--muted);
  line-height: 1.6;
}

.unmatched-list {
  display: grid;
  gap: 7px;
  padding-top: 6px;
}

.unmatched-list span {
  color: #c8413a;
  font-size: 13px;
  line-height: 1.45;
}

.history-head {
  min-height: 128px;
}

.history-head h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.history-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  box-shadow: 0 18px 52px rgba(72, 97, 132, 0.15);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.history-card.highlight {
  outline: 3px solid rgba(255, 214, 107, 0.9);
}

.history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 64px rgba(72, 97, 132, 0.18);
}

.history-media {
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.54);
}

.history-thumb {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.history-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(78, 156, 255, 0.12), rgba(255, 214, 107, 0.18)),
    rgba(255, 255, 255, 0.52);
}

.history-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.history-body h2 {
  margin: 0;
  font-size: 18px;
}

.history-meta,
.error-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.error-text {
  color: #c8413a;
  line-height: 1.5;
}

.status-pill {
  width: fit-content;
  padding: 6px 10px;
  color: #27618e;
  font-size: 13px;
  font-weight: 900;
  background: rgba(78, 156, 255, 0.14);
  border-radius: 999px;
}

.history-card[data-status="completed"] .status-pill {
  color: #248458;
  background: rgba(80, 200, 120, 0.16);
}

.history-card[data-status="failed"] .status-pill {
  color: #c8413a;
  background: rgba(255, 140, 122, 0.16);
}

.card-actions {
  display: flex;
  gap: 10px;
}

.card-actions a {
  flex: 1;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.image-modal[hidden] {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  background: rgba(28, 38, 56, 0.48);
  border: 0;
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}

.image-modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: clamp(18px, 3vw, 26px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(21, 31, 48, 0.28);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.modal-head {
  padding-right: 46px;
}

.modal-head h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 4vw, 34px);
}

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

.compare-grid figure {
  margin: 0;
}

.compare-grid img {
  display: block;
  width: 100%;
  max-height: min(62vh, 680px);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.compare-grid figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions a,
.modal-actions button {
  min-width: 180px;
}

.empty-history {
  display: none;
  min-height: 420px;
  place-items: center;
  padding: 44px;
  text-align: center;
}

.empty-history.show {
  display: grid;
}

.empty-history img {
  width: min(260px, 70vw);
  margin-bottom: 18px;
}

.empty-history h2 {
  margin: 0 0 18px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-shell {
  width: min(520px, calc(100% - 32px));
  padding: 36px 0;
}

.login-card {
  display: grid;
  gap: 28px;
  padding: clamp(24px, 5vw, 38px);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-title h1 {
  font-size: clamp(36px, 8vw, 54px);
}

.login-form {
  display: grid;
  gap: 18px;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-button {
  min-height: 46px;
  padding: 0 18px;
  color: var(--muted);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.tab-button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-color: transparent;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: grid;
  gap: 18px;
}

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

.stat-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(72, 97, 132, 0.12);
}

.stat-card strong {
  font-size: 32px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 800;
}

.admin-table-wrap {
  overflow: auto;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.records-table {
  table-layout: fixed;
}

.record-task-col {
  width: 260px;
}

.record-status-col {
  width: 110px;
}

.record-exec-col {
  width: 250px;
}

.record-action-col {
  width: 86px;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.52);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.record-task-cell,
.record-exec-cell {
  white-space: nowrap;
}

.record-task-cell strong,
.record-task-cell span,
.record-exec-cell span,
.record-exec-cell small {
  display: block;
}

.record-task-cell strong {
  margin-bottom: 5px;
  font-size: 18px;
}

.record-task-cell span,
.record-exec-cell small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.record-note-cell {
  max-width: 0;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--ink);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.icon-action {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--ink);
  font-size: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.icon-action.disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.admin-create {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  padding: 18px;
}

.link-button {
  width: fit-content;
  min-width: 160px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 48px));
  padding: 14px 18px;
  color: #ffffff;
  font-weight: 800;
  background: rgba(37, 48, 71, 0.92);
  border-radius: 16px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@media (max-width: 860px) {
  .topbar,
  .intro-band,
  .history-head {
    align-items: flex-start;
  }

  .topbar {
    flex-direction: column;
  }

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

  .intro-band {
    flex-direction: column;
  }

  .intro-art {
    align-self: center;
    width: min(260px, 72vw);
  }

  .history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-create {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 14px;
    padding-bottom: 34px;
  }

  .topbar {
    gap: 10px;
    padding: 12px 14px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 11px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 14px;
  }

  .nav-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 14px;
  }

  .intro-band,
  .history-head {
    min-height: 0;
    gap: 8px;
    padding: 0 0 14px;
  }

  .intro-art {
    display: none;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 12px;
  }

  h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  .workspace {
    gap: 14px;
  }

  .panel {
    border-radius: 18px;
  }

  .form-panel {
    gap: 14px;
    padding: 16px;
  }

  .batch-panel {
    gap: 14px;
    padding: 16px;
  }

  .batch-step h2 {
    font-size: 18px;
  }

  .folder-drop,
  .excel-picker {
    min-height: 92px;
    padding: 18px 14px;
    border-radius: 16px;
  }

  .folder-drop strong,
  .excel-picker strong {
    font-size: 16px;
  }

  .folder-drop span,
  .excel-picker span {
    font-size: 12px;
  }

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

  .size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ratio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .upload-box {
    min-height: 132px;
    padding: 18px;
    border-radius: 16px;
  }

  .upload-visual {
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
    font-size: 28px;
    border-radius: 18px;
  }

  .upload-title {
    font-size: 18px;
  }

  .upload-note {
    margin-top: 5px;
    font-size: 12px;
  }

  .field {
    gap: 8px;
  }

  .field input[type="text"],
  .field input[type="password"],
  .field select,
  .primary-button,
  .secondary-button {
    min-height: 48px;
    border-radius: 14px;
  }

  .ratio-grid {
    gap: 8px;
  }

  .ratio-grid span {
    min-height: 46px;
    font-size: 15px;
    border-radius: 14px;
  }

  .preview-panel {
    display: none;
    gap: 12px;
    padding: 14px;
  }

  .has-preview .preview-panel {
    display: grid;
  }

  .preview-frame {
    aspect-ratio: 16 / 10;
    max-height: 220px;
    border-radius: 16px;
  }

  .empty-preview {
    inset: 12px;
    font-size: 18px;
    border-radius: 14px;
  }

  .preview-copy h2 {
    margin: 0;
    font-size: 17px;
  }

  .preview-copy p {
    display: none;
  }

  .status-line {
    margin-top: -2px;
  }

  .history-head {
    flex-direction: column;
    gap: 16px;
  }

  .history-body {
    gap: 6px;
    padding: 10px;
  }

  .history-body h2 {
    font-size: 16px;
  }

  .history-meta,
  .error-text,
  .status-pill {
    font-size: 12px;
  }

  .image-modal {
    padding: 10px;
  }

  .image-modal-panel {
    max-height: calc(100vh - 20px);
    padding: 14px;
    border-radius: 18px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 24px;
  }

  .modal-head h2 {
    margin-bottom: 12px;
    font-size: 24px;
  }

  .compare-grid {
    gap: 8px;
  }

  .compare-grid img {
    max-height: 52vh;
    border-radius: 12px;
  }

  .compare-grid figcaption {
    font-size: 12px;
  }

  .modal-actions {
    justify-content: stretch;
    gap: 8px;
  }

  .modal-actions a,
  .modal-actions button {
    width: 100%;
    min-width: 0;
  }

  .secondary-button {
    width: 100%;
  }

  nav {
    flex-wrap: wrap;
  }

  .admin-tabs {
    display: grid;
  }

  .stats-grid,
  .admin-create {
    grid-template-columns: 1fr;
  }
}
