/* dlkit-home：首页横幅版按钮和弹出层（由 dlkit.css 复制改写，原文件不受影响）
   配色取自现有横幅：深蓝 #191654 / 薄荷绿 #43c6ac / 青绿 #358d90 → #3aa099
   尺寸统一用 px，避免主题把根字号设成 62.5% 之类导致整体缩小；
   选择器都带 dlkh- 前缀并加了一层限定，尽量不受主题全局 button / a / h2 样式影响。 */

/* ========== 横幅按钮 ========== */
button.dlkh-btn,
a.dlkh-btn {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  margin: 0;
  padding: 6px 7px 6px 26px;
  border: 0;
  border-radius: 999px;
  background: #191654;
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgba(10, 8, 48, .75);
  cursor: pointer;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
button.dlkh-btn:hover,
a.dlkh-btn:hover {
  background: #26207a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -10px rgba(10, 8, 48, .8);
}
button.dlkh-btn:focus-visible,
a.dlkh-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.dlkh-btn .dlkh-btn-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #43c6ac;
  color: #191654;
  transition: transform .2s;
}
.dlkh-btn .dlkh-btn-icon svg { display: block; width: 18px; height: 18px; }
.dlkh-btn:hover .dlkh-btn-icon { transform: translateX(3px); }

/* 呼吸光圈（不需要的话，把按钮上的 dlkh-pulse 类删掉即可） */
.dlkh-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: dlkh-pulse 2.6s ease-out infinite;
}
@keyframes dlkh-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(67, 198, 172, .6); }
  70%  { box-shadow: 0 0 0 14px rgba(67, 198, 172, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 198, 172, 0); }
}

@media (max-width: 480px) {
  button.dlkh-btn,
  a.dlkh-btn { font-size: 16px; padding-left: 22px; }
}

/* ========== 弹出层 ========== */
.dlkh-dialog {
  box-sizing: border-box;
  width: min(420px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #191654;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 30px 80px -20px rgba(15, 12, 60, .6);
}
.dlkh-dialog *,
.dlkh-dialog *::before,
.dlkh-dialog *::after { box-sizing: border-box; }
.dlkh-dialog::backdrop {
  background: rgba(17, 14, 58, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.dlkh-dialog [hidden] { display: none !important; }

/* 不支持 <dialog> 的旧浏览器 */
.dlkh-dialog.dlkh-fallback {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2147483647;
  margin: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 100vmax rgba(17, 14, 58, .55);
}

/* 头部：沿用横幅的青绿渐变和连线点缀 */
.dlkh-dialog .dlkh-head {
  position: relative;
  padding: 24px 60px 22px 24px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120' viewBox='0 0 220 120'%3E%3Cg stroke='%23fff' stroke-opacity='.35' fill='none'%3E%3Cpath d='M10 110L78 46l62 30 70-66M78 46l34-46M140 76l40 44'/%3E%3C/g%3E%3Cg fill='%23fff' fill-opacity='.75'%3E%3Ccircle cx='78' cy='46' r='2.6'/%3E%3Ccircle cx='140' cy='76' r='2.6'/%3E%3Ccircle cx='210' cy='10' r='2'/%3E%3Ccircle cx='10' cy='110' r='2'/%3E%3C/g%3E%3C/svg%3E") right -24px top -8px / 220px 120px no-repeat,
    linear-gradient(120deg, #358d90 0%, #3aa099 55%, #43c6ac 100%);
  color: #fff;
}
.dlkh-dialog .dlkh-title {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .01em;
  text-align: left;
  text-transform: none;
}
.dlkh-dialog .dlkh-title::before,
.dlkh-dialog .dlkh-title::after { content: none; display: none; }
.dlkh-dialog .dlkh-sub {
  position: relative;
  margin: 4px 0 0;
  padding: 0;
  color: rgba(255, 255, 255, .9);
  font-size: 13.5px;
  line-height: 1.5;
}
.dlkh-dialog .dlkh-close {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .2s;
}
.dlkh-dialog .dlkh-close:hover { background: rgba(255, 255, 255, .34); color: #fff; }
.dlkh-dialog .dlkh-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.dlkh-dialog .dlkh-close svg { display: block; width: 18px; height: 18px; }

/* 主体：入口列表 */
.dlkh-dialog .dlkh-body { padding: 18px 20px 20px; }
.dlkh-dialog .dlkh-options { display: grid; gap: 10px; }
.dlkh-dialog .dlkh-options:empty { display: none; }

.dlkh-dialog .dlkh-item {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e3ebee;
  border-radius: 14px;
  background: #f7fafb;
  color: #191654;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, box-shadow .2s, transform .2s;
}
.dlkh-dialog .dlkh-download { background: #effaf7; border-color: #cdeee6; }
.dlkh-dialog .dlkh-item:hover,
.dlkh-dialog .dlkh-item:focus-visible {
  border-color: #43c6ac;
  background: #fff;
  color: #191654;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(25, 22, 84, .4);
  transform: translateY(-1px);
}
.dlkh-dialog .dlkh-item:focus-visible { outline: 2px solid #43c6ac; outline-offset: 2px; }
.dlkh-dialog .dlkh-item:disabled { opacity: .6; cursor: progress; transform: none; }

.dlkh-dialog .dlkh-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #191654;
  color: #fff;
}
.dlkh-dialog .dlkh-icon svg { display: block; width: 22px; height: 22px; }
.dlkh-dialog .dlkh-icon-globe { background: #358d90; }
.dlkh-dialog .dlkh-icon-download { background: #43c6ac; color: #191654; }

.dlkh-dialog .dlkh-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
.dlkh-dialog .dlkh-label { color: #191654; font-size: 16px; font-weight: 700; line-height: 1.35; }
.dlkh-dialog .dlkh-hint { margin-top: 2px; color: #6b7c88; font-size: 12.5px; line-height: 1.4; }
.dlkh-dialog .dlkh-arrow {
  display: grid;
  flex: none;
  color: #a3b3bd;
  transition: color .2s, transform .2s;
}
.dlkh-dialog .dlkh-arrow svg { display: block; width: 18px; height: 18px; }
.dlkh-dialog .dlkh-item:hover .dlkh-arrow { color: #43c6ac; transform: translateX(2px); }

/* 加载中：两行骨架占位，状态文字只给读屏软件 */
.dlkh-dialog.dlkh-loading .dlkh-options:empty { display: grid; }
.dlkh-dialog.dlkh-loading .dlkh-options:empty::before,
.dlkh-dialog.dlkh-loading .dlkh-options:empty::after {
  content: "";
  display: block;
  height: 70px;
  border-radius: 14px;
  background: linear-gradient(90deg, #eef3f4 25%, #f7fafa 50%, #eef3f4 75%) 0 0 / 200% 100%;
  animation: dlkh-shimmer 1.2s linear infinite;
}
.dlkh-dialog.dlkh-loading .dlkh-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@keyframes dlkh-shimmer { to { background-position: -200% 0; } }

.dlkh-dialog .dlkh-status {
  margin: 14px 0 0;
  padding: 0;
  color: #5b6b77;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.dlkh-dialog .dlkh-status:empty { display: none; }
.dlkh-dialog .dlkh-retry {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 12px auto 0;
  padding: 8px 22px;
  border: 1px solid #191654;
  border-radius: 999px;
  background: #fff;
  color: #191654;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}
.dlkh-dialog .dlkh-retry:hover { background: #191654; color: #fff; }

/* 手机：从底部弹出 */
@media (max-width: 480px) {
  .dlkh-dialog:not(.dlkh-fallback) {
    width: 100%;
    max-height: calc(100% - 40px);
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }
  .dlkh-dialog .dlkh-body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* 动画（系统设置了“减少动态效果”时全部关闭） */
@media (prefers-reduced-motion: no-preference) {
  .dlkh-dialog[open]:not(.dlkh-fallback) { animation: dlkh-in .22s cubic-bezier(.2, .8, .2, 1); }
  .dlkh-dialog[open]::backdrop { animation: dlkh-fade .22s ease-out; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 480px) {
  .dlkh-dialog[open]:not(.dlkh-fallback) { animation: dlkh-up .26s cubic-bezier(.2, .8, .2, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .dlkh-pulse::after { animation: none; }
  .dlkh-dialog.dlkh-loading .dlkh-options:empty::before,
  .dlkh-dialog.dlkh-loading .dlkh-options:empty::after { animation: none; }
}
@keyframes dlkh-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dlkh-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes dlkh-fade { from { opacity: 0; } to { opacity: 1; } }
