/* niguro [Share card] (owner, 2026-11-04): the share card studio on news stories and blog articles, in The Ditible's
   shape (__ng_share_card.tpl, niguro-share-card.js): the green "✨ Make a share card" bar at the top of the article;
   the studio as a bottom sheet on phones (exactly 90dvh, 28px top corners, its inside scrolls, the head stays on
   top, no scrollbars) and a two-column box from 860px (the card left, the controls right, at most 90vh); the
   "Share this quote" pill under a selection. Fields are plain fills (no border or ring). */

@font-face { font-family: "Gochi Hand"; src: url(../../fonts/GochiHand-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

/* ---------- the bar at the top of the article ---------- */
.ngsc-open { display: flex; align-items: center; gap: 14px; width: 100%; margin: 14px 0 6px; padding: 12px 16px; border: 0; border-radius: 22px; background: linear-gradient(115deg, #08852c 0%, #2ea55a 55%, #2dd4a7 100%); color: #fff; text-align: left; cursor: pointer; box-shadow: 0 12px 26px hsl(143 99% 26% / .24); transition: transform .15s ease, box-shadow .15s ease; }
.ngsc-open:hover { transform: translateY(-2px); box-shadow: 0 16px 30px hsl(143 99% 26% / .3); }
@media (prefers-reduced-motion: reduce) { .ngsc-open, .ngsc-open:hover { transition: none; transform: none; } }
.ngsc-open__ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .2); font-size: 22px; }
.ngsc-open__text { min-width: 0; }
.ngsc-open b { display: block; font: 600 17px/1.25 var(--ng-font-head, "Fredoka", sans-serif); }
.ngsc-open small { display: block; font-size: 13px; line-height: 1.35; opacity: .92; }
.ngsc-open > svg { flex: none; width: 20px; height: 20px; margin-left: auto; }

.ngsc-note { margin: 0; font: 400 19px/1.1 "Gochi Hand", "Nunito", cursive; color: var(--ng-brand, #08852c); }

/* ---------- the studio ---------- */
html.ngsc-lock { overflow: hidden; }
.ngsc, .ngsc *, .ngsc-open, .ngsc-open * { box-sizing: border-box; }
.ngsc { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; height: 90dvh; max-height: 90dvh; margin: 0; padding: 0; border: 0; border-radius: 28px 28px 0 0; overflow: hidden; background: var(--ng-card, #fff); color: var(--ng-ink-strong, #10231a); box-shadow: 0 -10px 40px #10231a33; }
.ngsc[open] { display: flex; flex-direction: column; animation: ngsc-up .26s cubic-bezier(.32, .72, 0, 1); }
.ngsc::backdrop { background: rgba(16, 35, 26, .55); backdrop-filter: blur(2px); }
@keyframes ngsc-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ngsc[open] { animation: none; } }

.ngsc__inner { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 0 18px 22px; }
.ngsc__inner::-webkit-scrollbar { display: none; }
.ngsc__head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 -18px 12px; padding: 18px 18px 10px; background: var(--ng-card, #fff); }
.ngsc__head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 9px; background: var(--ng-fill, #e5efe8); }
.ngsc__head h2 { margin: 2px 0 0; font: 700 26px/1.15 var(--ng-font-head, "Fredoka", sans-serif); color: var(--ng-ink-strong, #10231a); }
.ngsc__x { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ng-fill, #eef5f0); color: var(--ng-ink-strong, #10231a); cursor: pointer; }
.ngsc__x svg { width: 20px; height: 20px; }

.ngsc__grid { display: grid; gap: 18px; align-items: start; }
.ngsc__preview { display: grid; place-items: center; min-height: 260px; padding: 16px; border-radius: 26px; background: var(--gz-soft, #e3f6ea); }
.ngsc__preview canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 46dvh; border-radius: 18px; box-shadow: 0 16px 34px rgba(16, 35, 26, .2); }
.ngsc__controls { display: grid; gap: 16px; min-width: 0; }

@media (min-width: 860px) {
  .ngsc { inset: 0; width: min(980px, calc(100vw - 32px)); height: auto; max-height: 90vh; margin: auto; border-radius: 30px; }
  .ngsc__inner { padding: 0 22px 22px; }
  .ngsc__head { margin: 0 -22px 14px; padding: 20px 22px 6px; }
  .ngsc__head::before { display: none; }
  .ngsc__grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; }
  .ngsc__preview { position: sticky; top: 74px; min-height: 300px; padding: 18px; }
  .ngsc__preview canvas { max-height: min(64vh, 620px); }
}

.ngsc__field { display: grid; gap: 0; min-width: 0; margin: 0; padding: 0; border: 0; }
.ngsc__field legend, .ngsc__legend { display: block; padding: 0; margin: 0 0 8px; font: 800 12.5px/1 var(--ng-font, "Nunito", sans-serif); letter-spacing: .04em; text-transform: uppercase; color: var(--ng-sub, #5b6b62); }

.ngsc__quote { padding: 12px 14px; border-radius: 18px; background: var(--gz-sun-t, #fff4d6); }
.ngsc__quote[hidden] { display: none; }
.ngsc__quote p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: var(--ng-ink-strong, #10231a); }
.ngsc__quote button { padding: 0; border: 0; background: none; color: var(--ng-brand, #08852c); font: 800 13px/1.2 var(--ng-font, "Nunito", sans-serif); cursor: pointer; }

.ngsc__formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ngsc__formats label, .ngsc__looks label { position: relative; margin: 0; }
.ngsc__formats input, .ngsc__looks input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.ngsc__formats span { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 999px; background: var(--ng-fill, #eef5f0); color: var(--ng-ink-strong, #10231a); font: 800 15px/1 var(--ng-font, "Nunito", sans-serif); white-space: nowrap; }
.ngsc__formats small { color: var(--ng-sub, #5b6b62); font-weight: 600; font-size: 12.5px; }
.ngsc__formats input:checked + span { background: var(--gz-soft, #e3f6ea); color: var(--ng-brand, #08852c); box-shadow: inset 0 0 0 1.5px var(--ng-brand, #08852c); }
.ngsc-r { display: inline-block; flex: none; border: 2px solid currentColor; border-radius: 3px; }
.ngsc-r--story { width: 10px; height: 17px; }
.ngsc-r--feed { width: 12px; height: 15px; }
.ngsc-r--square { width: 14px; height: 14px; }
.ngsc-r--pin { width: 11px; height: 16px; }
.ngsc-r--link { width: 19px; height: 10px; }

.ngsc__looks { display: flex; flex-wrap: wrap; gap: 10px; }
.ngsc__looks span:first-of-type { display: block; width: 40px; height: 40px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 3px var(--sw-ring, rgba(255, 255, 255, .55)), 0 0 0 1.5px var(--ng-fill, #e5efe8); }
.ngsc__looks input:checked + span { box-shadow: inset 0 0 0 3px var(--sw-ring, rgba(255, 255, 255, .55)), 0 0 0 3px var(--ng-card, #fff), 0 0 0 5.5px var(--ng-ink-strong, #10231a); }
.ngsc__formats input:focus-visible + span, .ngsc__looks input:focus-visible + span { outline: 3px solid var(--ng-brand, #08852c); outline-offset: 2px; }
.ngsc .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ngsc__field input[type="text"] { width: 100%; height: 46px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--ng-fill, #eef5f0); color: var(--ng-ink-strong, #10231a); font: 600 16px/1 var(--ng-font, "Nunito", sans-serif); box-shadow: none; outline: none; }
.ngsc__field input[type="text"]:focus { border: 0; box-shadow: none; outline: none; }
.ngsc__field input[type="text"]::placeholder { color: var(--ng-sub, #5b6b62); opacity: .8; }
.ngsc__hint { display: inline-block; margin-top: 10px; color: var(--ng-brand, #08852c); font: 800 14px/1.3 var(--ng-font, "Nunito", sans-serif); text-decoration: none; }
.ngsc__hint:hover { text-decoration: underline; }

.ngsc__actions { display: grid; gap: 8px; }
.ngsc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ng-fill, #eef5f0); color: var(--ng-ink-strong, #10231a); font: 600 16px/1 var(--ng-font-head, "Fredoka", sans-serif); cursor: pointer; }
.ngsc-btn svg { width: 19px; height: 19px; }
.ngsc-btn:hover { filter: brightness(.97); }
.ngsc-btn--primary { background: var(--gz-fill, #017F31); color: #fff; box-shadow: var(--gz-shadow-brand, 0 8px 22px #08852c42); }
.ngsc-btn--primary:hover { filter: brightness(1.07); }
.ngsc-btn--soft { background: var(--gz-soft, #e3f6ea); color: var(--ng-brand, #08852c); }
.ngsc__niguro { display: grid; gap: 0; }
.ngsc__niguro-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.ngsc__direct { display: flex; flex-wrap: wrap; gap: 6px; }
.ngsc__direct a { padding: 8px 13px; border-radius: 999px; background: var(--ng-fill, #eef5f0); color: var(--ng-ink-strong, #10231a); font: 800 13px/1 var(--ng-font, "Nunito", sans-serif); text-decoration: none; }
.ngsc__direct a:hover { background: var(--gz-soft, #e3f6ea); color: var(--ng-brand, #08852c); }
.ngsc__direct a[hidden] { display: none; }
.ngsc__status { display: block; min-height: 20px; font-size: 13.5px; font-weight: 700; color: var(--ng-sub, #5b6b62); }

/* ---------- the quote pill (under the selection) and the toast ---------- */
.ngsc-quote-btn { position: absolute; z-index: 1060; min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--gz-fill, #017F31); color: #fff; font: 600 15px/1 var(--ng-font-head, "Fredoka", sans-serif); white-space: nowrap; box-shadow: 0 10px 28px #10231a40; cursor: pointer; }
.ngsc-quote-btn[hidden] { display: none; }
.ngsc-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 2000; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: #10231a; color: #fff; font: 700 14px/1.2 var(--ng-font, "Nunito", sans-serif); box-shadow: 0 10px 28px #10231a40; }
.ngsc-toast[hidden] { display: none; }
/* [Toast sparkle] (owner, 2026-11-05): the same small sparkle as the site's toasts, in the brand's light green */
.ngsc-toast:not([hidden]) { display: inline-flex; align-items: center; gap: 8px; }
.ngsc-toast::before { content: ""; width: 16px; height: 16px; flex: none; background: #7fe0a3; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M10.5%205c.5%204.3%202.7%206.5%207%207-4.3.5-6.5%202.7-7%207-.5-4.3-2.7-6.5-7-7%204.3-.5%206.5-2.7%207-7ZM18.5%202.5c.2%201.8%201.2%202.8%203%203-1.8.2-2.8%201.2-3%203-.2-1.8-1.2-2.8-3-3%201.8-.2%202.8-1.2%203-3Z%27/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M10.5%205c.5%204.3%202.7%206.5%207%207-4.3.5-6.5%202.7-7%207-.5-4.3-2.7-6.5-7-7%204.3-.5%206.5-2.7%207-7ZM18.5%202.5c.2%201.8%201.2%202.8%203%203-1.8.2-2.8%201.2-3%203-.2-1.8-1.2-2.8-3-3%201.8-.2%202.8-1.2%203-3Z%27/%3E%3C/svg%3E") center / contain no-repeat; }
