/* Supplied hand-drawn contour, stretched whole with a non-scaling SVG stroke.
   Container outlines are painted last by a pointer-transparent overlay.
   The source's #111 at .35 opacity appears #acacac over white; dark mode uses
   that visible gray opaquely. Light mode uses solid black. */
:where(#couldbetSocialHub, .cb-auth) { --cb-box-outline: url('/images/couldbet-social/box-outline-light.svg?v=2'); }
:where(#couldbetSocialHub, .cb-auth)[data-theme=dark] { --cb-box-outline: url('/images/couldbet-social/box-outline-dark.svg?v=2'); }
.cb-auth :is(.auth-card, .auth-field, .auth-submit, .auth-provider, .auth-custom input:not([type=checkbox]), .auth-custom select),
#couldbetSocialHub :is(.cb-social-panel:not(.cb-sticker-feed-results), .cb-social-card, .cb-social-game-card, .cb-social-story, .cb-social-empty, .cb-social-error, .cb-social-post-dialog, .cb-sticker-topnav, .cb-social-subnav button, .cb-social-button, .cb-sticker-top-link.is-active, .cb-sticker-prompt > span:last-child, .cb-social-metric, .cb-vue-feed-tools select, .cb-vue-mobile-nav select, .cb-social-field input:not([type=checkbox]), .cb-social-field select, .cb-social-field textarea, .cb-social-composer > textarea, .cb-social-composer > input:not([type=file]), .cb-social-actions select, .cb-social-composer select, .cb-social-dialog-card, .cb-sticker-mini-game, .cb-sticker-hero-note, .cb-vue-search input) {
    border: 3px solid transparent;
    border-image: none;
    background-image: var(--cb-box-outline);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-origin: border-box;
    box-shadow: none;
}

/* Live setup and group forms have one fixed contour around their scrollable content. */
#couldbetSocialHub .cb-social-post-dialog:is(:has([name=ingestType]),:has([name=joinPolicy])) {
    border:0; border-radius:0; outline:none; box-shadow:none; background:transparent;
    padding:30px; overflow:hidden; color:var(--cb-ink);
}
#couldbetSocialHub .cb-social-post-dialog[open]:is(:has([name=ingestType]),:has([name=joinPolicy])) { display:flex; flex-direction:column; }
#couldbetSocialHub .cb-social-post-dialog:is(:has([name=ingestType]),:has([name=joinPolicy]))::before {
    content:''; position:absolute; inset:0; z-index:-1; pointer-events:none;
    background:var(--cb-paper); mask:url('/images/couldbet-social/box-panel-mask.svg') center/100% 100% no-repeat;
}
#couldbetSocialHub .cb-social-post-dialog:is(:has([name=ingestType]),:has([name=joinPolicy]))>.cb-social-dialog-head { flex-shrink:0; }
#couldbetSocialHub .cb-social-post-dialog:is(:has([name=ingestType]),:has([name=joinPolicy]))>.cb-social-post-dialog-content { overflow:auto; min-height:0; padding:4px; }
/* Never paint a decorative panel frame across live video or broadcaster text. */
#couldbetSocialHub .cb-broadcast.cb-social-panel { border:0; border-image:none; outline:none; box-shadow:none; background-image:none; }
#couldbetSocialHub .cb-broadcast.cb-social-panel::before,#couldbetSocialHub .cb-broadcast.cb-social-panel::after { content:none; display:none; }
#couldbetSocialHub .cb-broadcast-stage { border:0; border-radius:0; outline:none; box-shadow:none; }
@media(max-width:600px){#couldbetSocialHub .cb-social-post-dialog:is(:has([name=ingestType]),:has([name=joinPolicy])){padding:26px 20px}}

/* Feed actions stay frameless when idle, hovered, pressed, selected or focused. */
#couldbetSocialHub[data-section=feed][data-view=list] .cb-post-feed-card .cb-social-actions>.cb-social-button{border:0;background:transparent;background-image:none;box-shadow:none;border-image:none;outline:none}
#couldbetSocialHub[data-section=feed][data-view=list] .cb-post-feed-card .cb-social-actions>.cb-social-button::before,
#couldbetSocialHub[data-section=feed][data-view=list] .cb-post-feed-card .cb-social-actions>.cb-social-button::after{content:none;display:none;background:none;border:0;box-shadow:none}
#couldbetSocialHub[data-section=feed][data-view=list] .cb-post-feed-card .cb-social-actions>.cb-social-button:focus-visible{outline:none}
#couldbetSocialHub[data-section=feed][data-view=list] .cb-post-feed-card .cb-social-actions>.cb-social-button:focus-visible .cb-post-art-icon{box-shadow:0 3px 0 currentColor}
#couldbetSocialHub[data-section=feed][data-view=list] .cb-post-feed-card .cb-social-actions>.cb-post-save[aria-pressed=true]{color:var(--cb-blue)}
#couldbetSocialHub .cb-sticker-feed-results { border: 0; border-image: none; box-shadow: none; }
/* Native inputs retain their own background contour. Containers paint their
   contour above children, so images and selected-option fills cannot cover it. */
.cb-auth :is(.auth-card, .auth-field, .auth-submit, .auth-provider),
#couldbetSocialHub :is(.cb-social-panel:not(.cb-sticker-feed-results), .cb-social-card, .cb-social-game-card, .cb-social-story, .cb-social-empty, .cb-social-error, .cb-sticker-topnav, .cb-social-subnav button, .cb-social-button:not(.cb-sticker-deposit):not(.cb-sticker-post-button), .cb-sticker-top-link.is-active, .cb-sticker-prompt > span:last-child, .cb-social-metric, .cb-sticker-mini-game, .cb-audience-trigger, .cb-audience-menu, .cb-compose-text-frame) {
    position: relative;
    isolation: isolate;
    background-image: none;
}
#couldbetSocialHub :is(.cb-social-post-dialog, .cb-social-dialog-card, .cb-sticker-hero-note) { isolation: isolate; background-image: none; }
#couldbetSocialHub .cb-social-dialog-card { position: relative; }
.cb-auth :is(.auth-card, .auth-field, .auth-submit, .auth-provider)::after,
#couldbetSocialHub :is(.cb-social-panel:not(.cb-sticker-feed-results), .cb-social-card, .cb-social-game-card, .cb-social-story, .cb-social-empty, .cb-social-error, .cb-social-post-dialog, .cb-social-dialog-card, .cb-sticker-topnav, .cb-social-subnav button, .cb-social-button:not(.cb-sticker-deposit):not(.cb-sticker-post-button), .cb-sticker-top-link.is-active, .cb-sticker-prompt > span:last-child, .cb-social-metric, .cb-sticker-mini-game, .cb-sticker-hero-note, .cb-audience-trigger, .cb-audience-menu, .cb-compose-text-frame)::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    background: var(--cb-box-outline) center / 100% 100% no-repeat;
}
#couldbetSocialHub .cb-compose-text-frame { border:3px solid transparent; border-radius:12px; background-color:var(--cb-paper); }
#couldbetSocialHub .cb-sticker-hero { isolation:isolate; --cb-hero-outline:url('/images/couldbet-social/hero-box-outline-light.svg'); }
#couldbetSocialHub[data-theme=dark] .cb-sticker-hero { --cb-hero-outline:url('/images/couldbet-social/hero-box-outline-dark.svg'); }
#couldbetSocialHub .cb-sticker-hero::after { content:''; position:absolute; inset:0; width:auto; height:auto; border-radius:0; z-index:20; pointer-events:none; background:var(--cb-hero-outline) center/100% 100% no-repeat; transform:none; border:0; }
#couldbetSocialHub .cb-hero-panel { position:absolute; inset:0; z-index:1; mask:url('/images/couldbet-social/hero-panel-mask.svg') center/100% 100% no-repeat; }
#couldbetSocialHub .cb-hero-popout { z-index:21; clip-path:inset(0 0 calc(100% - 25px)); pointer-events:none; }
/* Use the actual artwork proportions at every width, not fixed-height stretch. */
#couldbetSocialHub[data-section=feed] .cb-sticker-hero { height:auto; min-height:0; padding:0; aspect-ratio:1964 / 801; }
#couldbetSocialHub[data-section=feed] .cb-sticker-hero-art { top:0; height:100%; object-fit:contain; }
#couldbetSocialHub[data-theme=light] :is(textarea, select, input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range])):not(.cb-social-search > input) {
    background-color: var(--cb-bg) !important;
}
.cb-auth :is(.auth-card,.auth-field,.auth-provider,.auth-submit){background-image:none !important}
/* The shared feature search has one outer surface, never an opaque inner input. */
#couldbetSocialHub[data-theme] .cb-social-heading .cb-social-search{box-sizing:border-box;min-width:0;background:var(--cb-paper-2);overflow:hidden}
#couldbetSocialHub[data-theme] .cb-social-heading .cb-social-search>input{flex:1;width:0;min-width:0;height:100%;padding:0!important;border:0!important;border-radius:0;box-shadow:none!important;background:transparent!important;color:var(--cb-ink);appearance:none}
#couldbetSocialHub .cb-social-heading .cb-social-search>svg{width:20px;height:20px;flex:0 0 20px}
#couldbetSocialHub .cb-social-heading .cb-social-search:focus-within{outline:2px solid var(--cb-blue);outline-offset:2px}
.cb-auth .auth-submit::after{background-image:url('/images/couldbet-social/box-outline-light.svg?v=2')}
/* Supplied signup box, reused without baked-in text on every auth form. */
.cb-auth .auth-card::after{background-image:url('/images/couldbet-social/auth-card-supplied-light.svg?v=1')}
.cb-auth[data-theme=dark] .auth-card::after{background-image:url('/images/couldbet-social/auth-card-supplied-dark.svg?v=1')}
.cb-auth[data-theme=dark]{--auth-paper:var(--auth-bg)}
.cb-auth .auth-field::after,.cb-auth .auth-provider::after{background:none;border:1.5px solid #000;border-radius:12px}
.cb-auth[data-theme=dark] .auth-field::after,.cb-auth[data-theme=dark] .auth-provider::after{border-color:#737373}
.cb-auth[data-theme=dark] .auth-heading h1::before,.cb-auth[data-theme=dark] .auth-heading h1::after{color:#fff500}
#couldbetSocialHub .cb-post-feed-card::after{background-image:url('/images/couldbet-social/post-card-frame-light.svg?v=1') !important}
#couldbetSocialHub[data-theme=dark] .cb-post-feed-card::after{background-image:url('/images/couldbet-social/post-card-frame-dark.svg?v=1') !important}
#couldbetSocialHub .cb-post-feed-card{padding:18px 25px 14px 18px}
#couldbetSocialHub .cb-post-feed-card .cb-social-card-head{padding:0;align-items:flex-start;margin-bottom:4px}
#couldbetSocialHub .cb-post-feed-card .cb-social-author{gap:12px}
#couldbetSocialHub .cb-post-feed-card .cb-social-avatar{width:48px;height:48px;flex:0 0 48px;border:1.5px solid var(--cb-ink)}
#couldbetSocialHub .cb-post-feed-card .cb-social-author strong{display:flex;align-items:center;gap:5px;font-size:14px}
#couldbetSocialHub .cb-post-feed-card .cb-social-author small{font-size:10px}
#couldbetSocialHub .cb-post-feed-card>p{margin:0 0 6px 60px;padding:0;font-size:14px;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere}
#couldbetSocialHub .cb-post-feed-card>.cb-social-meta{margin-left:60px;margin-bottom:5px;padding:0;font-size:10px}
#couldbetSocialHub .cb-post-feed-card .cb-social-gallery{margin:4px 35px 0 60px;padding:0}
#couldbetSocialHub .cb-post-feed-card .cb-social-photo-button{border:1px solid var(--cb-ink);border-radius:10px;overflow:hidden;background:none}
#couldbetSocialHub .cb-post-feed-card .cb-social-gallery img{width:100%;height:auto;aspect-ratio:auto;max-height:640px;object-fit:contain;display:block}
#couldbetSocialHub .cb-post-feed-card .cb-social-actions{margin:3px 35px 0 60px;padding:0;gap:20px;align-items:center}
#couldbetSocialHub .cb-post-feed-card .cb-social-actions>.cb-social-button{border:0;background:none;padding:4px 0;min-width:42px;min-height:38px;display:flex;align-items:center;gap:5px;font-size:12px;box-shadow:none}
#couldbetSocialHub .cb-post-feed-card .cb-social-actions>.cb-social-button::after{display:none}
.cb-post-art-icon{width:21px;height:21px;display:inline-block;vertical-align:middle;flex:none}
.cb-post-verified{width:17px;height:17px}
.cb-post-tools{display:flex;gap:12px;align-items:center}
#couldbetSocialHub .cb-post-tools .cb-post-follow{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:106px;height:34px;min-height:34px;border:0;background:none;box-shadow:none;color:#1686d8;padding:0 12px 0 28px;font-size:12px;font-weight:800;line-height:1;white-space:nowrap}
#couldbetSocialHub .cb-post-tools .cb-post-follow>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#couldbetSocialHub .cb-post-tools .cb-post-follow>span{position:relative}
.cb-post-overflow{position:relative;z-index:25}
.cb-post-overflow summary{list-style:none;cursor:pointer;display:grid;place-items:center;width:32px;height:32px}
.cb-post-overflow summary::-webkit-details-marker{display:none}
.cb-post-menu{position:absolute;top:33px;right:0;min-width:140px;display:grid;padding:6px;background:var(--cb-paper);border:1px solid var(--cb-ink);border-radius:10px;box-shadow:0 6px 15px #0002}
.cb-post-menu button,.cb-post-menu a{color:inherit;text-align:left;background:none;border:0;padding:9px;font-size:12px;text-decoration:none}
#couldbetSocialHub .cb-post-feed-card .cb-post-save{margin-left:auto}
.cb-post-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:600px){
 #couldbetSocialHub .cb-post-feed-card{padding:16px 14px 12px}
 #couldbetSocialHub .cb-post-feed-card .cb-social-author{gap:7px}
 #couldbetSocialHub .cb-post-feed-card .cb-social-avatar{width:36px;height:36px;flex-basis:36px}
 #couldbetSocialHub .cb-post-feed-card>p,#couldbetSocialHub .cb-post-feed-card>.cb-social-meta{margin-left:43px}
 #couldbetSocialHub .cb-post-feed-card .cb-social-gallery{margin-left:43px;margin-right:0}
 #couldbetSocialHub .cb-post-feed-card .cb-social-gallery img{aspect-ratio:auto}
 #couldbetSocialHub .cb-post-feed-card .cb-social-actions{margin-left:43px;margin-right:0;gap:12px}
 .cb-post-tools{gap:2px}#couldbetSocialHub .cb-post-tools .cb-post-follow{min-width:96px;font-size:11px}
 #couldbetSocialHub .cb-post-feed-card .cb-social-author strong{font-size:12px}
}
/* Home posts share Community's whole-card contour; action icons stay unframed. */
#couldbetSocialHub[data-section=feed][data-view=list] .cb-post-feed-card::after{content:'';display:block;position:absolute;inset:-1px;z-index:5;pointer-events:none;background:url('/images/couldbet-social/hero-box-outline-light.svg') center/100% 100% no-repeat!important}
#couldbetSocialHub[data-theme=dark][data-section=feed][data-view=list] .cb-post-feed-card::after{background-image:url('/images/couldbet-social/hero-box-outline-dark.svg')!important}
/* Focused post thread; no homepage hero above the conversation. */
.cb-post-thread{display:grid;gap:18px;min-width:0}
.cb-thread-heading{display:flex;align-items:center;gap:18px;padding:6px 0}
.cb-thread-heading h1{font-size:25px;margin:0;color:var(--cb-ink)}
.cb-thread-heading p{font-size:12px;color:var(--cb-muted);margin:3px 0 0}
#couldbetSocialHub[data-view=post] .cb-sticker-quick-post{display:none}
#couldbetSocialHub .cb-thread-post .cb-social-gallery img{aspect-ratio:auto;height:auto;max-height:430px;object-fit:contain}
#couldbetSocialHub .cb-thread-post .cb-social-post-link{display:block;margin:0 0 7px 60px;font-size:11px}
#couldbetSocialHub .cb-thread-post .cb-social-actions{gap:12px;flex-wrap:wrap}
#couldbetSocialHub .cb-thread-post .cb-social-actions>.cb-social-button{min-height:40px}
#couldbetSocialHub .cb-thread-discussion{padding:24px;min-width:0}
.cb-thread-discussion-heading{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.cb-thread-discussion-heading h2{margin:0;font-size:23px}
.cb-thread-discussion-heading>span{border-radius:50%;background:#fff500;color:#080808;min-width:27px;text-align:center;font-weight:800}
#couldbetSocialHub .cb-thread-discussion>.cb-social-composer{padding:0 0 14px;margin:0 0 14px;border:0;background:none;box-shadow:none}
#couldbetSocialHub .cb-thread-discussion>.cb-social-composer::after{display:none}
#couldbetSocialHub .cb-thread-discussion .cb-compose-text-frame textarea{min-height:85px;height:85px;padding:15px}
#couldbetSocialHub .cb-thread-discussion .cb-social-actions{padding:8px 0 0;margin:0;justify-content:flex-end}
#couldbetSocialHub .cb-thread-discussion .cb-social-actions button{min-width:100px;min-height:44px}
.cb-thread-comments{display:grid;gap:17px}
.cb-thread-comment{display:flex;gap:12px;min-width:0}
.cb-thread-comment>.cb-social-avatar{flex:none;width:38px;height:38px}
.cb-thread-comment-content{min-width:0;flex:1;padding:12px 16px;background:#8c9ca014;border-radius:12px}
.cb-thread-comment header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cb-thread-comment header strong{font-size:14px}.cb-thread-comment time{font-size:10px;color:var(--cb-muted)}
.cb-thread-comment p{font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 0}
.cb-thread-comment-content>img{max-width:100%;max-height:250px;object-fit:contain}
.cb-thread-replies{display:grid;gap:12px;margin:15px 0 0;padding-left:12px;border-left:2px solid #9ba8b544}
.cb-thread-muted{font-size:13px;color:var(--cb-muted);padding:8px 0}
@media(max-width:600px){
 .cb-thread-heading{gap:8px;align-items:flex-start;flex-wrap:wrap}.cb-thread-heading h1{font-size:21px}
 #couldbetSocialHub .cb-thread-discussion{padding:20px 16px}
 .cb-thread-comment{gap:8px}.cb-thread-comment-content{padding:9px 10px}
 .cb-thread-comment header{align-items:flex-start;flex-direction:column;gap:2px}
 #couldbetSocialHub .cb-thread-post .cb-social-post-link{margin-left:43px}
}
/* Like is an icon state, not the generic outlined toggle-button state. */
#couldbetSocialHub .cb-social-actions .cb-post-like{--post-heart-fill:none;--post-heart-stroke:currentColor;background:none !important;border:0 !important;outline:none !important;box-shadow:none !important}
#couldbetSocialHub .cb-social-actions .cb-post-like[aria-pressed=true]{color:#f8404c;--post-heart-fill:#f8404c;--post-heart-stroke:#f8404c}
#couldbetSocialHub .cb-social-actions .cb-post-like::after{display:none !important}
#couldbetSocialHub .cb-social-actions .cb-post-like:focus-visible{text-decoration:underline;text-underline-offset:5px}
#couldbetSocialHub[data-section=feed][data-view=list] .cb-sticker-feed-results{position:relative;isolation:isolate;background:none;overflow:visible}
#couldbetSocialHub[data-section=feed][data-view=list] .cb-sticker-feed-results::before{display:none}
#couldbetSocialHub[data-section=feed][data-view=list] .cb-post-feed-card{position:relative;isolation:isolate;background:var(--cb-paper)!important;border-radius:12px;box-shadow:none;border:2px solid transparent;margin:0}
#couldbetSocialHub[data-section=feed][data-view=list] .cb-sticker-feed-results>.cb-social-stack{gap:8px}
#couldbetSocialHub[data-theme=dark][data-section=feed][data-view=list] .cb-post-feed-card{box-shadow:none}
#couldbetSocialHub[data-theme=dark][data-section=feed][data-view=list] .cb-sticker-feed-results::before{opacity:.65}
/* Readable post text in both themes. */
#couldbetSocialHub[data-theme=light] :is(.cb-post-feed-card>p,.cb-thread-comment p){color:#111318;font-weight:700}
#couldbetSocialHub[data-theme=dark] :is(.cb-post-feed-card>p,.cb-thread-comment p){color:#f5f7fa;font-weight:700}
/* Typing uses the supplied contour, without a second browser focus rectangle. */
#couldbetSocialHub :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), textarea, [contenteditable=true]):focus {
    outline: none;
    box-shadow: none;
}

/* Override the general dialog border: the SVG already supplies its outline. */
#couldbetSocialHub .cb-social-post-dialog:has([name=joinPolicy]){border:0!important}

/* Preserve the whole attachment in feed and repost galleries. */
#couldbetSocialHub .cb-post-feed-card .cb-social-gallery{align-items:start;grid-template-columns:repeat(2,minmax(0,1fr))}
#couldbetSocialHub .cb-post-feed-card .cb-social-gallery img{width:100%;height:auto;max-height:640px;aspect-ratio:auto;object-fit:contain}
#couldbetSocialHub .cb-post-feed-card .cb-social-gallery:has(> :nth-child(2)) img{aspect-ratio:1;height:auto;max-height:none;object-fit:contain}
#couldbetSocialHub .cb-post-feed-card .cb-social-photo-button{display:block;min-width:0;width:100%;padding:0!important;box-shadow:none;background:var(--cb-paper-2)}
#couldbetSocialHub .cb-post-feed-card .cb-post-videos{margin:12px 35px 0 60px;min-width:0}
@media(max-width:767px){#couldbetSocialHub .cb-post-feed-card .cb-post-videos{margin-left:43px;margin-right:0}}
