/* Deliberately scoped: the invitation never changes game or reader layout. */
.bert-support-entry{margin:24px 0 4px;padding-top:16px;border-top:1px solid rgba(172,194,177,.24);display:flex;align-items:baseline;gap:6px 18px;flex-wrap:wrap}
.bert-support-entry .bert-support-link{appearance:none;font:inherit;font-size:15px;font-weight:500;line-height:1.5;border:0;border-radius:8px;background:transparent;color:inherit;min-height:44px;padding:8px 2px;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.bert-support-entry small{font:inherit;font-size:13px;line-height:1.7;opacity:.85}
/* The original game footer has a fixed height and muted ink; reader invitations are content. */
#guideContent .story-support-footer{display:block;height:auto;min-height:0;color:inherit;letter-spacing:normal}
#guide .bert-support-entry{color:var(--forest-text,#eaf0e4)}
#guide .bert-support-entry .bert-support-link{font-size:15px;font-weight:500;line-height:1.5;min-height:44px;padding:8px 2px;border:0;background:transparent;color:var(--forest-text,#eaf0e4)!important}
#guide .bert-support-entry small{font-size:13px;color:var(--forest-muted,#bdcebf);opacity:1}
body[data-text-size="large"] #guide .bert-support-entry .bert-support-link{font-size:18px}
body[data-text-size="large"] #guide .bert-support-entry small{font-size:16px}
.bert-support-layer{position:fixed;inset:0;z-index:10050;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:rgba(15,36,32,.72);padding:max(20px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));display:flex;align-items:flex-start;justify-content:center;color:#eaf0e4;font-family:inherit;text-align:left;touch-action:pan-y}
.bert-support-layer *{box-sizing:border-box}
.bert-support-card{width:min(680px,100%);margin:auto;background:#203d37;color:#eaf0e4;padding:24px 30px;border:1px solid #668074;border-radius:22px;box-shadow:0 18px 65px rgba(6,20,15,.25)}
.bert-support-layer h2{font-size:clamp(23px,4vw,29px);line-height:1.4;font-weight:600;margin:5px 0 14px;color:#f4e6be}
.bert-support-layer p{font-size:16px;line-height:1.7;margin:8px 0;color:#eaf0e4}
.bert-support-top{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.bert-support-top .bert-support-kicker{font-size:13px;letter-spacing:.12em;color:#b9cec2}
.bert-support-layer button{appearance:none;font:inherit;font-size:16px;line-height:1.4;min-height:46px;border-radius:11px;padding:10px 16px;border:1px solid #9ab2a5;background:#294d43;color:#f3f5e9;cursor:pointer;touch-action:manipulation}
.bert-support-layer button:focus-visible,.bert-support-entry button:focus-visible{outline:3px solid #e5c979;outline-offset:4px}
.bert-support-layer .bert-support-close{background:transparent;white-space:nowrap;font-size:15px}
.bert-support-close span{font-size:22px;margin-left:6px;vertical-align:-1px}
.bert-support-layer .bert-support-adult{font-size:14px;color:#c6d8cd}
.bert-support-codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin:20px 0 16px}
.bert-support-codes figure{margin:0;min-width:0}
.bert-support-codes figcaption{font-size:17px;font-weight:600;margin:0 0 9px;text-align:center;color:#f4e6be}
.bert-support-code{background:#fff;border-radius:9px;padding:14px;min-height:140px;display:flex;align-items:center;justify-content:center}
.bert-support-code img{display:block;width:100%;height:auto;max-width:260px;object-fit:contain}
.bert-support-code img[hidden],.bert-support-code p[hidden]{display:none}
.bert-support-code .bert-support-image-error{color:#253f35;font-size:15px;line-height:1.6}
.bert-support-layer .bert-support-how{font-size:15px;color:#e0eadd}
.bert-support-layer .bert-support-note{font-size:13px;color:#b9cec2}
.bert-support-joke{margin-top:20px;padding-top:12px;border-top:1px solid #4c685b}
.bert-support-joke p{font-size:14px;color:#d1dccb}
.bert-support-layer .bert-support-return{display:block;margin:20px auto 0;min-width:150px;background:#e4dbb7;color:#213b32;border-color:#e4dbb7;font-weight:600}
@media(max-width:440px){.bert-support-card{padding:18px 16px;border-radius:17px}.bert-support-codes{grid-template-columns:1fr;gap:18px}.bert-support-code{max-width:288px;margin:0 auto}.bert-support-layer{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}}
@media(max-height:480px) and (min-width:441px){.bert-support-layer{padding-top:max(10px,env(safe-area-inset-top));padding-bottom:max(10px,env(safe-area-inset-bottom))}.bert-support-card{padding:18px 24px}.bert-support-codes{max-width:470px;margin:15px auto}.bert-support-top{position:sticky;top:0;background:#203d37;z-index:1}.bert-support-layer p{line-height:1.6}}

/* V18.6: body-mounted dialogs follow the visible viewport when the phone
 * keyboard or browser chrome changes its height. Defaults also work on the site. */
.bert-support-layer{top:var(--bert-viewport-top,0px);left:var(--bert-viewport-left,0px);right:auto;bottom:auto;width:var(--bert-viewport-width,100%);height:var(--bert-viewport-height,100dvh);min-width:0;min-height:0}

/* V18.10: native, optional channel choices; a code is never a payment result. */
.bert-support-layer .bert-support-subtitle{font-size:16px;line-height:1.85}
.bert-support-layer #bertSupportIntro{font-size:14px;color:#dce7dc;line-height:1.85}
.bert-support-channels{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:22px}
.bert-support-channels button{flex:1 1 170px;max-width:240px;min-height:46px}
.bert-support-channels button[aria-pressed=true]{background:#e4dbb7;border-color:#e4dbb7;color:#213b32;font-weight:600}
.bert-support-codes{display:block;margin:18px auto;max-width:288px}
.bert-support-codes figure[hidden]{display:none}.bert-support-codes figcaption{font-size:15px;line-height:1.8}
.bert-support-code{min-height:0}.bert-support-code img{max-width:260px}
@media(max-height:480px) and (min-width:441px){.bert-support-codes{max-width:230px}.bert-support-channels{margin-top:16px}.bert-support-joke{margin-top:14px}}

/* V18.11: one small tea corner, drawn locally like the forest's line work. */
.bert-support-entry{position:relative;display:flex;align-items:center;gap:8px 20px;padding:14px 18px 12px;border:1px solid #9cab8054;border-radius:24px 8px 22px 10px;background:linear-gradient(105deg,#8ea37312,transparent 75%)}
.bert-support-entry::before,.bert-support-entry::after{content:'';position:absolute;width:30px;height:10px;border:1px solid #9dab7966;pointer-events:none;border-radius:90% 0 90% 0}
.bert-support-entry::before{top:-5px;left:24px;transform:rotate(-12deg)}
.bert-support-entry::after{bottom:-4px;right:24px;transform:rotate(-12deg)}
.bert-support-entry .bert-support-link,#guide .bert-support-entry .bert-support-link{display:flex;align-items:center;gap:12px;padding:2px 0;border:0;background:transparent;text-decoration:none;min-height:68px}
.bert-support-link .bert-tea-illustration{width:75px;height:64px;flex:none}
.bert-support-link>span{text-align:left;display:block}
.bert-support-link b{font-size:16px;font-weight:600;line-height:1.5}
.bert-support-link span small{display:block;margin-top:4px;font-size:13px;line-height:1.6}
.bert-support-free{font-size:12px!important;line-height:1.8}
.bert-support-heading{display:flex;gap:17px;align-items:center;margin:5px 0 12px}
.bert-support-heading .bert-tea-illustration{width:100px;height:86px;flex:none}
.bert-support-heading h2{margin:0;line-height:1.5}
.bert-support-card{background:radial-gradient(ellipse at 0 0,#385440 0,transparent 58%),#203d37;border-radius:30px 14px 28px 12px}
@media(max-width:440px){.bert-support-entry{padding:12px 14px;gap:5px 14px}.bert-support-free{flex-basis:100%;padding-left:87px}.bert-support-heading{gap:12px}.bert-support-heading .bert-tea-illustration{width:76px;height:67px}}
@media(max-height:480px) and (min-width:441px){.bert-support-heading .bert-tea-illustration{width:72px;height:60px}.bert-support-heading{margin:0 0 9px}.bert-support-top{border-radius:9px}}
