.nc-entry-dialog {
  --entry-paper:#fff;
  --entry-ink:#1c342b;
  --entry-secondary:#4c6355;
  --entry-line:#dce6de;
  --entry-border:#879a8e;
  --entry-green:#196148;
  width:min(600px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 22px);
  padding:0; border:1px solid #c9d8ce; border-radius:16px; overflow:hidden;
  background:var(--entry-paper); color:var(--entry-ink); color-scheme:only light;
  box-shadow:0 24px 64px #14392b36;
}
.nc-entry-dialog[open] { display:flex; flex-direction:column; }
.nc-entry-dialog::backdrop { background:#182e2866; }
.nc-entry-dialog :focus-visible { outline:2px solid var(--entry-green); outline-offset:1px; }
.nc-entry-dialog header,.nc-entry-dialog footer {
  display:flex; flex:none; justify-content:space-between; align-items:center; gap:8px 12px;
  margin:0; padding:14px 22px;
}
.nc-entry-dialog header { border-bottom:1px solid var(--entry-line); }
.nc-entry-dialog header h2 {
  min-width:0; font-size:1.23rem; line-height:1.22; font-weight:700;
  letter-spacing:-.025em; overflow-wrap:anywhere;
}
.nc-entry-heading { display:flex; align-items:center; gap:11px; min-width:0; }
.nc-entry-dialog svg { flex:none; width:16px; height:16px; }
.nc-entry-emblem {
  display:grid; place-items:center; flex:none; width:40px; height:40px;
  border-radius:9px; background:#f2edf5; color:#665074;
}
.nc-entry-dialog .nc-entry-emblem svg { width:19px; height:19px; }
.nc-entry-dialog .nc-entry-close {
  display:grid; place-items:center; flex:none; width:44px; height:44px; padding:0;
  border:1px solid transparent; border-radius:8px; background:transparent; color:var(--entry-secondary);
}
.nc-entry-dialog .nc-entry-close:hover:not(:disabled) { border-color:var(--entry-line); background:#eff4ef; }
.nc-entry-dialog form { display:flex; flex-direction:column; min-height:0; }
.nc-entry-body {
  display:grid; align-content:start; gap:16px; min-width:0; min-height:0; padding:17px 22px 20px;
  overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scroll-padding:12px;
}
.nc-entry-body fieldset { min-width:0; margin:0; padding:0; border:0; }
.nc-entry-body legend { margin-bottom:6px; padding:0; color:var(--entry-secondary); font-size:.78rem; font-weight:650; }
.nc-entry-types {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px;
  padding:3px; border:1px solid var(--entry-line); border-radius:10px; background:#eff4ef;
}
.nc-entry-types label {
  position:relative; display:flex; justify-content:center; align-items:center; min-width:0; min-height:44px;
  padding:5px 3px; border:1px solid transparent; border-radius:7px; text-align:center;
  color:var(--entry-secondary); font-size:.81rem; line-height:1.3; cursor:pointer; overflow-wrap:anywhere;
}
.nc-entry-types label > span { display:flex; align-items:center; justify-content:center; gap:5px; min-width:0; }
.nc-entry-types label:hover { background:#e7efe8; }
.nc-entry-types label:has(input:checked) {
  border-color:#a3bfb0; background:var(--entry-paper); color:#1c5942;
  box-shadow:0 1px 2px #14392b18; font-weight:700;
}
.nc-entry-types label:has(input:focus-visible) { outline:2px solid var(--entry-green); }
.nc-entry-types input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.nc-entry-field { display:grid; gap:5px; min-width:0; color:#2a4a3a; font-size:.86rem; font-weight:650; }
.nc-entry-label { display:flex; align-items:center; gap:6px; }
.nc-entry-field :is(input,select,textarea) {
  width:100%; min-width:0; min-height:44px; padding:8px 10px; border:1px solid var(--entry-border);
  border-radius:8px; background:var(--entry-paper); color:var(--entry-ink); font:inherit; font-weight:450;
}
.nc-entry-field textarea { min-height:82px; resize:vertical; }
.nc-entry-dialog[data-kind=note] textarea { min-height:108px; }
.nc-entry-field [aria-invalid=true] { border-color:#a74235; }
.nc-entry-planning {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.34fr); align-items:start; gap:12px;
  padding:12px; border:1px solid #e1e9e2; border-radius:11px; background:#f6f8f5;
}
.nc-entry-dialog[data-kind=personal-event] .nc-entry-planning,
.nc-entry-planning:has(input[name=reminderDate]:not(:disabled)) { grid-template-columns:minmax(0,1fr); }
.nc-entry-group { display:grid; gap:7px; min-width:0; }
.nc-entry-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; min-width:0; align-items:end; }
.nc-entry-dialog:not([data-kind=personal-event]) .nc-entry-dates { grid-template-columns:minmax(0,1fr); }
.nc-entry-day-options { display:flex; gap:6px 12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.nc-entry-check { display:flex; gap:7px; min-height:44px; align-items:center; font-size:.84rem; cursor:pointer; }
.nc-entry-check input { width:17px; height:17px; margin:0; accent-color:var(--entry-green); }
.nc-entry-hint { color:var(--entry-secondary); font-size:.8rem; overflow-wrap:anywhere; }
.nc-entry-error { padding:8px 10px; border-radius:7px; background:#ffefeb; color:#903326; font-size:.84rem; }
.nc-entry-dialog footer { flex-wrap:wrap; background:#fcfdfa; border-top:1px solid var(--entry-line); }
.nc-entry-privacy,.nc-entry-controls { display:flex; align-items:center; gap:8px; }
.nc-entry-privacy svg { width:14px; height:14px; }
.nc-entry-controls { margin-inline-start:auto; }
.nc-entry-controls button { min-height:44px; padding-inline:13px; border-radius:8px; font-size:.86rem; }
@media (max-width:510px) {
  .nc-entry-dialog header,.nc-entry-dialog footer { padding:10px 12px; }
  .nc-entry-dialog header h2 { font-size:1.07rem; }
  .nc-entry-body { gap:13px; padding:12px; }
  .nc-entry-emblem { width:34px; height:34px; }
  .nc-entry-planning { grid-template-columns:minmax(0,1fr); padding:9px; gap:9px; }
  .nc-entry-controls { width:100%; justify-content:flex-end; }
}
@media (max-width:355px) {
  .nc-entry-types label { font-size:.74rem; }
  .nc-entry-types label > span { flex-direction:column; gap:2px; }
  .nc-entry-pair { grid-template-columns:minmax(0,1fr); }
  .nc-entry-controls button { padding-inline:9px; }
}
@media (forced-colors:active) {
  .nc-entry-types label:has(input:checked) { border-color:Highlight; text-decoration:underline; }
}
