.sidebar-foot.yjh-csv-share-host {
  margin-top: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sidebar-foot.yjh-csv-share-host > .bot-dot,
.sidebar-foot.yjh-csv-share-host > small {
  display: none !important;
}

/* Keep the dynamically added video item identical to every other navigation flower. */
.main-nav .yjh-video-nav .yjh-nav-icon {
  display: grid !important;
  place-items: center !important;
  width: 27px !important;
  min-width: 27px !important;
  height: 27px !important;
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  transform: none !important;
}

.yjh-csv-share-shortcut {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  color: #29263b;
  text-align: left;
  border: 2px solid #29263b;
  border-radius: 13px;
  background: linear-gradient(145deg, #fff0a9, #ffd968);
  box-shadow: 5px 6px 0 #29263b;
  transition: transform .16s ease, box-shadow .16s ease;
}

.yjh-csv-share-shortcut:hover {
  transform: translate(-1px, -1px);
  box-shadow: 7px 8px 0 #29263b;
}

.yjh-csv-share-shortcut > span:first-child {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #4e3141;
  background: #fffaf0;
  border: 2px solid #29263b;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1;
  font-weight: 950;
}

.yjh-csv-share-shortcut b,
.yjh-csv-share-shortcut small {
  display: block;
}

.yjh-csv-share-shortcut b {
  font-size: 14px;
  font-weight: 950;
  line-height: 1.35;
}

.yjh-csv-share-shortcut small {
  margin-top: 4px;
  color: #6d5863 !important;
  font-size: 9px;
  line-height: 1.45;
}

.yjh-csv-share-shortcut > i {
  color: #7d5367;
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

.topbar > div:first-child > .yjh-compact-bot-status {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  margin: -2px 0 1px !important;
  color: #8a737f;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
}

.yjh-compact-bot-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9a8992;
}

.yjh-compact-bot-status.online::before {
  background: #26b77c;
  box-shadow: 0 0 0 2px rgba(38, 183, 124, .16);
}

html:has(.yjh-csv-dialog[open]) { overflow: hidden; }

.yjh-csv-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  color: #30242b;
  border: 0;
  border-radius: 20px;
  background: transparent;
  overflow: visible;
  font-family: "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.yjh-csv-dialog::backdrop {
  background: rgba(35, 27, 34, .58);
  backdrop-filter: blur(4px);
}

.yjh-csv-card {
  overflow: hidden;
  border: 3px solid #29263b;
  border-radius: 18px;
  background: #fffaf5;
  box-shadow: 9px 10px 0 rgba(41, 38, 59, .36);
}

.yjh-csv-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px;
  border-bottom: 2px solid #29263b;
  background: linear-gradient(135deg, #fff0a9, #ffd568);
}

.yjh-csv-card > header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yjh-csv-card > header > div > span {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 2px solid #29263b;
  border-radius: 11px;
  background: #fffaf0;
  font-size: 14px;
  font-weight: 950;
}

.yjh-csv-card h2 { margin: 0; font: 950 24px/1.25 "Microsoft JhengHei UI", "Microsoft JhengHei", sans-serif; }
.yjh-csv-card header p { margin: 4px 0 0; color: #6d5863; font-size: 13px; line-height: 1.5; }
.yjh-csv-close { width: 38px; height: 38px; padding: 0; border: 0; background: transparent; font-size: 30px; font-weight: 900; }

.yjh-csv-drop {
  margin: 20px 20px 12px;
  padding: 24px 18px 17px;
  text-align: center;
  border: 2px dashed #c47b96;
  border-radius: 15px;
  background: #fff6f8;
  transition: background .15s ease, border-color .15s ease;
}

.yjh-csv-drop.dragging { border-color: #7b3b58; background: #ffe4ee; }
.yjh-csv-drop strong, .yjh-csv-drop small { display: block; }
.yjh-csv-drop strong { font-size: 18px; }
.yjh-csv-drop small { margin: 6px 0 15px; color: #8c7581; font-size: 13px; }

.yjh-csv-choose,
.yjh-csv-copy,
.yjh-csv-open {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 15px;
  color: #fff;
  border: 2px solid #29263b;
  border-radius: 9px;
  background: #c75f85;
  box-shadow: 3px 3px 0 #29263b;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.yjh-csv-choose:disabled { cursor: wait; opacity: .55; }
.yjh-csv-file-name { margin: 12px 0 0; color: #735966; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.yjh-csv-status { min-height: 22px; margin: 0; padding: 0 20px 14px; color: #7d6873; font-size: 13px; line-height: 1.45; font-weight: 800; }
.yjh-csv-status.busy { color: #9b6a13; }
.yjh-csv-status.success { color: #19734f; }
.yjh-csv-status.warning { color: #a66a15; }
.yjh-csv-status.error { color: #bd3657; }

.yjh-csv-result {
  margin: 0 20px 20px;
  padding: 15px;
  border: 1px solid #e7c6d3;
  border-radius: 13px;
  background: #fff;
}

.yjh-csv-result label { display: block; color: #765e6a; font-size: 12px; font-weight: 900; }
.yjh-csv-result input { width: 100%; height: 42px; margin-top: 6px; padding: 0 10px; color: #382a32; border: 1px solid #d9b4c3; border-radius: 8px; background: #fff9fb; font-size: 13px; }
.yjh-csv-result > div { display: flex; gap: 9px; margin-top: 11px; }
.yjh-csv-copy, .yjh-csv-open { flex: 1; min-height: 40px; font-size: 13px; }
.yjh-csv-open { color: #4d3541; background: #fff2c2; }

@media (max-width: 760px) {
  .topbar > div:first-child > .yjh-compact-bot-status { font-size: 8px; }
  .sidebar-foot.yjh-csv-share-host { margin-top: 0 !important; }
  .yjh-csv-share-shortcut { min-height: 48px; grid-template-columns: 30px minmax(0, 1fr) 10px; padding: 7px 9px; box-shadow: 3px 4px 0 #29263b; }
  .yjh-csv-share-shortcut > span:first-child { width: 28px; height: 28px; font-size: 14px; }
  .yjh-csv-share-shortcut b { font-size: 11px; }
  .yjh-csv-share-shortcut small { display: none; }
  .yjh-csv-card > header { padding: 14px; }
  .yjh-csv-card h2 { font-size: 20px; }
  .yjh-csv-drop { margin: 15px 14px 10px; padding: 20px 12px 14px; }
  .yjh-csv-status { padding: 0 14px 12px; }
  .yjh-csv-result { margin: 0 14px 15px; }
}
