.entry-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(100% - 32px, 480px);
  max-height: calc(100% - 32px);
  padding: 0;
  background: var(--modal-bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  scrollbar-width: thin;
  scrollbar-color: var(--faint) var(--modal-bg);
  font-size: 14px;
}

.entry-dialog::backdrop {
  background: rgba(11, 12, 16, .58);
  backdrop-filter: blur(4px);
}

.entry-content { padding: 22px 24px 16px; line-height: 1.55; }
.entry-content h2 { font-size: 21px; line-height: 1.25; margin-bottom: 10px; }
#entryTitle:focus { outline: none; }
.entry-content p { color: var(--muted); }
.entry-policy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-top: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.entry-policy svg { flex: none; }
.entry-policy:hover { background: var(--hover); border-color: var(--accent-border); }

.entry-choice {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.entry-choice:hover { background: var(--hover); }
.entry-choice input {
  appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--muted);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--text);
  cursor: inherit;
}

.entry-choice input:checked { border-color: var(--accent-ink, var(--accent)); background: var(--accent-soft); }
.entry-choice input:checked::after {
  content: '';
  width: 8px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 0 1.6px 1.6px;
  transform: translateY(-1px) rotate(-45deg);
}


.entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
}

.entry-actions button {
  min-height: 38px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.entry-actions .entry-decline:hover { background: var(--hover); }
.entry-actions .entry-continue { background: var(--accent-soft); border-color: var(--accent-border); }
.entry-actions .entry-continue:enabled:hover { background: color-mix(in srgb, var(--accent) 24%, var(--surface)); }
.entry-actions .entry-continue:disabled { color: var(--muted); background: transparent; border-color: var(--line); cursor: default; }
.entry-dialog :is(a, button, input):focus-visible { outline: 2px solid var(--accent-ink, var(--accent)); outline-offset: 2px; }

@media (max-width: 420px) {
  .entry-content { padding: 18px 16px 14px; }
  .entry-actions { padding-inline: 16px; }
  .entry-actions button { flex: 1 1 110px; }
}

@media (prefers-reduced-motion: no-preference) {
  .entry-dialog[open] { animation: entry-appear .16s ease-out; }
  @keyframes entry-appear { from { opacity: 0; transform: translateY(5px); } }
}

#entryError:empty { display: none; }
#entryError { margin-top: 8px; color: var(--red); }
