:root {
  --gold-1: #f7d54e;
  --gold-2: #eabf2d;
  --gold-3: #b88900;
  --text: #251d13;
  --muted: #6d5c41;
  --side-1: #212121;
  --side-2: #2d2d2d;
  --side-3: #383838;
  --line: rgba(120, 94, 22, 0.14);
  --shadow: 0 22px 60px rgba(126, 92, 11, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 16%, rgba(255, 222, 93, 0.35), transparent 20%),
    radial-gradient(circle at 55% 64%, rgba(255, 222, 93, 0.24), transparent 18%),
    linear-gradient(180deg, #f8efbd 0%, #f5eed8 28%, #faf6ea 100%);
}

body {
  min-height: 100vh;
}

.shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 100%);
  border-bottom: 1px solid rgba(132, 98, 18, 0.16);
}

.brand-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

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

.brand-badge {
  min-width: 76px;
  padding: 7px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffe81b 0%, #ffcb00 100%);
  color: #1484dc;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow:
    inset 0 -4px 0 rgba(255, 255, 255, 0.35),
    0 10px 24px rgba(179, 131, 0, 0.18);
}

.brand-title {
  font-size: 17px;
  font-style: italic;
  font-weight: 900;
}

.topbar-tools {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.search-box,
.lookup-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.search-box {
  min-width: 220px;
  position: relative;
}

.lookup-box {
  min-width: 360px;
}

.search-box input,
.lookup-row input,
.menu-inline select {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(114, 84, 16, 0.2);
  background: rgba(255, 250, 238, 0.96);
  padding: 0 14px;
  color: var(--text);
}

.lookup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.lookup-row button {
  height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  background: #1f1f1f;
  color: #fff2b7;
  font-weight: 700;
  cursor: pointer;
}

.lookup-result {
  min-height: 18px;
  color: rgba(37, 29, 19, 0.76);
  font-size: 12px;
}

.lookup-result strong {
  color: #7a5300;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(114, 84, 16, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.98);
  box-shadow: 0 16px 36px rgba(64, 43, 10, 0.18);
}

.search-suggestion {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.search-suggestion:hover,
.search-suggestion.active {
  background: rgba(245, 205, 56, 0.2);
}

.search-suggestion-path {
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.search-suggestion-url {
  display: block;
  margin-top: 2px;
  color: rgba(37, 29, 19, 0.58);
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: calc(100vh - 89px);
}

.sidebar-wrap {
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 249, 228, 0.75);
}

.header-menu-bar {
  width: 256px;
  padding: 6px 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 213, 78, 0.95) 0%, rgba(235, 198, 64, 0.95) 100%);
  border: 1px solid rgba(132, 98, 18, 0.16);
}

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

.menu-inline-label {
  flex: 0 0 auto;
  color: #4e3900;
  font-size: 12px;
  font-weight: 800;
}

.menu-inline select {
  min-width: 0;
  flex: 1;
  height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 12px;
}

.sidebar {
  flex: 1;
  background: linear-gradient(180deg, var(--side-1) 0%, var(--side-2) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.sidebar-home {
  padding: 14px 18px;
  background: #f5f1e8;
  color: #151515;
  font-weight: 800;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.sidebar-home.active {
  border-left-color: var(--gold-3);
}

.sidebar-scroll {
  overflow: auto;
  padding-bottom: 28px;
}

.menu-group {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-group-header {
  width: 100%;
  padding: 14px 18px;
  background: #202020;
  color: #ffd34b;
  border: 0;
  text-align: left;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-group-header::before {
  content: "▼";
  font-size: 10px;
}

.menu-group:not(.open) .menu-group-header::before {
  content: "▶";
}

.menu-items {
  display: none;
  background: var(--side-3);
}

.menu-group.open .menu-items {
  display: block;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 32px;
  background: transparent;
  color: #fff1b0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}

.menu-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  color: #ffd34b;
  font-weight: 900;
}

.menu-link:hover,
.menu-link.active {
  background: linear-gradient(90deg, rgba(255, 208, 74, 0.18), rgba(255, 208, 74, 0.04));
  color: #fff;
}

.menu-empty {
  padding: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.content {
  position: relative;
  padding: 24px;
}

.hero-card,
.detail-panel,
.load-card {
  background: rgba(255, 251, 241, 0.88);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-card {
  min-height: calc(100vh - 137px);
  display: block;
  overflow: hidden;
}

.hero-art {
  position: relative;
  min-height: calc(100vh - 137px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 249, 231, 0.14)),
    linear-gradient(90deg, #f7f0c7 0%, #f7f0c7 28%, #f3efdd 48%, #f7f0c7 100%);
}

.hero-art-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
  pointer-events: none;
}

.hero-art-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.14), transparent 24%);
  z-index: 1;
}

.hero-tip {
  position: absolute;
  top: 168px;
  left: 22px;
  z-index: 2;
  max-width: 300px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 247, 204, 0.92);
  border: 1px solid rgba(224, 171, 0, 0.26);
  box-shadow: 0 16px 34px rgba(126, 92, 11, 0.14);
  backdrop-filter: blur(3px);
  animation: hero-tip-float 3.2s ease-in-out infinite, hero-tip-glow 2.6s ease-in-out infinite;
}

.hero-tip-arrow {
  position: absolute;
  left: -8px;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  animation: hero-tip-arrow-nudge 1.6s ease-in-out infinite;
  z-index: 3;
  overflow: visible;
}

.hero-tip-arrow::before,
.hero-tip-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.hero-tip-arrow::before {
  width: 20px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(244, 184, 20, 0.12), #ffbf00 45%, #b97800 100%);
  box-shadow: 0 0 12px rgba(240, 180, 0, 0.32);
}

.hero-tip-arrow::after {
  left: -1px;
  width: 11px;
  height: 11px;
  border-left: 5px solid #b97800;
  border-bottom: 5px solid #b97800;
  transform: translateY(-50%) rotate(45deg);
}

.hero-tip-label {
  display: block;
  font-size: 18px;
  font-weight: 900;
  color: #9a6400;
}

.hero-tip-text {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 800;
  color: #5f4300;
}

@keyframes hero-tip-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes hero-tip-glow {
  0%,
  100% {
    box-shadow: 0 16px 34px rgba(126, 92, 11, 0.14);
  }
  50% {
    box-shadow: 0 18px 44px rgba(224, 171, 0, 0.24);
  }
}

@keyframes hero-tip-arrow-nudge {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-50%) translateX(-4px);
    opacity: 1;
  }
}

.detail-panel {
  padding: 28px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.detail-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-3);
}

.detail-header h2 {
  margin: 0;
  font-size: 34px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(118, 87, 17, 0.2);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.action-btn.primary {
  background: linear-gradient(135deg, #f5d164 0%, #e5b631 100%);
}

.action-btn-copy {
  min-width: 190px;
  height: 54px;
  padding: 0 28px;
  font-size: 18px;
  font-weight: 900;
  color: #4b3200;
  box-shadow: 0 12px 24px rgba(214, 163, 16, 0.24);
}

.copy-tip {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 248, 219, 0.88);
  border: 1px dashed rgba(214, 163, 16, 0.44);
  color: #7a5300;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
}

.copy-tip.success {
  background: rgba(231, 255, 234, 0.92);
  border-color: rgba(48, 143, 66, 0.4);
  color: #1f7a31;
}

.copy-tip.error {
  background: rgba(255, 239, 237, 0.92);
  border-color: rgba(179, 38, 30, 0.32);
  color: #b3261e;
}

.detail-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 14px;
}

.info-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.info-card-wide {
  grid-column: 1 / -1;
}

.info-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.info-card strong,
.info-card a {
  color: var(--text);
  font-size: 15px;
  word-break: break-all;
}

.path-output {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px 16px;
  color: var(--text);
  font: 14px/1.7 "Segoe UI", "Microsoft YaHei", sans-serif;
}

.preview-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.68);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.preview-note {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.preview-fallback {
  padding: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.selection-list {
  padding: 8px 18px 18px;
}

.selection-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.selection-item:last-child {
  border-bottom: 0;
}

.selection-path {
  font-weight: 700;
  color: var(--text);
}

.selection-link {
  display: inline-block;
  margin-top: 6px;
  color: #7a5300;
  text-decoration: none;
  word-break: break-all;
}

.load-panel {
  position: absolute;
  inset: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.load-card {
  max-width: 420px;
  padding: 28px 32px;
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-art {
    min-height: 420px;
  }

  .hero-art-image {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 16px;
  }

  .header-menu-bar {
    width: 100%;
  }

  .topbar-tools {
    width: 100%;
  }

  .lookup-box,
  .search-box {
    min-width: 0;
  }

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

  .content {
    padding: 16px;
  }

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

  .detail-header,
  .preview-head,
  .menu-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-card,
  .detail-panel,
  .load-card {
    border-radius: 24px;
  }

  .sidebar-home {
    padding: 16px 18px;
  }

  .menu-group-header {
    padding: 16px 18px;
  }

  .menu-link {
    padding: 14px 20px 14px 26px;
    font-size: 16px;
  }

  .detail-panel {
    padding: 22px 18px;
  }

  .detail-header h2 {
    font-size: 28px;
  }

  .detail-actions {
    width: 100%;
  }

  .action-btn {
    width: 100%;
    height: 48px;
    font-size: 16px;
  }

  .action-btn-copy {
    min-width: 0;
    height: 52px;
    font-size: 17px;
  }

  .path-output {
    min-height: 180px;
    font-size: 15px;
  }

  .selection-list {
    padding: 6px 14px 14px;
  }

  .selection-item {
    padding: 12px 0;
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at 88% 12%, rgba(255, 222, 93, 0.28), transparent 24%),
      linear-gradient(180deg, #f8efbd 0%, #f5eed8 22%, #faf6ea 100%);
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(152px, 41%);
    align-items: start;
    padding: 14px 14px 18px;
    gap: 12px;
  }

  .brand-wrap {
    gap: 12px;
    align-items: center;
  }

  .brand-badge {
    min-width: 92px;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 22px;
  }

  .brand-title {
    font-size: 18px;
    line-height: 1.2;
  }

  .brand-subtitle {
    margin-top: 4px;
    font-size: 12px;
  }

  .brand-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-width: 0;
  }

  .header-menu-bar {
    grid-column: 1 / -1;
    padding: 12px;
    border-radius: 18px;
  }

  .menu-inline-label {
    font-size: 13px;
  }

  .menu-inline select,
  .search-box input,
  .lookup-row input {
    height: 46px;
    border-radius: 14px;
    font-size: 16px;
  }

  .topbar-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-self: stretch;
  }

  .lookup-box,
  .search-box {
    width: 100%;
    min-width: 0;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 244, 202, 0.58);
    border: 1px solid rgba(137, 97, 4, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }

  .search-box span,
  .lookup-box label {
    font-size: 11px;
    line-height: 1.2;
  }

  .lookup-row {
    grid-template-columns: 1fr 76px;
    align-items: stretch;
  }

  .lookup-row button {
    height: 46px;
    border-radius: 14px;
    font-size: 15px;
    padding: 0 12px;
  }

  .lookup-result {
    min-height: 14px;
    font-size: 11px;
  }

  .workspace {
    min-height: auto;
  }

  .sidebar {
    border-radius: 0;
  }

  .content {
    padding: 14px 12px 20px;
  }

  .hero-card {
    min-height: auto;
  }

  .oa-guide {
    margin-top: 14px !important;
    padding: 14px 14px !important;
    border-radius: 16px !important;
  }

  .oa-guide-title {
    font-size: 16px !important;
  }

  .oa-guide-text {
    font-size: 14px !important;
    line-height: 1.7 !important;
  }

  .hero-art {
    min-height: 220px;
  }

  .hero-art-image {
    width: 100%;
    object-position: center 36%;
  }

  .hero-tip {
    top: 108px;
    left: 14px;
    max-width: 220px;
    padding: 12px 14px;
  }

  .hero-tip-arrow {
    left: -6px;
    width: 18px;
    height: 18px;
  }

  .hero-tip-label {
    font-size: 15px;
  }

  .hero-tip-text {
    font-size: 12px;
    line-height: 1.6;
  }

  .detail-panel {
    padding: 18px 14px;
    border-radius: 22px;
  }

  .detail-label {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .detail-header h2 {
    font-size: 22px;
  }

  .detail-grid {
    margin-top: 18px;
    gap: 10px;
  }

  .info-card {
    padding: 14px;
    border-radius: 16px;
  }

  .path-output {
    min-height: 156px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.75;
  }

  .preview-panel {
    margin-top: 18px;
    border-radius: 18px;
  }

  .preview-head {
    padding: 14px 16px;
    font-size: 15px;
  }

  .selection-list {
    padding: 4px 12px 12px;
  }

  .selection-path {
    font-size: 15px;
    line-height: 1.7;
  }

  .selection-link {
    font-size: 13px;
    line-height: 1.6;
  }

  .load-panel {
    inset: 14px;
  }

  .load-card {
    padding: 22px 18px;
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-tip {
    animation: none;
  }

  .hero-tip-arrow {
    animation: none;
  }
}
