.bday{padding:20px 0 70px;color:#eef4ff}
.bday *{box-sizing:border-box}
.bday .ng-workspace{margin:20px 0 30px;border:1px solid #304566;border-radius:26px;background:linear-gradient(180deg,#0f1831,#0a1125);overflow:hidden;box-shadow:0 18px 40px rgba(0,0,0,.2)}
.bday .ng-workspace-top{display:flex;align-items:center;gap:12px;padding:16px 24px;border-bottom:1px solid #233553;background:linear-gradient(90deg,#0d1b39,#101b3e);font-size:11px;font-weight:900;letter-spacing:.18em;color:#d4dfff}
.bday .ng-dots{display:inline-flex;gap:7px}.bday .ng-dots i{width:10px;height:10px;border-radius:50%;display:block}.bday .ng-dots i:nth-child(1){background:#ff7b88}.bday .ng-dots i:nth-child(2){background:#ffce69}.bday .ng-dots i:nth-child(3){background:#72e3be}
.bday .ng-workspace-inner{padding:30px 36px 38px}
.bday .ng-step{margin:0 0 12px;color:#c7b5ff;font-size:11px;font-weight:900;letter-spacing:.18em}
.bday h1{margin:0 0 12px;color:#fff;font-size:clamp(32px,5vw,56px);line-height:1.06;letter-spacing:-.04em}
.bday .lead{margin:0;max-width:760px;color:#bfd0ea;font-size:16px;line-height:1.75}
.bday h2{margin:0 0 16px;color:#fff;font-size:clamp(22px,2.7vw,31px);line-height:1.25}
.bday h3{color:#fff}
.bday .hero-row{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;flex-wrap:wrap}
.bday .hero-side{display:flex;flex-direction:column;gap:10px;max-width:290px;align-items:flex-start}
.bday .quota-badge{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:12px 16px;border-radius:14px;border:1px solid #55698f;background:rgba(18,29,58,.8);color:#f2f6ff;font-weight:800;line-height:1.3}
.bday .quota-badge.good{border-color:#4ea47b;background:#143326;color:#d9ffe7}.bday .quota-badge.warn{border-color:#a67b41;background:#352712;color:#ffe5b9}.bday .quota-badge.bad{border-color:#965c5c;background:#3a1d24;color:#ffd7d7}
.bday .mini-note{margin:0;color:#aebedd;font-size:12px;line-height:1.55}
.bday .editorial-highlight{border:1px solid #3e5477;border-radius:18px;padding:18px 20px;margin:24px 0 30px;background:linear-gradient(135deg,rgba(24,36,66,.95),rgba(20,30,56,.95));color:#d7e4fb}.bday .editorial-highlight strong{color:#fff;display:block;margin-bottom:5px}
.bday form,.bday .panel,.bday details{min-width:0}
.bday .fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:19px}
.bday .field{display:flex;flex-direction:column;gap:8px;min-width:0}.bday .wide{grid-column:1/-1}
.bday .field label{font-weight:800;color:#f8fbff;font-size:15px}
.bday .field input,.bday .field textarea,.bday .field select,.bday .editable{width:100%;min-width:0;border-radius:15px;border:1px solid #44587e;background:#0a1530;color:#f6f8ff;padding:14px 16px;font-size:16px;line-height:1.5;min-height:54px;outline:none;box-shadow:none}
.bday .field textarea{min-height:104px;resize:vertical}.bday .editable{min-height:255px;resize:vertical}
.bday .field input:focus,.bday .field textarea:focus,.bday .field select:focus,.bday .editable:focus{border-color:#9d87ff;box-shadow:0 0 0 3px rgba(157,135,255,.18)}
.bday .field small,.bday .muted{color:#adbedc;font-size:13px;line-height:1.6}
.bday .design-studio{margin:26px 0 10px;padding:22px;border:1px solid #405478;border-radius:21px;background:linear-gradient(135deg,#121d39,#1a2749)}
.bday .studio-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.bday .studio-heading h2{margin:4px 0 0;font-size:22px}.bday .studio-heading p{margin:0;max-width:300px;color:#b1c4e9;font-size:13px;line-height:1.55}
.bday .studio-eyebrow{font-size:10px;letter-spacing:.18em;font-weight:900;color:#c9b9ff}
.bday .studio-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.bday .theme-gallery{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.bday .theme-chip{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border-radius:999px;border:1px solid #4f6488;background:#162442;color:#e3ebff;font-weight:800;font-size:13px;min-height:42px;transition:.2s ease;cursor:pointer}.bday .theme-chip:hover{transform:translateY(-1px);border-color:#af9bff}.bday .theme-chip.active{background:#302b64;border-color:#ba9cff;box-shadow:0 0 0 2px rgba(186,156,255,.18);color:#fff}
.bday .swatch{display:block;width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.5)}.bday .swatch.blush{background:#ffd3ed}.bday .swatch.night{background:#6642b5}.bday .swatch.gold{background:#f1d178}.bday .swatch.mint{background:#78dec0}.bday .swatch.rose{background:#e59eb5}.bday .swatch.cosmic{background:#1f2b89}
.bday .sr-only-field{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
.bday .actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:22px}.bday .compact-actions{margin-top:16px}
.bday .primary,.bday .secondary{cursor:pointer;transition:transform .18s ease,filter .18s ease,border-color .18s ease,box-shadow .18s ease;font-size:15px}
.bday .primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:14px 22px;min-height:50px;border-radius:14px;border:0;color:#fff;font-weight:900;background:linear-gradient(100deg,#566dff,#9138ea);box-shadow:0 12px 24px rgba(107,76,245,.28)}
.bday .primary:hover{transform:translateY(-2px);filter:brightness(1.05)}.bday .primary:active,.bday .secondary:active{transform:scale(.98)}
.bday .secondary{display:inline-flex;align-items:center;justify-content:center;padding:12px 17px;min-height:46px;border-radius:13px;border:1px solid #576a91;background:#1b2948;color:#edf1ff;font-weight:800}.bday .secondary:hover{transform:translateY(-1px);border-color:#b69cff}
.bday .sound-switch{display:inline-flex;align-items:center;gap:9px;padding:10px 14px;border-radius:13px;border:1px solid #53668a;background:#182643;color:#d6e3ff;font-weight:800;min-height:46px;cursor:pointer}.bday .sound-switch input{accent-color:#9d87ff;width:18px;height:18px}
.bday .loadbox{display:flex;align-items:center;gap:14px;padding:14px 16px;margin-top:16px;border-radius:16px;border:1px solid #4a5f84;background:#141f3b;color:#dce8ff}.bday .loadbox p{margin:3px 0 0;color:#b7c7e4;font-size:13px;line-height:1.5}.bday .spinner{width:22px;height:22px;border:3px solid #7e91bc;border-top-color:#fff;border-radius:50%;animation:bdaySpin .85s linear infinite}@keyframes bdaySpin{to{transform:rotate(360deg)}}
.bday .error{min-height:20px;margin:14px 0 0;color:#ffd2d2}.bday .error:not(:empty){padding:12px 14px;border-radius:13px;border:1px solid #935a5a;background:#3a2127}
.bday .result{border-top:1px solid #3d5074;margin-top:34px;padding-top:28px}.bday .result[hidden]{display:none!important}
.bday .resultgrid{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);gap:24px}
.bday .panel{padding:22px;border-radius:20px;border:1px solid #334969;background:#101a33;min-width:0}.bday .panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.bday .pill{display:inline-flex;align-items:center;justify-content:center;padding:8px 11px;border-radius:999px;background:#1c2845;border:1px solid #51658d;color:#dce6ff;font-size:12px;font-weight:900;text-transform:capitalize}
.bday .editor-hint{margin:8px 0 0;color:#c0cdec;font-size:12px;line-height:1.55}
.bday .card-stage{position:relative;overflow:hidden;border-radius:20px;min-width:0}.bday #confetti{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:5}
.bday .preview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;color:#dbe7ff;font-size:13px}.bday .preview-heading span{color:#adc1e8;font-size:12px}
.bday .card-preview{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;min-height:350px;padding:28px;border-radius:20px;overflow:hidden;text-align:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16);white-space:normal;word-break:break-word}
.bday .card-preview h3{margin:0;font-size:clamp(28px,3vw,40px);line-height:1.1;color:inherit}
.bday .card-preview p{margin:0;max-width:95%;white-space:pre-line;font-size:clamp(14px,1.45vw,17px);line-height:1.6;color:inherit}.bday .card-preview .signature{font-size:14px;font-weight:800;color:inherit}.bday .card-preview .kicker{font-size:34px;letter-spacing:.18em}
.bday .card-preview.blush{background:linear-gradient(145deg,#fff2f8,#e7e4ff);color:#34254d}.bday .card-preview.night{background:linear-gradient(140deg,#17143e,#4b2680);color:#f8ecff}.bday .card-preview.gold{background:linear-gradient(135deg,#fff8df,#f0d39f);color:#5a3d18}.bday .card-preview.mint{background:linear-gradient(135deg,#e4fff6,#bceee6);color:#174b4f}.bday .card-preview.rose{background:linear-gradient(135deg,#fff1ef,#e6a5ba);color:#6b2b4a}.bday .card-preview.cosmic{background:linear-gradient(135deg,#091739,#41319a);color:#f2ebff}
.bday .card-preview[data-font="classic"] h3,.bday .card-preview[data-font="classic"] p,.bday .card-preview[data-font="classic"] .signature{font-family:Georgia,serif}
.bday .card-preview[data-font="modern"] h3,.bday .card-preview[data-font="modern"] p,.bday .card-preview[data-font="modern"] .signature{font-family:Arial,sans-serif}
.bday .card-preview[data-font="playful"] h3,.bday .card-preview[data-font="playful"] p,.bday .card-preview[data-font="playful"] .signature{font-family:'Trebuchet MS',sans-serif}
.bday .card-preview[data-format="story"]{min-height:430px;max-width:275px;margin:0 auto}.bday .card-preview[data-format="wide"]{min-height:240px}
.bday .card-preview.card-reveal{animation:bdayReveal .85s cubic-bezier(.17,.85,.2,1) both}.bday .card-preview .card-shimmer{position:absolute;inset:-50%;pointer-events:none;background:linear-gradient(100deg,transparent 44%,rgba(255,255,255,.22) 49%,transparent 55%);transform:translateX(-95%) rotate(10deg)}.bday .card-preview.card-reveal .card-shimmer{animation:bdayShimmer 1.35s ease-out .15s both}
@keyframes bdayReveal{0%{transform:translateY(22px) scale(.94);opacity:.2;filter:blur(6px)}60%{opacity:1;filter:blur(0)}100%{transform:translateY(0) scale(1);opacity:1}}
@keyframes bdayShimmer{to{transform:translateX(95%) rotate(10deg)}}
.bday .note,.bday .status{font-size:12px;color:#9fb0d2;line-height:1.65;margin-top:12px}.bday .status{min-height:20px;color:#d8e4ff}
.bday .reading{max-width:960px;margin:46px auto 0;color:#c7d5ec;line-height:1.78}.bday .reading h2{margin-top:0;color:#fff}.bday .reading h3{margin-top:26px;color:#fff}.bday .reading ul{padding-left:22px}.bday .hint{margin:18px 0;padding:14px 16px;border-radius:12px;border-left:4px solid #a187ff;background:#162442;color:#d1dfff}
.bday details{margin-top:12px;padding:16px 18px;border-radius:13px;border:1px solid #34486a;background:#121d37}.bday summary{cursor:pointer;color:#fff;font-weight:800}.bday details p{margin:12px 0 0}
.bday .related{margin:52px 0 10px}.bday .relatedgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.bday .relatedcard{display:flex;flex-direction:column;gap:12px;min-width:0;padding:22px;border-radius:20px;border:1px solid #34486a;background:#131f38;text-decoration:none;color:#f7f9ff;transition:.2s ease}.bday .relatedcard:hover{border-color:#aa92ff;transform:translateY(-2px)}.bday .relatedcard .symbol{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;background:#312b71;color:#e2d4ff;font-size:24px}.bday .relatedcard strong{font-size:18px;line-height:1.35}.bday .relatedcard p{margin:0;color:#c0d0ea;font-size:14px;line-height:1.6;flex:1}.bday .relatedcard span:last-child{color:#c8b1ff;font-weight:900}
.bday .footer{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;align-items:center}.bday .foot-links{display:flex;gap:14px;flex-wrap:wrap}
@media (max-width:900px){.bday .resultgrid,.bday .fields,.bday .studio-grid,.bday .relatedgrid{grid-template-columns:1fr}.bday .wide{grid-column:auto}.bday .hero-side{max-width:none;width:100%}.bday .card-preview[data-format="story"]{max-width:none}}
@media (max-width:740px){.bday{padding-top:14px}.bday .ng-workspace-inner{padding:22px 16px 28px}.bday .ng-workspace-top{padding:14px 16px;font-size:9px}.bday .actions button,.bday .actions .sound-switch{flex:1 1 100%}.bday .theme-chip{flex:1 1 31%;justify-content:center}.bday .card-preview{min-height:320px}.bday .card-preview[data-format="story"]{min-height:400px}.bday .panel{padding:18px}.bday .quota-badge{width:100%}}
@media (prefers-reduced-motion: reduce){.bday .primary,.bday .secondary,.bday .theme-chip{transition:none}.bday .card-preview.card-reveal,.bday .card-preview.card-reveal .card-shimmer,.bday .spinner{animation:none!important}}

/* Explicit hidden-state overrides: the flex loading style must not display hidden elements. */
.bday #loading-box[hidden]{display:none!important}
.bday #result[hidden]{display:none!important}
.bday #generate-birthday:disabled{opacity:.75;cursor:progress}

/* Critical integration fix: global /styles.css sets `.result { display:none; }`.
   Clearing the hidden attribute in JS did not override that rule.
   Scope visibility exclusively to this tool so other NextGad pages are untouched. */
.bday #result:not([hidden]) {
  display: block !important;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  overflow: visible;
}
.bday #result[hidden] { display: none !important; }

/* Birthday share controls */
.bday .music-picker{display:flex;align-items:center;gap:11px;flex-wrap:wrap;margin:18px 0 6px}.bday .music-picker label{font-size:13px;font-weight:900;color:#d9e3ff}.bday .music-picker select{background:#101b36;border:1px solid #566990;border-radius:12px;color:white;padding:11px;font-size:14px;min-height:45px}.bday .music-picker input{accent-color:#9d83ff;width:150px}.bday .share-link-box{margin-top:20px;padding:18px;border-radius:16px;border:1px solid #6c55a6;background:#1b2242;color:#f4eaff}.bday .share-link-box[hidden]{display:none!important}.bday .share-link-box p{font-size:13px;line-height:1.6;color:#bfcbed}.bday .share-link-box input{width:100%;min-height:42px;border-radius:10px;border:1px solid #566c91;background:#0a1530;color:#e6edff;padding:10px;font-size:13px}.bday .share-link-box .actions{margin-top:12px}

/* Share & celebration controls remain visible on dark NextGad layouts. */
.bday #share-link-box:not([hidden]){display:block!important}
.bday #result:not([hidden]){display:block!important}
.bday .card-stage{isolation:isolate}
.bday #replay{border-color:#a987ff;background:linear-gradient(115deg,#302657,#283d70);color:#fff}
.bday #replay:focus-visible,.bday #share:focus-visible{outline:3px solid #c7b7ff;outline-offset:3px}

/* Simplified three-field birthday form. */
.bday .simple-entry-box{border:1px solid #3d5275;border-radius:20px;background:linear-gradient(135deg,#17243f,#141e38);padding:22px;margin:14px 0 22px}
.bday .minimal-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.bday .minimal-fields>.field:last-child{grid-column:1/-1}
.bday .generator-defaults[hidden]{display:none!important}
.bday .after-result-studio{margin:20px 0 8px;border:1px solid #455b83;border-radius:18px;overflow:hidden;background:#121d37}
.bday .after-result-studio>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:16px;color:#f4efff;font-weight:800;padding:18px 21px}
.bday .after-result-studio>summary::after{content:'+';font-size:24px;font-weight:600;color:#b9a3ff}
.bday .after-result-studio[open]>summary::after{content:'−'}
.bday .after-result-studio>summary::-webkit-details-marker{display:none}
.bday .after-result-studio .design-studio{margin:0;border:0;border-top:1px solid #34486a;border-radius:0;background:transparent}
.bday .below-tools-highlight{margin:48px 0 22px}
.bday .bottom-quota{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:20px 22px;border:1px solid #3d5275;border-radius:18px;background:#111d37;margin:16px 0 0}
.bday .bottom-quota>strong{color:#fff;font-size:15px}
.bday .bottom-quota .quota-badge{margin-left:auto}
.bday .bottom-quota p{flex:1 1 100%;color:#aebedc;font-size:13px;line-height:1.5;margin:0}
@media(max-width:700px){.bday .minimal-fields{grid-template-columns:1fr}.bday .minimal-fields>.field:last-child{grid-column:auto}.bday .simple-entry-box{padding:16px}.bday .bottom-quota .quota-badge{margin-left:0}}

/* Inline live AI quota: immediately after Reset form, without touching quota logic. */
.bday #wish-form > .actions {align-items:center;}
.bday #wish-form .action-quota {margin-left:4px;flex:0 1 auto;max-width:100%;white-space:normal;text-align:center;}
@media (max-width:740px) {
  .bday #wish-form .actions .action-quota {width:100%;flex:1 1 100%;margin-left:0;justify-content:center;}
}
