/* 回声 V2.0 · 十重灯路更新公告 */

.update-notice-open,
.update-notice-dialog button {
  appearance: none;
  border-radius: 0;
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.update-notice-open {
  position: fixed;
  top: calc(50% - 28px);
  right: calc(8px + env(safe-area-inset-right));
  z-index: 60;
  min-width: 92px;
  min-height: 60px;
  padding: 6px 7px;
  border: 2px solid rgba(232, 193, 112, 0.82);
  background: rgba(12, 15, 22, 0.9);
  color: var(--cream, #f2e6c8);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45), 0 0 18px rgba(232, 184, 75, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  font-family: var(--cn-font, monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.update-notice-open-version {
  color: var(--gold, #e8b84b);
  font-family: var(--px-font, monospace);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.update-notice-open:hover {
  border-color: #f2d492;
  background: rgba(38, 31, 24, 0.94);
}

.update-notice-open:active { transform: translateY(2px); }

.update-notice-open:focus-visible,
.update-notice-dialog button:focus-visible {
  outline: 3px solid var(--teal, #9fb8d8);
  outline-offset: 3px;
}

.update-notice-backdrop[hidden] { display: none; }

.update-notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding:
    calc(12px + env(safe-area-inset-top))
    calc(12px + env(safe-area-inset-right))
    calc(12px + env(safe-area-inset-bottom))
    calc(12px + env(safe-area-inset-left));
  background: rgba(5, 8, 14, 0.82);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 180ms ease;
  touch-action: manipulation;
  overscroll-behavior: contain;
}

.update-notice-backdrop.is-open { opacity: 1; }

.update-notice-dialog {
  width: min(620px, 100%);
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 2px solid var(--gold-dim, #a8823a);
  background:
    linear-gradient(rgba(232, 184, 75, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 184, 75, 0.035) 1px, transparent 1px),
    #101722;
  background-size: 16px 16px;
  color: var(--cream, #f2e6c8);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5), 0 0 48px rgba(232, 184, 75, 0.14);
  padding: clamp(18px, 4vw, 30px);
  transform: translateY(14px) scale(0.985);
  transition: transform 180ms ease;
  user-select: text;
  -webkit-user-select: text;
}

.update-notice-backdrop.is-open .update-notice-dialog { transform: translateY(0) scale(1); }

.update-notice-creator {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -4px 0 18px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 184, 75, 0.32);
  background: linear-gradient(90deg, rgba(232, 184, 75, 0.13), rgba(159, 184, 216, 0.035));
}

.update-notice-avatar {
  width: 44px;
  height: 44px;
  border: 2px solid var(--gold, #e8b84b);
  background: #17120e;
  color: #f2d492;
  display: grid;
  place-items: center;
  font-family: var(--cn-font, monospace);
  font-size: 19px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.42);
}

.update-notice-creator-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.update-notice-creator-copy strong {
  color: #f2e6c8;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.update-notice-creator-copy small {
  color: #8998ad;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.update-notice-pinned {
  padding: 6px 8px;
  border: 1px solid rgba(232, 184, 75, 0.56);
  background: rgba(232, 184, 75, 0.14);
  color: var(--gold, #e8b84b);
  font-family: var(--px-font, monospace);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.update-notice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(232, 184, 75, 0.38);
}

.update-notice-badge {
  color: var(--gold, #e8b84b);
  font-family: var(--px-font, monospace);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.update-notice-header h2 {
  margin-top: 6px;
  color: #f2d492;
  font-family: var(--cn-font, monospace);
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1;
}

.update-notice-close {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(159, 184, 216, 0.5);
  background: rgba(159, 184, 216, 0.08);
  color: var(--teal, #9fb8d8);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.update-notice-summary {
  margin: 16px 0;
  color: #d8e0ec;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.03em;
}

.update-notice-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.update-notice-list li {
  min-height: 48px;
  padding: 10px 12px;
  border-left: 3px solid rgba(232, 184, 75, 0.66);
  background: rgba(8, 13, 22, 0.72);
  display: grid;
  grid-template-columns: minmax(92px, 0.34fr) 1fr;
  align-items: center;
  gap: 12px;
}

.update-notice-list strong {
  color: var(--gold, #e8b84b);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.update-notice-list span {
  color: #b9c5d6;
  font-size: 14px;
  line-height: 1.5;
}

.update-notice-message {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-top: 1px solid rgba(159, 184, 216, 0.2);
  border-bottom: 1px solid rgba(159, 184, 216, 0.2);
  color: #c9d4e2;
  font-size: 14px;
  line-height: 1.7;
}

.update-notice-message span {
  display: block;
  margin-bottom: 3px;
  color: var(--gold, #e8b84b);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.update-notice-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.update-notice-release {
  color: var(--dim, #6b7488);
  font-family: var(--px-font, monospace);
  font-size: 9px;
}

.update-notice-acknowledge {
  min-width: 132px;
  min-height: 48px;
  padding: 10px 20px;
  border: 2px solid var(--gold, #e8b84b);
  background: rgba(232, 184, 75, 0.16);
  color: #f7dfaa;
  cursor: pointer;
  font-family: var(--cn-font, monospace);
  font-size: 16px;
  letter-spacing: 0.12em;
}

.update-notice-close:hover,
.update-notice-acknowledge:hover { background: rgba(232, 184, 75, 0.24); }

@media (max-width: 560px) {
  .update-notice-open {
    top: calc(8px + env(safe-area-inset-top));
    right: calc(8px + env(safe-area-inset-right));
    min-width: 104px;
  }

  .update-notice-creator {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .update-notice-pinned {
    grid-column: 2;
    justify-self: start;
  }

  .update-notice-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .update-notice-footer { align-items: flex-end; }
}

@media (max-height: 520px) {
  .update-notice-dialog { padding: 14px 18px; }
  .update-notice-header { padding-bottom: 10px; }
  .update-notice-summary { margin: 10px 0; font-size: 14px; }
  .update-notice-list { gap: 5px; }
  .update-notice-list li { min-height: 44px; padding: 6px 10px; }
  .update-notice-footer { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .update-notice-open,
  .update-notice-backdrop,
  .update-notice-dialog {
    transition: none;
  }
}
