/* Utlra 服务须知弹窗：与控制台同一套（纯黑 + 象牙白 + 单一紫色），由 notice.js 插入。
   所有内容共用一条左边线；紫色只出现在 logo、勾选后的方块与焦点框。 */

html.un-lock, html.un-lock body { overflow: hidden !important; }
/* 首屏黑幕：弹窗插入前盖住页面，notice.js 插入弹窗后撤掉 */
html.un-pending body::after { content: ''; position: fixed; inset: 0; z-index: 2147482999; background: #000; }

.un-mask {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s ease;
}
.un-mask.on { opacity: 1; }
.un-mask.un-instant, .un-mask.un-instant .un-card { transition: none; }

.un-card {
  --line: rgba(236, 232, 225, .08);
  --line-2: rgba(236, 232, 225, .16);
  --ivory: #ece8e1; --ivory-2: #a19d96; --ivory-3: #67645f; --key: #8a83ff;
  --pad: 32px;
  --serif: 'Instrument Serif', 'Songti SC', 'Noto Serif SC', 'STSong', serif;
  --sans: 'Inter', -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto;
  background: #0a0a0a;
  border: 1px solid var(--line-2);
  box-shadow: 0 32px 80px -24px rgba(0, 0, 0, .95);
  color: var(--ivory);
  font: 13px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  outline: none;
  transform: translateY(8px); transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.un-mask.on .un-card { transform: none; }

/* ── 头部 ── */
.un-head { padding: 24px var(--pad) 22px; border-bottom: 1px solid var(--line); }
.un-top { display: flex; align-items: center; justify-content: space-between; }
.un-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font: 400 17px/1 var(--serif); letter-spacing: .01em; color: var(--ivory);
}
.un-brand svg { width: 12px; height: 12px; flex: none; }
.un-label { font-size: 11.5px; letter-spacing: .12em; color: var(--ivory-3); }
/* 中文标题用正文字体：衬线体没有中文字形，混排会两种字体打架 */
.un-title { margin: 28px 0 0; font: 500 20px/1.4 var(--sans); letter-spacing: .02em; color: var(--ivory); }

/* ── 正文：两段 + 确认，全部顶齐同一条左边线 ── */
.un-body { padding: 4px var(--pad) 0; }
.un-sec { padding: 18px 0; border-bottom: 1px solid var(--line); }
.un-sec h3 {
  margin: 0 0 6px; font: 500 13px/1.5 var(--sans); letter-spacing: .02em; color: var(--ivory);
}
.un-sec p { margin: 0; font-size: 12.5px; color: var(--ivory-2); }
.un-sec strong { color: var(--ivory); font-weight: 500; }
.un-check a {
  color: var(--ivory); text-decoration: none;
  border-bottom: 1px solid var(--line-2); padding-bottom: 1px;
  transition: border-color .2s;
}
.un-check a:hover { border-color: var(--ivory); }
.un-check a:focus-visible { outline: 1px solid var(--key); outline-offset: 2px; }

.un-check {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 20px 0 0; cursor: pointer;
  font-size: 12.5px; line-height: 1.7; color: var(--ivory-2);
  transition: color .2s;
}
.un-check:hover, .un-check:has(input:checked) { color: var(--ivory); }
.un-check input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 14px; height: 14px; margin: 3px 0 0; border: 1px solid rgba(236, 232, 225, .3);
  background: transparent; cursor: pointer; display: grid; place-content: center;
  transition: border-color .2s, background .2s;
}
.un-check input::before {
  content: ''; width: 8px; height: 8px;
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 70%);
  background: #000; transform: scale(0); transition: transform .15s;
}
.un-check:hover input { border-color: var(--ivory-2); }
.un-check input:checked { background: var(--key); border-color: var(--key); }
.un-check input:checked::before { transform: scale(1); }
.un-check input:focus-visible { outline: 1px solid var(--key); outline-offset: 3px; }
.un-check.un-need { color: var(--ivory); animation: un-shake .4s cubic-bezier(.36, .07, .19, .97); }
.un-check.un-need input { border-color: #d9b46a; }
@keyframes un-shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.un-hint { min-height: 18px; margin: 6px 0 0 26px; font-size: 11.5px; line-height: 18px; color: #d9b46a; }
.un-hint:empty { visibility: hidden; }

/* ── 操作：一个按钮，与正文同宽 ── */
.un-foot { display: grid; padding: 14px var(--pad) var(--pad); }
.un-btn {
  height: 38px; padding: 0 16px; border-radius: 0; cursor: pointer;
  font: 500 12.5px var(--sans); letter-spacing: .04em; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.un-btn:focus-visible { outline: 1px solid var(--key); outline-offset: 2px; }
.un-ok { background: var(--ivory); color: #000; border: 1px solid var(--ivory); }
.un-ok:hover { background: #fff; border-color: #fff; }
.un-ok[aria-disabled="true"] { background: #151515; color: var(--ivory-3); border-color: #151515; }

@media (max-width: 480px) {
  .un-card { --pad: 22px; }
  .un-head { padding-top: 20px; }
  .un-title { margin-top: 22px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .un-mask, .un-card, .un-check input::before { transition: none; }
  .un-check.un-need { animation: none; }
}
