/* ══════════════════════════════════════════════════
   NEPALI CALENDAR — widget designs
   Every rule is scoped under .nc and sets its own font, size, colour and spacing,
   so the calendar looks the same anywhere. All sizes are in em, so --nc-size scales everything.
   Options: --nc-size, --nc-color, --nc-accent, --nc-face (card background)
══════════════════════════════════════════════════ */
.nc{
  --nc-size:14px;--nc-color:#1b2f50;--nc-accent:#f47a20;--nc-face:#fff;--nc-sat:#e03131;
  box-sizing:border-box;margin:0;padding:.35em;
  font-family:"Mukta","Plus Jakarta Sans",system-ui,sans-serif;font-size:var(--nc-size);font-weight:400;font-style:normal;
  line-height:1.4;color:var(--nc-color);text-align:left;letter-spacing:0;text-transform:none;word-spacing:normal;
}
.nc *,.nc *::before,.nc *::after{box-sizing:border-box;margin:0;padding:0;border:0;font:inherit;color:inherit;letter-spacing:inherit;text-transform:none;background:none;text-decoration:none}
.nc button{cursor:pointer;-webkit-appearance:none;appearance:none}
.nc button:focus-visible,.nc a:focus-visible{outline:2px solid var(--nc-accent);outline-offset:1px}
.nc[data-align="center"] .nc-card{margin-left:auto;margin-right:auto}
.nc[data-align="right"] .nc-card{margin-left:auto}

/* ── Card ── */
.nc .nc-card{
  width:100%;background:var(--nc-face);border:1px solid rgba(127,127,127,.22);border-radius:.9em;overflow:hidden;
  box-shadow:0 .3em 1.2em rgba(27,47,80,.08);
}

/* ── Header ── */
.nc .nc-head,.nc .nc-dhead{display:flex;align-items:center;gap:.4em;padding:.55em .6em}
.nc.nc-head-filled .nc-head,.nc.nc-head-filled .nc-dhead{background:var(--nc-accent);color:#fff}
.nc.nc-head-plain .nc-head,.nc.nc-head-plain .nc-dhead{color:var(--nc-accent);border-bottom:1px solid rgba(127,127,127,.2)}
.nc .nc-htxt{flex:1;display:flex;flex-direction:column;align-items:center;text-align:center;line-height:1.2;min-width:0}
.nc .nc-title{font-size:1.15em;font-weight:700;white-space:nowrap}
.nc .nc-hsub{font-size:.72em;font-weight:600;opacity:.85;white-space:nowrap}
.nc .nc-nav,.nc .nc-nav-sp{width:1.9em;height:1.9em;flex-shrink:0}
.nc .nc-nav{display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:1.15em;font-weight:700;line-height:1;transition:background .2s}
.nc.nc-head-filled .nc-nav{background:rgba(255,255,255,.2)}
.nc.nc-head-filled .nc-nav:hover{background:rgba(255,255,255,.35)}
.nc.nc-head-plain .nc-nav{background:rgba(127,127,127,.12)}
.nc.nc-head-plain .nc-nav:hover{background:rgba(127,127,127,.22)}

/* ── Month table (month, classic, mini, split, year) ── */
.nc .nc-grid{width:100%;border-collapse:collapse;table-layout:fixed}
.nc .nc-grid th{padding:.55em 0 .3em;font-size:.72em;font-weight:700;text-align:center;opacity:.75;white-space:nowrap;overflow:hidden}
.nc .nc-grid td{padding:.1em;text-align:center;vertical-align:middle;height:2.7em}
.nc .nc-d{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;
  width:100%;height:2.5em;border-radius:.6em;line-height:1.05;transition:background .15s;
}
.nc button.nc-d:hover{background:rgba(127,127,127,.12)}
.nc .nc-bs{font-size:1.08em;font-weight:600}
.nc .nc-ad{font-size:.6em;opacity:.6;margin-top:.1em}
.nc .nc-sat,.nc .nc-grid th.nc-sat{color:var(--nc-sat)}
.nc .nc-d.nc-today,.nc button.nc-d.nc-today:hover{background:var(--nc-accent);color:#fff}
.nc .nc-today .nc-ad{opacity:.85}
.nc .nc-d.nc-sel{box-shadow:inset 0 0 0 2px var(--nc-accent)}
.nc .nc-grid thead th:first-child,.nc .nc-grid tbody td:first-child{padding-left:.3em}
.nc .nc-grid thead th:last-child,.nc .nc-grid tbody td:last-child{padding-right:.3em}

.nc .nc-info{padding:.55em .8em;font-size:.8em;text-align:center;border-top:1px solid rgba(127,127,127,.18);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nc .nc-foot{display:flex;align-items:center;justify-content:space-between;gap:.5em;height:2.3em;padding:0 .8em .2em;font-size:.75em}
.nc .nc-todaybtn{padding:.2em .9em;border:1px solid var(--nc-accent);border-radius:100em;color:var(--nc-accent);font-weight:700;line-height:1.4}
.nc .nc-todaybtn:hover{background:var(--nc-accent);color:#fff}
.nc .nc-credit{font-size:.9em;font-weight:600;opacity:.5}
.nc a.nc-credit:hover{opacity:1;color:var(--nc-accent)}

/* Wall patro: big and airy */
.nc--month .nc-card{max-width:25em}
.nc--month .nc-head{padding:.8em .7em}
.nc--month .nc-title{font-size:1.3em}
.nc--month .nc-grid td{height:3.1em}
.nc--month .nc-d{height:2.9em}
.nc--month .nc-bs{font-size:1.35em}

/* Classic: ruled table, A.D. date in the corner */
.nc--classic .nc-card{max-width:23em;border-radius:.4em}
.nc--classic .nc-grid th{background:rgba(127,127,127,.1);opacity:1;padding:.4em 0}
.nc--classic .nc-grid th,.nc--classic .nc-grid td{border:1px solid rgba(127,127,127,.22)}
.nc--classic .nc-grid td{padding:0;height:2.5em}
.nc--classic .nc-d{height:2.5em;border-radius:0;align-items:flex-start;justify-content:flex-start;padding:.2em .35em}
.nc--classic .nc-bs{font-size:1.05em}
.nc--classic .nc-ad{position:absolute;right:.3em;bottom:.15em;margin:0}

/* Mini: compact sidebar calendar */
.nc--mini{font-size:calc(var(--nc-size) * .92)}
.nc--mini .nc-card{max-width:16em}
.nc--mini .nc-head{padding:.4em .45em}
.nc--mini .nc-title{font-size:1em}
.nc--mini .nc-nav,.nc--mini .nc-nav-sp{width:1.6em;height:1.6em}
.nc--mini .nc-grid td{height:2.05em}
.nc--mini .nc-d{height:1.95em;border-radius:50%}
.nc--mini .nc-bs{font-size:.95em}
.nc--mini .nc-ad{font-size:.5em}

/* Month + today: coloured today panel beside the month */
.nc--split .nc-card{display:flex;max-width:38em;overflow-x:auto}
.nc--split .nc-split-l{
  flex:0 0 12em;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.15em;
  padding:1em .8em;text-align:center;background:var(--nc-accent);color:#fff;
}
.nc--split .nc-cap{font-size:.8em;font-weight:700;opacity:.85}
.nc--split .nc-big{font-size:4.4em;font-weight:700;line-height:1}
.nc--split .nc-lm{font-size:1.05em;font-weight:700}
.nc--split .nc-lw{font-size:.95em}
.nc--split .nc-la{font-size:.75em;opacity:.85}
.nc--split .nc-split-r{flex:1 0 24em;min-width:24em}
.nc--split.nc-head-filled .nc-split-r .nc-head{background:none;color:var(--nc-accent);border-bottom:1px solid rgba(127,127,127,.2)}
.nc--split.nc-head-filled .nc-split-r .nc-nav{background:rgba(127,127,127,.12)}

/* Single day: tear-off patro page */
.nc--day .nc-card{max-width:14em;text-align:center}
.nc--day .nc-dhead{justify-content:space-between}
.nc--day .nc-dbody{padding:.7em 1em .3em}
.nc--day .nc-big{display:block;font-size:4.8em;font-weight:700;line-height:1;color:var(--nc-accent)}
.nc--day .nc-dbody.nc-sat .nc-big{color:var(--nc-sat)}
.nc--day .nc-lw{display:block;font-size:1.15em;font-weight:700;margin-top:.15em}
.nc--day .nc-la{display:block;font-size:.8em;opacity:.7}
.nc--day .nc-dfoot{display:flex;align-items:center;justify-content:space-between;gap:.5em;height:2.6em;padding:0 .8em;font-size:.8em}
.nc--day .nc-cap{font-weight:700;color:var(--nc-accent)}

/* Week strip */
.nc--week .nc-card{max-width:30em}
.nc--week .nc-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.3em;padding:.6em}
.nc .nc-wd,.nc .nc-chip{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:.45em 0;border-radius:.6em;background:rgba(127,127,127,.08);line-height:1.15}
.nc .nc-wdn{font-size:.7em;font-weight:700;opacity:.7}
.nc .nc-wd .nc-bs,.nc .nc-chip .nc-bs{font-size:1.35em;font-weight:700}
.nc .nc-wd .nc-ad,.nc .nc-chip .nc-ad{font-size:.6em;white-space:nowrap}
.nc .nc-wd.nc-today,.nc .nc-chip.nc-today{background:var(--nc-accent);color:#fff}
.nc .nc-wd.nc-today .nc-wdn,.nc .nc-chip.nc-today .nc-wdn{opacity:.9}

/* Month strip: swipeable row of days */
.nc--strip .nc-card{max-width:36em}
.nc--strip .nc-strip{display:flex;gap:.35em;overflow-x:auto;padding:.6em;scroll-snap-type:x proximity;scrollbar-width:thin}
.nc--strip .nc-chip{flex:0 0 3.1em;scroll-snap-align:center}

/* Full year */
.nc--year .nc-card{max-width:52em;overflow-x:auto}
.nc--year .nc-years{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.9em 1.1em;padding:.8em;min-width:46em}
.nc--year .nc-ymt{font-size:.9em;font-weight:700;text-align:center;color:var(--nc-accent);margin-bottom:.15em}
.nc--year .nc-grid th{font-size:.6em;padding:.2em 0}
.nc--year .nc-grid td{height:1.65em;padding:.05em}
.nc--year .nc-d{height:1.55em;border-radius:50%}
.nc--year .nc-bs{font-size:.82em}
.nc--year .nc-ad{display:none}

/* Today line */
.nc--today{padding:.2em 0}
.nc--today .nc-line{display:flex;align-items:center;flex-wrap:wrap;gap:.2em .45em;padding:.35em .7em;border-radius:.5em;background:var(--nc-face)}
.nc--today .nc-dot{width:.55em;height:.55em;border-radius:50%;background:var(--nc-accent);flex-shrink:0}
.nc--today strong{font-weight:700;color:var(--nc-accent)}
.nc--today .nc-la{opacity:.7}

.nc--embed{min-height:100%}

/* ══════════════════════════════════════════════════
   TOOL PAGE
══════════════════════════════════════════════════ */
.nt-tool .nc--page{padding:.5em 0}

.nc-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;margin:2rem 0 2rem}
.nc-g{
  display:flex;flex-direction:column;gap:10px;cursor:pointer;
  background:var(--bg,#f5f6fa);border:1.5px solid var(--border,#dde3ef);border-radius:16px;padding:12px 14px 14px;
  transition:border-color .2s,box-shadow .2s;
}
.nc-g-wide{grid-column:span 2}
.nc-g:hover{border-color:var(--blue,#1e7fd4)}
.nc-g[aria-checked="true"]{border-color:var(--orange,#f47a20);box-shadow:0 0 0 3px rgba(244,122,32,.18);background:#fff}
.nc-g:focus-visible{outline:2px solid var(--blue,#1e7fd4);outline-offset:2px}
.nc-g-name{font-size:.78rem;font-weight:700;color:var(--ink2,#4a5568)}
.nc-g[aria-checked="true"] .nc-g-name{color:var(--orange,#f47a20)}
.nc-g-view{display:block;height:190px;overflow:hidden;pointer-events:none}
.nc-g-view .nc--today{margin-top:70px}

.nc-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 16px;margin:0 0 1.5rem}
.nc-controls label{display:flex;flex-direction:column;gap:.35rem;font-size:.78rem;font-weight:700;color:var(--ink2,#4a5568)}
.nc-controls label[hidden]{display:none}
.nc-controls select{font-family:inherit;font-size:.88rem;padding:.55rem .7rem;border:1.5px solid var(--border,#dde3ef);border-radius:10px;background:#fff;color:var(--ink,#1a2233);min-width:0}
.nc-controls input[type="color"]{width:100%;height:40px;padding:3px;border:1.5px solid var(--border,#dde3ef);border-radius:10px;background:#fff;cursor:pointer}
.nc-controls input[type="range"]{width:100%;accent-color:var(--orange,#f47a20)}
.nc-checks{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:10px 22px}
.nc-controls .nc-check{flex-direction:row;align-items:center;gap:.5rem}
.nc-controls .nc-check input{width:18px;height:18px;accent-color:var(--orange,#f47a20)}
.nc-size-val{font-weight:600;color:var(--orange,#f47a20)}
.nc-dims{font-weight:600;color:var(--ink3,#8896a8)}
.nc-hint{font-weight:500;color:var(--ink3,#8896a8);margin-left:.5rem}

.nc-stage{
  border:1.5px dashed var(--border,#dde3ef);border-radius:18px;padding:18px;overflow:auto;margin-bottom:1.5rem;
  background-color:#fff;
  background-image:linear-gradient(45deg,#f0f2f7 25%,transparent 25%),linear-gradient(-45deg,#f0f2f7 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#f0f2f7 75%),linear-gradient(-45deg,transparent 75%,#f0f2f7 75%);
  background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;
}
.nc-stage-inner{min-height:60px}
.nc-code-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:2rem;align-items:start}

@media(max-width:900px){
  .nc-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .nc-code-row{grid-template-columns:1fr;gap:.5rem}
}
@media(max-width:600px){
  .nc-gallery{grid-template-columns:1fr}
  .nc-g-wide{grid-column:auto}
  .nc-controls{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.nc-g,.nc .nc-nav,.nc .nc-d{transition:none}}
