/* Nepali Calendar Pro — front end design system (v1.3) */

/* ---------- Tokens ---------- */
.ncp{
  --ncp-accent:#c8102e;
  --ncp-accent-strong:#9f0c24;
  --ncp-accent-soft:#fdecee;
  --ncp-accent-line:#f4bfc8;
  --ncp-accent-strong:color-mix(in srgb,var(--ncp-accent) 76%,#000);
  --ncp-accent-soft:color-mix(in srgb,var(--ncp-accent) 9%,#fff);
  --ncp-accent-line:color-mix(in srgb,var(--ncp-accent) 28%,#fff);
  --ncp-surface:#fff;
  --ncp-surface-2:#f7f8fa;
  --ncp-surface-3:#eef1f5;
  --ncp-line:#e6e9ef;
  --ncp-text:#0f172a;
  --ncp-text-2:#475569;
  --ncp-muted:#64748b;
  --ncp-holiday:#d92d20; --ncp-holiday-soft:#fef3f2; --ncp-holiday-line:#fecdca;
  --ncp-festival:#c4580a; --ncp-festival-soft:#fff6ed; --ncp-festival-line:#fddcab;
  --ncp-partial:#b54708; --ncp-partial-soft:#fffaeb;
  --ncp-event:#175cd3; --ncp-event-soft:#eff8ff;
  --ncp-radius:18px;
  --ncp-radius-sm:12px;
  --ncp-shadow:0 1px 2px rgba(15,23,42,.05),0 10px 30px -12px rgba(15,23,42,.16);
  --ncp-shadow-lg:0 24px 60px -20px rgba(15,23,42,.35);
  --ncp-font:"Mukta","Noto Sans Devanagari","Kohinoor Devanagari","Nirmala UI",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-family:var(--ncp-font);
  color:var(--ncp-text);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  box-sizing:border-box;
}
.ncp *,.ncp *::before,.ncp *::after{box-sizing:border-box}
.ncp[data-theme="dark"]{
  --ncp-accent-soft:color-mix(in srgb,var(--ncp-accent) 18%,#111827);
  --ncp-accent-line:color-mix(in srgb,var(--ncp-accent) 45%,#111827);
  --ncp-surface:#111827; --ncp-surface-2:#172033; --ncp-surface-3:#1f2a3f; --ncp-line:#28344a;
  --ncp-text:#f1f5f9; --ncp-text-2:#cbd5e1; --ncp-muted:#94a3b8;
  --ncp-holiday:#ff7b72; --ncp-holiday-soft:rgba(255,123,114,.12); --ncp-holiday-line:rgba(255,123,114,.35);
  --ncp-festival:#fdb022; --ncp-festival-soft:rgba(253,176,34,.12); --ncp-festival-line:rgba(253,176,34,.35);
  --ncp-partial:#fec84b; --ncp-partial-soft:rgba(254,200,75,.12);
  --ncp-event:#84caff; --ncp-event-soft:rgba(132,202,255,.12);
  --ncp-shadow:0 1px 2px rgba(0,0,0,.4),0 12px 32px -12px rgba(0,0,0,.6);
  color-scheme:dark;
}
@media (prefers-color-scheme:dark){
  .ncp[data-theme="auto"]{
    --ncp-accent-soft:color-mix(in srgb,var(--ncp-accent) 18%,#111827);
    --ncp-accent-line:color-mix(in srgb,var(--ncp-accent) 45%,#111827);
    --ncp-surface:#111827; --ncp-surface-2:#172033; --ncp-surface-3:#1f2a3f; --ncp-line:#28344a;
    --ncp-text:#f1f5f9; --ncp-text-2:#cbd5e1; --ncp-muted:#94a3b8;
    --ncp-holiday:#ff7b72; --ncp-holiday-soft:rgba(255,123,114,.12); --ncp-holiday-line:rgba(255,123,114,.35);
    --ncp-festival:#fdb022; --ncp-festival-soft:rgba(253,176,34,.12); --ncp-festival-line:rgba(253,176,34,.35);
    --ncp-partial:#fec84b; --ncp-partial-soft:rgba(254,200,75,.12);
    --ncp-event:#84caff; --ncp-event-soft:rgba(132,202,255,.12);
    --ncp-shadow:0 1px 2px rgba(0,0,0,.4),0 12px 32px -12px rgba(0,0,0,.6);
    color-scheme:dark;
  }
}

/* ---------- Base controls (beat theme button/select styles) ---------- */
.ncp button,.ncp select,.ncp input{font-family:inherit;letter-spacing:normal;text-transform:none;margin:0}
.ncp .ncp-i{flex:none;vertical-align:-3px}
.ncp .ncp-btn,.ncp .ncp-icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:40px;padding:0 16px;border-radius:12px;border:1px solid var(--ncp-line);background:var(--ncp-surface);color:var(--ncp-text);font-size:15px;font-weight:600;line-height:1;cursor:pointer;text-decoration:none;box-shadow:none;transition:background .15s,border-color .15s,color .15s,transform .1s}
.ncp .ncp-btn:hover,.ncp .ncp-icon-btn:hover{background:var(--ncp-surface-2);border-color:var(--ncp-accent-line);color:var(--ncp-text)}
.ncp .ncp-btn:active,.ncp .ncp-icon-btn:active{transform:scale(.97)}
.ncp .ncp-btn-primary{background:var(--ncp-accent);border-color:var(--ncp-accent);color:#fff}
.ncp .ncp-btn-primary:hover{background:var(--ncp-accent-strong);border-color:var(--ncp-accent-strong);color:#fff}
.ncp .ncp-icon-btn{width:40px;padding:0;color:var(--ncp-text-2)}
.ncp .ncp-icon-btn:disabled{opacity:.35;cursor:default;transform:none}
.ncp button:focus-visible,.ncp a:focus-visible,.ncp select:focus-visible,.ncp input:focus-visible{outline:2px solid var(--ncp-accent);outline-offset:2px}
.ncp select{height:40px;border:1px solid var(--ncp-line);border-radius:12px;background:var(--ncp-surface);color:var(--ncp-text);padding:0 30px 0 12px;font-size:15px;font-weight:500;cursor:pointer;appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--ncp-muted) 50%),linear-gradient(135deg,var(--ncp-muted) 50%,transparent 50%);background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%;background-size:5px 5px;background-repeat:no-repeat}
.ncp .ncp-seg{display:inline-flex;padding:4px;gap:2px;background:var(--ncp-surface-3);border-radius:13px}
.ncp .ncp-seg button{height:32px;padding:0 14px;border:0;border-radius:10px;background:transparent;color:var(--ncp-text-2);font-size:14px;font-weight:600;cursor:pointer;box-shadow:none}
.ncp .ncp-seg button:hover{color:var(--ncp-text);background:transparent}
.ncp .ncp-seg button[aria-pressed="true"],.ncp .ncp-seg button[aria-selected="true"]{background:var(--ncp-surface);color:var(--ncp-accent);box-shadow:0 1px 3px rgba(15,23,42,.12)}
.ncp .ncp-empty{color:var(--ncp-muted);font-size:14px;text-align:center;padding:24px 12px;margin:0}
.ncp .ncp-calc-note{font-size:12px;color:var(--ncp-muted);margin:10px 0 0}

/* ---------- Layout ---------- */
.ncp-app,.ncp-standalone{container:ncpapp/inline-size}
.ncp-app{max-width:1440px;margin:24px auto}
.ncp-standalone{margin:16px 0}
.ncp .ncp-shell{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px;align-items:start;margin-top:20px}
.ncp-no-sidebar .ncp-shell{grid-template-columns:minmax(0,1fr) 360px}
.ncp .ncp-main,.ncp .ncp-card,.ncp .ncp-widget{background:var(--ncp-surface);border:1px solid var(--ncp-line);border-radius:var(--ncp-radius);box-shadow:var(--ncp-shadow)}
.ncp .ncp-main{container:ncpmain/inline-size;overflow:hidden}
.ncp .ncp-side{display:flex;flex-direction:column;gap:16px}

/* ---------- Hero (today) ---------- */
.ncp .ncp-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:24px;padding:24px 28px;border-radius:24px;color:#fff;
  background:radial-gradient(120% 140% at 100% 0%,rgba(255,255,255,.18) 0,rgba(255,255,255,0) 45%),radial-gradient(90% 120% at 0% 100%,rgba(0,0,0,.18) 0,rgba(0,0,0,0) 50%),linear-gradient(135deg,var(--ncp-accent) 0%,var(--ncp-accent-strong) 100%);
  box-shadow:0 18px 40px -18px color-mix(in srgb,var(--ncp-accent) 70%,transparent)}
.ncp .ncp-hero::after{content:"";position:absolute;right:-60px;bottom:-80px;width:260px;height:260px;border-radius:50%;border:28px solid rgba(255,255,255,.07);pointer-events:none}
.ncp .ncp-hero-date{display:flex;align-items:center;gap:18px}
.ncp .ncp-hero-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;width:96px;height:104px;border-radius:20px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.28);backdrop-filter:blur(6px);line-height:1.1}
.ncp .ncp-hero-tile span{font-size:13px;font-weight:600;opacity:.9}
.ncp .ncp-hero-tile strong{font-size:44px;font-weight:700;line-height:1.05}
.ncp .ncp-hero-meta{display:flex;flex-direction:column;gap:2px}
.ncp .ncp-hero-kicker{font-size:13px;font-weight:600;letter-spacing:.02em;opacity:.85}
.ncp .ncp-hero-title{font-size:30px;font-weight:700;line-height:1.2}
.ncp .ncp-hero-sub{font-size:14px;opacity:.85}
.ncp .ncp-hero-info{display:flex;flex-direction:column;gap:10px;min-width:0}
.ncp .ncp-hero-lunar{font-size:17px;font-weight:600}
.ncp .ncp-hero-lunar small{font-size:13px;font-weight:500;opacity:.8;margin-left:4px}
.ncp .ncp-hero-chips{display:flex;flex-wrap:wrap;gap:8px}
.ncp .ncp-hero-chips span{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.2);font-size:13px;font-weight:600;white-space:nowrap}
.ncp .ncp-hero-chips time{font-variant-numeric:tabular-nums}
.ncp .ncp-hero-next{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:200px;padding:16px 18px;border-radius:18px;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.12);color:#fff;text-align:left;cursor:pointer;transition:background .15s,transform .15s;box-shadow:none}
.ncp .ncp-hero-next:hover{background:rgba(255,255,255,.2);transform:translateY(-1px);color:#fff}
.ncp .ncp-hero-next strong{font-size:19px;font-weight:700;line-height:1.3}
.ncp .ncp-hero-next span{font-size:13px;opacity:.9}
.ncp .ncp-hero-next .ncp-hero-count{margin-top:8px;padding:4px 12px;border-radius:999px;background:#fff;color:var(--ncp-accent);font-size:14px;font-weight:700;opacity:1}

/* ---------- Toolbar ---------- */
.ncp .ncp-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:18px 20px;border-bottom:1px solid var(--ncp-line)}
.ncp .ncp-title-wrap{display:flex;align-items:center;gap:10px}
.ncp .ncp-title h2{margin:0;font-size:26px;line-height:1.2;font-weight:700;color:var(--ncp-text);letter-spacing:0}
.ncp .ncp-title p{margin:2px 0 0;font-size:13px;color:var(--ncp-muted);min-height:1em}
.ncp .ncp-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ncp .ncp-selects{display:flex;gap:8px}
.ncp .ncp-notice{margin:0;padding:10px 20px;font-size:13px;background:var(--ncp-partial-soft);color:var(--ncp-partial);border-bottom:1px solid var(--ncp-line)}

/* ---------- Month view ---------- */
.ncp .ncp-view{position:relative}
.ncp .ncp-anim{animation:ncp-in .24s ease both}
.ncp .ncp-anim.from-left{animation-name:ncp-in-left}
.ncp .ncp-anim.from-right{animation-name:ncp-in-right}
@keyframes ncp-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes ncp-in-left{from{opacity:0;transform:translateX(-14px)}to{opacity:1;transform:none}}
@keyframes ncp-in-right{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:none}}
.ncp .ncp-weekdays,.ncp .ncp-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.ncp .ncp-weekdays{background:var(--ncp-surface-2);border-bottom:1px solid var(--ncp-line)}
.ncp .ncp-weekdays div{padding:12px 4px;text-align:center;font-size:13px;font-weight:700;color:var(--ncp-text-2)}
.ncp .ncp-weekdays .is-sat{color:var(--ncp-holiday)}
.ncp .ncp-wd-short{display:none}
.ncp .ncp-day{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:3px;min-height:112px;padding:10px 10px 8px;margin:0;border:0;border-right:1px solid var(--ncp-line);border-bottom:1px solid var(--ncp-line);border-radius:0;background:var(--ncp-surface);color:var(--ncp-text);text-align:left;cursor:pointer;overflow:hidden;box-shadow:none;transition:background .12s}
.ncp .ncp-grid>.ncp-day:nth-child(7n){border-right:0}
.ncp .ncp-day:hover{background:var(--ncp-surface-2);color:var(--ncp-text)}
.ncp .ncp-day.is-blank{cursor:default;background:repeating-linear-gradient(135deg,var(--ncp-surface-2) 0 6px,var(--ncp-surface) 6px 12px)}
.ncp .ncp-day.is-sat,.ncp .ncp-day.is-holiday{background:color-mix(in srgb,var(--ncp-holiday-soft) 70%,var(--ncp-surface))}
.ncp .ncp-day.is-holiday:hover,.ncp .ncp-day.is-sat:hover{background:var(--ncp-holiday-soft)}
.ncp .ncp-bs{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;min-width:38px;height:38px;padding:0 6px;margin:-4px 0 0 -4px;border-radius:12px;font-size:26px;font-weight:700;line-height:1}
.ncp .ncp-day.is-sat .ncp-bs,.ncp .ncp-day.is-holiday .ncp-bs{color:var(--ncp-holiday)}
.ncp .ncp-day.is-today .ncp-bs{background:var(--ncp-accent);color:#fff;box-shadow:0 6px 14px -6px var(--ncp-accent)}
.ncp .ncp-day.is-today::before{content:"";position:absolute;inset:0;border:2px solid var(--ncp-accent);pointer-events:none}
.ncp .ncp-day.is-selected{background:var(--ncp-accent-soft)}
.ncp .ncp-day.is-selected::after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 0 2px var(--ncp-accent);pointer-events:none}
.ncp .ncp-ad{position:absolute;top:10px;right:10px;font-size:12px;font-weight:500;color:var(--ncp-muted)}
.ncp .ncp-tithi{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--ncp-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ncp .ncp-chip{display:block;max-width:100%;padding:2px 8px;border-radius:7px;font-size:12px;font-weight:600;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:var(--ncp-festival-soft);color:var(--ncp-festival)}
.ncp .ncp-chip.is-public{background:var(--ncp-holiday);color:#fff}
.ncp .ncp-chip.is-partial{background:var(--ncp-partial-soft);color:var(--ncp-partial)}
.ncp .ncp-chip.is-event{background:var(--ncp-event-soft);color:var(--ncp-event)}
.ncp .ncp-more{font-size:11px;font-weight:600;color:var(--ncp-muted);padding-left:2px}
.ncp .ncp-markers{position:absolute;right:8px;bottom:8px;display:none;gap:3px}
.ncp .ncp-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--ncp-festival)}
.ncp .ncp-dot.is-public{background:var(--ncp-holiday)}
.ncp .ncp-dot.is-partial{background:var(--ncp-partial)}
.ncp .ncp-dot.is-event{background:var(--ncp-event)}
.ncp .ncp-moon{display:inline-block;flex:none;width:10px;height:10px;border-radius:50%;border:1.5px solid var(--ncp-muted)}
.ncp .ncp-moon.is-full{background:#ffd54a;border-color:#e0a800;box-shadow:0 0 6px rgba(255,200,40,.6)}
.ncp .ncp-moon.is-new{background:#1f2937;border-color:#1f2937}
.ncp[data-theme="dark"] .ncp-moon.is-new{background:#000;border-color:#64748b}
.ncp .ncp-skeleton{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--ncp-line)}
.ncp .ncp-skeleton span{height:104px;background:linear-gradient(90deg,var(--ncp-surface) 0%,var(--ncp-surface-2) 50%,var(--ncp-surface) 100%);background-size:200% 100%;animation:ncp-shimmer 1.2s infinite linear}
@keyframes ncp-shimmer{to{background-position:-200% 0}}

/* ---------- Year view ---------- */
.ncp .ncp-year-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:18px}
.ncp .ncp-mini{border:1px solid var(--ncp-line);border-radius:14px;padding:12px;background:var(--ncp-surface)}
.ncp .ncp-mini.is-current{border-color:var(--ncp-accent-line);box-shadow:0 0 0 3px var(--ncp-accent-soft)}
.ncp .ncp-mini-head{display:flex;align-items:baseline;justify-content:space-between;width:100%;margin:0 0 8px;padding:0;border:0;background:none;color:var(--ncp-text);font-size:16px;font-weight:700;cursor:pointer;box-shadow:none}
.ncp .ncp-mini-head:hover{color:var(--ncp-accent);background:none}
.ncp .ncp-mini-head small{font-size:12px;font-weight:600;color:var(--ncp-muted)}
.ncp .ncp-mini-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center}
.ncp .ncp-mini-grid b{font-size:10px;font-weight:700;color:var(--ncp-muted);padding:2px 0}
.ncp .ncp-mini-grid b.is-sat{color:var(--ncp-holiday)}
.ncp .ncp-mini-grid span{position:relative;display:flex;align-items:center;justify-content:center;height:26px;border-radius:7px;font-size:12px;font-weight:600;color:var(--ncp-text-2)}
.ncp .ncp-mini-grid span.is-h{color:var(--ncp-holiday)}
.ncp .ncp-mini-grid span.is-f::after{content:"";position:absolute;bottom:2px;left:50%;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:var(--ncp-festival)}
.ncp .ncp-mini-grid span.is-h.is-f::after{background:var(--ncp-holiday)}
.ncp .ncp-mini-grid span.is-today{background:var(--ncp-accent);color:#fff}
.ncp .ncp-mini-grid span.is-today::after{background:#fff}

/* ---------- List (agenda) view ---------- */
.ncp .ncp-agenda{list-style:none;margin:0;padding:8px 0}
.ncp .ncp-agenda-day{display:grid;grid-template-columns:72px minmax(0,1fr);gap:16px;padding:14px 20px;border-bottom:1px solid var(--ncp-line);cursor:pointer;transition:background .12s}
.ncp .ncp-agenda-day:last-child{border-bottom:0}
.ncp .ncp-agenda-day:hover{background:var(--ncp-surface-2)}
.ncp .ncp-agenda-day.is-today .ncp-tile{background:var(--ncp-accent);color:#fff;border-color:var(--ncp-accent)}
.ncp .ncp-agenda-items{display:flex;flex-direction:column;gap:6px;min-width:0}
.ncp .ncp-agenda-items .ncp-a-date{font-size:13px;color:var(--ncp-muted)}
.ncp .ncp-agenda-items .ncp-a-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ncp .ncp-agenda-items strong{font-size:16px;font-weight:700}

/* ---------- Legend ---------- */
.ncp .ncp-legend{display:flex;flex-wrap:wrap;gap:8px 18px;padding:14px 20px;border-top:1px solid var(--ncp-line);font-size:13px;color:var(--ncp-text-2)}
.ncp .ncp-legend span{display:inline-flex;align-items:center;gap:6px}

/* ---------- Tile (date block) ---------- */
.ncp .ncp-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;width:64px;min-width:64px;height:68px;border-radius:14px;border:1px solid var(--ncp-line);background:var(--ncp-surface-2);color:var(--ncp-text);line-height:1.1}
.ncp .ncp-tile span{font-size:11px;font-weight:600;color:var(--ncp-muted)}
.ncp .ncp-tile strong{font-size:26px;font-weight:700}

/* ---------- Tags ---------- */
.ncp .ncp-tag{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;font-size:12px;font-weight:600;background:var(--ncp-festival-soft);color:var(--ncp-festival);white-space:nowrap}
.ncp .ncp-tag.is-public{background:var(--ncp-holiday-soft);color:var(--ncp-holiday)}
.ncp .ncp-tag.is-partial{background:var(--ncp-partial-soft);color:var(--ncp-partial)}
.ncp .ncp-tag.is-event{background:var(--ncp-event-soft);color:var(--ncp-event)}
.ncp .ncp-tag.is-muted,.ncp .ncp-tag.is-minor{background:var(--ncp-surface-3);color:var(--ncp-text-2)}
.ncp .ncp-src{font-size:12px;color:var(--ncp-muted)}

/* ---------- Day detail card ---------- */
.ncp .ncp-day-card{padding:20px}
.ncp .ncp-detail-head{display:flex;gap:14px;align-items:center}
.ncp .ncp-detail-head .ncp-tile{width:72px;min-width:72px;height:78px;background:var(--ncp-accent-soft);border-color:var(--ncp-accent-line);color:var(--ncp-accent)}
.ncp .ncp-detail-head .ncp-tile span{color:var(--ncp-accent)}
.ncp .ncp-detail-head.is-holiday .ncp-tile{background:var(--ncp-holiday-soft);border-color:var(--ncp-holiday-line);color:var(--ncp-holiday)}
.ncp .ncp-detail-head.is-holiday .ncp-tile span{color:var(--ncp-holiday)}
.ncp .ncp-detail-title{display:flex;flex-direction:column;gap:2px;min-width:0}
.ncp .ncp-detail-title strong{font-size:19px;font-weight:700;line-height:1.3}
.ncp .ncp-detail-title span{font-size:13px;color:var(--ncp-muted)}
.ncp .ncp-pill{display:inline-flex;align-self:flex-start;height:22px;align-items:center;padding:0 10px;border-radius:999px;background:var(--ncp-accent);color:#fff;font-size:12px;font-weight:700}
.ncp .ncp-section{margin-top:18px}
.ncp .ncp-section>h4{display:flex;align-items:center;gap:6px;margin:0 0 10px;font-size:13px;font-weight:700;color:var(--ncp-muted);letter-spacing:.02em}
.ncp .ncp-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.ncp .ncp-items li{padding:10px 12px;border-radius:12px;background:var(--ncp-surface-2);border-left:4px solid var(--ncp-festival)}
.ncp .ncp-items li.is-public{border-left-color:var(--ncp-holiday);background:var(--ncp-holiday-soft)}
.ncp .ncp-items li.is-partial{border-left-color:var(--ncp-partial)}
.ncp .ncp-items li.is-minor{border-left-color:var(--ncp-line)}
.ncp .ncp-items li.is-event{border-left-color:var(--ncp-event)}
.ncp .ncp-items li strong{display:block;font-size:15px;font-weight:700;line-height:1.35}
.ncp .ncp-items li .ncp-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:4px}
.ncp .ncp-items li p{margin:6px 0 0;font-size:13px;color:var(--ncp-text-2)}
.ncp .ncp-items li a{display:inline-block;margin-top:6px;font-size:13px;font-weight:600;color:var(--ncp-accent)}
.ncp .ncp-pgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ncp .ncp-pcell{padding:10px 12px;border-radius:12px;background:var(--ncp-surface-2);min-width:0}
.ncp .ncp-pcell.is-wide{grid-column:1/-1;background:var(--ncp-accent-soft)}
.ncp .ncp-pcell small{display:block;font-size:12px;color:var(--ncp-muted)}
.ncp .ncp-pcell strong{display:flex;align-items:center;gap:6px;font-size:15px;font-weight:700;line-height:1.35}
.ncp .ncp-pcell span{display:block;font-size:12px;color:var(--ncp-muted)}
.ncp .ncp-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.ncp .ncp-actions .ncp-btn{height:36px;padding:0 12px;font-size:13px}

/* ---------- Widget (upcoming holidays) ---------- */
.ncp .ncp-widget{overflow:hidden}
.ncp .ncp-widget-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:18px 20px 16px;color:#fff;background:radial-gradient(140% 160% at 100% 0%,rgba(255,255,255,.18) 0,rgba(255,255,255,0) 50%),linear-gradient(135deg,var(--ncp-accent),var(--ncp-accent-strong))}
.ncp .ncp-widget-kicker{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;opacity:.9}
.ncp .ncp-widget-head h3{margin:2px 0 0;font-size:20px;line-height:1.25;font-weight:700;color:#fff}
.ncp .ncp-widget-more{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.3);color:#fff;font-size:13px;font-weight:600;text-decoration:none;white-space:nowrap}
.ncp .ncp-widget-more:hover{background:rgba(255,255,255,.26);color:#fff}
.ncp .ncp-card .ncp-widget-head,.ncp .ncp-panchanga-box .ncp-widget-head{margin:-20px -20px 16px}
.ncp .ncp-chips{display:flex;gap:6px;padding:12px 16px 4px}
.ncp .ncp-chips button{height:30px;padding:0 14px;border-radius:999px;border:1px solid var(--ncp-line);background:var(--ncp-surface);color:var(--ncp-text-2);font-size:13px;font-weight:600;cursor:pointer;box-shadow:none}
.ncp .ncp-chips button:hover{border-color:var(--ncp-accent-line);color:var(--ncp-text);background:var(--ncp-surface)}
.ncp .ncp-chips button[aria-pressed="true"]{background:var(--ncp-accent);border-color:var(--ncp-accent);color:#fff}
.ncp .ncp-up-list{list-style:none;margin:0;padding:8px 10px 12px;display:flex;flex-direction:column;gap:4px;max-height:78vh;overflow-y:auto;scrollbar-width:thin}
.ncp .ncp-up-item[hidden]{display:none}
.ncp .ncp-up-link{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:10px;margin:0;border:1px solid transparent;border-radius:14px;background:transparent;color:var(--ncp-text);text-align:left;text-decoration:none;cursor:pointer;box-shadow:none;transition:background .15s,border-color .15s,transform .15s}
.ncp a.ncp-up-link:hover,.ncp button.ncp-up-link:hover{background:var(--ncp-surface-2);border-color:var(--ncp-line);color:var(--ncp-text);transform:translateX(2px)}
.ncp div.ncp-up-link{cursor:default}
.ncp .ncp-up-item.is-public .ncp-tile{background:var(--ncp-holiday-soft);border-color:var(--ncp-holiday-line);color:var(--ncp-holiday)}
.ncp .ncp-up-item.is-public .ncp-tile span{color:var(--ncp-holiday)}
.ncp .ncp-up-item.is-festival .ncp-tile{background:var(--ncp-festival-soft);border-color:var(--ncp-festival-line);color:var(--ncp-festival)}
.ncp .ncp-up-item.is-festival .ncp-tile span{color:var(--ncp-festival)}
.ncp .ncp-up-item.is-event .ncp-tile{background:var(--ncp-event-soft);color:var(--ncp-event);border-color:transparent}
.ncp .ncp-up-item.is-next .ncp-up-link{background:var(--ncp-accent-soft);border-color:var(--ncp-accent-line)}
.ncp .ncp-up-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.ncp .ncp-up-title{font-size:16px;font-weight:700;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ncp .ncp-up-item.is-public .ncp-up-title{color:var(--ncp-holiday)}
.ncp .ncp-up-date{font-size:12px;color:var(--ncp-muted);line-height:1.4}
.ncp .ncp-up-tags{display:flex;gap:4px;margin-top:3px;flex-wrap:wrap}
.ncp .ncp-count{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:58px;padding:6px 8px;border-radius:12px;background:var(--ncp-surface-2);line-height:1.05;text-align:center}
.ncp .ncp-count strong{font-size:22px;font-weight:700;color:var(--ncp-accent)}
.ncp .ncp-count strong.is-word{font-size:15px}
.ncp .ncp-count span{font-size:11px;font-weight:600;color:var(--ncp-muted)}
.ncp .ncp-up-item.is-next .ncp-count{background:var(--ncp-accent);}
.ncp .ncp-up-item.is-next .ncp-count strong,.ncp .ncp-up-item.is-next .ncp-count span{color:#fff}

/* ---------- Bottom sheet (mobile day details) ---------- */
.ncp .ncp-sheet{position:fixed;inset:0;z-index:99999;display:flex;align-items:flex-end;justify-content:center}
.ncp .ncp-sheet[hidden]{display:none}
.ncp .ncp-sheet-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.5);animation:ncp-fade .2s ease}
.ncp .ncp-sheet-panel{position:relative;width:100%;max-width:560px;max-height:86vh;overflow-y:auto;padding:26px 20px calc(24px + env(safe-area-inset-bottom));background:var(--ncp-surface);color:var(--ncp-text);border-radius:24px 24px 0 0;box-shadow:var(--ncp-shadow-lg);animation:ncp-up .26s cubic-bezier(.2,.9,.3,1)}
.ncp .ncp-sheet-grip{position:absolute;top:9px;left:50%;width:42px;height:5px;margin-left:-21px;border-radius:9px;background:var(--ncp-line)}
.ncp .ncp-sheet-close{position:absolute;top:14px;right:14px;width:36px;height:36px;border-radius:50%}
@keyframes ncp-up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@keyframes ncp-fade{from{opacity:0}to{opacity:1}}
.ncp .ncp-toast{position:fixed;left:50%;bottom:24px;z-index:100000;transform:translateX(-50%);padding:10px 16px;border-radius:12px;background:#0f172a;color:#fff;font-size:14px;font-weight:600;box-shadow:var(--ncp-shadow-lg);animation:ncp-fade .2s ease}

/* ---------- Converter ---------- */
.ncp .ncp-converter{display:grid;gap:14px;max-width:560px;padding:20px;margin:0}
.ncp .ncp-conv-head h3{margin:2px 0 0;font-size:20px;font-weight:700;color:var(--ncp-text)}
.ncp .ncp-conv-head .ncp-widget-kicker{color:var(--ncp-accent);opacity:1}
.ncp .ncp-conv-tabs{width:100%}
.ncp .ncp-conv-tabs button{flex:1}
.ncp .ncp-conv-fields{display:flex;gap:10px;flex-wrap:wrap}
.ncp .ncp-conv-fields[hidden]{display:none}
.ncp .ncp-conv-fields label{display:grid;gap:6px;flex:1;min-width:110px;font-size:13px;font-weight:600;color:var(--ncp-text-2)}
.ncp .ncp-conv-fields input,.ncp .ncp-conv-fields select{width:100%;height:44px;padding:0 12px;border:1px solid var(--ncp-line);border-radius:12px;background:var(--ncp-surface);color:var(--ncp-text);font-size:16px}
.ncp .ncp-convert-button{justify-self:start;height:44px}
.ncp .ncp-conv-result:empty{display:none}
.ncp .ncp-conv-result{display:block;padding:14px 16px;border-radius:14px;font-size:14px}
.ncp .ncp-conv-result.is-ok{background:var(--ncp-accent-soft);border:1px solid var(--ncp-accent-line)}
.ncp .ncp-conv-result.is-ok span{display:block;font-size:12px;color:var(--ncp-muted)}
.ncp .ncp-conv-result.is-ok strong{display:block;margin:2px 0;font-size:20px;font-weight:700;color:var(--ncp-text)}
.ncp .ncp-conv-result.is-ok small{color:var(--ncp-text-2)}
.ncp .ncp-conv-result.is-error{background:var(--ncp-holiday-soft);color:var(--ncp-holiday)}

/* ---------- Panchanga box ---------- */
.ncp .ncp-panchanga-box{padding:20px;max-width:560px}
.ncp .ncp-today-date{font-weight:600}

/* ---------- Responsive (by the calendar's own width) ---------- */
@container ncpapp (max-width:1040px){
  .ncp .ncp-shell,.ncp-no-sidebar .ncp-shell{grid-template-columns:minmax(0,1fr)}
  .ncp .ncp-side{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .ncp .ncp-hero{grid-template-columns:auto minmax(0,1fr)}
  .ncp .ncp-hero-next{grid-column:1/-1;flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px 12px;min-width:0}
  .ncp .ncp-hero-next .ncp-hero-count{margin:0 0 0 auto}
}
@container ncpapp (max-width:680px){
  .ncp .ncp-side{grid-template-columns:minmax(0,1fr)}
  .ncp .ncp-day-card{display:none} /* On phones the day opens in a bottom sheet instead. */
  .ncp .ncp-hero{grid-template-columns:minmax(0,1fr);gap:16px;padding:20px;border-radius:20px}
  .ncp .ncp-hero-tile{width:78px;height:86px}
  .ncp .ncp-hero-tile strong{font-size:36px}
  .ncp .ncp-hero-title{font-size:24px}
  .ncp .ncp-year-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:10px}
}
@container ncpmain (max-width:760px){
  .ncp .ncp-wd-long{display:none}
  .ncp .ncp-wd-short{display:inline}
  .ncp .ncp-day{min-height:96px;padding:8px 7px}
  .ncp .ncp-bs{font-size:22px;min-width:32px;height:32px}
  .ncp .ncp-toolbar{padding:14px 16px}
  .ncp .ncp-title h2{font-size:22px}
}
@container ncpmain (max-width:560px){
  .ncp .ncp-toolbar{gap:12px}
  .ncp .ncp-title-wrap{width:100%;justify-content:space-between}
  .ncp .ncp-title{text-align:center}
  .ncp .ncp-tools{width:100%;display:grid;grid-template-columns:1fr auto;gap:8px}
  .ncp .ncp-selects{grid-column:1/-1}
  .ncp .ncp-selects select{flex:1;min-width:0}
  .ncp .ncp-seg{width:100%}
  .ncp .ncp-seg button{flex:1;padding:0 6px}
  .ncp .ncp-day{min-height:68px;padding:5px 4px 4px;gap:1px;align-items:center}
  .ncp .ncp-bs{font-size:18px;min-width:28px;height:28px;margin:0;padding:0 4px;border-radius:9px;align-self:center}
  .ncp .ncp-ad{position:static;font-size:10px;line-height:1}
  .ncp .ncp-tithi{font-size:0;justify-content:center;min-height:10px}
  .ncp .ncp-tithi .ncp-moon{width:8px;height:8px}
  .ncp .ncp-chip,.ncp .ncp-more{display:none}
  .ncp .ncp-markers{display:flex;position:static;justify-content:center;margin-top:auto}
  .ncp .ncp-dot{width:6px;height:6px}
  .ncp .ncp-weekdays div{font-size:11px;padding:9px 1px}
  .ncp .ncp-day.is-today::before{border-width:1.5px}
  .ncp .ncp-year-grid{grid-template-columns:minmax(0,1fr)}
  .ncp .ncp-agenda-day{grid-template-columns:60px minmax(0,1fr);padding:12px 14px;gap:12px}
  .ncp .ncp-legend{padding:12px 14px;font-size:12px;gap:6px 12px}
  .ncp .ncp-skeleton span{height:68px}
}
@media (prefers-reduced-motion:reduce){
  .ncp *{animation:none!important;transition:none!important}
}
@media print{
  .ncp .ncp-side,.ncp .ncp-tools,.ncp .ncp-nav,.ncp .ncp-hero-next,.ncp .ncp-sheet{display:none!important}
  .ncp .ncp-shell{grid-template-columns:1fr}
  .ncp .ncp-main,.ncp .ncp-hero{box-shadow:none}
}
