:root {
  --bg: #f5f9ff;
  --bg-soft: #f8fbff;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --line: #dbeafe;
  --line-strong: #bfdbfe;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --danger: #1e40af;
  --danger-soft: #eaf1ff;
  --success: #1e40af;
  --success-soft: #eaf1ff;
  --shadow: 0 14px 30px rgba(37, 99, 235, 0.1);
  --radius: 14px;
  --app-topbar-height: 72px;
  --app-sidebar-width: 248px;
  --anno-draft-color: #2563eb;
  --anno-draft-fill: rgba(37, 99, 235, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.site-brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
  object-fit: cover;
}

.app-topbar .site-brand {
  gap: 0;
}

.app-topbar .site-brand > span:not(.site-brand__mark) {
  display: none;
}

.app-topbar .site-brand img.site-brand__mark {
  width: auto;
  height: 44px;
  max-width: min(260px, 30vw);
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.app-topbar .site-brand span.site-brand__mark {
  width: 44px;
  height: 44px;
}

.u-btn {
  height: 38px;
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.u-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.u-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.u-btn--primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.32);
}

.u-btn--light {
  color: var(--primary-strong);
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.u-btn--danger {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #bfdbfe;
}

.u-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.u-alert {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 12px;
}

.u-alert--error {
  background: #eaf1ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}

.u-alert--success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid #bfdbfe;
}

.u-form {
  display: grid;
  gap: 12px;
}

.u-field {
  display: grid;
  gap: 6px;
}

.u-field label {
  font-size: 13px;
  color: var(--text-muted);
}

.u-input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.u-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.u-input[disabled] {
  background: #f8fafc;
  color: #64748b;
}

.u-hint {
  color: var(--text-muted);
  font-size: 12px;
}

/* Auth Pages */
.auth-layout {
  min-height: calc(100vh - 48px);
  width: min(1120px, 100%);
  margin: 24px auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 480px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-layout--compact {
  min-height: clamp(520px, 72vh, 680px);
  width: min(960px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 410px);
  border-radius: 20px;
}

.auth-layout--compact > .auth-panel {
  padding: 24px 22px;
}

.auth-side {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.auth-carousel {
  position: absolute;
  inset: 0;
}

.auth-carousel__item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.auth-carousel__item.active {
  opacity: 1;
}

.auth-carousel__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-carousel__overlay {
  display: none !important;
}

.auth-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.auth-layout > .auth-panel {
  border-left: 1px solid rgba(191, 219, 254, 0.6);
  background: #f8fbff;
  padding: 30px 28px;
}

.auth-panel__card {
  width: 100%;
  max-width: 380px;
  padding: 24px;
}

.auth-layout .auth-panel__card {
  max-width: 390px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 4px;
}

.auth-layout--compact .auth-panel .site-brand {
  width: 100%;
  justify-content: center;
  gap: 0;
}

.auth-layout--compact .auth-panel img.site-brand__mark {
  width: auto;
  height: 64px;
  max-width: min(320px, 84%);
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.auth-layout--compact .auth-panel span.site-brand__mark {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.auth-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.auth-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 13px;
}

.auth-links--split {
  width: 100%;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
}

.auth-links--split a:last-child {
  margin-left: auto;
  text-align: right;
}

/* App Pages */
.app-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-height: 64px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}

.app-topbar__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.storage-chip {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  padding: 8px 10px;
}

.storage-chip small {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.storage-track {
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.storage-fill {
  width: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #2563eb;
  transition: width 0.25s ease, background 0.25s ease;
}

.storage-fill::after {
  content: "";
  position: absolute;
  top: -70%;
  bottom: -70%;
  left: -36%;
  width: 36%;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.56) 48%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-220%) skewX(-18deg);
  animation: upload-progress-shine 0.85s linear infinite;
}

.storage-fill--safe {
  background: #16a34a;
}

.storage-fill--warn {
  background: #f59e0b;
}

.storage-fill--danger {
  background: #ef4444;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
  text-decoration: none;
}

.user-chip:hover {
  text-decoration: none;
  background: var(--bg-soft);
}

.user-chip--btn {
  border: 1px solid var(--line);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  background: #2563eb;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.user-menu {
  position: relative;
}

.user-menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 140px;
  border-radius: 10px;
  padding: 6px;
  z-index: 30;
}

.user-menu-pop a {
  display: block;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}

.user-menu-pop a:hover {
  background: #eff6ff;
}

.app-wrap {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--app-topbar-height) + 8px);
}

.app-topbar + .app-wrap {
  padding-top: calc(var(--app-topbar-height) + 8px);
}

.app-sidebar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: var(--app-sidebar-width);
  top: calc(var(--app-topbar-height) + 8px);
  max-height: none;
  overflow-y: auto;
  padding: 16px 12px 20px;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: rgba(248, 251, 255, 0.95);
  backdrop-filter: blur(8px);
}

.app-topbar + .app-wrap .app-sidebar {
  top: calc(var(--app-topbar-height) + 8px);
}

.app-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  overflow: visible;
}

.app-menu a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 0;
}

.app-menu a:hover {
  background: #eff6ff;
}

.app-menu a.active {
  color: #fff;
  background: #2563eb;
}

.menu-link-icon,
.btn-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.btn-icon {
  width: 15px;
  height: 15px;
}

.icon-upload {
  -webkit-mask-image: url("../../svg/Upload.svg");
  mask-image: url("../../svg/Upload.svg");
}

.icon-refresh {
  -webkit-mask-image: url("../../svg/Refresh.svg");
  mask-image: url("../../svg/Refresh.svg");
}

.icon-console {
  -webkit-mask-image: url("../../svg/Console.svg");
  mask-image: url("../../svg/Console.svg");
}

.icon-resource {
  -webkit-mask-image: url("../../svg/image.svg");
  mask-image: url("../../svg/image.svg");
}

.icon-share {
  -webkit-mask-image: url("../../svg/Share.svg");
  mask-image: url("../../svg/Share.svg");
}

.icon-message {
  -webkit-mask-image: url("../../svg/Label.svg");
  mask-image: url("../../svg/Label.svg");
}

.icon-return {
  -webkit-mask-image: url("../../svg/Return.svg");
  mask-image: url("../../svg/Return.svg");
}

.icon-enlarge {
  -webkit-mask-image: url("../../svg/Enlarge.svg");
  mask-image: url("../../svg/Enlarge.svg");
}

.icon-reduce {
  -webkit-mask-image: url("../../svg/Reduce.svg");
  mask-image: url("../../svg/Reduce.svg");
}

.icon-reset {
  -webkit-mask-image: url("../../svg/Reset.svg");
  mask-image: url("../../svg/Reset.svg");
}

.icon-full {
  -webkit-mask-image: url("../../svg/Full.svg");
  mask-image: url("../../svg/Full.svg");
}

.icon-rotate {
  -webkit-mask-image: url("../../svg/Reset.svg");
  mask-image: url("../../svg/Reset.svg");
  transform: rotate(90deg);
}

.icon-label {
  -webkit-mask-image: url("../../svg/Label.svg");
  mask-image: url("../../svg/Label.svg");
}

.icon-flip {
  -webkit-mask-image: url("../../svg/Reset.svg");
  mask-image: url("../../svg/Reset.svg");
}

.icon-image-adjust {
  -webkit-mask-image: url("../../svg/Image-Adjustment.svg");
  mask-image: url("../../svg/Image-Adjustment.svg");
}

.icon-grid {
  -webkit-mask-image: url("../../svg/Grid.svg");
  mask-image: url("../../svg/Grid.svg");
}

.icon-coordinate {
  -webkit-mask-image: url("../../svg/Coordinate.svg");
  mask-image: url("../../svg/Coordinate.svg");
}

.icon-export-image {
  -webkit-mask-image: url("../../svg/Export-Image.svg");
  mask-image: url("../../svg/Export-Image.svg");
}

.icon-line-segment {
  -webkit-mask-image: url("../../svg/Line-segment.svg");
  mask-image: url("../../svg/Line-segment.svg");
}

.icon-polygon {
  -webkit-mask-image: url("../../svg/Polygon.svg");
  mask-image: url("../../svg/Polygon.svg");
}

.icon-paintbrush {
  -webkit-mask-image: url("../../svg/Paintbrush.svg");
  mask-image: url("../../svg/Paintbrush.svg");
}

.icon-export-mark {
  -webkit-mask-image: url("../../svg/Export-Mark.svg");
  mask-image: url("../../svg/Export-Mark.svg");
}

.icon-qr {
  -webkit-mask-image: url("../../svg/qr.svg");
  mask-image: url("../../svg/qr.svg");
}

.icon-download {
  -webkit-mask-image: url("../../svg/download.svg");
  mask-image: url("../../svg/download.svg");
}

.app-main {
  margin-left: var(--app-sidebar-width);
  padding: 20px 24px 24px;
  min-height: calc(100vh - var(--app-topbar-height) - 8px);
  display: grid;
  min-width: 0;
  gap: 18px;
  align-content: start;
}

.app-main .u-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.hero {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.hero h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.hero p {
  color: var(--text-muted);
  font-size: 14px;
}

.hero__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.stat-card {
  padding: 0;
}

.stat-card small {
  color: var(--text-muted);
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  color: #1e40af;
}

.panel {
  padding: 0;
}

.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.resource-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.resource-toolbar__search {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(140px, 0.6fr);
  gap: 10px;
  flex: 1 1 480px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card {
  min-height: 0;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: #f4f9ff;
  color: #0f172a;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateY(0);
  will-change: transform;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.12);
}

.category-card:active {
  transform: translateY(1px);
}

.category-card.active {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.72);
  background: #e7f0ff;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.16);
}

.category-card.active:hover {
  transform: translateY(-5px);
}

.category-card__name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  word-break: break-word;
}

.category-card__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  color: #475569;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(191, 219, 254, 0.72);
}

.tabs {
  display: inline-flex;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 4px;
}

.tab-btn {
  border: none;
  background: transparent;
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.chart-box {
  height: 300px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.resource-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.resource-item.is-pending {
  opacity: 0.78;
  filter: grayscale(0.12);
}

.resource-thumb {
  position: relative;
  height: 150px;
  display: grid;
  place-items: center;
  color: #1e3a8a;
  background: #eaf2ff;
  border-bottom: 1px solid var(--line);
  z-index: 0;
}

.resource-select-corner {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.95);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.resource-select-corner input {
  margin: 0;
  accent-color: #1d4ed8;
}

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

.resource-thumb__fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.resource-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fff;
}

.resource-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.resource-name {
  display: block;
  font-weight: 700;
  position: relative;
  margin: 0;
  line-height: 1.45;
  max-height: 2.9em;
  white-space: normal;
  word-break: break-all;
  overflow: hidden;
  text-overflow: clip;
  color: var(--text);
}

.resource-name-edit {
  flex-shrink: 0;
  height: 30px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: 9px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.resource-status {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.95);
}

.resource-status--ok {
  border-color: #bfdbfe;
  color: #1e40af;
  background: rgba(234, 241, 255, 0.96);
}

.resource-status--processing {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.96);
}

.resource-status--danger {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: rgba(234, 241, 255, 0.96);
}

.resource-meta {
  margin-top: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.resource-actions {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.empty-box {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 28px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 3px 8px;
  font-size: 12px;
}

.badge--danger {
  border-color: #bfdbfe;
  color: var(--danger);
  background: var(--danger-soft);
}

/* Modal */
.u-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.u-modal.show {
  display: flex;
}

.u-modal__panel {
  width: min(520px, calc(100vw - 26px));
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: #f7fbff;
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.28);
  padding: 16px 16px 18px;
}

.upload-modal__panel {
  width: min(760px, calc(100vw - 26px));
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.category-modal__panel {
  width: min(620px, calc(100vw - 26px));
}

.upload-category-row {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.upload-category-row label {
  color: var(--text-muted);
  font-size: 13px;
}

.u-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px -4px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #0f3b8f;
  background: #eaf2ff;
}

.u-modal__close {
  border: none;
  background: transparent;
  font-size: 24px;
  color: #1e40af;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.u-modal__close:hover {
  background: rgba(59, 130, 246, 0.12);
}

.confirm-modal__panel {
  width: min(420px, calc(100vw - 26px));
}

.rename-modal__panel {
  width: min(460px, calc(100vw - 26px));
}

.detail-modal__panel {
  width: min(500px, calc(100vw - 26px));
  max-height: calc(100vh - 88px);
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-modal__body {
  max-height: min(54vh, 420px);
  overflow: auto;
  font-size: 13px;
}

.detail-modal__body .u-field {
  margin-bottom: 8px;
}

.detail-modal__body .u-field > label {
  font-size: 12px;
}

.detail-modal__body .u-hint {
  font-size: 12px;
  line-height: 1.35;
}

.message-modal__panel {
  width: min(560px, calc(100vw - 26px));
}

.message-textarea {
  min-height: 150px;
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.message-counter {
  text-align: right;
}

.message-modal__actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.category-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.category-manage-list {
  display: grid;
  gap: 10px;
  max-height: min(46vh, 380px);
  overflow: auto;
}

.category-manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(191, 219, 254, 0.85);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px;
}

.category-manage-item__name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.category-manage-item__meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.category-manage-item__actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.confirm-modal__msg {
  margin: 8px 0 0;
  text-align: center;
  color: #1e3a8a;
  font-size: 14px;
}

.confirm-modal__actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.switch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.dropzone {
  margin-top: 10px;
  border: 2px dashed #60a5fa;
  border-radius: 10px;
  background: #f3f8ff;
  text-align: center;
  padding: 24px;
  cursor: pointer;
  color: #1e3a8a;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.dropzone p {
  font-size: 16px;
  font-weight: 700;
}

.dropzone.drag {
  border-color: #2563eb;
  background: #e8f2ff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.32);
}

.upload-status {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 10px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 10px;
  background: #f7fbff;
  padding: 10px;
  overflow: hidden;
}

.upload-status.show {
  display: flex;
  flex-direction: column;
}

.upload-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.upload-summary-copy {
  min-width: 0;
}

.upload-summary-stats {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.upload-summary-stats span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(255, 255, 255, 0.85);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.upload-progress {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 8px 0;
}

.upload-progress > div {
  width: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #16a34a;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.upload-progress > div::after {
  content: "";
  position: absolute;
  top: -70%;
  bottom: -70%;
  left: -36%;
  width: 36%;
  pointer-events: none;
  opacity: 1;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.56) 48%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-220%) skewX(-18deg);
  animation: upload-progress-shine 0.85s linear infinite;
}

@keyframes upload-progress-shine {
  0% {
    transform: translateX(-220%) skewX(-18deg);
  }
  100% {
    transform: translateX(360%) skewX(-18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .storage-fill::after,
  .upload-progress > div::after {
    animation: none;
    opacity: 0.35;
  }
}

.upload-progress--item {
  height: 7px;
  margin: 6px 0 0;
}

.upload-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}

.upload-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 36px 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.16);
  background: rgba(255, 255, 255, 0.82);
}

.upload-item__thumb {
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #eef4ff;
  overflow: hidden;
}

.upload-item__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.28);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.upload-item__remove:hover {
  background: rgba(239, 68, 68, 0.9);
  transform: scale(1.04);
}

.upload-item__remove:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

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

.upload-item__thumb-note {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.upload-item__body {
  min-width: 0;
}

.upload-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.upload-item__name {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.45;
  word-break: break-all;
}

.upload-item__status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.upload-item__status--active {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(239, 246, 255, 0.95);
  color: #1d4ed8;
}

.upload-item__status--ok {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(234, 241, 255, 0.95);
  color: #1e40af;
}

.upload-item__status--error {
  border-color: rgba(59, 130, 246, 0.24);
  background: rgba(234, 241, 255, 0.95);
  color: #1d4ed8;
}

.upload-item__meta {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 12px;
}

.upload-item__error {
  margin-top: 6px;
  color: #1d4ed8;
  font-size: 12px;
  line-height: 1.45;
}

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

.toast {
  position: fixed;
  left: 50%;
  top: 14px;
  transform: translate(-50%, -8px);
  z-index: 60;
  color: #166534;
  background: rgba(236, 253, 245, 0.96);
  border: 1px solid rgba(134, 239, 172, 0.95);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  max-width: min(80vw, 640px);
  text-align: center;
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.back-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(147, 197, 253, 0.95);
  border-radius: 999px;
  background: #1d4ed8;
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.36);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 58;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  pointer-events: none;
}

.back-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.back-top-btn:hover {
  box-shadow: 0 16px 32px rgba(30, 64, 175, 0.46);
}

.back-top-btn img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
}

.preview-page .back-top-btn {
  bottom: 96px;
}

/* Preview */
.preview-wrap {
  position: relative;
  height: 100%;
  width: 100%;
  border: none;
  border-radius: 0;
  background: #dbeafe;
  overflow: hidden;
  box-shadow: none;
}

#viewer {
  position: relative;
  width: 100%;
  height: 100%;
}

.line-draft-overlay {
  position: absolute;
  inset: 0;
  z-index: 22;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.preview-zoom-rail {
  position: absolute;
  left: 18px;
  top: 50%;
  z-index: 18;
  transform: translateY(-50%);
  width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 10px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  user-select: none;
}

.preview-zoom-rail.is-disabled {
  opacity: 0.65;
}

.preview-zoom-rail__value {
  min-width: 42px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
}

.preview-zoom-rail__track {
  position: relative;
  width: 12px;
  height: min(42vh, 280px);
  border-radius: 999px;
  background: #e8f2ff;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.95);
  cursor: ns-resize;
  touch-action: none;
}

.preview-zoom-rail__fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  border-radius: inherit;
  background: #2563eb;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.24);
  pointer-events: none;
}

.preview-zoom-rail__thumb {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  transform: translate(-50%, 50%);
  cursor: grab;
  touch-action: none;
}

.preview-zoom-rail__thumb:active {
  cursor: grabbing;
}

.preview-tools {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 24;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  backdrop-filter: blur(8px);
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 12px;
  cursor: pointer;
}

.tool-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.tool-btn.active,
.tool-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.preview-page {
  overflow: hidden;
}

.preview-topbar {
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.preview-main--max {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--preview-topbar-height, var(--app-topbar-height, 72px));
  bottom: 0;
  z-index: 1;
  padding: 0;
  overflow: hidden;
}

.preview-tool-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-tool-sep {
  width: 1px;
  align-self: stretch;
  background: var(--line);
}

.anno-count {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 10px;
  font-size: 12px;
  color: #334155;
  background: #f8fbff;
}

.qr-share-wrap {
  position: relative;
}

.qr-share-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(320px, calc(100vw - 32px));
  padding: 12px;
  z-index: 50;
}

.rotate-config-pop {
  position: fixed;
  width: min(280px, calc(100vw - 18px));
  z-index: 32;
  border: 1px solid rgba(191, 219, 254, 0.96);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  padding: 12px;
  backdrop-filter: blur(10px);
}

.rotate-config-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.rotate-config-angle {
  margin-top: 6px;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  color: #2563eb;
}

.rotate-config-range {
  width: 100%;
  margin-top: 14px;
  accent-color: #2563eb;
}

.rotate-config-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.rotate-config-presets {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rotate-config-preset-btn {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0;
}

.line-config-pop {
  position: fixed;
  width: min(240px, calc(100vw - 18px));
  z-index: 40;
  border: 1px solid rgba(147, 197, 253, 0.95);
  border-radius: 14px;
  background: #f3f8ff;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.2);
  padding: 10px 12px;
  backdrop-filter: blur(8px);
}

.line-config-title {
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 8px;
}

.line-color-group {
  gap: 10px;
}

.qr-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.qr-close {
  font-size: 22px;
  line-height: 1;
}

.qr-share-tip {
  margin-bottom: 10px;
}

.qr-box {
  width: 184px;
  height: 184px;
  margin: 0 auto 10px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
}

.qr-link-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--bg-soft);
  font-size: 12px;
  word-break: break-all;
}

.qr-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preview-tools--pro .tool-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.a9s-annotationlayer .a9s-inner,
.a9s-annotationlayer .a9s-outer {
  stroke-width: 2px !important;
}

.a9s-selection rect.a9s-inner,
.a9s-selection rect.a9s-outer {
  stroke: var(--anno-draft-color, #2563eb) !important;
  fill: var(--anno-draft-fill, rgba(37, 99, 235, 0.12)) !important;
}

.a9s-selection .a9s-selection-line-draft,
.a9s-selection .a9s-selection-square-draft,
.a9s-selection .a9s-selection-circle-draft {
  stroke: var(--anno-draft-color, #2563eb) !important;
}

.anno-config-pop {
  position: fixed;
  width: 320px;
  max-width: calc(100vw - 16px);
  z-index: 41;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  padding: 10px;
  backdrop-filter: blur(8px);
}

.anno-config-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.anno-config-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.anno-label {
  color: var(--text-muted);
  font-size: 12px;
  min-width: 56px;
}

.anno-shape-group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.anno-shape-btn {
  height: 32px;
  font-size: 12px;
  padding: 0 10px;
}

.anno-color-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.anno-color-btn {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
  cursor: pointer;
  background: var(--c);
}

.anno-color-btn.active {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--primary);
}

.anno-delete-pop {
  position: fixed;
  z-index: 42;
}

.anno-delete-mini {
  height: 28px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eaf1ff;
  color: #1d4ed8;
  font-size: 12px;
  padding: 0 10px;
  cursor: pointer;
}

/* Shared Utilities */
.auth-panel--full {
  min-height: 100vh;
}

.brand-spaced {
  margin-bottom: 10px;
}

.u-mt-10 {
  margin-top: 10px;
}

.u-flex {
  display: flex;
}

.u-gap-8 {
  gap: 8px;
}

.u-gap-18 {
  gap: 18px;
}

.u-wrap {
  flex-wrap: wrap;
}

.u-items-center {
  align-items: center;
}

.u-justify-between {
  justify-content: space-between;
}

.u-justify-end {
  justify-content: flex-end;
}

.share-list {
  display: grid;
  gap: 10px;
}

.share-card {
  padding: 12px;
}

.share-title {
  font-weight: 700;
}

.share-meta {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.profile-avatar-wrap {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-aside {
  display: grid;
  gap: 8px;
}

.avatar-lg {
  width: 96px;
  height: 96px;
  font-size: 28px;
}

.form-max-520 {
  max-width: 520px;
}

.upload-file-name {
  font-size: 14px;
  font-weight: 700;
}

.upload-meta-row {
  display: flex;
  justify-content: space-between;
}

.preview-title {
  font-weight: 700;
  font-size: 16px;
  max-width: 60vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-top-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.preview-back-btn {
  flex-shrink: 0;
}

.preview-main {
  padding: 0;
}

.share-result-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  padding: 10px;
  font-size: 13px;
  word-break: break-all;
}

.share-result-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.verify-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.verify-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.12);
}

.verify-title {
  font-size: 22px;
  margin-bottom: 8px;
}

.verify-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.verify-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eaf1ff;
  color: #1d4ed8;
  font-size: 14px;
}

.verify-submit {
  width: 100%;
}

@media (max-width: 960px) {
  .auth-page {
    display: block;
    min-height: auto;
    padding: 0;
  }

  .auth-layout {
    min-height: auto;
    width: auto;
    margin: 16px;
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .auth-side {
    display: none;
  }

  .auth-layout > .auth-panel {
    border-left: 0;
    padding: 22px 18px;
  }

  .auth-layout .auth-panel__card {
    max-width: none;
  }

  .app-topbar {
    flex-wrap: wrap;
  }

  .app-wrap {
    padding-top: 84px;
  }

  .app-topbar + .app-wrap {
    padding-top: 142px;
  }

  .app-sidebar {
    position: fixed;
    left: 10px;
    right: 10px;
    width: auto;
    top: 72px;
    bottom: auto;
    z-index: 18;
    max-height: none;
    overflow: visible;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
  }

  .app-menu {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .app-menu a {
    width: auto;
  }

  .app-main {
    margin-left: 0;
    padding: 14px 12px 16px;
    min-height: auto;
  }

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

@media (max-width: 680px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .preview-main--max {
    padding: 0;
  }

  .preview-zoom-rail {
    left: 10px;
    width: 50px;
    padding: 12px 8px;
    gap: 10px;
  }

  .preview-zoom-rail__track {
    height: min(34vh, 220px);
  }

  .preview-tools {
    left: 8px;
    right: 8px;
    bottom: 8px;
    justify-content: center;
  }

  .upload-modal__panel {
    max-height: calc(100vh - 24px);
  }

  .app-wrap {
    padding-top: 80px;
  }

  .app-topbar + .app-wrap {
    padding-top: 138px;
  }

  .app-sidebar {
    left: 8px;
    right: 8px;
    width: auto;
    top: 6px;
  }

  .app-topbar + .app-wrap .app-sidebar {
    top: 70px;
  }

  .back-top-btn {
    right: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
  }

  .preview-page .back-top-btn {
    bottom: 86px;
  }

  .anno-config-pop {
    width: min(300px, calc(100vw - 16px));
  }

  .rotate-config-pop {
    width: min(260px, calc(100vw - 16px));
  }

  .line-config-pop {
    width: min(230px, calc(100vw - 16px));
  }

  .preview-tool-sep {
    display: none;
  }

  .qr-share-panel {
    right: -4px;
  }
}
