/* R108: DomiGram owner social follow/save/repost and original family studio,
   integrated within the existing mobile-first five-tab design. */
.u4-personal-feed[hidden]{display:none!important}
.u4-personal-feed{margin:0 0 25px;display:grid;gap:12px;padding:15px;border-radius:24px;border:1px solid #dad5f9;background:linear-gradient(145deg,#e8e3ff,#f7f9ff 65%,#fceefa);box-shadow:0 12px 30px #5950ab16}
.u4-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.u4-head h3{font-size:22px;font-weight:950;color:#35216c;margin:5px 0 5px}.u4-head p{font-size:12px;color:#6d608d;line-height:1.9;margin:0}
.u4-overline{font-size:9px;letter-spacing:2px;font-weight:950;color:#7765cf;direction:ltr;display:inline-block}
.u4-orbit{display:grid;place-items:center;flex:0 0 auto;border-radius:19px;width:62px;height:62px;background:linear-gradient(136deg,#8057de,#42a1cb);color:#fff;font-size:36px;box-shadow:0 10px 20px #5c6bc839}
.u4-feed-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:5px;background:#fff9;border-radius:16px}
.u4-feed-tab{border:0;background:transparent;padding:11px 3px;border-radius:12px;font-size:11px;color:#6b5a92;font-weight:850;min-width:0;min-height:45px}
.u4-feed-tab.active{background:linear-gradient(135deg,#7056d1,#4c83cb);color:#fff;box-shadow:0 5px 13px #665ac837}
.u4-feed-content{min-width:0}.u4-feed-empty,.u4-wait{background:#fffd;padding:22px 15px;margin:0;border-radius:19px;border:1px dashed #c9c0ee;color:#6b5e91;font-size:12px;line-height:1.9;text-align:center}
.u4-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.u4-source-card{min-width:0;overflow:hidden;background:#fff;border-radius:18px;border:1px solid #e5def4;box-shadow:0 5px 12px #6457b012}
.u4-source-art{height:115px;position:relative;display:grid;place-items:center;overflow:hidden;font-size:47px;color:#fff;background:linear-gradient(135deg,#f69aac,#af87fa 60%,#84c9f0)}
.u4-source-art>img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}.u4-source-art>video{width:100%;height:100%;position:absolute;inset:0;object-fit:contain;background:#211834}
.u4-source-art>audio{position:absolute;inset:45px 3%;width:94%;height:38px}
.u4-source-copy{padding:13px;min-width:0;display:grid;gap:8px}.u4-source-copy small{font-size:10px;color:#80718f}.u4-source-copy strong{font-size:14px;color:#412d7e;line-height:1.45;overflow-wrap:anywhere}.u4-source-copy p{font-size:11px;line-height:1.8;margin:0;color:#6d6186;overflow-wrap:anywhere}
.u4-remove,.u4-load-more{border:1px solid #d8cef3;background:#f7f3ff;color:#634dbc;border-radius:12px;padding:10px;font-size:11px;font-weight:850;min-height:42px}.u4-load-more{width:100%;margin-top:12px;background:#fff}
.u4-family-intro{display:flex;align-items:center;gap:15px;padding:10px 0 17px}.u4-family-intro .u4-orbit{width:49px;height:49px;font-size:27px}
.u4-family-intro h3{margin:0 0 8px;font-size:20px;color:#362675}.u4-family-intro p{margin:0;color:#786c90;font-size:12px;line-height:1.7}
.u4-child-chooser{display:grid;gap:8px;padding:13px;background:#eeeafe;border-radius:15px;color:#5c4ba1;font-size:12px;font-weight:900}
.u4-child-chooser select{width:100%;min-height:48px;border:1px solid #cec2f5;border-radius:12px;padding:9px;background:#fff;color:#3b297c}
.u4-family-compose,.u4-family-library{padding:18px 0;border-bottom:1px solid #e6def3}.u4-family-compose h3,.u4-family-library h3{font-size:18px;color:#413288;margin:0 0 15px}
.u4-family-form{display:grid;gap:13px}.u4-family-form>label:not(.u3-rights){display:grid;gap:7px;font-size:12px;font-weight:850;color:#594987}
.u4-family-form input:not([type=checkbox]),.u4-family-form select,.u4-family-form textarea{width:100%;background:#fff;border:1px solid #d6ceea;border-radius:14px;min-height:46px;padding:12px;color:#443677;font-size:14px}
.u4-family-form textarea{resize:vertical;min-height:90px;line-height:1.85}.u4-family-form button{width:100%}
.u4-family-overview{display:flex;align-items:baseline;gap:10px;padding:12px 15px;background:linear-gradient(115deg,#dfd8ff,#d9f3f7);border-radius:15px;margin:10px 0;color:#493b96}
.u4-family-overview strong{font-size:23px}.u4-family-overview span{font-size:11px}
.u4-family-work{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#fff;border:1px solid #e5e0f1;border-radius:17px;margin:10px 0;padding:11px}
.u4-work-symbol{width:45px;height:45px;flex:0 0 auto;border-radius:15px;background:linear-gradient(140deg,#7b70dd,#4db2c0);color:#fff;display:grid;place-items:center;font-size:25px}
.u4-family-work div{flex:1;min-width:0}.u4-family-work strong{display:block;font-size:13px;color:#483580;overflow-wrap:anywhere}.u4-family-work small{display:block;font-size:11px;color:#877ba2;margin-top:7px}
.u4-family-submit{min-height:41px;background:#efeaff;color:#5e49b2;border-radius:11px;font-size:11px;padding:9px 12px;border:0}
@media(min-width:800px){.u4-source-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.u4-personal-feed{padding:20px}}
@media(max-width:380px){.u4-orbit{width:48px;height:48px;font-size:27px}.u4-head h3{font-size:19px}.u4-source-grid{gap:7px}.u4-source-copy{padding:10px}.u4-feed-tab{font-size:10px}.u4-personal-feed{padding:10px}}

.u4-family-draft-actions{display:flex;flex:1 1 100%;gap:8px;align-items:center;flex-wrap:wrap;border-top:1px solid #eee8f7;padding-top:10px}
.u4-family-draft-actions input[type=file]{min-width:0;flex:1 1 170px;font-size:11px;max-width:100%;background:#f6f2ff;border-radius:9px;padding:8px}
.u4-family-draft-actions .u4-family-submit{flex:1 1 110px}

/* DG16 — one clear, touch-safe set of ORIGINAL R3 Following/Saved/Reposts tabs.
   Counts and media remain sourced exclusively from authenticated owner-r3/feed. */
body.dg1-social .u4-personal-feed{background:linear-gradient(137deg,#f3efff,#eefbf7 70%,#fcf6ff);
 border-color:#e3d9f7;border-radius:24px}
body.dg1-social .u4-feed-tabs{background:#ffffffc4;padding:6px;border:1px solid #e4ddf1;
 border-radius:19px;gap:7px}
body.dg1-social .u4-feed-tab{min-height:53px;display:flex;align-items:center;justify-content:center;
 border-radius:14px;line-height:1.35;padding:9px 6px;font-weight:950;white-space:normal;
 touch-action:manipulation}
body.dg1-social .u4-feed-tab.active{background:linear-gradient(135deg,#6c4eca,#378baf)}
body.dg1-social .u4-feed-tab:focus-visible{outline:3px solid #25a6a0;outline-offset:2px}
body.dg1-social .u4-feed-content{min-height:88px}
body.dg1-social .u4-feed-content .u4-feed-empty{border:1px dashed #d4c8f2;
 background:#fff;color:#675985}
body.dg1-social #dg11PersonalHub .dg11-action:nth-child(3):focus-visible{
 outline:3px solid #269e9b;outline-offset:3px}
@media(max-width:440px){
 body.dg1-social .u4-feed-tabs{gap:4px;padding:4px}
 body.dg1-social .u4-feed-tab{font-size:10px;min-height:56px;padding:9px 3px}
}
@media(prefers-reduced-motion:reduce){body.dg1-social .u4-feed-tab{transition:none!important}}

/* DG16 final visual review: use readable full-width original social media cards
   on phones instead of squeezed half-width cards and large blank areas. */
@media(max-width:620px){
 body.dg1-social .u4-source-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 body.dg1-social .u4-source-card{border-radius:19px;min-width:0}
 body.dg1-social .u4-source-art{height:clamp(150px,46vw,210px)}
 body.dg1-social .u4-source-copy{padding:14px;gap:9px}
 body.dg1-social .u4-source-copy strong{font-size:14px;line-height:1.65;word-break:normal;overflow-wrap:anywhere}
 body.dg1-social .u4-source-copy p{font-size:11px;line-height:1.85}
}

/* DG17–DG18: the original R3 tabs are stable during refresh, and empty/error
   states give users ONE route back to the same Explore/Create navigation. */
body.dg1-social .u4-original-empty,
body.dg1-social .u4-feed-unavailable{display:flex;flex-direction:column;align-items:center;
 text-align:center;gap:10px;margin:3px 0 0;padding:24px 17px;border:1px solid #e5dcf5;
 border-radius:21px;background:linear-gradient(130deg,#fff,#f6f1ff 48%,#eafbf5);
 color:#4b397f}
body.dg1-social .u4-feed-unavailable{border-color:#ead6c9;background:linear-gradient(135deg,#fff,#fff3e7)}
body.dg1-social .u4-empty-symbol,
body.dg1-social .u4-unavailable-symbol{display:grid;place-items:center;width:64px;height:64px;
 border-radius:22px;background:linear-gradient(135deg,#6d52d3,#31aea2);color:#fff;font-size:31px;
 box-shadow:0 10px 24px #6055bb37}
body.dg1-social .u4-unavailable-symbol{background:linear-gradient(135deg,#cf955b,#a45fb9)}
body.dg1-social .u4-original-empty strong,
body.dg1-social .u4-feed-unavailable strong{font-size:16px;font-weight:950;line-height:1.65}
body.dg1-social .u4-original-empty p,
body.dg1-social .u4-feed-unavailable p{margin:0;max-width:420px;font-size:11px;line-height:1.9;color:#74688a}
body.dg1-social .u4-empty-action,
body.dg1-social .u4-retry-button{border:0;min-height:46px;border-radius:14px;padding:11px 20px;
 background:#5f48bd;color:#fff;font-weight:900;font-size:12px;cursor:pointer;touch-action:manipulation}
body.dg1-social .u4-empty-action:focus-visible,
body.dg1-social .u4-retry-button:focus-visible{outline:3px solid #21aaa2;outline-offset:3px}
body.dg1-social .u4-feed-content[aria-live]{min-height:100px}
@media(max-width:390px){
 body.dg1-social .u4-original-empty,body.dg1-social .u4-feed-unavailable{padding:20px 12px}
 body.dg1-social .u4-empty-symbol,body.dg1-social .u4-unavailable-symbol{width:56px;height:56px}
}
@media(prefers-reduced-motion:reduce){
 body.dg1-social .u4-original-empty *,body.dg1-social .u4-feed-unavailable *{transition:none!important}
}

/* T4 Reborn: one private child creation → visible guardian inspection →
   independent staff review → explicit guardian-only release. */
body.dg-reborn-t1 #u4FamilyComposer .r111-creator-start{
 padding:14px;border:1px solid #e1d9f1;border-radius:18px;
 background:#f8f6ff;display:grid;gap:12px;
}
body.dg-reborn-t1 .u4-open-original-canvas{
 min-height:48px;padding:11px 14px;border:1px solid #cab9ec;
 border-radius:12px;background:#eee5ff;color:#5435a9;
 font-weight:850;text-align:center;cursor:pointer;
}
body.dg-reborn-t1 .u4-family-work{
 display:flex;align-items:flex-start;gap:12px;border:1px solid var(--t1-line);
 background:#fff;border-radius:17px;padding:14px;
}
body.dg-reborn-t1 .u4-family-work .u4-family-draft-actions{
 flex:1 1 100%;width:100%;min-width:0;
 display:flex;flex-wrap:wrap;align-items:stretch;gap:10px;
}
body.dg-reborn-t1 .u4-family-work .u4-family-draft-actions>.u4-family-submit,
body.dg-reborn-t1 .u4-family-work .u4-family-draft-actions>[data-t4-review-open]{
 flex:1 1 175px;min-height:46px;
 border:1px solid #dfd5f5;border-radius:13px;
 background:#eee9ff;color:#563ca6;padding:11px;font-weight:850;
 cursor:pointer;
}
body.dg-reborn-t1 .t4-guardian-review{
 flex:1 1 100%!important;width:100%;min-width:0;
 display:grid;gap:13px;padding:14px;margin:0;
 background:#f8f6fe;border:1px solid #e2d8f4;border-radius:16px;
}
body.dg-reborn-t1 .t4-guardian-review[hidden]{display:none!important}
body.dg-reborn-t1 .t4-private-preview{
 display:grid;gap:12px;min-width:0;border:1px solid #ede4f8;
 border-radius:14px;padding:15px;background:#fff;
}
body.dg-reborn-t1 .t4-private-preview strong{
 font-size:17px;color:#3b2a74;overflow-wrap:anywhere;
}
body.dg-reborn-t1 .t4-private-preview p{
 font-size:13px;line-height:1.8;color:#5d5372;
 margin:0;white-space:pre-wrap;overflow-wrap:anywhere;
}
body.dg-reborn-t1 .t4-private-preview :is(img,video){
 display:block;width:100%;max-height:420px;object-fit:contain;
 background:#191429;border-radius:10px;
}
body.dg-reborn-t1 .t4-private-preview audio{width:100%}
body.dg-reborn-t1 .t4-review-confirm{
 display:flex;align-items:flex-start;gap:10px;min-width:0;
 padding:10px 12px;background:#fff;border:1px solid #e8def7;
 border-radius:12px;line-height:1.75;font-size:12px;color:#453577;
 cursor:pointer;
}
body.dg-reborn-t1 .t4-review-confirm input{
 width:20px;height:20px;flex:0 0 20px;margin:0;
 accent-color:#7254d7;
}
body.dg-reborn-t1 .t4-review-submit{
 width:100%;min-height:48px;background:#6546c2;color:#fff;
 border:0;border-radius:13px;font-size:13px;font-weight:850;
 padding:12px;cursor:pointer;
}
body.dg-reborn-t1 :is(.t4-review-submit,.t4-private-now,.t4-private-pause,.t4-private-schedule):disabled{
 opacity:.5;cursor:not-allowed;
}
body.dg-reborn-t1 .t4-review-status{
 display:block;flex:1 1 100%;font-size:12px;line-height:1.8;
 color:#69568d;margin:3px 0;
}
body.dg-reborn-t1 .t4-family-release{
 flex:1 1 100%;min-width:0;width:100%;display:grid;gap:11px;
 border-top:1px solid #e8dff4;padding-top:12px;
}
body.dg-reborn-t1 .t4-release-state{
 font-size:13px;font-weight:900;color:#413181;margin:0;
}
body.dg-reborn-t1 .t4-private-explanation{
 font-size:11px;color:#695d82;line-height:1.8;margin:0;
}
body.dg-reborn-t1 .t4-release-actions{
 display:flex;align-items:stretch;flex-wrap:wrap;gap:9px;
}
body.dg-reborn-t1 .t4-release-actions button,
body.dg-reborn-t1 .t4-release-actions input{
 min-height:46px;flex:1 1 140px;min-width:0;border-radius:11px;
 background:#f1edff;color:#5137a1;padding:9px 12px;
 border:1px solid #ddd2f1;font-size:12px;font-weight:850;
}
body.dg-reborn-t1 .t4-release-actions input{background:#fff}
body.dg-reborn-t1 .t4-release-actions .t4-private-pause{
 background:#fff2ed;color:#a14b39;border-color:#f0d2c7;
}
@media(max-width:430px){
 body.dg-reborn-t1 .t4-guardian-review{padding:10px}
 body.dg-reborn-t1 .t4-private-preview{padding:12px}
 body.dg-reborn-t1 .t4-release-actions{display:grid;grid-template-columns:minmax(0,1fr)}
}

/* The training-only, guest Story Maker is not a second creator workflow for
   an already authenticated family with a real original studio. Keep it for
   unauthenticated practice and family onboarding when no profile exists. */
body.dg-reborn-t1.t4-family-ready #page-create > .r110-guest-story-title,
body.dg-reborn-t1.t4-family-ready #page-create > #storyStart,
body.dg-reborn-t1.t4-family-ready #page-create > .creation-steps,
body.dg-reborn-t1.t4-family-ready #page-create > .r110-studio-help{
 display:none!important;
}

/* T5 creative challenges are original source-backed, age-aware and private,
   integrated BETWEEN the existing family creator and the original work library. */
body.dg-reborn-t1 .t5-family-challenges{
 display:grid;gap:15px;padding:23px 0;
 border-bottom:1px solid var(--t1-line,#e4def0);
}
body.dg-reborn-t1 .t5-family-heading{display:flex;align-items:flex-start;gap:12px}
body.dg-reborn-t1 .t5-family-icon{
 display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;
 border-radius:16px;background:linear-gradient(135deg,#654bd1,#36afa0);
 color:#fff;font-size:26px;
}
body.dg-reborn-t1 .t5-family-heading h3{
 margin:0 0 8px;font-size:20px;line-height:1.5;color:#38246e;
}
body.dg-reborn-t1 .t5-family-heading p{
 margin:0;color:#74688f;line-height:1.85;font-size:12px;
}
body.dg-reborn-t1 .t5-event-list{
 display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),1fr));
}
body.dg-reborn-t1 .t5-event-card,
body.dg-reborn-t1 .t5-private-entry{
 display:grid;gap:12px;min-width:0;background:#fff;
 border:1px solid #ded6ee;border-radius:18px;padding:16px;
 box-shadow:0 8px 24px #4d3c7b0d;
}
body.dg-reborn-t1 .t5-event-card{align-content:start}
body.dg-reborn-t1 .t5-event-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
body.dg-reborn-t1 .t5-event-top strong{
 font-size:15px;color:#392376;line-height:1.65;overflow-wrap:anywhere;
}
body.dg-reborn-t1 .t5-remaining{
 display:inline-flex;align-items:center;justify-content:center;
 border-radius:50px;background:#e9f8f2;color:#1d7f69;
 padding:6px 8px;min-width:82px;max-width:125px;text-align:center;
 font-size:10px;font-weight:850;line-height:1.45;
}
body.dg-reborn-t1 .t5-event-card p{
 margin:0;font-size:12px;color:#594a7b;line-height:1.85;
 overflow-wrap:anywhere;
}
body.dg-reborn-t1 .t5-terms{
 display:block;color:#806d99;font-size:11px;line-height:1.7;
}
body.dg-reborn-t1 .t5-event-card select{
 width:100%;min-width:0;min-height:46px;padding:9px;
 background:#fff;border-radius:12px;border:1px solid #d3c7ee;
 color:#4b368f;font-size:12px;
}
body.dg-reborn-t1 .t5-guardian-ack{
 display:flex;gap:10px;align-items:flex-start;padding:11px 13px;
 border-radius:12px;background:#f5f1ff;color:#51407b;
 line-height:1.7;font-size:11px;
}
body.dg-reborn-t1 .t5-guardian-ack input{
 flex:0 0 20px;width:20px;height:20px;margin:0;accent-color:#6e50c6;
}
body.dg-reborn-t1 .t5-join,
body.dg-reborn-t1 .t5-create-original{
 min-height:47px;border:0;border-radius:12px;padding:11px 14px;
 color:#fff;background:#5e48c1;font-size:12px;font-weight:900;cursor:pointer;
}
body.dg-reborn-t1 .t5-create-original{
 background:#f1eafe;color:#5d40ac;border:1px solid #dacbf3;
}
body.dg-reborn-t1 .t5-join:disabled{opacity:.48;cursor:not-allowed}
body.dg-reborn-t1 .t5-family-empty,
body.dg-reborn-t1 .t5-family-status{
 background:#f9f7fe;border:1px dashed #d8cdec;border-radius:15px;
 padding:16px;line-height:1.85;font-size:12px;color:#655887;
}
body.dg-reborn-t1 .t5-family-status .t5-retry{display:block;margin-top:9px}
body.dg-reborn-t1 .t5-family-error{font-size:11px;line-height:1.75;color:#b32e48}
body.dg-reborn-t1 .t5-my-challenge-entries{display:grid;gap:10px}
body.dg-reborn-t1 .t5-my-challenge-entries h4{
 font-size:14px;color:#382879;margin:0;
}
body.dg-reborn-t1 .t5-private-entry{
 background:linear-gradient(130deg,#f4f0ff,#ecfaf8);
}
body.dg-reborn-t1 .t5-private-entry>strong{
 font-size:14px;color:#392579;overflow-wrap:anywhere;
}
body.dg-reborn-t1 .t5-private-recognition{
 font-size:14px;font-weight:950;color:#277c73;
}
body.dg-reborn-t1 .t5-private-entry small{color:#71608b;line-height:1.7}
body.dg-reborn-t1 .t5-withdraw{
 min-height:44px;padding:9px 13px;background:#fff1ee;
 color:#97493f;border:1px solid #ebc9c6;border-radius:12px;
 font-size:12px;font-weight:800;cursor:pointer;
}
body.dg-reborn-t1 .t5-event-card :is(button,input,select):focus-visible,
body.dg-reborn-t1 .t5-private-entry button:focus-visible{
 outline:3px solid #29aba3;outline-offset:2px;
}
@media(max-width:390px){
 body.dg-reborn-t1 .t5-event-card,body.dg-reborn-t1 .t5-private-entry{padding:12px}
 body.dg-reborn-t1 .t5-family-heading h3{font-size:17px}
 body.dg-reborn-t1 .t5-remaining{max-width:100px}
}
@media(prefers-reduced-motion:reduce){
 body.dg-reborn-t1 .t5-family-challenges *{transition:none!important}
}

/* One editorially reviewed challenge, discovered in the SOCIAL Home, routes
   to the existing authorized family Create tab, never a parallel child feed. */
body.dg-reborn-t1 #t5HomeCreativeChallenge{
 display:flex;align-items:center;justify-content:space-between;gap:16px;
 margin:12px 0 19px;padding:16px 18px;min-width:0;
 background:linear-gradient(125deg,#f0edff,#e6fbf5);border:1px solid #d8cbed;
 border-radius:18px;box-shadow:0 8px 19px #6753a80e;
}
body.dg-reborn-t1 #t5HomeCreativeChallenge>div{display:grid;gap:5px;min-width:0}
body.dg-reborn-t1 #t5HomeCreativeChallenge strong{
 font-size:13px;color:#402982;line-height:1.55
}
body.dg-reborn-t1 #t5HomeCreativeChallenge p{
 font-size:13px;font-weight:850;line-height:1.5;color:#385e65;
 margin:0;overflow-wrap:anywhere
}
body.dg-reborn-t1 #t5HomeCreativeChallenge small{
 font-size:10px;color:#675c83;line-height:1.5
}
body.dg-reborn-t1 #t5HomeCreativeChallenge button{
 min-width:140px;min-height:45px;border:0;border-radius:12px;
 color:#fff;background:#644abf;font-size:11px;font-weight:850;
 cursor:pointer;padding:10px 13px;
}
body.dg-reborn-t1 #t5HomeCreativeChallenge button:focus-visible{
 outline:3px solid #25a8a3;outline-offset:2px;
}
@media(max-width:500px){
 body.dg-reborn-t1 #t5HomeCreativeChallenge{flex-direction:column;align-items:stretch;padding:14px}
 body.dg-reborn-t1 #t5HomeCreativeChallenge button{width:100%}
}
