:root {
  --page: #f4f5f3;
  --surface: #ffffff;
  --surface-muted: #f7f8f7;
  --ink: #1d252c;
  --muted: #667079;
  --line: #d8ddda;
  --line-strong: #b9c1bd;
  --header: #20262b;
  --teal: #087264;
  --teal-dark: #075c52;
  --teal-soft: #e8f3f0;
  --orange: #c9602c;
  --orange-soft: #fff1e9;
  --danger: #b33a37;
  --danger-soft: #fff0ef;
  --shadow: 0 12px 34px rgba(28, 37, 44, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.content-width,
.header-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.app-header {
  color: #ffffff;
  background: var(--header);
  border-top: 3px solid var(--orange);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-copy {
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  font-size: 18px;
  font-weight: 700;
}

.brand-name,
.brand-subtitle,
.eyebrow,
.drop-title,
.drop-subtitle,
.file-name,
.file-meta,
.result-label,
.result-filename,
.result-location,
.empty-result p {
  margin: 0;
}

.brand-name {
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  margin-top: 3px;
  color: #b9c0c5;
  font-size: 12px;
  line-height: 1.35;
}

.online-state {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d4d9dc;
  font-size: 13px;
}

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #51c2a8;
  box-shadow: 0 0 0 3px rgba(81, 194, 168, 0.15);
}

.privacy-band {
  background: #edf0ee;
  border-bottom: 1px solid var(--line);
}

.privacy-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.privacy-message {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.privacy-message > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.privacy-message strong {
  color: #26333b;
  font-size: 13px;
}

.privacy-message span:not(.privacy-icon) {
  color: var(--muted);
  font-size: 12px;
}

.privacy-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
}

.icon-text-button {
  min-height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 11px;
  color: #334047;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.icon-text-button:hover {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: #9fc8be;
}

.workspace {
  padding: 36px 0 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  align-items: start;
  gap: 24px;
}

.tool-panel,
.result-area {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tool-panel {
  padding: 30px;
}

.result-area {
  min-height: 478px;
  padding: 26px;
}

.section-heading,
.result-heading,
.history-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.section-heading,
.result-heading {
  align-items: flex-start;
}

.section-heading {
  margin-bottom: 22px;
}

.result-heading {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.35;
}

h2 {
  font-size: 19px;
  line-height: 1.4;
}

.rule-badges {
  min-width: 0;
  max-width: min(46%, 260px);
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
}

.rule-badges span:first-child {
  min-width: 0;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-badges span,
.result-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.rule-badges span {
  color: #5b6268;
  background: #f0f2f1;
  border: 1px solid var(--line);
}

.result-badge {
  flex: 0 0 auto;
  color: #5b6268;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.result-badge.is-busy {
  color: #9c481e;
  background: var(--orange-soft);
  border-color: #efc8b4;
}

.result-badge.is-success {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: #b8d9d1;
}

.result-badge.is-error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #ecc1bf;
}

.drop-zone {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  background: var(--surface-muted);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  outline: none;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.drop-zone:hover,
.drop-zone:focus-visible {
  background: #f2f7f5;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 114, 100, 0.12);
}

.drop-zone.is-dragging {
  background: var(--teal-soft);
  border-color: var(--teal);
  border-style: solid;
  box-shadow: inset 0 0 0 1px var(--teal);
}

.drop-zone.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.upload-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid #b8d9d1;
  border-radius: 6px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}

.drop-title {
  font-size: 17px;
  font-weight: 700;
}

.drop-subtitle {
  margin-top: 5px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.button:focus-visible,
.icon-button:focus-visible,
.icon-text-button:focus-visible,
.history-action:focus-visible {
  outline: 3px solid rgba(8, 114, 100, 0.2);
  outline-offset: 2px;
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.button-secondary:hover:not(:disabled) {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: #9fc8be;
}

.button-primary {
  min-width: 132px;
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.button-primary:hover:not(:disabled) {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.button-download {
  width: 100%;
  margin-top: 20px;
  color: var(--teal-dark);
  background: #ffffff;
  border-color: var(--teal);
}

.button-download:hover {
  color: #ffffff;
  background: var(--teal);
}

.button-danger-quiet {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--danger);
  background: #ffffff;
  border-color: #dfb5b3;
  font-size: 12px;
}

.button-danger-quiet:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.icon-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #465159;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.icon-button:hover:not(:disabled) {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: #9fc8be;
}

.selected-file {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.file-type {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

.file-details {
  min-width: 0;
  flex: 1;
}

.file-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sheet-picker {
  min-width: 0;
  margin-top: 14px;
  padding: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.sheet-picker-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.sheet-picker-heading label {
  min-width: 0;
  color: #334047;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.sheet-selection-mode {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #b8d9d1;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.sheet-selection-mode.is-manual {
  color: #8c421f;
  background: var(--orange-soft);
  border-color: #efc8b4;
}

#sheetSelect {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 36px 8px 11px;
  overflow: hidden;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sheetSelect:focus-visible {
  outline: 3px solid rgba(8, 114, 100, 0.2);
  outline-offset: 2px;
  border-color: var(--teal);
}

#sheetSelect:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #eef1ef;
  opacity: 1;
}

.sheet-recommendation-reason {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.remove-file {
  color: #697179;
  background: transparent;
  border-color: transparent;
  font-size: 25px;
}

.remove-file:hover:not(:disabled) {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: transparent;
}

.progress-panel {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #465159;
  font-size: 12px;
  line-height: 1.4;
}

.progress-copy span:last-child {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.progress-track {
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  background: #dce3df;
  border-radius: 4px;
}

.progress-track span {
  width: 0;
  height: 100%;
  display: block;
  background: var(--teal);
  border-radius: inherit;
  transition: width 180ms ease;
}

.message {
  margin-top: 14px;
  padding: 11px 13px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #ecc1bf;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.55;
}

.message.is-info {
  color: #8c421f;
  background: var(--orange-soft);
  border-color: #efc8b4;
}

.message.is-success {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: #b8d9d1;
}

.action-row {
  min-height: 74px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.limit-note {
  min-width: 0;
  padding-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.limit-note strong,
.limit-note span {
  display: block;
}

.limit-note strong {
  color: #4f5960;
}

.button-spinner {
  width: 15px;
  height: 15px;
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.button.is-busy .button-spinner {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-result {
  min-height: 356px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 18px;
  text-align: center;
}

.empty-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: #7a848b;
  background: #f0f2f1;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 20px;
  font-weight: 800;
}

.empty-result p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.result-content {
  padding-top: 20px;
}

.result-file-row {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
}

.result-file-row > div {
  min-width: 0;
}

.result-label {
  color: var(--muted);
  font-size: 12px;
}

.result-filename {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.result-location {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.success-check {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
}

.metrics {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric {
  min-height: 70px;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 13px;
  background: var(--surface-muted);
}

.metric-wide {
  grid-column: 1 / -1;
  min-height: 56px;
}

.metric dt {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.metric dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.metric-wide dd {
  font-size: 15px;
}

.metric-warning.has-warning {
  background: var(--orange-soft);
}

.metric-warning.has-warning dd {
  color: #9c481e;
}

.history-section {
  padding: 0 0 48px;
}

.history-heading {
  align-items: flex-end;
  padding: 27px 0 18px;
  border-top: 1px solid var(--line-strong);
}

.history-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-count {
  margin-right: 2px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.storage-strip {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 14px;
  color: var(--muted);
  background: #eef1ef;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.55;
}

.storage-strip > div {
  min-width: 0;
}

.storage-strip strong {
  display: block;
  color: #334047;
}

.storage-strip span:not(.storage-status) {
  display: block;
}

.storage-status {
  flex: 0 0 auto;
  color: #8c421f;
  font-weight: 700;
  text-align: right;
}

.storage-status.is-persistent {
  color: var(--teal-dark);
}

.history-state {
  min-height: 124px;
  display: grid;
  place-items: center;
  padding: 28px 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.history-state.is-error {
  color: var(--danger);
}

.history-table-wrap {
  min-width: 0;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.history-col-time {
  width: 154px;
}

.history-col-file {
  width: auto;
}

.history-col-number {
  width: 100px;
}

.history-col-size {
  width: 96px;
}

.history-col-action {
  width: 142px;
}

.history-table th,
.history-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.history-table th {
  color: var(--muted);
  background: #eef1ef;
  font-size: 11px;
  font-weight: 700;
}

.history-table td {
  color: #344048;
  font-size: 12px;
  line-height: 1.5;
}

.history-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.7);
}

.history-cell-file {
  color: var(--ink) !important;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.history-cell-number,
.history-cell-size {
  font-variant-numeric: tabular-nums;
}

.history-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.history-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  color: var(--teal-dark);
  background: transparent;
  border: 1px solid #9fc8be;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.history-action:hover:not(:disabled) {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.history-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.history-delete {
  color: var(--danger);
  border-color: #dfb5b3;
}

.history-delete:hover:not(:disabled) {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger);
}

.toast {
  position: fixed;
  z-index: 10;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 15px;
  color: #ffffff;
  background: #29343a;
  border: 1px solid #45535b;
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  line-height: 1.5;
}

footer {
  padding-bottom: env(safe-area-inset-bottom);
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.footer-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner span + span::before {
  margin-right: 18px;
  color: var(--line-strong);
  content: "•";
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-area {
    min-height: 0;
  }

  .empty-result {
    min-height: 190px;
  }
}

@media (max-width: 700px) {
  .privacy-message > div {
    display: block;
  }

  .privacy-message span:not(.privacy-icon) {
    display: block;
    margin-top: 2px;
  }

  .storage-strip {
    align-items: flex-start;
  }

  .history-table,
  .history-table tbody {
    display: block;
  }

  .history-table colgroup,
  .history-table thead {
    display: none;
  }

  .history-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 14px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
  }

  .history-table td {
    min-width: 0;
    display: block;
    padding: 0;
    border: 0;
  }

  .history-table td::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 400;
  }

  .history-cell-file,
  .history-cell-time,
  .history-cell-action {
    grid-column: 1 / -1;
  }

  .history-cell-action::before {
    display: none !important;
  }

  .history-action-group {
    justify-content: stretch;
  }

  .history-action {
    min-height: 36px;
    flex: 1;
  }
}

@media (max-width: 580px) {
  .content-width,
  .header-inner {
    width: min(100% - 24px, 1120px);
  }

  .header-inner {
    min-height: 70px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .brand-name {
    max-width: calc(100vw - 116px);
    font-size: 15px;
  }

  .brand-subtitle {
    display: none;
  }

  .online-state {
    font-size: 0;
  }

  .privacy-inner {
    min-height: 76px;
  }

  .privacy-message strong {
    font-size: 12px;
  }

  .privacy-message span:not(.privacy-icon) {
    font-size: 11px;
  }

  .icon-text-button {
    width: 36px;
    min-height: 36px;
    padding: 0;
    font-size: 16px;
  }

  .icon-text-button span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .workspace {
    padding: 20px 0 30px;
    gap: 16px;
  }

  .tool-panel,
  .result-area {
    padding: 20px 16px;
  }

  h1 {
    font-size: 19px;
  }

  h2 {
    font-size: 17px;
  }

  .rule-badges span:last-child {
    display: none;
  }

  .rule-badges {
    min-width: 0;
    max-width: 44%;
  }

  .rule-badges span:first-child {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .drop-zone {
    min-height: 220px;
    padding: 22px 14px;
  }

  .selected-file {
    gap: 10px;
  }

  .sheet-picker {
    padding: 12px;
  }

  .file-name {
    max-width: calc(100vw - 148px);
  }

  .action-row {
    min-height: 86px;
    align-items: flex-end;
  }

  .button-primary {
    min-width: 120px;
  }

  .history-section {
    padding-bottom: 34px;
  }

  .history-heading {
    align-items: flex-start;
    padding-top: 22px;
  }

  .history-heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .history-count {
    width: 100%;
    margin: 0;
    text-align: right;
  }

  .storage-strip {
    display: block;
  }

  .storage-status {
    display: block;
    margin-top: 8px;
    text-align: left;
  }

  .footer-inner {
    min-height: 70px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    padding: 12px 0;
  }

  .footer-inner span + span::before {
    margin-right: 12px;
  }

  .toast {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .privacy-icon {
    display: none;
  }

  .rule-badges {
    display: none;
  }

  .action-row {
    display: block;
  }

  .sheet-picker-heading {
    align-items: flex-start;
  }

  .limit-note {
    padding: 14px 0 8px;
  }

  .button-primary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
