.bloom-card,.bloom-dialog { font-family:'Fredoka One',sans-serif; color:#29263f; box-sizing:border-box; }
.bloom-card[hidden] { display:none; }
#sunflowerAdventure .pip-panel-close { position:absolute;top:4px;right:4px;width:44px;min-height:44px;padding:0;border-radius:6px;background:transparent;font:26px/1 system-ui,sans-serif; }
#sunflowerAdventure>.pip-eyebrow { min-height:36px;padding-right:28px;box-sizing:border-box; }
.bloom-card { position:fixed; top:76px; right:18px; z-index:60; width:280px; padding:22px; border:2px solid #e8c46c; border-radius:22px; background:#fff9e9; box-shadow:0 12px 36px #30233130; }
.bloom-card h2 { font-size:23px; margin:8px 0 10px; }
.bloom-card p,.bloom-dialog p { font:600 15px/1.55 system-ui,sans-serif; }
.bloom-card .pip-eyebrow,.bloom-dialog .pip-eyebrow { font:800 11px/1.5 system-ui,sans-serif; letter-spacing:.1em; color:#7a581d; }
.bloom-card button,.bloom-dialog button { min-height:48px; border:0; border-radius:14px; padding:12px 16px; background:#f5c84e; color:#29263f; font:700 15px/1.3 system-ui,sans-serif; cursor:pointer; }
.bloom-card button { width:100%; }
.bloom-card button:hover,.bloom-dialog button:hover { filter:brightness(.97); }
.bloom-card button:focus-visible,.bloom-dialog button:focus-visible { outline:3px solid #4a4594; outline-offset:3px; }
.bloom-card .bloom-note,.bloom-dialog .bloom-note { font-size:12px; color:#6a6256; margin:12px 0 0; }
.bloom-dialog { width:min(580px,calc(100vw - 24px - var(--bw-safe-left) - var(--bw-safe-right))); max-height:calc(100dvh - 24px - var(--bw-safe-top) - var(--bw-safe-bottom)); margin:auto; padding:0; border:2px solid #e8c46c; border-radius:26px; background:#fff9e9; overflow:auto; touch-action:pan-y pinch-zoom; overscroll-behavior:contain; }
.bloom-dialog::backdrop { background:#191b3a99; }
.bloom-dialog-body { position:relative; padding:26px; }
.bloom-dialog h2 { font-size:26px; line-height:1.2; margin:16px 32px 12px 0; }
.bloom-dialog h3 { font-size:20px; margin:6px 0; }
.bloom-dialog .bloom-close { position:absolute; right:8px; top:8px; width:44px; min-height:44px; padding:8px; background:transparent; font-size:26px; }
.bloom-dialog .bloom-secondary { background:#eee6d6; }
.bloom-buttons { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.bloom-buttons:empty { display:none; }
.bloom-buttons button { flex:1 1 170px; }
.bloom-chapter { padding:16px 0; border-top:1px solid #d8cdae; }
.bloom-chapter:first-child { margin-top:18px; }
.bloom-chapter p { margin:8px 0; }
.sunflower-choice { display:flex; flex-wrap:wrap; gap:8px; border:0; padding:0; margin:16px 0 10px; min-width:0; }
.sunflower-choice legend { font:700 12px/1.4 system-ui,sans-serif; color:#635847; margin-bottom:7px; }
.sunflower-choice button { flex:1; min-width:110px; padding:10px; font-size:13px; }
.sunflower-choice button[aria-pressed="true"] { background:#e1ebd0; box-shadow:inset 0 0 0 2px #4d7050; }
.sunflower-instructions { font-size:13px!important; margin:10px 0; }
.sunflower-row { display:grid; grid-template-columns:repeat(var(--flower-count,3),minmax(0,1fr)); gap:7px; align-items:stretch; }
.bloom-dialog .sunflower-pot { min-width:0; padding:9px 4px; display:flex; flex-direction:column; align-items:center; gap:3px; border-radius:12px; background:#eee8d8; font-size:13px; border:2px solid transparent; }
.bloom-dialog .sunflower-pot[aria-pressed="true"] { border-color:#4a4594; background:#e7e3f3; }
.sunflower-pot img { width:100%; height:120px; object-fit:contain; }
.sunflower-pot-label { font-size:11px; color:#615a4f; }
.sunflower-tools { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.sunflower-tools button { flex:1 1 160px; }
#sunflowerFeedback { margin:12px 0 0; padding:10px 12px; font-size:13px; border-radius:12px; background:#e7efd8; color:#2f4b29; }
#sunflowerFeedback:empty { display:none; }
@media(max-width:640px) {
  .bloom-card { top:calc(168px + var(--bw-safe-top)); left:50%; right:auto; transform:translateX(-50%); width:min(330px,calc(100vw - 32px)); padding:14px 18px; }
  .bloom-card[data-met="true"] { top:auto; bottom:calc(176px + var(--bw-safe-bottom)); }
  .bloom-card h2 { font-size:20px; margin:4px 0; }
  .bloom-card p { font-size:13px; margin:6px 0; }
  .bloom-card .bloom-note { display:none; }
  .bloom-dialog-body { padding:20px; }
  .bloom-dialog h2 { font-size:23px; }
  .sunflower-pot img { height:105px; }
}
@media(max-height:500px) and (min-width:481px) {
  .bloom-card,.bloom-card[data-met="true"] { top:calc(14px + var(--bw-safe-top)); bottom:auto; left:auto; right:calc(12px + var(--bw-safe-right)); transform:none; width:235px; max-height:calc(100dvh - 130px); overflow:auto; padding:12px; }
  .bloom-card h2 { font-size:20px; margin:5px 0; }
  .bloom-card p { font-size:13px; margin:5px 0; }
  .bloom-card .bloom-note { display:none; }
  .sunflower-editor { width:min(760px,calc(100vw - 24px)); }
  .sunflower-editor .bloom-dialog-body { padding:16px 20px; }
  .sunflower-editor .pip-eyebrow,.sunflower-editor .bloom-note { display:none; }
  .sunflower-editor h2 { font-size:22px; margin:0 30px 6px 0; }
  .sunflower-editor #sunflowerText { font-size:13px; margin:4px 0; }
  .sunflower-editor .sunflower-choice { margin:7px 0; }
  .sunflower-editor .sunflower-choice legend { margin:0; }
  .sunflower-editor .sunflower-choice button { min-height:44px; }
  .sunflower-editor .sunflower-workbench { display:grid; grid-template-columns:1fr 190px; gap:12px; align-items:start; }
  .sunflower-editor .sunflower-tools { margin:0; gap:7px; }
  .sunflower-editor .sunflower-tools button { min-height:44px; }
  .sunflower-editor .sunflower-pot img { height:60px; }
  .sunflower-editor .sunflower-instructions { margin:5px 0; font-size:12px!important; }
}
#bloomJournalBtn { width:100%; padding:10px 14px; border:1.5px solid #ffffff29; border-radius:16px; background:#ffffff17; color:#fff; font:13px 'Fredoka One',sans-serif; text-align:left; cursor:pointer; }
#bloomJournalBtn:focus-visible { outline:3px solid #f5c84e; outline-offset:2px; }
@media(max-width:360px) and (max-height:650px) {
  .sunflower-editor .bloom-dialog-body { padding:14px; }
  .sunflower-editor .pip-eyebrow,.sunflower-editor .bloom-note { display:none; }
  .sunflower-editor h2 { font-size:20px; margin:0 32px 6px 0; }
  .sunflower-editor #sunflowerText { font-size:12px; line-height:1.4; margin:4px 0; }
  .sunflower-editor .sunflower-choice { margin:8px 0; }
  .sunflower-editor .sunflower-choice legend { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .sunflower-editor .sunflower-choice button { min-width:0; min-height:44px; padding:6px; font-size:12px; }
  .sunflower-editor .sunflower-instructions { font-size:11px!important; line-height:1.4; margin:6px 0; }
  .sunflower-editor .sunflower-pot { padding:6px 3px; font-size:12px; }
  .sunflower-editor .sunflower-pot img { height:55px; }
  .sunflower-editor .sunflower-tools { margin-top:8px; }
  .sunflower-editor .sunflower-tools button { min-height:44px; padding:8px; font-size:13px; }
}
.bloom-session { padding:0 0 20px;margin:0 0 20px;border-bottom:1px solid #c6d6cd; }
.bloom-session h3 { font-size:20px;margin:6px 0; }
.bloom-session button { min-height:44px;padding:10px 16px;border:0;border-radius:6px;background:#346c60;color:white;font:700 14px system-ui;cursor:pointer; }
.bloom-session button:focus-visible { outline:3px solid #ad6e22;outline-offset:3px; }
