.nt-shell {
  --nt-ink:#192d30; --nt-muted:#4f6164; --nt-paper:#fffdf6;
  --nt-plate:#f1eee3; --nt-line:#c7c3b7; --nt-accent:#235f54;
  color:var(--nt-ink); font:inherit; line-height:1.48;
  margin-inline:auto; max-width:46rem; padding:1rem;
}
body.nt-new { margin:0; background:#faf8f0; color:#192d30; font:1rem/1.48 system-ui,sans-serif; }
.nt-shell *, .nt-shell *::before, .nt-shell *::after { box-sizing:border-box; }
.nt-shell h1 { font-size:clamp(1.4rem,4vw,2.25rem); line-height:1.16; margin:.15rem 0 .55rem; }
.nt-shell h2 { font-size:1.15rem; margin:.25rem 0 .5rem; }
.nt-shell h3 { font-size:1rem; margin:.25rem 0 .45rem; }
.nt-shell p { margin:.4rem 0; }
.nt-shell form { margin:0; }
.nt-shell nav,.nt-actions { display:flex; flex-wrap:wrap; gap:.45rem .75rem; align-items:center; }
.nt-shell nav { margin:.25rem 0 .7rem; }
.nt-shell nav a, .nt-shell a { color:#1b554a; overflow-wrap:anywhere; }
.nt-shell button,.nt-shell select,.nt-shell input:not([type=checkbox]) {
  font:inherit; color:inherit; border:1px solid var(--nt-line); border-radius:.35rem;
  background:var(--nt-paper); min-height:2.5rem; max-width:100%; padding:.3rem .55rem;
}
.nt-shell button { cursor:pointer; font-weight:600; }
.nt-shell button.nt-primary { background:var(--nt-accent); border-color:var(--nt-accent); color:white; }
.nt-shell button:disabled { opacity:.55; cursor:default; }
.nt-shell :focus-visible { outline:3px solid #a95c24; outline-offset:2px; }
.nt-panel { background:var(--nt-paper); border:1px solid var(--nt-line); border-radius:.6rem; padding:.75rem; margin:.7rem 0; }
.nt-inline { display:flex; flex-wrap:wrap; align-items:end; gap:.4rem .75rem; }
.nt-field { display:grid; gap:.15rem; }
.nt-field :is(input, select) { min-width:0; }
.nt-shell fieldset { padding:0; margin:.4rem 0; min-inline-size:0; border:0; }
.nt-shell legend { font-weight:600; }
.nt-shell summary { cursor:pointer; margin:.45rem 0; }
.nt-calendar { display:grid; grid-template-columns:1.35fr 1fr 1fr; gap:.45rem; }
.nt-note { color:var(--nt-muted); font-size:.9rem; }
.nt-shell [hidden] { display:none !important; }
.nt-status { color:#943827; margin:.4rem 0; }
.nt-result { scroll-margin-top:.5rem; }
.nt-shell table { width:100%; border-collapse:collapse; margin:.35rem 0; table-layout:fixed; font-size:.93rem; }
.nt-shell th,.nt-shell td { border-bottom:1px solid var(--nt-line); padding:.27rem .3rem; text-align:left; overflow-wrap:anywhere; }
.nt-shell td select { min-height:2.3rem; }
.nt-shell tbody tr:last-child td { border-bottom:0; }
.nt-lines col:nth-child(1) { width:22%; }
.nt-lines col:nth-child(2) { width:36%; }
.nt-glyph { display:inline-grid; grid-auto-rows:.23rem; width:2.3rem; gap:.18rem; vertical-align:middle; margin-inline-end:.3rem; }
.nt-glyph span { background:currentColor; }
.nt-glyph .yin { background:linear-gradient(to right,currentColor 0 44%,transparent 44% 56%,currentColor 56%); }
.nt-gua { font-size:1.12rem; font-weight:600; display:flex; align-items:center; }
.nt-gua-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap:.55rem; }
.nt-shell blockquote { margin:.35rem 0 .45rem; padding:.35rem .7rem; border-inline-start:3px solid var(--nt-line); background:#f5f1e6; overflow-wrap:anywhere; }
.nt-shell dialog { width:min(91vw,29rem); max-height:88vh; border:1px solid var(--nt-line); border-radius:.6rem; background:var(--nt-paper); color:var(--nt-ink); padding:1rem; }
.nt-shell dialog::backdrop { background:#192d3070; }
.nt-shell dialog .nt-field { margin:.55rem 0; }
.nt-shell .nt-links { border-top:1px solid var(--nt-line); margin-top:1.15rem; padding-top:.6rem; }
@media(max-width:430px) {
  .nt-shell { padding:.6rem .7rem; }
  .nt-shell .nt-panel { margin:.5rem 0; padding:.55rem; }
  .nt-shell td { padding:.18rem .26rem; }
}
.nt-single { display:inline-block; width:1.35rem; height:.17rem; margin-inline-end:.3rem; vertical-align:middle; background:currentColor; }
.nt-single.yin { background:linear-gradient(to right,currentColor 0 41%,transparent 41% 59%,currentColor 59%); }
.nt-shell textarea { width:100%; font:inherit; border:1px solid var(--nt-line); background:var(--nt-paper); padding:.35rem; }
.nt-shell .nt-layout { display:grid; column-gap:1rem; }
.nt-shell .nt-almanac { max-width:100%; align-self:start; }
@media(min-width:900px) {
  .nt-shell:has(.nt-almanac) { max-width:69rem; }
  .nt-shell .nt-layout:has(.nt-almanac) { grid-template-columns:minmax(0,1fr) 16rem; }
  .nt-shell .nt-almanac { grid-column:2; grid-row:1 / span 2; position:sticky; top:1rem; }
  .nt-shell .nt-layout > :not(.nt-almanac) { grid-column:1; }
}
.nt-shell .nt-almanac:not([open]) { padding:.25rem .55rem; }
.nt-shell .nt-almanac:not([open]) summary { margin:.1rem 0; }
.nt-shell #nt-result:focus { outline-offset:1px; }
