/* Scene: reddit */
.reddit { position: relative; padding: 18px; width: 100%; min-width: 0; font-family: var(--sans); }
.reddit-nt, .reddit-nt * { transition: none !important; }
.reddit-stage { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 16px; align-items: center; }

/* Reddit thread */
.reddit-thread { background: #fff; color: #1A1A1B; border-radius: 14px; padding: 12px 12px 6px; box-shadow: 0 24px 50px -24px rgba(0,0,0,.9); }
.reddit-th { display: flex; align-items: center; gap: 7px; font-size: 11.5px; padding-bottom: 9px; border-bottom: 1px solid #EDEFF1; }
.reddit-th img { width: 20px; height: 20px; border-radius: 50%; display: block; }
.reddit-th b { font-weight: 600; } .reddit-th span { color: #7C7C7C; margin-left: auto; font-size: 10.5px; }
.reddit-thread h6 { font-size: 13.5px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; margin: 10px 0 8px; }
.reddit-c { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; padding: 8px 0; border-top: 1px solid #F1F2F4; opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .55s var(--ease); }
.reddit-c.on { opacity: 1; transform: none; }
.reddit-v { display: grid; justify-items: center; align-content: start; gap: 1px; color: #FF4500; }
.reddit-v svg { width: 13px; height: 13px; fill: currentColor; } .reddit-v b { font-size: 9.5px; font-weight: 600; color: #1A1A1B; }
.reddit-meta { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #7C7C7C; margin-bottom: 3px; white-space: nowrap; overflow: hidden; }
.reddit-meta i { width: 16px; height: 16px; border-radius: 50%; flex: none; overflow: hidden; } .reddit-meta i img { width: 100%; height: 100%; object-fit: cover; display: block; } .reddit-meta b { color: #1A1A1B; font-weight: 600; }
.reddit-c p { font-size: 11.5px; line-height: 1.5; color: #2A2A2C; }
.reddit-hl { background: linear-gradient(var(--hc), var(--hc)) no-repeat 0 0 / 0% 100%; color: inherit; border-radius: 3px; padding: 1px 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .7s var(--ease); font-weight: 500; }
.reddit-hl.on { background-size: 100% 100%; }
.reddit-pain { --hc: #FFD3CC; --tc: #C2321F; } .reddit-obj { --hc: #FFE6A6; --tc: #8A5A00; } .reddit-des { --hc: #BFF0D6; --tc: #0B6B3F; }
.reddit-tag { display: inline-block; font-style: normal; font: 600 8px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--tc); padding: 3px 5px; border-radius: 4px; margin-left: 5px; vertical-align: 1px; opacity: 0; transform: scale(.6); transition: opacity .3s .35s, transform .45s var(--ease) .35s; }
.reddit-tag.on { opacity: 1; transform: none; }

/* Facebook ad */
.reddit-adwrap { position: relative; }
.reddit-adwrap::before, .reddit-adwrap::after { content: ''; position: absolute; inset: 0; border-radius: 14px; background: #fff; opacity: 0; transition: transform .6s var(--ease), opacity .4s; }
.reddit-adwrap.stack::before { opacity: .55; transform: translate(7px, -7px) rotate(1.6deg); } .reddit-adwrap.stack::after { opacity: .3; transform: translate(13px, -13px) rotate(3.2deg); }
.reddit-adwrap::after { z-index: 0; } .reddit-adwrap::before { z-index: 1; }
.reddit-ad { position: relative; z-index: 2; background: #fff; color: #050505; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 50px -24px rgba(0,0,0,.9); transition: box-shadow .5s; }
.reddit-ad.ready { box-shadow: 0 24px 50px -24px rgba(0,0,0,.9), 0 0 0 2px rgba(61,214,140,.85); }
.reddit-ah { display: flex; align-items: center; gap: 8px; padding: 11px 12px 8px; }
.reddit-av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #2F9E5B, #14713A); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; flex: none; }
.reddit-an { min-width: 0; line-height: 1.2; } .reddit-an b { font-size: 12px; font-weight: 600; display: block; } .reddit-an small { font-size: 10px; color: #65676B; display: flex; align-items: center; gap: 3px; }
.reddit-globe { width: 9px; height: 9px; fill: none; stroke: #65676B; stroke-width: 1.4; }
.reddit-ah > img { width: 18px; height: 18px; margin-left: auto; display: block; }
.reddit-body { padding: 0 12px 9px; display: grid; gap: 6px; }
.reddit-ln { position: relative; font-size: 11.5px; line-height: 1.42; min-height: 33px; }
.reddit-sk { position: absolute; inset: 3px 0 auto 0; display: grid; gap: 7px; transition: opacity .3s; }
.reddit-sk i { height: 9px; border-radius: 5px; background: #E9EBEE; } .reddit-sk i:last-child:not(:first-child) { width: 62%; }
.reddit-tx { opacity: 0; transition: opacity .45s; display: block; }
.reddit-ln.on .reddit-sk { opacity: 0; } .reddit-ln.on .reddit-tx { opacity: 1; }
.reddit-slot { border-radius: 3px; padding: 1px 0; font-weight: 600; background-color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.reddit-ln.on .reddit-slot { animation: reddit-ink 2.2s ease forwards; }
@keyframes reddit-ink { 0%, 55% { background-color: var(--hc); } 100% { background-color: transparent; } }
.reddit-img { position: relative; height: 104px; background: radial-gradient(120% 120% at 30% 20%, #F6E7CF, #E4C69A 60%, #CFA772); overflow: hidden; filter: grayscale(1) brightness(1.1); opacity: .45; transition: filter .8s, opacity .8s; }
.reddit-ad.ready .reddit-img { filter: none; opacity: 1; }
.reddit-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; display: block; }
.reddit-cta { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #F0F2F5; }
.reddit-ct { min-width: 0; flex: 1; } .reddit-ct small { display: block; font-size: 8.5px; letter-spacing: .04em; color: #65676B; }
.reddit-head { min-height: 18px; font-size: 13px; line-height: 1.3; letter-spacing: -.01em; } .reddit-head .reddit-sk { inset: 4px 20% auto 0; } .reddit-head .reddit-sk i { height: 10px; background: #DADDE1; }
.reddit-head .reddit-slot { font-weight: 700; }
.reddit-btn { flex: none; font-size: 10.5px; font-weight: 600; padding: 7px 10px; border-radius: 6px; background: #E4E6EB; color: #050505; white-space: nowrap; transition: background .5s, color .5s; }
.reddit-ad.ready .reddit-btn { background: #1877F2; color: #fff; }
.reddit-react { display: flex; justify-content: space-around; padding: 7px 8px; font-size: 10px; font-weight: 600; color: #65676B; border-top: 1px solid #E4E6EB; }
.reddit-react span { display: flex; align-items: center; gap: 4px; } .reddit-react svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

/* flying phrase */
.reddit-fly { position: absolute; left: 0; top: 0; z-index: 5; white-space: nowrap; font-size: 11.5px; font-weight: 600; line-height: 1.5; color: #1A1A1B; background: var(--hc); padding: 2px 6px; border-radius: 6px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.65), 0 0 0 1px rgba(0,0,0,.06); opacity: 0; pointer-events: none; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis;
  transition: transform .8s cubic-bezier(.5,0,.15,1), opacity .25s; }
.reddit-fly.show { opacity: 1; }

/* outcome */
.reddit-foot { display: grid; margin-top: 16px; align-items: center; } .reddit-foot > * { grid-area: 1 / 1; }
.reddit-st { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mute); transition: opacity .35s; padding: 0 4px; flex-wrap: wrap; }
.reddit-st.off { opacity: 0; }
.reddit-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: reddit-pulse 1.2s ease-in-out infinite; flex: none; }
@keyframes reddit-pulse { 50% { opacity: .3; transform: scale(.7); } }
.reddit-st i { font: 600 9px/1 var(--mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; padding: 5px 7px; border-radius: 5px; color: var(--dim); border: 1px solid var(--line); transition: background .4s, color .4s, border-color .4s; }
.reddit-st i:first-of-type { margin-left: auto; }
.reddit-st i.on { background: var(--hc); color: #1A1A1B; border-color: transparent; }
.reddit-out { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--ok-bg); border: 1px solid rgba(61,214,140,.28); font-size: 12.5px; line-height: 1.4; color: var(--mute); opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .6s var(--ease); }
.reddit-out.on { opacity: 1; transform: none; } .reddit-out b { color: var(--ink); font-weight: 600; }
.reddit-ok { width: 20px; height: 20px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; flex: none; }
.reddit-ok svg { width: 12px; height: 12px; fill: none; stroke: #06140D; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 600px) {
  .reddit { padding: 12px; }
  .reddit-stage { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .reddit-c p { font-size: 11px; } .reddit-thread h6 { margin: 8px 0 6px; } .reddit-c { padding: 6px 0; }
  .reddit-adwrap.stack::before { transform: translate(4px, -4px) rotate(1deg); } .reddit-adwrap.stack::after { transform: translate(8px, -8px) rotate(2deg); }
  .reddit-react { display: none; } .reddit-ln { min-height: 0; }
  .reddit-img { height: 78px; }
  .reddit-out { font-size: 11.5px; } .reddit-foot { margin-top: 14px; } .reddit-st { font-size: 11px; gap: 6px; } .reddit-st i { padding: 4px 5px; font-size: 8px; }
}
