/* Fun — mobile-only, member-only swipe discovery.
   Uses the site's existing color variables and Favorites controls. */
#siteMenuFunBtn[hidden]{display:none !important;}
@media (min-width:781px){
  #siteMenuFunBtn,.ccc-fun-page{display:none !important;}
}
@media (max-width:780px){
  .ccc-fun-page{
    box-sizing:border-box;
    width:min(100%,460px);
    min-width:0;
    margin:0 auto;
    padding:7px 14px max(12px, env(safe-area-inset-bottom));
    color:var(--text,#f5f5f8);
  }
  .ccc-fun-toolbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) 44px;
    align-items:center;
    gap:8px;
    width:100%;
    height:44px;
    margin:0 auto 22px;
  }
  .ccc-fun-toolbar > button{
    box-sizing:border-box;
    width:44px !important;
    min-width:44px !important;
    max-width:44px !important;
    height:44px !important;
    min-height:44px !important;
    padding:0 !important;
    margin:0 !important;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .ccc-fun-toolbar > button .material-symbols-outlined{font-size:22px;}
  .ccc-fun-owner-name{
    min-width:0;
    text-align:left;
    padding-left:4px;
    font-size:clamp(16.5px, 4.8vw, 21px);
    font-weight:800;
    color:#fff;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    line-height:1.3;
  }
  .ccc-fun-stage{
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    width:100%;
    min-width:0;
    padding:0;
    touch-action:none !important;
    overscroll-behavior:contain;
    -webkit-user-select:none;
    user-select:none;
  }
  .ccc-fun-image-frame{
    position:relative;
    width:110%;
    max-width:min(96.8vw,440px);
    /* Restore a larger card while reserving room for the Info icon and
       caption row on shorter phones. Viewport-based cap avoids scrolling. */
    height:max(176px, min(67.8dvh, calc(100dvh - 263px)));
    min-height:0;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:visible;
    background:transparent;
    border:0;
    border-radius:0;
    box-shadow:none;
  }
  .ccc-fun-main-image{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    cursor:pointer;
    -webkit-user-drag:none;
    -webkit-touch-callout:none;
    user-select:none;
    touch-action:none !important;
    transition:opacity .15s ease;
  }
  .ccc-fun-image-frame:not(.has-image) .ccc-fun-main-image{opacity:0;}
  .ccc-fun-image-frame.is-loading:not(.has-image)::after{
    content:'Loading cut…';
    position:absolute;
    left:50%;top:50%;
    transform:translate(-50%,-50%);
    color:var(--muted,#a8acb3);
    font-size:13px;
  }
  /* Translucent, non-interactive decision feedback stays inside the card frame.
     It never captures gestures or moves the existing Info control. */
  .ccc-fun-swipe-confirmation{
    position:absolute;
    inset:0;
    z-index:1;
    display:flex;
    align-items:center;
    justify-content:center;
    pointer-events:none;
    opacity:0;
    background:rgba(10,10,18,.18);
    transition:opacity .24s ease;
  }
  .ccc-fun-swipe-confirmation.is-visible{opacity:1;}
  .ccc-fun-swipe-confirmation-content{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    max-width:min(86%,260px);
    padding:16px 22px;
    border:1px solid rgba(255,255,255,.22);
    border-radius:14px;
    background:rgba(15,15,24,.56);
    box-shadow:0 5px 24px rgba(0,0,0,.24);
    color:#fff;
    text-align:center;
    text-shadow:0 1px 5px rgba(0,0,0,.5);
  }
  .ccc-fun-swipe-confirmation-arrow{
    font-size:36px;
    line-height:1;
  }
  .ccc-fun-swipe-confirmation-label{
    font-size:15px;
    line-height:1.3;
    font-weight:700;
  }
  .ccc-fun-image-status{
    position:absolute;
    left:10px;right:10px;bottom:14px;
    text-align:center;
    font-size:12px;
    color:#e9e9ef;
    text-shadow:0 2px 5px #000;
    pointer-events:none;
  }
  /* Center the thumbnail AND its adjacent text together as one compact group
     below the main card, rather than centering the thumbnail on its own. */
  .ccc-fun-card-caption{
    position:relative;
    box-sizing:border-box;
    width:min(100%, 214px);
    height:86px;
    min-height:86px;
    max-height:86px;
    overflow:hidden;
    display:grid;
    grid-template-columns:70px minmax(0,1fr);
    align-items:center;
    gap:12px;
    margin:12px auto 0;
    padding:4px 0;
  }
  .ccc-fun-context-thumb-wrap{
    position:relative;
    box-sizing:border-box;
    width:70px;
    height:76px;
    grid-column:1;
    min-width:0;
    display:flex;
    justify-content:center;
    align-items:center;
    overflow:hidden;
    border:0;
    background:transparent;
    border-radius:3px;
  }
  .ccc-fun-context-thumb{
    display:block;
    width:100%;height:100%;
    object-fit:contain;
    -webkit-user-drag:none;
    pointer-events:none;
  }
  .ccc-fun-context-thumb-wrap:not(.has-image) .ccc-fun-context-thumb{display:none;}
  .ccc-fun-context-placeholder{
    position:absolute;
    top:50%;left:50%;
    transform:translate(-50%,-50%);
    color:var(--muted,#a8acb3);
    font-size:27px;
    opacity:.48;
  }
  .ccc-fun-context-thumb-wrap.has-image .ccc-fun-context-placeholder{display:none;}
  .ccc-fun-context-text{
    grid-column:2;
    min-width:0;
    height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    text-align:center;
    overflow-wrap:anywhere;
  }
  .ccc-fun-issue{
    max-width:100%;
    color:var(--text,#f4f4f8);
    font-size:13px;
    line-height:1.2;
    font-weight:700;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
  }
  .ccc-fun-set{
    max-width:100%;
    color:var(--muted,#a8acb3);
    font-size:11px;
    line-height:1.25;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
  }
  /* The bare Info glyph sits entirely below the main image's right edge,
     inside the reserved gap above the context row. */
  .ccc-fun-info{
    position:absolute;
    z-index:2;
    right:5%;
    bottom:-30px;
    display:flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    width:30px!important;
    min-width:30px!important;
    max-width:30px!important;
    height:30px!important;
    min-height:30px!important;
    padding:0!important;
    margin:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    border-radius:0!important;
    color:var(--text,#f4f4f8);
    touch-action:manipulation;
    cursor:pointer;
  }
  .ccc-fun-info .material-symbols-outlined{font-size:21.6px;}
  .ccc-fun-info:focus-visible{outline:2px solid currentColor;outline-offset:0;border-radius:6px!important;}

  /* Reuse the earlier Fun help pop-up rather than a new page or a new menu. */
  .ccc-fun-help-panel[hidden]{display:none!important;}
  .ccc-fun-help-panel{
    position:fixed;
    inset:0;
    z-index:2147483200;
    display:flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    background:rgba(0,0,0,.78);
    padding:16px;
    touch-action:manipulation;
    overscroll-behavior:contain;
  }
  .ccc-fun-help-card{
    width:min(100%,400px);
    box-sizing:border-box;
    max-height:calc(100dvh - 36px);
    overflow:auto;
    border-radius:16px;
    border:1px solid rgba(255,255,255,.20);
    background:var(--panel,#15171a);
    box-shadow:0 18px 55px rgba(0,0,0,.5);
    padding:20px 16px;
    color:var(--text,#eef0f6);
  }
  .ccc-fun-help-card h2{font-size:19px;text-align:center;margin:0 0 12px;}
  .ccc-fun-help-card p{
    font-size:12px;line-height:1.45;
    margin:12px 0 0;
    color:var(--muted,#a8acb3);
    text-align:center;
  }
  .ccc-fun-help-card button{display:block;width:100%;min-height:44px;margin-top:16px;}
  .ccc-fun-gesture-map{
    position:relative;
    box-sizing:border-box;
    display:block;
    width:100%;
    height:124px;
    margin:0 auto;
    color:var(--muted,#a8acb3);
    user-select:none;
    pointer-events:none;
    overflow:hidden;
  }
  .ccc-fun-compass-arrows{
    position:absolute;
    top:50%;left:50%;
    width:92px;height:92px;
    transform:translate(-50%,-50%);
    color:rgba(244,244,250,.89);
    overflow:visible;
  }
  .ccc-fun-compass-shaft{fill:none;stroke:currentColor;stroke-width:4;stroke-linecap:round;}
  .ccc-fun-compass-head{
    fill:none;stroke:currentColor;stroke-width:5;
    stroke-linecap:round;stroke-linejoin:round;
  }
  .ccc-fun-cross-label{
    position:absolute;
    display:block;
    max-width:calc(50% - 49px);
    min-width:0;
    font-size:11px;
    font-weight:700;
    line-height:1.15;
    white-space:normal;
    overflow-wrap:normal;
  }
  .ccc-fun-cross-up{top:1px;left:calc(50% + 13px);text-align:left;}
  .ccc-fun-cross-left{top:50%;right:calc(50% + 48px);transform:translateY(-50%);text-align:right;}
  .ccc-fun-cross-right{top:50%;left:calc(50% + 48px);transform:translateY(-50%);text-align:left;}
  .ccc-fun-cross-down{bottom:0;right:calc(50% + 13px);text-align:right;}
  /* The badge is the public count for this exact card's existing Favorites
     record. It is never a separate "like" action or locally saved total. */
  .ccc-fun-toolbar > .ccc-fun-favorite{
    position:relative;
    overflow:visible;
  }
  .ccc-fun-favorite-count[hidden]{display:none !important;}
  .ccc-fun-favorite-count{
    box-sizing:border-box;
    position:absolute;
    right:-6px;
    bottom:-5px;
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:19px;
    max-width:44px;
    height:19px;
    padding:0 4px;
    border:1px solid rgba(255,255,255,.27);
    border-radius:999px;
    background:#24222d;
    color:#fff;
    font-size:10px;
    font-weight:750;
    line-height:1;
    font-variant-numeric:tabular-nums;
    pointer-events:none;
  }
  /* Owning a cut is never a Favorite action. Keep the heart grey and disabled
     even if a prior saved favorite happens to exist for that card. */
  .ccc-fun-toolbar > .ccc-fun-favorite.ccc-fun-own-card,
  .ccc-fun-toolbar > .ccc-fun-favorite.ccc-fun-own-card:disabled{
    opacity:.52 !important;
    color:#9ba0aa !important;
    background:rgba(100,104,112,.16) !important;
    border-color:rgba(151,155,166,.30) !important;
    cursor:not-allowed !important;
    filter:grayscale(1) !important;
  }
  .ccc-fun-favorite.ccc-fun-own-card .material-symbols-outlined{
    color:#9ba0aa !important;
  }
  .ccc-fun-empty{
    margin:28px 0;
    border:1px solid var(--border,rgba(255,255,255,.09));
    padding:24px 16px;
    border-radius:12px;
    text-align:center;
    font-size:14px;
    color:var(--muted,#a8acb3);
  }
}
@media (max-width:350px){
  .ccc-fun-page{padding-inline:10px;}
  .ccc-fun-card-caption{grid-template-columns:60px minmax(0,1fr);gap:10px;}
  .ccc-fun-context-thumb-wrap{width:60px;height:70px;}
  .ccc-fun-info{right:4%;}
  .ccc-fun-cross-label{font-size:10px;}
}
@media (max-height:670px) and (max-width:780px){
  .ccc-fun-image-frame{height:max(162px, min(67.8dvh, calc(100dvh - 263px)));}
}
@media (prefers-reduced-motion:reduce){
  .ccc-fun-main-image,
  .ccc-fun-swipe-confirmation{transition:none;}
}
